From 8bc1c1f8cf628efb149f0331ddd491b4c000009d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 02 七月 2023 22:43:15 +0800
Subject: [PATCH] 2023-07-02

---
 src/templates/zshare/modalform/index.jsx                            |    2 
 src/menu/components/table/base-table/columns/editColumn/index.jsx   |    1 
 src/tabviews/zshare/mutilform/mkSwitch/index.jsx                    |   17 +++
 src/menu/components/form/step-form/index.jsx                        |    1 
 src/menu/components/card/cardcellcomponent/index.jsx                |    2 
 src/templates/zshare/formconfig.jsx                                 |    4 
 src/menu/components/form/tab-form/index.jsx                         |    1 
 src/templates/zshare/verifycard/uniqueform/index.jsx                |    2 
 src/menu/transfer/index.jsx                                         |  115 +++++++++++++++++-----------
 src/menu/components/share/actioncomponent/index.jsx                 |    1 
 src/templates/sharecomponent/searchcomponent/index.jsx              |    1 
 src/menu/components/search/main-search/index.jsx                    |    1 
 src/menu/components/form/simple-form/index.jsx                      |    1 
 src/tabviews/zshare/mutilform/index.jsx                             |   27 ++++++
 src/menu/components/table/normal-table/columns/editColumn/index.jsx |    1 
 src/menu/modalconfig/index.jsx                                      |    1 
 src/mob/modalconfig/index.jsx                                       |    1 
 src/assets/css/design.scss                                          |   24 ++++++
 src/menu/components/table/edit-table/columns/editColumn/index.jsx   |    1 
 19 files changed, 150 insertions(+), 54 deletions(-)

diff --git a/src/assets/css/design.scss b/src/assets/css/design.scss
index 5d11010..e7a8ac6 100644
--- a/src/assets/css/design.scss
+++ b/src/assets/css/design.scss
@@ -52,6 +52,30 @@
     }
   }
 }
