|
@ -79,6 +79,15 @@ const initData = () => { |
|
|
fromLocationList.value = getFromLocationList() |
|
|
fromLocationList.value = getFromLocationList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//模拟扫描 |
|
|
|
|
|
const openScanPopupForJobSimulate = (content, jobcontent, scanMessage)=> { |
|
|
|
|
|
issueRecord.value = []; |
|
|
|
|
|
dataContent.value = content; |
|
|
|
|
|
jobContent.value = jobcontent; |
|
|
|
|
|
initData(); |
|
|
|
|
|
scanPopup.value.openScanPopupForJobSimulate(fromLocationCode.value, fromLocationList.value, jobContent.value, scanMessage); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
const showBalanceSelect = (items) => { |
|
|
const showBalanceSelect = (items) => { |
|
|
balanceSelect.value.openPopup(items) |
|
|
balanceSelect.value.openPopup(items) |
|
|
} |
|
|
} |
|
@ -135,6 +144,7 @@ const onScan = (result) => { |
|
|
const lot = result.label.batch |
|
|
const lot = result.label.batch |
|
|
const item = toLocation.value.Items.find((r) => r.itemCode == itemCode) |
|
|
const item = toLocation.value.Items.find((r) => r.itemCode == itemCode) |
|
|
if (item == undefined) { |
|
|
if (item == undefined) { |
|
|
|
|
|
packLoseFocus() |
|
|
showErrorMessage(`未查找到物料【${itemCode}】的发料明细`, (res) => { |
|
|
showErrorMessage(`未查找到物料【${itemCode}】的发料明细`, (res) => { |
|
|
packGetFocus() |
|
|
packGetFocus() |
|
|
}) |
|
|
}) |
|
@ -184,10 +194,10 @@ const afterGetBalance = (label, balance, packageInfo) => { |
|
|
const record = batch.Records.find((r) => r.packingNumber == packingCode) |
|
|
const record = batch.Records.find((r) => r.packingNumber == packingCode) |
|
|
if (record == undefined) { |
|
|
if (record == undefined) { |
|
|
// 如果有推荐箱码 |
|
|
// 如果有推荐箱码 |
|
|
if (batch.Recommends.length > 0) { |
|
|
if (batch.Recommends && batch.Recommends.length > 0) { |
|
|
const recommend = batch.Recommends.find((r) => r.packingNumber == packingCode) |
|
|
const recommend = batch.Recommends.find((r) => r.packingNumber == packingCode) |
|
|
if (recommend != undefined) { |
|
|
if (recommend != undefined) { |
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
addRecord(batch, label, balance, packageInfo) |
|
|
} else { |
|
|
} else { |
|
|
// 允许修改箱码 |
|
|
// 允许修改箱码 |
|
|
if (jobContent.value.allowModifyPackingNumber == 'TRUE') { |
|
|
if (jobContent.value.allowModifyPackingNumber == 'TRUE') { |
|
@ -278,7 +288,10 @@ const addRecord = (batch, label, balance, packageInfo) => { |
|
|
const record = creatRecord(label, balance, packageInfo) |
|
|
const record = creatRecord(label, balance, packageInfo) |
|
|
batch.Records.push(record) |
|
|
batch.Records.push(record) |
|
|
calcBatchHandleQty(batch) |
|
|
calcBatchHandleQty(batch) |
|
|
packGetFocus() |
|
|
emit('refresh') |
|
|
|
|
|
setTimeout(res=>{ |
|
|
|
|
|
packGetFocus(); |
|
|
|
|
|
},100) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const swipeClick = (params, item) => { |
|
|
const swipeClick = (params, item) => { |
|
|