From 8b8ad96dce90b8c8e55e2f19120b70416191c065 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Thu, 13 Jun 2024 15:53:28 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B6=E5=93=81?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/productPutawayDetail.vue | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index 0ae80cc1..646b5250 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -298,41 +298,26 @@ .fromLocationCode + "】已经扫描") } else { - this.addDetail(itemDetail, result); - return; + // this.addDetail(itemDetail, result); + // return; + //暂时先不判断状态 let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { - if (this.jobContent.allowModifyInventoryStatus == "TRUE") { + // if (this.jobContent.allowModifyInventoryStatus == "TRUE") { this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + ']不一致,是否继续上架?', res => { if (res) { this.addDetail(itemDetail, result); - // itemDetail.scaned = true; - // itemDetail.handleQty = Number(result.balance.qty) - // itemDetail.toInventoryStatus = result.balance.inventoryStatus; - // itemDetail.balance = result.balance; - // itemDetail.balance.balanceQty = Number(result.balance.qty) - // itemDetail.balance.packQty = Number(result.package.packQty) - // itemDetail.balance.packUnit = result.package.packUnit - // this.calcHandleQty(); } else { this.scanPopupGetFocus(); } }); } - } else { - this.addDetail(itemDetail, result); - // itemDetail.scaned = true; - // itemDetail.handleQty = Number(result.balance.qty) - // itemDetail.balance = result.balance; - // itemDetail.toInventoryStatus = result.balance.inventoryStatus; - // itemDetail.balance.balanceQty = Number(result.balance.qty) - // itemDetail.balance.packQty = Number(result.package.packQty) - // itemDetail.balance.packUnit = result.package.packUnit - // this.calcHandleQty(); - } + // } else { + // this.addDetail(itemDetail, result); + // } } } } @@ -346,6 +331,7 @@ itemDetail.handleQty = Number(result.balance.qty) itemDetail.balance = result.balance; itemDetail.toInventoryStatus = result.balance.inventoryStatus; + itemDetail.fromInventoryStatus = result.balance.inventoryStatus; itemDetail.balance.balanceQty = Number(result.balance.qty) itemDetail.balance.packQty = Number(result.package.packQty) itemDetail.balance.packUnit = result.package.packUnit From 60818e9066553fc342d3aa2705b54974c6df1a62 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Wed, 26 Jun 2024 17:31:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=8C=E5=96=84Mes=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winComScanFg.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue index 3fd8393b..b69462e3 100644 --- a/src/mycomponents/scan/winComScanFg.vue +++ b/src/mycomponents/scan/winComScanFg.vue @@ -188,27 +188,27 @@ getMesPackInfo(this.itemCode).then(res => { try { if (res.data.list.length == 0) { - throw new Error("没有查找到物料号【"+this.itemCode+"】对应的mes物料号") + throw new Error("没有查找到物料号【"+this.itemCode+"】对应的生产条码配置") } - var result = res.data.list[0] - var partNumber = result.partNumber; + var result = res.data.list[0] //Mes条码标签解析规格 + var partNumber = result.partNumber; //客户物料号 var lengthMat = result.lengthMat; var lengthBc = result.lengthBc; - let itemCode = content.substr(0, lengthMat); + let scanPartNumber = content.substr(0, lengthMat); //扫描的客户物料号 let productDate = content.substr(lengthMat, 8); let batch = content.substr(lengthMat + 8, 3); let order = content.substr(-8); - if (itemCode != partNumber) { + if (scanPartNumber != partNumber) { that.clear(); - throw new Error("解析错误:扫描物料号【" + itemCode + "】与查询物料号【" + partNumber + + throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber + "】与生成条码配置表中的客户物料号【" + partNumber + "】不一致") } let scanResult = { - itemCode: itemCode, + itemCode: scanPartNumber, productDate: productDate, batch: batch, order: order, From c2eddadbdf6a588f67a2568418e3fd86b32edb29 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Wed, 26 Jun 2024 18:08:05 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8F=96=E6=B6=88Mes=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=94=9F=E4=BA=A7=E6=97=A5=E6=9C=9F=E5=92=8C?= =?UTF-8?q?=E6=89=B9=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winComScanFg.vue | 65 ++++++++++++------- src/pages/productReceipt/coms/comFgCard.vue | 4 +- .../job/fgProductReceiptDetail.vue | 4 +- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue index b69462e3..c00a5016 100644 --- a/src/mycomponents/scan/winComScanFg.vue +++ b/src/mycomponents/scan/winComScanFg.vue @@ -139,7 +139,7 @@ }, 1000); // #endif }, - setItemCodeSimulate(itemCode,scanMsg) { + setItemCodeSimulate(itemCode, scanMsg) { this.itemCode = itemCode; this.scanMsg = scanMsg; }, @@ -188,38 +188,53 @@ getMesPackInfo(this.itemCode).then(res => { try { if (res.data.list.length == 0) { - throw new Error("没有查找到物料号【"+this.itemCode+"】对应的生产条码配置") + throw new Error("没有查找到物料号【" + this.itemCode + "】对应的生产条码配置") } - var result = res.data.list[0] //Mes条码标签解析规格 + var result = res.data.list[0] //Mes条码标签解析规格 var partNumber = result.partNumber; //客户物料号 var lengthMat = result.lengthMat; var lengthBc = result.lengthBc; + + //因为Q5的客户物料进行了加密,没有解析规格,在生产条码配置中的Type配置成Q5 + if (result.Type == 'P') { + let scanPartNumber = content.substr(0, lengthMat); //扫描的客户物料号 + // let productDate = content.substr(lengthMat, 8); + // let batch = content.substr(lengthMat + 8, 3); + let order = content.substr(-8); + if (scanPartNumber != partNumber) { + that.clear(); + throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber + + "】与生成条码配置表中的客户物料号【" + partNumber + + "】不一致") + } - - let scanPartNumber = content.substr(0, lengthMat); //扫描的客户物料号 - let productDate = content.substr(lengthMat, 8); - let batch = content.substr(lengthMat + 8, 3); - let order = content.substr(-8); - if (scanPartNumber != partNumber) { + let scanResult = { + itemCode: scanPartNumber, + // productDate: productDate, + // batch: batch, + order: order, + qty: 1, + content: content, + success: true, + }; that.clear(); - throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber + "】与生成条码配置表中的客户物料号【" + partNumber + - "】不一致") - + that.$emit("getResult", scanResult); + } else { + //不进行解析,直接按照扫描的标签进行赋值 + let scanResult = { + itemCode: this.itemCode, + // productDate: new Date(), + // batch: new Date(), + order: 0, + qty: 1, + content: content, + success: true, + }; + that.clear(); + that.$emit("getResult", scanResult); } - - let scanResult = { - itemCode: scanPartNumber, - productDate: productDate, - batch: batch, - order: order, - qty: 1, - content: content, - success: true, - }; - that.clear(); - that.$emit("getResult", scanResult); } catch (error) { - this.$refs.comMessage.showErrorMessage( error.message, res => { + this.$refs.comMessage.showErrorMessage(error.message, res => { if (res) { that.getfocus(); } diff --git a/src/pages/productReceipt/coms/comFgCard.vue b/src/pages/productReceipt/coms/comFgCard.vue index 0250637d..3dccba14 100644 --- a/src/pages/productReceipt/coms/comFgCard.vue +++ b/src/pages/productReceipt/coms/comFgCard.vue @@ -7,10 +7,10 @@ 零件号 {{detail.itemCode}} - +