diff --git a/pages/warehouse/warehouse.vue b/pages/warehouse/warehouse.vue index 900b1a9..8365f3a 100644 --- a/pages/warehouse/warehouse.vue +++ b/pages/warehouse/warehouse.vue @@ -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