king
2019-12-19 ff045a6a19e2e0bd5c2433aae71145401627c22d
src/templates/comtableconfig/actionform/index.jsx
@@ -41,6 +41,26 @@
    }, {
      MenuID: 'requiredOnce',
      text: this.props.dict['header.form.requiredOnce']
    }],
    insertUpdateOptions: [{
      MenuID: '',
      text: this.props.dict['header.form.empty']
    }, {
      MenuID: 'insert',
      text: this.props.dict['header.form.action.insert']
    }, {
      MenuID: 'update',
      text: this.props.dict['header.form.action.update']
    }],
    deleteOptions: [{
      MenuID: '',
      text: this.props.dict['header.form.empty']
    }, {
      MenuID: 'LogicDelete',
      text: this.props.dict['header.form.action.LogicDelete']
    }, {
      MenuID: 'delete',
      text: this.props.dict['header.form.action.delete']
    }]
  }
@@ -86,6 +106,12 @@
          } else {
            item.options = this.state.reqOptionsMutil
          }
        } else if (item.key === 'sqlType') {
          if (['prompt', 'exec'].includes(_opentype)) {
            item.options = this.state.deleteOptions
          } else {
            item.options = this.state.insertUpdateOptions
          }
        }
        item.hidden = !_options.includes(item.key)
        return item
@@ -129,14 +155,21 @@
            if (value === 'innerpage' || this.state.position === 'grid') {
              item.options = this.state.reqOptionSgl
              item.initVal = 'requiredSgl'
              item.hidden = true
            } else if (['outerpage', 'blank', 'tab', 'popview'].includes(value)) {
              item.options = this.state.reqOptions
              item.initVal = 'requiredSgl'
              item.hidden = true
            } else {
              item.options = this.state.reqOptionsMutil
            }
            item.hidden = true
          } else if (item.key === 'sqlType') {
            if (['prompt', 'exec'].includes(value)) {
              item.options = this.state.deleteOptions
            } else {
              item.options = this.state.insertUpdateOptions
            }
            item.initVal = ''
            item.hidden = true
          }
          return item
        })
@@ -146,6 +179,8 @@
        this.setState({
          formlist: this.state.formlist.map(item => {
            if (item.key === 'Ot') {
              item.hidden = false
            } else if (item.key === 'sqlType' && ['prompt', 'exec', 'pop'].includes(value)) {
              item.hidden = false
            }
            return item
@@ -213,16 +248,13 @@
        let _rules = []
        if (item.key === 'innerFunc') {
          let str = '^(' + item.fields.join('|') + ')'
          let _patten = new RegExp(str + '[0-9a-zA-Z_]*', 'ig')
          let _patten = new RegExp(str + '[0-9a-zA-Z_]*$', 'g')
          _rules = [{
            pattern: _patten,
            message: '名称只允许包含数字、字母和下划线,且以指定字符开始。'
          }, {
            min: 6,
            message: '内部函数名称不小于6个字符。'
          }, {
            max: 100,
            message: '内部函数名称不超过100个字符。'
            max: 50,
            message: '内部函数名称不超过50个字符。'
          }]
        }
        fields.push(