|
@@ -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(() => {
|