From 063b983daaf51a7f1e8677bde1e9c0e618866c91 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 二月 2020 10:30:19 +0800
Subject: [PATCH] 2020-02-21

---
 src/components/tabview/index.jsx                                |   10 
 src/templates/tableshare/verifycardexcelin/columnform/index.jsx |   70 ++
 src/tabviews/formtab/index.jsx                                  |   35 +
 src/tabviews/formtab/actionList/index.jsx                       |   11 
 src/tabviews/formtab/formgroup/index.jsx                        |   24 +
 src/templates/formtabconfig/index.jsx                           |  316 ++++++++----
 src/templates/comtableconfig/index.jsx                          |  428 +++++++++++++----
 src/tabviews/tableshare/actionList/index.jsx                    |    2 
 src/templates/modalconfig/index.jsx                             |    4 
 src/templates/tableshare/tabdragelement/index.jsx               |    4 
 src/templates/formtabconfig/source.jsx                          |    1 
 src/templates/formtabconfig/dragelement/card.jsx                |    3 
 src/locales/en-US/main.js                                       |    1 
 src/locales/zh-CN/comtable.js                                   |    3 
 src/tabviews/commontable/index.jsx                              |   10 
 src/locales/en-US/comtable.js                                   |    3 
 src/utils/utils.js                                              |   67 +-
 src/templates/subtableconfig/actionform/index.jsx               |    7 
 src/tabviews/tableshare/mutilform/index.jsx                     |   54 +
 src/templates/comtableconfig/actionform/index.jsx               |    7 
 src/templates/formtabconfig/settingform/index.jsx               |    2 
 src/locales/zh-CN/main.js                                       |    1 
 src/templates/modalconfig/settingform/index.jsx                 |    4 
 src/templates/subtableconfig/index.jsx                          |  290 ++++++++---
 src/tabviews/commontable/index.scss                             |    8 
 src/components/sidemenu/index.jsx                               |    3 
 src/templates/tableshare/verifycardexcelin/index.jsx            |   20 
 src/utils/option.js                                             |    6 
 src/templates/tableshare/formconfig.js                          |   20 
 src/templates/ushare/modalform/index.jsx                        |   15 
 30 files changed, 1,009 insertions(+), 420 deletions(-)

diff --git a/src/components/sidemenu/index.jsx b/src/components/sidemenu/index.jsx
index 804e9bd..b5c33a2 100644
--- a/src/components/sidemenu/index.jsx
+++ b/src/components/sidemenu/index.jsx
@@ -115,9 +115,6 @@
             } else if (child.LinkUrl === 'DataManage') {
               _tmenu.type = 'DataManage'
               _tmenu.forbidden = true
-            // } else if (child.LinkUrl === 'bda/rdt?pageno=rolemenus&MenuNo=RoleMenuM') {
-            //   _tmenu.type = 'RoleManage'
-            //   _tmenu.forbidden = true
             } else if (iframes.includes(child.LinkUrl.split('?')[0])) {
               _tmenu.type = 'iframe'
               _tmenu.forbidden = true
diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx
index ddbc7d9..ed5a8b2 100644
--- a/src/components/tabview/index.jsx
+++ b/src/components/tabview/index.jsx
@@ -215,7 +215,15 @@
                       key={view.MenuID}
                     >
                       {this.selectcomponent(view)}
-                      <Button className={'main-copy ' + (view.type === 'iframe' ? 'ifr-copy' : '')} icon="copy" data-menuno={view.MenuNo} onClick={this.copyMenuNo} shape="circle" />
+                      {view.type !== 'CommonTable' ?
+                        <Button
+                          icon="copy"
+                          shape="circle"
+                          className={'main-copy ' + (view.type === 'iframe' ? 'ifr-copy' : '')}
+                          data-menuno={view.MenuNo}
+                          onClick={this.copyMenuNo}
+                        /> : null
+                      }
                       <BackTop>
                         <div className="ant-back-top">
                           <div className="ant-back-top-content">
diff --git a/src/locales/en-US/comtable.js b/src/locales/en-US/comtable.js
index 3ab9167..8b29462 100644
--- a/src/locales/en-US/comtable.js
+++ b/src/locales/en-US/comtable.js
@@ -98,6 +98,8 @@
   'header.form.linkForm': '鍏宠仈琛ㄥ崟',
   'header.form.picture': '鍥剧墖',
   'header.form.number': '鏁板瓧',
+  'header.form.letter': '瀛楁瘝',
+  'header.form.letter&number': '瀛楁瘝+鏁板瓧',
   'header.form.colspan': '鍚堝苟鍒�',
   'header.form.select': 'Select',
   'header.form.multiselect': '澶氶��',
@@ -206,6 +208,7 @@
   'header.form.afterExecSuccess': '鎴愬姛鍚�',
   'header.form.afterExecError': '澶辫触鍚�',
   'header.form.pagination': '鍒嗛〉',
+  'header.form.regular': '姝e垯鏍¢獙',
   'header.modal.form.edit': '琛ㄥ崟-缂栬緫',
   'header.modal.search.edit': '鎼滅储鏉′欢-缂栬緫',
   'header.modal.action.edit': '鎸夐挳-缂栬緫',
diff --git a/src/locales/en-US/main.js b/src/locales/en-US/main.js
index f472911..48bc318 100644
--- a/src/locales/en-US/main.js
+++ b/src/locales/en-US/main.js
@@ -30,6 +30,7 @@
   'main.excel.content.maxlimit': '鍐呭瓒呴暱',
   'main.excel.content.limitmin': '灏忎簬鏈�灏忓��',
   'main.excel.content.limitmax': '澶т簬鏈�澶у��',
+  'main.form.link.error': '鍏宠仈鑿滃崟璁剧疆閿欒锛�',
   'form.required.input': 'Please input ',
   'form.required.select': 'Please select '
 }
\ No newline at end of file
diff --git a/src/locales/zh-CN/comtable.js b/src/locales/zh-CN/comtable.js
index 3cb01d1..ef086ff 100644
--- a/src/locales/zh-CN/comtable.js
+++ b/src/locales/zh-CN/comtable.js
@@ -98,6 +98,8 @@
   'header.form.linkForm': '鍏宠仈琛ㄥ崟',
   'header.form.picture': '鍥剧墖',
   'header.form.number': '鏁板瓧',
+  'header.form.letter': '瀛楁瘝',
+  'header.form.letter&number': '瀛楁瘝+鏁板瓧',
   'header.form.colspan': '鍚堝苟鍒�',
   'header.form.select': '涓嬫媺閫夋嫨',
   'header.form.multiselect': '涓嬫媺澶氶��',
@@ -206,6 +208,7 @@
   'header.form.afterExecSuccess': '鎴愬姛鍚�',
   'header.form.afterExecError': '澶辫触鍚�',
   'header.form.pagination': '鍒嗛〉',
+  'header.form.regular': '姝e垯鏍¢獙',
   'header.modal.form.edit': '琛ㄥ崟-缂栬緫',
   'header.modal.search.edit': '鎼滅储鏉′欢-缂栬緫',
   'header.modal.action.edit': '鎸夐挳-缂栬緫',
diff --git a/src/locales/zh-CN/main.js b/src/locales/zh-CN/main.js
index 2128840..cc39596 100644
--- a/src/locales/zh-CN/main.js
+++ b/src/locales/zh-CN/main.js
@@ -32,6 +32,7 @@
   'main.excel.content.maxlimit': '鍐呭瓒呴暱',
   'main.excel.content.limitmin': '灏忎簬鏈�灏忓��',
   'main.excel.content.limitmax': '澶т簬鏈�澶у��',
+  'main.form.link.error': '鍏宠仈鑿滃崟璁剧疆閿欒锛�',
   'form.required.input': '璇疯緭鍏�',
   'form.required.select': '璇烽�夋嫨'
 }
\ No newline at end of file
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 544400a..44b4dc8 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -710,7 +710,7 @@
           parentId: this.props.MenuID,
           btn: btn,
           data: data[0] || null,
-          primaryId: _primaryId,
+          primaryId: btn.Ot !== 'notRequired' ? _primaryId : '',
           arr_field: this.state.arr_field
         }
       }
@@ -742,7 +742,7 @@
         tabParam: {
           btn: btn,
           data: data[0] || null,
-          primaryId: _primaryId,
+          primaryId: btn.Ot !== 'notRequired' ? _primaryId : '',
           arr_field: this.state.arr_field
         }
       })
@@ -874,6 +874,12 @@
               )
             })
           }
+          <Button
+            icon="copy"
+            shape="circle"
+            className="common-table-copy"
+            onClick={this.copyMenuNo}
+          />
           <Modal
             className="popview-modal"
             title={this.state.popAction.label}
diff --git a/src/tabviews/commontable/index.scss b/src/tabviews/commontable/index.scss
index f5b97e9..2321484 100644
--- a/src/tabviews/commontable/index.scss
+++ b/src/tabviews/commontable/index.scss
@@ -69,6 +69,14 @@
       cursor: pointer;
     }
   }
