lijuncheng 1 day ago
parent
commit
5e4cdcf231
  1. 39
      src/common/detail.js
  2. 41
      src/pages/inventoryMove/coms/comMoveRecord.vue
  3. 4
      src/pages/issue/job/issueDetailBatch.vue

39
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;
}

41
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 {
@ -323,31 +324,16 @@
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)
}
},
//

4
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) // })
})

Loading…
Cancel
Save