From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/views/menudesign/printmenuform/index.jsx | 51 ++++++++++++++++++++++++++------------------------- 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/views/menudesign/printmenuform/index.jsx b/src/views/menudesign/printmenuform/index.jsx index 9b099fc..9f9c9bb 100644 --- a/src/views/menudesign/printmenuform/index.jsx +++ b/src/views/menudesign/printmenuform/index.jsx @@ -7,16 +7,8 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, updateConfig: PropTypes.func - } - - changeFirstCount = (val) => { - if (typeof(val) !== 'number') { - val = '' - } - this.props.updateConfig({...this.props.config, firstCount: val}) } changeCount = (val) => { @@ -40,11 +32,8 @@ 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}) } pageSizeChange = (val) => { @@ -113,7 +102,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -136,7 +125,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鎵撳嵃灏哄!' + message: '璇烽�夋嫨鎵撳嵃灏哄!' } ] })( @@ -155,7 +144,7 @@ rules: [ { required: true, - message: dict['mob.required.select'] + '鎵撳嵃甯冨眬!' + message: '璇烽�夋嫨鎵撳嵃甯冨眬!' } ] })( @@ -173,7 +162,7 @@ rules: [ { required: true, - message: dict['mob.required.select'] + '鎵撳嵃杈硅窛!' + message: '璇烽�夋嫨鎵撳嵃杈硅窛!' } ] })( @@ -185,38 +174,50 @@ </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, rules: [ { required: true, - message: dict['mob.required.input'] + '棣栭〉鏁�!' + message: '璇疯緭鍏ラ椤垫暟!' } ] })(<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, - message: dict['mob.required.input'] + '姣忛〉鏁�!' + message: '璇疯緭鍏ユ瘡椤垫暟!' } ] })(<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="閽堝涓嶈鍒欑焊寮狅紝鍙嚜瀹氫箟璁剧疆鎵撳嵃楂樺害鍜屽搴︼紝娉細鍚屾椂璁剧疆鎵撳嵃瀹藉害鍜岄珮搴﹀悗鏂瑰彲鐢熸晥銆�"> -- Gitblit v1.8.0