Commit 2003ab20 by wusiyi

fix: 修复配货分拣扫码切换配货区且配货完成后弹窗提示bug

parent 88b48449
......@@ -943,7 +943,11 @@ const getPackingData = async (code: string) => {
const areaChanged =
sortingAreaId.value != packingId ||
(!!area && warehouseId.value != area.warehouseId)
syncSortingArea(packingId as number, respFactoryNo ?? factoryNo)
handleSortingAreaChange(
packingId as number,
respFactoryNo ?? factoryNo,
'scan',
)
if (areaChanged) {
await initOrderDetailBox('scan')
}
......@@ -1131,10 +1135,9 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
// 配货分拣 扫码切换配货区且配货完成 不提示
const boxs = pickFinished.map((item) => item.box)
console.log(type, '💼💼💼💼')
if (type === 'manual' && boxs.length > 0) {
if (props.wallType === 'sort' && !isAutoPrint.value) {
return
}
nextTick(async () => {
try {
await ElMessageBox.alert(
......@@ -1432,6 +1435,7 @@ const syncSortingArea = (
const handleSortingAreaChange = (
value: string | number,
factoryNo?: number | string,
type: 'scan' | 'manual' = 'manual',
) => {
const no = factoryNo ?? userStore.user?.factory.id
if (!no) return
......@@ -1440,7 +1444,7 @@ const handleSortingAreaChange = (
warehouseId: warehouseId.value,
sortingAreaId: sortingAreaId.value,
})
initOrderDetailBox()
initOrderDetailBox(type)
}
// 手动切换仓库
const handleWarehouseChange = (value: string | number) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment