fix bug
This commit is contained in:
@@ -8651,15 +8651,18 @@ export default {
|
||||
handleTaskDriverSelect(target, item = {}) {
|
||||
const value = item.driverName || item.name || '';
|
||||
const driverPhone = item.mobile || item.phone || item.driverPhone || '';
|
||||
const drivingVehicle = String(item.drivingVehicle || '').trim();
|
||||
if (target === 'dispatch') {
|
||||
this.dispatchItemForm.driverId = item.id || '';
|
||||
this.dispatchItemForm.driverName = value;
|
||||
if (driverPhone) this.dispatchItemForm.driverPhone = driverPhone;
|
||||
if (drivingVehicle) this.dispatchItemForm.vehicleNo = drivingVehicle;
|
||||
return;
|
||||
}
|
||||
this.form.driverId = item.id || '';
|
||||
this.form.driverName = value;
|
||||
if (driverPhone) this.form.driverPhone = driverPhone;
|
||||
if (drivingVehicle) this.form.vehicleNo = drivingVehicle;
|
||||
},
|
||||
handleTaskDriverChange(value) {
|
||||
const driver = this.taskDriverOptions.find(item =>
|
||||
@@ -8670,6 +8673,9 @@ export default {
|
||||
if (driver) {
|
||||
this.form.driverPhone =
|
||||
driver.mobile || driver.phone || driver.driverPhone || this.form.driverPhone || '';
|
||||
if (String(driver.drivingVehicle || '').trim()) {
|
||||
this.form.vehicleNo = String(driver.drivingVehicle).trim();
|
||||
}
|
||||
}
|
||||
},
|
||||
getTaskCargoTypeOptionsKey(path = []) {
|
||||
@@ -12348,6 +12354,9 @@ export default {
|
||||
driver.driverPhone ||
|
||||
this.dispatchItemForm.driverPhone ||
|
||||
'';
|
||||
if (String(driver.drivingVehicle || '').trim()) {
|
||||
this.dispatchItemForm.vehicleNo = String(driver.drivingVehicle).trim();
|
||||
}
|
||||
}
|
||||
},
|
||||
getDispatchCargoRowOptions(row = {}) {
|
||||
|
||||
Reference in New Issue
Block a user