From 0d4d745829710591fadcaac343716b603641c017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Mon, 28 Oct 2024 13:55:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=93=81=E5=8F=91=E8=B4=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1--=E5=90=8C=E4=B8=80=E7=89=A9=E6=96=99=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=89=AB=E6=8F=8F=E6=8F=90=E4=BA=A4=E4=B8=8D?= =?UTF-8?q?=E5=9C=A8=E4=BB=BB=E5=8A=A1=E4=B8=AD=E7=9A=84=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=202024/8/7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/coms/comScanDeliverPack.vue | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/pages/deliver/coms/comScanDeliverPack.vue b/src/pages/deliver/coms/comScanDeliverPack.vue index 8ca0891e..53a90ecb 100644 --- a/src/pages/deliver/coms/comScanDeliverPack.vue +++ b/src/pages/deliver/coms/comScanDeliverPack.vue @@ -171,10 +171,10 @@ const getFromLocationList = () => { } const fromLocationUpdate = (fromlocation) => { const location = fromLocationList.value.find((r) => r == fromlocation) - if (location == undefined) { - fromLocationCode.value = '' - showErrorMessage(`发货库位【${fromlocation}】不存在`) - } + // if (location == undefined) { + // showErrorMessage(`发货库位【${fromlocation}】不存在`) + // } + fromLocationCode.value = fromlocation } const onScan = (result) => { try { @@ -230,7 +230,29 @@ const afterGetBalance = (label, balance, packageInfo) => { const packingCode = label.packingNumber const lot = label.batch const item = toLocation.value.Items.find((r) => r.itemCode == itemCode) - const fromLocation = item.Locations.find((l) => l.fromLocationCode == fromLocationCode.value) + let fromLocation = item.Locations.find((l) => l.fromLocationCode == fromLocationCode.value) + if(!fromLocation){ + fromLocation = { + Batchs:[{ + Recommends:[], + Records: [], + batch: label.batch, + detail:{ + ...packageInfo, + fromLocationCode: balance.locationCode, + }, + handleQty: 0, + packingNumber: label.packingNumber, + qty: label.qty, + uom: label.uom + }], + fromLocationCode: balance.locationCode, + handleQty: 0, + qty: label.qty, + uom: label.uom + } + item.Locations.push(fromLocation) + } if (fromLocation != undefined) { const batch = fromLocation.Batchs.find((r) => r.batch == lot) if (batch != undefined) {