|
|
@ -122,6 +122,7 @@ |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'winScanPack', |
|
|
|
emits: ["afterScan"], |
|
|
|
components: { |
|
|
|
winComScan, |
|
|
|
balance, |
|
|
@ -231,20 +232,12 @@ |
|
|
|
if (this.toLocation && result.package.packUnit) { |
|
|
|
let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode); |
|
|
|
if (result.package.packUnit !== item.packUnit) { |
|
|
|
this.$refs.comMessage.showModal({ |
|
|
|
iconType:'警告', |
|
|
|
content:`扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, |
|
|
|
showConfirmButton:true, |
|
|
|
showCancelButton:true, |
|
|
|
confirmText:'是', |
|
|
|
cancelText:'否', |
|
|
|
success:({confirm})=>{ |
|
|
|
if(confirm){ |
|
|
|
this.$refs.comMessage.showQuestionMessage( |
|
|
|
'扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?', res => { |
|
|
|
if (res) { |
|
|
|
this.onScanResult(result) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.onScanResult(result) |
|
|
|
} |
|
|
@ -340,6 +333,7 @@ |
|
|
|
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细', |
|
|
|
res => { |
|
|
|
that.getfocus(); |
|
|
|
return; |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
@ -347,6 +341,7 @@ |
|
|
|
} else { |
|
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
|
} |
|
|
|
that.$emit("afterScan"); |
|
|
|
} else { |
|
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
|
|
res => { |
|
|
@ -354,6 +349,7 @@ |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
if (this.jobContent.allowModifyBatch == "TRUE") { |
|
|
|
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + |
|
|
@ -436,9 +432,6 @@ |
|
|
|
|
|
|
|
addRecord(batch, label, balance, packageInfo) { |
|
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
|
if(!batch.packingNumber){//解决发料任务删除的bug-wyf |
|
|
|
batch.packingNumber = label.packingNumber |
|
|
|
} |
|
|
|
batch.Records.push(record); |
|
|
|
this.issueRecord.unshift(record) |
|
|
|
this.calcBatchHandleQty(batch); |
|
|
@ -494,10 +487,12 @@ |
|
|
|
if (item != undefined) { |
|
|
|
|
|
|
|
item.Locations.forEach(l => { |
|
|
|
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b.batch == record.batch); |
|
|
|
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b |
|
|
|
.batch == record.batch); |
|
|
|
|
|
|
|
if (batch && batch.Records && batch.Records.length > 0) { |
|
|
|
let rIndex = batch.Records.findIndex(r => r.packingNumber == record.packingNumber && r.batch == record.batch); |
|
|
|
let rIndex = batch.Records.findIndex(r => r.packingNumber == record |
|
|
|
.packingNumber && r.batch == record.batch); |
|
|
|
batch.Records.splice(rIndex, 1); |
|
|
|
} |
|
|
|
|
|
|
|