king
2020-02-03 75623dd039b742dbb44fb4c6b4af563404ed9c7f
2020-02-03
4 文件已重命名
21个文件已修改
795 ■■■■■ 已修改文件
public/options.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/options.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/mainTable/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/subTable/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/mutilform/index.jsx 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 120 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/modalform/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/formconfig.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/searchform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/editable/index.jsx 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/editable/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.js
@@ -2,7 +2,7 @@
  service: 'mkwms',
  appId: '201912040924165801464FF1788654BC5AC73',
  appkey: '20191106103859640976D6E924E464D029CF0',
  mainSystemApi: 'http://cloud.mk9h.cn/webapi/dostar',
  mainSystemApi: 'http://cloud.mk9h.cn/webapi/dostars',
  title: '',
  platName: '',
  logo: '',
src/api/index.js
@@ -27,6 +27,7 @@
const setCurrentUrl = () => {
  if (!!(window.history && window.history.pushState)) {
    sessionStorage.clear()
    window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
    window.location.reload()
  }
@@ -134,19 +135,19 @@
      _rduri = window.GLOB.mainSystemApi
    }
    // param.nonc = Utils.getuuid()
    // param._ = new Date().getTime()
    // let keys = Object.keys(param).sort()
    // let values = keys.map(key => key + param[key]).join('')
    // param.sign  = md5(values)
    param.nonc = Utils.getuuid()
    let keys = Object.keys(param).sort()
    let values = keys.map(key => key + param[key]).join('')
    param.sign  = md5(values)
    param.t = new Date().getTime()
    if (_rduri) {
      param.rduri = _rduri
    }
    return axios({
      url: '/webapi/dostar',
      url: '/webapi/dostars',
      data: param
    })
  }
