diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index 3e55d22f..54b45e4a 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -199,21 +199,23 @@ that.jobToLocationCode = that.subList[0].toLocationCode that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.detailSource = getDataSource(that.subList) - that.detailSource.forEach(r => { - r.subList.forEach(s => { - if (this.scanedPackingNumber && this.scanedPackingNumber == s - .packingNumber) { - s.scaned = true - s.handleQty =s.qty - } - }) - }) + that.isCheckLocation = getSwitchInfoByCode(that.switchCode) if (that.isCheckLocation) { that.toLocationCode = "" } else { that.toLocationCode = that.jobToLocationCode; - } + } + that.detailSource.forEach(r => { + r.subList.forEach(s => { + if (this.scanedPackingNumber && this.scanedPackingNumber == s + .packingNumber) { + s.scaned = true + // s.handleQty =s.qty + this.openScanPopupSimulate(s) + } + }) + }) } else { that.showMessage('列表数据为0'); } @@ -246,6 +248,25 @@ openDetail(item) { this.$refs.detailInfoPopup.openPopup(item) + }, + openScanPopupSimulate(item) { + let fromlocationCode = ''; + let fromlocationList = []; + for (var i = 0; i < this.detailSource.length; i++) { + let item = this.detailSource[i]; + item.subList.forEach(l => { + //重复的库位不往里面插入 + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { + fromlocationList.push(l.fromLocationCode); + } + //来源库位赋默认值 + if (fromlocationCode == '') { + fromlocationCode = l.fromLocationCode; + } + }) + } + this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,item); }, openScanPopup() {