Bläddra i källkod

公装主管任务

zhujindu 7 månader sedan
förälder
incheckning
67abaf6e47
2 ändrade filer med 25 tillägg och 13 borttagningar
  1. 11 5
      src/views/week/VisitSummaryAdd.vue
  2. 14 8
      src/views/week/VisitSummaryDetail.vue

+ 11 - 5
src/views/week/VisitSummaryAdd.vue

@@ -418,11 +418,17 @@ export default {
         this.timer = setTimeout(() => {
           this.flagclick = true;
         }, 2000);
-        insertCustomAnswer(this.collectionItemList).then((res) => {
-          if (res.code == 200) {
-            this.$router.go(-1);
-          }
-        });
+        insertCustomAnswer(this.collectionItemList)
+          .then((res) => {
+            if (res.code == 200) {
+              this.$router.go(-1);
+            } else {
+              this.$toast(err.msg);
+            }
+          })
+          .catch((err) => {
+            this.$toast(err.msg);
+          });
       }
     },
     getReportInfo() {

+ 14 - 8
src/views/week/VisitSummaryDetail.vue

@@ -217,14 +217,20 @@ export default {
       writeAgainCustomAnswer({
         userSummaryId: this.$route.query.userSummaryId,
         customItemList: customItemList,
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$toast('操作成功!');
-          this.$router.replace({
-            path: '/VisitSummary',
-          });
-        }
-      });
+      })
+        .then((res) => {
+          if (res.code == 200) {
+            this.$toast('操作成功!');
+            this.$router.replace({
+              path: '/VisitSummary',
+            });
+          } else {
+            this.$toast(err.msg);
+          }
+        })
+        .catch((err) => {
+          this.$toast(err.msg);
+        });
     },
   },
 };