From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 八月 2023 18:37:36 +0800 Subject: [PATCH] 2023-08-27 --- src/templates/zshare/verifycard/baseform/index.jsx | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx index 00171d3..611e4ef 100644 --- a/src/templates/zshare/verifycard/baseform/index.jsx +++ b/src/templates/zshare/verifycard/baseform/index.jsx @@ -5,6 +5,7 @@ import { QuestionCircleOutlined } from '@ant-design/icons' import Api from '@/api' +import MkPrintTemps from '@/menu/components/share/actioncomponent/actionform/mkPrintTemps' import './index.scss' const sysTempsIds = ['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'] @@ -15,13 +16,14 @@ verify: PropTypes.object, unionFields: PropTypes.array, notes: PropTypes.array, + appType: PropTypes.any, onChange: PropTypes.func } state = { wxTemps: [], selectTemp: null, - miniTemps: [], + miniTemps: [] } componentDidMount() { @@ -126,6 +128,8 @@ let error = '' if (verify.noteEnable === 'true' && !verify.noteCode) { // 寮�鍚煭淇℃椂锛岄渶瑕佹ā鏉跨紪鐮� error = '寮�鍚煭淇℃椂锛岄渶瑕侀�夋嫨鐭俊妯℃澘锛�' + } else if (verify.printEnable === 'true' && !verify.printTempId) { + error = '浣跨敤鍗曟嵁鎵撳嵃鏃讹紝闇�瑕侀�夋嫨鎵撳嵃妯℃澘锛�' } else if (verify.accountdate === 'true' && !verify.accountfield) { error = '寮�鍚处鏈熸椂锛岄渶瑕侀�夋嫨楠岃瘉鍏徃锛�' } else if (verify.wxNote === 'true') { @@ -148,6 +152,9 @@ if (_verify.noteEnable !== 'true') { _verify.noteCode = '' + } + if (_verify.printEnable !== 'true') { + _verify.printTempId = '' } if (_verify.accountdate !== 'true') { _verify.accountfield = '' @@ -184,6 +191,14 @@ const { verify } = this.props let _verify = {...verify, noteCode: val, noteId: option.props.id} + + this.props.onChange(_verify) + } + + onPrintIdChange = (val) => { + const { verify } = this.props + + let _verify = {...verify, printTempId: val} this.props.onChange(_verify) } @@ -264,7 +279,7 @@ } render() { - const { unionFields, verify, notes, card } = this.props + const { unionFields, verify, notes, card, appType } = this.props const { wxTemps, selectTemp } = this.state const formItemLayout = { labelCol: { @@ -393,6 +408,25 @@ </Form.Item> </Col> : null} <Col span={24}></Col> + {appType !== 'mob' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="浣跨敤鍗曟嵁鎵撳嵃鏃堕渶閫夋嫨鎵撳嵃妯℃澘锛岃烦杞墦鍗扮晫闈㈡椂ID浼樺厛浠庤繑鍥炲�间腑鑾峰彇锛岃繑鍥炲�兼病鏈夋椂浠庤閲岃幏鍙栥��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍗曟嵁鎵撳嵃 + </Tooltip> + }> + <Radio.Group value={verify.printEnable} onChange={(e) => {this.onOptionChange(e.target.value, 'printEnable')}}> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">涓嶅紑鍚�</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + {verify.printEnable === 'true' ? <Col span={8}> + <Form.Item label="鎵撳嵃妯℃澘" required> + <MkPrintTemps value={verify.printTempId} onChange={this.onPrintIdChange}/> + </Form.Item> + </Col> : null} + <Col span={24}></Col> <Col span={8}> <Form.Item label={ <Tooltip placement="bottomLeft" title={'璇峰湪鏈嶅姟鍣ㄥ畬鎴愬叕浼楀彿閰嶇疆銆�'}> -- Gitblit v1.8.0