diff --git a/src/mycomponents/scan/winScanLocation.vue b/src/mycomponents/scan/winScanLocation.vue index a7f363c5..2d3d491f 100644 --- a/src/mycomponents/scan/winScanLocation.vue +++ b/src/mycomponents/scan/winScanLocation.vue @@ -92,7 +92,6 @@ title: '扫描中...', mask: true }); - console.log(111,result) let label = result.label; if (label.barType === 'QRCode') { this.code = label.locationCode; @@ -104,7 +103,6 @@ this.showErrorMessage("扫描库位为空,请输入正确的库位") return } - console.log(888,this.code) getBasicLocationByCode(this.code).then(res => { uni.hideLoading(); diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue index 2ae6adda..7a25ef9e 100644 --- a/src/mycomponents/scan/winScanPackAndLocation.vue +++ b/src/mycomponents/scan/winScanPackAndLocation.vue @@ -339,7 +339,7 @@ this.chooseWhich = '2' if(!result.label.itemCode){ this.showErrorMessage('扫描标签不对,请重新扫描') - this.$emit('clearItemCode',result.label.code) + this.$emit('clearItemCode',result.label) return } if (res.data && res.data.list && res.data.list.length > 1) { @@ -397,6 +397,7 @@ mustHavaBalance(datas) { if (datas.length == 0) { this.showErrorMessage(this.getQueryCondition() + '\n未查找到库存记录', res => { + this.$emit('clearItemCode',this.scanResult) this.packGetFocus(); }) } else if (datas.length == 1) { diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index d4408686..e256104c 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -32,7 +32,7 @@ - + @@ -160,12 +160,7 @@ this.businessType = res.businessType; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList; - if(this.showOnePop){ - console.log(this.$refs.okToHoldRecordPackRef) - this.$refs.okToHoldRecordPackRef.show = true - }else{ - this.showFromLocationPopup(); - } + } else { this.showErrorMessage(res.message) } @@ -242,6 +237,7 @@ }, openScanPopup() { + if (this.fromLocationCode == "") { this.showFromLocationPopup(); return @@ -250,14 +246,21 @@ }, showFromLocationPopup() { this.$nextTick(() => { - this.$refs.scanFromLocationCode.openScanPopup(); + if(this.showOnePop){ + this.$refs.okToHoldRecordPackRef.showOne = true + }else{ + this.$refs.scanFromLocationCode.openScanPopup(); + } }) }, getFromLocation(location) { this.fromLocationCode = location.code; this.fromLocationInfo = location; if(!this.showOnePop){ - this.openScanPopup(); + this.openScanPopup(); + }else{ + this.itemCode ='' + this.batch ='' } }, getToLocation(location, code) { @@ -265,12 +268,11 @@ this.toLocationInfo = location; }, getScanResult(result,managementType) { - console.log(356,result) if(this.showOnePop){ this.itemCode= result.balance.itemCode this.batch = result.balance.batch - console.log(357,this.itemCode) - console.log(358,this.batch ) + this.isClearItemCode = false + debugger this.getResult = result//存储接受的结果 this.$refs.scanPopup.closeScanPopup() @@ -419,20 +421,20 @@ calcHandleQty(this.detailSource); }, getInputMsgResult(result,fromWitch){ - console.log('pooo',result) if(fromWitch == 'fromLocationScanMsg'){ - this.isClearFromLocationCode = false this.$refs.scanFromLocationCode.getScanResult(result) }else if(fromWitch == 'itemCodeScanMsg'){ - console.log(7878,this.fromLocationCode) result.fromLocationCode = this.fromLocationCode this.$refs.scanPopup.getScanResult(result) } + this.isClearFromLocationCode = false this.$refs.scanFromLocationCode.getScanResult(result) }else if(fromWitch == 'itemCodeScanMsg'){ result.fromLocationCode = this.fromLocationCode this.$refs.scanPopup.getScanResult(result) } }, // 清除来源库位 clearFromLocation(fromLocationCodeParams){ this.fromLocationCode = fromLocationCodeParams - console.log('rwyrwey',this.fromLocationCode) + this.itemCode ='' + this.batch ='' this.isClearFromLocationCode = true }, // 清除零件 - clearItemCode(itemCodeParams){ - this.itemCode = itemCodeParams + clearItemCode(label){ + this.itemCode = label.itemCode + this.batch ='' this.isClearItemCode = true }, showErrorMessage(message) { @@ -595,8 +597,6 @@ var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch); var submitItem = deepCopyData(detail) - console.log(233,submitItem) - console.log(244,info) submitItem.itemCode = detail.itemCode; submitItem.itemName = detail.package.itemName; submitItem.itemDesc1 = detail.package.itemDesc1; diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue index d30b9cfb..2142f178 100644 --- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue +++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue @@ -9,14 +9,14 @@ 来源库位: - + 零件: - + @@ -65,12 +65,11 @@ emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'], data() { return { - show:true, handleQty:0, fromLocationCode:'', itemCode:'', batch:'', - showOne:true + showOne:false } }, props: { @@ -201,12 +200,13 @@ that.boxfocus = false; }); }, + onClear(){ + console.log(111) + } }, watch: { fromLocationCodeProps:{ handler(newVal, oldVal) { - console.log('wer',this.isClearFromLocationCode) - console.log('wer',newVal) if(this.isClearFromLocationCode){ this.fromLocationCode='' }else{ @@ -220,15 +220,17 @@ handler(newVal, oldVal) { if(this.isClearItemCode){ this.itemCode='' - this.batch='' }else{ this.itemCode = newVal } }, }, batchProps(newVal) { - this.batch = newVal - console.log(999,this.batch) + if(this.isClearItemCode){ + this.batch='' + }else{ + this.batch = newVal + } }, } } diff --git a/src/pages/productReceipt/record/productReceiptRecordByBatch.vue b/src/pages/productReceipt/record/productReceiptRecordByBatch.vue index d12eabf4..c50e0cff 100644 --- a/src/pages/productReceipt/record/productReceiptRecordByBatch.vue +++ b/src/pages/productReceipt/record/productReceiptRecordByBatch.vue @@ -145,13 +145,17 @@ getScanResult(result) { let label = result.label; let pack = result.package; - + if(!result.label.itemCode){ + this.showErrorMessage('扫描标签不对,请重新扫描') + this.$emit('clearItemCode',result.label) + return + } var item = this.detailSource.find(res => { if (res.itemCode == label.itemCode) { return res } }) - + if (item == undefined) { var itemp = this.createItemInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);