Browse Source

补料提交bug

intex
张立 1 week ago
parent
commit
2816e6ace0
  1. 69
      src/pages/repleinsh/job/repleinshDetailBatch.vue

69
src/pages/repleinsh/job/repleinshDetailBatch.vue

@ -385,12 +385,12 @@
return r.batch == batch &&
r.fromLocationCode == result.fromLocationCode
})
console.log(555,this.fromLocationCode)
//
if (itemDetail == undefined) {
var item = {
scaned: true,
packingNumber: packingNumber,
fromLocationCode: this.fromLocationCode,
toLocationCode: this.toLocationCode,
batch: result.label.batch,
handleQty: result.label.qty,
@ -412,7 +412,21 @@
balanceQty: result.balance.qty,
packQty: result.package.packQty,
packUnit: result.package.packUnit,
}]
}],
backNumber:result.balance.backNumber,
itemCode:itemCode,
itemDesc1:result.balance.itemDesc1,
itemDesc2:result.balance.itemDesc2,
itemName:result.balance.itemName,
deliNo:detail.subList[0].deliNo,
day:detail.subList[0].day,
fromAreaCode:detail.subList[0].fromAreaCode,
fromLocationCode:this.fromLocationCode,
productionLine:detail.subList[0].productionLine,
productionLineCode:detail.subList[0].productionLineCode,
projectCode:detail.subList[0].projectCode,
toAreaCode:detail.subList[0].toAreaCode,
}
detail.subList.push(item)
//
@ -486,7 +500,6 @@
var item = {
scaned: true,
packingNumber: packingNumber,
fromLocationCode: this.fromLocationCode,
toLocationCode: this.toLocationCode,
batch: result.label.batch,
handleQty: result.label.qty,
@ -509,7 +522,20 @@
balanceQty: result.balance.qty,
packQty: result.package.packQty,
packUnit: result.package.packUnit,
}]
}],
backNumber:result.balance.backNumber,
itemCode:itemCode,
itemDesc1:result.balance.itemDesc1,
itemDesc2:result.balance.itemDesc2,
itemName:result.balance.itemName,
deliNo:detail.subList[0].deliNo,
day:detail.subList[0].day,
fromAreaCode:detail.subList[0].fromAreaCode,
fromLocationCode:this.fromLocationCode,
productionLine:detail.subList[0].productionLine,
productionLineCode:detail.subList[0].productionLineCode,
projectCode:detail.subList[0].projectCode,
toAreaCode:detail.subList[0].toAreaCode,
}
detail.subList.push(item)
//
@ -660,7 +686,8 @@
productionLine:item.productionLine,
productionLineCode:item.productionLineCode,
projectCode: item.projectCode,
qty: item.qty,
qty: toLocationCode.qty,
handleQty:toLocationCode.handleQty,
toAreaCode: item.toAreaCode,
toLocationCode: item.toLocationCode,
uom:item.uom,
@ -671,7 +698,8 @@
subItem.recordList = [];
// batch.Records.forEach(r => {
let record = {};
record.handleQty = item.qty;
record.handleQty = item.handleQty;
record.qty = item.qty;
record.fromBatch = item.batch;
record.fromContainerNumber = item.containerNumber;
@ -785,20 +813,22 @@
// let item = this.detailSource.find(r => r.itemCode == detail.itemCode && r.fromLocationCode == detail
// .fromLocationCode && r.batch == detail.batch);
//
let itemOriginal = this.detailSourceOriginal.find(r => r.itemCode == detail.itemCode && r.fromLocationCode ==
detail.fromLocationCode && r.batch == detail.batch);
let itemOriginal = this.detailSourceOriginal.find(r => r.itemCode == detail.itemCode);
let itemo = this.detailSource.find(r => r.itemCode == detail.itemCode);
let batchIndexOriginal = itemOriginal.subList.findIndex(r => r.fromLocationCode == detail.fromLocationCode && r.batch == detail.batch);
let batchIndex = itemo.subList.findIndex(r => r.fromLocationCode == detail.fromLocationCode && r.batch == detail.batch);
if (itemOriginal) {
if (detail.packList.length == 0) {
this.detailSourceOriginal = this.detailSourceOriginal.filter(r => r.itemCode == detail.itemCode && r
.fromLocationCode == detail.fromLocationCode && r.batch == detail.batch);
this.detailSource = this.detailSource.filter(r => r.itemCode == detail.itemCode && r.fromLocationCode ==
detail.fromLocationCode && r.batch == detail.batch);
if(batchIndexOriginal<0){
if (detail.packList.length == 0) {
itemo.subList.splice(batchIndex,1)
}
}
}
this.updateData()
},
openScanPopup() {
let fromlocationCode = '';
let fromLocationCodeParams = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
@ -809,14 +839,16 @@
fromlocationList.push(l.fromLocationCode);
}
//
if (fromlocationCode == '') {
if (fromLocationCodeParams == '') {
if (!l.scaned) {
fromlocationCode = l.fromLocationCode;
fromLocationCodeParams = l.fromLocationCode;
}
}
})
}
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
this.fromLocationCode = fromLocationCodeParams
console.log(555,this.fromLocationCode)
this.$refs.scanPopup.openScanPopupForJob(fromLocationCodeParams, fromlocationList, this.jobContent);
},
scanPopupGetFocus() {
@ -900,6 +932,9 @@
})
})
return scanCount;
},
confirmFromLocation(fromLocationCodeParams) {
this.fromLocationCode = fromLocationCodeParams
}

Loading…
Cancel
Save