From 90e73ae2ebc9a8b2f7f4c1427a6c2b2e11992741 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 30 Jan 2024 11:47:15 +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=85=A5=E5=BA=93=E7=94=B3=E8=AF=B7=E6=A0=A1=E9=AA=8C=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/issue/record/issueRecord.vue | 1 - .../unPlanned/coms/comReceiptRequestPopup.vue | 53 ++++++------------- .../request/receiptRequestCreate.vue | 18 +++++-- 3 files changed, 30 insertions(+), 42 deletions(-) diff --git a/pages/issue/record/issueRecord.vue b/pages/issue/record/issueRecord.vue index 8ebadbfe..58b99a81 100644 --- a/pages/issue/record/issueRecord.vue +++ b/pages/issue/record/issueRecord.vue @@ -136,7 +136,6 @@ this.toInventoryStatuses = res.toInventoryStatuses this.goScan(true) } else { - this.showErrorMessage(res.message) } }); diff --git a/pages/unPlanned/coms/comReceiptRequestPopup.vue b/pages/unPlanned/coms/comReceiptRequestPopup.vue index 8021e91f..1bfeafbe 100644 --- a/pages/unPlanned/coms/comReceiptRequestPopup.vue +++ b/pages/unPlanned/coms/comReceiptRequestPopup.vue @@ -68,7 +68,7 @@ - + @@ -126,6 +126,10 @@ type: String, default: '申请信息' }, + itemCodeTypeList: { + type: Array, + default: [] + }, }, methods: { checkNum(e) { @@ -146,7 +150,7 @@ openRequestPopup(editPosition) { this.editPosition = editPosition; if (!editPosition) { - this.itemCode = ""; + this.itemCode = "请扫描物料信息"; this.uom = "" this.qty = 0 this.counQty = undefined; @@ -175,10 +179,6 @@ itemCodeLoseFocus() { this.itemCodeFocus = false; }, - selectedItem(item) { - this.itemCode = item.itemCode; - this.checkItemCode(); - }, confirm() { if (this.toLocationCode == "") { @@ -186,7 +186,7 @@ return } - if (this.itemCode == "" || !this.isCheckItemCode) { + if (this.itemCode == "请扫描物料信息" ) { this.showErrorMessage("请输入物料", "itemCode") return } @@ -203,28 +203,6 @@ this.callback('add'); }, - checkItemCode(itemCode) { - //校验物料 - getBasicItemByCode(itemCode).then(res => { - uni.hideLoading(); - this.$refs.itemPopup.closeScanPopup(); - if (res.data != null && res.data.list.length > 0) { - this.itemCode = res.data.list[0].code; - this.itemName = res.data.list[0].name - this.isCheckItemCode = true; - this.numberFocus = true - this.uom = res.data.list[0].uom - } else { - this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode"); - } - - }).catch(error => { - uni.hideLoading(); - this.showErrorMessage(error, "itemCode"); - }) - }, - - callback(action) { let item = { toLocationCode: this.toLocationCode, @@ -259,18 +237,17 @@ this.closeRequestPopup(); }, - getItemCode(code, scanResult) { - if (code == "") { - this.showErrorMessage('物料号不能为空') - return; - } - this.itemCode = ""; - this.checkItemCode(code) - this.stdPackInfo = scanResult.package; - }, getLocationCode(location, code) { this.toLocationCode = code; }, + + getItemScanResult(code, scanResult) { + this.itemCode = code; + this.itemName = scanResult.name + this.uom =scanResult.uom + this.stdPackInfo = scanResult.package; + this.numberFocus = true + } } } diff --git a/pages/unPlanned/request/receiptRequestCreate.vue b/pages/unPlanned/request/receiptRequestCreate.vue index 1fd5e8d3..a73aae91 100644 --- a/pages/unPlanned/request/receiptRequestCreate.vue +++ b/pages/unPlanned/request/receiptRequestCreate.vue @@ -39,7 +39,7 @@ - +