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