king
2020-02-25 0c86e5e2eaf907dfcb63aea13e6efac3ccc52cce
src/templates/tableshare/verifycardexcelin/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Tabs, Row, Col, Input, Button, Table, Popconfirm, Icon, notification, Modal, message, InputNumber } from 'antd'
import { Form, Tabs, Row, Col, Input, Button, Table, Popconfirm, Icon, notification, Modal, message, InputNumber, Radio } from 'antd'
import Utils from '@/utils/utils.js'
@@ -148,6 +148,7 @@
    this.setState({
      verify: {
        ..._verify,
        default: _verify.default || 'true',
        sheet: _verify.sheet || 'Sheet1',
        range: _verify.range || 0,
        columns: _columns,
@@ -336,6 +337,15 @@
    })
  }
  onOptionChange = (e, key) => {
    const { verify } = this.state
    let value = e.target.value
    this.setState({
      verify: {...verify, default: value}
    })
  }
  showError = (errorType) => {
    if (errorType === 'S') {
      notification.success({
@@ -413,13 +423,21 @@
                    })(<InputNumber min={0} max={100} precision={0} />)}
                  </Form.Item>
                </Col>
                <Col span={8}>
                  <Form.Item label={'默认sql'}>
                    <Radio.Group value={verify.default} onChange={this.onOptionChange}>
                      <Radio value="true">执行</Radio>
                      <Radio value="false">不执行</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
              </Row>
            </Form>
          </TabPane>
          <TabPane tab="Excel列设置" key="2x">
            <ColumnForm
              dict={this.props.dict}
              range={verify.range}
              columns={verify.columns}
              columnChange={this.columnChange}
              wrappedComponentRef={(inst) => this.columnForm = inst}
            />
@@ -434,8 +452,11 @@
          </TabPane>
          <TabPane tab="自定义脚本" key="6">
            <CustomScript
              usefulfields={verify.columns}
              dict={this.props.dict}
              btn={this.props.card}
              isdefault={verify.default}
              usefulfields={verify.columns}
              scripts={verify.scripts}
              scriptsChange={this.scriptsChange}
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
            />