| | |
| | | static propTpyes = { |
| | | btn: PropTypes.object, // 按钮信息 |
| | | initsql: PropTypes.string, // 初始化脚本 |
| | | usefulfields: PropTypes.string, // 可用字段 |
| | | formfields: PropTypes.string, |
| | | colfields: PropTypes.string, |
| | | systemScripts: PropTypes.array, // 系统脚本 |
| | | customScripts: PropTypes.array, // 自定义脚本 |
| | | scriptsChange: PropTypes.func // 表单 |
| | |
| | | } |
| | | |
| | | if (!err) { |
| | | if (/^[\s\n]+$/.test(values.sql)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请输入sql!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | values.uuid = editItem ? editItem.uuid : '' |
| | | values.position = values.position || (editItem ? editItem.position : 'front') |
| | | |
| | |
| | | |
| | | // 数据权限 |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '') |
| | | sql = sql.replace(/@datam@/ig, `''`) |
| | | sql = sql.replace(/@typename@/ig, `'debug'`) |
| | | |
| | | if (skip) { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { usefulfields, systemScripts, btn, type } = this.props |
| | | const { formfields, colfields, systemScripts, btn, type } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { editItem, skip } = this.state |
| | | const formItemLayout = { |
| | |
| | | } |
| | | } |
| | | |
| | | // 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-callback-scripts" id="verify-custom-callback-scripts"> |
| | | <Row gutter={24}> |
| | | {!type ? <Col span={8}> |
| | | <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}> |
| | | <Form.Item label="表名" style={{whiteSpace: 'nowrap', margin: 0}}> |
| | | {btn.cbTable} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!type ? <Col span={10}> |
| | | <Form.Item label={'报错字段'} style={{margin: 0, whiteSpace: 'nowrap'}}> |
| | | ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT、CNT、-2NT), retmsg |
| | | <Form.Item label="报错字段" style={{margin: 0, whiteSpace: 'nowrap'}}> |
| | | errorcode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT、CNT、-2NT), retmsg |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!type ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>, |
| | | <Form.Item label="可用字段"> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, lang, time_id, typename, datam</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, mk_deleted</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> : ''} |
| | | {formfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="表单变量,系统会定义变量并赋值。">, <span style={{color: '#8E44AD'}}>{formfields}</span></Tooltip> : ''} |
| | | {colfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="字段集变量,系统会定义变量并赋值。">, {colfields}</Tooltip> : ''} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!type ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!type ? <Col span={8}> |
| | | <Form.Item label={'快捷添加'} style={{marginBottom: 0}}> |
| | | <Form.Item label="快捷添加" style={{marginBottom: 0}}> |
| | | <Select |
| | | allowClear |
| | | showSearch |