king
2022-01-04 5d1e5dc9b248f91b33105dc838200af07947cdb2
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -19,7 +19,8 @@
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'syncComponent', 'clickouter'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width']
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width'],
  form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'open', 'refreshTab', 'reload', 'title']
}
class ActionForm extends Component {
@@ -38,13 +39,13 @@
    requireOptions: [],
    insertUpdateOptions: [{
      value: 'insert',
      text: this.props.dict['header.form.action.insert']
      text: '添加'
    }, {
      value: 'update',
      text: this.props.dict['header.form.action.update']
      text: '修改'
    }, {
      value: 'audit',
      text: this.props.dict['header.form.action.audit']
      text: '审核'
    }],
    deleteOptions: [{
      value: 'LogicDelete',
@@ -54,7 +55,7 @@
      text: '物理删除'
    }, {
      value: 'custom',
      text: this.props.dict['header.form.custom']
      text: '自定义'
    }],
    interTypeOptions: [{
      value: 'system',
@@ -197,6 +198,43 @@
      } else {
        reOptions.sqlType = this.state.insertUpdateOptions
      }
    } else if (openType === 'form') {
      let intertype = this.record.intertype
      if (this.record.formType === 'switch') {
        shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText')
      } else {
        shows.push('field', 'openVal', 'closeVal')
      }
      reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom')
      if (intertype === 'outer') {
        shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
        reRequired.innerFunc = false
        if (this.record.sysInterface === 'false') {
          reReadonly.interface = false
          reRequired.interface = true
        } else {
          reReadonly.interface = true
          reRequired.interface = false
        }
      } else if (intertype === 'inner') {
        shows.push('innerFunc')
        reRequired.innerFunc = true
      } else {
        shows.push('sql', 'sqlType')
      }
      reOptions.Ot = requireOptions
      reOptions.sqlType = [{
        value: 'update',
        text: '修改'
      }, {
        value: 'custom',
        text: '自定义'
      }]
    } else if (openType === 'excelIn') {
      reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
      reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
@@ -375,6 +413,10 @@
        _fieldval.intertype = 'system'
        _fieldval.sqlType = ''
  
      } else if (value === 'form') {
        _fieldval.Ot = 'requiredSgl'
        this.record.Ot = 'requiredSgl'
      } else if (value === 'excelIn') {
        _fieldval.intertype = 'system'
        _fieldval.Ot = 'notRequired'
@@ -446,10 +488,12 @@
      } else if (value === 'update') {
        _fieldval.label = '修改'
        _fieldval.Ot = 'requiredSgl'
        if (hasclass) {
          _fieldval.class = 'purple'
        } else {
          _fieldval.color = 'primary'
        if (this.record.OpenType !== 'form') {
          if (hasclass) {
            _fieldval.class = 'purple'
          } else {
            _fieldval.color = 'primary'
          }
        }
      } else if (value === 'audit') {
        _fieldval.label = '审核'
@@ -469,10 +513,10 @@
        }
      }
      this.record.label = _fieldval.label
      this.record.Ot = _fieldval.Ot
      this.record.class = _fieldval.class || ''
      this.record.color = _fieldval.color || ''
      this.record.label = _fieldval.label || this.record.label || ''
      this.record.Ot = _fieldval.Ot || this.record.Ot || ''
      this.record.class = _fieldval.class || this.record.class || ''
      this.record.color = _fieldval.color || this.record.color || ''
      if (appType !== 'mob' && _fieldval.Ot === 'notRequired') {
        this.record.control = ''
@@ -549,6 +593,14 @@
      let content = null
      let initVal = item.initVal || ''
      if (item.type === 'splitLine') {
        fields.push(
          <Col span={24} key={index}>
            <p style={{borderBottom: '1px solid #e9e9e9', color: '#1890ff', textAlign: 'center'}}>{item.label}</p>
          </Col>
        )
        return
      }
      if (item.type === 'text') {
        rules = [
          { required: item.required, message: dict['form.required.input'] + item.label + '!' }