lijuncheng 1 day ago
parent
commit
5e4cdcf231
  1. 39
      src/common/detail.js
  2. 43
      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) { export function getThreeDataSource(data) {
let items = [] let items = []
// let obj ={ let obj ={
// ...data.subList[0] ...data.subList[0]
// } }
// console.log(12) 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;
data.subList.forEach((item)=>{ data.subList.forEach((item)=>{
item.subList = [{ item.threeList = [{
fromLocationCode:item.fromLocationCode, fromLocationCode:item.fromLocationCode,
batch:item.batch, batch:item.batch,
handleQty:0, handleQty:0,
qty:item.qty, qty:item.qty,
inventoryStatus:item.inventoryStatus, inventoryStatus:item.inventoryStatus,
toLocationCode:item.toLocationCode, 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; return items;
} }

43
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -288,12 +288,13 @@
this.toLocationInfo = location; this.toLocationInfo = location;
}, },
getScanResult(result, managementTypeParams) { getScanResult(result, managementTypeParams) {
this.fromWarehouseCode = result.fromWarehouseCode this.fromWarehouseCode =result.fromWarehouseCode
this.managementType = managementTypeParams this.managementType = managementTypeParams
if (this.showOnePop) { if (this.showOnePop) {
if (this.isJustReplay) { if (this.isJustReplay) {
this.$refs.okToHoldRecordPackRef.itemCode = result.label.itemCode this.$refs.okToHoldRecordPackRef.itemCode = result.label.itemCode
this.$refs.okToHoldRecordPackRef.batch = result.label.batch this.$refs.okToHoldRecordPackRef.batch = result.label.batch
this.$refs.okToHoldRecordPackRef.uom = result.balance?result.balance.uom:""
this.getResult = result // this.getResult = result //
this.$refs.scanPopup.closeScanPopup() this.$refs.scanPopup.closeScanPopup()
} else { } else {
@ -322,32 +323,17 @@
this.$refs.comMessage.showErrorMessage('请输入数量'); this.$refs.comMessage.showErrorMessage('请输入数量');
return; return;
} }
this.checkItemCode(obj.itemCode, callBack => { this.getResult = this.getResult ? this.getResult : {
label: {},
if (callBack) { fromLocationCode: ''
if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) { }
this.getResult = this.getResult ? this.getResult : { this.getResult.fromLocationCode = obj.fromLocationCode
label: {}, this.getResult.label.itemCode = obj.itemCode
fromLocationCode: '' this.getResult.label.batch = obj.batch
} this.getResult.label.qty = obj.handleQty
this.getResult.fromLocationCode = obj.fromLocationCode this.isJustReplay = false
this.getResult.label.itemCode = obj.itemCode this.$refs.scanPopup.getScanResult(this.getResult, this.businessType)
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 + '】');
}
})
}, },
//checkItemCode //checkItemCode
@ -552,7 +538,6 @@
result.fromLocationCode = this.fromLocationCode result.fromLocationCode = this.fromLocationCode
result.label.itemCode = result.label.code result.label.itemCode = result.label.code
this.checkItemCode(result.label.itemCode, callBack => { this.checkItemCode(result.label.itemCode, callBack => {
if (callBack) { if (callBack) {
if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) { if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) {
this.$refs.scanPopup.getScanResult(result) 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.handleQty = 0
detail.qty = 0 detail.qty = 0
detail.subList.forEach(item=>{ detail.subList.forEach(item=>{
item.handleQty =item.handleQty || 0
detail.handleQty = calc.add(detail.handleQty,item.handleQty) detail.handleQty = calc.add(detail.handleQty,item.handleQty)
detail.qty = calc.add(detail.qty,item.qty) detail.qty = calc.add(detail.qty,item.qty)
// item.packList.forEach(cur=>{ // item.packList.forEach(cur=>{
@ -396,6 +397,7 @@
detail.handleQty = 0 detail.handleQty = 0
detail.balance = result.balance, detail.balance = result.balance,
detail.subList.forEach(item=>{ detail.subList.forEach(item=>{
item.handleQty =item.handleQty || 0
detail.handleQty = calc.add(detail.handleQty,item.handleQty) detail.handleQty = calc.add(detail.handleQty,item.handleQty)
// item.packList.forEach(cur=>{ // cur.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.handleQty = 0
detail.subList.forEach(item=>{ detail.subList.forEach(item=>{
console.log(item.handleQty)
item.handleQty =item.handleQty || 0
detail.handleQty = calc.add(detail.handleQty,item.handleQty) detail.handleQty = calc.add(detail.handleQty,item.handleQty)
// item.packList.forEach(cur=>{ // cur.handleQty = calc.add(detail.handleQty,item.handleQty) // }) // item.packList.forEach(cur=>{ // cur.handleQty = calc.add(detail.handleQty,item.handleQty) // })
}) })

Loading…
Cancel
Save