Browse Source

fix: 核查确定后转为详情

梦辉 3 tháng trước cách đây
mục cha
commit
e56d41897f

+ 11 - 4
src/subPages/pages/commitment/commitmentDetail/components/IndicatorComponents.vue

@@ -32,13 +32,19 @@ export default {
       },
       immediate: true,
       deep: true
-    }
-  },
-  beforeDestroy() {
-    this.formStatesInitFlag = false
+    },
+    "$route.query.uuid": {
+        handler(value) {
+          if(value) {
+            this.formStatesInitFlag = false
+          }
+        },
+        deep: true
+      }
   },
   data() {
     return {
+      //表单状态初始化标志
       formStatesInitFlag: false,
       formStates: {},
       checkResultColumns: [
@@ -93,6 +99,7 @@ export default {
       ]).then(res => {
         if (res.code === 0) {
           this.$toast('核查成功')
+          window.location.reload()
         }
       })
     },

+ 6 - 3
src/subPages/pages/commitment/commitmentDetail/index.vue

@@ -57,7 +57,9 @@ export default {
   },
   methods: {
     handleClose() {
-      window.history.go(-1)
+      this.$router.push({
+        path:"pages/subPages/pages/commitment/home/index"
+      })
     },
     handleDownPdf() {
      if(!this.templateJson.attmentId){
@@ -94,11 +96,12 @@ export default {
           ...this.batchCheckForm
         })
       })
-      editVerifyTask(result).then(res => {
+      (result).then( async res => {
         if (res.code === 0) {
           this.$toast('核查成功')
           this.actionSheetShow = false
-          this.$store.dispatch('template/getPromiseDetail', this.$route.query.uuid)
+          await this.$store.dispatch('template/getPromiseDetail', this.$route.query.uuid)
+          window.location.reload()
         }
       })
     }