diff --git a/src/views/mechanical_files/beidou/add.vue b/src/views/mechanical_files/beidou/add.vue index 54adde1..adde04b 100644 --- a/src/views/mechanical_files/beidou/add.vue +++ b/src/views/mechanical_files/beidou/add.vue @@ -345,7 +345,12 @@ getVehicle("1"); const fnBusChange = async (event) => { const resData = await getTrailerListCompass({ ID: event }); data.busInfo = resData.list[0]; - form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS; + if(form.value.TELEPHONE === '') { + form.value.TELEPHONE = data.busInfo.CAR_OWNERS_TEL; + } + if(form.value.CAR_OWNERS === '') { + form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS; + } data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile( resData.drivingLicenseImgs ); diff --git a/src/views/mechanical_files/inspect_annually/add.vue b/src/views/mechanical_files/inspect_annually/add.vue index 8a5b33a..6f3aeb7 100644 --- a/src/views/mechanical_files/inspect_annually/add.vue +++ b/src/views/mechanical_files/inspect_annually/add.vue @@ -395,7 +395,12 @@ const getVehicle = async (event) => { const fnBusChange = async (event) => { const resData = await getTrailerList({ ID: event }); data.busInfo = resData.list[0]; - form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + if(form.value.CAR_OWNERS === '') { + form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + } + if(form.value.TELEPHONE === '') { + form.value.TELEPHONE = data.busInfo.CAR_OWNERS_TEL + } data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile( resData.drivingLicenseImgs ); diff --git a/src/views/mechanical_files/insure/add.vue b/src/views/mechanical_files/insure/add.vue index 777d79a..92dd5fd 100644 --- a/src/views/mechanical_files/insure/add.vue +++ b/src/views/mechanical_files/insure/add.vue @@ -383,7 +383,12 @@ const getVehicle = async (event) => { const fnBusChange = async (event) => { const resData = await getTrailerList2({ ID: event }); data.busInfo = resData.list[0]; - form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + if(form.value.CAR_OWNERS === '') { + form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + } + if(form.value.TELEPHONE === '') { + form.value.TELEPHONE = data.busInfo.CAR_OWNERS_TEL + } data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile( resData.drivingLicenseImgs ); @@ -443,8 +448,6 @@ const fnGetData = async () => { if (!INSURE_ID) return; const resData = await getInsureView({ INSURE_ID }); form.value = resData.pd; - - console.log(form.value); const listData = await getTrailerList({ TRAFFIC_TYPE: form.value.VEHICLE_MODEL, }); diff --git a/src/views/mechanical_files/maintenance/add.vue b/src/views/mechanical_files/maintenance/add.vue index 6ac3109..b0352d9 100644 --- a/src/views/mechanical_files/maintenance/add.vue +++ b/src/views/mechanical_files/maintenance/add.vue @@ -392,7 +392,12 @@ getVehicle("1"); const fnBusChange = async (event) => { const resData = await getTrailerListMaintenance({ ID: event }); data.busInfo = resData.list[0]; - form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + if(form.value.CAR_OWNERS === '') { + form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + } + if(form.value.TELEPHONE === '') { + form.value.TELEPHONE = data.busInfo.CAR_OWNERS_TEL + } data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile( resData.drivingLicenseImgs ); diff --git a/src/views/mechanical_files/operations/add.vue b/src/views/mechanical_files/operations/add.vue index 65b1dae..103db64 100644 --- a/src/views/mechanical_files/operations/add.vue +++ b/src/views/mechanical_files/operations/add.vue @@ -357,7 +357,12 @@ const getVehicle = async (event) => { const fnBusChange = async (event) => { const resData = await getOperationTrailerList({ ID: event }); data.busInfo = resData.list[0]; - form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + if(form.value.TELEPHONE === '') { + form.value.TELEPHONE = data.busInfo.CAR_OWNERS_TEL + } + if(form.value.CAR_OWNERS === '') { + form.value.CAR_OWNERS = data.busInfo.CAR_OWNERS + } data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile( resData.drivingLicenseImgs ); diff --git a/src/views/mechanical_files/taxation_manage/add.vue b/src/views/mechanical_files/taxation_manage/add.vue index aa7af1a..f0797be 100644 --- a/src/views/mechanical_files/taxation_manage/add.vue +++ b/src/views/mechanical_files/taxation_manage/add.vue @@ -385,6 +385,7 @@ const fnGetTrailerInfo = async () => { form.value.VEHICLE_MODEL = resData.pd.TRAILER_MODEL; form.value.VEHICLE_BRAND = resData.pd.TRAILER_BRAND; form.value.VEHICLEOWNER = resData.pd.CAR_OWNERS + form.value.CONTACT_NUMBER = resData.pd.CAR_OWNERS_TEL form.value.DRIVINGLICENSE_PHOTO = addingPrefixToFile( resData.drivingLicenseImgs );