From a1e9b18a4dbfd21e1bf4d5cb60974ac2f0115efd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 30 五月 2025 15:18:44 +0800
Subject: [PATCH] 2025-05-30

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |  138 ++++++++++++++++++++++++++++++++++------------
 1 files changed, 102 insertions(+), 36 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index fcd5a10..427f649 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -413,7 +413,7 @@
     if (setting.supModule && !BID) {
       notification.warning({
         top: 92,
-        message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒',
+        message: setting.supModTip || dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒',
         duration: 5
       })
       return false
@@ -1533,7 +1533,7 @@
     if (setting.supModule && !BID) {
       notification.warning({
         top: 92,
-        message: window.GLOB.dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒',
+        message: setting.supModTip || window.GLOB.dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒',
         duration: 5
       })
       _resolve()
@@ -1748,11 +1748,23 @@
       record.mk_api_key = res.mk_api_key || ''
 
       if (res.status) {
-        if (res.mk_ex_invoke + '' === 'false' && params.length === 0) {
-          this.execSuccess(res)
-          _resolve()
-        } else if (res.mk_ex_invoke + '' === 'false' && params.length > 0) {
-          this.customLoopRequest(params, _resolve)
+        res.mk_ex_invoke = res.mk_ex_invoke + ''
+
+        if (res.mk_ex_invoke === 'false') {
+          if (params.length === 0) {
+            this.execSuccess(res)
+            _resolve()
+          } else {
+            this.customLoopRequest(params, _resolve)
+          }
+        } else if (res.mk_ex_invoke === 'true_inside') {
+          let data = res.mk_in_api && typeof(res.mk_in_api) === 'object' ? res.mk_in_api : {}
+
+          if (!data.hasOwnProperty('mk_api_key')) {
+            data.mk_api_key = record.mk_api_key
+          }
+
+          this.customCallbackRequest(params, data, record, _resolve)
         } else {
           if (res.mk_ex_data) { // 鏁版嵁鍒嗘壒鎵ц
             if (Array.isArray(res.mk_ex_data) && res.mk_ex_data.length > 0) {
@@ -2464,7 +2476,7 @@
    * @description 澶栭儴璇锋眰寰幆鎵ц
    */
   outerLoopRequest = (params, _resolve) => {
-    const { setting, btn } = this.props
+    const { setting, btn, BID } = this.props
 
     let param = params.shift()
 
@@ -2493,11 +2505,29 @@
 
     Api.genericInterface(param, btn.$innerScript, 'inner').then(res => {
       if (res.status) {
-        if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length === 0) {
-          this.execSuccess(res)
-          _resolve()
-        } else if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length > 0) {
-          this.outerLoopRequest(params, _resolve)
+        res.mk_ex_invoke = res.mk_ex_invoke + ''
+
+        if (res.mk_ex_invoke === 'false') {
+          if (params.length === 0) {
+            this.execSuccess(res)
+            _resolve()
+          } else {
+            this.outerLoopRequest(params, _resolve)
+          }
+        } else if (res.mk_ex_invoke === 'true_inside') {
+          let data = res.mk_in_api && typeof(res.mk_in_api) === 'object' ? res.mk_in_api : {}
+
+          if (!data.hasOwnProperty('mk_api_key')) {
+            data.mk_api_key = res.mk_api_key || ''
+          }
+
+          // 浣跨敤澶勭悊鍚庣殑鏁版嵁璋冪敤澶栭儴鎺ュ彛
+          let keys = Object.keys(data) // 鎻愪氦澶栭儴鎺ュ彛鍓嶏紝娣诲姞BID
+          if (BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
+            data.BID = BID
+          }
+
+          this.outerCallbackRequest(params, data, record, {}, _resolve)
         } else {
           delete res.mk_ex_invoke
           delete res.ErrCode
@@ -2507,8 +2537,8 @@
 
           // 浣跨敤澶勭悊鍚庣殑鏁版嵁璋冪敤澶栭儴鎺ュ彛
           let keys = Object.keys(res) // 鎻愪氦澶栭儴鎺ュ彛鍓嶏紝娣诲姞BID
-          if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
-            res.BID = this.props.BID
+          if (BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
+            res.BID = BID
           }
 
           if (res.mk_api_key) {
@@ -3000,8 +3030,10 @@
       tabId = btn.refreshTab[btn.refreshTab.length - 1]
     }
 
-    if (window.backend && btn.outerFunc && ['bd_workers_create_user_sso', 's_susers_del', 's_susers_add', 's_susers_update', 's_susers_start', 's_susers_admin'].includes(btn.outerFunc)) {
-      this.clearBackSqlCache()
+    if (window.backend && btn.outerFunc && ['bd_workers_create_user_sso', 's_susers_del', 's_susers_add', 's_susers_update', 's_susers_start', 's_susers_admin'].includes(btn.outerFunc.toLowerCase())) {
+      setTimeout(() => {
+        this.clearBackSqlCache()
+      }, 300)
     }
 
     if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0 && sign !== '@no_target_menu@') {
@@ -3041,15 +3073,30 @@
     
     if (btn.syncComponentId) {
       if (btn.syncComponentId === 'multiComponent') {
-        btn.syncComponentIds.forEach((id, i) => {
-          setTimeout(() => {
-            if (/\$focus/.test(id)) {
-              MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
-            } else {
-              MKEmitter.emit('reloadData', id)
-            }
-          }, 20 * i)
-        })
+        if (btn.syncDelay) {
+          this.delayTimer && clearTimeout(this.delayTimer)
+          this.delayTimer = setTimeout(() => {
+            btn.syncComponentIds.forEach((id, i) => {
+              setTimeout(() => {
+                if (/\$focus/.test(id)) {
+                  MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+                } else {
+                  MKEmitter.emit('reloadData', id)
+                }
+              }, 20 * i)
+            })
+          }, btn.syncDelay)
+        } else {
+          btn.syncComponentIds.forEach((id, i) => {
+            setTimeout(() => {
+              if (/\$focus/.test(id)) {
+                MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+              } else {
+                MKEmitter.emit('reloadData', id)
+              }
+            }, 20 * i)
+          })
+        }
       } else if (/\$focus/.test(btn.syncComponentId)) {
         MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
       } else {
@@ -3790,7 +3837,11 @@
       loadingTotal: '',
     })
 
-    if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
+    if (window.CACHE.errFocusId && (btnconfig || btn.OpenType === 'formSubmit')) {
+      MKEmitter.emit('mkFC', 'focus', window.CACHE.errFocusId)
+
+      window.CACHE.errFocusId = ''
+    } else if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
       MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus)
     }
 
@@ -3812,15 +3863,30 @@
 
       if (btn.syncComponentId) {
         if (btn.syncComponentId === 'multiComponent') {
-          btn.syncComponentIds.forEach((id, i) => {
-            setTimeout(() => {
-              if (/\$focus/.test(id)) {
-                MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
-              } else {
-                MKEmitter.emit('reloadData', id)
-              }
-            }, 20 * i)
-          })
+          if (btn.syncDelay) {
+            this.delayTimer && clearTimeout(this.delayTimer)
+            this.delayTimer = setTimeout(() => {
+              btn.syncComponentIds.forEach((id, i) => {
+                setTimeout(() => {
+                  if (/\$focus/.test(id)) {
+                    MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+                  } else {
+                    MKEmitter.emit('reloadData', id)
+                  }
+                }, 20 * i)
+              })
+            }, btn.syncDelay)
+          } else {
+            btn.syncComponentIds.forEach((id, i) => {
+              setTimeout(() => {
+                if (/\$focus/.test(id)) {
+                  MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
+                } else {
+                  MKEmitter.emit('reloadData', id)
+                }
+              }, 20 * i)
+            })
+          }
         } else if (/\$focus/.test(btn.syncComponentId)) {
           MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
         } else {

--
Gitblit v1.8.0