Просмотр исходного кода

fix(库存调拨): 移除库外调拨时的字段校验逻辑

liujt 7 месяцев назад
Родитель
Сommit
cd2ecb5062
1 измененных файлов с 45 добавлено и 44 удалено
  1. 45 44
      src/views/warehouseManagement/inventoryAllocation/add.vue

+ 45 - 44
src/views/warehouseManagement/inventoryAllocation/add.vue

@@ -1305,50 +1305,51 @@
             resolve();
           } else {
             // 库外调拨
-            if (!this.params.inFreightId && !this.params.outFreightId) {
-              if (!this.params.inShelvesId && !this.params.outShelvesId) {
-                if (!this.params.inCargoAreaId && !this.params.outCargoAreaId) {
-                  this.productList = [];
-                  this.searchState.hasError = true;
-                  const errorMsg = '调入库区与调出库区不能为空';
-                  this.$message.error(errorMsg);
-                  return reject(new Error(errorMsg));
-                } else if (
-                  this.params.inCargoAreaId &&
-                  this.params.outCargoAreaId
-                ) {
-                  this.getProductList();
-                  this.reload();
-                  resolve();
-                } else {
-                  this.productList = [];
-                  this.searchState.hasError = true;
-                  const errorMsg = '调入库区与调出库区必须同时填写';
-                  this.$message.error(errorMsg);
-                  return reject(new Error(errorMsg));
-                }
-              } else if (this.params.inShelvesId && this.params.outShelvesId) {
-                this.getProductList();
-                this.reload();
-                resolve();
-              } else {
-                this.productList = [];
-                this.searchState.hasError = true;
-                const errorMsg = '调入货架与调出货架必须同时填写';
-                this.$message.error(errorMsg);
-                return reject(new Error(errorMsg));
-              }
-            } else if (this.params.inFreightId && this.params.outFreightId) {
-              this.getProductList();
-              this.reload();
-              resolve();
-            } else {
-              this.productList = [];
-              this.searchState.hasError = true;
-              const errorMsg = '调入货位与调出货位必须同时填写';
-              this.$message.error(errorMsg);
-              return reject(new Error(errorMsg));
-            }
+            resolve();
+            // if (!this.params.inFreightId && !this.params.outFreightId) {
+            //   if (!this.params.inShelvesId && !this.params.outShelvesId) {
+            //     if (!this.params.inCargoAreaId && !this.params.outCargoAreaId) {
+            //       this.productList = [];
+            //       this.searchState.hasError = true;
+            //       const errorMsg = '调入库区与调出库区不能为空';
+            //       this.$message.error(errorMsg);
+            //       return reject(new Error(errorMsg));
+            //     } else if (
+            //       this.params.inCargoAreaId &&
+            //       this.params.outCargoAreaId
+            //     ) {
+            //       this.getProductList();
+            //       this.reload();
+            //       resolve();
+            //     } else {
+            //       this.productList = [];
+            //       this.searchState.hasError = true;
+            //       const errorMsg = '调入库区与调出库区必须同时填写';
+            //       this.$message.error(errorMsg);
+            //       return reject(new Error(errorMsg));
+            //     }
+            //   } else if (this.params.inShelvesId && this.params.outShelvesId) {
+            //     this.getProductList();
+            //     this.reload();
+            //     resolve();
+            //   } else {
+            //     this.productList = [];
+            //     this.searchState.hasError = true;
+            //     const errorMsg = '调入货架与调出货架必须同时填写';
+            //     this.$message.error(errorMsg);
+            //     return reject(new Error(errorMsg));
+            //   }
+            // } else if (this.params.inFreightId && this.params.outFreightId) {
+            //   this.getProductList();
+            //   this.reload();
+            //   resolve();
+            // } else {
+            //   this.productList = [];
+            //   this.searchState.hasError = true;
+            //   const errorMsg = '调入货位与调出货位必须同时填写';
+            //   this.$message.error(errorMsg);
+            //   return reject(new Error(errorMsg));
+            // }
           }
         });
       },