@@ -161,29 +162,32 @@
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    // param.nonc = Utils.getuuid()
    // param._ = new Date().getTime()
    // let keys = Object.keys(param).sort()
    // let values = keys.map(key => key + param[key]).join('')
    // param.sign  = md5(values)
    param.nonc = Utils.getuuid()
    let keys = Object.keys(param).sort()
    let values = keys.map(key => key + param[key]).join('')
    param.sign  = md5(values)
    param.t = new Date().getTime()
    return axios({
      url: '/webapi/dostar',
      url: '/webapi/dostars',
      data: param
    })
  }
  /**
   * @description 获取系统配置,优先从缓存中取值,增加appkey
   * @param {Object}  param   请求参数
   * @param {Boolean} SSO     是否为单点登录地址
   */
  getSystemCacheConfig (param) {
  getSystemCacheConfig (param, SSO = true) {
    param.userid = sessionStorage.getItem('UserID')
    param.lang = localStorage.getItem('lang') || ''
    param.SessionUid = sessionStorage.getItem('SessionUid') || ''
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    if (window.GLOB.mainSystemApi) {
    if (window.GLOB.mainSystemApi && SSO) {
      param.rduri = window.GLOB.mainSystemApi
    }
@@ -196,9 +200,17 @@
    if (GlobMap.has(_param)) {
      return Promise.resolve(GlobMap.get(_param))
    } else {
      param.nonc = Utils.getuuid()
      let keys = Object.keys(param).sort()
      keys = keys.filter(key => key !== 'rduri')
      let values = keys.map(key => key + param[key]).join('')
      param.sign  = md5(values)
      param.t = new Date().getTime()
      return new Promise(resolve => {
        axios({
          url: '/webapi/dostar',
          url: '/webapi/dostars',
          data: param
        }).then(res => {
@@ -222,8 +234,16 @@
      param.appkey = window.GLOB.appkey || ''
    }
    param.nonc = Utils.getuuid()
    let keys = Object.keys(param).sort()
    keys = keys.filter(key => key !== 'rduri' && key !== 't')
    let values = keys.map(key => key + param[key]).join('')
    param.sign  = md5(values)
    param.t = new Date().getTime()
    return axios({
      url: '/webapi/dostar',
      url: '/webapi/dostars',
      data: param
    })
  }
src/components/sidemenu/editthdmenu/index.jsx
@@ -61,7 +61,9 @@
    tabConfig: null,        // 标签配置信息
    editSubTab: null,       // 编辑子标签(标签中的标签)
    subTabConfig: null,     // 子标签配置信息
    subConfig: null         // 子配置信息
    subConfig: null,        // 子配置信息
    btnTab: null,           // 打开新标签或当前页面刷新的按钮
    btnTabConfig: null      // 打开新标签按钮配置
  }
  /**
@@ -184,7 +186,7 @@
      this.setState({
        tabview: 'template',
        editMenu: {
          MenuID: '',
          MenuID: Utils.getuuid(),
          MenuName: '',
          MenuNo: '',
          type: '',
@@ -445,15 +447,6 @@
    document.getElementById('root').style.overflowY = 'unset'
  }
  handleConfig = (type) => {
    this.setState({tabview: type})
    if (type) {
      document.getElementById('root').style.overflowY = 'hidden'
    } else {
      document.getElementById('root').style.overflowY = 'unset'
    }
  }
  handleView = (param) => {
    this.setState({
      tabview: ''
@@ -463,81 +456,6 @@
        document.getElementById('root').style.overflowY = 'hidden'
      } else {
        document.getElementById('root').style.overflowY = 'unset'
      }
    })
  }
  handleSubConfig = (item, originMenu, config, type) => {
    this.setState({
      tabview: ''
    }, () => {
      if (type === 'button') { // 三级菜单页面,按钮配置
        if (item.OpenType === 'pop') {
          let pageParam = ''
          if (config && config.type === 'Modal') {
            pageParam = config
          }
          this.setState({
            editMenu: originMenu,
            editTab: '',
            editAction: item,
            btnParam: pageParam,
            tabview: 'Modal'
          })
        }
      } else if (type === 'tab') { // 三级菜单页面,标签配置
        if (item.type === 'SubTable' || item.tabType === 'SubTable') {
          this.setState({
            editMenu: originMenu,
            editTab: config,
            editAction: '',
            tabview: 'SubTable'
          })
        }
      } else if (type === 'tabButton') { // 三级菜单下,标签下,按钮配置
        let pageParam = ''
        if (item.OpenType === 'popview') {
          if (config && config.Template === 'SubTable') {
            pageParam = config
          } else {
            pageParam = {
              ...item,
              uuid: item.linkTab,
              create: true
            }
          }
          this.setState({
            editMenu: originMenu,
            editTab: pageParam,
            editAction: item,
            tabview: 'SubTable'
          })
        } else {
          if (config && config.type === 'Modal') {
            pageParam = config
          }
          this.setState({
            editTab: originMenu,
            editAction: item,
            btnParam: pageParam,
            tabview: 'Modal'
          })
        }
      } else if (type === 'tabview') { // 三级菜单下,打开新标签页或当前页跳转,类型的按钮配置
        let pageParam = ''
        if (config && config.type === 'FormTab') {
          pageParam = config
        }
        this.setState({
          editMenu: originMenu,
          editAction: item,
          btnParam: pageParam,
          tabview: 'FormTab'
        })
      }
    })
  }
@@ -668,6 +586,8 @@
            tabConfig={this.state.tabConfig}
            editSubTab={this.state.editSubTab}
            subTabConfig={this.state.subTabConfig}
            btnTab={this.state.btnTab}
            btnTabConfig={this.state.btnTabConfig}
            editAction={this.state.editAction}
            subConfig={this.state.subConfig}
            handleView={this.handleView}
@@ -679,6 +599,8 @@
            editTab={this.state.editTab}
            editSubTab={this.state.editSubTab}
            tabConfig={this.state.tabConfig}
            btnTab={this.state.btnTab}
            btnTabConfig={this.state.btnTabConfig}
            config={this.state.subConfig}
            handleView={this.handleView}
          />
@@ -686,10 +608,9 @@
        {this.state.tabview === 'FormTab' &&
          <FormTabConfig
            menu={this.state.editMenu}
            config={this.state.btnParam}
            editAction={this.state.editAction}
            handleConfig={this.handleConfig}
            handleSubConfig={this.handleSubConfig}
            btnTab={this.state.btnTab}
            config={this.state.subConfig}
            handleView={this.handleView}
          />
        }
        {/* 图片预览 */}
src/locales/en-US/comtable.js
@@ -180,6 +180,10 @@
  'header.form.queryType': '查询类型',
  'header.form.query': '查询',
  'header.form.statistics': '统计',
  'header.form.database': '数据库',
  'header.form.database.local': '本地',
  'header.form.database.sso': '系统',
  'header.form.linkMain': '关联主表',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/locales/zh-CN/comtable.js
@@ -180,6 +180,10 @@
  'header.form.queryType': '查询类型',
  'header.form.query': '查询',
  'header.form.statistics': '统计',
  'header.form.database': '数据库',
  'header.form.database.local': '本地',
  'header.form.database.sso': '系统',
  'header.form.linkMain': '关联主表',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/store/options.js
@@ -2,7 +2,7 @@
export default {
  systemType: 'local', // Cloud 、 SSO 、 local, 云端使用系统配置appId
  AppId: '201912040924165801464FF1788654BC5AC73',
  cloudServiceApi: 'http://cloud.mk9h.cn/webapi/dostar',
  cloudServiceApi: 'http://cloud.mk9h.cn/webapi/dostars',
  cloudLoginApi: 'http://cloud.mk9h.cn/webapi/dologon',
  cloudDatabase: 'sqlserver',
  localDatabase: 'mysql'
src/tabviews/commontable/index.jsx
@@ -225,6 +225,7 @@
      if (item.resourceType === '1' && item.dataSource) {
        let _option = Utils.getSelectQueryOptions(item)
        let _sql = Utils.formatOptions(_option.sql)
        let isSSO = item.database === 'sso'
        let param = {
          func: 'sPC_Get_SelectedList',
@@ -237,7 +238,7 @@
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        let defer = new Promise(resolve => {
          Api.getSystemCacheConfig(param).then(res => {
          Api.getSystemCacheConfig(param, isSSO).then(res => {
            res.search = item
            resolve(res)
          })
@@ -308,7 +309,7 @@
      pickup: false
    })
    this.handleTableId('mainTable', '')
    this.handleTableId('mainTable', '', '')
    if (!param) { // 未获取参数时,不发请求
      return
@@ -638,13 +639,14 @@
  /**
   * @description 表格Id变化
   */
  handleTableId = (type, id) => {
  handleTableId = (type, id, data) => {
    const { BIDs } = this.state
    this.setState({
      BIDs: {
        ...BIDs,
        [type]: id
        [type]: id,
        [type + 'data']: data
      }
    })
  }
@@ -799,7 +801,6 @@
            return (
              <Tabs defaultActiveKey="0" key={group}>
                {config[group].map((_tab, index) => {
                  // return !_tab.supMenu || (_tab.supMenu && this.state.BIDs[_tab.supMenu]) ?
                  return (
                    <TabPane tab={
                      <span>
@@ -813,6 +814,7 @@
                          MenuID={_tab.linkTab}
                          SupMenuID={this.props.MenuID}
                          BID={this.state.BIDs[_tab.supMenu] || ''}
                          BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                          handleTableId={this.handleTableId}
                          handleMainTable={this.handleMainTable}
                        /> : null}
src/tabviews/commontable/mainTable/index.jsx
@@ -294,16 +294,18 @@
  changedata = (index) => {
    const { data, setting } = this.props
    let _id = ''
    let _data = ''
    if (data && data.length > 0 && index !== '') {
      _id = data[index][setting.primaryKey] || ''
      _data = data[index] || ''
    }
    this.setState({
      selectId: _id
    })
    this.props.handleTableId('mainTable', _id)
    this.props.handleTableId('mainTable', _id, _data)
  }
  resetTable = () => {
src/tabviews/subtable/index.jsx
@@ -21,6 +21,7 @@
  static propTpyes = {
    Tab: PropTypes.object,           // 标签信息
    BID: PropTypes.string,           // 上级数据ID
    BData: PropTypes.any,            // 上级数据
    MenuID: PropTypes.string,        // 菜单Id
    SupMenuID: PropTypes.string,     // 上级菜单Id
    handleTableId: PropTypes.func,   // 控制表格数据切换时,更新在主表中的id
@@ -202,6 +203,7 @@
      if (item.resourceType === '1' && item.dataSource) {
        let _option = Utils.getSelectQueryOptions(item)
        let _sql = Utils.formatOptions(_option.sql)
        let isSSO = item.database === 'sso'
        let param = {
          func: 'sPC_Get_SelectedList',
@@ -214,7 +216,7 @@
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        let defer = new Promise(resolve => {
          Api.getSystemCacheConfig(param).then(res => {
          Api.getSystemCacheConfig(param, isSSO).then(res => {
            res.search = item
            resolve(res)
          })
@@ -285,7 +287,7 @@
      param = this.getDefaultParam(_BID)
    }
    this.handleTableId('')
    this.handleTableId()
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -574,8 +576,8 @@
  /**
   * @description 表格Id变化
   */
  handleTableId = (id = '') => {
    this.props.handleTableId(this.props.Tab.uuid, id)
  handleTableId = (id = '', data = '') => {
    this.props.handleTableId(this.props.Tab.uuid, id, data)
  }
  /**
@@ -635,6 +637,7 @@
            actions={actions}
            Tab={this.props.Tab}
            BID={this.props.BID}
            BData={this.props.BData}
            dict={this.state.dict}
            MenuID={this.props.SupMenuID}
            refreshdata={this.refreshbyaction}
src/tabviews/subtable/subTable/index.jsx
@@ -303,12 +303,14 @@
  changedata = (index) => {
    const { data, setting } = this.props
    let _id = ''
    let _data = ''
    if (data && data.length > 0 && index !== '') {
      _id = data[index][setting.primaryKey] || ''
      _data = data[index] || ''
    }
    this.props.handleTableId(_id)
    this.props.handleTableId(_id, _data)
  }
  render() {
src/tabviews/subtabtable/index.jsx
@@ -181,6 +181,7 @@
      if (item.resourceType === '1' && item.dataSource) {
        let _option = Utils.getSelectQueryOptions(item)
        let _sql = Utils.formatOptions(_option.sql)
        let isSSO = item.database === 'sso'
        let param = {
          func: 'sPC_Get_SelectedList',
@@ -193,7 +194,7 @@
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        let defer = new Promise(resolve => {
          Api.getSystemCacheConfig(param).then(res => {
          Api.getSystemCacheConfig(param, isSSO).then(res => {
            res.search = item
            resolve(res)
          })
src/tabviews/tableshare/actionList/index.jsx
@@ -12,6 +12,7 @@
class MainAction extends Component {
  static propTpyes = {
    BID: PropTypes.string,
    BData: PropTypes.any,
    Tab: PropTypes.any,
    type: PropTypes.string,
    MenuID: PropTypes.string,
@@ -378,7 +379,7 @@
        }).then(res => {
          if (!res) return
          // 外部请求
          _outParam = res
          _outParam = JSON.parse(JSON.stringify(res))
          return Api.genericInterface(res)
        }).then(response => {
          if (!response) return
@@ -763,6 +764,7 @@
    let deffers = subfields.map(item => {
      let _option = Utils.getSelectQueryOptions(item)
      let _sql = Utils.formatOptions(_option.sql)
      let isSSO = item.database === 'sso'
      let param = {
        func: 'sPC_Get_SelectedList',
@@ -775,7 +777,7 @@
      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
      return new Promise(resolve => {
        Api.getSystemCacheConfig(param).then(res => {
        Api.getSystemCacheConfig(param, isSSO).then(res => {
          res.search = item
          resolve(res)
        })
@@ -937,6 +939,7 @@
          inputSubmit={this.handleOk}
          configMap={this.state.configMap}
          data={this.state.tabledata[0]}
          BData={this.props.BData}
          wrappedComponentRef={(inst) => this.formRef = inst}
        />
      </Modal>
src/tabviews/tableshare/mutilform/index.jsx
@@ -15,6 +15,7 @@
    action: PropTypes.object,    // 按钮信息、表单列表
    dict: PropTypes.object,      // 字典项
    data: PropTypes.any,         // 表格数据
    BData: PropTypes.any,        // 主表数据
    configMap: PropTypes.object, // 按钮及下拉表单配置信息集
    inputSubmit: PropTypes.func  // input回车提交
  }
@@ -26,7 +27,7 @@
  }
  componentDidMount () {
    const { data } = this.props
    const { data, BData } = this.props
    let action = JSON.parse(JSON.stringify(this.props.action))
    let datatype = {}
@@ -83,7 +84,9 @@
        }
      }
      if (!/^date/.test(item.type) && this.props.data && this.props.data.hasOwnProperty(item.field)) {
      if (item.type === 'linkMain' && BData && BData.hasOwnProperty(item.field)) {
        item.initval = BData[item.field]
      } else if (!/^date/.test(item.type) && this.props.data && this.props.data.hasOwnProperty(item.field)) {
        item.initval = this.props.data[item.field]
      }
@@ -443,16 +446,32 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'funcvar') {
      } else if (item.type === 'linkMain') {
        fields.push(
          <Col span={24 / cols} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {
                initialValue: item.linkfield || '',
                initialValue: item.initval,
                rules: [
                  {
                    required: item.required === 'true',
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly === 'true'} />)}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'funcvar') {
        // fields.push(
        //   <Col span={24 / cols} key={index}>
        //     <Form.Item label={item.label}>
        //       {getFieldDecorator(item.field, {
        //         initialValue: item.linkfield || '',
        //       })(<Input placeholder="" autoComplete="off" disabled={item.readonly === 'true'} />)}
        //     </Form.Item>
        //   </Col>
        // )
      } else if (item.type === 'textarea') {
        let _labelcol = cols !== 3 ? 8 / cols : 3
        let _wrapcol = cols !== 3 ? 16 + (cols - 1) * 4 : 21
@@ -493,13 +512,23 @@
          let search = []
          // 隐藏表单
          this.state.formlist.forEach(item => {
            if (item.hidden !== 'true' || !item.field) return
            search.push({
              type: this.state.datatype[item.field],
              readonly: this.state.readtype[item.field],
              key: item.field,
              value: item.initval
            })
            if (!item.field) return
            if (item.type === 'funcvar') {
              search.push({
                type: 'funcvar',
                readonly: 'true',
                key: item.field,
                value: ''
              })
            } else if (item.hidden === 'true') {
              search.push({
                type: this.state.datatype[item.field],
                readonly: this.state.readtype[item.field],
                key: item.field,
                value: item.initval
              })
            }
          })
          Object.keys(values).forEach(key => {
@@ -552,8 +581,8 @@
              })
            } else if (this.state.datatype[key] === 'fileupload') {
              let vals = []
              if (values[key].length > 0) {
              if (values[key] && values[key].length > 0) {
                values[key].forEach(_val => {
                  if (_val.origin && _val.url) {
                    vals.push(_val.url)
src/templates/comtableconfig/index.jsx
@@ -86,6 +86,7 @@
      if (!menu.isSubtable) { // 不是选择主子表时,隐藏标签页
        _config.tabs = []
      }
      _config.isAdd = true
    } else {
      _config = _LongParam
    }
@@ -1293,17 +1294,19 @@
    this.menuformRef.handleConfirm().then(res => {
      if (config.search[0] && config.search[0].origin) {
        config.search = config.search.filter(item => !item.origin)
      }
      if (config.action[0] && config.action[0].origin) {
        config.action = config.action.filter(item => !item.origin)
      }
      if (config.columns[0] && config.columns[0].origin) {
        config.columns = config.columns.filter(item => !item.origin)
      }
      if (config.tabs[0] && config.tabs[0].origin) {
        config.tabs = config.tabs.filter(item => !item.origin)
      if (config.isAdd) {
        if (config.search[0] && config.search[0].origin) {
          config.search = config.search.filter(item => !item.origin)
        }
        if (config.action[0] && config.action[0].origin) {
          config.action = config.action.filter(item => !item.origin)
        }
        if (config.columns[0] && config.columns[0].origin) {
          config.columns = config.columns.filter(item => !item.origin)
        }
        if (config.tabs[0] && config.tabs[0].origin) {
          config.tabs = config.tabs.filter(item => !item.origin)
        }
      }
      let _LongParam = ''
@@ -1323,6 +1326,7 @@
      // 保存时删除配置类型,system 、user
      delete _config.type
      delete _config.isAdd
      try {
        _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
@@ -1611,18 +1615,8 @@
    const { config, originMenu } = this.state
    let _this = this
    let isAdd = false
    if (
      (config.search[0] && config.search[0].origin) ||
      (config.action[0] && config.action[0].origin) ||
      (config.columns[0] && config.columns[0].origin) ||
      (config.tabs[0] && config.tabs[0].origin)
    ) {
      isAdd = true
    }
    if (isAdd) {
    if (config.isAdd) {
      confirm({
        content: '菜单尚未提交,确定放弃保存吗?',
        okText: this.state.dict['header.confirm'],
@@ -2017,11 +2011,13 @@
        let _view = ''
        let uuid = item.uuid
        let isbutton = true
        let _btnTab = null
        
        if (type === 'button' && item.OpenType === 'pop') {
          _view = 'Modal'             // 表单页面
        } else if (type === 'button' && (item.OpenType === 'tab' || item.OpenType === 'blank')) {
          _view = item.tabTemplate    // 新标签页模板
          _btnTab = item
        } else if (type === 'button' && item.OpenType === 'popview') {
          _view = item.tabType        // 新弹窗标签模板
          uuid = item.linkTab
@@ -2038,6 +2034,8 @@
          tabConfig: null,
          editSubTab: null,
          subTabConfig: null,
          btnTab: _btnTab,
          btnTabConfig: null,
          editAction: isbutton ? item : '',
          subConfig: '',
          tabview: _view
src/templates/formtabconfig/index.jsx
@@ -35,10 +35,9 @@
class ComTableConfig extends Component {
  static propTpyes = {
    menu: PropTypes.any,
    editAction: PropTypes.object,
    btnTab: PropTypes.object,
    config: PropTypes.any,
    handleConfig: PropTypes.func,
    handleSubConfig: PropTypes.func
    handleView: PropTypes.func
  }
  state = {
@@ -73,21 +72,20 @@
   * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单
   */
  UNSAFE_componentWillMount () {
    const { menu, editAction, config } = this.props
    const { menu, btnTab, config } = this.props
    let _config = ''
    let _originMenu = ''
    if (!config) {
      _config = JSON.parse(JSON.stringify(Source.baseConfig))
      _config.isAdd = true
    } else {
      _config = config
      _originMenu = JSON.parse(JSON.stringify(_config))
    }
    this.setState({
      config: _config,
      originMenu: _originMenu,
      originMenu: JSON.parse(JSON.stringify(_config)),
      selectedTables: _config.tables,
      menuformlist: [
        {
@@ -101,7 +99,7 @@
          type: 'text',
          key: 'actionName',
          label: '按钮名称',
          initVal: editAction.label,
          initVal: btnTab.label,
          readonly: true
        }
      ]
@@ -231,6 +229,26 @@
    this.setState = () => {
      return
    }
  }
  // 页面返回
  handleViewBack = () => {
    const { menu } = this.props
    let _tabview = menu ? menu.LongParam.Template : ''
    let param = {
      editMenu: menu,
      editTab: null,
      tabConfig: null,
      editSubTab: null,
      subTabConfig: null,
      btnTab: null,
      btnTabConfig: null,
      editAction: null,
      subConfig: null,
      tabview: _tabview
    }
    this.props.handleView(param)
  }
  handleList = (type, list, card, groupId, elementId) => {
@@ -1139,21 +1157,23 @@
   * @description 菜单保存
   */
  submitConfig = () => {
    const { menu, editAction } = this.props
    const { menu, btnTab } = this.props
    const { delActions } = this.state
    let config = JSON.parse(JSON.stringify(this.state.config))
    this.menuformRef.handleConfirm().then(res => {
      if (config.groups[0] && config.groups[0].sublist[0] && config.groups[0].sublist[0].origin) {
        config.groups[0].sublist = config.groups[0].sublist.filter(item => !item.origin)
      }
      if (config.action[0] && config.action[0].origin) {
        config.action = config.action.filter(item => !item.origin)
      }
      if (config.tabs[0] && config.tabs[0].origin) {
        config.tabs = config.tabs.filter(item => !item.origin)
      if (config.isAdd) {
        if (config.groups[0] && config.groups[0].sublist[0] && config.groups[0].sublist[0].origin) {
          config.groups[0].sublist = config.groups[0].sublist.filter(item => !item.origin)
        }
        if (config.action[0] && config.action[0].origin) {
          config.action = config.action.filter(item => !item.origin)
        }
        if (config.tabs[0] && config.tabs[0].origin) {
          config.tabs = config.tabs.filter(item => !item.origin)
        }
      }
      let _LongParam = ''
@@ -1167,6 +1187,8 @@
          }
        })
      }
      delete _config.isAdd
      try {
        _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
@@ -1199,9 +1221,9 @@
      
      let tabParam = { // 添加菜单tab页
        func: 'sPC_sMenusTab_AddUpt',
        MenuID: editAction.uuid,
        MenuID: btnTab.uuid,
        LText: config.tabs.map((item, index) => {
          return `select '${editAction.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
          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 ')
@@ -1212,10 +1234,10 @@
      let param = {
        func: 'sPC_ButtonParam_AddUpt',
        ParentID: menu.MenuID,
        MenuID: editAction.uuid,
        MenuID: btnTab.uuid,
        MenuNo: menu.MenuNo,
        Template: 'FormTab',
        MenuName: editAction.label,
        MenuName: btnTab.label,
        PageParam: JSON.stringify({Template: 'FormTab'}),
        LongParam: _LongParam
      }
@@ -1363,7 +1385,7 @@
          duration: 2
        })
        if (this.state.closeVisible) {
          this.props.handleConfig('')
          this.handleViewBack()
        } else {
          this.setState({
            menuloading: false,
@@ -1384,13 +1406,13 @@
    let _this = this
    if (!originMenu) {
    if (config.isAdd) {
      confirm({
        content: '按钮配置尚未提交,确定放弃保存吗?',
        okText: this.state.dict['header.confirm'],
        cancelText: this.state.dict['header.cancel'],
        onOk() {
          _this.props.handleConfig('')
          _this.handleViewBack()
        },
        onCancel() {}
      })
@@ -1402,7 +1424,7 @@
          closeVisible: true
        })
      } else {
        this.props.handleConfig('')
        this.handleViewBack()
      }
    }
  }
@@ -1617,19 +1639,10 @@
   * @description 设置可配置标签
   */
  setSubConfig = (btn, type) => {
    const {menu, btnTab} = this.props
    const { config, originMenu } = this.state
    let isAdd = false
    if (
      (config.search[0] && config.search[0].origin) ||
      (config.action[0] && config.action[0].origin) ||
      (config.tabs[0] && config.tabs[0].origin)
    ) {
      isAdd = true
    }
    if (isAdd) {
    if (config.isAdd) {
      notification.warning({
        top: 92,
        message: '菜单尚未保存,请保存菜单配置!',
@@ -1650,21 +1663,22 @@
            loading: true
          })
          let uuid = ''
          let _type = type
          if (type === 'button' && btn.OpenType === 'popview') {
            _type = 'tab'
          }
          if (_type === 'button') {
            uuid = btn.uuid
          } else {
            uuid = btn.linkTab
          let param = {
            editMenu: menu,
            editTab: btn,
            tabConfig: null,
            editSubTab: null,
            subTabConfig: null,
            btnTab: btnTab,
            btnTabConfig: _config,
            editAction: null,
            subConfig: '',
            tabview: btn.type
          }
          Api.getSystemConfig({
            func: 'sPC_Get_LongParam',
            MenuID: uuid
            MenuID: btn.linkTab
          }).then(res => {
            if (res.status) {
              this.setState({
@@ -1680,15 +1694,11 @@
                }
              }
              if (_type === 'tab' && !_LongParam) {
                _LongParam = {
                  ...btn,
                  uuid: btn.linkTab,
                  create: true
                }
              if (_LongParam && param.tabview === 'SubTable' && _LongParam.Template === 'SubTable') {
                param.subConfig = _LongParam
              }
              this.props.handleSubConfig(btn, originMenu, _LongParam, _type)
              this.props.handleView(param)
            } else {
              this.setState({
                loading: false
@@ -2168,7 +2178,7 @@
          onCancel={() => { this.setState({closeVisible: false}) }}
          footer={[
            <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>{this.state.dict['header.save']}</Button>,
            <Button key="confirm" className="mk-btn mk-yellow" onClick={() => {this.props.handleConfig('')}}>{this.state.dict['header.notsave']}</Button>,
            <Button key="confirm" className="mk-btn mk-yellow" onClick={this.handleViewBack}>{this.state.dict['header.notsave']}</Button>,
            <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{this.state.dict['header.cancel']}</Button>
          ]}
          destroyOnClose
src/templates/formtabconfig/modalform/index.jsx
@@ -26,12 +26,12 @@
    let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    let resourceType = formlist.filter(cell => cell.key === 'resourceType')[0].initVal
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required'] // 默认显示项
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden'] // 默认显示项
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 选择类型、自定义资源
      _options = [..._options, 'resourceType', 'options']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 选择类型、数据源
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
    } else if (type === 'number') {
      _options = [..._options, 'decimal', 'min', 'max']
    } else if (type === 'fileupload') {
@@ -55,7 +55,6 @@
          form.type = 'select'
        } else if (type === 'number' && form.key === 'initval') {
          form.type = 'number'
          form.initVal = 0
        }
        form.hidden = !_options.includes(form.key)
        return form
@@ -78,12 +77,12 @@
  openTypeChange = (key, value) => {
    if (key === 'type') {
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required']
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden']
      if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 选择类型、自定义资源
        _options = [..._options, 'resourceType', 'options']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 选择类型、数据源
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      } else if (value === 'number') {
        _options = [..._options, 'decimal', 'min', 'max']
      } else if (value === 'fileupload') {
@@ -139,7 +138,7 @@
      if (value === '0') {
        _options = [..._options, 'options']
      } else if (value === '1') {
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      }
      if (openType === 'select') {
src/templates/modalconfig/index.jsx
@@ -3,19 +3,22 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import { Button, Card, Modal, Collapse, notification, Select, List, Icon, Empty } from 'antd'
import moment from 'moment'
import { Button, Card, Modal, Collapse, notification, Select, List, Icon, Empty } from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/comtable.js'
import enUS from '@/locales/en-US/comtable.js'
import Utils from '@/utils/utils.js'
import { getModalForm } from '@/templates/tableshare/formconfig'
import ModalForm from '@/templates/ushare/modalform'
import DragElement from './dragelement'
import SourceElement from './dragelement/source'
import Api from '@/api'
import ModalForm from './modalform'
import SettingForm from './settingform'
import GroupForm from './groupform'
import EditCard from './editcard'
import MenuForm from './menuform'
import zhCN from '@/locales/zh-CN/comtable.js'
import enUS from '@/locales/en-US/comtable.js'
import Utils from '@/utils/utils.js'
import Source from './source'
import './index.scss'
@@ -31,6 +34,8 @@
    editSubTab: PropTypes.any,
    tabConfig: PropTypes.any,
    subTabConfig: PropTypes.any,
    btnTab: PropTypes.any,
    btnTabConfig: PropTypes.any,
    editAction: PropTypes.object,
    subConfig: PropTypes.any,
    handleView: PropTypes.func
@@ -220,7 +225,7 @@
  // 页面返回
  handleViewBack = () => {
    const {menu, editTab, editSubTab, tabConfig, subTabConfig} = this.props
    const {menu, editTab, editSubTab, tabConfig, subTabConfig, btnTab, btnTabConfig} = this.props
    let _view = (subTabConfig && subTabConfig.Template) || (tabConfig && tabConfig.Template) || menu.LongParam.Template
    
@@ -230,6 +235,8 @@
      tabConfig: tabConfig,
      editSubTab: editSubTab,
      subTabConfig: subTabConfig,
      btnTab: btnTab,
      btnTabConfig: btnTabConfig,
      editAction: null,
      subConfig: subTabConfig || tabConfig || null,
      tabview: _view
@@ -359,227 +366,7 @@
    this.setState({
      visible: true,
      card: card,
      formlist: [
        {
          type: 'text',
          key: 'label',
          label: this.state.dict['header.form.name'],
          initVal: card.label,
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'field',
          label: this.state.dict['header.form.field'],
          initVal: card.field,
          required: true,
          readonly: false
        },
        {
          type: 'select',
          key: 'type',
          label: this.state.dict['header.form.type'],
          initVal: card.type,
          required: true,
          options: [{
            value: 'text',
            text: this.state.dict['header.form.text']
          }, {
            value: 'number',
            text: this.state.dict['header.form.number']
          }, {
            value: 'select',
            text: this.state.dict['header.form.select']
          }, {
            value: 'multiselect',
            text: this.state.dict['header.form.multiselect']
          }, {
            value: 'link',
            text: this.state.dict['header.form.link']
          }, {
            value: 'fileupload',
            text: this.state.dict['header.form.fileupload']
          }, {
            value: 'date',
            text: this.state.dict['header.form.dateday']
          }, {
            value: 'datemonth',
            text: this.state.dict['header.form.datemonth']
          }, {
            value: 'datetime',
            text: this.state.dict['header.form.datetime']
          }, {
            value: 'textarea',
            text: this.state.dict['header.form.textarea']
          }, {
            value: 'funcvar',
            text: this.state.dict['header.form.funcvar']
          }]
        },
        {
          type: 'text',
          key: 'initval',
          label: this.state.dict['header.form.initval'],
          initVal: card.initval,
          required: false
        },
        {
          type: 'radio',
          key: 'resourceType',
          label: this.state.dict['header.form.resourceType'],
          initVal: card.resourceType || '0',
          required: true,
          options: [{
            value: '0',
            text: this.state.dict['header.form.custom']
          }, {
            value: '1',
            text: this.state.dict['header.form.datasource']
          }]
        },
        {
          type: 'radio',
          key: 'setAll',
          label: this.state.dict['header.form.setAll'],
          initVal: card.setAll || 'false',
          options: [{
            value: 'true',
            text: this.state.dict['header.form.true']
          }, {
            value: 'false',
            text: this.state.dict['header.form.false']
          }]
        },
        {
          type: 'textarea',
          key: 'dataSource',
          label: this.state.dict['header.form.datasource'],
          initVal: card.dataSource || '',
          required: true,
          readonly: false
        },
        {
          type: 'options',
          key: 'options',
          label: '',
          initVal: card.options || [],
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'linkField',
          label: this.state.dict['header.form.linkField'],
          initVal: card.linkField || '',
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'valueField',
          label: this.state.dict['header.form.valueField'],
          initVal: card.valueField || '',
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'valueText',
          label: this.state.dict['header.form.valueText'],
          initVal: card.valueText || '',
          required: true,
          readonly: false
        },
        {
          type: 'text',
          key: 'orderBy',
          label: this.state.dict['header.form.orderBy'],
          initVal: card.orderBy || '',
          required: false,
          readonly: false
        },
        {
          type: 'select',
          key: 'orderType',
          label: this.state.dict['header.form.orderType'],
          initVal: card.orderType || 'asc',
          options: [{
            value: 'asc',
            text: this.state.dict['header.form.asc']
          }, {
            value: 'desc',
            text: this.state.dict['header.form.desc']
          }]
        },
        {
          type: 'number',
          key: 'decimal',
          label: this.state.dict['header.form.decimal'],
          initVal: card.decimal || 0,
          required: false
        },
        {
          type: 'number',
          key: 'min',
          label: '最小值',
          initVal: card.min || '',
          required: false
        },
        {
          type: 'number',
          key: 'max',
          label: '最大值',
          initVal: card.max || '',
          required: false
        },
        {
          type: 'radio',
          key: 'readonly',
          label: this.state.dict['header.form.readonly'],
          initVal: card.readonly || 'false',
          options: [{
            value: 'true',
            text: this.state.dict['header.form.true']
          }, {
            value: 'false',
            text: this.state.dict['header.form.false']
          }]
        },
        {
          type: 'radio',
          key: 'required',
          label: this.state.dict['header.form.field.required'],
          initVal: card.required || 'false',
          options: [{
            value: 'true',
            text: this.state.dict['header.form.true']
          }, {
            value: 'false',
            text: this.state.dict['header.form.false']
          }]
        },
        {
          type: 'radio',
          key: 'hidden',
          label: this.state.dict['header.form.field.ishidden'],
          initVal: card.hidden || 'false',
          options: [{
            value: 'true',
            text: this.state.dict['header.form.true']
          }, {
            value: 'false',
            text: this.state.dict['header.form.false']
          }]
        },
        {
          type: 'multiselect',
          key: 'linkSubField',
          label: this.state.dict['header.form.linkForm'],
          initVal: card.linkSubField || [],
          options: _inputfields
        }
      ]
      formlist: getModalForm(card, _inputfields, !!this.props.editTab)
    })
  }
src/templates/subtableconfig/index.jsx
@@ -38,6 +38,8 @@
    editTab: PropTypes.any,
    tabConfig: PropTypes.any,
    editSubTab: PropTypes.any,
    btnTab: PropTypes.any,
    btnTabConfig: PropTypes.any,
    config: PropTypes.any,
    handleView: PropTypes.func
  }
@@ -270,15 +272,20 @@
  // 页面返回
  handleViewBack = () => {
    const {menu, editTab, tabConfig, editSubTab} = this.props
    const {menu, editTab, tabConfig, editSubTab, btnTab, btnTabConfig} = this.props
    let _tabview = menu ? menu.LongParam.Template : ''
    let _subconfig = null
    if (editSubTab) {
      _subconfig = tabConfig
      if (editTab.hasOwnProperty('OpenType')) {
        _tabview = editTab.tabType
      } else {
        _tabview = editTab.type
      }
    } else if (!editSubTab && btnTab) {
      _tabview = btnTab.tabTemplate
      _subconfig = btnTabConfig
    }
    let param = {
@@ -287,8 +294,10 @@
      tabConfig: null,
      editSubTab: null,
      subTabConfig: null,
      btnTab: btnTab,
      btnTabConfig: btnTabConfig,
      editAction: null,
      subConfig: tabConfig,
      subConfig: _subconfig,
      tabview: _tabview
    }
@@ -1698,7 +1707,7 @@
   * @description 设置可配置按钮
   */
  setSubConfig = (btn) => {
    const {menu, editTab, tabConfig, editSubTab} = this.props
    const {menu, editTab, tabConfig, editSubTab, btnTab, btnTabConfig} = this.props
    const { config, originConfig } = this.state
    if (originConfig.isAdd) {
@@ -1739,6 +1748,8 @@
            tabConfig: editSubTab ? tabConfig : originConfig,
            editSubTab: _subtab,
            subTabConfig: editSubTab ? originConfig : null,
            btnTab: btnTab,
            btnTabConfig: btnTabConfig,
            editAction: btn,
            subConfig: '',
            tabview: _view
src/templates/tableshare/formconfig.js
@@ -190,6 +190,19 @@
        value: 'button',
        text: Formdict['header.form.button']
      }]
    },
    {
      type: 'radio',
      key: 'database',
      label: Formdict['header.form.database'],
      initVal: card.database || 'local',
      options: [{
        value: 'local',
        text: Formdict['header.form.database.local']
      }, {
        value: 'sso',
        text: Formdict['header.form.database.sso']
      }]
    }
  ]
}
@@ -673,7 +686,16 @@
 * @param {*} card 
 * @param {*} inputfields 
 */
export function getModalForm (card, inputfields) {
export function getModalForm (card, inputfields, subtable = false) {
  let _openType = []
  if (subtable) {
    _openType.push({
      value: 'linkMain',
      text: Formdict['header.form.linkMain']
    })
  }
  return [
    {
      type: 'text',
@@ -727,7 +749,11 @@
      }, {
        value: 'textarea',
        text: Formdict['header.form.textarea']
      }]
      }, {
        value: 'funcvar',
        text: Formdict['header.form.funcvar']
      },
      ..._openType]
    },
    {
      type: 'text',
@@ -872,6 +898,32 @@
      }]
    },
    {
      type: 'radio',
      key: 'hidden',
      label: Formdict['header.form.field.ishidden'],
      initVal: card.hidden || 'false',
      options: [{
        value: 'true',
        text: Formdict['header.form.true']
      }, {
        value: 'false',
        text: Formdict['header.form.false']
      }]
    },
    {
      type: 'radio',
      key: 'database',
      label: Formdict['header.form.database'],
      initVal: card.database || 'local',
      options: [{
        value: 'local',
        text: Formdict['header.form.database.local']
      }, {
        value: 'sso',
        text: Formdict['header.form.database.sso']
      }]
    },
    {
      type: 'multiselect',
      key: 'linkSubField',
      label: Formdict['header.form.linkForm'],
src/templates/tableshare/searchform/index.jsx
@@ -35,7 +35,7 @@
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') {        // 下拉选择类型、选项为自定义资源
      _options = [..._options, 'resourceType', 'options', 'display']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 下拉选择类型、选项为后台数据源中获取
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display']
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display', 'database']
    }
    if (type === 'select' || type === 'link') {
@@ -100,7 +100,7 @@
      if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '0') {        // 下拉选择类型、选项为自定义资源
        _options = [..._options, 'resourceType', 'options', 'display']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '1') { // 下拉选择类型、选项为后台数据源中获取
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display']
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display', 'database']
      }
      if (value === 'select' || value === 'link') {
@@ -173,7 +173,7 @@
      if (value === '0') {
        _options = [..._options, 'options']
      } else if (value === '1') {
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      }
      if (openType === 'select' || openType === 'link') {
src/templates/ushare/editable/index.jsx
src/templates/ushare/editable/index.scss
src/templates/ushare/modalform/index.jsx
File was renamed from src/templates/modalconfig/modalform/index.jsx
@@ -31,7 +31,7 @@
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 选择类型、自定义资源
      _options = [..._options, 'resourceType', 'options']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 选择类型、数据源
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
    } else if (type === 'number') {
      _options = [..._options, 'decimal', 'min', 'max']
    } else if (type === 'fileupload') {
@@ -44,6 +44,8 @@
      _options = [..._options, 'setAll', 'linkField']
    } else if (type === 'funcvar') {       // 设置为函数变量时,不需要其他信息
      _options = ['label', 'field', 'type']
    } else if (type === 'linkMain') {
      _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden']
    }
    
    this.setState({
@@ -82,7 +84,7 @@
      if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 选择类型、自定义资源
        _options = [..._options, 'resourceType', 'options']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 选择类型、数据源
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      } else if (value === 'number') {
        _options = [..._options, 'decimal', 'min', 'max']
      } else if (value === 'fileupload') {
@@ -95,6 +97,8 @@
        _options = [..._options, 'setAll', 'linkField']
      } else if (value === 'funcvar') {
        _options = ['label', 'field', 'type']
      } else if (value === 'linkMain') {
        _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden']
      }
      
      this.setState({
@@ -118,7 +122,7 @@
      }, () => {
        this.setState({
          formlist: this.state.formlist.map(form => {
            if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar') {
            if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar' && value !== 'linkMain') {
              form.show = true
            }
            return form
@@ -136,7 +140,7 @@
      if (value === '0') {
        _options = [..._options, 'options']
      } else if (value === '1') {
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      }
      if (openType === 'select') {
@@ -371,6 +375,8 @@
                duration: 10
              })
            }
          } else if (values.type === 'linkMain') {
            values.initval = ''
          }
          if (isvalid) {
src/templates/ushare/modalform/index.scss
src/utils/utils.js
@@ -548,14 +548,21 @@
      })
    }
    if (verify && verify.billcodes.length > 0) {
    if (verify && verify.billcodes.length > 0) { // 单号生成
      verify.billcodes.forEach(item => {
        let _ModularDetailCode = ''
        if (item.TypeCharOne === 'Lp' || item.TypeCharOne === 'BN') {
          _ModularDetailCode = item.TypeCharOne + item.linkField
          let _val = ''
          if (item.linkField === 'BID' && BID) { // 替换bid
            _val = BID
          } else if (data.hasOwnProperty(item.linkField)) {
            _val = data[item.linkField]
          }
          _ModularDetailCode = item.TypeCharOne + _val
        } else {
          _ModularDetailCode = item.ModularDetailCode
        }
        _sql += `Declare @${item.field} nvarchar(50)
          select @BillCode='', @${item.field}=''
          exec s_get_BillCode
@@ -600,7 +607,10 @@
      let keys = []
      let values = []
      formdata.forEach(item => {
        if (item.type === 'number') {
        if (item.type === 'funcvar') {
          keys.push(item.key)
          values.push('@' + item.key)
        } else if (item.type === 'number') {
          keys.push(item.key)
          values.push(item.value)
        } else {
@@ -608,6 +618,7 @@
          values.push('\'' + item.value + '\'')
        }
      })
      keys = keys.join(',')
      values = values.join(',')
      _sql += `declare @UserName  nvarchar(50),@FullName nvarchar(50)
@@ -617,7 +628,9 @@
    } else if (btn.OpenType === 'pop' && btn.sqlType === 'update') {
      let _form = []
      formdata.forEach(item => {
        if (item.type === 'number') {
        if (item.type === 'funcvar') {
          _form.push(item.key + '=@' + item.key)
        } else if (item.type === 'number') {
          _form.push(item.key + '=' + item.value)
        } else {
          _form.push(item.key + '=\'' + item.value + '\'')