From 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 11 十月 2024 17:34:25 +0800
Subject: [PATCH] 2024-10-11

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |  109 +++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 83 insertions(+), 26 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 3f88b64..dcf94bf 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -18,8 +18,8 @@
   pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'],
   prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'],
   exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'],
-  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'],
-  excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'],
+  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden', 'refreshTab'],
+  excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden', 'refreshTab'],
   popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'],
   tab: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden', 'openTab'],
   innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'],
@@ -221,7 +221,7 @@
         }
         reRequired.innerFunc = true
       } else {
-        shows.push('sql', 'sqlType', 'output')
+        shows.push('sql', 'sqlType', 'output', 'database')
       }
 
       if (Ot === 'required') {
@@ -233,7 +233,7 @@
       if (this.record.openmenu && this.record.openmenu !== 'goback') {
         shows.push('open')
       }
-      if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
+      if (['grid'].includes(this.record.execSuccess) || ['grid'].includes(this.record.execError)) {
         shows.push('resetPageIndex')
       }
 
@@ -299,13 +299,13 @@
         shows.push('innerFunc', 'extraParam')
         reRequired.innerFunc = true
       } else {
-        shows.push('sql', 'sqlType')
+        shows.push('sql', 'sqlType', 'database')
       }
 
       if (this.record.execSuccess === 'goback') {
         shows.push('reload')
       }
-      if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
+      if (['grid'].includes(this.record.execSuccess) || ['grid'].includes(this.record.execError)) {
         shows.push('resetPageIndex')
       }
 
@@ -349,8 +349,10 @@
       } 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') {
+      if (['grid'].includes(this.record.execSuccess) || ['grid'].includes(this.record.execError)) {
         shows.push('resetPageIndex')
       }
     } else if (openType === 'excelOut') {
@@ -384,8 +386,10 @@
       } 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') {
+      if (['grid'].includes(this.record.execSuccess) || ['grid'].includes(this.record.execError)) {
         shows.push('resetPageIndex')
       }
       if (this.record.Ot !== 'notRequired' && appType === 'mob') {
@@ -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', 'wxMerch')
+        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')
@@ -472,14 +485,16 @@
           shows.push('innerFunc', 'extraParam')
           reRequired.innerFunc = true
         }
-        if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
+        if (['grid'].includes(this.record.execSuccess) || ['grid'].includes(this.record.execError)) {
           shows.push('resetPageIndex')
         }
         if (this.record.execMode === 'pop' || this.record.execMode === 'prompt') {
           shows.push('position')
         }
       } else if (_funcType === 'mkBinding' || _funcType === 'mkUnBinding') {
-        shows.push('execSuccess', 'execError')
+        shows.push('execSuccess', 'execError', 'tipTitle')
+      } else if (_funcType === 'mkUnsubscribe' || _funcType === 'reAuth') {
+        shows.push('tipTitle')
       } else if (_funcType === 'closetab') {
         shows.push('refreshTab')
       } else if (_funcType === 'scan') {
@@ -507,16 +522,38 @@
 
         shows.push('innerFunc', 'Ot', 'execSuccess', 'execError', 'urlkey')
       } else if (_funcType === 'pay') {
-        shows.push('payType', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
+        shows.push('payType', 'wxApp', 'wxMerch', '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')
         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 === 'openLocation') {
+        shows.push('Ot')
+        if (Ot === 'requiredSgl') {
+          shows.push('nameField', 'addressField')
+        }
       // } else if (_funcType === 'expPdf') {
       //   shows.push('exportType')
       }
@@ -852,22 +889,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