Browse Source

暂存不验证

liusungtsun 1 year ago
parent
commit
de35d97808
1 changed files with 26 additions and 11 deletions
  1. 26 11
      src/views/GATHER/index.vue

+ 26 - 11
src/views/GATHER/index.vue

@@ -1519,19 +1519,34 @@ export default {
     submitForm(type,is) {
       // 验证表单
       let p = [];
-      p = this.form.feeLists.map((item, index) => {
-        return new Promise((resolve, reject) => {
-          this.$refs["form" + item.normfeeId][0].validate((valid) => {
-            // this.$refs["form" + index].validate((valid) => {
-            if (valid) {
-              resolve(); //完成态
-            } else {
-              reject(); //已失败
-            }
+      if(type == 'draft') {
+        this.form.collStatus = 2;
+        msg = "操作成功";
+        addGATHER(this.form).then((response) => {
+              if (response.code == 200) {
+                this.$modal.msgSuccess(msg);
+                this.getList();
+                this.open = false;
+                this.openDetail = false;
+                compute(this.form).then((response) => {});
+              }
+            });
+        return
+      }else {
+        p = this.form.feeLists.map((item, index) => {
+          return new Promise((resolve, reject) => {
+            this.$refs["form" + item.normfeeId][0].validate((valid) => {
+              // this.$refs["form" + index].validate((valid) => {
+              if (valid) {
+                resolve(); //完成态
+              } else {
+                reject(); //已失败
+              }
+            });
           });
         });
-      });
-
+      }
+      
       let msg = "";
       Promise.all(p)
         .then(() => {