Sfoglia il codice sorgente

fix(库存调拨): 添加调出和调入仓库的必填校验

liujt 6 mesi fa
parent
commit
b8f7ef1274

+ 8 - 2
src/views/warehouseManagement/inventoryAllocation/add.vue

@@ -1462,8 +1462,8 @@
                   targetGoodsAllocationName: item.targetGoodsAllocationName,
                   targetGoodsShelfId: item.targetGoodsShelfId,
                   targetGoodsShelfName: item.targetGoodsShelfName,
-                  targetWarehouseId: item.targetWarehouseId,
-                  targetWarehouseName: item.targetWarehouseName,
+                  targetWarehouseId: item.targetWarehouseId || this.params.inWarehouseId,
+                  targetWarehouseName: item.targetWarehouseName || this.params.inWarehouseName,
                   targetFactoriesId: this.params.targetFactoriesId,
                 };
               }),
@@ -1586,6 +1586,12 @@
         this.inWarehouseList = data;
       },
       async merge() {
+        if (!this.params.outWarehouseId) {
+          return this.$message.error('请先选择调出仓库');
+        }
+        if (!this.params.inWarehouseId) {
+          return this.$message.error('请先选择调入仓库');
+        }
         if (this.selection.length > 0) {
           console.log(this.selection);
           console.log(this.selectionIds);