Преглед изворни кода

张丁 验证时要返回callback()

zhangding пре 3 година
родитељ
комит
e376393af2
1 измењених фајлова са 3 додато и 8 уклоњено
  1. 3 8
      ui/src/views/invoice/bookingworkticket/index.vue

+ 3 - 8
ui/src/views/invoice/bookingworkticket/index.vue

@@ -449,14 +449,6 @@ export default {
   name: "Bookingworkticket",
   components: { Treeselect,AddApprove},
   data() {
-    var validatePass2 = (rule, value, callback) => {
-        if (value === ''|| value===null) {
-          callback(new Error('请至少输入一项'));
-        } else {
-         
-          callback();
-        }
-      };
     return {
       //关联票号
       associationParams:{},
@@ -663,6 +655,7 @@ export default {
         return callback();
       }
         }
+        return callback();
     }
      
     },
@@ -1025,6 +1018,7 @@ export default {
       //多重校验
        Promise.all(arr.map(this.getFormPromise)).then(res => {
         const validateResult = res.every(item => !!item);
+        console.log(validateResult)
         if (validateResult) {
        if (this.form.id != null) {
               this.form.tInvoiceWorkcontentList=this.ruleForm
@@ -1040,6 +1034,7 @@ export default {
               this.getList();
             });
           } else {
+                alert(1)
             this.form.tInvoiceWorkcontentList=this.ruleForm
             this.form.floorLocation=this.form.floorLocation.join(',')
               for(let b=0;b<this.ruleForm.length;b++){