From e1dbc27fbe3f083322f87fc46070191c619c5199 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 07 八月 2023 20:31:06 +0800
Subject: [PATCH] 2023-08-07

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   52 +++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index b1d19ea..bcba0e8 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -20,7 +20,7 @@
   excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'],
   excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'],
   popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'],
-  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden'],
+  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden', 'openTab'],
   innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'],
   funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'],
   form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'width', 'refreshTab', 'title', 'hidden']
@@ -166,7 +166,7 @@
       reOptions.intertype = this.state.interTypeOptions
 
       if (intertype === 'custom') {
-        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross')
+        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify', 'ContentType', 'outerBlacklist')
         if (this.record.procMode === 'system') {
           shows.push('sql', 'sqlType')
         } else if (this.record.procMode === 'inner') {
@@ -194,6 +194,7 @@
           shows.push('cbTable')
         }
 
+        reRequired.outerFunc = false
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
@@ -202,6 +203,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -249,7 +251,7 @@
 
       if (this.record.formType === 'switch') {
         shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText')
-      } else if (this.record.formType === 'counter') {
+      } else if (this.record.formType === 'counter' || this.record.formType === 'count_line') {
         shows.push('field', 'size', 'min', 'max', 'decimal')
       } else if (this.record.formType === 'radio') {
         shows.push('field', 'checkType', 'openVal', 'closeVal')
@@ -273,6 +275,7 @@
           shows.push('cbTable')
         }
 
+        reRequired.outerFunc = false
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
@@ -281,6 +284,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -308,6 +312,11 @@
         value: 'custom',
         text: '鑷畾涔�'
       }]
+
+      if (this.record.formType === 'count_line') {
+        reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
+        shows = shows.filter(op => ['label', 'OpenType', 'formType', 'Ot', 'width', 'title', 'hidden', 'field', 'size', 'min', 'max', 'decimal'].includes(op))
+      }
     } else if (openType === 'excelIn') {
       reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
       reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
@@ -316,6 +325,7 @@
         shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
         reRequired.innerFunc = false
         reRequired.callbackFunc = false
+        reRequired.outerFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -325,6 +335,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -344,6 +355,7 @@
       if (this.record.intertype === 'outer') {
         shows.push('innerFunc', 'sysInterface', 'outerFunc')
         reRequired.innerFunc = false
+        reRequired.outerFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -353,6 +365,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -375,6 +388,8 @@
         shows.push('placement')
       } else if (this.record.display === 'drawer') {
         shows.push('placement')
+      } else if (this.record.display === 'modal') {
+        shows.push('popshow')
       }
       if (this.record.popClose === 'grid') {
         shows.push('resetPageIndex')
@@ -388,7 +403,7 @@
       reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
 
       if (this.record.pageTemplate === 'custom') {
-        shows.push('url', 'joint', 'open')
+        shows.push('url', 'proUrl', 'joint', 'open')
       } else if (this.record.pageTemplate === 'linkpage') {
         shows.push('linkmenu', 'open')
 
@@ -400,7 +415,7 @@
         reTooltip.linkmenu = ''
       } else if (this.record.pageTemplate === 'billprint') {
         shows.push('printTemp')
-        reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl', 'required'].includes(op.value))
+        reOptions.Ot = requireOptions
       } else if (this.record.pageTemplate === 'pay') {
         reOptions.Ot = requireOptions.filter(op => op.value === 'requiredSgl')
       }
@@ -416,6 +431,7 @@
           shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
           reRequired.innerFunc = false
           reRequired.callbackFunc = false
+          reRequired.outerFunc = false
 
           if (this.record.sysInterface === 'false') {
             reReadonly.interface = false
@@ -425,6 +441,7 @@
           } else if (this.record.sysInterface === 'true') {
             reReadonly.interface = true
             reRequired.interface = false
+            reRequired.outerFunc = true
   
             shows.push('interface')
           } else if (this.record.sysInterface === 'external') {
@@ -481,7 +498,7 @@
     }
     
     if (appType === 'mob') {
-      if (Ot !== 'notRequired' && openType !== 'excelOut') {
+      if (openType !== 'excelOut') {
         shows.push('control')
         reOptions.control = [
           { value: '', text: '鏃�' },
@@ -496,7 +513,7 @@
         }
       }
     } else {
-      if (Ot !== 'notRequired' && openType !== 'excelOut') {
+      if (openType !== 'excelOut') {
         reOptions.control = [
           { value: '', text: '鏃�' },
           { value: 'disabled', text: '绂佺敤' },
@@ -618,6 +635,11 @@
       }
 
       this.props.updRecord && this.props.updRecord(this.record)
+    } else if (key === 'formType') {
+      if (value === 'count_line') {
+        _fieldval.Ot = 'requiredSgl'
+        this.record.Ot = 'requiredSgl'
+      }
     } else if (key === 'funcType') {
       if (value === 'print') {
         _fieldval.label = '鎵撳嵃'
@@ -778,6 +800,10 @@
             { pattern: formRule.func.pattern, message: formRule.func.message },
             { max: formRule.func.max, message: formRule.func.maxMessage }
           )
+        } else if (item.key === 'outerBlacklist') {
+          rules.push(
+            { 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 = [{
@@ -886,6 +912,13 @@
           { required: item.readonly ? false : item.required, message: '璇疯緭鍏�' + item.label + '!' }
         ]
 
+        if (item.key === 'url' || item.key === 'proUrl') {
+          rules.push({
+            pattern: /^[^\s]*$/,
+            message: '鍦板潃涓笉鍙娇鐢ㄧ┖鏍硷紒'
+          })
+        }
+
         content = <TextArea rows={2} readOnly={item.readonly}/>
       } else if (item.type === 'keyinterface') {
         span = 24
@@ -937,6 +970,7 @@
           values.verify = card.verify || null
           values.modal = card.modal || null
           values.config = card.config || null
+          values.$fixed = card.$fixed || false
 
           if (card.OpenType === 'excelOut' && values.OpenType === 'excelIn') {
             if (values.verify && values.verify.columns && values.verify.columns.length > 0) {
@@ -1035,6 +1069,10 @@
               })
             }
           }
+          
+          if (values.outerBlacklist) {
+            values.outerBlacklist = values.outerBlacklist.replace(/\s/ig, '')
+          }
 
           if (values.openmenu && Array.isArray(values.openmenu) && values.openmenu.length > 0) {
             let list = null

--
Gitblit v1.8.0