From d62e577a849a2b1624aa3d5b948065bfa450a459 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 11:53:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?YT-585=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5?= =?UTF-8?q?=E5=BA=93=EF=BC=8Cpda=E6=89=AB=E7=AE=B1=E7=AD=BE=EF=BC=8C?= =?UTF-8?q?=E5=B8=A6=E5=87=BA=E6=89=80=E6=9C=89=E5=BA=93=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E4=B8=8D=E6=98=AF=E7=AE=B1=E7=AD=BE=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E5=BA=94=E5=B8=A6=E5=87=BA=E7=AE=B1=E7=AD=BE?= =?UTF-8?q?=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/unPlanned/job/receiptJobDetail.vue | 61 ++++++++++++++++---- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index c2396f7b..a5b94d1e 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -12,13 +12,9 @@ - - + :locationAreaTypeList='toLocationAreaTypeList'> @@ -70,12 +66,15 @@ calcHandleQty, getScanCount } from '@/common/detail.js'; + + import { + calc + } from '@/common/calc.js'; import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue' import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue' - import comReceiptDetailCardBatch from '@/pages/unPlanned/coms/comReceiptDetailCardBatch.vue' import jobTop from '@/mycomponents/job/jobTop.vue' export default { @@ -84,7 +83,6 @@ winScanButton, winScanPack, comReceiptDetailCard, - comReceiptDetailCardBatch, locationCompare, jobTop }, @@ -229,6 +227,14 @@ getScanResult(result) { + if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + + }, + setDataBatch(result){ try { var packingNumber = result.label.packingNumber; var batch = result.label.batch; @@ -238,7 +244,42 @@ if (detail == undefined) { this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { - + + var itemDetail = detail.subList.find(r => r.batch == batch); + if (itemDetail == undefined) { + this.showErrorMessage("批次【" + batch + "】" + "不在列表中") + } else { + if (itemDetail.scaned) { + // this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "已经扫描") + itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty)); + } else { + itemDetail.scaned = true; + itemDetail.handleQty = Number(result.label.qty); + itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail + .toLocationCode; + itemDetail.packQty = result.package.packQty + itemDetail.labelQty = Number(result.label.qty); + this.continueScan() + } + } + calcHandleQty(this.detailSource); + } + + } catch (e) { + this.showErrorMessage(e.message) + } + }, + setData(result){ + try { + var packingNumber = result.label.packingNumber; + var batch = result.label.batch; + var qty = result.label.qty; + var itemCode = result.label.itemCode; + var detail = this.detailSource.find(r => r.itemCode == itemCode); + if (detail == undefined) { + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") + } else { + var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); if (itemDetail == undefined) { this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "不在列表中") @@ -257,12 +298,11 @@ } } } - + } catch (e) { this.showErrorMessage(e.message) } }, - commit() { this.scanCount = getScanCount(this.subList); if (this.scanCount == 0) { @@ -326,6 +366,7 @@ this.detailSource.forEach(item => { itemCodes.push(item.itemCode) }) + return getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { From e6cc5cb565dfc761cf5d16c297739cb0d942b9bb Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 11:59:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?YT-585=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=EF=BC=8Cpda=E6=89=AB=E7=AE=B1=E7=AD=BE?= =?UTF-8?q?=EF=BC=8C=E5=B8=A6=E5=87=BA=E6=89=80=E6=9C=89=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=95=B0=E9=87=8F=EF=BC=8C=E4=B8=8D=E6=98=AF=E7=AE=B1=E7=AD=BE?= =?UTF-8?q?=E6=95=B0=E9=87=8F=EF=BC=8C=E5=BA=94=E5=B8=A6=E5=87=BA=E7=AE=B1?= =?UTF-8?q?=E7=AD=BE=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/unPlanned/job/issueJobDetail.vue | 71 +++++++++++++++++++--- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/src/pages/unPlanned/job/issueJobDetail.vue b/src/pages/unPlanned/job/issueJobDetail.vue index 9f548107..b9188d32 100644 --- a/src/pages/unPlanned/job/issueJobDetail.vue +++ b/src/pages/unPlanned/job/issueJobDetail.vue @@ -250,6 +250,13 @@ }, getScanResult(result) { + if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + }, + setDataBatch(result){ try { var packingNumber = result.balance.packingNumber; var batch = result.balance.batch; @@ -258,13 +265,12 @@ var locationCode = result.balance.locationCode; var inventoryStatus = result.balance.inventoryStatus; var detail = this.detailSource.find(r => r.itemCode == itemCode); - + if (detail == undefined) { this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { var itemDetail = detail.subList.find(r => { - return r.packingNumber == packingNumber && - r.batch == batch && + return r.batch == batch && r.fromLocationCode == result.fromLocationCode&& r.isRecommend==false }) @@ -273,7 +279,7 @@ itemCode:itemCode, packingNumber:packingNumber, batch:batch, - handleQty:detail.qty r.itemCode == itemCode); + + if (detail == undefined) { + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") + } else { + var itemDetail = detail.subList.find(r => { + return r.packingNumber == packingNumber && + r.batch == batch && + r.fromLocationCode == result.fromLocationCode&& + r.isRecommend==false + }) + if (itemDetail == undefined) { + var newAdd = { + itemCode:itemCode, + packingNumber:packingNumber, + batch:batch, + handleQty:detail.qty { From 1c5abafbb750cef28e5b7c1de2c39e800575563b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 12:38:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89calc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/putaway/record/putawayRecord.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue index 9ca0a5ce..1791dccc 100644 --- a/src/pages/putaway/record/putawayRecord.vue +++ b/src/pages/putaway/record/putawayRecord.vue @@ -99,9 +99,7 @@ getPrecisionStrategyParams } from '@/common/balance.js'; - import { - calc - } from '@/common/calc' + import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'