+  .common-table-copy {
+    position: fixed;
+    z-index: 2;
+    bottom: 65px;
+    right: 30px;
+    width: 40px;
+    height: 40px;
+  }
 }
 .commontable.pick-control {
   >.button-list {
diff --git a/src/tabviews/formtab/actionList/index.jsx b/src/tabviews/formtab/actionList/index.jsx
index 72af4f9..cbb9056 100644
--- a/src/tabviews/formtab/actionList/index.jsx
+++ b/src/tabviews/formtab/actionList/index.jsx
@@ -120,10 +120,9 @@
         param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
         param.secretkey = Utils.encrypt(param.LText, param.timestamp)
       }
-
       Api.genericInterface(param).then((res) => {
         if (res.status) {
-          this.execSuccess(btn, res, _primaryId)
+          this.execSuccess(btn, res, _primaryId, formdata)
         } else {
           this.execError(res, btn)
         }
@@ -210,7 +209,7 @@
           return Api.genericInterface(_callbackparam)
         } else {
           if (response.status) {
-            this.execSuccess(btn, response, _primaryId)
+            this.execSuccess(btn, response, _primaryId, formdata)
             _resolve()
           } else {
             this.execError(response, btn)
@@ -221,7 +220,7 @@
         if (!res) return
   
         if (res.status) {
-          this.execSuccess(btn, res, _primaryId)
+          this.execSuccess(btn, res, _primaryId, formdata)
           _resolve()
         } else {
           this.execError(res, btn)
@@ -244,7 +243,7 @@
    * 4銆佹ā鎬佹鎵ц鎴愬姛鍚庢槸鍚﹀叧闂�
    * 5銆侀�氱煡涓诲垪琛ㄥ埛鏂�
    */
-  execSuccess = (btn, res, primaryId) => {
+  execSuccess = (btn, res, primaryId, formdata) => {
     if (res && res.ErrCode === 'S') { // 鎵ц鎴愬姛
       notification.success({
         top: 92,
@@ -255,7 +254,7 @@
 
     }
 
-    this.props.refreshdata(btn, 'success', primaryId)
+    this.props.refreshdata(btn, 'success', primaryId, formdata)
   }
 
   /**
diff --git a/src/tabviews/formtab/formgroup/index.jsx b/src/tabviews/formtab/formgroup/index.jsx
index 8e623f7..20dce01 100644
--- a/src/tabviews/formtab/formgroup/index.jsx
+++ b/src/tabviews/formtab/formgroup/index.jsx
@@ -1,5 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
+import { is, fromJS } from 'immutable'
 import { Form, Row, Col, Input, InputNumber, Select, DatePicker, notification, Collapse } from 'antd'
 import moment from 'moment'
 import { formRule } from '@/utils/option.js'
@@ -31,6 +32,29 @@
     record: {}
   }
 
+  UNSAFE_componentWillReceiveProps (nextProps) {
+    if (nextProps.data && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
+
+      let _fieldsvalue = {}
+      let _record = {}
+      Object.keys(nextProps.data).forEach(key => {
+        if (this.props.form.getFieldValue(key) !== undefined) {
+          _fieldsvalue[key] = nextProps.data[key]
+        } else {
+          _record[key] = nextProps.data[key]
+        }
+      })
+
+      if (Object.keys(_fieldsvalue).length > 0) {
+        this.props.form.setFieldsValue(_fieldsvalue)
+      }
+      
+      this.setState({
+        record: _record
+      })
+    }
+  }
+
   UNSAFE_componentWillMount () {
     const { data, groups } = this.props
 
diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx
index 7e20e0a..e0a108c 100644
--- a/src/tabviews/formtab/index.jsx
+++ b/src/tabviews/formtab/index.jsx
@@ -258,9 +258,16 @@
    * @description 涓昏〃鏁版嵁鍔犺浇
    */ 
   async loadmaindata () {
-    const { setting } = this.state
+    const { setting, BIDs } = this.state
 
-    if (setting.datatype !== 'query') return
+    if (setting.datatype !== 'query') {
+      notification.warning({
+        top: 92,
+        message: '鏈缃暟鎹煡璇㈤厤缃紒',
+        duration: 10
+      })
+      return
+    }
 
     let param = null
 
@@ -285,6 +292,7 @@
         data: _data,
         primaryId: _primaryId,
         BIDs: {
+          ...BIDs,
           mainTable: _primaryId,
           mainTabledata: _data
         }
@@ -376,13 +384,31 @@
   /**
    * @description 鎸夐挳鎿嶄綔瀹屾垚鍚庯紙鎴愬姛鎴栧け璐ワ級锛岄〉闈㈠埛鏂帮紝閲嶇疆椤电爜鍙婇�夋嫨椤�
    */
-  refreshbyaction = (btn, type, primaryId) => {
+  refreshbyaction = (btn, type, primaryId, formdata) => {
+    const { BIDs } = this.state
+
     if (type === 'success' && btn.afterExecSuccess === 'notclose') {
       this.setState({
         primaryId: primaryId
       }, () => {
         if (btn.execSuccess === 'refresh') {
           this.loadmaindata()
+        } else {
+          let data = {}
+
+          if (formdata && formdata.length > 0) {
+            formdata.forEach(item => {
+              data[item.key] = item.value
+            })
+          }
+
+          this.setState({
+            BIDs: {
+              ...BIDs,
+              mainTable: primaryId,
+              mainTabledata: data
+            }
+          })
         }
       })
     } else if (type === 'success' && btn.afterExecSuccess === 'close') {
@@ -536,8 +562,7 @@
             refreshdata={this.refreshbyaction}
           /> : null
         }
-        {setting && setting.onload !== 'false' &&
-          config.tabgroups.map(group => {
+        {!loadingview && !viewlost && config.tabgroups.map(group => {
             if (config[group].length === 0) return null
 
             return (
diff --git a/src/tabviews/tableshare/actionList/index.jsx b/src/tabviews/tableshare/actionList/index.jsx
index 7e04f37..d8e49b4 100644
--- a/src/tabviews/tableshare/actionList/index.jsx
+++ b/src/tabviews/tableshare/actionList/index.jsx
@@ -969,7 +969,7 @@
   triggerExcelout = (btn) => {
     let viewParam = this.props.getexceloutparam()
     let name = `${viewParam.menuName}${moment().format('YYYYMMDDHHmmss')}.xlsx`
-    let pageSize = 100
+    let pageSize = 1000
     
     this.setState({loadingUuid: btn.uuid})
 
diff --git a/src/tabviews/tableshare/mutilform/index.jsx b/src/tabviews/tableshare/mutilform/index.jsx
index aec1414..ea7f0d8 100644
--- a/src/tabviews/tableshare/mutilform/index.jsx
+++ b/src/tabviews/tableshare/mutilform/index.jsx
@@ -21,12 +21,27 @@
   }
 
   state = {
+    cols: 2,
     datatype: null,
     readtype: null,
     readin: null,
     fieldlen: null,
     formlist: [],
     record: {}
+  }
+
+  UNSAFE_componentWillMount () {
+    let cols = 2
+    if (this.props.action.setting && this.props.action.setting.cols) {
+      cols = parseInt(this.props.action.setting.cols)
+      if (cols > 3 || cols < 1) {
+        cols = 2
+      }
+    }
+
+    this.setState({
+      cols: cols
+    })
   }
 
   componentDidMount () {
@@ -129,7 +144,7 @@
     if (error) {
       notification.warning({
         top: 92,
-        message: '鍏宠仈鑿滃崟璁剧疆閿欒锛�',
+        message: this.props.dict['main.form.link.error'],
         duration: 10
       })
     }
@@ -151,7 +166,7 @@
             input.select()
           })
         } catch {
-          console.warn('琛ㄥ崟鑾峰彇澶辫触锛�')
+          console.warn('focus error锛�')
         }
       }
     })
@@ -243,15 +258,9 @@
 
   getFields() {
     const { getFieldDecorator } = this.props.form
+    const { cols } = this.state
 
     const fields = []
-    let cols = 2
-    if (this.props.action.setting && this.props.action.setting.cols) {
-      cols = parseInt(this.props.action.setting.cols)
-      if (cols > 3 || cols < 1) {
-        cols = 2
-      }
-    }
 
     this.state.formlist.forEach((item, index) => {
       if ((!item.field && item.type !== 'title') || item.hidden === 'true') return
@@ -263,6 +272,26 @@
           </Col>
         )
       } else if (item.type === 'text') {
+        let _max = item.fieldlength || 50
+        let _rules = []
+        if (item.regular) {
+          if (item.regular === 'number') {
+            _rules = [{
+              pattern: /^[0-9]*$/ig,
+              message: formRule.input.numbermsg
+            }]
+          } else if (item.regular === 'letter') {
+            _rules = [{
+              pattern: /^[a-zA-Z]*$/ig,
+              message: formRule.input.lettermsg
+            }]
+          } else if (item.regular === 'letter&number') {
+            _rules = [{
+              pattern: /^[a-zA-Z0-9]*$/ig,
+              message: formRule.input.letternummsg
+            }]
+          }
+        }
         fields.push(
           <Col span={24 / cols} key={index}>
             <Form.Item label={item.label}>
@@ -274,9 +303,10 @@
                     message: this.props.dict['form.required.input'] + item.label + '!'
                   },
                   {
-                    max: formRule.input.max,
-                    message: formRule.input.message
-                  }
+                    max: _max,
+                    message: formRule.input.formMessage.replace('@max', _max)
+                  },
+                  ..._rules
                 ]
               })(<Input placeholder="" autoComplete="off" disabled={item.readonly === 'true'} onPressEnter={this.handleSubmit} />)}
             </Form.Item>
diff --git a/src/templates/comtableconfig/actionform/index.jsx b/src/templates/comtableconfig/actionform/index.jsx
index 02b61bf..9adcb57 100644
--- a/src/templates/comtableconfig/actionform/index.jsx
+++ b/src/templates/comtableconfig/actionform/index.jsx
@@ -73,7 +73,6 @@
     let _intertype = ''
     let _position = ''
     let _tabType = ''
-    let _linkTab = ''
     let _options = null
 
     this.props.formlist.forEach(form => {
@@ -85,13 +84,10 @@
         _position = form.initVal
       } else if (form.key === 'tabType') {
         _tabType = form.initVal
-      } else if (form.key === 'linkTab') {
-        _linkTab = form.initVal
       }
     })
 
     let _tabs = this.props.tabs.filter(tab => tab.type === _tabType)
-    let initTab = _tabs.filter(tab => tab.uuid === _linkTab)[0]
 
     if (_opentype === 'innerpage') {                                     // 鏂伴〉闈紙鍐呴儴锛夛紝鍙�夋ā鏉�
       _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position']
@@ -151,9 +147,6 @@
             },
             ..._tabs
           ]
-          if (!initTab) {
-            item.initVal = ''
-          }
         }
         item.hidden = !_options.includes(item.key)
         return item
diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 9cfe91e..c150227 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -387,7 +387,10 @@
   handleTab = (card) => {
     const { config } = this.state
 
-    let menus = [{value: 'mainTable', text: '涓昏〃'}]
+    let menus = [
+      {value: '', text: '绌�'},
+      {value: 'mainTable', text: '涓昏〃'}
+    ]
     let equalTabs = []
     let supMenu = card.supMenu || ''
     let equalTab = card.equalTab || []
@@ -584,6 +587,80 @@
                 PageParam: JSON.stringify({Template: 'Modal'}),
                 LongParam: _LongParam
               }
+              Api.getSystemConfig(param).then(response => {
+                if (!response.status) {
+                  notification.warning({
+                    top: 92,
+                    message: response.message,
+                    duration: 10
+                  })
+                } else {
+                  this.setState({
+                    copyActions: [...this.state.copyActions, res.uuid]
+                  })
+                }
+              })
+            }
+          })
+        } else if (
+          (res.OpenType === 'tab' || res.OpenType === 'blank') &&
+          card.originCard &&
+          (card.originCard.OpenType === 'tab' || card.originCard.OpenType === 'blank')
+        ) {
+          Api.getSystemConfig({
+            func: 'sPC_Get_LongParam',
+            MenuID: card.originCard.uuid
+          }).then(result => {
+            if (result.status && result.LongParam) {
+              let _LongParam = ''
+
+              // 瑙f瀽閰嶇疆锛屼慨鏀规ā鎬佹鏍囬鍚嶇О
+              if (result.LongParam) {
+                try {
+                  _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
+                  _LongParam = JSON.parse(_LongParam)
+                } catch (e) {
+                  _LongParam = ''
+                }
+              }
+
+              let _temp = ''
+              if (_LongParam && _LongParam.type === 'FormTab') {
+                try {
+                  _LongParam.action = _LongParam.action.map(_btn => {
+                    _btn.uuid = Utils.getuuid()
+
+                    return _btn
+                  })
+                  _LongParam.tabgroups.forEach(_groupId => {
+                    _LongParam[_groupId] = _LongParam[_groupId].map(_tab => {
+                      _tab.uuid = Utils.getuuid()
+
+                      return _tab
+                    })
+                  })
+                  _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam)))
+                  _temp = 'FormTab'
+                } catch {
+                  _LongParam = ''
+                }
+              } else {
+                _LongParam = ''
+              }
+
+              if (!_temp) return
+
+              let param = {
+                func: 'sPC_ButtonParam_AddUpt',
+                ParentID: menu.MenuID,
+                MenuID: res.uuid,
+                MenuNo: menu.MenuNo,
+                Template: _temp,
+                MenuName: res.label,
+                PageParam: JSON.stringify({Template: _temp}),
+                LongParam: _LongParam
+              }
+
               Api.getSystemConfig(param).then(response => {
                 if (!response.status) {
                   notification.warning({
@@ -1410,63 +1487,72 @@
         })
       }
 
-      // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
-      delete _config.type
-      delete _config.isAdd
+      _config.funcs = [] // 椤甸潰鍙婂瓙椤甸潰瀛樺偍杩囩▼闆�
 
-      try {
-        _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
-      } catch (e) {
-        notification.warning({
-          top: 92,
-          message: '缂栬瘧閿欒',
-          duration: 10
+      _config.funcs.push({
+        type: 'view',
+        subtype: 'view',
+        uuid: menu.MenuID,
+        intertype: _config.setting.interType || 'inner',
+        interface: _config.setting.interface || '',
+        tableName: _config.setting.tableName || '',
+        innerFunc: _config.setting.innerFunc || '',
+        outerFunc: _config.setting.outerFunc || ''
+      })
+
+      _config.action.forEach(item => {
+        let tablename = item.OpenType === 'excelIn' ? (item.sheet || '') : (item.sql || '')
+
+        if (item.OpenType === 'excelOut' && item.intertype === 'inner' && !item.innerFunc) {
+          tablename = _config.setting.tableName || ''
+        }
+
+        if (item.OpenType === 'tab' || item.OpenType === 'blank') {
+          _config.funcs.push({
+            type: 'tab',
+            subtype: 'btn',
+            uuid: item.uuid,
+            label: item.label,
+            linkTab: item.uuid
+          })
+        } else if (item.OpenType === 'popview') {
+          _config.funcs.push({
+            type: 'tab',
+            subtype: 'btn',
+            uuid: item.uuid,
+            label: item.label,
+            linkTab: item.linkTab
+          })
+        } else if (['pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(item.OpenType)) {
+          _config.funcs.push({
+            type: 'button',
+            subtype: 'btn',
+            uuid: item.uuid,
+            label: item.label,
+            tablename: tablename,
+            intertype: item.intertype,
+            interface: item.interface || '',
+            innerFunc: item.innerFunc || '',
+            outerFunc: item.outerFunc || '',
+            callbackFunc: item.callbackFunc || ''
+          })
+        }
+      })
+
+      _config.tabgroups.forEach(groupId => {
+        if (_config[groupId].length === 0) return
+
+        _config[groupId].forEach(tab => {
+          _config.funcs.push({
+            type: 'tab',
+            subtype: 'tab',
+            uuid: tab.uuid,
+            label: tab.label,
+            linkTab: tab.linkTab
+          })
         })
-        return
-      }
+      })
 
-      let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
-        func: 'sPC_Button_AddUpt',
-        Type: 40,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
-        ParentID: menu.MenuID,
-        MenuNo: res.menuNo,
-        Template: menu.PageParam.Template || '',
-        PageParam: '',
-        LongParam: '',
-        LText: config.action.map((item, index) => {
-          return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
-        })
-      }
-
-      btnParam.LText = btnParam.LText.join(' union all ')
-      btnParam.LText = Utils.formatOptions(btnParam.LText)
-      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
-      
-      let tabParam = { // 娣诲姞鑿滃崟tab椤�
-        func: 'sPC_sMenusTab_AddUpt',
-        MenuID: menu.MenuID,
-        LText: config.tabs.map((item, index) => {
-          return `select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
-        })
-      }
-      tabParam.LText = tabParam.LText.join(' union all ')
-      tabParam.LText = Utils.formatOptions(tabParam.LText)
-      tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-      tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
-
-      let param = {
-        func: 'sPC_TrdMenu_AddUpt',
-        ParentID: res.parentId,
-        MenuID: menu.MenuID,
-        MenuNo: res.menuNo,
-        Template: menu.PageParam.Template || '',
-        MenuName: res.menuName,
-        Sort: (this.props.supMenuList.length + 1) * 10,
-        PageParam: JSON.stringify(_pageParam),
-        LongParam: _LongParam
-      }
-      
       if (this.state.closeVisible) { // 鏄剧ず鍏抽棴瀵硅瘽妗嗘椂锛屾ā鎬佹涓繚瀛樻寜閽紝鏄剧ず淇濆瓨涓姸鎬�
         this.setState({
           menucloseloading: true
@@ -1477,81 +1563,185 @@
         })
       }
 
-      // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
-      // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
       new Promise(resolve => {
-        if (delActions.length > 0) {
-          let deffers = delActions.map(item => {
-            let _param = {
-              func: 'sPC_MainMenu_Del',
-              MenuID: item
-            }
-            return new Promise(resolve => {
-              Api.getSystemConfig(_param).then(response => {
-                resolve(response)
+        let deffers = []
+        _config.funcs.forEach(item => {
+          if (item.type === 'tab') {
+            let deffer = new Promise(resolve => {
+              Api.getSystemConfig({
+                func: 'sPC_Get_LongParam',
+                MenuID: item.linkTab
+              }).then(result => {
+                if (result.status && result.LongParam) {
+                  let _LongParam = ''
+        
+                  if (result.LongParam) {
+                    try {
+                      _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
+                      _LongParam = JSON.parse(_LongParam)
+                    } catch (e) {
+                      _LongParam = ''
+                    }
+                  }
+      
+                  if (_LongParam) {
+                    item.menuNo = _LongParam.tabNo || ''
+                    item.subfuncs = _LongParam.funcs || []
+                  }
+                }
+                resolve()
               })
             })
+
+            deffers.push(deffer)
+          }
+        })
+
+        if (deffers.length === 0) {
+          resolve()
+        } else {
+          Promise.all(deffers).then(() => {
+            resolve()
           })
-          Promise.all(deffers).then(result => {
-            let error = null
-            result.forEach(response => {
-              if (!response.status) {
-                error = response
+        }
+      }).then(() => {
+        // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
+        delete _config.type
+        delete _config.isAdd
+  
+        try {
+          _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
+        } catch (e) {
+          notification.warning({
+            top: 92,
+            message: '缂栬瘧閿欒',
+            duration: 10
+          })
+          this.setState({
+            menucloseloading: false,
+            menuloading: false
+          })
+          return
+        }
+  
+        let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
+          func: 'sPC_Button_AddUpt',
+          Type: 40,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
+          ParentID: menu.MenuID,
+          MenuNo: res.menuNo,
+          Template: menu.PageParam.Template || '',
+          PageParam: '',
+          LongParam: '',
+          LText: config.action.map((item, index) => {
+            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
+          })
+        }
+  
+        btnParam.LText = btnParam.LText.join(' union all ')
+        btnParam.LText = Utils.formatOptions(btnParam.LText)
+        btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
+        btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+        
+        let tabParam = { // 娣诲姞鑿滃崟tab椤�
+          func: 'sPC_sMenusTab_AddUpt',
+          MenuID: menu.MenuID,
+          LText: config.tabs.map((item, index) => {
+            return `select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
+          })
+        }
+        tabParam.LText = tabParam.LText.join(' union all ')
+        tabParam.LText = Utils.formatOptions(tabParam.LText)
+        tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
+        tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+  
+        let param = {
+          func: 'sPC_TrdMenu_AddUpt',
+          ParentID: res.parentId,
+          MenuID: menu.MenuID,
+          MenuNo: res.menuNo,
+          Template: menu.PageParam.Template || '',
+          MenuName: res.menuName,
+          Sort: (this.props.supMenuList.length + 1) * 10,
+          PageParam: JSON.stringify(_pageParam),
+          LongParam: _LongParam
+        }
+  
+        // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
+        // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
+        new Promise(resolve => {
+          if (delActions.length > 0) {
+            let deffers = delActions.map(item => {
+              let _param = {
+                func: 'sPC_MainMenu_Del',
+                MenuID: item
+              }
+              return new Promise(resolve => {
+                Api.getSystemConfig(_param).then(response => {
+                  resolve(response)
+                })
+              })
+            })
+            Promise.all(deffers).then(result => {
+              let error = null
+              result.forEach(response => {
+                if (!response.status) {
+                  error = response
+                }
+              })
+    
+              if (error) {
+                this.setState({
+                  menuloading: false,
+                  menucloseloading: false
+                })
+                notification.warning({
+                  top: 92,
+                  message: error.message,
+                  duration: 10
+                })
+                resolve(false)
+              } else {
+                this.setState({
+                  delActions: []
+                })
+                resolve(true)
               }
             })
-  
-            if (error) {
+          } else if (delActions.length === 0) {
+            resolve(true)
+          }
+        }).then(resp => {
+          if (resp === false) return
+    
+          Api.getSystemConfig(param).then(response => {
+            if (response.status) {
+              this.setState({
+                config: _config,
+                originMenu: {
+                  ...originMenu,
+                  LongParam: _config,
+                  PageParam: _pageParam,
+                  MenuName: res.menuName,
+                  MenuNo: res.menuNo,
+                  ParentID: res.parentId
+                }
+              })
+    
+              this.props.reloadmenu()
+              
+              this.submitAction(btnParam, tabParam)
+            } else {
               this.setState({
                 menuloading: false,
                 menucloseloading: false
               })
               notification.warning({
                 top: 92,
-                message: error.message,
+                message: response.message,
                 duration: 10
               })
-              resolve(false)
-            } else {
-              this.setState({
-                delActions: []
-              })
-              resolve(true)
             }
           })
-        } else if (delActions.length === 0) {
-          resolve(true)
-        }
-      }).then(resp => {
-        if (resp === false) return
-  
-        Api.getSystemConfig(param).then(response => {
-          if (response.status) {
-            this.setState({
-              config: _config,
-              originMenu: {
-                ...originMenu,
-                LongParam: _config,
-                PageParam: _pageParam,
-                MenuName: res.menuName,
-                MenuNo: res.menuNo,
-                ParentID: res.parentId
-              }
-            })
-  
-            this.props.reloadmenu()
-            
-            this.submitAction(btnParam, tabParam)
-          } else {
-            this.setState({
-              menuloading: false,
-              menucloseloading: false
-            })
-            notification.warning({
-              top: 92,
-              message: response.message,
-              duration: 10
-            })
-          }
         })
       })
     }, () => {
@@ -2543,6 +2733,7 @@
           title={this.state.dict['header.modal.search.edit']}
           visible={modaltype === 'search'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2559,6 +2750,7 @@
           title={modaltype === 'actionEdit' ? this.state.dict['header.modal.action.edit'] : this.state.dict['header.modal.action.copy']}
           visible={modaltype === 'actionEdit' || modaltype === 'actionCopy'}
           width={800}
+          maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
             modaltype === 'actionEdit' ? <Button key="delete" className="mk-btn mk-purple" onClick={this.creatFunc} loading={this.state.funcLoading}>{this.state.dict['header.menu.func.create']}</Button> : null,
@@ -2581,6 +2773,7 @@
           title={this.state.dict['header.modal.column.edit']}
           visible={modaltype === 'columns'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2597,6 +2790,7 @@
           title={this.state.dict['header.modal.colspan.edit']}
           visible={modaltype === 'colspan'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2613,6 +2807,7 @@
           title={this.state.dict['header.modal.gridbtn.edit']}
           visible={modaltype === 'gridbtn'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2628,6 +2823,7 @@
           title={this.state.dict['header.modal.tabs.edit']}
           visible={modaltype === 'tabs'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2647,6 +2843,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.tableVisible}
           width={'65vw'}
+          maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           cancelText={this.state.dict['header.close']}
           onOk={this.addFieldSubmit}
@@ -2669,6 +2866,7 @@
         <Modal
           wrapClassName="common-table-fields-modal"
           title={'楠岃瘉淇℃伅'}
+          maskClosable={false}
           visible={this.state.profileVisible}
           width={'75vw'}
           style={{minWidth: '900px', maxWidth: '1200px'}}
@@ -2704,6 +2902,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.settingVisible}
           width={700}
+          maskClosable={false}
           // onOk={this.settingSave}
           onCancel={() => { // 鍙栨秷淇敼
             this.setState({
@@ -2729,6 +2928,7 @@
         <Modal
           bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
           closable={false}
+          maskClosable={false}
           visible={this.state.closeVisible}
           onCancel={() => { this.setState({closeVisible: false}) }}
           footer={[
diff --git a/src/templates/formtabconfig/dragelement/card.jsx b/src/templates/formtabconfig/dragelement/card.jsx
index 0b907c4..f6617d9 100644
--- a/src/templates/formtabconfig/dragelement/card.jsx
+++ b/src/templates/formtabconfig/dragelement/card.jsx
@@ -113,6 +113,9 @@
               {card.type === 'textarea' ?
                 <TextArea defaultValue={card.initval} autosize={{ minRows: 2, maxRows: 6 }} /> : null
               }
+              {card.type === 'funcvar' &&
+                <Input style={{marginTop: '4px'}} defaultValue={card.linkfield} />
+              }
               {card.type === 'fileupload' ?
                 <Button>
                   <Icon type="upload" /> 鐐瑰嚮涓婁紶
diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx
index 1c350e4..ec9ca6c 100644
--- a/src/templates/formtabconfig/index.jsx
+++ b/src/templates/formtabconfig/index.jsx
@@ -81,9 +81,11 @@
     if (!config) {
       _config = JSON.parse(JSON.stringify(Source.baseConfig))
       _config.isAdd = true
+      if (menu && menu.LongParam && menu.LongParam.setting.dataresource) {
+        _config.setting.dataresource = menu.LongParam.setting.dataresource
+      }
     } else {
       _config = config
-      // _config.action = Source.baseConfig.action
     }
 
     if (menu && menu.LongParam && menu.LongParam.columns) {
@@ -374,7 +376,10 @@
   handleTab = (card) => {
     const { config } = this.state
 
-    let menus = [{value: 'mainTable', text: '涓绘暟鎹�'}]
+    let menus = [
+      {value: '', text: '绌�'},
+      {value: 'mainTable', text: '涓绘暟鎹�'}
+    ]
     let equalTabs = []
     let supMenu = card.supMenu || ''
     let equalTab = card.equalTab || []
@@ -1189,8 +1194,8 @@
 
       // 鏍囩涓嶅悎娉曟椂锛屽惎鐢ㄧ姸鎬佷负false
       if (_config.tabgroups.length > 1) {
-        _config.tabgroups.forEach(group => {
-          if (_config[group].length === 0) {
+        _config.tabgroups.forEach(groupId => {
+          if (_config[groupId].length === 0) {
             _config.enabled = false
           }
         })
@@ -1205,60 +1210,52 @@
         })
       }
 
-      delete _config.isAdd
+      _config.funcs = [] // 椤甸潰鍙婂瓙椤甸潰瀛樺偍杩囩▼闆�
 
-      try {
-        _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
-      } catch (e) {
-        notification.warning({
-          top: 92,
-          message: '缂栬瘧閿欒',
-          duration: 10
-        })
-        return
-      }
-
-      let btnParam = { // 娣诲姞鑿滃崟鎸夐挳
-        func: 'sPC_Button_AddUpt',
-        Type: 60,      // 娣诲姞鎸夐挳琛ㄥ崟椤典笅鐨勬寜閽�
-        ParentID: menu.MenuID,
-        MenuNo: menu.MenuNo,
-        Template: menu.PageParam.Template || '',
-        PageParam: '',
-        LongParam: '',
-        LText: config.action.map((item, index) => {
-          return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
+      if (_config.setting.datatype === 'query') {
+        _config.funcs.push({
+          type: 'view',
+          subtype: 'view',
+          uuid: btnTab.uuid,
+          intertype: _config.setting.interType || 'inner',
+          interface: _config.setting.interface || '',
+          tableName: _config.setting.tableName || '',
+          innerFunc: _config.setting.innerFunc || '',
+          outerFunc: _config.setting.outerFunc || ''
         })
       }
 
-      btnParam.LText = btnParam.LText.join(' union all ')
-      btnParam.LText = Utils.formatOptions(btnParam.LText)
-      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
-      
-      let tabParam = { // 娣诲姞鑿滃崟tab椤�
-        func: 'sPC_sMenusTab_AddUpt',
-        MenuID: btnTab.uuid,
-        LText: config.tabs.map((item, index) => {
-          return `select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
-        })
-      }
-      tabParam.LText = tabParam.LText.join(' union all ')
-      tabParam.LText = Utils.formatOptions(tabParam.LText)
-      tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-      tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+      _config.action.forEach(item => {
+        if (item.btnType !== 'cancel') {
+          _config.funcs.push({
+            type: 'button',
+            subtype: 'btn',
+            uuid: item.uuid,
+            label: item.label,
+            tablename: item.sql || '',
+            intertype: item.intertype,
+            interface: item.interface || '',
+            innerFunc: item.innerFunc || '',
+            outerFunc: item.outerFunc || '',
+            callbackFunc: item.callbackFunc || ''
+          })
+        }
+      })
 
-      let param = {
-        func: 'sPC_ButtonParam_AddUpt',
-        ParentID: menu.MenuID,
-        MenuID: btnTab.uuid,
-        MenuNo: menu.MenuNo,
-        Template: 'FormTab',
-        MenuName: btnTab.label,
-        PageParam: JSON.stringify({Template: 'FormTab'}),
-        LongParam: _LongParam
-      }
-      
+      _config.tabgroups.forEach(groupId => {
+        if (_config[groupId].length === 0) return
+
+        _config[groupId].forEach(tab => {
+          _config.funcs.push({
+            type: 'tab',
+            subtype: 'tab',
+            uuid: tab.uuid,
+            label: tab.label,
+            linkTab: tab.linkTab
+          })
+        })
+      })
+
       if (this.state.closeVisible) { // 鏄剧ず鍏抽棴瀵硅瘽妗嗘椂锛屾ā鎬佹涓繚瀛樻寜閽紝鏄剧ず淇濆瓨涓姸鎬�
         this.setState({
           menucloseloading: true
@@ -1269,72 +1266,176 @@
         })
       }
 
-      // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
-      // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
       new Promise(resolve => {
-        if (delActions.length > 0) {
-          let deffers = delActions.map(item => {
-            let _param = {
-              func: 'sPC_MainMenu_Del',
-              MenuID: item
-            }
-            return new Promise(resolve => {
-              Api.getSystemConfig(_param).then(response => {
-                resolve(response)
+        let deffers = []
+        _config.funcs.forEach(item => {
+          if (item.type === 'tab') {
+            let deffer = new Promise(resolve => {
+              Api.getSystemConfig({
+                func: 'sPC_Get_LongParam',
+                MenuID: item.linkTab
+              }).then(result => {
+                if (result.status && result.LongParam) {
+                  let _LongParam = ''
+        
+                  if (result.LongParam) {
+                    try {
+                      _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
+                      _LongParam = JSON.parse(_LongParam)
+                    } catch (e) {
+                      _LongParam = ''
+                    }
+                  }
+      
+                  if (_LongParam) {
+                    item.menuNo = _LongParam.tabNo
+                    item.subfuncs = _LongParam.funcs || []
+                  }
+                }
+                resolve()
               })
             })
+
+            deffers.push(deffer)
+          }
+        })
+
+        if (deffers.length === 0) {
+          resolve()
+        } else {
+          Promise.all(deffers).then(() => {
+            resolve()
           })
-          Promise.all(deffers).then(result => {
-            let error = null
-            result.forEach(response => {
-              if (!response.status) {
-                error = response
+        }
+      }).then(() => {
+        
+        // 鍒犻櫎娣诲姞鏍囪瘑
+        delete _config.isAdd
+  
+        try {
+          _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
+        } catch (e) {
+          notification.warning({
+            top: 92,
+            message: '缂栬瘧閿欒',
+            duration: 10
+          })
+
+          this.setState({
+            menucloseloading: false,
+            menuloading: false
+          })
+          return
+        }
+  
+        let btnParam = { // 娣诲姞鑿滃崟鎸夐挳
+          func: 'sPC_Button_AddUpt',
+          Type: 60,      // 娣诲姞鎸夐挳琛ㄥ崟椤典笅鐨勬寜閽�
+          ParentID: menu.MenuID,
+          MenuNo: menu.MenuNo,
+          Template: menu.PageParam.Template || '',
+          PageParam: '',
+          LongParam: '',
+          LText: config.action.map((item, index) => {
+            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
+          })
+        }
+  
+        btnParam.LText = btnParam.LText.join(' union all ')
+        btnParam.LText = Utils.formatOptions(btnParam.LText)
+        btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
+        btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+        
+        let tabParam = { // 娣诲姞鑿滃崟tab椤�
+          func: 'sPC_sMenusTab_AddUpt',
+          MenuID: btnTab.uuid,
+          LText: config.tabs.map((item, index) => {
+            return `select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
+          })
+        }
+        tabParam.LText = tabParam.LText.join(' union all ')
+        tabParam.LText = Utils.formatOptions(tabParam.LText)
+        tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
+        tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+  
+        let param = {
+          func: 'sPC_ButtonParam_AddUpt',
+          ParentID: menu.MenuID,
+          MenuID: btnTab.uuid,
+          MenuNo: menu.MenuNo,
+          Template: 'FormTab',
+          MenuName: btnTab.label,
+          PageParam: JSON.stringify({Template: 'FormTab'}),
+          LongParam: _LongParam
+        }
+
+        // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
+        // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
+        new Promise(resolve => {
+          if (delActions.length > 0) {
+            let deffers = delActions.map(item => {
+              let _param = {
+                func: 'sPC_MainMenu_Del',
+                MenuID: item
+              }
+              return new Promise(resolve => {
+                Api.getSystemConfig(_param).then(response => {
+                  resolve(response)
+                })
+              })
+            })
+            Promise.all(deffers).then(result => {
+              let error = null
+              result.forEach(response => {
+                if (!response.status) {
+                  error = response
+                }
+              })
+    
+              if (error) {
+                this.setState({
+                  menuloading: false,
+                  menucloseloading: false
+                })
+                notification.warning({
+                  top: 92,
+                  message: error.message,
+                  duration: 10
+                })
+                resolve(false)
+              } else {
+                this.setState({
+                  delActions: []
+                })
+                resolve(true)
               }
             })
-  
-            if (error) {
+          } else if (delActions.length === 0) {
+            resolve(true)
+          }
+        }).then(resp => {
+          if (resp === false) return
+    
+          Api.getSystemConfig(param).then(response => {
+            if (response.status) {
+              this.setState({
+                config: _config,
+                originMenu: _config
+              })
+    
+              this.submitAction(btnParam, tabParam)
+            } else {
               this.setState({
                 menuloading: false,
                 menucloseloading: false
               })
               notification.warning({
                 top: 92,
-                message: error.message,
+                message: response.message,
                 duration: 10
               })
-              resolve(false)
-            } else {
-              this.setState({
-                delActions: []
-              })
-              resolve(true)
             }
           })
-        } else if (delActions.length === 0) {
-          resolve(true)
-        }
-      }).then(resp => {
-        if (resp === false) return
-  
-        Api.getSystemConfig(param).then(response => {
-          if (response.status) {
-            this.setState({
-              config: _config,
-              originMenu: _config
-            })
-  
-            this.submitAction(btnParam, tabParam)
-          } else {
-            this.setState({
-              menuloading: false,
-              menucloseloading: false
-            })
-            notification.warning({
-              top: 92,
-              message: response.message,
-              duration: 10
-            })
-          }
         })
       })
     }, () => {
@@ -2095,6 +2196,7 @@
           title={this.state.dict['header.modal.form.edit']}
           visible={modaltype === 'search'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2111,6 +2213,7 @@
           title={this.state.dict['header.modal.action.edit']}
           visible={modaltype === 'actionEdit'}
           width={700}
+          maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
             this.state.card && this.state.card.btnType !== 'cancel' ?
@@ -2133,6 +2236,7 @@
           title={this.state.dict['header.modal.tabs.edit']}
           visible={modaltype === 'tabs'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2152,6 +2256,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.tableVisible}
           width={'65vw'}
+          maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           cancelText={this.state.dict['header.close']}
           onOk={this.addFieldSubmit}
@@ -2175,6 +2280,7 @@
           title={'楠岃瘉淇℃伅'}
           visible={this.state.profileVisible}
           width={'75vw'}
+          maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ profileVisible: false }) }}
@@ -2194,7 +2300,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.settingVisible}
           width={700}
-          // onOk={this.settingSave}
+          maskClosable={false}
           onCancel={() => { // 鍙栨秷淇敼
             this.setState({
               settingVisible: false
@@ -2218,6 +2324,7 @@
         <Modal
           bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
           closable={false}
+          maskClosable={false}
           visible={this.state.closeVisible}
           onCancel={() => { this.setState({closeVisible: false}) }}
           footer={[
@@ -2233,6 +2340,7 @@
           title={this.state.dict['header.menu.group.manage']}
           visible={this.state.groupVisible}
           width={700}
+          maskClosable={false}
           onOk={this.handleGroupSave}
           onCancel={() => { this.setState({ groupVisible: false }) }}
           destroyOnClose
diff --git a/src/templates/formtabconfig/settingform/index.jsx b/src/templates/formtabconfig/settingform/index.jsx
index f3eba02..b469fbf 100644
--- a/src/templates/formtabconfig/settingform/index.jsx
+++ b/src/templates/formtabconfig/settingform/index.jsx
@@ -204,7 +204,7 @@
           <Col span={12}>
             <Form.Item label={dict['header.menu.datasource']}>
               {getFieldDecorator('datatype', {
-                initialValue: setting.datatype || 'maintable'
+                initialValue: setting.datatype || 'query'
               })(
                 <Radio.Group onChange={this.sourceChange}>
                   <Radio value="maintable">{dict['header.menu.maintable']}</Radio>
diff --git a/src/templates/formtabconfig/source.jsx b/src/templates/formtabconfig/source.jsx
index b66366c..568c66d 100644
--- a/src/templates/formtabconfig/source.jsx
+++ b/src/templates/formtabconfig/source.jsx
@@ -12,6 +12,7 @@
       tableName: '',
       primaryKey: '',
       dataresource: '',
+      datatype: 'query',
       interType: 'inner',
       sysInterface: 'false',
       innerFunc: '',
diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx
index e299d77..df9065f 100644
--- a/src/templates/modalconfig/index.jsx
+++ b/src/templates/modalconfig/index.jsx
@@ -1058,6 +1058,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.tableVisible}
           width={'65vw'}
+          maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           onOk={this.addFieldSubmit}
           cancelText={this.state.dict['header.close']}
@@ -1075,6 +1076,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.settingVisible}
           width={700}
+          maskClosable={false}
           onOk={this.settingSave}
           onCancel={() => { this.setState({ settingVisible: false }) }}
           destroyOnClose
@@ -1088,6 +1090,7 @@
         <Modal
           bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
           closable={false}
+          maskClosable={false}
           visible={this.state.closeVisible}
           onCancel={() => { this.setState({closeVisible: false}) }}
           footer={[
@@ -1103,6 +1106,7 @@
           title={this.state.dict['header.menu.group.manage']}
           visible={this.state.groupVisible}
           width={700}
+          maskClosable={false}
           onOk={this.handleGroupSave}
           onCancel={() => { this.setState({ groupVisible: false }) }}
           destroyOnClose
diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx
index 71192b8..d1d0e58 100644
--- a/src/templates/modalconfig/settingform/index.jsx
+++ b/src/templates/modalconfig/settingform/index.jsx
@@ -21,14 +21,14 @@
     if (config.groups.length > 0) {
       config.groups.forEach(group => {
         group.sublist.forEach(item => {
-          if (item.field && (item.type === 'text' || item.type === 'number')) {
+          if (item.field && (item.type === 'text' || item.type === 'number') && item.hidden !== 'true' && item.readonly !== 'true') {
             fields.push(item)
           }
         })
       })
     } else if (config.fields.length > 0) {
       config.fields.forEach(f => {
-        if (f.field && (f.type === 'text' || f.type === 'number')) {
+        if (f.field && (f.type === 'text' || f.type === 'number') && f.hidden !== 'true' && f.readonly !== 'true') {
           fields.push(f)
         }
       })
diff --git a/src/templates/subtableconfig/actionform/index.jsx b/src/templates/subtableconfig/actionform/index.jsx
index 8335a8f..415be65 100644
--- a/src/templates/subtableconfig/actionform/index.jsx
+++ b/src/templates/subtableconfig/actionform/index.jsx
@@ -89,7 +89,6 @@
     let _intertype = ''
     let _position = ''
     let _tabType = ''
-    let _linkTab = ''
     let _options = null
 
     this.props.formlist.forEach(form => {
@@ -101,13 +100,10 @@
         _position = form.initVal
       } else if (form.key === 'tabType') {
         _tabType = form.initVal
-      } else if (form.key === 'linkTab') {
-        _linkTab = form.initVal
       }
     })
 
     let _tabs = this.props.tabs.filter(tab => tab.type === _tabType)
-    let initTab = _tabs.filter(tab => tab.uuid === _linkTab)[0]
 
     if (_opentype === 'popview') {
       _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose']
@@ -159,9 +155,6 @@
             },
             ..._tabs
           ]
-          if (!initTab) {
-            item.initVal = ''
-          }
         } else if (item.key === 'OpenType') {
           item.options = [
             {
diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 5256d39..d1d9d49 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -1227,50 +1227,49 @@
         _config.enabled = false
       }
 
-      // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
-      delete _config.type
-      delete _config.isAdd
+      _config.funcs = []
 
-      try {
-        _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
-      } catch (e) {
-        notification.warning({
-          top: 92,
-          message: '缂栬瘧閿欒',
-          duration: 10
-        })
-        return
-      }
+      _config.funcs.push({
+        type: 'view',
+        subtype: 'view',
+        uuid: _config.uuid,
+        intertype: _config.setting.interType || 'inner',
+        interface: _config.setting.interface || '',
+        tableName: _config.setting.tableName || '',
+        innerFunc: _config.setting.innerFunc || '',
+        outerFunc: _config.setting.outerFunc || ''
+      })
 
-      let btnParam = {
-        func: 'sPC_Button_AddUpt',
-        Type: 40,
-        ParentID: _config.uuid,
-        MenuNo: res.tabNo,
-        Template: 'SubTable',
-        PageParam: '',
-        LongParam: '',
-        LText: config.action.map((item, index) => {
-          return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
-        })
-      }
+      _config.action.forEach(item => {
+        let tablename = item.OpenType === 'excelIn' ? (item.sheet || '') : (item.sql || '')
 
-      btnParam.LText = btnParam.LText.join(' union all ')
-      btnParam.LText = Utils.formatOptions(btnParam.LText)
-      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+        if (item.OpenType === 'excelOut' && item.intertype === 'inner' && !item.innerFunc) {
+          tablename = _config.setting.tableName || ''
+        }
 
-      let param = {
-        func: 'sPC_Tab_AddUpt',
-        MenuID: _config.uuid,
-        MenuNo: res.tabNo,
-        Template: 'SubTable',
-        MenuName: res.tabName,
-        Remark: res.Remark,
-        Sort: 0,
-        PageParam: JSON.stringify({Template: 'SubTable'}),
-        LongParam: _LongParam
-      }
+        if (item.OpenType === 'popview') {
+          _config.funcs.push({
+            type: 'tab',
+            subtype: 'btn',
+            uuid: item.uuid,
+            label: item.label,
+            linkTab: item.linkTab
+          })
+        } else {
+          _config.funcs.push({
+            type: 'button',
+            subtype: 'btn',
+            uuid: item.uuid,
+            label: item.label,
+            tablename: tablename,
+            intertype: item.intertype,
+            interface: item.interface || '',
+            innerFunc: item.innerFunc || '',
+            outerFunc: item.outerFunc || '',
+            callbackFunc: item.callbackFunc || ''
+          })
+        }
+      })
 
       if (this.state.closeVisible) { // 鏄剧ず鍏抽棴瀵硅瘽妗嗘椂锛屾ā鎬佹涓繚瀛樻寜閽紝鏄剧ず淇濆瓨涓姸鎬�
         this.setState({
@@ -1282,77 +1281,170 @@
         })
       }
 
-      
-      // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
-      // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
       new Promise(resolve => {
-        if (delActions.length > 0) {
-          let deffers = delActions.map(item => {
-            let _param = {
-              func: 'sPC_MainMenu_Del',
-              MenuID: item
-            }
-            return new Promise(resolve => {
-              Api.getSystemConfig(_param).then(response => {
-                resolve(response)
+        let deffers = []
+        _config.funcs.forEach(item => {
+          if (item.type === 'tab') {
+            let deffer = new Promise(resolve => {
+              Api.getSystemConfig({
+                func: 'sPC_Get_LongParam',
+                MenuID: item.linkTab
+              }).then(result => {
+                if (result.status && result.LongParam) {
+                  let _LongParam = ''
+        
+                  if (result.LongParam) {
+                    try {
+                      _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
+                      _LongParam = JSON.parse(_LongParam)
+                    } catch (e) {
+                      _LongParam = ''
+                    }
+                  }
+      
+                  if (_LongParam) {
+                    item.menuNo = _LongParam.tabNo
+                    item.subfuncs = _LongParam.funcs || []
+                  }
+                }
+                resolve()
               })
             })
+
+            deffers.push(deffer)
+          }
+        })
+
+        if (deffers.length === 0) {
+          resolve()
+        } else {
+          Promise.all(deffers).then(() => {
+            resolve()
           })
-          Promise.all(deffers).then(result => {
-            let error = null
-            result.forEach(response => {
-              if (!response.status) {
-                error = response
+        }
+      }).then(() => {
+
+        // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
+        delete _config.type
+        delete _config.isAdd
+  
+        try {
+          _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
+        } catch (e) {
+          notification.warning({
+            top: 92,
+            message: '缂栬瘧閿欒',
+            duration: 10
+          })
+
+          this.setState({
+            menucloseloading: false,
+            menuloading: false
+          })
+          return
+        }
+  
+        let btnParam = {
+          func: 'sPC_Button_AddUpt',
+          Type: 40,
+          ParentID: _config.uuid,
+          MenuNo: res.tabNo,
+          Template: 'SubTable',
+          PageParam: '',
+          LongParam: '',
+          LText: config.action.map((item, index) => {
+            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
+          })
+        }
+  
+        btnParam.LText = btnParam.LText.join(' union all ')
+        btnParam.LText = Utils.formatOptions(btnParam.LText)
+        btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
+        btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+  
+        let param = {
+          func: 'sPC_Tab_AddUpt',
+          MenuID: _config.uuid,
+          MenuNo: res.tabNo,
+          Template: 'SubTable',
+          MenuName: res.tabName,
+          Remark: res.Remark,
+          Sort: 0,
+          PageParam: JSON.stringify({Template: 'SubTable'}),
+          LongParam: _LongParam
+        }
+
+        // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
+        // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
+        new Promise(resolve => {
+          if (delActions.length > 0) {
+            let deffers = delActions.map(item => {
+              let _param = {
+                func: 'sPC_MainMenu_Del',
+                MenuID: item
+              }
+              return new Promise(resolve => {
+                Api.getSystemConfig(_param).then(response => {
+                  resolve(response)
+                })
+              })
+            })
+            Promise.all(deffers).then(result => {
+              let error = null
+              result.forEach(response => {
+                if (!response.status) {
+                  error = response
+                }
+              })
+    
+              if (error) {
+                this.setState({
+                  menuloading: false,
+                  menucloseloading: false
+                })
+                notification.warning({
+                  top: 92,
+                  message: error.message,
+                  duration: 10
+                })
+                resolve(false)
+              } else {
+                this.setState({
+                  delActions: []
+                })
+                resolve(true)
               }
             })
+          } else if (delActions.length === 0) {
+            resolve(true)
+          }
+        }).then(resp => {
+          if (resp === false) return
   
-            if (error) {
+          Api.getSystemConfig(param).then(response => {
+            if (response.status) {
+              this.setState({
+                config: _config,
+                originConfig: _config
+              }, () => {
+                this.setState({
+                  menuloading: false,
+                  menucloseloading: false
+                })
+                this.submitAction(btnParam)
+              })
+            } else {
               this.setState({
                 menuloading: false,
                 menucloseloading: false
               })
               notification.warning({
                 top: 92,
-                message: error.message,
+                message: response.message,
                 duration: 10
               })
-              resolve(false)
-            } else {
-              this.setState({
-                delActions: []
-              })
-              resolve(true)
             }
           })
-        } else if (delActions.length === 0) {
-          resolve(true)
-        }
-      }).then(resp => {
-        if (resp === false) return
-
-        Api.getSystemConfig(param).then(response => {
-          if (response.status) {
-            this.setState({
-              config: _config,
-              originConfig: _config
-            }, () => {
-              this.setState({
-                menuloading: false,
-                menucloseloading: false
-              })
-              this.submitAction(btnParam)
-            })
-          } else {
-            this.setState({
-              menuloading: false,
-              menucloseloading: false
-            })
-            notification.warning({
-              top: 92,
-              message: response.message,
-              duration: 10
-            })
-          }
         })
       })
     }, () => {
@@ -2111,6 +2203,7 @@
           title={this.state.dict['header.modal.search.edit']}
           visible={modaltype === 'search'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2127,6 +2220,7 @@
           title={modaltype === 'actionEdit' ? this.state.dict['header.modal.action.edit'] : this.state.dict['header.modal.action.copy']}
           visible={modaltype === 'actionEdit' || modaltype === 'actionCopy'}
           width={700}
+          maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
             modaltype === 'actionEdit' ? <Button key="delete" className="mk-btn mk-purple" onClick={this.creatFunc} loading={this.state.funcLoading}>{this.state.dict['header.menu.func.create']}</Button> : null,
@@ -2149,6 +2243,7 @@
           title={this.state.dict['header.modal.column.edit']}
           visible={modaltype === 'columns'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2165,6 +2260,7 @@
           title={this.state.dict['header.modal.colspan.edit']}
           visible={modaltype === 'colspan'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2181,6 +2277,7 @@
           title={this.state.dict['header.modal.gridbtn.edit']}
           visible={modaltype === 'gridbtn'}
           width={700}
+          maskClosable={false}
           onOk={this.handleSubmit}
           onCancel={this.editModalCancel}
           destroyOnClose
@@ -2197,6 +2294,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.tableVisible}
           width={'65vw'}
+          maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           cancelText={this.state.dict['header.close']}
           onOk={this.addFieldSubmit}
@@ -2221,6 +2319,7 @@
           title={'楠岃瘉淇℃伅'}
           visible={this.state.profileVisible}
           width={'75vw'}
+          maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ profileVisible: false }) }}
@@ -2255,7 +2354,7 @@
           title={this.state.dict['header.edit']}
           visible={this.state.settingVisible}
           width={700}
-          // onOk={this.settingSave}
+          maskClosable={false}
           onCancel={() => { // 鍙栨秷淇敼
             this.setState({
               settingVisible: false
@@ -2280,6 +2379,7 @@
         <Modal
           bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
           closable={false}
+          maskClosable={false}
           visible={this.state.closeVisible}
           onCancel={() => { this.setState({closeVisible: false}) }}
           footer={[
diff --git a/src/templates/tableshare/formconfig.js b/src/templates/tableshare/formconfig.js
index 80b340e..2413581 100644
--- a/src/templates/tableshare/formconfig.js
+++ b/src/templates/tableshare/formconfig.js
@@ -933,6 +933,25 @@
       required: false
     },
     {
+      type: 'select',
+      key: 'regular',
+      label: Formdict['header.form.regular'],
+      initVal: card.regular || '',
+      options: [{
+        value: '',
+        text: Formdict['header.form.empty']
+      }, {
+        value: 'number',
+        text: Formdict['header.form.number']
+      }, {
+        value: 'letter',
+        text: Formdict['header.form.letter']
+      }, {
+        value: 'letter&number',
+        text: Formdict['header.form.letter&number']
+      }]
+    },
+    {
       type: 'radio',
       key: 'readonly',
       label: Formdict['header.form.readonly'],
@@ -988,6 +1007,7 @@
       type: 'number',
       key: 'fieldlength',
       label: Formdict['header.form.field.length'],
+      tooltip: '鏂囨湰銆佷笅鎷夋銆佹棩鏈熺瓑瀛楁榛樿闀垮害涓�50锛屽琛屾枃鏈笌鏂囦欢涓婁紶瀛楁榛樿闀垮害涓�512',
       initVal: card.fieldlength || _fieldlength,
       required: false
     },
diff --git a/src/templates/tableshare/tabdragelement/index.jsx b/src/templates/tableshare/tabdragelement/index.jsx
index a6a9328..8c29d38 100644
--- a/src/templates/tableshare/tabdragelement/index.jsx
+++ b/src/templates/tableshare/tabdragelement/index.jsx
@@ -49,9 +49,9 @@
       newcard.label = 'tab'
       newcard.icon = ''
       newcard.type = item.subType
-      newcard.linkTab = Utils.getuuid()
+      newcard.linkTab = ''
       newcard.subtabs = []
-      newcard.supMenu = ''
+      newcard.supMenu = 'mainTable'
       newcard.groupId = groupId
       newcard.focus = true
       
diff --git a/src/templates/tableshare/verifycardexcelin/columnform/index.jsx b/src/templates/tableshare/verifycardexcelin/columnform/index.jsx
index 3470733..3fc28f9 100644
--- a/src/templates/tableshare/verifycardexcelin/columnform/index.jsx
+++ b/src/templates/tableshare/verifycardexcelin/columnform/index.jsx
@@ -13,7 +13,8 @@
 
   state = {
     editItem: null, // 缂栬緫鍏冪礌
-    type: 'Nvarchar(50)'
+    type: 'Nvarchar(50)',
+    locked: false
   }
 
   edit = (record) => {
@@ -35,11 +36,33 @@
       required: record.required,
       type: record.type
     })
+    if (record.type === 'Int' || /^Decimal/ig.test(record.type)) {
+      this.setState({
+        locked: true
+      })
+    } else {
+      this.setState({
+        locked: false
+      })
+    }
   }
 
   typeChange = (val) => {
     this.setState({
       type: val
+    }, () => {
+      if (val === 'Int' || /^Decimal/ig.test(val)) {
+        this.props.form.setFieldsValue({
+          required: 'true',
+        })
+        this.setState({
+          locked: true
+        })
+      } else {
+        this.setState({
+          locked: false
+        })
+      }
     })
   }
 
@@ -50,9 +73,18 @@
       if (!err) {
         values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
 
+        if (/^Nvarchar/ig.test(values.type)) {
+          values.limit = values.type.match(/\d+/)[0]
+        } else if (/^Decimal/ig.test(values.type)) {
+          values.limit = values.type.match(/\d+/ig)[1]
+        } else {
+          values.limit = ''
+        }
+
         this.props.columnChange(values)
         this.setState({
-          editItem: null
+          editItem: null,
+          locked: false
         })
         this.props.form.setFieldsValue({
           Column: '',
@@ -109,23 +141,6 @@
             </Form.Item>
           </Col>
           <Col span={7}>
-            <Form.Item label={'鏄惁蹇呭~'}>
-              {getFieldDecorator('required', {
-                initialValue: 'true'
-              })(
-                <Select>
-                  <Select.Option value="false"> 鍚� </Select.Option>
-                  <Select.Option value="true"> 鏄� </Select.Option>
-                </Select>
-              )}
-            </Form.Item>
-          </Col>
-          <Col span={3} className="add">
-            <Button onClick={this.handleConfirm} type="primary" className="add-row">
-              纭畾
-            </Button>
-          </Col>
-          <Col span={7}>
             <Form.Item label={'绫诲瀷'}>
               {getFieldDecorator('type', {
                 initialValue: 'Nvarchar(50)'
@@ -145,6 +160,23 @@
               )}
             </Form.Item>
           </Col>
+          <Col span={3} className="add">
+            <Button onClick={this.handleConfirm} type="primary" className="add-row">
+              纭畾
+            </Button>
+          </Col>
+          <Col span={7}>
+            <Form.Item label={'鏄惁蹇呭~'}>
+              {getFieldDecorator('required', {
+                initialValue: 'true'
+              })(
+                <Select disabled={this.state.locked}>
+                  <Select.Option value="false"> 鍚� </Select.Option>
+                  <Select.Option value="true"> 鏄� </Select.Option>
+                </Select>
+              )}
+            </Form.Item>
+          </Col>
           {haslimit ? <Col span={7}>
             <Form.Item label={'鏈�灏忓��'}>
               {getFieldDecorator('min', {
diff --git a/src/templates/tableshare/verifycardexcelin/index.jsx b/src/templates/tableshare/verifycardexcelin/index.jsx
index b68375f..5a5254a 100644
--- a/src/templates/tableshare/verifycardexcelin/index.jsx
+++ b/src/templates/tableshare/verifycardexcelin/index.jsx
@@ -32,17 +32,17 @@
         editable: true
       },
       {
+        title: '绫诲瀷',
+        dataIndex: 'type',
+        width: '12%',
+        editable: true
+      },
+      {
         title: '鏄惁蹇呭~',
         dataIndex: 'required',
         width: '12%',
         editable: true,
         render: (text, record) => record.required === 'true' ? '鏄�' : '鍚�'
-      },
-      {
-        title: '绫诲瀷',
-        dataIndex: 'type',
-        width: '12%',
-        editable: true
       },
       {
         title: '鏈�灏忓��',
@@ -134,6 +134,14 @@
       col.required = col.required || 'true'
       col.type = col.type || 'Nvarchar(50)'
       
+      if (/^Nvarchar/ig.test(col.type)) {
+        col.limit = col.type.match(/\d+/)[0]
+      } else if (/^Decimal/ig.test(col.type)) {
+        col.limit = col.type.match(/\d+/ig)[1]
+      } else {
+        col.limit = ''
+      }
+
       return col
     })
 
diff --git a/src/templates/ushare/modalform/index.jsx b/src/templates/ushare/modalform/index.jsx
index 3b27a2d..063fa5c 100644
--- a/src/templates/ushare/modalform/index.jsx
+++ b/src/templates/ushare/modalform/index.jsx
@@ -57,8 +57,10 @@
       _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin']
     } else if (type === 'fileupload') {
       _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
-    } else if (type === 'text' || type === 'textarea') {
+    } else if (type === 'textarea') {
       _options = [..._options, 'fieldlength']
+    } else if (type === 'text') {
+      _options = [..._options, 'fieldlength', 'regular']
     }
 
     if (type === 'select') {
@@ -117,8 +119,10 @@
         _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin']
       } else if (value === 'fileupload') {
         _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
-      } else if (value === 'text' || value === 'textarea') {
+      } else if (value === 'textarea') {
         _options = [..._options, 'fieldlength']
+      } else if (value === 'text') {
+        _options = [..._options, 'fieldlength', 'regular']
       }
 
       if (value === 'select') {
@@ -257,7 +261,12 @@
         }
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.label}>
+            <Form.Item label={item.tooltip ?
+              <Tooltip placement="topLeft" title={item.tooltip}>
+                <Icon type="question-circle" />
+                {item.label}
+              </Tooltip> : item.label
+            }>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal || '',
                 rules: [
diff --git a/src/utils/option.js b/src/utils/option.js
index b606bae..13f9719 100644
--- a/src/utils/option.js
+++ b/src/utils/option.js
@@ -9,7 +9,11 @@
 export const formRule = {
   input: {
     max: 100,
-    message: '杈撳叆妗嗘渶澶�100涓瓧绗︺��'
+    message: '杈撳叆妗嗘渶澶�100涓瓧绗︺��',
+    formMessage: '鏈�澶欯max涓瓧绗︺��', // 鏂囨湰琛ㄥ崟鏈�澶ф彁绀�
+    numbermsg: '璇疯緭鍏ユ暟瀛楋紒',
+    lettermsg: '璇疯緭鍏ュ瓧姣嶏紒',
+    letternummsg: '璇疯緭鍏ユ暟瀛楁垨瀛楁瘝锛�'
   },
   field: { // 瀛楁鍚�
     max: 50,
diff --git a/src/utils/utils.js b/src/utils/utils.js
index ea12648..6de456a 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -464,12 +464,10 @@
 
           val = val.replace(/(^\s*$)|\t*|\v*/ig, '')
 
-          let limitlen = col.type.match(/\d+/)[0]
-
           if (!val && col.required === 'true') { // 蹇呭~鏍¢獙
             let _error =  _position + dict['main.excel.content.emptyerror']
             errors.push(_error)
-          } else if (val.length > limitlen) {    // 闀垮害鏍¢獙
+          } else if (val.length > col.limit) {    // 闀垮害鏍¢獙
             let _error =  _position + dict['main.excel.content.maxlimit']
             errors.push(_error)
           } else {                               // 鍏抽敭瀛楁牎楠�
@@ -482,36 +480,47 @@
             })
           }
         } else if (/^int/ig.test(col.type)) {
-          if (typeof(val) !== 'number' || parseInt(val) < parseFloat(val)) { // 妫�楠屾槸鍚︿负鏁存暟
-            let _error = _position + dict['main.excel.content.interror']
+          if (!val) {
+            let _error =  _position + dict['main.excel.content.emptyerror']
             errors.push(_error)
-          } else if ((col.min || col.min === 0) && val < col.min) {          // 鏈�灏忓�兼楠�
-            let _error = _position + dict['main.excel.content.limitmin']
-            errors.push(_error)
-          } else if ((col.max || col.max === 0) && val > col.max) {          // 鏈�澶у�兼楠�
-            let _error = _position + dict['main.excel.content.limitmax']
-            errors.push(_error)
+          } else {
+            let _val = val + ''
+
+            if (!/^(([^0][0-9]+|0)$)|^(([1-9]+)$)/.test(_val)) {               // 妫�楠屾槸鍚︿负鏁存暟
+              let _error = _position + dict['main.excel.content.interror']
+              errors.push(_error)
+            } else if ((col.min || col.min === 0) && val < col.min) {          // 鏈�灏忓�兼楠�
+              let _error = _position + dict['main.excel.content.limitmin']
+              errors.push(_error)
+            } else if ((col.max || col.max === 0) && val > col.max) {          // 鏈�澶у�兼楠�
+              let _error = _position + dict['main.excel.content.limitmax']
+              errors.push(_error)
+            }
           }
         } else if (/^Decimal/ig.test(col.type)) {
-          let _val = val + ''
-          _val = _val.split('.')
-          let limitlen = col.type.match(/\d+/ig)[1]
+          if (!val) {
+            let _error =  _position + dict['main.excel.content.emptyerror']
+            errors.push(_error)
+          } else {
+            let _val = val + ''
+            let _vals = _val.split('.')
 
-          if (typeof(val) !== 'number') {                           // 妫�楠屾槸鍚︿负娴偣鏁�
-            let _error = _position + dict['main.excel.content.floaterror']
-            errors.push(_error)
-          } else if (_val[0].length > 18) {                         // 妫�楠屾暣鏁颁綅
-            let _error = _position + dict['main.excel.content.floatIntover']
-            errors.push(_error)
-          } else if (_val[1] && _val[1].length > limitlen) {        // 鏈�灏忓�兼楠�
-            let _error = _position + dict['main.excel.content.floatPointover']
-            errors.push(_error)
-          } else if ((col.min || col.min === 0) && val < col.min) { // 鏈�灏忓�兼楠�
-            let _error = _position + dict['main.excel.content.limitmin']
-            errors.push(_error)
-          } else if ((col.max || col.max === 0) && val > col.max) { // 鏈�澶у�兼楠�
-            let _error = _position + dict['main.excel.content.limitmax']
-            errors.push(_error)
+            if (!/^(([^0][0-9]+|0)\.([0-9]+)$)|^(([^0][0-9]+|0)$)|^(([1-9]+)\.([0-9]+)$)|^(([1-9]+)$)/.test(_val)) {                           // 妫�楠屾槸鍚︿负娴偣鏁�
+              let _error = _position + dict['main.excel.content.floaterror']
+              errors.push(_error)
+            } else if (_vals[0].length > 18) {                         // 妫�楠屾暣鏁颁綅
+              let _error = _position + dict['main.excel.content.floatIntover']
+              errors.push(_error)
+            } else if (_vals[1] && _vals[1].length > col.limit) {       // 鏈�灏忓�兼楠�
+              let _error = _position + dict['main.excel.content.floatPointover']
+              errors.push(_error)
+            } else if ((col.min || col.min === 0) && val < col.min) { // 鏈�灏忓�兼楠�
+              let _error = _position + dict['main.excel.content.limitmin']
+              errors.push(_error)
+            } else if ((col.max || col.max === 0) && val > col.max) { // 鏈�澶у�兼楠�
+              let _error = _position + dict['main.excel.content.limitmax']
+              errors.push(_error)
+            }
           }
         }
         

--
Gitblit v1.8.0