From 9c7881671df362f10b6f923a2652cafddffcf487 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 03 十二月 2023 09:55:45 +0800 Subject: [PATCH] 2023-12-03 --- src/templates/zshare/verifycard/baseform/index.jsx | 80 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 76 insertions(+), 4 deletions(-) diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx index 705262e..e9f2311 100644 --- a/src/templates/zshare/verifycard/baseform/index.jsx +++ b/src/templates/zshare/verifycard/baseform/index.jsx @@ -17,6 +17,7 @@ verify: PropTypes.object, unionFields: PropTypes.array, notes: PropTypes.array, + emailCodes: PropTypes.array, appType: PropTypes.any, onChange: PropTypes.func } @@ -129,6 +130,8 @@ let error = '' if (verify.noteEnable === 'true' && !verify.noteCode) { // 寮�鍚煭淇℃椂锛岄渶瑕佹ā鏉跨紪鐮� error = '寮�鍚煭淇℃椂锛岄渶瑕侀�夋嫨鐭俊妯℃澘锛�' + } else if (verify.emailEnable === 'true' && !verify.emailCode) { + error = '寮�鍚偖浠跺彂閫佹椂锛岄渶瑕侀�夋嫨閭欢妯℃澘锛�' } else if (verify.printEnable === 'true' && !verify.printTempId) { error = '浣跨敤鍗曟嵁鎵撳嵃鏃讹紝闇�瑕侀�夋嫨鎵撳嵃妯℃澘锛�' } else if (verify.accountdate === 'true' && !verify.accountfield) { @@ -155,6 +158,11 @@ if (_verify.noteEnable !== 'true') { _verify.noteCode = '' + _verify.noteId = '' + } + if (_verify.emailEnable !== 'true') { + _verify.emailCode = '' + _verify.emailId = '' } if (_verify.printEnable !== 'true') { _verify.printTempId = '' @@ -188,6 +196,14 @@ const { verify } = this.props let _verify = {...verify, noteCode: val, noteId: option.props.id} + + this.props.onChange(_verify) + } + + onEmailCodeChange = (val, option) => { + const { verify } = this.props + + let _verify = {...verify, emailCode: val, emailId: option.props.id} this.props.onChange(_verify) } @@ -276,7 +292,7 @@ } render() { - const { unionFields, verify, notes, card, appType, columns } = this.props + const { unionFields, verify, notes, emailCodes, card, appType, columns } = this.props const { wxTemps, selectTemp } = this.state const formItemLayout = { labelCol: { @@ -385,7 +401,7 @@ 鐭俊妯℃澘 </Tooltip> } required> - <Select value={verify.noteCode} onSelect={this.onNoteCodeChange}> + <Select value={verify.noteCode || ''} onSelect={this.onNoteCodeChange}> {notes.map(option => <Select.Option key={option.value} id={option.id} value={option.value}> {option.name} @@ -401,7 +417,7 @@ 鍙戦�佹柟寮� </Tooltip> }> - <Radio.Group value={verify.noteType} onChange={(e) => {this.onOptionChange(e.target.value, 'noteType')}}> + <Radio.Group value={verify.noteType || 'N'} onChange={(e) => {this.onOptionChange(e.target.value, 'noteType')}}> <Radio value="Y">瀹炴椂</Radio> <Radio value="N">瀹氭椂</Radio> </Radio.Group> @@ -414,7 +430,63 @@ 鐭俊鍐呭 </Tooltip> }> - <Radio.Group value={verify.noteTemp} onChange={(e) => {this.onOptionChange(e.target.value, 'noteTemp')}}> + <Radio.Group value={verify.noteTemp || 'Y'} onChange={(e) => {this.onOptionChange(e.target.value, 'noteTemp')}}> + <Radio value="Y">鐩稿悓</Radio> + <Radio value="N">涓嶅悓</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + <Col span={24}></Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title={'閫夋嫨鍙戦�侀偖浠舵椂锛岄渶瀹屽杽閭欢璁剧疆銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍙戦�侀偖浠� + </Tooltip> + }> + <Radio.Group value={verify.emailEnable} onChange={(e) => {this.onOptionChange(e.target.value, 'emailEnable')}}> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">涓嶅紑鍚�</Radio> + </Radio.Group> + </Form.Item> + </Col> + {verify.emailEnable === 'true' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title={<span>閭欢妯℃澘娣诲姞鍦板潃锛�<a target="_blank" rel="noopener noreferrer" href="https://cloud.mk9h.cn/admin/index.html">浜戜腑蹇�</a>->搴旂敤鏈嶅姟->寮�鍙戣�呬腑蹇�->閭欢妯℃澘銆�</span>}> + <QuestionCircleOutlined className="mk-form-tip" /> + 閭欢妯℃澘 + </Tooltip> + } required> + <Select value={verify.emailCode || ''} onSelect={this.onEmailCodeChange}> + {emailCodes.map(option => + <Select.Option key={option.value} id={option.id} value={option.value}> + {option.name} + </Select.Option> + )} + </Select> + </Form.Item> + </Col> : null} + {verify.emailEnable === 'true' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title={'瀹炴椂鍙戦�佹渶澶氬悓鏃跺彂閫�5涓敤鎴凤紝瀹氭椂鍙戦�佹渶澶氬悓鏃跺彂閫�100涓敤鎴枫��'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍙戦�佹柟寮� + </Tooltip> + }> + <Radio.Group value={verify.emailType || 'N'} onChange={(e) => {this.onOptionChange(e.target.value, 'emailType')}}> + <Radio value="Y">瀹炴椂</Radio> + <Radio value="N">瀹氭椂</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + {verify.emailEnable === 'true' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title={'褰撳悜澶氫釜鐢ㄦ埛鍙戦�佺煭淇℃椂锛岀煭淇″唴瀹规槸鍚︾浉鍚屻��'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 閭欢鍐呭 + </Tooltip> + }> + <Radio.Group value={verify.emailTemp || 'Y'} onChange={(e) => {this.onOptionChange(e.target.value, 'emailTemp')}}> <Radio value="Y">鐩稿悓</Radio> <Radio value="N">涓嶅悓</Radio> </Radio.Group> -- Gitblit v1.8.0