lilei 3 vuotta sitten
vanhempi
commit
555e74c37e

+ 9 - 7
src/views/purchasingManagement/purchaseReturnOutSync/edit.vue

@@ -498,24 +498,26 @@ export default {
         if (!type) {
           this.resetSearchForm()
         } else {
-          this.$refs.table.refresh(true)
+          // this.$refs.table.refresh(true)
         }
       })
+    },
+    pageInit () {
+      this.getWarehouse()
+      this.getDetail(true)
+      this.$refs.chooseTable.refresh(true)
+      this.$refs.table.refresh(true)
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.$refs.chooseTable.refresh(true)
-      this.getWarehouse()
-      this.getDetail(true)
+      this.pageInit()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.$refs.chooseTable.refresh(true)
-      this.getWarehouse()
-      this.getDetail(true)
+      this.pageInit()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 7 - 6
src/views/purchasingManagement/purchaseReturnOutSync/grapEdit.vue

@@ -419,7 +419,6 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                // _this.$refs.table.refresh()
                 _this.$refs.chooseTable.refresh()
                 _this.getDetail(true)
                 _this.spinning = false
@@ -471,22 +470,24 @@ export default {
         if (!type) {
           this.resetSearchForm()
         } else {
-          this.$refs.table.refresh(true)
+          // this.$refs.table.refresh(true)
         }
       })
+    },
+    pageInit () {
+      this.getDetail(false)
+      this.$refs.chooseTable.refresh(true)
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.$refs.chooseTable.refresh(true)
-      this.getDetail(true)
+      this.pageInit()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.$refs.chooseTable.refresh(true)
-      this.getDetail(true)
+      this.pageInit()
     }
   },
   beforeRouteEnter (to, from, next) {