|
|
@ -146,13 +146,6 @@ const getDetail = () => { |
|
|
|
subList.value = res.data.subList |
|
|
|
detailSource.value = getTreeDataSource(subList.value) |
|
|
|
|
|
|
|
detailSource.value.forEach((r) => { |
|
|
|
r.subList.forEach((s) => { |
|
|
|
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) s.scaned = true |
|
|
|
s.inventoryStatus = s.inspectResult // 更新检验结果状态 |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
fromLocationCode.value = subList.value[0].fromLocationCode |
|
|
|
jobToLocationCode.value = subList.value[0].toLocationCode |
|
|
|
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) |
|
|
@ -162,6 +155,16 @@ const getDetail = () => { |
|
|
|
} else { |
|
|
|
toLocationCode.value = jobToLocationCode.value |
|
|
|
} |
|
|
|
detailSource.value.forEach((r) => { |
|
|
|
r.subList.forEach((s) => { |
|
|
|
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { |
|
|
|
s.scaned = true |
|
|
|
s.packList.forEach((item) => (item.scaned = true)) |
|
|
|
s.inventoryStatus = s.inspectResult // 更新检验结果状态 |
|
|
|
openScanPopupSimulate(s) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
showMessage('列表数据为0') |
|
|
|
} |
|
|
@ -200,6 +203,26 @@ const continueScan = () => { |
|
|
|
const updateData = () => { |
|
|
|
calcTreeHandleQty(detailSource.value) |
|
|
|
} |
|
|
|
// 模拟扫描功能 |
|
|
|
const openScanPopupSimulate = (item) => { |
|
|
|
let fromlocationCode = '' |
|
|
|
const fromlocationList = [] |
|
|
|
for (let i = 0; i < detailSource.value.length; i++) { |
|
|
|
const item = detailSource.value[i] |
|
|
|
item.subList.forEach((l) => { |
|
|
|
// 重复的库位不往里面插入 |
|
|
|
const location = fromlocationList.find((res) => res == l.fromLocationCode) |
|
|
|
if (location == undefined) { |
|
|
|
fromlocationList.push(l.fromLocationCode) |
|
|
|
} |
|
|
|
// 来源库位赋默认值 |
|
|
|
if (fromlocationCode == '') { |
|
|
|
fromlocationCode = l.fromLocationCode |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item) |
|
|
|
} |
|
|
|
const openScanPopup = () => { |
|
|
|
let fromlocationCode = '' |
|
|
|
const fromlocationList = [] |
|
|
|