From cef8e66cb922daa7a0c742193b1c57ec59a2c271 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 7 Nov 2024 13:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E6=A0=BC=E8=BD=AC=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E9=9C=80=E6=B1=82=20=20=20YT-734pda=E6=89=80=E6=9C=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8C=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E5=BA=93=E4=BD=8D=E7=9A=84=EF=BC=8C=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E7=AE=B1=E7=A0=81=EF=BC=8C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=BA=93=E4=BD=8D=E4=B8=BA=E7=A9=BA=EF=BC=9B?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E7=AE=B1=E7=A0=81=EF=BC=8C=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E5=BA=93=E4=BD=8D=EF=BC=8C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E7=9A=84=E7=AE=B1=E7=A0=81=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winScanLocation.vue | 8 +- .../scan/winScanPackAndLocation.vue | 5 + .../inventoryMove/coms/comMoveRecord.vue | 1271 +++++++++-------- .../inventoryMove/coms/okToHoldRecordPack.vue | 58 +- 4 files changed, 697 insertions(+), 645 deletions(-) diff --git a/src/mycomponents/scan/winScanLocation.vue b/src/mycomponents/scan/winScanLocation.vue index 26e2b201..a7f363c5 100644 --- a/src/mycomponents/scan/winScanLocation.vue +++ b/src/mycomponents/scan/winScanLocation.vue @@ -38,7 +38,7 @@ components: { winComScan, }, - emits: ["getLocation"], + emits: ["getLocation","clearFromLocation"], props: { title: { type: String, @@ -101,10 +101,10 @@ } if(this.code==undefined){ uni.hideLoading(); - this.showErrorMessage("扫描库位[" + this.code + "]为空,请输入正确的库位") + this.showErrorMessage("扫描库位为空,请输入正确的库位") return } - + console.log(888,this.code) getBasicLocationByCode(this.code).then(res => { uni.hideLoading(); @@ -112,6 +112,7 @@ let result = res.data.list[0]; if(result.code!=this.code){ this.showErrorMessage('未查询到库位[' + this.code + ']') + this.$emit('clearFromLocation',this.code) return; } var type = result.type; @@ -131,6 +132,7 @@ } } else { this.showErrorMessage('未查询到库位[' + this.code + ']') + this.$emit('clearFromLocation',this.code) } }).catch(error => { diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index 43b14388..2ae6adda 100644 --- a/src/mycomponents/scan/winScanPackAndLocation.vue +++ b/src/mycomponents/scan/winScanPackAndLocation.vue @@ -337,6 +337,11 @@ }) } this.chooseWhich = '2' + if(!result.label.itemCode){ + this.showErrorMessage('扫描标签不对,请重新扫描') + this.$emit('clearItemCode',result.label.code) + return + } if (res.data && res.data.list && res.data.list.length > 1) { this.showBalanceSelect(res.data.list); } else { diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index bf25e86c..d4408686 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -1,632 +1,641 @@ - - - - - \ No newline at end of file diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue index 3ddc1ce5..d30b9cfb 100644 --- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue +++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue @@ -5,7 +5,7 @@ 需求信息 - + 来源库位: @@ -36,7 +36,7 @@ - + @@ -91,6 +91,14 @@ type: String, default: '' }, + isClearFromLocationCode:{ + type: Boolean, + default: false + }, + isClearItemCode:{ + type: Boolean, + default: false + }, }, mounted() { }, @@ -103,6 +111,10 @@ // 显示箱码 itemCodeClick(){ // this.$refs.scanLocationCode.openScanPopup() + if(!this.fromLocationCode){ + this.$refs.comMessage.showMessage("请先扫描来源库位") + return + } this.$emit("itemCodeClick"); }, confirm(){ @@ -117,12 +129,19 @@ this.$emit("confirm",obj); }, fromLocationScanMsg(){ + console.log(111,this.fromLocationCode) this.scanMsg = this.fromLocationCode + this.fromWitch = 'fromLocationScanMsg' this.handelScanMsg() }, itemCodeScanMsg(){ - this.scanMsg = this.itemCode - this.handelScanMsg() + if(!this.fromLocationCode){ + this.$refs.comMessage.showMessage("请先扫描来源库位") + return + } + this.fromWitch = 'itemCodeScanMsg' + this.scanMsg = this.itemCode + this.handelScanMsg() }, handelScanMsg() { //点击了回车 @@ -131,7 +150,7 @@ // mask: true // }) let that = this; - console.log(that.scanMsg) + console.log(777,that.scanMsg) // if(index==-1){ // that.scanMsg =that.scanMsg + "\n"; // } @@ -162,7 +181,8 @@ scanResult.scanMessage = content if (scanResult.success) { // that.getfocus();//不能自动获取焦点 - that.$emit("getInputMsgResult", scanResult); + console.log(scanResult) + that.$emit("getInputMsgResult", scanResult,this.fromWitch); } else { that.losefocus(); this.$refs.comMessage.showErrorMessage(scanResult.message, res => { @@ -183,12 +203,28 @@ }, }, watch: { - fromLocationCodeProps(newVal) { - console.log(newVal) - this.fromLocationCode = newVal + fromLocationCodeProps:{ + handler(newVal, oldVal) { + console.log('wer',this.isClearFromLocationCode) + console.log('wer',newVal) + if(this.isClearFromLocationCode){ + this.fromLocationCode='' + }else{ + this.fromLocationCode = newVal + } + }, + // deep: true, + // immediate: true }, - itemCodeProps(newVal) { - this.itemCode = newVal + itemCodeProps: { + handler(newVal, oldVal) { + if(this.isClearItemCode){ + this.itemCode='' + this.batch='' + }else{ + this.itemCode = newVal + } + }, }, batchProps(newVal) { this.batch = newVal