Commit 2003ab20 by wusiyi

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

parent 88b48449
...@@ -943,7 +943,11 @@ const getPackingData = async (code: string) => { ...@@ -943,7 +943,11 @@ const getPackingData = async (code: string) => {
const areaChanged = const areaChanged =
sortingAreaId.value != packingId || sortingAreaId.value != packingId ||
(!!area && warehouseId.value != area.warehouseId) (!!area && warehouseId.value != area.warehouseId)
syncSortingArea(packingId as number, respFactoryNo ?? factoryNo) handleSortingAreaChange(
packingId as number,
respFactoryNo ?? factoryNo,
'scan',
)
if (areaChanged) { if (areaChanged) {
await initOrderDetailBox('scan') await initOrderDetailBox('scan')
} }
...@@ -1131,10 +1135,9 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => { ...@@ -1131,10 +1135,9 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
// 配货分拣 扫码切换配货区且配货完成 不提示 // 配货分拣 扫码切换配货区且配货完成 不提示
const boxs = pickFinished.map((item) => item.box) const boxs = pickFinished.map((item) => item.box)
console.log(type, '💼💼💼💼')
if (type === 'manual' && boxs.length > 0) { if (type === 'manual' && boxs.length > 0) {
if (props.wallType === 'sort' && !isAutoPrint.value) {
return
}
nextTick(async () => { nextTick(async () => {
try { try {
await ElMessageBox.alert( await ElMessageBox.alert(
...@@ -1432,6 +1435,7 @@ const syncSortingArea = ( ...@@ -1432,6 +1435,7 @@ const syncSortingArea = (
const handleSortingAreaChange = ( const handleSortingAreaChange = (
value: string | number, value: string | number,
factoryNo?: number | string, factoryNo?: number | string,
type: 'scan' | 'manual' = 'manual',
) => { ) => {
const no = factoryNo ?? userStore.user?.factory.id const no = factoryNo ?? userStore.user?.factory.id
if (!no) return if (!no) return
...@@ -1440,7 +1444,7 @@ const handleSortingAreaChange = ( ...@@ -1440,7 +1444,7 @@ const handleSortingAreaChange = (
warehouseId: warehouseId.value, warehouseId: warehouseId.value,
sortingAreaId: sortingAreaId.value, sortingAreaId: sortingAreaId.value,
}) })
initOrderDetailBox() initOrderDetailBox(type)
} }
// 手动切换仓库 // 手动切换仓库
const handleWarehouseChange = (value: string | number) => { 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