Parcourir la source

🐞 fix(【drp-采购订单维护】): 订单类型为资产采购+传OA,货位不必填

订单类型为资产采购+传OA,目前校验为wms入库仓库必填,货位必填; 采购部反馈:订单类型为资产采购+传OA,入库后,按项目仓库统计成本,为方便做单效率,申请资产采购订单维护货位设置成非必填。 更改逻辑为【当订单类型为资产采购+传OA,wms入库仓库必填,货位不必填;】

20240716246
002390 il y a 10 mois
Parent
commit
2d6ee0d69b
1 fichiers modifiés avec 28 ajouts et 29 suppressions
  1. 28 29
      src/views/purchase/purchase-order/add/index.vue

+ 28 - 29
src/views/purchase/purchase-order/add/index.vue

@@ -140,8 +140,8 @@ export default {
 
         this.params.warehouse = "";
         this.params.warehouseName = "";
-        this.params.goodsAllocation = "";
-        this.params.goodsAllocationName = "";
+        // this.params.goodsAllocation = "";
+        // this.params.goodsAllocationName = "";
         this.params["puOrderItemList"] = this.params["puOrderItemList"].map(
           (item) => ({
             ...item,
@@ -161,7 +161,7 @@ export default {
         } else {
           this.rules.warehouseName = null;
         }
-        this.rules.goodsAllocationName = null;
+        // this.rules.goodsAllocationName = null;
 
         this.count++;
       },
@@ -237,20 +237,20 @@ export default {
             closeReason: "",
           };
 
-          try {
-            const { code, rows } = await orderApi.REFER(
-              {
-                type: "WAREHOUSE_PARAM",
-                search: this.params.warehouseName,
-                isPage: true,
-              },
-              { pageNum: 1, pageSize: 10 }
-            );
-
-            if (code == 200) {
-              this.judgeGoodsAllocation(rows[0].csFlag);
-            }
-          } catch (error) {}
+          // try {
+          //   const { code, rows } = await orderApi.REFER(
+          //     {
+          //       type: "WAREHOUSE_PARAM",
+          //       search: this.params.warehouseName,
+          //       isPage: true,
+          //     },
+          //     { pageNum: 1, pageSize: 10 }
+          //   );
+
+          //   if (code == 200) {
+          //     this.judgeGoodsAllocation(rows[0].csFlag);
+          //   }
+          // } catch (error) {}
 
           for (const key in this.params) {
             // if (Array.isArray(this.params[key])) {
@@ -455,16 +455,16 @@ export default {
         }
       });
     },
-    judgeGoodsAllocation(porp) {
-      if (porp === "Y") {
-        this.rules.goodsAllocationName = [
-          { required: true, message: "货位不能为空", trigger: "change" },
-        ];
-      } else {
-        this.rules.goodsAllocationName = null;
-      }
-      this.count++;
-    },
+    // judgeGoodsAllocation(porp) {
+    //   if (porp === "Y") {
+    //     this.rules.goodsAllocationName = [
+    //       { required: true, message: "货位不能为空", trigger: "change" },
+    //     ];
+    //   } else {
+    //     this.rules.goodsAllocationName = null;
+    //   }
+    //   this.count++;
+    // },
     // 主表参照改变之后
     async handleReferChange(val, type, source) {
       let page = { pageNum: 1, pageSize: 10 };
@@ -894,8 +894,7 @@ export default {
       this.innerColumns = prop;
     },
   },
-  created() {
-  },
+  created() {},
   mounted() {},
   updated() {
     this.$nextTick(() => {