From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/zshare/verifycard/customscript/index.jsx | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index 1909699..9deb26b 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -45,9 +45,18 @@ } handleConfirm = () => { + const { type } = this.props const { editItem } = this.state // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� this.props.form.validateFieldsAndScroll((err, values) => { + if (type === 'fullscreen' && err) { + notification.warning({ + top: 92, + message: '璇疯緭鍏ql!', + duration: 5 + }) + return + } if (!err) { values.uuid = editItem ? editItem.uuid : '' values.position = values.position || (editItem ? editItem.position : 'front') @@ -167,10 +176,12 @@ param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase) } + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) + console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`) param.LText = Utils.formatOptions(param.LText) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) this.setState({loading: true}) @@ -231,6 +242,7 @@ render() { const { usefulfields, systemScripts, btn, type } = this.props const { getFieldDecorator } = this.props.form + const { editItem } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -244,12 +256,14 @@ let _type = type || '' + // let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null + return ( <Form {...formItemLayout} className="verify-form verify-custom-scripts" id={'verify-custom-scripts' + _type}> <Row gutter={24}> - {!_type && btn.sql ? <Col span={8}> + {!_type ? <Col span={8}> <Form.Item label={'琛ㄥ悕'} style={{whiteSpace: 'nowrap', margin: 0}}> - {btn.sql} + {btn.sql || ''} </Form.Item> </Col> : null} {!_type ? <Col span={10}> @@ -257,9 +271,12 @@ ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT锛�, retmsg </Form.Item> </Col> : null} - {!_type && usefulfields ? <Col span={24} className="sqlfield"> + {!_type ? <Col span={24} className="sqlfield"> <Form.Item label={'鍙敤瀛楁'}> - {usefulfields} + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>, + <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> + {usefulfields ? <span>, {usefulfields}</span> : ''} </Form.Item> </Col> : null} {!_type ?<Col span={8} style={{whiteSpace: 'nowrap'}}> @@ -300,7 +317,7 @@ </Col> : null} <Col span={6} className="add"> <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}> - 淇濆瓨 + {_type === 'fullscreen' && !editItem ? '娣诲姞' : '淇濆瓨'} </Button> <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}> 鍙栨秷 -- Gitblit v1.8.0