修复:完善业务页面异步与扫码状态

This commit is contained in:
焦龙言
2026-07-27 09:39:53 +08:00
parent e4477f321c
commit a223971a3c
4 changed files with 182 additions and 19 deletions
@@ -339,8 +339,7 @@ function handleFillingScan(qrToken) {
if (operationPending.value || scanLoading.value) return
clearFillingIdempotencyKey()
scannedPallet.value = null
form.value.qrToken = ''
form.value.warehouseId = undefined
form.value = { qrToken: '', warehouseId: undefined, strainId: undefined, batchNo: '', packageSpec: '', initialPackages: undefined }
const scanContext = { generation: ++scanGeneration, dialogSession, qrToken }
scanLoading.value = true
scanError.value = ''
@@ -372,8 +371,7 @@ function handleFillingScan(qrToken) {
function handleScanInvalid(message) {
clearFillingIdempotencyKey()
scannedPallet.value = null
form.value.qrToken = ''
form.value.warehouseId = undefined
form.value = { qrToken: '', warehouseId: undefined, strainId: undefined, batchNo: '', packageSpec: '', initialPackages: undefined }
scanError.value = message
}
@@ -33,7 +33,7 @@
type="primary"
plain
icon="Plus"
:disabled="operationPending || detailLoading"
:disabled="operationPending || optionLoading || detailLoading || open"
@click="handleAdd"
v-hasPermi="['business:inbound:add']"
>新增入库草稿</el-button>
@@ -371,7 +371,7 @@ function resetQuery() {
}
function handleAdd() {
if (!canAddInbound.value || operationPending.value) return
if (!canAddInbound.value || operationPending.value || optionLoading.value || detailLoading.value || open.value) return
resetInboundForm()
title.value = '新增首次入库草稿'
open.value = true
@@ -30,7 +30,7 @@
type="primary"
plain
icon="Plus"
:disabled="operationPending || detailLoading"
:disabled="operationPending || optionLoading || detailLoading || open"
@click="handleAdd"
v-hasPermi="['business:shipment:add']"
>新增发货草稿</el-button>
@@ -388,7 +388,7 @@ function resetQuery() {
}
function handleAdd() {
if (!canAddShipment.value || operationPending.value) return
if (!canAddShipment.value || operationPending.value || optionLoading.value || detailLoading.value || open.value) return
resetShipmentForm()
title.value = '新增整托发货草稿'
open.value = true