|
@ -97,6 +97,7 @@ const comscan = ref() |
|
|
const balanceQtyEditRef = ref() |
|
|
const balanceQtyEditRef = ref() |
|
|
const detailOptions = ref([]) |
|
|
const detailOptions = ref([]) |
|
|
const detailGiveupOptions = ref([]) |
|
|
const detailGiveupOptions = ref([]) |
|
|
|
|
|
const toLocationAreaTypeList = ref([]) |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
detailOptions.value = getDetailOption() |
|
|
detailOptions.value = getDetailOption() |
|
|
detailGiveupOptions.value = getDetailGiveupOption() |
|
|
detailGiveupOptions.value = getDetailGiveupOption() |
|
@ -138,6 +139,7 @@ const initData = () => { |
|
|
fromInventoryStatuses.value = jobContent.value.outInventoryStatuses |
|
|
fromInventoryStatuses.value = jobContent.value.outInventoryStatuses |
|
|
toLocation.value = dataContent.value[0] |
|
|
toLocation.value = dataContent.value[0] |
|
|
toLocationCode.value = dataContent.value[0].toLocationCode |
|
|
toLocationCode.value = dataContent.value[0].toLocationCode |
|
|
|
|
|
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) |
|
|
// fromLocationList.value = getFromLocationList() |
|
|
// fromLocationList.value = getFromLocationList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -194,15 +196,72 @@ const onScan = (result)=> { |
|
|
comMessageRef.value.showQuestionMessage( |
|
|
comMessageRef.value.showQuestionMessage( |
|
|
`扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => { |
|
|
`扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
onScanResult(result) |
|
|
getToLocationBalance(result) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
onScanResult(result) |
|
|
getToLocationBalance(result) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const onScanResult = (result) => { |
|
|
//查询到目标库位的库存余额 |
|
|
|
|
|
const getToLocationBalance = (result)=> { |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: '查询中', |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
let filters = [] |
|
|
|
|
|
if (result.package.parentNumber) { |
|
|
|
|
|
let packingNumber = result.package.parentNumber + "," + result.package.number; |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "packingNumber", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: packingNumber |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "packingNumber", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: result.package.number |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: result.package.itemCode |
|
|
|
|
|
}) |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "batch", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: result.package.batch |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "areaType", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: toLocationAreaTypeList.value.join(',') |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
|
|
filters: filters, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
} |
|
|
|
|
|
getBalanceByFilter(params).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data.list.length > 0) { |
|
|
|
|
|
showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额"); |
|
|
|
|
|
} else { |
|
|
|
|
|
queryBalance(result); |
|
|
|
|
|
} |
|
|
|
|
|
// callback(res.data) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
showErrorMessage(err.message); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
const queryBalance = (result) => { |
|
|
try { |
|
|
try { |
|
|
// if (fromLocationCode.value == '') { |
|
|
// if (fromLocationCode.value == '') { |
|
|
// showErrorMessage('请选择来源库位', (res) => { |
|
|
// showErrorMessage('请选择来源库位', (res) => { |
|
|