From 7b5f7f91d4dde7bdc070a9e7d6834d72ee32f66a Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Sat, 17 Aug 2024 11:00:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=E3=80=81=E8=A3=85?= =?UTF-8?q?=E9=85=8D=E4=B8=8A=E6=9E=B6=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winScanPackage.vue | 48 +++++++++++++++---- .../record/productPutawayRecord.vue | 20 ++++---- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/mycomponents/scan/winScanPackage.vue b/src/mycomponents/scan/winScanPackage.vue index e751e5f4..eb7f074a 100644 --- a/src/mycomponents/scan/winScanPackage.vue +++ b/src/mycomponents/scan/winScanPackage.vue @@ -32,7 +32,13 @@ import { getBalanceByFilter } from '@/api/request2.js'; - + + import { + getInventoryStatusDesc, + getDirectoryItemArray, + getLocationAreaTypeName + } from '@/common/directory.js'; + export default { name: 'winScanPack', components: { @@ -55,7 +61,8 @@ data() { return { show: false, - businessType: null + businessType: null, + scanResult:{} } }, created() { @@ -104,6 +111,7 @@ getScanResult(result) { if (result.success) { + this.scanResult=result this.getBalance(result, res => { result.balance = res; this.$emit("getResult", result); @@ -130,14 +138,14 @@ value: this.businessType.outInventoryStatuses }) } - if (this.businessType.outAreaTypes != null) { + if (this.businessType.outAreaTypes ) { filters.push({ column: "areaType", action: "in", value: this.businessType.outAreaTypes }) } - if (this.businessType.outAreaCodes != null) { + if (this.businessType.outAreaCodes ) { filters.push({ column: "areaCode", action: "in", @@ -146,6 +154,30 @@ } return filters; }, + + getQueryCondition() { + let condition = '按照以下条件:\n'; + let label = this.scanResult.label; + let status = getInventoryStatusDesc(getDirectoryItemArray(this.businessType.outInventoryStatuses)); + let areaType =getLocationAreaTypeName(this.businessType.outAreaTypes) + condition = condition + '物料号=[' + label.itemCode + + ']\n箱码=[' + label.packingNumber + + ']\n批次=[' + + label.batch + + ']' + + if (status) { + condition = condition + '\n库存状态=[' + status + ']' + } + + if (areaType) { + condition = condition + '\n库区类型=[' + areaType + ']' + } + if (this.businessType.outAreaCodes) { + condition = condition + '\n库区代码=[' + this.businessType.outAreaCodes + ']' + } + return condition; + }, getBalance(result, callback) { let filters = []; @@ -201,9 +233,7 @@ params.filters = filters; getBalanceByFilter(params).then(res1 => { if (res1.data.list.length == 0) { - this.showErrorMessage('未查找到该包装的库存余额', res => { - this.packGetFocus(); - }) + this.showErrorMessage(this.getQueryCondition()+'\n未查找到该包装的库存余额') } else { res1.data.list.forEach(r => r.parentPackingNumber = packageInfo.number) callback(res1.data.list) @@ -212,9 +242,7 @@ this.showErrorMessage(err.message); }) } else { - this.showErrorMessage('未查找到该包装的库存余额', res => { - this.packGetFocus(); - }) + this.showErrorMessage(this.getQueryCondition()+'\n未查找到该包装的库存余额') } } }).catch(err => { diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index d3362b7d..31cc12c5 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -147,6 +147,7 @@ getScanResult(result) { let label = result.label; let pack = result.package; + let errorHint="" result.balance.forEach( balance => { let item = this.detailSource.find(res => { @@ -180,14 +181,19 @@ item.subList.push(newDetail); } else { if (detail.scaned == true) { - this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + - "]重复扫描") + errorHint+="箱码[" + balance.packingNumber + "批次[" + balance.batch + + "]重复扫描\n" } } } this.calcHandleQty(); } ) + if(errorHint){ + this.showErrorMessage(errorHint) + }else { + this.scanPopupGetFocus() + } }, getRecommendLocation(balance) { @@ -251,9 +257,6 @@ this.$forceUpdate(); }, - updateData() { - this.calcHandleQty(); - }, removeItem(index, item) { this.removeRecommendLocation([item.expectinNumber]); this.detailSource.splice(index, 1) @@ -423,13 +426,6 @@ if (res) {} }); }, - showErrorMessage(message) { - this.$refs.comMessage.showErrorMessage(message, res => { - if (res) { - - } - }); - }, showScanMessage(message) { this.$refs.comMessage.showScanMessage(message);