From 486717570e2fc4b81b6e9db511cd445447fca333 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 18 八月 2023 22:58:08 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/custom/components/module/voucher/index.jsx |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx
index f11d8c0..e42bad6 100644
--- a/src/tabviews/custom/components/module/voucher/index.jsx
+++ b/src/tabviews/custom/components/module/voucher/index.jsx
@@ -689,6 +689,15 @@
           saved: true
         })
       }
+
+      let tabId = ''
+      if (config.wrap.linkmenu && config.wrap.linkmenu.length > 0) {
+        tabId = config.wrap.linkmenu[config.wrap.linkmenu.length - 1]
+      }
+
+      if (tabId) {
+        MKEmitter.emit('reloadMenuView', tabId, 'table')
+      }
     })
   }
 
@@ -781,7 +790,7 @@
   }
 
   voucherTempSave = (list, name, typeChar, typeName) => {
-    const { type, BID, data, book, title, orgcode, orgname, tempTypeClass, tempTypeName } = this.state
+    const { type, config, BID, data, book, title, orgcode, orgname, tempTypeClass, tempTypeName } = this.state
 
     if (!book) {
       notification.warning({
@@ -933,6 +942,15 @@
           data: fromJS(list).toJS(),
         })
       }
+
+      let tabId = ''
+      if (config.wrap.linkmenu && config.wrap.linkmenu.length > 0) {
+        tabId = config.wrap.linkmenu[config.wrap.linkmenu.length - 1]
+      }
+
+      if (tabId) {
+        MKEmitter.emit('reloadMenuView', tabId, 'table')
+      }
     })
   }
 
@@ -1048,27 +1066,16 @@
   triggerclose = () => {
     const { config, status } = this.state
 
-    let tabId = ''
-    if (config.wrap.linkmenu && config.wrap.linkmenu.length > 0) {
-      tabId = config.wrap.linkmenu[config.wrap.linkmenu.length - 1]
-    }
-
     if (status === 'change') {
       confirm({
         content: '鍐呭宸插彉鏇达紝纭畾瑕佸叧闂悧锛�',
         onOk() {
           MKEmitter.emit('closeTabView', config.$pageId)
-          if (tabId) {
-            MKEmitter.emit('reloadMenuView', tabId, 'table')
-          }
         },
         onCancel() {}
       })
     } else {
       MKEmitter.emit('closeTabView', config.$pageId)
-      if (tabId) {
-        MKEmitter.emit('reloadMenuView', tabId, 'table')
-      }
     }
   }
 

--
Gitblit v1.8.0