扫码货位:await货位接口返回后再匹配,移除setTimeout

This commit is contained in:
97694732@qq.com 2026-06-04 17:20:13 +08:00
parent 3cbcd6b834
commit f72aed2aee

View File

@ -1447,7 +1447,7 @@ export default {
this.popupSelectedWh = wh this.popupSelectedWh = wh
this.popupSelectedLoc = null this.popupSelectedLoc = null
this.popupLocationSearch = '' this.popupLocationSearch = ''
this.loadPopupLocations(wh.id) return this.loadPopupLocations(wh.id)
} }
}, },
@ -1549,10 +1549,9 @@ export default {
return code === search || name === search || code.includes(search) return code === search || name === search || code.includes(search)
}) })
if (whIdx !== -1) { if (whIdx !== -1) {
// //
this.selectPopupWarehouse(whIdx) await this.selectPopupWarehouse(whIdx)
// //
setTimeout(() => {
const matchedLoc = this.popupAllLocationList.find(l => { const matchedLoc = this.popupAllLocationList.find(l => {
const code = (l.code || '').toLowerCase() const code = (l.code || '').toLowerCase()
const name = (l.name || '').toLowerCase() const name = (l.name || '').toLowerCase()
@ -1568,7 +1567,6 @@ export default {
} else { } else {
uni.showToast({ title: '已切换仓库' + whCode + ',但未找到货位' + locCode, icon: 'none' }) uni.showToast({ title: '已切换仓库' + whCode + ',但未找到货位' + locCode, icon: 'none' })
} }
}, 500)
return return
} }
} }