|
@@ -149,10 +149,48 @@
|
|
|
<a-divider type="vertical" style="background-color: #1e91bb" />
|
|
|
<div class="vehicle-info-desc">{{ vehicleInfo.size }}</div>
|
|
|
</a-col>
|
|
|
- <a-col :span="5" class="vehicle-info-content-item flex items-center">
|
|
|
+ <a-col :span="8" class="vehicle-info-content-item flex items-center">
|
|
|
<div class="vehicle-info-title">支数</div>
|
|
|
<a-divider type="vertical" style="background-color: #1e91bb" />
|
|
|
- <div class="vehicle-info-desc">{{ vehicleInfo.amountTotal }}</div>
|
|
|
+ <a-select
|
|
|
+ ref="selectCcmNoRef"
|
|
|
+ class="select-zj"
|
|
|
+ v-if="amountError && !vehicleInfo.confirmNumTime"
|
|
|
+ size="large"
|
|
|
+ placeholder="请选择数量"
|
|
|
+ allowClear
|
|
|
+ v-model:value="selectErrorNum"
|
|
|
+ >
|
|
|
+ <a-select-option :value="4 * i" v-for="i in 7" :key="i">
|
|
|
+ <span role="img" aria-label="5zj" class="vehicle-select-option zj5">{{
|
|
|
+ 4 * i
|
|
|
+ }}</span>
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <div class="vehicle-info-desc" v-else>
|
|
|
+ {{ vehicleInfo.amountTotal }}
|
|
|
+ </div>
|
|
|
+ <a-button
|
|
|
+ class="confirm-btn1"
|
|
|
+ size="large"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ @click="handleClick('confirmAmount')"
|
|
|
+ v-if="!vehicleInfo.confirmNumTime"
|
|
|
+ >
|
|
|
+ {{ amountError ? '修改' : '正确' }}
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ class="error-btn"
|
|
|
+ size="large"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ danger
|
|
|
+ @click="() => (amountError = true)"
|
|
|
+ v-if="!vehicleInfo.confirmNumTime"
|
|
|
+ >
|
|
|
+ 错误
|
|
|
+ </a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
@@ -213,11 +251,14 @@ const vehicleInfo = ref<VehicleInfo>({
|
|
|
licensePlateStatus: 0,
|
|
|
hasDestination: false,
|
|
|
positionNum: '',
|
|
|
+ confirmNumTime: '',
|
|
|
})
|
|
|
|
|
|
const selectCcmNo = ref<string>('')
|
|
|
const selectCcmNoRef = ref()
|
|
|
const selectCcmNoOpen = ref(false)
|
|
|
+const amountError = ref(false)
|
|
|
+const selectErrorNum = ref(undefined)
|
|
|
|
|
|
// 获取目的地信息
|
|
|
const getDestinationOptions = computed(() => {
|
|
@@ -429,6 +470,46 @@ const handleClick = (type: string) => {
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ if (type === 'confirmAmount') {
|
|
|
+ if (amountError.value && !selectErrorNum.value) {
|
|
|
+ message.error('请选择需要修改的支数')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ Modal.confirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ centered: true,
|
|
|
+ title: h('div', [
|
|
|
+ h('span', amountError.value ? '修改支数 ' : '是否确认支数正确?'),
|
|
|
+ h(
|
|
|
+ 'span',
|
|
|
+ {
|
|
|
+ style: {
|
|
|
+ color: '#f5222d',
|
|
|
+ fontSize: '36px',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ amountError.value ? `【 ${selectErrorNum?.value} 】` : '',
|
|
|
+ ),
|
|
|
+ ]),
|
|
|
+ content: () =>
|
|
|
+ amountError.value ? `注:修改支数后,不能再次修改!` : '注:确认正确后不能再次修改!',
|
|
|
+ class: 'confirm-destination-modal',
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk: () => {
|
|
|
+ editConfirmNumTime(
|
|
|
+ {
|
|
|
+ id: vehicleInfo.value.id,
|
|
|
+ amountTotal: selectErrorNum.value,
|
|
|
+ updateType: amountError.value ? 1 : 0,
|
|
|
+ },
|
|
|
+ type,
|
|
|
+ )
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 更改铸机号
|
|
@@ -505,6 +586,47 @@ const editInfo = (params: { licensePlate?: string; ccmNo?: string }, type: strin
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+// 设置数量
|
|
|
+const editConfirmNumTime = (
|
|
|
+ params: { id?: string; amountTotal?: string; updateType?: number },
|
|
|
+ type: string,
|
|
|
+) => {
|
|
|
+ stop()
|
|
|
+ loading.value = true
|
|
|
+ axios
|
|
|
+ .post('/jeecgbootbus/storageBill/updateConfirmNumTime', {
|
|
|
+ id: vehicleInfo.value.id,
|
|
|
+ ...params,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ const { status, data } = res
|
|
|
+ if (status === 200) {
|
|
|
+ const { code, result } = data
|
|
|
+
|
|
|
+ if (code !== 200) {
|
|
|
+ message.warning(data.message)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!result) return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (type === 'error') {
|
|
|
+ message.success('确认错误成功,请到钢坯装运单修改车辆信息!')
|
|
|
+ } else {
|
|
|
+ message.success('确认成功!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ message.error(e.message ? e.message : '确认失败!')
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ start()
|
|
|
+ getVehicleInfo()
|
|
|
+ loading.value = false
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getVehicleInfo()
|
|
|
getCars()
|