From 9c6795fd3c44e46cf3955fbfd8f8eeca23acb7a9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 08 十月 2022 00:31:51 +0800
Subject: [PATCH] 2022-10-08

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   46 +++++++++++++++++++++++++++++++++++++---------
 1 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index a92b985..eb99135 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -178,7 +178,7 @@
         reReadonly.interface = false
         reRequired.interface = true
       } else if (intertype === 'outer') {
-        shows.push('procMode', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackType', 'output')
+        shows.push('procMode', 'sysInterface', 'interface', 'outerFunc', 'callbackType', 'output')
         if (this.record.procMode === 'system') {
           shows.push('sql', 'sqlType')
         } else if (this.record.procMode === 'inner') {
@@ -194,6 +194,8 @@
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
+
+          shows.push('proInterface')
         } else {
           reReadonly.interface = true
           reRequired.interface = false
@@ -234,14 +236,16 @@
 
       if (this.record.formType === 'switch') {
         shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText')
-      } else {
+      } else if (this.record.formType === 'radio') {
         shows.push('field', 'openVal', 'closeVal')
+      } else {
+        shows.push('field')
       }
 
       reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom')
 
       if (intertype === 'outer') {
-        shows.push('procMode', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackType')
+        shows.push('procMode', 'sysInterface', 'interface', 'outerFunc', 'callbackType')
         if (this.record.procMode === 'system') {
           shows.push('sql', 'sqlType')
         } else if (this.record.procMode === 'inner') {
@@ -257,6 +261,8 @@
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
+
+          shows.push('proInterface')
         } else {
           reReadonly.interface = true
           reRequired.interface = false
@@ -288,13 +294,15 @@
       reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
 
       if (this.record.intertype === 'outer') {
-        shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
+        shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
         reRequired.innerFunc = false
         reRequired.callbackFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
+
+          shows.push('proInterface')
         } else {
           reReadonly.interface = true
           reRequired.interface = false
@@ -310,12 +318,14 @@
       reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
 
       if (this.record.intertype === 'outer') {
-        shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc')
+        shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc')
         reRequired.innerFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
+
+          shows.push('proInterface')
         } else {
           reReadonly.interface = true
           reRequired.interface = false
@@ -370,13 +380,15 @@
       if (_funcType === 'print') {
         shows.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError')
         if (this.record.intertype === 'outer') {
-          shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
+          shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc')
           reRequired.innerFunc = false
           reRequired.callbackFunc = false
 
           if (this.record.sysInterface === 'false') {
             reReadonly.interface = false
             reRequired.interface = true
+
+            shows.push('proInterface')
           } else {
             reReadonly.interface = true
             reRequired.interface = false
@@ -418,6 +430,12 @@
         shows.push('innerFunc', 'Ot', 'execSuccess', 'execError', 'urlkey')
       } else if (_funcType === 'pay') {
         shows.push('payType', '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))
+      } else if (_funcType === 'refund') {
+        shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
         reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
       }
     }
@@ -716,6 +734,11 @@
             { pattern: _patten, message: formRule.func.innerMessage },
             { max: formRule.func.max, message: formRule.func.maxMessage }
           )
+        } else if (item.key === 'sql' || item.key === 'sheet') {
+          rules.push(
+            { pattern: /^[a-zA-Z_]+$/, message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝浠ュ強_' },
+            { max: formRule.func.max, message: formRule.func.maxMessage }
+          )
         } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
           rules.push(
             { pattern: formRule.func.pattern, message: formRule.func.message },
@@ -865,9 +888,14 @@
           values.modal = card.modal || null
 
           if (values.OpenType === 'form') {
-            if (/^(0|[1-9]\d*)$/.test(values.openVal) && /^(0|[1-9]\d*)$/.test(values.closeVal)) {
-              values.openVal = +values.openVal
-              values.closeVal = +values.closeVal
+            if (values.formType !== 'scan') {
+              if (/^(0|[1-9]\d*)$/.test(values.openVal) && /^(0|[1-9]\d*)$/.test(values.closeVal)) {
+                values.openVal = +values.openVal
+                values.closeVal = +values.closeVal
+              }
+            } else {
+              values.show = 'icon'
+              values.icon = 'scan'
             }
           } else if (values.OpenType === 'excelOut') {
             values.Ot = 'notRequired'

--
Gitblit v1.8.0