king
2020-05-15 25b1262a25df82f32296afe3802836e768f2143f
src/templates/zshare/verifycard/uniqueform/index.jsx
@@ -6,6 +6,7 @@
class UniqueForm extends Component {
  static propTpyes = {
    btn: PropTypes.object,       // 字典项
    dict: PropTypes.object,       // 字典项
    fields: PropTypes.array,      // 表单字段
    uniqueChange: PropTypes.func  // 修改函数
@@ -16,15 +17,22 @@
  }
  edit = (record) => {
    const { btn } = this.props
    this.setState({
      editItem: record
    })
    this.props.form.setFieldsValue({
      field: record.field.split(','),
      errorCode: record.errorCode,
      verifyType: record.verifyType || 'physical'
    })
    let _value = {
      field: record.field.split(',')
    }
    if (btn.Ot !== 'requiredOnce') {
      _value.errorCode = record.errorCode
      _value.verifyType = record.verifyType || 'physical'
    }
    this.props.form.setFieldsValue(_value)
  }
@@ -60,7 +68,7 @@
  render() {
    const { getFieldDecorator } = this.props.form
    const { fields } = this.props
    const { fields, btn } = this.props
    const formItemLayout = {
      labelCol: {
@@ -97,7 +105,7 @@
              )}
            </Form.Item>
          </Col>
          <Col span={6}>
          {btn.Ot !== 'requiredOnce' ? <Col span={6}>
            <Form.Item label={'报错编码'}>
              {getFieldDecorator('errorCode', {
                initialValue: 'E',
@@ -116,8 +124,8 @@
                </Select>
              )}
            </Form.Item>
          </Col>
          <Col span={6}>
          </Col> : null}
          {btn.Ot !== 'requiredOnce' ? <Col span={6}>
            <Form.Item label={'验证类型'}>
              {getFieldDecorator('verifyType', {
                initialValue: 'physical',
@@ -134,7 +142,7 @@
                </Select>
              )}
            </Form.Item>
          </Col>
          </Col> : null}
          <Col span={4} className="add">
            <Button onClick={this.handleConfirm} className="mk-green">
              保存