fix:warehouse页面检查pendingProductList,有待入库时禁止切换

This commit is contained in:
ShenQiLun 2026-06-29 11:36:08 +08:00
parent 2a4078b579
commit bee31382e7

View File

@ -229,6 +229,12 @@ export default {
},
selectWarehouse(item) {
//
var pendingList = uni.getStorageSync('pendingProductList') || []
if (pendingList.length > 0) {
uni.showToast({ title: '已有待入库商品,请先提交入库再切换仓库', icon: 'none' })
return
}
this.selectedWarehouse = item
this.loadLocationList(item.id, this.searchKeyword)
},
@ -261,6 +267,12 @@ export default {
},
selectLocation(item) {
//
var pendingList = uni.getStorageSync('pendingProductList') || []
if (pendingList.length > 0) {
uni.showToast({ title: '已有待入库商品,请先提交入库再切换货位', icon: 'none' })
return
}
const data = {
warehouseId: this.selectedWarehouse.id,
warehouseName: this.selectedWarehouse.name,
@ -325,6 +337,13 @@ export default {
this.showScanDialog = false
if (!this.scanResult) return
//
var pendingList = uni.getStorageSync('pendingProductList') || []
if (pendingList.length > 0) {
uni.showToast({ title: '已有待入库商品,请先提交入库再切换货位', icon: 'none' })
return
}
const whCode = this.scanWhCode
const locCode = this.scanLocCode