From 1169276275f46a0243928266e78ac5d2bd8269c9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 一月 2024 23:13:08 +0800
Subject: [PATCH] 2024-01-15

---
 src/menu/components/form/formaction/formconfig.jsx       |   44 +++++++++++++++++++++++++++++---------------
 src/menu/components/form/formaction/actionform/index.jsx |    3 +++
 src/tabviews/zshare/actionList/normalbutton/index.jsx    |    6 ++++++
 src/utils/utils.js                                       |    2 +-
 4 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx
index abd4eb7..09c15d7 100644
--- a/src/menu/components/form/formaction/actionform/index.jsx
+++ b/src/menu/components/form/formaction/actionform/index.jsx
@@ -105,6 +105,9 @@
         shows.push('innerFunc')
       } else {
         shows.push('sql', 'sqlType')
+        if (this.record.execSuccess === 'never' && this.record.resetForms && this.record.resetForms[0]) {
+          shows.push('returnValue')
+        }
       }
       
       if (this.record.linkmenu && this.record.linkmenu !== 'goback') {
diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx
index 27c9159..1a4e306 100644
--- a/src/menu/components/form/formaction/formconfig.jsx
+++ b/src/menu/components/form/formaction/formconfig.jsx
@@ -513,6 +513,20 @@
     },
     {
       type: 'radio',
+      key: 'returnValue',
+      label: '鏇存柊琛ㄥ崟',
+      initVal: card.returnValue || 'false',
+      tooltip: '涓庨噸缃〃鍗曢厤鍚堜娇鐢紝寮�鍚椂锛屽繀椤诲湪鑷畾涔夎剼鏈腑杩斿洖鏁版嵁锛岀敤浜庢浛鎹㈠瓧娈甸泦鍜屽~鍏呰〃鍗曘��',
+      options: [{
+        value: 'false',
+        text: '绂佺敤'
+      }, {
+        value: 'true',
+        text: '鍚敤'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'reload',
       label: '涓婁竴椤�',
       initVal: card.reload || 'false',
@@ -526,20 +540,20 @@
         text: '鍒锋柊'
       }]
     },
-    {
-      type: 'radio',
-      key: 'formCache',
-      label: '琛ㄥ崟缂撳瓨',
-      initVal: card.formCache || 'false',
-      tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
-      required: false,
-      options: [{
-        value: 'false',
-        text: '涓嶆竻绌�'
-      }, {
-        value: 'clear',
-        text: '娓呯┖'
-      }]
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'formCache',
+    //   label: '琛ㄥ崟缂撳瓨',
+    //   initVal: card.formCache || 'false',
+    //   tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
+    //   required: false,
+    //   options: [{
+    //     value: 'false',
+    //     text: '涓嶆竻绌�'
+    //   }, {
+    //     value: 'clear',
+    //     text: '娓呯┖'
+    //   }]
+    // },
   ]
 }
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index f7b4abe..1a4ac29 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1124,6 +1124,12 @@
 
       if (btn.intertype === 'system') {
         params = this.getSystemParam(data, formdata)
+        if (btn.returnValue === 'true') {
+          params = params.map(item => {
+            item.script_type = 'Y'
+            return item
+          })
+        }
       } else {
         params = this.getInnerParam(data, formdata)
       }
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 52c602b..f2a7e49 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -2374,7 +2374,7 @@
       z_debug_end: select @ErrorCode='E',@retmsg='debug_end' goto aaa`
   }
 
-  if (retmsg) {
+  if (retmsg || btn.returnValue === 'true') {
     _sql += `
       aaa: if @ErrorCode!=''
       insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@`

--
Gitblit v1.8.0