|
@ -75,6 +75,7 @@ const toLocationAreaTypeList = ref([]) |
|
|
const jobStatus = ref('') |
|
|
const jobStatus = ref('') |
|
|
const jobToLocationCode = ref('') |
|
|
const jobToLocationCode = ref('') |
|
|
const isCheckLocation = ref(false) |
|
|
const isCheckLocation = ref(false) |
|
|
|
|
|
const scanedPackingNumber = ref('') |
|
|
const scanPopup = ref() |
|
|
const scanPopup = ref() |
|
|
const comScanIssuePackRef = ref() |
|
|
const comScanIssuePackRef = ref() |
|
|
const detailInfoPopupRef = ref() |
|
|
const detailInfoPopupRef = ref() |
|
@ -82,6 +83,7 @@ const comMessageRef = ref() |
|
|
const comScanLocation = ref() |
|
|
const comScanLocation = ref() |
|
|
onLoad((option) => { |
|
|
onLoad((option) => { |
|
|
id.value = option.id |
|
|
id.value = option.id |
|
|
|
|
|
scanedPackingNumber.value = option.scaned |
|
|
if (id.value != undefined) { |
|
|
if (id.value != undefined) { |
|
|
// 新建的任务自动接收 |
|
|
// 新建的任务自动接收 |
|
|
if (option.status == '1') { |
|
|
if (option.status == '1') { |
|
@ -151,7 +153,17 @@ const getDetail = () => { |
|
|
} else { |
|
|
} else { |
|
|
toLocationCode.value = jobToLocationCode.value |
|
|
toLocationCode.value = jobToLocationCode.value |
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
detailSource.value.forEach((r) => { |
|
|
|
|
|
r.subList.forEach((s) => { |
|
|
|
|
|
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { |
|
|
|
|
|
s.scaned = true |
|
|
|
|
|
s.cancleScanedHiht = true |
|
|
|
|
|
// 模拟扫描功能 |
|
|
|
|
|
openScanPopupSimulate(s) |
|
|
|
|
|
scanedPackingNumber.value = '' |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
showMessage('列表数据为0') |
|
|
showMessage('列表数据为0') |
|
|
} |
|
|
} |
|
@ -203,6 +215,28 @@ const openScanPopup = () => { |
|
|
const closeScanPopup = () => { |
|
|
const closeScanPopup = () => { |
|
|
scanPopup.value.closeScanPopup() |
|
|
scanPopup.value.closeScanPopup() |
|
|
} |
|
|
} |
|
|
|
|
|
// 模拟扫描功能 |
|
|
|
|
|
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 == '') { |
|
|
|
|
|
if (!l.scaned) { |
|
|
|
|
|
fromlocationCode = l.fromLocationCode |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item) |
|
|
|
|
|
} |
|
|
const getScanResult = (result) => { |
|
|
const getScanResult = (result) => { |
|
|
try { |
|
|
try { |
|
|
// var supplierCode = result.label.supplierCode; |
|
|
// var supplierCode = result.label.supplierCode; |
|
@ -226,7 +260,7 @@ const getScanResult = (result) => { |
|
|
}) |
|
|
}) |
|
|
if (itemDetail == undefined) { |
|
|
if (itemDetail == undefined) { |
|
|
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`) |
|
|
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`) |
|
|
} else if (itemDetail.scaned) { |
|
|
} else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) { |
|
|
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`) |
|
|
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`) |
|
|
} else { |
|
|
} else { |
|
|
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus) |
|
|
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus) |
|
|