|
@@ -182,6 +182,7 @@ const vehicleInfo = ref<VehicleInfo>({
|
|
|
steelReachTime: '',
|
|
|
positionNum: '',
|
|
|
})
|
|
|
+const arriveNo = ref('')
|
|
|
|
|
|
// 获取目的地信息
|
|
|
const getDestinationOptions = computed(() => {
|
|
@@ -228,13 +229,12 @@ const handleOpen = () => {
|
|
|
visible.value = true
|
|
|
}
|
|
|
|
|
|
-const getVehicleInfo = (licensePlate: string, positionNum: string | undefined) => {
|
|
|
+const getVehicleInfo = (licensePlate: string) => {
|
|
|
loading.value = true
|
|
|
axios
|
|
|
.get<VehicleResponse>('/jeecgbootbus/storageBill/queryByLicensePlate', {
|
|
|
params: {
|
|
|
licensePlate,
|
|
|
- positionNum,
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
@@ -354,13 +354,13 @@ const handleClick = (type: string) => {
|
|
|
okText: '确认',
|
|
|
cancelText: '取消',
|
|
|
onOk: () => {
|
|
|
- editInfo(vehicleInfo.value, type)
|
|
|
+ editInfo({ ...vehicleInfo.value, arriveNum: Number(arriveNo.value) }, type)
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const editInfo = (params: { licensePlate?: string }, type: string) => {
|
|
|
+const editInfo = (params: { licensePlate?: string; arriveNum?: string | number }, type: string) => {
|
|
|
loading.value = true
|
|
|
axios
|
|
|
.post(
|
|
@@ -399,14 +399,15 @@ const editInfo = (params: { licensePlate?: string }, type: string) => {
|
|
|
})
|
|
|
.finally(() => {
|
|
|
loading.value = false
|
|
|
- getVehicleInfo(vehicleInfo.value.licensePlate, vehicleInfo.value.positionNum)
|
|
|
+ getVehicleInfo(vehicleInfo.value.licensePlate)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
const onMessage = (msg: Record<string, string>) => {
|
|
|
const { car, position } = msg
|
|
|
if (!car) return
|
|
|
- getVehicleInfo(car, position)
|
|
|
+ arriveNo.value = position
|
|
|
+ getVehicleInfo(car)
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|