|
@@ -263,10 +263,11 @@ const selectErrorNum = ref(undefined)
|
|
|
|
|
|
// 获取目的地信息
|
|
|
const getDestinationOptions = computed(() => {
|
|
|
- if (!ccmNo || !destinationOptions[String(ccmNo)]) {
|
|
|
+ if (!ccmNo || !destinationOptions[String(ccmNo)] || !vehicleInfo.value.ccmNo) {
|
|
|
return []
|
|
|
}
|
|
|
- return destinationOptions[String(ccmNo)].map((oitem: MConfigProps) => oitem)
|
|
|
+ const ccmNostr = vehicleInfo.value.ccmNo || ccmNo
|
|
|
+ return destinationOptions[String(ccmNostr)].map((oitem: MConfigProps) => oitem)
|
|
|
})
|
|
|
|
|
|
const carsOptions = ref<{ label: string; value: string }[]>([])
|
|
@@ -440,7 +441,7 @@ const handleClick = (type: string) => {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- const curDestination = destinationOptions[Number(ccmNo)].find((item) => {
|
|
|
+ const curDestination = (getDestinationOptions.value || []).find((item) => {
|
|
|
return item.value === vehicleInfo.value.typeConfigId
|
|
|
})
|
|
|
|
|
@@ -536,8 +537,9 @@ const ccmNoChange = (e: string) => {
|
|
|
class: 'confirm-destination-modal',
|
|
|
okText: '确认',
|
|
|
cancelText: '取消',
|
|
|
- onOk: () => {
|
|
|
- editInfo({ ccmNo: e, licensePlate: '' }, 'confirmCar')
|
|
|
+ onOk: async () => {
|
|
|
+ await editInfo({ ccmNo: e, licensePlate: '' }, 'confirmCar')
|
|
|
+ getVehicleInfo()
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
selectCcmNo.value = ''
|