BUG 优化

dev
xiepeng 2024-04-28 17:58:01 +08:00
parent 51756106a2
commit 77c6a36092
6 changed files with 21 additions and 4 deletions

View File

@ -397,7 +397,11 @@ const getVehicle = async (event) => {
data.busInfo.CAR_OWNERS = ""; data.busInfo.CAR_OWNERS = "";
data.busInfo.CAR_OWNERS_TEL = ""; data.busInfo.CAR_OWNERS_TEL = "";
data.busInfo.INITIAL_REGISTRATION_DATE = ""; data.busInfo.INITIAL_REGISTRATION_DATE = "";
data.busInfo.COMPANY_AREA = "";
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]); data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
form.value.CAR_OWNERS = "";
form.value.TELEPHONE = "";
}; };
const fnBusChange = async (event) => { const fnBusChange = async (event) => {
if (!INSPECTANNUALLY_ID) { if (!INSPECTANNUALLY_ID) {

View File

@ -372,6 +372,7 @@ const rules = {
}; };
const getVehicle = async (event) => { const getVehicle = async (event) => {
form.value.PLATE_NUMBER = ""; form.value.PLATE_NUMBER = "";
data.busInfo.COMPANY_AREA = "";
const model = "insure"; const model = "insure";
const resData = await getTrailerList2({ TRAFFIC_TYPE: event, model }); const resData = await getTrailerList2({ TRAFFIC_TYPE: event, model });
data.vehicleList = resData.list; data.vehicleList = resData.list;
@ -383,7 +384,10 @@ const getVehicle = async (event) => {
data.busInfo.CAR_OWNERS = ""; data.busInfo.CAR_OWNERS = "";
data.busInfo.CAR_OWNERS_TEL = ""; data.busInfo.CAR_OWNERS_TEL = "";
data.busInfo.INITIAL_REGISTRATION_DATE = ""; data.busInfo.INITIAL_REGISTRATION_DATE = "";
data.busInfo.COMPANY_AREA = "";
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]); data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
form.value.CAR_OWNERS = "";
form.value.TELEPHONE = "";
}; };
const fnBusChange = async (event) => { const fnBusChange = async (event) => {
if (!INSURE_ID) { if (!INSURE_ID) {

View File

@ -359,6 +359,7 @@ const getVehicle = async (event) => {
data.busInfo.TRAILER_TYPE = ""; data.busInfo.TRAILER_TYPE = "";
data.busInfo.CAR_OWNERS = ""; data.busInfo.CAR_OWNERS = "";
data.busInfo.CAR_OWNERS_TEL = ""; data.busInfo.CAR_OWNERS_TEL = "";
data.busInfo.COMPANY_AREA = "";
data.busInfo.INITIAL_REGISTRATION_DATE = ""; data.busInfo.INITIAL_REGISTRATION_DATE = "";
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]); data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
}; };

View File

@ -361,8 +361,10 @@ const getVehicle = async (event) => {
data.busInfo.CAR_OWNERS = ""; data.busInfo.CAR_OWNERS = "";
data.busInfo.CAR_OWNERS_TEL = ""; data.busInfo.CAR_OWNERS_TEL = "";
data.busInfo.INITIAL_REGISTRATION_DATE = ""; data.busInfo.INITIAL_REGISTRATION_DATE = "";
data.busInfo.COMPANY_AREA = "";
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]); data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
data.busInfo.OPERATION_CERTIFICATE_IMG = addingPrefixToFile([]); data.busInfo.OPERATION_CERTIFICATE_IMG = addingPrefixToFile([]);
}; };
const fnBusChange = async (event) => { const fnBusChange = async (event) => {
if (!OPERATIONS_ID) { if (!OPERATIONS_ID) {

View File

@ -36,7 +36,7 @@
v-for="item in form.ALLVEHICLE" v-for="item in form.ALLVEHICLE"
:key="item.PLATE_NUMBER" :key="item.PLATE_NUMBER"
:label="item.PLATE_NUMBER" :label="item.PLATE_NUMBER"
:value="item.PLATE_NUMBER" :value="item.ID"
placeholder="请选择移除车辆" placeholder="请选择移除车辆"
/> />
</el-select> </el-select>
@ -293,11 +293,13 @@ const fnEditVehicleModel = async () => {
const info = ref({}); const info = ref({});
const fnGetVehicleInfo = async () => { const fnGetVehicleInfo = async () => {
if (form.value.SCRAP_VEHICLEMODEL === "运输车辆") { if (form.value.SCRAP_VEHICLEMODEL === "运输车辆") {
console.log(form.value.OPERATIONVEHICLELIST);
for (let i = 0; i < form.value.OPERATIONVEHICLELIST.length; i++) { for (let i = 0; i < form.value.OPERATIONVEHICLELIST.length; i++) {
if ( if (
form.value.OPERATIONVEHICLELIST[i].PLATE_NUMBER === form.value.OPERATIONVEHICLELIST[i].OPERATING_ID ===
form.value.SCRAP_VEHICLE form.value.SCRAP_VEHICLE
) { ) {
console.log(form.value.OPERATIONVEHICLELIST[i]);
const OPERATING_ID = form.value.OPERATIONVEHICLELIST[i].OPERATING_ID; const OPERATING_ID = form.value.OPERATIONVEHICLELIST[i].OPERATING_ID;
await setOperationsScrapStatus({ OPERATING_ID }); await setOperationsScrapStatus({ OPERATING_ID });
const resData = await getOperationVehicleInfo({ OPERATING_ID }); const resData = await getOperationVehicleInfo({ OPERATING_ID });
@ -332,7 +334,7 @@ const fnGetVehicleInfo = async () => {
} else if (form.value.SCRAP_VEHICLEMODEL === "货运挂车") { } else if (form.value.SCRAP_VEHICLEMODEL === "货运挂车") {
for (let i = 0; i < form.value.FREIGHTVEHICLELIST.length; i++) { for (let i = 0; i < form.value.FREIGHTVEHICLELIST.length; i++) {
if ( if (
form.value.FREIGHTVEHICLELIST[i].PLATE_NUMBER === form.value.FREIGHTVEHICLELIST[i].FREIGHTTRAILER_ID ===
form.value.SCRAP_VEHICLE form.value.SCRAP_VEHICLE
) { ) {
form.value.FREIGHTTRAILER_ID = form.value.FREIGHTTRAILER_ID =

View File

@ -183,6 +183,10 @@ const fnGetSummaries = ({ columns, data }) => {
sums[index] = "合计"; sums[index] = "合计";
return; return;
} }
if(index === columns.length - 1){
sums[index] = data.at(-1)?.[column.property];
return;
}
if (!data.every((value) => isNaN(value[column.property]))) { if (!data.every((value) => isNaN(value[column.property]))) {
sums[index] = sums[index] =
sumBy(data, (item) => { sumBy(data, (item) => {
@ -194,7 +198,7 @@ const fnGetSummaries = ({ columns, data }) => {
column.label === item.TYPE column.label === item.TYPE
) )
return item[column.property]; return item[column.property];
else if (index === columns.length - 1) return item[column.property]; // else if (index === columns.length - 1) return item[column.property];
}) || "--"; }) || "--";
} else sums[index] = "--"; } else sums[index] = "--";
}); });