From 79e4981aa6cc9354276fc54cdf6d14eb08ab7fee Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 22 六月 2023 15:59:04 +0800
Subject: [PATCH] Merge branch 'develop' of ssh://121.36.20.145:29418/~jinfei/pc-plat into develop

---
 src/menu/components/share/actioncomponent/actionform/index.jsx |   42 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index ca3792b..1f430f5 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -12,6 +12,7 @@
 const { TextArea } = Input
 const { Paragraph } = Typography
 const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
+const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable'))
 const acTyOptions = {
   pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'],
   prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'],
@@ -92,6 +93,8 @@
 
     let hasclass = true
     this.props.formlist.forEach(item => {
+      if (!item.key) return
+
       this.record[item.key] = item.initVal
 
       if (item.key === 'class') {
@@ -163,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')
         if (this.record.procMode === 'system') {
           shows.push('sql', 'sqlType')
         } else if (this.record.procMode === 'inner') {
@@ -191,6 +194,7 @@
           shows.push('cbTable')
         }
 
+        reRequired.outerFunc = false
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
@@ -199,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') {
@@ -246,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')
@@ -270,6 +275,7 @@
           shows.push('cbTable')
         }
 
+        reRequired.outerFunc = false
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
@@ -278,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') {
@@ -305,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))
@@ -313,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
@@ -322,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') {
@@ -341,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
@@ -350,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') {
@@ -413,6 +429,7 @@
           shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
           reRequired.innerFunc = false
           reRequired.callbackFunc = false
+          reRequired.outerFunc = false
 
           if (this.record.sysInterface === 'false') {
             reReadonly.interface = false
@@ -422,6 +439,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') {
@@ -520,6 +538,10 @@
       }
     }
 
+    if (shows.includes('syncComponent') && this.record.syncComponent[0] === 'multiComponent') {
+      shows.push('syncComponents')
+    }
+
     if (this.record.show === 'icon') {
       reRequired.icon = true
     } else {
@@ -611,6 +633,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 = '鎵撳嵃'
@@ -858,7 +885,14 @@
           { required: item.required, message: '璇烽�夋嫨' + item.label + '!' }
         ]
 
-        content = <Cascader options={item.options || []} expandTrigger="hover" placeholder=""/>
+        content = <Cascader onChange={(value) => {this.optionChange(item.key, value)}} options={item.options || []} expandTrigger="hover" placeholder=""/>
+      } else if (item.type === 'table') {
+        span = 24
+        className = 'textarea'
+        rules = [
+          { required: item.required, message: '璇锋坊鍔�' + item.label + '!' }
+        ]
+        content = (<MKTable tip={''} columns={item.columns || []} actions={[]}/>)
       } else if (item.type === 'icon') {
         rules = [
           { required: item.required, message: '璇烽�夋嫨' + item.label + '!' }
@@ -1041,7 +1075,7 @@
               }
             })
           }
-          
+
           resolve(values)
         } else {
           reject(err)

--
Gitblit v1.8.0