| | |
| | | width: 100%; |
| | | } |
| | | } |
| | | label[title=" "]::after, label[title=" "]::after { |
| | | display: none; |
| | | } |
| | | .page-card.advanced { |
| | | .ant-form-item-label label { |
| | | color: orange; |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'noValue', |
| | | label: '空值', |
| | | initVal: card.noValue || 'show', |
| | | tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示', |
| | | required: false, |
| | | options: [{ |
| | | value: 'show', |
| | | text: '显示' |
| | | }, { |
| | | value: 'hide', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | _options.push('sortField') |
| | | } |
| | | |
| | | if (this.record.Hide !== 'true') { |
| | | if (['number', 'formula'].includes(this.record.type)) { |
| | | _options.push('noValue') |
| | | } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) { |
| | | _options.push('noValue') |
| | | } |
| | | } |
| | | |
| | | return _options |
| | | } |
| | | |
| | |
| | | } |
| | | } else if (key === 'format' && value === 'percent') { |
| | | this.props.form.setFieldsValue({postfix: '%'}) |
| | | } else if (['perspective', 'eval', 'IsSort'].includes(key)) { |
| | | } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { |
| | | let _options = this.getOptions() |
| | | |
| | | this.setState({ |
| | |
| | | key: 'noValue', |
| | | label: '空值', |
| | | initVal: card.noValue || 'show', |
| | | tooltip: '当值为0时是否显示', |
| | | tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示', |
| | | required: false, |
| | | options: [{ |
| | | value: 'show', |
| | |
| | | } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { |
| | | _options.push('sortField') |
| | | } |
| | | if (['number', 'formula'].includes(this.record.type) && this.record.Hide !== 'true') { |
| | | _options.push('noValue') |
| | | |
| | | if (this.record.Hide !== 'true') { |
| | | if (['number', 'formula'].includes(this.record.type)) { |
| | | _options.push('noValue') |
| | | } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) { |
| | | _options.push('noValue') |
| | | } |
| | | } |
| | | |
| | | return _options |
| | |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort'].includes(key)) { |
| | | } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort', 'textFormat'].includes(key)) { |
| | | let _options = this.getOptions() |
| | | |
| | | this.setState({ |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'noValue', |
| | | label: '空值', |
| | | initVal: card.noValue || 'show', |
| | | tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示', |
| | | required: false, |
| | | options: [{ |
| | | value: 'show', |
| | | text: '显示' |
| | | }, { |
| | | value: 'hide', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | _options.push('sortField') |
| | | } |
| | | |
| | | if (this.record.Hide !== 'true') { |
| | | if (['number', 'formula'].includes(this.record.type)) { |
| | | _options.push('noValue') |
| | | } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) { |
| | | _options.push('noValue') |
| | | } |
| | | } |
| | | |
| | | return _options |
| | | } |
| | | |
| | |
| | | } |
| | | } else if (key === 'format' && value === 'percent') { |
| | | this.props.form.setFieldsValue({postfix: '%'}) |
| | | } else if (['perspective', 'eval', 'IsSort'].includes(key)) { |
| | | } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { |
| | | let _options = this.getOptions() |
| | | |
| | | this.setState({ |
| | |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="可用字段" className="field-able"> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, 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</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@或@orderBy@代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}</Tooltip> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> |
| | |
| | | content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> |
| | | } |
| | | |
| | | if (col.noValue === 'hide' && content < '1949-10-02') { |
| | | content = '' |
| | | } |
| | | |
| | | if (col.textFormat !== 'encryption') { |
| | | content = (col.prefix || '') + content + (col.postfix || '') |
| | | } |
| | |
| | | try { |
| | | content = parseFloat(record[col.field]) |
| | | if (isNaN(content)) { |
| | | content = '' |
| | | } |
| | | if (col.noValue === 'hide' && content === 0) { |
| | | content = '' |
| | | } |
| | | } catch (e) { |
| | |
| | | // eslint-disable-next-line |
| | | let func = new Function('data', col.formula) |
| | | content = func([record]) |
| | | |
| | | if (col.noValue === 'hide' && content === 0) { |
| | | content = '' |
| | | } |
| | | } catch (e) { |
| | | console.warn(e) |
| | | content = '' |
| | |
| | | try { |
| | | // eslint-disable-next-line |
| | | content = eval(content) |
| | | |
| | | if (col.noValue === 'hide' && content === 0) { |
| | | content = '' |
| | | } |
| | | } catch (e) { |
| | | console.info(content) |
| | | console.warn(e) |
| | |
| | | content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> |
| | | } |
| | | |
| | | if (col.noValue === 'hide' && content < '1949-10-02') { |
| | | content = '' |
| | | } |
| | | |
| | | if (col.textFormat !== 'encryption') { |
| | | content = (col.prefix || '') + content + (col.postfix || '') |
| | | } |
| | |
| | | content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> |
| | | } |
| | | |
| | | if (col.noValue === 'hide' && content < '1949-10-02') { |
| | | content = '' |
| | | } |
| | | |
| | | if (col.textFormat !== 'encryption') { |
| | | content = (col.prefix || '') + content + (col.postfix || '') |
| | | } |
| | |
| | | sql = sql.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | | sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, `'Y'`) |
| | | } else { |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`) |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | |
| | | .ant-form-item-label { |
| | | text-overflow: ellipsis; |
| | | } |
| | | label[title=" "]::after, label[title=" "]::after { |
| | | display: none; |
| | | } |
| | | .daterange .ant-calendar-picker-input { |
| | | padding: 4px 20px 4px 5px; |
| | | font-size: 13px; |
| | |
| | | .ant-form-item-label { |
| | | text-overflow: ellipsis; |
| | | } |
| | | label[title=" "]::after, label[title=" "]::after { |
| | | display: none; |
| | | } |
| | | .daterange .ant-calendar-picker-input { |
| | | padding: 4px 20px 4px 5px; |
| | | font-size: 13px; |
| | |
| | | .ant-form-item-label { |
| | | float: left; |
| | | } |
| | | label[title=" "]::after, label[title=" "]::after { |
| | | display: none; |
| | | } |
| | | .ant-form-item-control-wrapper { |
| | | float: left; |
| | | .ant-select { |
| | |
| | | |
| | | // 数据权限 |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '') |
| | | sql = sql.replace(/@datam@/ig, `''`) |
| | | sql = sql.replace(/@typename@/ig, `'debug'`) |
| | | |
| | | if (skip) { |
| | |
| | | <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'}}> |
| | | <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, 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> : ''} |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!type ? <Col span={8}> |
| | | <Form.Item label={'快捷添加'} style={{marginBottom: 0}}> |
| | | <Form.Item label="快捷添加" style={{marginBottom: 0}}> |
| | | <Select |
| | | allowClear |
| | | showSearch |
| | |
| | | </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>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, 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> : ''} |
| | |
| | | if (item.type === 'date') { |
| | | if (!item.value) { |
| | | if (['>=', '>'].includes(item.match)) { |
| | | item.value = '1970-01-01 00:00:00.000' |
| | | item.value = '1900-01-01 00:00:00.000' |
| | | } else if (['<=', '<'].includes(item.match)) { |
| | | item.value = '2050-01-01 00:00:00.000' |
| | | item.value = '3000-01-01 00:00:00.000' |
| | | } |
| | | } else if (search.precision === 'day') { |
| | | if (['>=', '>'].includes(item.match)) { |
| | |
| | | if (item.match === '=') { |
| | | options.push(item) |
| | | } else { |
| | | let _startval = item.value ? moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000' |
| | | let _endval = item.value ? moment(item.value, 'YYYY-MM').endOf('month').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000' |
| | | let _startval = item.value ? moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000' : '1900-01-01 00:00:00.000' |
| | | let _endval = item.value ? moment(item.value, 'YYYY-MM').endOf('month').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '3000-01-01 00:00:00.000' |
| | | |
| | | let copy = JSON.parse(JSON.stringify(item)) |
| | | copy.key = copy.key + '1' |
| | |
| | | options.push(item) |
| | | options.push(copy) |
| | | } else if (item.type === 'dateweek') { |
| | | let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000' |
| | | let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000' |
| | | let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1900-01-01 00:00:00.000' |
| | | let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '3000-01-01 00:00:00.000' |
| | | |
| | | let copy = JSON.parse(JSON.stringify(item)) |
| | | copy.key = copy.key + '1' |
| | |
| | | options.push(item) |
| | | options.push(copy) |
| | | } else if (item.type === 'daterange') { |
| | | let _startval = '1970-01-01 00:00:00.000' |
| | | let _endval = '2050-01-01 00:00:00.000' |
| | | let _startval = '1900-01-01 00:00:00.000' |
| | | let _endval = '3000-01-01 00:00:00.000' |
| | | |
| | | if (item.value) { |
| | | let val = item.value.split(',') |