From c078fb5ca17a93c7bf90ed4e6b666a59718f3683 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 13 Aug 2024 15:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E5=88=92=E5=A4=96?= =?UTF-8?q?=E5=87=BA=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scrap/request/scrapRequestCreate.vue | 15 +++++-------- src/pages/unPlanned/record/issueRecord.vue | 20 ++++++++++++------ src/pages/unPlanned/record/receiptRecord.vue | 17 +++++++++++---- .../unPlanned/request/issueRequestCreate.vue | 21 +++++++++++++------ 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/src/pages/scrap/request/scrapRequestCreate.vue b/src/pages/scrap/request/scrapRequestCreate.vue index 3e8ef532..e307cc48 100644 --- a/src/pages/scrap/request/scrapRequestCreate.vue +++ b/src/pages/scrap/request/scrapRequestCreate.vue @@ -159,6 +159,7 @@ let newDetail = createDetailInfo(balance, pack); // itemp.subList.push(newDetail); this.detailSource.push(itemp) + this.scanPopupGetFocus() } else { var detail = item.subList.find(r => { if (r.packingNumber == balance.packingNumber && @@ -171,6 +172,7 @@ if (detail == undefined) { let newDetail = createDetailInfo(balance, pack); item.subList.push(newDetail); + this.scanPopupGetFocus() } else { if (detail.scaned == true) { this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描") @@ -185,7 +187,7 @@ showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { if (res) { - + this.scanPopupGetFocus() } }); }, @@ -231,8 +233,8 @@ }, scanPopupGetFocus() { - if (this.$refs.scanPopup != undefined) { - this.$refs.scanPopup.getfocus(); + if (this.$refs.scanPopup) { + this.$refs.scanPopup.packGetFocus(); } }, @@ -292,13 +294,6 @@ if (res) {} }); }, - showErrorMessage(message) { - this.$refs.comMessage.showErrorMessage(message, res => { - if (res) { - - } - }); - }, showScanMessage(message) { this.$refs.comMessage.showScanMessage(message); diff --git a/src/pages/unPlanned/record/issueRecord.vue b/src/pages/unPlanned/record/issueRecord.vue index a964ceee..42ea5f8e 100644 --- a/src/pages/unPlanned/record/issueRecord.vue +++ b/src/pages/unPlanned/record/issueRecord.vue @@ -154,12 +154,13 @@ // newDetail.inventoryStatus ="OK"; itemp.subList.push(newDetail); this.detailSource.push(itemp) + this.packGetFocus() } else { var detail = item.subList.find(r => { - if (r.packingNumber == result.packingNumber && - r.batch == result.batch && - r.locationCode == result.locationCode && - r.inventoryStatus == result.inventoryStatus && + if (r.packingNumber == balance.packingNumber && + r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus && r.scaned == true) { return r; } @@ -168,13 +169,20 @@ if (detail == undefined) { let newDetail = createDetailInfo(balance, pack); item.subList.push(newDetail); + this.packGetFocus() } else { - this.showErrorMessage(result.packingNumber + "重复扫描") + this.showErrorMessage("箱码[" + balance.packingNumber + "]批次[" + balance.batch + "]已经扫描") } } this.calcHandleQty(); }, + + packGetFocus(){ + if(this.$refs.scanPopup){ + this.$refs.scanPopup.packGetFocus() + } + }, calcHandleQty() { calcHandleQty(this.detailSource); @@ -184,7 +192,7 @@ showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { if (res) { - + this.packGetFocus() } }); }, diff --git a/src/pages/unPlanned/record/receiptRecord.vue b/src/pages/unPlanned/record/receiptRecord.vue index 795c8f6a..8529bcd0 100644 --- a/src/pages/unPlanned/record/receiptRecord.vue +++ b/src/pages/unPlanned/record/receiptRecord.vue @@ -144,10 +144,12 @@ let newDetail = this.createDetailInfo(label, pack); itemp.subList.push(newDetail); this.detailSource.push(itemp) + this.getfocus() + } else { var detail = item.subList.find(r => { - if (r.packingNumber == result.number && - r.batch == result.batch) { + if (r.packingNumber == pack.number && + r.batch == pack.batch) { return r; } }) @@ -155,9 +157,10 @@ if (detail == undefined) { let newDetail = this.createDetailInfo(label, pack); item.subList.push(newDetail); + this.getfocus() } else { if (detail.scaned) { - this.showErrorMessage("箱码[" + result.Number + "]批次[" + result.batch + "]已经扫描") + this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描") } } @@ -165,6 +168,12 @@ this.calcHandleQty(); }, + + getfocus(){ + if(this.$refs.scanPopup){ + this.$refs.scanPopup.getfocus() + } + }, createItemInfo(label, pack) { let item = { @@ -213,7 +222,7 @@ showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { if (res) { - + this.getfocus() } }); }, diff --git a/src/pages/unPlanned/request/issueRequestCreate.vue b/src/pages/unPlanned/request/issueRequestCreate.vue index 501ba450..7b9c9b7c 100644 --- a/src/pages/unPlanned/request/issueRequestCreate.vue +++ b/src/pages/unPlanned/request/issueRequestCreate.vue @@ -166,12 +166,13 @@ let newDetail = createDetailInfo(balance, pack); // itemp.subList.push(newDetail); this.detailSource.push(itemp) + this.packGetFocus() } else { var detail = item.subList.find(r => { - if (r.packingNumber == result.packingNumber && - r.batch == result.batch && - r.locationCode == result.locationCode && - r.inventoryStatus == result.inventoryStatus && + if (r.packingNumber == balance.packingNumber && + r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus && r.scaned == true) { return r; } @@ -180,13 +181,21 @@ if (detail == undefined) { let newDetail = createDetailInfo(balance, pack); item.subList.push(newDetail); + this.packGetFocus() } else { - this.showErrorMessage(result.packingNumber + "重复扫描") + this.showErrorMessage("包装["+balance.packingNumber+"]"+"批次["+balance.batch+"]" + "重复扫描") } } this.calcHandleQty(); }, + packGetFocus(){ + if(this.$refs.scanPopup){ + this.$refs.scanPopup.packGetFocus() + } + + }, + calcHandleQty() { calcHandleQty(this.detailSource); @@ -196,7 +205,7 @@ showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { if (res) { - + this.packGetFocus() } }); },