Prechádzať zdrojové kódy

采购订单-WMS仓库必填条件增加

002390 1 rok pred
rodič
commit
4c7be06c4b

+ 4 - 2
src/views/purchase/purchase-order/add/index.vue

@@ -70,8 +70,9 @@ export default {
     "params.billType":{
       handler(nVal, oVal){
 
-        if((nVal === '21-Cxx-02' || nVal === '21-Cxx-04'  || nVal === '21-Cxx-10' || nVal === '21-Cxx-14')){
-
+        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
+        
+        if(billList.find(item => item === nVal)){
           this.rules.warehouseName = [
             { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
           ];
@@ -83,6 +84,7 @@ export default {
           this.rules.warehouseName = null;
           this.rules.goodsAllocationName = null;
         }
+
         this.count++;
       }
     }