| | |
| | | updateConfig: PropTypes.func |
| | | } |
| | | |
| | | changeFirstCount = (val) => { |
| | | if (typeof(val) !== 'number') { |
| | | val = '' |
| | | } |
| | | this.props.updateConfig({...this.props.config, firstCount: val}) |
| | | } |
| | | // changeFirstCount = (val) => { |
| | | // if (typeof(val) !== 'number') { |
| | | // val = '' |
| | | // } |
| | | // this.props.updateConfig({...this.props.config, firstCount: val}) |
| | | // } |
| | | |
| | | changeCount = (val) => { |
| | | if (typeof(val) !== 'number') { |
| | |
| | | this.props.updateConfig({...this.props.config, printHeight: val}) |
| | | } |
| | | |
| | | changeLastCount = (val) => { |
| | | if (typeof(val) !== 'number') { |
| | | val = '' |
| | | } |
| | | this.props.updateConfig({...this.props.config, lastCount: val}) |
| | | onPrintPageChange = (val) => { |
| | | this.props.updateConfig({...this.props.config, printPage: val}) |
| | | } |
| | | |
| | | // changeLastCount = (val) => { |
| | | // if (typeof(val) !== 'number') { |
| | | // val = '' |
| | | // } |
| | | // this.props.updateConfig({...this.props.config, lastCount: val}) |
| | | // } |
| | | |
| | | pageSizeChange = (val) => { |
| | | this.props.updateConfig({...this.props.config, pageSize: val}) |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="页面布局"> |
| | | {getFieldDecorator('printPage', { |
| | | initialValue: config.printPage || 'auto' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.onPrintPageChange(e.target.value)}}> |
| | | <Radio value="auto">自适应</Radio> |
| | | <Radio value="page">分页</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {/* <Col span={24}> |
| | | <Form.Item label="首页数(条)"> |
| | | {getFieldDecorator('firstCount', { |
| | | initialValue: config.firstCount, |
| | |
| | | ] |
| | | })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeFirstCount}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | </Col> */} |
| | | {config.printPage === 'page' ? <Col span={24}> |
| | | <Form.Item label="每页数(条)"> |
| | | {getFieldDecorator('everyPCount', { |
| | | initialValue: config.everyPCount, |
| | | initialValue: config.everyPCount || 15, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | ] |
| | | })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeCount}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | </Col> : null} |
| | | {/* <Col span={24}> |
| | | <Form.Item label="尾页数(条)"> |
| | | {getFieldDecorator('lastCount', { |
| | | initialValue: config.lastCount |
| | | })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeLastCount}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> */} |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="针对不规则纸张,可自定义设置打印高度和宽度,注:同时设置打印宽度和高度后方可生效。"> |