BUG优化

dev
xiepeng 2024-05-07 18:03:26 +08:00
parent b1f3b11945
commit 6f0b136a2f
14 changed files with 254 additions and 228 deletions

View File

@ -39,11 +39,13 @@
</template>
</el-table-column>
<el-table-column prop="INQUIRYCONTENT" label="问询内容" />
<el-table-column
prop="INQUIRYCONCLUSION"
label="问询结果"
width="100"
/>
<el-table-column prop="INQUIRYCONCLUSION" label="问询结果" width="100">
<template #default="{ row }">
<el-tag v-if="row.INQUIRYCONCLUSION === '1'" type="success"
>正常</el-tag
>
</template>
</el-table-column>
<el-table-column prop="CREATTIME" label="创建时间" width="150" />
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
<el-table-column label="操作" width="100">

View File

@ -43,7 +43,19 @@
</template>
</el-table-column>
<el-table-column prop="CHECKITEMNAME" label="检查项名称" />
<el-table-column prop="CHECKTYPE_NAME" label="检查项类型" width="80" />
<el-table-column prop="CHECKTYPE_NAME" label="检查项类型" width="80">
<template #default="{ row }">
<el-tag v-if="row.CHECKTYPE_NAME === '出车前'" type="warning">{{
row.CHECKTYPE_NAME
}}</el-tag>
<el-tag v-if="row.CHECKTYPE_NAME === '行车中'">{{
row.CHECKTYPE_NAME
}}</el-tag>
<el-tag v-if="row.CHECKTYPE_NAME === '收车后'" type="success">{{
row.CHECKTYPE_NAME
}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="REMARKS" label="检查项说明" />
<el-table-column prop="CREATTIME" label="创建时间" width="150" />
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
@ -98,6 +110,7 @@ import { layoutFnGetDrivingType } from "@/assets/js/data_dictionary.js";
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getSafetyDrivingTypeList);
console.log(await getSafetyDrivingTypeList());
const data = reactive({
addOrEditDialog: {
visible: false,

View File

@ -10,22 +10,6 @@
<el-divider content-position="left">添加</el-divider>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="客户类型" prop="CUSTOMERTYPE">
<el-select
v-model="data.form.CUSTOMERTYPE"
placeholder="请选择客户类型"
clearable
>
<el-option
v-for="item in CUSTOMERTYPEMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户名称" prop="CUSTOMERNAME">
<el-input
@ -83,6 +67,8 @@
v-model="contact.CONTACTPHONE"
placeholder="请输入联系电话"
clearable
maxlength="11"
show-word-limit
/>
</el-form-item>
</el-col>
@ -119,7 +105,6 @@
</template>
<script setup>
import { CUSTOMERTYPEMENU } from "@/assets/js/constant";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";

View File

@ -10,22 +10,6 @@
<el-divider content-position="left">修改</el-divider>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="客户类型" prop="CUSTOMERTYPE">
<el-select
v-model="data.form.CUSTOMERTYPE"
placeholder="请选择客户类型"
clearable
>
<el-option
v-for="item in CUSTOMERTYPEMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户名称" prop="CUSTOMERNAME">
<el-input
@ -83,6 +67,8 @@
v-model="contact.CONTACTPHONE"
placeholder="请输入联系电话"
clearable
maxlength="11"
show-word-limit
/>
</el-form-item>
</el-col>
@ -119,7 +105,6 @@
</template>
<script setup>
import { CUSTOMERTYPEMENU } from "@/assets/js/constant";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";

View File

@ -8,11 +8,12 @@
>
<el-row>
<el-col :span="6">
<el-form-item label="客户类型" prop="CUSTOMERTYPE">
<el-select v-model="searchForm.CUSTOMERTYPE" clearable>
<el-option label="委托方" :value="1" />
<el-option label="确认方" :value="2" />
</el-select>
<el-form-item label="客户名称" prop="CUSTOMERNAME">
<el-input
v-model="searchForm.CUSTOMERNAME"
placeholder="请输入客户名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
@ -39,22 +40,10 @@
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="CUSTOMERTYPE" label="客户类型" width="100">
<template #default="{ row }">
{{
row.CUSTOMERTYPE === "1"
? "委托方"
: row.CUSTOMERTYPE === "2"
? "确认方"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="CUSTOMERNAME" label="客户名称" />
<el-table-column prop="CONTACT" label="联系人" />
<el-table-column prop="CONTACTPHONE" label="联系电话" />
<el-table-column prop="CUSTOMERADDRESS" label="客户地址" />
<el-table-column prop="CORP_NAME" label="运输企业" width="100" />
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
<el-table-column label="操作" width="130">
<template #default="{ row }">

View File

@ -8,22 +8,6 @@
>
<el-divider content-position="left">添加</el-divider>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="地点类型" prop="LOCATIONTYPE">
<el-select
v-model="data.form.LOCATIONTYPE"
placeholder="请选择地点类型"
clearable
>
<el-option
v-for="item in LOCATIONTYPEMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="地点名称" prop="LOCATIONNAME">
<el-input
@ -88,7 +72,6 @@
</template>
<script setup>
import { LOCATIONTYPEMENU } from "@/assets/js/constant";
import LayoutTerritory from "@/components/territory/index.vue";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";

View File

@ -8,22 +8,6 @@
>
<el-divider content-position="left">添加</el-divider>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="地点类型" prop="LOCATIONTYPE">
<el-select
v-model="data.form.LOCATIONTYPE"
placeholder="请选择地点类型"
clearable
>
<el-option
v-for="item in LOCATIONTYPEMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="地点名称" prop="LOCATIONNAME">
<el-input
@ -88,7 +72,6 @@
</template>
<script setup>
import { LOCATIONTYPEMENU } from "@/assets/js/constant";
import LayoutTerritory from "@/components/territory/index.vue";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";

View File

@ -8,11 +8,12 @@
>
<el-row>
<el-col :span="6">
<el-form-item label="地点类型" prop="LOCATIONTYPE">
<el-select v-model="searchForm.LOCATIONTYPE" clearable>
<el-option label="起运地" :value="1" />
<el-option label="目的地" :value="2" />
</el-select>
<el-form-item label="地点名称" prop="LOCATIONNAME">
<el-input
v-model="searchForm.LOCATIONNAME"
placeholder="请输入地点名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
@ -39,20 +40,8 @@
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="LOCATIONTYPE" label="地点类型" width="80">
<template #default="{ row }">
{{
row.LOCATIONTYPE === "1"
? "起运地"
: row.LOCATIONTYPE === "2"
? "目的地"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="LOCATIONNAME" label="地点名称" />
<el-table-column prop="ADDRESSDETAILS" label="地址详情" />
<el-table-column prop="CORP_NAME" label="运输企业" />
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
<el-table-column label="操作" width="150">
<template #default="{ row }">

View File

@ -307,6 +307,42 @@ import { useRouter } from "vue-router";
import { getFreightTrailerList } from "@/request/enterprise_management.js";
const formRef = ref(null);
const confirmed = (rule, client, callback) => {
if (client) {
if (client === data.form.CONFIRMER) {
callback(new Error("客户名称已被确认方选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const client = (rule, confirmed, callback) => {
if (confirmed) {
if (confirmed === data.form.CLIENT) {
callback(new Error("客户名称已被委托方选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const bourn = (rule, origin, callback) => {
if (origin) {
if (origin === data.form.DESTINATION) {
callback(new Error("地点已被目的地选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const origin = (rule, bourn, callback) => {
if (bourn) {
if (bourn === data.form.ORIGIN) {
callback(new Error("地点已被起运地选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const rules = {
CORPINFO_ID: [
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
@ -334,7 +370,10 @@ const rules = {
TRANSPORTVEHICLE: [
{ required: true, message: "请选择运营车辆", trigger: "change" },
],
CLIENT: [{ required: true, message: "请选择委托方名称", trigger: "change" }],
CLIENT: [
{ required: true, message: "请选择委托方名称", trigger: "change" },
{ validator: confirmed, trigger: "change" },
],
CLIENTCONTACTPERSON: [
{ required: true, message: "请输入联系人姓名", trigger: "blur" },
],
@ -348,16 +387,21 @@ const rules = {
],
CONFIRMER: [
{ required: true, message: "请选择确认方名称", trigger: "change" },
{ validator: client, trigger: "change" },
],
CONFIRMINGPERSON: [
{ required: true, message: "请选择确认方联系人", trigger: "change" },
],
ORIGIN: [{ required: true, message: "请选择起运地点", trigger: "change" }],
ORIGIN: [
{ required: true, message: "请选择起运地点", trigger: "change" },
{ validator: bourn, trigger: "change" },
],
SHIPPINGADDRESS: [
{ required: true, message: "请输入起运地址", trigger: "blur" },
],
DESTINATION: [
{ required: true, message: "请选择目的地点", trigger: "change" },
{ validator: origin, trigger: "change" },
],
DESTINATIONADDRESS: [
{ required: true, message: "请输入目的地址", trigger: "blur" },
@ -504,7 +548,6 @@ const fnCustomerType = async () => {
const varList = res.varList;
const clientMap = new Map();
varList.forEach((item) => {
if (item.CUSTOMERTYPE === "1") {
if (!clientMap.has(item.CUSTOMERNAME)) {
clientMap.set(item.CUSTOMERNAME, {
CUSTOMERNAME: item.CUSTOMERNAME,
@ -512,19 +555,18 @@ const fnCustomerType = async () => {
CONTACTS: [],
});
}
});
varList.forEach((item) => {
// CUSTOMERNAME
clientMap.get(item.CUSTOMERNAME).CONTACTS.push({
CONTACT: item.CONTACT,
CONTACT_ID: item.CONTACT_ID,
CONTACTPHONE: item.CONTACTPHONE,
});
}
});
data.clientOptionsList = [...clientMap.values()];
const confirmerMap = new Map();
varList.forEach((item) => {
if (item.CUSTOMERTYPE === "2") {
if (!confirmerMap.has(item.CUSTOMERNAME)) {
confirmerMap.set(item.CUSTOMERNAME, {
CUSTOMERNAME: item.CUSTOMERNAME,
@ -538,7 +580,6 @@ const fnCustomerType = async () => {
CONTACT_ID: item.CONTACT_ID,
CONTACTPHONE: item.CONTACTPHONE,
});
}
});
data.confirmerOptionsList = [...confirmerMap.values()];
};
@ -549,7 +590,6 @@ const fnLocation = async () => {
const StartOptionstMap = new Map();
varList.forEach((item) => {
if (item.LOCATIONTYPE === "1") {
if (!StartOptionstMap.has(item.LOCATIONNAME)) {
StartOptionstMap.set(item.LOCATIONNAME, {
LOCATIONNAME: item.LOCATIONNAME,
@ -563,13 +603,11 @@ const fnLocation = async () => {
ADDRESSDETAILS_ID: item.ADDRESSDETAILS_ID,
ADMINISTRATIVEREGIONS: item.ADMINISTRATIVEREGIONS,
});
}
});
data.StartOptionsList = [...StartOptionstMap.values()];
const EndOptionsMap = new Map();
varList.forEach((item) => {
if (item.LOCATIONTYPE === "2") {
if (!EndOptionsMap.has(item.LOCATIONNAME)) {
EndOptionsMap.set(item.LOCATIONNAME, {
LOCATIONNAME: item.LOCATIONNAME,
@ -583,7 +621,6 @@ const fnLocation = async () => {
ADDRESSDETAILS_ID: item.ADDRESSDETAILS_ID,
ADMINISTRATIVEREGIONS: item.ADMINISTRATIVEREGIONS,
});
}
});
data.EndOptionsList = [...EndOptionsMap.values()];
};
@ -638,14 +675,12 @@ onMounted(async () => {
const fnSubmit = async () => {
await useFormValidate(formRef);
const formData = new FormData();
Object.keys(data.form).forEach((key) => {
formData.append(key, data.form[key]);
});
await addSafetyWaybillreView(formData);
ElMessage.success("添加成功");
await router.push("/electronic_waybill_management/waybill_registration");
router.back();
Object.keys(data.form).forEach((key) => {
if (Array.isArray(data.form[key])) {
data.form[key] = [];

View File

@ -109,7 +109,6 @@
v-model="data.form.CLIENT"
placeholder="请选择委托方"
@update:model-value="fnClientChange"
>
>
<el-option
v-for="item in data.clientOptionsList"
@ -311,7 +310,42 @@ const formRef = ref(null);
const route = useRoute();
const WAYBILLREGISTRATION_ID = route.query.WAYBILLREGISTRATION_ID;
const confirmed = (rule, client, callback) => {
if (client) {
if (client === data.form.CONFIRMER) {
callback(new Error("客户名称已被确认方选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const client = (rule, confirmed, callback) => {
if (confirmed) {
if (confirmed === data.form.CLIENT) {
callback(new Error("客户名称已被委托方选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const bourn = (rule, origin, callback) => {
if (origin) {
if (origin === data.form.DESTINATION) {
callback(new Error("地点已被目的地选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const origin = (rule, bourn, callback) => {
if (bourn) {
if (bourn === data.form.ORIGIN) {
callback(new Error("地点已被起运地选中,请重新选择"));
} else callback();
} else {
callback();
}
};
const rules = {
CORPINFO_ID: [
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
@ -324,11 +358,25 @@ const rules = {
],
WAYBILLNUMBER: [
{ required: true, message: "请输入运单编号", trigger: "blur" },
/* { min: 7, message: "7", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (!/^[A-Za-z0-9]+$/.test(value)) {
callback(new Error("运单编号只能包含大小写英文字符和数字"));
} else {
callback();
}
},
trigger: "blur",
}, */
],
TRANSPORTVEHICLE: [
{ required: true, message: "请选择运营车辆", trigger: "change" },
],
CLIENT: [{ required: true, message: "请选择委托方名称", trigger: "change" }],
CLIENT: [
{ required: true, message: "请选择委托方名称", trigger: "change" },
{ validator: confirmed, trigger: "change" },
],
CLIENTCONTACTPERSON: [
{ required: true, message: "请输入联系人姓名", trigger: "blur" },
],
@ -342,16 +390,21 @@ const rules = {
],
CONFIRMER: [
{ required: true, message: "请选择确认方名称", trigger: "change" },
{ validator: client, trigger: "change" },
],
CONFIRMINGPERSON: [
{ required: true, message: "请选择确认方联系人", trigger: "change" },
],
ORIGIN: [{ required: true, message: "请选择起运地点", trigger: "change" }],
ORIGIN: [
{ required: true, message: "请选择起运地点", trigger: "change" },
{ validator: bourn, trigger: "change" },
],
SHIPPINGADDRESS: [
{ required: true, message: "请输入起运地址", trigger: "blur" },
],
DESTINATION: [
{ required: true, message: "请选择目的地点", trigger: "change" },
{ validator: origin, trigger: "change" },
],
DESTINATIONADDRESS: [
{ required: true, message: "请输入目的地址", trigger: "blur" },
@ -414,6 +467,7 @@ const fnGetData = async () => {
data.form.CONFIRMINGPHONE = data.form.CONFIRM_PHONE;
data.form.STARTADMINISTRATIVEAREA = data.form.DEPARTURE_ADDR;
data.form.ENDDMINISTRATIVEAREA = data.form.GOAL_ADDR;
console.log(data.form);
};
fnGetData();
const fnClientChange = () => {
@ -511,7 +565,6 @@ const fnCustomerType = async () => {
const varList = res.varList;
const clientMap = new Map();
varList.forEach((item) => {
if (item.CUSTOMERTYPE === "1") {
if (!clientMap.has(item.CUSTOMERNAME)) {
clientMap.set(item.CUSTOMERNAME, {
CUSTOMERNAME: item.CUSTOMERNAME,
@ -525,13 +578,10 @@ const fnCustomerType = async () => {
CONTACT_ID: item.CONTACT_ID,
CONTACTPHONE: item.CONTACTPHONE,
});
}
});
data.clientOptionsList = [...clientMap.values()];
const confirmerMap = new Map();
varList.forEach((item) => {
if (item.CUSTOMERTYPE === "2") {
if (!confirmerMap.has(item.CUSTOMERNAME)) {
confirmerMap.set(item.CUSTOMERNAME, {
CUSTOMERNAME: item.CUSTOMERNAME,
@ -545,7 +595,6 @@ const fnCustomerType = async () => {
CONTACT_ID: item.CONTACT_ID,
CONTACTPHONE: item.CONTACTPHONE,
});
}
});
data.confirmerOptionsList = [...confirmerMap.values()];
};
@ -555,41 +604,37 @@ const fnLocation = async () => {
const varList = res.varList || [];
const StartOptionstMap = new Map();
varList.forEach((item) => {
if (item.LOCATIONTYPE === "1") {
if (!StartOptionstMap.has(item.LOCATIONNAME)) {
StartOptionstMap.set(item.LOCATIONNAME, {
LOCATIONNAME: item.LOCATIONNAME,
LOCATIONNAME_ID: item.LOCATIONNAME_ID,
LOCATION: [],
LOCATION: []
});
}
// CUSTOMERNAME
StartOptionstMap.get(item.LOCATIONNAME).LOCATION.push({
ADDRESSDETAILS: item.ADDRESSDETAILS,
ADDRESSDETAILS_ID: item.ADDRESSDETAILS_ID,
ADMINISTRATIVEREGIONS: item.ADMINISTRATIVEREGIONS,
ADMINISTRATIVEREGIONS: item.ADMINISTRATIVEREGIONS
});
}
});
data.StartOptionsList = [...StartOptionstMap.values()];
const EndOptionsMap = new Map();
varList.forEach((item) => {
if (item.LOCATIONTYPE === "2") {
if (!EndOptionsMap.has(item.LOCATIONNAME)) {
EndOptionsMap.set(item.LOCATIONNAME, {
LOCATIONNAME: item.LOCATIONNAME,
LOCATIONNAME_ID: item.LOCATIONNAME_ID,
LOCATION: [],
LOCATION: []
});
}
// CUSTOMERNAME
EndOptionsMap.get(item.LOCATIONNAME).LOCATION.push({
ADDRESSDETAILS: item.ADDRESSDETAILS,
ADDRESSDETAILS_ID: item.ADDRESSDETAILS_ID,
ADMINISTRATIVEREGIONS: item.ADMINISTRATIVEREGIONS,
ADMINISTRATIVEREGIONS: item.ADMINISTRATIVEREGIONS
});
}
});
data.EndOptionsList = [...EndOptionsMap.values()];
};
@ -624,7 +669,6 @@ const fnDepartmentChange = async () => {
};
const fnGetUser = async (DEPARTMENT_ID) => {
const resData = await getUserListAll({ DEPARTMENT_ID });
console.log(resData);
data.userList = resData.userList;
};
@ -649,6 +693,8 @@ const fnSubmit = async () => {
Object.keys(data.form).forEach((key) => {
formData.append(key, data.form[key]);
});
console.log("委托方",data.form.ENTRUST_PERSON);
console.log("确认方",data.form.CONFIRM_PERSON);
await editSafetyWaybillreInfo(formData);
ElMessage.success("修改成功");
router.back();

View File

@ -9,7 +9,11 @@
<el-row>
<el-col :span="6">
<el-form-item label="合同名称" prop="CONTRACTNAME">
<el-input v-model="searchForm.CONTRACTNAME" clearable />
<el-input
v-model="searchForm.CONTRACTNAME"
placeholder="请输入合同名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">

View File

@ -9,7 +9,11 @@
<el-row>
<el-col :span="6">
<el-form-item label="名称" prop="SYSTEMNAME">
<el-input v-model="searchForm.SYSTEMNAME" clearable />
<el-input
v-model="searchForm.SYSTEMNAME"
placeholder="请输入制度名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">

View File

@ -9,7 +9,11 @@
<el-row>
<el-col :span="6">
<el-form-item label="名称" prop="SYSTEMNAME">
<el-input v-model="searchForm.SYSTEMNAME" clearable />
<el-input
v-model="searchForm.SYSTEMNAME"
placeholder="请输入名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">

View File

@ -9,7 +9,11 @@
<el-row>
<el-col :span="6">
<el-form-item label="名称" prop="SYSTEMNAME">
<el-input v-model="searchForm.SYSTEMNAME" clearable />
<el-input
v-model="searchForm.SYSTEMNAME"
placeholder="请输入名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">