| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | // import { fromJS } from 'immutable' |
| | | import { Form, Tabs, Row, Col, Radio, Table, Popconfirm, Icon, notification, Modal, message, Tooltip, Typography } from 'antd' |
| | | import { Form, Tabs, Table, Popconfirm, Icon, notification, Modal, message, Typography } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | import UniqueForm from './uniqueform' |
| | | import ContrastForm from './contrastform' |
| | | import CustomForm from './customform' |
| | | import CustomScript from './customscript' |
| | | import SettingForm from './settingform' |
| | | import BillcodeForm from './billcodeform' |
| | | import VoucherForm from './voucherform' |
| | | import './index.scss' |
| | |
| | | render() { |
| | | const { card } = this.props |
| | | const { verify, fields, uniqueColumns, onceUniqueColumns, columnsFields, contrastColumns, customColumns, orderColumns, scriptsColumns, orderModular, orderModularDetail, voucher, voucherDetail } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div id="verify-card-box-tab"> |
| | | <Tabs defaultActiveKey="1" className="verify-card-box"> |
| | | <TabPane tab="基础验证" key="1"> |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | {this.props.card.sqlType !== 'custom' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title={'默认sql执行顺序为自定义脚本之前'}> |
| | | <Icon type="question-circle" style={{color: '#c49f47', marginRight: '5px'}} /> |
| | | 默认sql |
| | | </Tooltip> |
| | | }> |
| | | <Radio.Group value={verify.default} onChange={(e) => {this.onOptionChange(e, 'default')}}> |
| | | <Radio value="true">执行</Radio> |
| | | <Radio value="false">不执行</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={8}> |
| | | <Form.Item label={'账期验证'}> |
| | | <Radio.Group value={verify.accountdate} onChange={(e) => {this.onOptionChange(e, 'accountdate')}}> |
| | | <Radio value="true">开启</Radio> |
| | | <Radio value="false">不开启</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={'失效验证'}> |
| | | <Radio.Group value={verify.invalid} onChange={(e) => {this.onOptionChange(e, 'invalid')}}> |
| | | <Radio value="true">开启</Radio> |
| | | <Radio value="false">不开启</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | <TabPane tab="数据源" key="1"> |
| | | <SettingForm dict={this.props.dict} /> |
| | | </TabPane> |
| | | <TabPane tab="比较验证" key="2x"> |
| | | <ContrastForm |
| | |
| | | /> |
| | | </TabPane> |
| | | <TabPane tab="自定义脚本" key="6"> |
| | | <CustomScript |
| | | {/* <CustomScript |
| | | usefulfields={this.state.usefulfields} |
| | | initsql={this.state.initsql} |
| | | dict={this.props.dict} |
| | |
| | | systemScripts={this.state.systemScripts} |
| | | scriptsChange={this.scriptsChange} |
| | | wrappedComponentRef={(inst) => this.scriptsForm = inst} |
| | | /> |
| | | /> */} |
| | | <Table |
| | | bordered |
| | | rowKey="uuid" |