소스 검색

采购订单-编辑-货位与wms必填校验

002390 1 년 전
부모
커밋
24cbec0507
1개의 변경된 파일19개의 추가작업 그리고 0개의 파일을 삭제
  1. 19 0
      src/views/purchase/purchase-order/edit/index.vue

+ 19 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -56,6 +56,25 @@ export default {
       deep: true,
       immediate: true
     },
+    "params.billType":{
+      handler(nVal, oVal){
+
+        if((nVal === '21-Cxx-02' || nVal === '21-Cxx-04'  || nVal === '21-Cxx-10')){
+
+          this.rules.warehouseName = [
+            { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
+          ];
+
+          this.rules.goodsAllocationName = [
+            { required: true, message: "货位不能为空", trigger: "change" },
+          ];
+        }else{
+          this.rules.warehouseName = null;
+          this.rules.goodsAllocationName = null;
+        }
+        this.count++;
+      }
+    },
   },
   methods: {
     setVisible(prop) {