From 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:37:16 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/zshare/verifycard/baseform/index.jsx | 86 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 74 insertions(+), 12 deletions(-) diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx index 44e887b..affd4f5 100644 --- a/src/templates/zshare/verifycard/baseform/index.jsx +++ b/src/templates/zshare/verifycard/baseform/index.jsx @@ -134,6 +134,8 @@ 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) { @@ -166,6 +168,10 @@ } if (_verify.printEnable !== 'true') { _verify.printTempId = '' + } + if (_verify.linkEnable !== 'true') { + delete _verify.linkUrl + delete _verify.linkProUrl } if (_verify.accountdate !== 'true') { _verify.accountfield = '' @@ -292,7 +298,7 @@ } render() { - const { unionFields, verify, notes, emailCodes, card, appType, columns } = this.props + const { unionFields, verify, notes, emailCodes, card, appType, columns, fields } = this.props const { wxTemps, selectTemp } = this.state const formItemLayout = { labelCol: { @@ -306,13 +312,29 @@ } let _columns = [] - if (window.GLOB.process) { - _columns = columns.filter(col => { - if (!col.field) return false - if (col.field.toLowerCase() === 'id') return false - if (col.type === 'text' && col.fieldlength > 100) return false + 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 - return true + _columns.push(col) }) } @@ -524,7 +546,31 @@ </Form.Item> </Col> : null} <Col span={24}></Col> - {window.GLOB.process ? <Col span={8}> + <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" /> @@ -537,7 +583,7 @@ </Radio.Group> </Form.Item> </Col> : null} - {window.GLOB.process && verify.workFlow === 'true' ? <Col span={8}> + {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> @@ -546,7 +592,7 @@ </Radio.Group> </Form.Item> </Col> : null} - {window.GLOB.process && verify.workFlow === 'true' ? <Col span={8}> + {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" /> @@ -559,9 +605,9 @@ </Radio.Group> </Form.Item> </Col> : null} - {window.GLOB.process && verify.workFlow === 'true' && verify.flowType === 'approval' ? <Col span={8}> + {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' && verify.flowType === 'approval' ? <Col span={8}> <Form.Item label={ - <Tooltip placement="bottomLeft" title="濡傛灉瀹℃壒瀛樺湪澶氭潯鍒嗘敮锛屽彲娣诲姞瀹℃壒娴佺▼鐨勬帶鍒跺瓧娈碉紝閫氳繃琛屼俊鎭帶鍒舵祦绋嬭蛋鍚戙�傛敞锛氶渶鍦ㄦ祦绋嬪浘涓畬鍠勫垎鏀殑鎵ц鏉′欢銆�"> + <Tooltip placement="bottomLeft" title="濡傛灉瀹℃壒瀛樺湪澶氭潯鍒嗘敮锛屽彲娣诲姞瀹℃壒娴佺▼鐨勬帶鍒跺瓧娈碉紝閫氳繃琛ㄥ崟淇℃伅鎴栬淇℃伅鎺у埗娴佺▼璧板悜銆傛敞锛氶渶鍦ㄦ祦绋嬪浘涓畬鍠勫垎鏀殑鎵ц鏉′欢銆�"> <QuestionCircleOutlined className="mk-form-tip" /> 娴佺▼鎺у埗 </Tooltip> @@ -575,6 +621,22 @@ </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> <Col span={8}> <Form.Item label={ -- Gitblit v1.8.0