From 735955be17afba088e389c85ad36145656b3d750 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 12 五月 2024 23:03:00 +0800 Subject: [PATCH] 2024-05-12 --- src/templates/zshare/verifycard/baseform/index.jsx | 425 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 374 insertions(+), 51 deletions(-) diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx index 606b0a8..affd4f5 100644 --- a/src/templates/zshare/verifycard/baseform/index.jsx +++ b/src/templates/zshare/verifycard/baseform/index.jsx @@ -1,10 +1,12 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Select, Radio, Tooltip, Input, notification } from 'antd' +import { Form, Row, Col, Select, Radio, Tooltip, Input } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import Api from '@/api' +import MkPrintTemps from '@/menu/components/share/actioncomponent/actionform/mkPrintTemps' +import CodeMirror from '@/templates/zshare/codemirror' import './index.scss' const sysTempsIds = ['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'] @@ -15,13 +17,15 @@ verify: PropTypes.object, unionFields: PropTypes.array, notes: PropTypes.array, + emailCodes: PropTypes.array, + appType: PropTypes.any, onChange: PropTypes.func } state = { wxTemps: [], selectTemp: null, - miniTemps: [], + miniTemps: [] } componentDidMount() { @@ -82,30 +86,30 @@ const { verify } = this.props let sysTemps = [ - // { - // template_id: '8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', - // title: '璁㈠崟鍙楃悊閫氱煡锛堟槑绉戜簯锛�', - // primary_industry: 'IT绉戞妧', - // deputy_industry: 'IT杞欢涓庢湇鍔�', - // content: '璁㈠崟鍙凤細{{keyword1.DATA}}\n璁㈠崟绫诲瀷锛歿{keyword2.DATA}}\n璁㈠崟鐘舵�侊細{{keyword3.DATA}}\n閫氱煡鏃堕棿锛歿{keyword4.DATA}}', - // example: '璁㈠崟鍙凤細20190101001\r\n璁㈠崟绫诲瀷锛氳。鏌淺r\n璁㈠崟鐘舵�侊細璁捐瀹屾垚\r\n閫氱煡鏃堕棿锛�2019骞�1鏈�1鏃�12:30' - // }, - // { - // template_id: 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok', - // title: '璁㈠崟杩涘害鎻愰啋锛堟槑绉戜簯锛�', - // primary_industry: 'IT绉戞妧', - // deputy_industry: 'IT杞欢涓庢湇鍔�', - // content: '璁㈠崟绫诲瀷锛歿{keyword1.DATA}}\n璁㈠崟鍙凤細{{keyword2.DATA}}\n璁㈠崟鐘舵�侊細{{keyword3.DATA}}', - // example: '璁㈠崟绫诲瀷锛氶��绉熺敵璇穃r\n璁㈠崟鍙凤細TZ16101909\r\n璁㈠崟鐘舵�侊細寰呭彇璐�' - // }, - // { - // template_id: 'mk_category_temp', - // title: '绫荤洰妯℃澘', - // primary_industry: '', - // deputy_industry: '', - // content: '', - // example: '' - // } + { + template_id: '8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', + title: '璁㈠崟鍙楃悊閫氱煡锛堟槑绉戜簯锛�', + primary_industry: 'IT绉戞妧', + deputy_industry: 'IT杞欢涓庢湇鍔�', + content: '璁㈠崟鍙凤細{{keyword1.DATA}}\n璁㈠崟绫诲瀷锛歿{keyword2.DATA}}\n璁㈠崟鐘舵�侊細{{keyword3.DATA}}\n閫氱煡鏃堕棿锛歿{keyword4.DATA}}', + example: '璁㈠崟鍙凤細20190101001\r\n璁㈠崟绫诲瀷锛氳。鏌淺r\n璁㈠崟鐘舵�侊細璁捐瀹屾垚\r\n閫氱煡鏃堕棿锛�2019骞�1鏈�1鏃�12:30' + }, + { + template_id: 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok', + title: '璁㈠崟杩涘害鎻愰啋锛堟槑绉戜簯锛�', + primary_industry: 'IT绉戞妧', + deputy_industry: 'IT杞欢涓庢湇鍔�', + content: '璁㈠崟绫诲瀷锛歿{keyword1.DATA}}\n璁㈠崟鍙凤細{{keyword2.DATA}}\n璁㈠崟鐘舵�侊細{{keyword3.DATA}}', + example: '璁㈠崟绫诲瀷锛氶��绉熺敵璇穃r\n璁㈠崟鍙凤細TZ16101909\r\n璁㈠崟鐘舵�侊細寰呭彇璐�' + }, + { + template_id: 'mk_category_temp', + title: '绫荤洰妯℃澘', + primary_industry: '', + deputy_industry: '', + content: '', + example: '' + } ] let _wxTemps = [...wxTemps, ...sysTemps] @@ -126,11 +130,21 @@ 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.linkEnable === 'true' && !verify.linkUrl) { + error = '鎵撳紑閾炬帴寮�鍚椂锛岄渶瑕佹坊鍔犻摼鎺ュ湴鍧�锛�' } else if (verify.accountdate === 'true' && !verify.accountfield) { error = '寮�鍚处鏈熸椂锛岄渶瑕侀�夋嫨楠岃瘉鍏徃锛�' + } else if (verify.preHandle === 'true' && !verify.pre_func) { + error = '寮�鍚嚜瀹氫箟鑴氭湰鏃讹紝闇�瑕佸~鍐欏鐞嗗嚱鏁帮紒' } else if (verify.wxNote === 'true') { if (!verify.wxTemplateId) { error = '寮�鍚叕浼楀彿娑堟伅鎺ㄩ�佹椂锛岄渶瑕侀�夋嫨娑堟伅妯℃澘锛�' + } else if (verify.wxTemplateId === 'mk_category_temp' && !verify.wxCustomTempId) { + error = '寮�鍚叕浼楀彿娑堟伅鎺ㄩ�佹椂锛岄渶瑕佸~鍐欐秷鎭ā鏉縄D锛�' } else if (verify.wxNoteLink === 'url' && !verify.wxNoteLinkUrl) { error = '璇峰~鍐欑綉鍧�锛�' } @@ -140,16 +154,31 @@ } onOptionChange = (value, key) => { - const { verify, setting } = this.props + const { verify } = this.props let _verify = {...verify, [key]: value} if (_verify.noteEnable !== 'true') { _verify.noteCode = '' + _verify.noteId = '' + } + if (_verify.emailEnable !== 'true') { + _verify.emailCode = '' + _verify.emailId = '' + } + if (_verify.printEnable !== 'true') { + _verify.printTempId = '' + } + if (_verify.linkEnable !== 'true') { + delete _verify.linkUrl + delete _verify.linkProUrl } if (_verify.accountdate !== 'true') { _verify.accountfield = '' _verify.voucherdate = '' + } + if (_verify.preHandle !== 'true') { + _verify.pre_func = '' } if (_verify.wxNote !== 'true') { _verify.wxTemplateId = '' @@ -159,18 +188,11 @@ _verify.wxNoteCallback = 'false' _verify.wxNoteKeys = null + delete _verify.wxCustomTempId + if (this.state.selectTemp) { this.setState({selectTemp: null}) } - } - - if (verify.invalid !== 'true' && _verify.invalid === 'true' && setting.maxScript && setting.maxScript >= 300) { - notification.warning({ - top: 92, - message: '鏁版嵁婧愪腑鑷畾涔夎剼鏈繃浜庡鏉傦紝涓嶈兘浣跨敤澶辨晥楠岃瘉锛�', - duration: 5 - }) - return } this.props.onChange(_verify) @@ -180,6 +202,22 @@ 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) + } + + onPrintIdChange = (val) => { + const { verify } = this.props + + let _verify = {...verify, printTempId: val} this.props.onChange(_verify) } @@ -196,15 +234,27 @@ keys = keys.map(key => key.replace(/{{|\.DATA}}/g, '')) } - let index = 1 - _verify.wxNoteKeys = keys.map(key => { - let item = { key: key } - - item.value = 'p' + index - index++ + delete _verify.wxCustomTempId - return item - }) + if (selectTemp.template_id === 'mk_category_temp') { + _verify.wxNoteKeys = [] + for (let i = 1; i <= 10; i++) { + _verify.wxNoteKeys.push({ + key: '', + value: 'p' + i + }) + } + } else { + let index = 1 + _verify.wxNoteKeys = keys.map(key => { + let item = { key: key } + + item.value = 'p' + index + index++ + + return item + }) + } this.setState({selectTemp}) @@ -225,8 +275,30 @@ this.props.onChange(_verify) } + onWxNoteValueChange = (value, val) => { + let _verify = fromJS(this.props.verify).toJS() + + _verify.wxNoteKeys = _verify.wxNoteKeys.map(m => { + if (m.value === value) { + m.key = val.replace(/\s+/ig, '') + } + + return m + }) + + this.props.onChange(_verify) + } + + onWxNoteTempIdChange = (value) => { + let _verify = fromJS(this.props.verify).toJS() + + _verify.wxCustomTempId = value.replace(/\s+/ig, '') + + this.props.onChange(_verify) + } + render() { - const { unionFields, verify, notes, card } = this.props + const { unionFields, verify, notes, emailCodes, card, appType, columns, fields } = this.props const { wxTemps, selectTemp } = this.state const formItemLayout = { labelCol: { @@ -237,6 +309,33 @@ xs: { span: 24 }, sm: { span: 16 } } + } + + let _columns = [] + let remarks = [] + if (window.GLOB.process && card.intertype !== 'inner') { + let cols = [] + fields.forEach(col => { + if (!col.field) return + + cols.push(col.field.toLowerCase()) + _columns.push(col) + + if ((col.type === 'text' || col.type === 'textarea') && col.field !== 'BID') { + remarks.push(col) + } + }) + + columns.forEach(col => { + if (!col.field) return + + let key = col.field.toLowerCase() + + if (key === 'id' || cols.includes(key)) return + if (col.type === 'text' && col.fieldlength > 100) return + + _columns.push(col) + }) } return ( @@ -256,8 +355,13 @@ </Form.Item> </Col> : null} {card.intertype !== 'inner' ? <Col span={8}> - <Form.Item label={'澶辨晥楠岃瘉'}> - <Radio.Group value={verify.invalid} onChange={(e) => {this.onOptionChange(e.target.value, 'invalid')}}> + <Form.Item label={ + verify.limitText ? <Tooltip placement="bottomLeft" title={verify.limitText}> + <QuestionCircleOutlined className="mk-form-tip" /> + 澶辨晥楠岃瘉 + </Tooltip> : '澶辨晥楠岃瘉' + }> + <Radio.Group value={verify.invalid} disabled={verify.limitInvalid} onChange={(e) => {this.onOptionChange(e.target.value, 'invalid')}}> <Radio value="true">寮�鍚�</Radio> <Radio value="false">涓嶅紑鍚�</Radio> </Radio.Group> @@ -319,7 +423,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} @@ -335,7 +439,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> @@ -348,10 +452,189 @@ 鐭俊鍐呭 </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> + </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 help={(() => { + if (verify.printTempId) { + return <span onClick={() => { + sessionStorage.setItem('mk-print-temp', verify.printTempId) + window.open('#/hs') + + setTimeout(() => { + sessionStorage.removeItem('mk-print-temp') + }, 50) + }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#鏌ョ湅妯℃澘</span> + } + return null + })()}> + <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="鎸夐挳鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勯摼鎺ュ湴鍧�銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎵撳紑閾炬帴 + </Tooltip> + }> + <Radio.Group value={verify.linkEnable || 'false'} onChange={(e) => {this.onOptionChange(e.target.value, 'linkEnable')}}> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">涓嶅紑鍚�</Radio> + </Radio.Group> + </Form.Item> + </Col> + {verify.linkEnable === 'true' ? <Col span={24} className="dz-link"> + <Form.Item label="閾炬帴鍦板潃" required> + <Input.TextArea autoComplete="off" value={verify.linkUrl || ''} onChange={(e) => {this.onOptionChange(e.target.value, 'linkUrl')}}/> + </Form.Item> + </Col> : null} + {verify.linkEnable === 'true' ? <Col span={24} className="dz-link"> + <Form.Item label="姝e紡鍦板潃"> + <Input.TextArea autoComplete="off" value={verify.linkProUrl || ''} onChange={(e) => {this.onOptionChange(e.target.value, 'linkProUrl')}}/> + </Form.Item> + </Col> : null} + <Col span={24}></Col> + {window.GLOB.process && card.intertype !== 'inner' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="鍦ㄨ彍鍗曞紑鍚伐浣滄祦鏃舵湁鏁堛��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 宸ヤ綔娴� + </Tooltip> + }> + <Radio.Group value={verify.workFlow} onChange={(e) => {this.onOptionChange(e.target.value, 'workFlow')}}> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">涓嶅紑鍚�</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' ? <Col span={8}> + <Form.Item label="绫诲瀷"> + <Radio.Group value={verify.flowType} onChange={(e) => {this.onOptionChange(e.target.value, 'flowType')}}> + <Radio value="start">鍙戣捣</Radio> + <Radio value="approval">瀹℃壒</Radio> + <Radio value="reject">椹冲洖</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="鎵ц浣嶇疆鍦ㄧ郴缁熼粯璁ql涔嬪悗銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 榛樿sql锛堝伐浣滄祦锛� + </Tooltip> + }> + <Radio.Group value={verify.flowSql} onChange={(e) => {this.onOptionChange(e.target.value, 'flowSql')}}> + <Radio value="true">鎵ц</Radio> + <Radio value="false">涓嶆墽琛�</Radio> + </Radio.Group> + </Form.Item> + </Col> : null} + {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' && verify.flowType === 'approval' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="濡傛灉瀹℃壒瀛樺湪澶氭潯鍒嗘敮锛屽彲娣诲姞瀹℃壒娴佺▼鐨勬帶鍒跺瓧娈碉紝閫氳繃琛ㄥ崟淇℃伅鎴栬淇℃伅鎺у埗娴佺▼璧板悜銆傛敞锛氶渶鍦ㄦ祦绋嬪浘涓畬鍠勫垎鏀殑鎵ц鏉′欢銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 娴佺▼鎺у埗 + </Tooltip> + }> + <Select allowClear value={verify.flowBranch} onChange={(val) => {this.onOptionChange(val || '', 'flowBranch')}}> + {_columns.map(option => + <Select.Option key={option.field} value={option.field}> + {option.label} + </Select.Option> + )} + </Select> + </Form.Item> + </Col> : null} + {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' && verify.flowType !== 'start' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="bottomLeft" title="鍙�氳繃琛ㄥ崟瀛楁濉啓瀹℃壒鎴栭┏鍥炵殑澶囨敞淇℃伅銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 澶囨敞瀛楁 + </Tooltip> + }> + <Select allowClear value={verify.flowRemark} onChange={(val) => {this.onOptionChange(val || '', 'flowRemark')}}> + {remarks.map(option => + <Select.Option key={option.field} value={option.field}> + {option.label} + </Select.Option> + )} + </Select> </Form.Item> </Col> : null} <Col span={24}></Col> @@ -421,7 +704,7 @@ <Input placeholder="" autoComplete="off" value={verify.wxNoteLinkMenuId || ''} onChange={(e) => {this.onOptionChange(e.target.value, 'wxNoteLinkMenuId')}}/> </Form.Item> </Col> : null} - {verify.wxNote === 'true' && verify.wxNoteKeys ? verify.wxNoteKeys.map((item, index) => <Col span={8} key={'mk' + index}> + {verify.wxNote === 'true' && verify.wxNoteKeys && (!selectTemp || selectTemp.template_id !== 'mk_category_temp') ? verify.wxNoteKeys.map((item, index) => <Col span={8} key={'mk' + index}> <Form.Item label={item.key} required> <Select value={item.value} onSelect={(val) => this.onWxNoteKeyChange(item.key, val)}> <Select.Option value="p1">p1</Select.Option> @@ -435,6 +718,16 @@ <Select.Option value="p9">p9</Select.Option> <Select.Option value="p10">p10</Select.Option> </Select> + </Form.Item> + </Col>) : null} + {verify.wxNote === 'true' && verify.wxNoteKeys && (selectTemp && selectTemp.template_id === 'mk_category_temp') ? <Col span={8}> + <Form.Item label="妯℃澘ID" required> + <Input placeholder="" defaultValue={verify.wxCustomTempId} autoComplete="off" onChange={(e) => {this.onWxNoteTempIdChange(e.target.value)}}/> + </Form.Item> + </Col> : null} + {verify.wxNote === 'true' && verify.wxNoteKeys && (selectTemp && selectTemp.template_id === 'mk_category_temp') ? verify.wxNoteKeys.map((item, index) => <Col span={8} key={'mk' + index}> + <Form.Item label={item.value}> + <Input placeholder="" defaultValue={item.key} autoComplete="off" onChange={(e) => {this.onWxNoteValueChange(item.value, e.target.value)}}/> </Form.Item> </Col>) : null} {selectTemp && selectTemp.template_id !== 'mk_category_temp' && verify.wxNoteKeys ? <Col span={24} className="wx-note"> @@ -462,6 +755,36 @@ </div> </div> </Col> : null} + {selectTemp && selectTemp.template_id === 'mk_category_temp' && verify.wxNoteKeys ? <Col span={24} className="wx-note"> + <div className="note-wrap"> + <div className="note"> + <p>娑堟伅浣�</p> + <div> + <p>openid: "鎺ユ敹鑰卭penid",</p> + <p>send_id: "闃查噸鍏d",</p> + <p>bid: "璺宠浆灏忕▼搴忔椂锛屽彲浣滀负BID銆�"</p> + <p style={{color: '#1890ff'}}>璇峰湪閫氱敤瀛楁涓紙p1~p10锛夊~鍏ユā鏉夸腑瀵瑰簲鐨勫瓧娈靛悕锛屽 time1.DATA 鍒欏~鍐� time1銆�</p> + </div> + </div> + </div> + </Col> : null} + <Col span={24}></Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topRight" title="杩愯鏃朵慨鏀规寜閽弬鏁帮紝鍏ュ弬涓猴紙btn, position, systemType锛�,鏍囪#position-(init,inner,outer,callback)"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鑷畾涔夎剼鏈� + </Tooltip> + }> + <Radio.Group value={verify.preHandle || 'false'} onChange={(e) => {this.onOptionChange(e.target.value, 'preHandle')}}> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">涓嶅紑鍚�</Radio> + </Radio.Group> + </Form.Item> + </Col> + {verify.preHandle === 'true' ? <Col span={24} style={{paddingLeft: '50px'}}> + <CodeMirror mode="text/javascript" theme="cobalt" value={verify.pre_func || ''} onChange={(val) => {this.onOptionChange(val, 'pre_func')}} /> + </Col> : null} </Row> </Form> ) -- Gitblit v1.8.0