From 9a8ee46f43e1e918fcc08bbbf1e8d4cae1bf1030 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 1 Dec 2023 17:22:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deliver/job/deliverDetail.vue | 2 +- pages/issue/coms/comIssueRequestPopup.vue | 103 ++++++++++------------ 2 files changed, 49 insertions(+), 56 deletions(-) diff --git a/pages/deliver/job/deliverDetail.vue b/pages/deliver/job/deliverDetail.vue index 72015025..9417f7d4 100644 --- a/pages/deliver/job/deliverDetail.vue +++ b/pages/deliver/job/deliverDetail.vue @@ -375,7 +375,7 @@ showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { uni.navigateTo({ - url: './issueJob' + url: './deliverJob' }) }) }, diff --git a/pages/issue/coms/comIssueRequestPopup.vue b/pages/issue/coms/comIssueRequestPopup.vue index d1ce2aa5..81d6dffb 100644 --- a/pages/issue/coms/comIssueRequestPopup.vue +++ b/pages/issue/coms/comIssueRequestPopup.vue @@ -26,17 +26,21 @@ - - 零件 : - - + + + 物料: + + {{itemCode}} + + + style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" + @click="itemCodeClick"> - + + @@ -60,9 +64,9 @@ - + + - @@ -81,7 +85,7 @@ import uom from '@/mycomponents/qty/uom.vue' import balanceStatus from '@/mycomponents/status/balanceStatus.vue' import comMessage from '@/mycomponents/common/comMessage.vue' - import selectList from '@/mycomponents/popup/selectList.vue' + import winScanItem from '@/mycomponents/scan/winScanItem.vue' export default { @@ -89,18 +93,18 @@ uom, balanceStatus, comMessage, - selectList + winScanItem }, data() { return { // itemCode: 'CE115F11161AG', workshopCode: "", //车间 workShopName: "", - productionLineCode: "",//生产线 - productionLineName:"", - workStationCode: "",//工位 - workStationName:"", - itemCode: '', + productionLineCode: "", //生产线 + productionLineName: "", + workStationCode: "", //工位 + workStationName: "", + itemCode: '请扫描物料信息', itemName: "", qty: 0, itemCodeFocus: false, @@ -114,7 +118,7 @@ positionInfo: "请选择位置", show: false, isModifiedPosition: true, - positionList:[], + positionList: [], list: [{ value: 1, label: '车间1', @@ -189,14 +193,14 @@ }, methods: { openRequestPopup(editPosition) { - if(this.positionList.length==0){ - getWorkShopLineStation().then(res=>{ + if (this.positionList.length == 0) { + getWorkShopLineStation().then(res => { this.positionList = res.data - }).catch(error=>{ - + }).catch(error => { + }) } - + this.editPosition = editPosition; if (this.isModifiedPosition) { this.isModifiedPosition = false @@ -217,12 +221,7 @@ this.checkLocatioCode(); }, itemCodeClick() { - if (this.positionInfo == "请选择位置") { - this.showErrorMessage("请先选择位置") - return - } - this.$refs.selectList.queryList(this.productionLineCode) - + this.$refs.scanPopup.openScanPopup(); }, itemCodeGetFocus() { @@ -238,7 +237,7 @@ confirm() { if (this.itemCode == "" || !this.isCheckItemCode) { - this.showErrorMessage("请输入零件", "itemCode") + this.showErrorMessage("请输入物料", "itemCode") return } if (this.qty == 0) { @@ -250,10 +249,11 @@ }, - checkItemCode() { - //校验零件 - getBasicItemByCode(this.itemCode).then(res => { + 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 @@ -261,7 +261,7 @@ this.numberFocus = true this.uom = res.data.list[0].uom } else { - this.showErrorMessage('未查找到零件【' + this.itemCode + '】', "itemCode"); + this.showErrorMessage('未查找到物料【' + this.itemCode + '】', "itemCode"); } }).catch(error => { @@ -274,12 +274,12 @@ callback(action) { let item = { positionInfo: this.positionInfo, - workshopCode: this.workshopCode,//车间 + workshopCode: this.workshopCode, //车间 workShopName: this.workShopName, - productionLineCode: this.productionLineCode,//生产线 - productionLineName:this.productionLineName, - workStationCode: this.workStationCode,//工位 - workStationName:this.workStationName, + productionLineCode: this.productionLineCode, //生产线 + productionLineName: this.productionLineName, + workStationCode: this.workStationCode, //工位 + workStationName: this.workStationName, itemCode: this.itemCode, itemName: this.itemName, uom: this.uom, @@ -304,9 +304,6 @@ } }) }, - itemCodeConfirm() { - this.checkItemCode(); - }, change(value) { this.qty = value; }, @@ -321,28 +318,24 @@ }, confirmSelect(e) { this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label - console.log("位置",this.positionInfo) + console.log("位置", this.positionInfo) this.workshopCode = e[0].value this.productionLineCode = e[1].value this.workStationCode = e[2].value - this.workShopName= e[0].label + this.workShopName = e[0].label this.productionLineName = e[1].label this.workStationName = e[2].label }, - getItemCodeListByProLine(lineCode) { - getProductionlineItem(lineCode).then(res => { - if (res.data != null && res.data.list.length > 0) { - this.$refs.selectList.openPopup(res.data.list) - } else { - //没有查询到生产线对应的零件信息 - this.showErrorMessage('未查找到生产线【' + lineCode + '】对应的零件', "itemCode"); - } - }).catch(error => { - this.showErrorMessage(error, "itemCode"); - }) - } + getScanCode(code) { + if (code == "") { + this.showMessage('物料号不能为空') + return; + } + this.itemCode = ""; + this.checkItemCode(code) + }, } }