lilei 3 years ago
parent
commit
071d3c64e1

+ 4 - 2
src/views/purchasingManagement/purchaseReturnOutSync/edit.vue

@@ -497,6 +497,8 @@ export default {
         this.detailData = res.data || null
         if (!type) {
           this.resetSearchForm()
+        } else {
+          this.$refs.table.refresh(true)
         }
       })
     }
@@ -505,7 +507,7 @@ export default {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.$refs.chooseTable.refresh(true)
       this.getWarehouse()
-      this.getDetail()
+      this.getDetail(true)
     }
   },
   activated () {
@@ -513,7 +515,7 @@ export default {
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
       this.$refs.chooseTable.refresh(true)
       this.getWarehouse()
-      this.getDetail()
+      this.getDetail(true)
     }
   },
   beforeRouteEnter (to, from, next) {

+ 9 - 4
src/views/purchasingManagement/purchaseReturnOutSync/grapEdit.vue

@@ -421,6 +421,7 @@ export default {
                 _this.$message.success(res.message)
                 // _this.$refs.table.refresh()
                 _this.$refs.chooseTable.refresh()
+                _this.getDetail(true)
                 _this.spinning = false
               } else {
                 _this.spinning = false
@@ -464,24 +465,28 @@ export default {
       }
     },
     // 获取详情
-    getDetail () {
+    getDetail (type) {
       purchaseReturnDetailSn({ sn: this.$route.params.sn }).then(res => {
         this.detailData = res.data || null
-        this.resetSearchForm()
+        if (!type) {
+          this.resetSearchForm()
+        } else {
+          this.$refs.table.refresh(true)
+        }
       })
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.$refs.chooseTable.refresh(true)
-      this.getDetail()
+      this.getDetail(true)
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
       this.$refs.chooseTable.refresh(true)
-      this.getDetail()
+      this.getDetail(true)
     }
   },
   beforeRouteEnter (to, from, next) {