Bladeren bron

bug 修复

lilei 3 jaren geleden
bovenliggende
commit
34b23ce0b1

+ 8 - 6
src/views/purchasingManagement/purchaseReturnOutSync/edit.vue

@@ -387,7 +387,7 @@ export default {
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getDetail(!isEdit)
+          this.getDetail(true, true)
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
@@ -421,7 +421,7 @@ export default {
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(false)
+                _this.getDetail(true, true)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -433,7 +433,7 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(false)
+                _this.getDetail(true, true)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -493,19 +493,21 @@ export default {
       )
     },
     // 获取详情
-    getDetail (type) {
+    getDetail (type, refresh) {
       purchaseReturnDetailSn({ sn: this.$route.params.sn }).then(res => {
         this.detailData = res.data || null
         if (!type) {
           this.resetSearchForm()
         } else {
-          // this.$refs.table.refresh(true)
+          if (!refresh) {
+            this.$refs.table.refresh(true)
+          }
         }
       })
     },
     pageInit () {
       this.getWarehouse()
-      this.getDetail(true)
+      this.getDetail(true, true)
       this.$refs.chooseTable.refresh(true)
     }
   },

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

@@ -373,11 +373,7 @@ export default {
         if (res.status == 200) {
           this.$message.success(res.message)
 
-          if (isEdit) {
-            this.getDetail(false)
-          } else {
-            this.getDetail(true, true)
-          }
+          this.getDetail(true, true)
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
@@ -411,7 +407,7 @@ export default {
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(false)
+                _this.getDetail(true, true)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -423,7 +419,7 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.getDetail(false)
+                _this.getDetail(true, true)
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {