From c8804ceb1fe2dea76f9949c5ea04423876ee2c81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 28 六月 2024 14:02:47 +0800
Subject: [PATCH] 2024-06-28

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   95 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 76 insertions(+), 19 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index c00ec97..1c3c0e4 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -221,7 +221,7 @@
         }
         reRequired.innerFunc = true
       } else {
-        shows.push('sql', 'sqlType', 'output')
+        shows.push('sql', 'sqlType', 'output', 'database')
       }
 
       if (Ot === 'required') {
@@ -299,7 +299,7 @@
         shows.push('innerFunc', 'extraParam')
         reRequired.innerFunc = true
       } else {
-        shows.push('sql', 'sqlType')
+        shows.push('sql', 'sqlType', 'database')
       }
 
       if (this.record.execSuccess === 'goback') {
@@ -349,6 +349,8 @@
       } else if (this.record.intertype === 'inner') {
         shows.push('innerFunc', 'extraParam')
         reRequired.innerFunc = true
+      } else {
+        shows.push('database')
       }
       if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
         shows.push('resetPageIndex')
@@ -384,6 +386,8 @@
       } else if (this.record.intertype === 'inner') {
         shows.push('innerFunc', 'extraParam')
         reRequired.innerFunc = true
+      } else {
+        shows.push('database')
       }
       if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
         shows.push('resetPageIndex')
@@ -439,6 +443,15 @@
         reOptions.Ot = requireOptions
       } else if (this.record.pageTemplate === 'pay') {
         reOptions.Ot = requireOptions.filter(op => op.value === 'requiredSgl')
+
+        shows.push('payMode', 'wxApp')
+        if (this.record.payMode === 'inner') {
+          reRequired.innerFunc = true
+          shows.push('innerFunc')
+        }
+        if (this.record.payMode !== 'none') {
+          shows.push('output')
+        }
       }
     } else if (openType === 'funcbutton') {
       reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
@@ -507,14 +520,31 @@
 
         shows.push('innerFunc', 'Ot', 'execSuccess', 'execError', 'urlkey')
       } else if (_funcType === 'pay') {
-        shows.push('payType', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
+        shows.push('payType', 'wxApp', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
         if (this.record.openmenu && this.record.openmenu !== 'goback') {
           shows.push('open')
         }
         reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
+        shows.push('payMode')
+        if (this.record.payMode === 'inner') {
+          reRequired.innerFunc = true
+          shows.push('innerFunc')
+        }
+        if (this.record.payMode !== 'none') {
+          shows.push('output')
+        }
       } else if (_funcType === 'refund') {
-        shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu', 'tipTitle')
+        shows.push('Ot', 'wxApp', 'execSuccess', 'execError', 'syncComponent', 'openmenu', 'tipTitle')
         reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
+
+        shows.push('payMode')
+        if (this.record.payMode === 'inner') {
+          reRequired.innerFunc = true
+          shows.push('innerFunc')
+        }
+        if (this.record.payMode !== 'none') {
+          shows.push('output')
+        }
       } else if (_funcType === 'shareLink') {
         shows.push('shortUrl', 'shareUrl', 'shareProUrl', 'shareTip')
       // } else if (_funcType === 'expPdf') {
@@ -723,6 +753,10 @@
       } else if (value === 'custom') {
         _fieldval.Ot = 'required'
       }
+      if (_fieldval.Ot === 'required' && this.record.execError === 'never') {
+        this.record.execError = 'grid'
+        _fieldval.execError = 'grid'
+      }
 
       if (this.props.type === 'card' && _fieldval.Ot === 'required') { // 鍗$墖涓棤澶氳閫夐」
         _fieldval.Ot = 'requiredSgl'
@@ -741,6 +775,9 @@
       if (appType !== 'mob' && value === 'notRequired') {
         this.record.control = ''
         _fieldval.control = ''
+      } else if (value === 'required' && this.record.execError === 'never') {
+        this.record.execError = 'grid'
+        _fieldval.execError = 'grid'
       }
     } else if (key === 'pageTemplate') {
       if (value === 'pay') {
@@ -845,22 +882,42 @@
             { max: 512, message: '鏈�澶�512涓瓧绗�' }
           )
         } else if (item.key === 'output') {
-          if (this.record.intertype === 'system' || ((this.record.intertype === 'outer' || this.record.intertype === 'custom') && this.record.callbackType === 'script')) {
-            rules = [{
-              pattern: /^@[0-9a-zA-Z_]+@?$/,
-              message: '鍙橀噺浠绗﹀紑澶达紝鍙娇鐢ㄥ瓧姣嶃�佹暟瀛椾互鍙奯'
-            }, {
-              max: 100,
-              message: '鏈�澶�100涓瓧绗︺��'
-            }]
+          if (['pop', 'prompt', 'exec'].includes(this.record.openType)) {
+            if (this.record.intertype === 'system' || ((this.record.intertype === 'outer' || this.record.intertype === 'custom') && this.record.callbackType === 'script')) {
+              rules = [{
+                pattern: /^@[0-9a-zA-Z_]+@?$/,
+                message: '鍙橀噺浠绗﹀紑澶达紝鍙娇鐢ㄥ瓧姣嶃�佹暟瀛椾互鍙奯'
+              }, {
+                max: 100,
+                message: '鏈�澶�100涓瓧绗︺��'
+              }]
+            } else {
+              rules = [{
+                pattern: /^[0-9a-zA-Z_]*$/,
+                message: '瀛楁鍙娇鐢ㄥ瓧姣嶃�佹暟瀛椾互鍙奯'
+              }, {
+                max: 100,
+                message: '鏈�澶�100涓瓧绗︺��'
+              }]
+            }
           } else {
-            rules = [{
-              pattern: /^[0-9a-zA-Z_]*$/,
-              message: '瀛楁鍙娇鐢ㄥ瓧姣嶃�佹暟瀛椾互鍙奯'
-            }, {
-              max: 100,
-              message: '鏈�澶�100涓瓧绗︺��'
-            }]
+            if (this.record.payMode === 'system') {
+              rules = [{
+                pattern: /^@[0-9a-zA-Z_]+@?$/,
+                message: '鍙橀噺浠绗﹀紑澶达紝鍙娇鐢ㄥ瓧姣嶃�佹暟瀛椾互鍙奯'
+              }, {
+                max: 100,
+                message: '鏈�澶�100涓瓧绗︺��'
+              }]
+            } else {
+              rules = [{
+                pattern: /^[0-9a-zA-Z_]*$/,
+                message: '瀛楁鍙娇鐢ㄥ瓧姣嶃�佹暟瀛椾互鍙奯'
+              }, {
+                max: 100,
+                message: '鏈�澶�100涓瓧绗︺��'
+              }]
+            }
           }
         } else {
           rules.push({ max: formRule.input.max, message: formRule.input.message })

--
Gitblit v1.8.0