From 5b3d8b00d58a5f1e8a9fe3ff2ce03699bf50be50 Mon Sep 17 00:00:00 2001 From: liuyihe <2513762445@qq.com> Date: Thu, 24 Sep 2026 14:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/warehouse-transfer/warehouse-transfer.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pages/warehouse-transfer/warehouse-transfer.vue b/src/pages/warehouse-transfer/warehouse-transfer.vue index 4569f4c..9ff400a 100644 --- a/src/pages/warehouse-transfer/warehouse-transfer.vue +++ b/src/pages/warehouse-transfer/warehouse-transfer.vue @@ -107,8 +107,8 @@ export default { completedDestinationLabel() { return this.destinationLabel({ fbaWarehouseCode: this.completedDestination, destinationType: this.completedDestinationType }) }, totalCartons() { return this.pallets.reduce((sum, pallet) => sum + Math.max(0, Number(pallet.cartonCount) || 0), 0) }, cartonDifference() { return this.totalCartons - Number(this.selected?.packageCount || 0) }, - isInventoryTransfer() { return Boolean(this.selected && ['WAIT_PDA_RECEIVING', 'APPROVED', 'ALLOCATED', 'PARTIALLY_RECEIVED'].includes(String(this.selected.status)) && this.selected.inboundCode && this.selected.inboundCode !== this.selected.transferNo) }, - isMeasurementComplete() { return Boolean(this.selected && !['WAIT_PDA_RECEIVING', 'APPROVED', 'ALLOCATED', 'PARTIALLY_RECEIVED'].includes(String(this.selected.status))) }, + isInventoryTransfer() { return Boolean(this.selected && this.selected.status === 'WAIT_PDA_RECEIVING' && this.selected.inboundCode && this.selected.inboundCode !== this.selected.transferNo) }, + isMeasurementComplete() { return Boolean(this.selected && !['WAIT_PDA_RECEIVING', 'PARTIALLY_RECEIVED'].includes(String(this.selected.status))) }, totalVolume() { return this.pallets.reduce((sum, pallet) => sum + this.rawPalletVolume(pallet), 0).toFixed(3) }, totalWeight() { return this.pallets.reduce((sum, pallet) => sum + Math.max(0, Number(pallet.grossWeightKg) || 0), 0).toFixed(2) }, validationMessage() { @@ -169,14 +169,17 @@ export default { this.loading = true; this.error = null try { const activeNo = String(warehouseWork.warehouseTransfer.currentNo || '') - const measuredStatuses = new Set(['WAIT_PDA_RECEIVING', 'APPROVED', 'ALLOCATED', 'PARTIALLY_RECEIVED']) + const measuredStatuses = new Set(['WAIT_PDA_RECEIVING', 'PARTIALLY_RECEIVED']) this.candidates = (await listWarehouseTransferCandidates()).map((item) => String(item.transferNo) === activeNo && item.status === 'WAIT_PDA_RECEIVING' ? { ...item, status: 'PARTIALLY_RECEIVED' } : item) - this.candidates = this.candidates.filter((item) => ['WAIT_PDA_RECEIVING', 'APPROVED', 'ALLOCATED', 'PARTIALLY_RECEIVED'].includes(String(item.status))) + this.candidates = this.candidates.filter((item) => measuredStatuses.has(String(item.status))) // 服务端已完成当前单但设备在提交响应前断网时,本地 currentNo 会遗留。 // 候选已成功读取且当前单不再可测,清掉本地锁,允许继续下一票。 if (activeNo && !this.candidates.some((item) => String(item.transferNo) === activeNo && measuredStatuses.has(String(item.status)))) { resetWarehouseDomain('warehouseTransfer') } + if (this.selected && !this.candidates.some((item) => String(item.transferNo) === String(this.selected.transferNo))) { + this.selected = null; this.pallets = [newPallet()]; this.photoFileIds = []; this.photoUrls = {}; this.photoNames = [] + } } catch (e) { this.error = e } finally { this.loading = false } }, async select(item, fromExplicitTask = false) {