From db8bd77ac3efba767d44186a77aef3cd6f9b9d6e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 09 十二月 2024 15:38:57 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   32 ++++++++++++++++++++++++--------
 src/utils/utils-custom.js                             |    8 ++++++++
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 87f9925..1128b97 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -894,6 +894,13 @@
       }
     })
 
+    if (btn.verify && btn.verify.printEnable === 'true' && !btn.output && !ex.reps.includes('ID') && values.id) {
+      exps.push({
+        key: 'ID',
+        value: values.id
+      })
+    }
+
     if (process && btn.verify.workFlow === 'true') {
       let flow = window.GLOB.UserCacheMap.get(btn.$flowId)
       let node = null
@@ -1606,7 +1613,7 @@
             setTimeout(() => {
               Api.genericInterface(param).then(res => {
                 if (res.status) {
-                  this.triggerNote(res, param.ID) // 娑堟伅
+                  this.triggerNote(res, param) // 娑堟伅
                 }
                 resolve(res)
               }, (error) => {
@@ -1984,7 +1991,7 @@
 
     Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => {
       if (res.status) {
-        this.triggerNote(res, param.ID) // 娑堟伅
+        this.triggerNote(res, param) // 娑堟伅
 
         if (params.length === 0) {
           this.execSuccess(res)
@@ -2331,7 +2338,7 @@
 
     Api.genericInterface(param).then(res => {
       if (res.status) {
-        this.triggerNote(res, param.ID) // 娑堟伅
+        this.triggerNote(res, param) // 娑堟伅
 
         if (params.length === 0) {
           this.execSuccess(res)
@@ -2365,7 +2372,7 @@
 
     Api.genericInterface(param).then(res => {
       if (res.status) {
-        this.triggerNote(res, param.ID) // 娑堟伅
+        this.triggerNote(res, param) // 娑堟伅
 
         if (params.length === 0) {
           this.execSuccess(res)
@@ -2389,7 +2396,7 @@
             return new Promise(resolve => {
               Api.genericInterface(unCheckParam).then(result => {
                 if (result.status) {
-                  that.triggerNote(result, param.ID) // 娑堟伅
+                  that.triggerNote(result, param) // 娑堟伅
           
                   if (params.length === 0) {
                     that.execSuccess(result)
@@ -2646,7 +2653,7 @@
 
     Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => {
       if (res.status) {
-        this.triggerNote(res, param.ID) // 娑堟伅
+        this.triggerNote(res, param) // 娑堟伅
 
         // 涓�娆¤姹傛垚鍔燂紝杩涜涓嬩竴椤硅姹�
         if (params.length === 0) {
@@ -3074,7 +3081,7 @@
     })
   }
 
-  triggerNote = (res, ID) => {
+  triggerNote = (res, param) => {
     const { btn } = this.props
 
     if (!btn.verify) return
@@ -3086,7 +3093,16 @@
     }
 
     if (btn.verify.printEnable === 'true') {
-      this.billPrint(id || ID)
+      let _id = id || param.ID
+
+      if (!_id && param.data && param.data[0] && param.data[0].exps) {
+        param.data[0].exps.forEach(cell => {
+          if (cell.key === 'ID') {
+            _id = cell.value
+          }
+        })
+      }
+      this.billPrint(_id)
     }
 
     if (!id) return
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 0164b7c..188585a 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -3089,6 +3089,13 @@
       item.$menuname = (config.MenuName || '') + label + '-' + (item.name || '')
 
       if (item.type === 'tabs') {
+        if (config.Template === 'BaseTable') {
+          item.subtabs.forEach(tab => {
+            if (tab.permission !== 'true' && tab.components[0] && tab.components[0].wrap) {
+              tab.components[0].wrap.permission = 'false'
+            }
+          })
+        }
         item.subtabs.forEach(tab => {
           let _mainSearch = mainSearch || []
 
@@ -3099,6 +3106,7 @@
               _mainSearch = com.search || []
             })
           }
+
           filterComponent(tab.components, _mainSearch, label, ispop)
         })
       } else if (item.type === 'group') {

--
Gitblit v1.8.0