diff --git a/src/api/fulfillment.js b/src/api/fulfillment.js index 6a4bde6..347d4eb 100644 --- a/src/api/fulfillment.js +++ b/src/api/fulfillment.js @@ -186,6 +186,7 @@ export function normalizeCargoDiscardTask(value) { plannedPackages: count(sku?.plannedPackages), actualPackages: sku?.actualPackages == null ? null : count(sku.actualPackages), actualQuantityEditable: sku?.actualQuantityEditable === true, + allowedCartonMarks: asList(sku?.allowedCartonMarks).map(String), status: String(sku?.status || 'PENDING') })) } diff --git a/src/pages/outbound/outbound.vue b/src/pages/outbound/outbound.vue index c26a904..4e5fd80 100644 --- a/src/pages/outbound/outbound.vue +++ b/src/pages/outbound/outbound.vue @@ -173,6 +173,7 @@ if ((this.discardCurrentTasks || []).some(task => task.palletNo === code)) { this.setError(new Error('请扫描箱唛,不能把托盘码作为箱唛'), '箱唛核对失败'); return } const sku = this.discardQuantityLines.length === 1 ? this.discardQuantityLines[0] : this.discardQuantityLines.find(line => line.itemId === this.discardScanItemId) if (!sku) { this.setError(new Error('请先选择当前扫描的货物'), '箱唛核对失败'); return } + if (!(sku.allowedCartonMarks || []).includes(code)) { this.setError(new Error('箱唛不属于本废弃单的原入仓库存'), '箱唛核对失败'); return } if (this.discardUnboundScans.some(scan => scan.mark === code)) { this.discardCartonCode = ''; return } if (code.length > 128 || this.discardUnboundScans.filter(scan => scan.itemId === sku.itemId).length >= sku.plannedPackages || this.discardUnboundScans.length >= (this.discardTask.remainingPackages ?? Infinity)) { this.setError(new Error('扫描箱数不能超过本托预留或申请剩余箱数'), '箱唛核对失败'); return } this.discardUnboundScans = [...this.discardUnboundScans, { itemId: sku.itemId, mark: code }] diff --git a/src/pages/return-receipt/return-receipt.vue b/src/pages/return-receipt/return-receipt.vue index a3a6040..5b3c272 100644 --- a/src/pages/return-receipt/return-receipt.vue +++ b/src/pages/return-receipt/return-receipt.vue @@ -28,10 +28,10 @@ 本次实物单元 - 本批共用一个快递单号;填写包裹数,再逐包裹录入 SKU 数量,各包裹单独生成仓库标签。 + @@ -45,7 +45,7 @@