diff --git a/src/common/detail.js b/src/common/detail.js index 35ef4ba1..5c6570a0 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -45,43 +45,26 @@ export function getTreeDataSource(dataList) { } export function getThreeDataSource(data) { let items = [] - // let obj ={ - // ...data.subList[0] - // } - // console.log(12) - // data.subList.forEach((item)=>{ - // item.threeList = [{ - // fromLocationCode:item.fromLocationCode, - // batch:item.batch, - // handleQty:0, - // qty:item.qty, - // inventoryStatus:item.inventoryStatus, - // toLocationCode:item.toLocationCode, - // }] - // item.packList=[{ - // scaned : false, - // scanDate: new Date() - // }] - // }) - // obj.subList = data.subList - // items.push(obj) - // return items; + let obj ={ + ...data.subList[0] + } + console.log(12) data.subList.forEach((item)=>{ - item.subList = [{ + item.threeList = [{ fromLocationCode:item.fromLocationCode, batch:item.batch, handleQty:0, qty:item.qty, inventoryStatus:item.inventoryStatus, toLocationCode:item.toLocationCode, - // packList:[{ - // scaned : false, - // scanDate: new Date() - // }] }] - + item.packList=[{ + scaned : false, + scanDate: new Date() + }] }) - items = data.subList + obj.subList = data.subList + items.push(obj) return items; } diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 7ff8297d..c0de0d71 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -288,12 +288,13 @@ this.toLocationInfo = location; }, getScanResult(result, managementTypeParams) { - this.fromWarehouseCode = result.fromWarehouseCode + this.fromWarehouseCode =result.fromWarehouseCode this.managementType = managementTypeParams if (this.showOnePop) { if (this.isJustReplay) { this.$refs.okToHoldRecordPackRef.itemCode = result.label.itemCode this.$refs.okToHoldRecordPackRef.batch = result.label.batch + this.$refs.okToHoldRecordPackRef.uom = result.balance?result.balance.uom:"" this.getResult = result //存储接受的结果 this.$refs.scanPopup.closeScanPopup() } else { @@ -322,32 +323,17 @@ this.$refs.comMessage.showErrorMessage('请输入数量'); return; } - - this.checkItemCode(obj.itemCode, callBack => { - - if (callBack) { - if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) { - this.getResult = this.getResult ? this.getResult : { - label: {}, - fromLocationCode: '' - } - this.getResult.fromLocationCode = obj.fromLocationCode - this.getResult.label.itemCode = obj.itemCode - this.getResult.label.batch = obj.batch - this.getResult.label.qty = obj.handleQty - this.isJustReplay = false - this.$refs.scanPopup.getScanResult(this.getResult, this.businessType) - } else { - var hint = getListItemTypeDesc(this.itemCodeTypeList); - this.showErrorMessage("扫描物料[" + obj.itemCode + "]是[" + - getItemTypeName(callBack) + "],需要的物料类型是[" + hint + "]") - } - - } else { - this.showErrorMessage('未查找到物料【' + obj.itemCode + '】'); - } - - }) + + this.getResult = this.getResult ? this.getResult : { + label: {}, + fromLocationCode: '' + } + this.getResult.fromLocationCode = obj.fromLocationCode + this.getResult.label.itemCode = obj.itemCode + this.getResult.label.batch = obj.batch + this.getResult.label.qty = obj.handleQty + this.isJustReplay = false + this.$refs.scanPopup.getScanResult(this.getResult, this.businessType) }, //checkItemCode @@ -552,7 +538,6 @@ result.fromLocationCode = this.fromLocationCode result.label.itemCode = result.label.code this.checkItemCode(result.label.itemCode, callBack => { - if (callBack) { if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) { this.$refs.scanPopup.getScanResult(result) @@ -570,7 +555,7 @@ }) - + this.$refs.scanPopup.getScanResult(result) } }, // 清除来源库位 diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index ddcc65ea..1a33e01a 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -368,6 +368,7 @@ detail.handleQty = 0 detail.qty = 0 detail.subList.forEach(item=>{ + item.handleQty =item.handleQty || 0 detail.handleQty = calc.add(detail.handleQty,item.handleQty) detail.qty = calc.add(detail.qty,item.qty) // item.packList.forEach(cur=>{ @@ -396,6 +397,7 @@ detail.handleQty = 0 detail.balance = result.balance, detail.subList.forEach(item=>{ + item.handleQty =item.handleQty || 0 detail.handleQty = calc.add(detail.handleQty,item.handleQty) // item.packList.forEach(cur=>{ // cur.handleQty = calc.add(detail.handleQty,item.handleQty) // }) }) @@ -445,6 +447,8 @@ // }) detail.handleQty = 0 detail.subList.forEach(item=>{ + console.log(item.handleQty) + item.handleQty =item.handleQty || 0 detail.handleQty = calc.add(detail.handleQty,item.handleQty) // item.packList.forEach(cur=>{ // cur.handleQty = calc.add(detail.handleQty,item.handleQty) // }) })