+.ant-modal-wrap.mk-scroll-modal {
+  .ant-modal {
+    top: 50px;
+  }
+  .ant-modal-body {
+    min-height: 150px;
+    max-height: calc(100vh - 170px);
+    overflow-y: auto;
+  }
+  .ant-modal-body::-webkit-scrollbar {
+    width: 7px;
+  }
+  .ant-modal-body::-webkit-scrollbar-thumb {
+    border-radius: 5px;
+    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
+    background: rgba(0, 0, 0, 0.13);
+  }
+  .ant-modal-body::-webkit-scrollbar-track {
+    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
+    border-radius: 3px;
+    border: 1px solid rgba(0, 0, 0, 0.07);
+    background: rgba(0, 0, 0, 0);
+  }
+}
 
 .ant-modal {
   .ant-radio-group {
diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index e5a5029..f052c14 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -762,6 +762,7 @@
           {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */}
           <Modal
             title="缂栬緫鍏冪礌"
+            wrapClassName="mk-scroll-modal"
             visible={visible}
             width={850}
             maskClosable={false}
@@ -781,6 +782,7 @@
           {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */}
           <Modal
             title="鎸夐挳路缂栬緫"
+            wrapClassName="mk-scroll-modal"
             visible={actvisible}
             width={920}
             maskClosable={false}
diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index 3f75c5d..5c012de 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -683,6 +683,7 @@
         </div>
         <Modal
           title="缂栬緫"
+          wrapClassName="mk-scroll-modal"
           visible={this.state.visible}
           width={950}
           maskClosable={false}
diff --git a/src/menu/components/form/step-form/index.jsx b/src/menu/components/form/step-form/index.jsx
index c5624f9..5e43617 100644
--- a/src/menu/components/form/step-form/index.jsx
+++ b/src/menu/components/form/step-form/index.jsx
@@ -807,6 +807,7 @@
         </div>
         <Modal
           title="缂栬緫"
+          wrapClassName="mk-scroll-modal"
           visible={this.state.visible}
           width={950}
           maskClosable={false}
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index ae873e0..45e890a 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -809,6 +809,7 @@
         </div>
         <Modal
           title="缂栬緫"
+          wrapClassName="mk-scroll-modal"
           visible={this.state.visible}
           width={950}
           maskClosable={false}
diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx
index 2708d3d..f526199 100644
--- a/src/menu/components/search/main-search/index.jsx
+++ b/src/menu/components/search/main-search/index.jsx
@@ -427,6 +427,7 @@
         {/* 缂栬緫鎼滅储鏉′欢 */}
         <Modal
           title="鎼滅储鏉′欢-缂栬緫"
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={850}
           maskClosable={false}
diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx
index 5746ac8..fbe9e9e 100644
--- a/src/menu/components/share/actioncomponent/index.jsx
+++ b/src/menu/components/share/actioncomponent/index.jsx
@@ -705,6 +705,7 @@
         {/* 缂栬緫鎸夐挳锛氬鍒躲�佺紪杈� */}
         <Modal
           title="鎸夐挳路缂栬緫"
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={920}
           maskClosable={false}
diff --git a/src/menu/components/table/base-table/columns/editColumn/index.jsx b/src/menu/components/table/base-table/columns/editColumn/index.jsx
index 16ae1ca..95e9bf5 100644
--- a/src/menu/components/table/base-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/base-table/columns/editColumn/index.jsx
@@ -459,6 +459,7 @@
       <div style={{display: 'inline-block'}}>
         <Modal
           title="鏄剧ず鍒楃紪杈�"
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={850}
           maskClosable={false}
diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index 06b4348..36565c3 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -512,6 +512,7 @@
       <div style={{display: 'inline-block'}}>
         <Modal
           title="鏄剧ず鍒楃紪杈�"
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={900}
           maskClosable={false}
diff --git a/src/menu/components/table/normal-table/columns/editColumn/index.jsx b/src/menu/components/table/normal-table/columns/editColumn/index.jsx
index df3913f..a5f9a50 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -465,6 +465,7 @@
       <div style={{display: 'inline-block'}}>
         <Modal
           title="鏄剧ず鍒楃紪杈�"
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={850}
           maskClosable={false}
diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx
index a6741f2..4765551 100644
--- a/src/menu/modalconfig/index.jsx
+++ b/src/menu/modalconfig/index.jsx
@@ -588,6 +588,7 @@
         </DndProvider>
         <Modal
           title={card && card.$copy ? '澶嶅埗' : '缂栬緫'}
+          wrapClassName="mk-scroll-modal"
           visible={this.state.visible}
           width={950}
           maskClosable={false}
diff --git a/src/menu/transfer/index.jsx b/src/menu/transfer/index.jsx
index 6eeecbf..f0a90d6 100644
--- a/src/menu/transfer/index.jsx
+++ b/src/menu/transfer/index.jsx
@@ -29,6 +29,22 @@
     const _this = this
 
     if (!config.enabled) {
+      let tb = config.components[0]
+      if (config.components.length === 1 && tb.setting.interType === 'system' && !tb.setting.dataresource) {
+        confirm({
+          title: '褰撳墠椤甸潰灏嗘竻绌猴紝纭畾鍒囨崲涓鸿嚜瀹氫箟椤甸潰鍚楋紵',
+          content: '',
+          onOk() {
+            return new Promise(resolve => {
+              _this.execUpdate(resolve, true)
+            })
+          },
+          onCancel() {}
+        })
+
+        return
+      }
+
       notification.warning({
         top: 92,
         message: '鏈惎鐢ㄨ彍鍗曚笉鍙崌绾э紒',
@@ -49,7 +65,7 @@
     })
   }
 
-  execUpdate = (_resolve) => {
+  execUpdate = (_resolve, clear) => {
     let _config = fromJS(this.props.config).toJS()
     _config.permission = 'true'
     _config.Template = 'CustomPage'
@@ -59,23 +75,53 @@
     delete _config.autoMatic
 
     let useMSearch = false
-    _config.components.forEach((item, i) => {
-      if (item.type === 'tabs') {
-        item.name = '鏍囩缁�' + i
-        item.width = 24
-        item.subtype = 'tabs'
-        item.setting = {autoSwitch: 'false', blacklist: [], name: item.name, position: 'top', supModule: [], tabStyle: 'line', width: 24}
 
-        item.subtabs.forEach(tab => {
-          tab.components[0].subtype = 'normaltable'
-          tab.components[0].width = 24
-          tab.components[0].wrap.width = 24
-          tab.components[0].wrap.name = tab.components[0].name
-          if (tab.components[0].setting.useMSearch === 'true') {
-            useMSearch = true
-          }
-
-          tab.components[0].action.forEach(btn => {
+    if (clear) {
+      _config.components = []
+    } else {
+      _config.components.forEach((item, i) => {
+        if (item.type === 'tabs') {
+          item.name = '鏍囩缁�' + i
+          item.width = 24
+          item.subtype = 'tabs'
+          item.setting = {autoSwitch: 'false', blacklist: [], name: item.name, position: 'top', supModule: [], tabStyle: 'line', width: 24}
+  
+          item.subtabs.forEach(tab => {
+            tab.components[0].subtype = 'normaltable'
+            tab.components[0].width = 24
+            tab.components[0].wrap.width = 24
+            tab.components[0].wrap.name = tab.components[0].name
+            if (tab.components[0].setting.useMSearch === 'true') {
+              useMSearch = true
+            }
+  
+            tab.components[0].action.forEach(btn => {
+              if (btn.OpenType === 'popview' && btn.config) {
+                btn.config.Template = 'CustomPage'
+                if (btn.config.components[0]) {
+                  btn.config.components[0].subtype = 'normaltable'
+                }
+              }
+            })
+            tab.components[0].cols = tab.components[0].cols.filter(col => !(col.field && col.Hide === 'true'))
+            tab.components[0].cols.forEach(col => {
+              if (col.type !== 'custom') return
+              col.elements.forEach(btn => {
+                if (btn.OpenType === 'popview' && btn.config) {
+                  btn.config.Template = 'CustomPage'
+                  if (btn.config.components[0]) {
+                    btn.config.components[0].subtype = 'normaltable'
+                  }
+                }
+              })
+            })
+          })
+        } else {
+          item.subtype = 'normaltable'
+          item.width = 24
+          item.wrap.width = 24
+          item.wrap.name = item.name
+          item.action.forEach(btn => {
             if (btn.OpenType === 'popview' && btn.config) {
               btn.config.Template = 'CustomPage'
               if (btn.config.components[0]) {
@@ -83,8 +129,8 @@
               }
             }
           })
-          tab.components[0].cols = tab.components[0].cols.filter(col => !(col.field && col.Hide === 'true'))
-          tab.components[0].cols.forEach(col => {
+          item.cols = item.cols.filter(col => !(col.field && col.Hide === 'true'))
+          item.cols.forEach(col => {
             if (col.type !== 'custom') return
             col.elements.forEach(btn => {
               if (btn.OpenType === 'popview' && btn.config) {
@@ -95,34 +141,9 @@
               }
             })
           })
-        })
-      } else {
-        item.subtype = 'normaltable'
-        item.width = 24
-        item.wrap.width = 24
-        item.wrap.name = item.name
-        item.action.forEach(btn => {
-          if (btn.OpenType === 'popview' && btn.config) {
-            btn.config.Template = 'CustomPage'
-            if (btn.config.components[0]) {
-              btn.config.components[0].subtype = 'normaltable'
-            }
-          }
-        })
-        item.cols = item.cols.filter(col => !(col.field && col.Hide === 'true'))
-        item.cols.forEach(col => {
-          if (col.type !== 'custom') return
-          col.elements.forEach(btn => {
-            if (btn.OpenType === 'popview' && btn.config) {
-              btn.config.Template = 'CustomPage'
-              if (btn.config.components[0]) {
-                btn.config.components[0].subtype = 'normaltable'
-              }
-            }
-          })
-        })
-      }
-    })
+        }
+      })
+    }
 
     if (useMSearch) {
       let cell = {
diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx
index 285307a..604e362 100644
--- a/src/mob/modalconfig/index.jsx
+++ b/src/mob/modalconfig/index.jsx
@@ -525,6 +525,7 @@
         </DndProvider>
         <Modal
           title={card && card.$copy ? '澶嶅埗' : '缂栬緫'}
+          wrapClassName="mk-scroll-modal"
           visible={this.state.visible}
           width={950}
           maskClosable={false}
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 067bfd2..7623755 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -467,6 +467,31 @@
           item.options = fromJS(item.oriOptions).toJS()
         }
         item.linkSubField = null
+      } else if (item.type === 'switch' && item.linkSubField) {
+        item.options = []
+        item.subFields = []
+        item.linkSubField.forEach(m => {
+          let n = fieldMap.get(m)
+          if (n && ['text', 'number', 'textarea'].includes(n.type)) {
+            item.subFields.push({
+              uuid: n.uuid,
+              field: m
+            })
+          }
+        })
+
+        if (item.subFields.length === 0) {
+          item.subFields = null
+        } else {
+          reFieldsVal = reFieldsVal || {}
+
+          let val = item.initval === item.openVal ? item.openText : item.closeText
+        
+          item.subFields.forEach(n => {
+            reFieldsVal[n.field] = val || ''
+          })
+        }
+        item.linkSubField = null
       }
 
       // if (item.type === 'link') {
@@ -1011,7 +1036,7 @@
           className = 'checkcard'
           content = (<MKCheckCard config={item} onChange={(val, other) => this.recordChange({[item.field]: val, ...other}, item)}/>)
         } else if (item.type === 'switch') {
-          content = (<MKSwitch config={item} onChange={(val) => this.recordChange({[item.field]: val}, item)}/>)
+          content = (<MKSwitch config={item} onChange={(val, other) => this.recordChange({[item.field]: val, ...other}, item)}/>)
         } else if (item.type === 'check') {
           content = (<MKCheck config={item} onChange={(val) => this.recordChange({[item.field]: val}, item)}/>)
         } else if (item.type === 'checkbox') {
diff --git a/src/tabviews/zshare/mutilform/mkSwitch/index.jsx b/src/tabviews/zshare/mutilform/mkSwitch/index.jsx
index 0601054..62f8822 100644
--- a/src/tabviews/zshare/mutilform/mkSwitch/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkSwitch/index.jsx
@@ -2,6 +2,8 @@
 import PropTypes from 'prop-types'
 import { Switch } from 'antd'
 
+import MKEmitter from '@/utils/events.js'
+
 class MKSwitch extends Component {
   static propTpyes = {
     config: PropTypes.object,
@@ -15,10 +17,21 @@
   onChange = (val) => {
     const { config } = this.props
     
+    let other = {}
+    if (config.subFields) {
+      let _val = val ? config.openText : config.closeText
+      config.subFields.forEach((n, i) => {
+        other[n.field] = _val || ''
+        setTimeout(() => {
+          MKEmitter.emit('mkFC', 'input', n.uuid, _val || '')
+        }, i * 5)
+      })
+    }
+
     if (val) {
-      this.props.onChange(config.openVal)
+      this.props.onChange(config.openVal, other)
     } else {
-      this.props.onChange(config.closeVal)
+      this.props.onChange(config.closeVal, other)
     }
   }
 
diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx
index 6d282da..6eb1a3b 100644
--- a/src/templates/sharecomponent/searchcomponent/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/index.jsx
@@ -354,6 +354,7 @@
         {/* 缂栬緫鎼滅储鏉′欢 */}
         <Modal
           title={card && card.copyType === 'search' ?  '鎼滅储鏉′欢-澶嶅埗' : '鎼滅储鏉′欢-缂栬緫'}
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={850}
           maskClosable={false}
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 2dea436..d9ef0e8 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -3145,7 +3145,7 @@
       type: 'text',
       key: 'separator',
       label: '杩炴帴绗�',
-      initVal: card.separator === undefined ? '/' : card.separator,
+      initVal: card.separator === undefined ? ',' : card.separator,
       tooltip: '琛ㄥ崟鎻愪氦鏃朵俊鎭箣闂寸殑杩炴帴绗︺�傛敞锛氳繛鎺ョ涓虹┖鏃讹紝鍒濆鍖栨椂濉厖鍏朵粬琛ㄥ崟鏃犳晥銆�',
       required: false,
       readonly: false
@@ -4056,7 +4056,7 @@
       type: 'multiselect',
       key: 'linkSubField',
       label: '濉厖琛ㄥ崟',
-      tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑琛ㄥ崟锛堟枃鏈垨鏁板瓧琛ㄥ崟锛変腑銆�',
+      tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑琛ㄥ崟锛堟枃鏈垨鏁板瓧琛ㄥ崟锛変腑锛屽紑鍏充細灏嗘彁绀烘枃鏈~鍏ユ琛ㄥ崟銆�',
       initVal: card.linkSubField || [],
       options: inputfields
     },
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index ac5c8a7..364f8a2 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -28,7 +28,7 @@
   multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'dropdown'],
   link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'place', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'],
   fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
-  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
+  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
   check: ['initval', 'openVal', 'closeVal', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'checkTip'],
   date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'place', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'],
   datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'place', 'marginTop', 'marginBottom'],
diff --git a/src/templates/zshare/verifycard/uniqueform/index.jsx b/src/templates/zshare/verifycard/uniqueform/index.jsx
index 2c1e3d2..5249e9c 100644
--- a/src/templates/zshare/verifycard/uniqueform/index.jsx
+++ b/src/templates/zshare/verifycard/uniqueform/index.jsx
@@ -97,7 +97,7 @@
           {btn.Ot !== 'requiredOnce' ? <Col span={7}>
             <Form.Item label="楠岃瘉绫诲瀷">
               {getFieldDecorator('verifyType', {
-                initialValue: 'physical',
+                initialValue: 'logic',
                 rules: [
                   {
                     required: true,

--
Gitblit v1.8.0