File was renamed from src/tabviews/zshare/verifycard/actionform/index.jsx |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Select, Button, Input, Cascader } from 'antd' |
| | | import { Form, Row, Col, Button, Input, Cascader } from 'antd' |
| | | import './index.scss' |
| | | |
| | | const shortkeycode = { |
| | |
| | | shortcut: _shortcut |
| | | } |
| | | |
| | | if (record.OpenType === 'funcbutton' && record.funcType === 'print') { |
| | | item.printer = record.printer || '' |
| | | } |
| | | |
| | | this.props.form.setFieldsValue(item) |
| | | }) |
| | | } |
| | |
| | | |
| | | this.setState({ |
| | | editItem: null |
| | | }, () => { |
| | | this.props.form.setFieldsValue({ |
| | | shortcut: [], |
| | | label: '' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | } |
| | | } |
| | | |
| | | let hasprint = editItem && editItem.OpenType === 'funcbutton' && editItem.funcType === 'print' |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="verify-form" id="verifycard1"> |
| | | <Row gutter={24}> |
| | | <Form {...formItemLayout} className="verify-form"> |
| | | {editItem ? <Row gutter={24}> |
| | | <Col span={10}> |
| | | <Form.Item label={'名称'}> |
| | | {getFieldDecorator('label', { |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={4} className="add"> |
| | | <Form.Item label=" " colon={false} > |
| | | <Button onClick={this.handleConfirm} type="primary" className="add-row"> |
| | | 确定 |
| | | </Button> |
| | | <Button onClick={this.handleConfirm} type="primary" className="add-row"> |
| | | 确定 |
| | | </Button> |
| | | </Col> |
| | | </Row> : null} |
| | | {!editItem ? <Row gutter={24} style={{height: '64px', paddingTop: '5px'}}> |
| | | <Col span={24} className="print-tip"> |
| | | <Form.Item label={'提示'}> |
| | | 点击编辑图标可设置按钮对应的快捷键,注:快捷键设置重复时,会以排序在前的按钮为准。 |
| | | </Form.Item> |
| | | </Col> |
| | | {hasprint ? |
| | | <Col span={10}> |
| | | <Form.Item label={'打印机'}> |
| | | {getFieldDecorator('printer', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请选择打印机!' |
| | | } |
| | | ] |
| | | })( |
| | | <Select> |
| | | {editItem.printers && editItem.printers.map(option => |
| | | <Select.Option id={option.value} title={option.text} key={option.value} value={option.value}>{option.text}</Select.Option> |
| | | )} |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null |
| | | } |
| | | </Row> |
| | | </Row> : null} |
| | | </Form> |
| | | ) |
| | | } |