lilei 3 vuotta sitten
vanhempi
commit
3e12050aba

+ 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)
     }
   },