lilei 2 år sedan
förälder
incheckning
022e7daeba

+ 3 - 9
src/views/financialManagement/financialCollection/detail.vue

@@ -49,7 +49,6 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :defaultLoadData="false"
           :showPagination="false"
           bordered>
           <template slot="expandedRowRender" slot-scope="record">
@@ -148,19 +147,14 @@ export default {
       return ret.toFixed(2)
     },
     //  财务单基础详情
-    getDetail (type) {
+    getDetail () {
       this.spinning = true
       this.disabled = true
       financeBookFindBySn({ bookSn: this.$route.params.sn || this.bookSn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
-          if (!type) {
-            // 刷新明细列表
-            this.$refs.table.refresh()
-          } else {
-            this.spinning = false
-            this.disabled = false
-          }
+          this.spinning = false
+          this.disabled = false
         }
       })
     },

+ 4 - 1
src/views/financialManagement/financialCollection/edit.vue

@@ -282,7 +282,7 @@ export default {
     },
     pageInit () {
       if (this.$route.params.sn) { //  编辑页
-        this.getDetail()
+        this.getDetail(false)
       }
     }
   },
@@ -295,6 +295,9 @@ export default {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
       this.pageInit()
+    } else {
+      // 刷新明细列表
+      this.$refs.table.refresh()
     }
   },
   beforeRouteEnter (to, from, next) {