| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Input, Select } from 'antd' |
| | | import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Input, Select, Radio } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | verify: { |
| | | ..._verify, |
| | | Template: _verify.Template || '' |
| | | } |
| | | }, |
| | | linkType: _verify.linkType || 'system' |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | changeLinkType = (e) => { |
| | | let value = e.target.value |
| | | |
| | | this.setState({ |
| | | linkType: value |
| | | }, () => { |
| | | if (value === 'system') { |
| | | this.props.form.setFieldsValue({ |
| | | linkUrl: '127.0.0.1:13529' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | |
| | | const { verify } = this.state |
| | | const { verify, linkType } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | |
| | | return ( |
| | | <div id="verify-card-box-tab"> |
| | | <Tabs defaultActiveKey="1" className="verify-card-box" onChange={this.tabchange}> |
| | | <Tabs defaultActiveKey="1" className="verify-card-print-box" onChange={this.tabchange}> |
| | | <TabPane tab="打印验证" key="1"> |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | <Col span={8}> |
| | | <Form.Item label={'链接类型'}> |
| | | {getFieldDecorator('linkType', { |
| | | initialValue: linkType || 'system' |
| | | })( |
| | | <Radio.Group onChange={this.changeLinkType}> |
| | | <Radio value="system">系统</Radio> |
| | | <Radio value="custom">自定义</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={'链接地址'}> |
| | | {getFieldDecorator('linkUrl', { |
| | |
| | | message: this.props.dict['form.required.input'] + '链接地址!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={linkType === 'system'} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |