lilei преди 3 години
родител
ревизия
3e12050aba
променени са 1 файла, в които са добавени 11 реда и са изтрити 4 реда
  1. 11 4
      src/views/purchasingManagement/purchaseReturnOutSync/grapEdit.vue

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

@@ -373,7 +373,12 @@ export default {
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.getDetail(!isEdit)
+
+          if (isEdit) {
+            this.getDetail(false)
+          } else {
+            this.getDetail(true, true)
+          }
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
@@ -464,18 +469,20 @@ 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.getDetail(false)
+      this.getDetail(true)
       this.$refs.chooseTable.refresh(true)
     }
   },