king
2020-01-07 45466976d272c7b406b0e3d8b8fba92f3eb20524
src/templates/tableshare/verifycard/customform/index.jsx
@@ -23,6 +23,7 @@
    this.props.form.setFieldsValue({
      sql: record.sql,
      result: record.result,
      errmsg: record.errmsg,
      errorCode: record.errorCode
    })
@@ -34,6 +35,7 @@
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        values.resultName = values.result === 'false' ? '不存在' : '存在'
        this.props.customChange(values)
        this.setState({
@@ -41,8 +43,7 @@
        })
        this.props.form.setFieldsValue({
          sql: '',
          errmsg: '',
          errorCode: 'E'
          errmsg: ''
        })
      }
    })
@@ -61,9 +62,9 @@
      }
    }
    return (
      <Form {...formItemLayout} className="custom-verify-form" id="verifycard2">
      <Form {...formItemLayout} className="verify-form" id="verifycard2">
        <Row gutter={24}>
          <Col span={10} className="sql">
          <Col span={21} className="sql">
            <Form.Item label={'sql'}>
              {getFieldDecorator('sql', {
                initialValue: '',
@@ -73,23 +74,46 @@
                    message: this.props.dict['form.required.input'] + 'sql!'
                  }
                ]
              })(<TextArea rows={3} />)}
              })(<TextArea rows={2} />)}
            </Form.Item>
          </Col>
          <Col span={6}>
            <Form.Item label={'报错信息'}>
          <Col span={3} className="add">
            <Button onClick={this.handleConfirm} type="primary" className="add-row">
              确定
            </Button>
          </Col>
          <Col span={7}>
            <Form.Item label={'结果'}>
              {getFieldDecorator('result', {
                initialValue: 'true',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.select'] + '结果!'
                  }
                ]
              })(
                <Select>
                  <Select.Option value="true"> 存在 </Select.Option>
                  <Select.Option value="false"> 不存在 </Select.Option>
                </Select>
              )}
            </Form.Item>
          </Col>
          <Col span={7}>
            <Form.Item label={'提示信息'}>
              {getFieldDecorator('errmsg', {
                initialValue: '',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '报错信息!'
                    message: this.props.dict['form.required.input'] + '提示信息!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col>
          <Col span={6}>
          <Col span={7}>
            <Form.Item label={'报错编码'}>
              {getFieldDecorator('errorCode', {
                initialValue: 'E',
@@ -113,11 +137,7 @@
              )}
            </Form.Item>
          </Col>
          <Col span={2} className="add">
            <Button onClick={this.handleConfirm} type="primary" className="add-row">
              确定
            </Button>
          </Col>
        </Row>
      </Form>
    )