This commit is contained in:
bb_pan 2025-09-01 17:57:43 +08:00
parent 8bae76a0d6
commit 2435684baf
1 changed files with 59 additions and 38 deletions

View File

@ -109,6 +109,7 @@ const boxInfo = ref([])
const qrCode = ref('') const qrCode = ref('')
const maInfo = ref({}) const maInfo = ref({})
const scanQrCodeRef = ref(null) const scanQrCodeRef = ref(null)
const isSubmit = ref(false)
// const typeId = ref('') // const typeId = ref('')
// const taskId = ref('') // const taskId = ref('')
// const maTypeName = ref('') // const maTypeName = ref('')
@ -448,25 +449,35 @@ const onHandleInbound = async () => {
}) })
} }
}) })
let param = { try {
taskId: queryParams.value.taskId, if (isSubmit.value) return
typeId: queryParams.value.typeId, isSubmit.value = true
agreementId: queryParams.value.agreementId, uni.showLoading({ title: '操作中...', mask: true })
maCodeList: paramsList, let param = {
} taskId: queryParams.value.taskId,
console.log(param) typeId: queryParams.value.typeId,
const res = await repairInputWarehouseApi(param) agreementId: queryParams.value.agreementId,
if (res.code === 200) { maCodeList: paramsList,
uni.showToast({ }
title: '入库成功!', console.log(param)
icon: 'none', const res = await repairInputWarehouseApi(param)
}) if (res.code === 200) {
setTimeout(() => { uni.showToast({
queryParams.value.pendingInputNum = title: '入库成功!',
Number(queryParams.value.pendingInputNum) - paramsList.length icon: 'none',
getCodeDeviceListData() })
uni.$emit('onUpdate') setTimeout(() => {
}, 800) queryParams.value.pendingInputNum =
Number(queryParams.value.pendingInputNum) - paramsList.length
getCodeDeviceListData()
uni.$emit('onUpdate')
}, 800)
}
} catch (error) {
console.log('🚀 ~ onHandleInbound ~ error:', error)
} finally {
isSubmit.value = false
uni.hideLoading()
} }
} }
@ -499,25 +510,35 @@ const onRejectOutbound = async () => {
}) })
} }
}) })
let param = { try {
taskId: queryParams.value.taskId, if (isSubmit.value) return
typeId: queryParams.value.typeId, isSubmit.value = true
agreementId: queryParams.value.agreementId, uni.showLoading({ title: '操作中...', mask: true })
maCodeList: paramsList, let param = {
} taskId: queryParams.value.taskId,
console.log(param) typeId: queryParams.value.typeId,
const res = await rejectWarehouseApi(param) agreementId: queryParams.value.agreementId,
if (res.code === 200) { maCodeList: paramsList,
uni.showToast({ }
title: '驳回成功!', console.log(param)
icon: 'none', const res = await rejectWarehouseApi(param)
}) if (res.code === 200) {
setTimeout(() => { uni.showToast({
queryParams.value.pendingInputNum = title: '驳回成功!',
Number(queryParams.value.pendingInputNum) - paramsList.length icon: 'none',
getCodeDeviceListData() })
uni.$emit('onUpdate') setTimeout(() => {
}, 800) queryParams.value.pendingInputNum =
Number(queryParams.value.pendingInputNum) - paramsList.length
getCodeDeviceListData()
uni.$emit('onUpdate')
}, 800)
}
} catch (error) {
console.log('🚀 ~ onRejectOutbound ~ error:', error)
} finally {
isSubmit.value = false
uni.hideLoading()
} }
} }
</script> </script>