浏览代码

采购订单-编辑-货位与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) {