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

Loading…
Cancel
Save