| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Select, Input, DatePicker } from 'antd' |
| | | // import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' |
| | | |
| | | // import MKEmitter from '@/utils/events.js' |
| | |
| | | loading: false, // 数据加载状态 |
| | | data: null, // 数据 |
| | | searchkey: null, // 过滤条件 |
| | | disableAdd: true, |
| | | disableSave: true, |
| | | typeOptions: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | |
| | | } |
| | | |
| | | triggeradd = () => { |
| | | |
| | | } |
| | | |
| | | triggersave = () => { |
| | | |
| | | } |
| | | |
| | | triggerprint = () => { |
| | | |
| | | } |
| | | |
| | | render() { |
| | | const { config } = this.state |
| | | const { config, disableSave, disableAdd, typeOptions } = this.state |
| | | |
| | | return ( |
| | | <div className="menu-voucher-wrap" style={config.style}> |
| | | |
| | | <div className="voucher-header"> |
| | | <Button className="system-background header-btn" disabled={disableAdd} onClick={this.triggeradd}>新增</Button> |
| | | <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggersave}>保存</Button> |
| | | <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggerprint}>打印</Button> |
| | | </div> |
| | | <div className="voucher-body"> |
| | | <div className="pre-wrap"> |
| | | <div className="voucher-code"> |
| | | <Select> |
| | | {typeOptions.map(option => |
| | | <Select.Option value={option.value}>{option.label}</Select.Option> |
| | | )} |
| | | </Select> |
| | | <Input autoComplete="off" />号 |
| | | </div> |
| | | <div className="voucher-date"> |
| | | 日期:<DatePicker onChange={this.onChange}/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |