king
2020-02-21 063b983daaf51a7f1e8677bde1e9c0e618866c91
2020-02-21
30个文件已修改
839 ■■■■ 已修改文件
src/components/sidemenu/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/main.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/main.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/actionList/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/formgroup/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/mutilform/index.jsx 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/actionform/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/dragelement/card.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 138 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/settingform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/source.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/actionform/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/formconfig.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/tabdragelement/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycardexcelin/columnform/index.jsx 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycardexcelin/index.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
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">
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': '正则校验',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
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 '
}
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': '正则校验',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
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': '请选择'
}
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}
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 {
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)
  }
  /**
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
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 (
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})
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>
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
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 = ''
              // 解析配置,修改模态框标题名称
              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,6 +1487,124 @@
        })
      }
      _config.funcs = [] // 页面及子页面存储过程集
      _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
          })
        })
      })
      if (this.state.closeVisible) { // 显示关闭对话框时,模态框中保存按钮,显示保存中状态
        this.setState({
          menucloseloading: true
        })
      } else {
        this.setState({
          menuloading: true
        })
      }
      new Promise(resolve => {
        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()
          })
        }
      }).then(() => {
      // 保存时删除配置类型,system 、user
      delete _config.type
      delete _config.isAdd
@@ -1421,6 +1616,10 @@
          top: 92,
          message: '编译错误',
          duration: 10
          })
          this.setState({
            menucloseloading: false,
            menuloading: false
        })
        return
      }
@@ -1465,16 +1664,6 @@
        Sort: (this.props.supMenuList.length + 1) * 10,
        PageParam: JSON.stringify(_pageParam),
        LongParam: _LongParam
      }
      if (this.state.closeVisible) { // 显示关闭对话框时,模态框中保存按钮,显示保存中状态
        this.setState({
          menucloseloading: true
        })
      } else {
        this.setState({
          menuloading: true
        })
      }
      // 有按钮或标签删除时,先进行删除操作
@@ -1552,6 +1741,7 @@
              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={[
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" /> 点击上传
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,6 +1210,106 @@
        })
      }
      _config.funcs = [] // 页面及子页面存储过程集
      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 || ''
        })
      }
      _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 || ''
          })
        }
      })
      _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
        })
      } else {
        this.setState({
          menuloading: true
        })
      }
      new Promise(resolve => {
        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()
          })
        }
      }).then(() => {
        // 删除添加标识
      delete _config.isAdd
      try {
@@ -1214,6 +1319,11 @@
          top: 92,
          message: '编译错误',
          duration: 10
          })
          this.setState({
            menucloseloading: false,
            menuloading: false
        })
        return
      }
@@ -1257,16 +1367,6 @@
        MenuName: btnTab.label,
        PageParam: JSON.stringify({Template: 'FormTab'}),
        LongParam: _LongParam
      }
      if (this.state.closeVisible) { // 显示关闭对话框时,模态框中保存按钮,显示保存中状态
        this.setState({
          menucloseloading: true
        })
      } else {
        this.setState({
          menuloading: true
        })
      }
      // 有按钮或标签删除时,先进行删除操作
@@ -1335,6 +1435,7 @@
              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
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>
src/templates/formtabconfig/source.jsx
@@ -12,6 +12,7 @@
      tableName: '',
      primaryKey: '',
      dataresource: '',
      datatype: 'query',
      interType: 'inner',
      sysInterface: 'false',
      innerFunc: '',
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
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)
        }
      })
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 = [
            {
src/templates/subtableconfig/index.jsx
@@ -1227,6 +1227,103 @@
        _config.enabled = false
      }
      _config.funcs = []
      _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 || ''
      })
      _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 === '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({
          menucloseloading: true
        })
      } else {
        this.setState({
          menuloading: true
        })
      }
      new Promise(resolve => {
        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()
          })
        }
      }).then(() => {
      // 保存时删除配置类型,system 、user
      delete _config.type
      delete _config.isAdd
@@ -1238,6 +1335,11 @@
          top: 92,
          message: '编译错误',
          duration: 10
          })
          this.setState({
            menucloseloading: false,
            menuloading: false
        })
        return
      }
@@ -1271,17 +1373,6 @@
        PageParam: JSON.stringify({Template: 'SubTable'}),
        LongParam: _LongParam
      }
      if (this.state.closeVisible) { // 显示关闭对话框时,模态框中保存按钮,显示保存中状态
        this.setState({
          menucloseloading: true
        })
      } else {
        this.setState({
          menuloading: true
        })
      }
      
      // 有按钮或标签删除时,先进行删除操作
      // 删除成功后,保存页面配置
@@ -1353,6 +1444,7 @@
              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={[
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
    },
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
      
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', {
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
    })
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: [
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,
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,7 +480,13 @@
            })
          }
        } else if (/^int/ig.test(col.type)) {
          if (typeof(val) !== 'number' || parseInt(val) < parseFloat(val)) { // 检验是否为整数
          if (!val) {
            let _error =  _position + dict['main.excel.content.emptyerror']
            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) {          // 最小值检验
@@ -492,18 +496,22 @@
            let _error = _position + dict['main.excel.content.limitmax']
            errors.push(_error)
          }
          }
        } else if (/^Decimal/ig.test(col.type)) {
          if (!val) {
            let _error =  _position + dict['main.excel.content.emptyerror']
            errors.push(_error)
          } else {
          let _val = val + ''
          _val = _val.split('.')
          let limitlen = col.type.match(/\d+/ig)[1]
            let _vals = _val.split('.')
          if (typeof(val) !== 'number') {                           // 检验是否为浮点数
            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 (_val[0].length > 18) {                         // 检验整数位
            } else if (_vals[0].length > 18) {                         // 检验整数位
            let _error = _position + dict['main.excel.content.floatIntover']
            errors.push(_error)
          } else if (_val[1] && _val[1].length > limitlen) {        // 最小值检验
            } 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) { // 最小值检验
@@ -514,6 +522,7 @@
            errors.push(_error)
          }
        }
        }
        
        return `'${val}' as ${col.Column}`
      })