Commit c018e910 by wusiyi

fix: 修复配货打单/配货分拣多次弹框导致卡死问题 #1001798

parent f8ba634d
......@@ -668,6 +668,7 @@ watch(
const podBoxIndex = computed(() => orderStore.podBoxIndex)
let renderLock = false
let pickFinishedAlertToken = 0
const renderItemBox = (bool: boolean) => {
if (
......@@ -1178,6 +1179,10 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
// 切换箱子至验货完成的箱子
boxChange.value = true
boxIndex.value = boxs[0] as number
const token = ++pickFinishedAlertToken
if (token > 1) {
ElMessageBox.close()
}
try {
await ElMessageBox.alert(
`检测到${boxs.join(',')}号箱验货完成,请及时处理`,
......@@ -1186,8 +1191,10 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
confirmButtonText: '确定',
},
)
if (token !== pickFinishedAlertToken) return
productionOrderRef.value.focus()
} catch (error) {
if (token !== pickFinishedAlertToken) return
productionOrderRef.value.focus()
console.error(error)
}
......
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