BUG优化

dev
xiepeng 2024-05-09 18:08:56 +08:00
parent 0ed592689f
commit b23d40a502
5 changed files with 53 additions and 19 deletions

View File

@ -139,6 +139,13 @@ export const REMIND_DAYS = [
{ ID: "2", NAME: "90天", NUM: "90" }, { ID: "2", NAME: "90天", NUM: "90" },
]; ];
export const INSURANCE_TYPE = [
// 提醒天数
{ ID: "0", NAME: "承运人责任险" },
{ ID: "1", NAME: "强制险" },
{ ID: "2", NAME: "商业险" },
];
// export const MAINTENANCE_LEVEL_LIST = [ // export const MAINTENANCE_LEVEL_LIST = [
// //维保等级 // //维保等级
// {ID:'1',NAME:'一级维保'}, // {ID:'1',NAME:'一级维保'},

View File

@ -52,7 +52,7 @@
<el-table-column prop="WAYBILLNUMBER" label="运单编号" /> <el-table-column prop="WAYBILLNUMBER" label="运单编号" />
<el-table-column prop="WAYBILLSTATUS" label="运单状态" width="80"> <el-table-column prop="WAYBILLSTATUS" label="运单状态" width="80">
<template #default="{ row }"> <template #default="{ row }">
<el-tag v-if="row.WAYBILLSTATUS === '0'"></el-tag> <el-tag v-if="row.WAYBILLSTATUS === '0' || row.WAYBILLSTATUS === '3'"></el-tag>
<el-tag v-else-if="row.WAYBILLSTATUS === '1'">已出发</el-tag> <el-tag v-else-if="row.WAYBILLSTATUS === '1'">已出发</el-tag>
<el-tag v-else-if="row.WAYBILLSTATUS === '2'">收车后</el-tag> <el-tag v-else-if="row.WAYBILLSTATUS === '2'">收车后</el-tag>
</template> </template>

View File

@ -143,11 +143,14 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="保险项目" prop="INSURANCE_COVERAGE"> <el-form-item label="保险项目" prop="INSURANCE_COVERAGE">
<el-input <el-select v-model="form.INSURANCE_COVERAGE">
v-model="form.INSURANCE_COVERAGE" <el-option
maxlength="50" v-for="item in INSURANCE_TYPE"
show-word-limit :key="item.ID"
:label="item.NAME"
:value="item.ID"
/> />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -295,11 +298,13 @@ import {
setInsureEdit, setInsureEdit,
getTrailerList, getTrailerList,
getTrailerList2, getTrailerList2,
getInsureList
} from "@/request/mechanical_files.js"; } from "@/request/mechanical_files.js";
import { import {
INSURANCE_TYPE,
INSURANCEMENU, INSURANCEMENU,
OPERATING_VEHICLE_TYPE_LIST, OPERATING_VEHICLE_TYPE_LIST,
REMIND_DAYS, REMIND_DAYS
} from "@/assets/js/constant.js"; } from "@/assets/js/constant.js";
import { setUploadImg } from "@/request/api.js"; import { setUploadImg } from "@/request/api.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
@ -347,7 +352,24 @@ const data = reactive({
INITIAL_REGISTRATION_DATE: "", INITIAL_REGISTRATION_DATE: "",
COMPANY_AREA: "", COMPANY_AREA: "",
}, },
info: {}
}); });
const insureType = async (rule, insureType, callback) => {
if (insureType) {
data.info = await getInsureList();
data.info.varList.forEach((item) => {
if(item.VEHICLE === data.busInfo.ID) {
if(insureType === item.INSURANCE_COVERAGE) {
callback(new Error("该保险已被此车辆重复选择"));
}
}
});
} else {
callback();
}
};
const rules = { const rules = {
VEHICLE_MODEL: [{ required: true, message: "请输入", trigger: "blur" }], VEHICLE_MODEL: [{ required: true, message: "请输入", trigger: "blur" }],
@ -362,7 +384,12 @@ const rules = {
}, },
], ],
INSURANCE_COMPANY: [{ required: true, message: "请输入", trigger: "blur" }], INSURANCE_COMPANY: [{ required: true, message: "请输入", trigger: "blur" }],
INSURANCE_COVERAGE: [{ required: true, message: "请输入", trigger: "blur" }],
INSURANCE_COVERAGE: [
{ required: true, message: "请输入", trigger: "change" },
{ validator: insureType, trigger: "change" },
],
REGISTRANT: [{ required: true, message: "请输入", trigger: "blur" }], REGISTRANT: [{ required: true, message: "请输入", trigger: "blur" }],
PROCESSING_DATE: [{ required: true, message: "请输入", trigger: "blur" }], PROCESSING_DATE: [{ required: true, message: "请输入", trigger: "blur" }],
EFFECTIVE_DATE: [{ required: true, message: "请输入", trigger: "blur" }], EFFECTIVE_DATE: [{ required: true, message: "请输入", trigger: "blur" }],

View File

@ -139,16 +139,14 @@
<el-table-column prop="PLATE_NUMBER" label="车牌号" /> <el-table-column prop="PLATE_NUMBER" label="车牌号" />
<el-table-column prop="CAR_OWNERS" label="车主业户" /> <el-table-column prop="CAR_OWNERS" label="车主业户" />
<el-table-column prop="TELEPHONE" label="联系电话" width="100" /> <el-table-column prop="TELEPHONE" label="联系电话" width="100" />
<el-table-column <el-table-column prop="PROCESSING_DATE_YEAR" label="保险年份" width="80" />
prop="PROCESSING_DATE_YEAR" <el-table-column prop="INSURANCE_COVERAGE" label="保险项目" width="160" >
label="保险年份" <template #default="{ row }">
width="80" {{ row.INSURANCE_COVERAGE === "0" ? "承运人责任险" : "" }}
/> {{ row.INSURANCE_COVERAGE === "1" ? "强制险" : "" }}
<el-table-column {{ row.INSURANCE_COVERAGE === "2" ? "商业险" : "" }}
prop="INSURANCE_COVERAGE" </template>
label="保险项目" </el-table-column>
width="160"
/>
<el-table-column prop="PROCESSING_DATE" label="办理日期" width="90" /> <el-table-column prop="PROCESSING_DATE" label="办理日期" width="90" />
<el-table-column prop="EFFECTIVE_DATE" label="生效日期" width="90" /> <el-table-column prop="EFFECTIVE_DATE" label="生效日期" width="90" />
<el-table-column prop="DUE_DATE" label="到期日期" width="90" /> <el-table-column prop="DUE_DATE" label="到期日期" width="90" />

View File

@ -55,7 +55,9 @@
<span v-else-if="info.INSURANCE_COMPANY === '2'">中国人寿</span> <span v-else-if="info.INSURANCE_COMPANY === '2'">中国人寿</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="保险项目"> <el-descriptions-item label-class-name="width_200" label="保险项目">
{{ info.INSURANCE_COVERAGE }} <span v-if="info.INSURANCE_COVERAGE === '0'"></span>
<span v-else-if="info.INSURANCE_COVERAGE === '1'">强制险</span>
<span v-else-if="info.INSURANCE_COVERAGE === '2'">商业险</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="办理日期"> <el-descriptions-item label-class-name="width_200" label="办理日期">
{{ info.PROCESSING_DATE }} {{ info.PROCESSING_DATE }}