This commit is contained in:
wangshiming
2022-02-16 13:54:15 +08:00
parent 2b97ad5bb5
commit 5b49aeae04
12 changed files with 326 additions and 128 deletions

View File

@ -382,6 +382,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
maxMultipleCount:3,
errors: { required: '请选择车型' }
}
},
@ -394,6 +395,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
maxMultipleCount:3,
errors: { required: '请选择车长' }
}
}
@ -755,4 +757,25 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
}
});
}
// 装卸货地址互换
swapAddress(){
let item = this.startInfo;
this.startInfo = this.endInfo;
this.endInfo = item;
this.startInfo.forEach((element: any) => {
element.type = '1';
});
this.endInfo.forEach((element: any) => {
element.type = '2';
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
}