From 0ecca875caaded22defe5afcc06886e48ebd6452 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 30 Jan 2024 11:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=90=88=E6=A0=BC=E9=80=80?= =?UTF-8?q?=E6=96=99=E7=94=B3=E8=AF=B7=E6=A0=A1=E9=AA=8C=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mycomponents/scan/winScanItem.vue | 2 - .../coms/comReturnRequestPopup.vue | 52 +++++-------------- .../request/returnRequestCreate.vue | 22 ++++++-- 3 files changed, 31 insertions(+), 45 deletions(-) diff --git a/mycomponents/scan/winScanItem.vue b/mycomponents/scan/winScanItem.vue index 28bec4ba..d7abaae8 100644 --- a/mycomponents/scan/winScanItem.vue +++ b/mycomponents/scan/winScanItem.vue @@ -32,8 +32,6 @@ } from '@/api/request2.js'; import { - getLocationTypeName, - getListLocationTypeDesc, checkDirectoryItemExist, getListItemTypeDesc, getItemTypeInfo diff --git a/pages/productionReturn/coms/comReturnRequestPopup.vue b/pages/productionReturn/coms/comReturnRequestPopup.vue index 8035a832..4d9855db 100644 --- a/pages/productionReturn/coms/comReturnRequestPopup.vue +++ b/pages/productionReturn/coms/comReturnRequestPopup.vue @@ -66,7 +66,7 @@ - + @@ -116,7 +116,6 @@ itemCodeFocus: false, requestInfo: null, itemCodeList: [], - isCheckItemCode: false, counQty: undefined, editPosition: true, numberFocus: false, @@ -198,6 +197,10 @@ type: String, default: '需求信息' }, + itemCodeTypeList: { + type: Array, + default: [] + }, }, methods: { checkNum(e) { @@ -228,7 +231,7 @@ if (this.isModifiedPosition) { this.isModifiedPosition = false } else { - this.itemCode = ""; + this.itemCode = "请扫描物料信息"; this.uom = "" this.qty = 0; this.counQty = undefined @@ -255,13 +258,9 @@ itemCodeLoseFocus() { this.itemCodeFocus = false; }, - selectedItem(item) { - this.itemCode = item.itemCode; - this.checkItemCode(); - }, confirm() { - if (this.itemCode == "" || !this.isCheckItemCode) { + if (this.itemCode == "请扫描物料信息" ) { this.showErrorMessage("请输入物料", "itemCode") return } @@ -283,28 +282,6 @@ this.callback('add'); }, - checkItemCode(itemCode) { - //校验物料 - getBasicItemByCode(itemCode).then(res => { - uni.hideLoading(); - this.$refs.scanPopup.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('未查找到物料【' + this.itemCode + '】', "itemCode"); - } - - }).catch(error => { - uni.hideLoading(); - this.showErrorMessage(error, "itemCode"); - }) - }, - - callback(action) { let item = { positionInfo: this.positionInfo, @@ -335,8 +312,7 @@ } }) if (type == "itemCode") { - this.itemCode = "" - this.isCheckItemCode = false; + this.itemCode = "请扫描物料信息" } }) }, @@ -382,14 +358,12 @@ } }, - getScanCode(code, scanResult) { - if (code == "") { - this.showErrorMessage('物料号不能为空') - return; - } - this.itemCode = ""; - this.checkItemCode(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/productionReturn/request/returnRequestCreate.vue b/pages/productionReturn/request/returnRequestCreate.vue index eca0871a..d7b2ac6a 100644 --- a/pages/productionReturn/request/returnRequestCreate.vue +++ b/pages/productionReturn/request/returnRequestCreate.vue @@ -23,13 +23,17 @@ - +