| | |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open', 'output'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width'] |
| | |
| | | value: 'self', |
| | | text: '当前窗口' |
| | | }] |
| | | } |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示方式', |
| | | initVal: card.display || 'modal', |
| | | required: true, |
| | | options: [{ |
| | | value: 'modal', |
| | | text: '模态框' |
| | | }, { |
| | | value: 'drawer', |
| | | text: '抽屉' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'ratio', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | label: '比例', |
| | | initVal: card.ratio || 85, |
| | | tooltip: '小于100为宽度(或高度)百分比,大于100为像素值。', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'placement', |
| | | label: '抽屉方向', |
| | | initVal: card.placement || 'right', |
| | | tooltip: '使用抽屉时有效。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'right', |
| | | text: '右侧' |
| | | }, { |
| | | value: 'left', |
| | | text: '左侧' |
| | | }, { |
| | | value: 'top', |
| | | text: '上侧' |
| | | }, { |
| | | value: 'bottom', |
| | | text: '下侧' |
| | | }] |
| | | }, |
| | | ] |
| | | |
| | | return forms |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id, orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{window.GLOB.urlFields && window.GLOB.urlFields.length > 0 ? ', ' + window.GLOB.urlFields.join(', ') : ''} |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, login_city, appkey, time_id, orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{window.GLOB.urlFields && window.GLOB.urlFields.length > 0 ? ', ' + window.GLOB.urlFields.join(', ') : ''} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={10} style={{width: '43%'}}> |
| | |
| | | _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '') |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id |
| | | bid, loginuid, sessionuid, userid, username, fullname, RoleID, login_city, appkey, time_id |
| | | </Form.Item> |
| | | </Col> |
| | | {type === 'back' ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | let regoptions = [] |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | regoptions.forEach(item => { |
| | | param.custom_script = param.custom_script.replace(item.reg, item.value) |
| | | }) |
| | | |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${param.custom_script} |
| | | ` |
| | | |
| | |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | if (nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()}) |
| | | this.setState({mainSearch: null}, () => { |
| | | this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()}) |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | const { self } = this.state |
| | | |
| | | if (!self && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()}) |
| | | this.setState({mainSearch: null}, () => { |
| | | this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()}) |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | } |
| | | |
| | | if (param.custom_script) { |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${param.custom_script} |
| | | ` |
| | | regoptions.forEach(item => { |
| | |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, Icon } from 'antd' |
| | | import { Button, Modal, notification, Icon, Drawer } from 'antd' |
| | | |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | |
| | | } |
| | | } |
| | | |
| | | getPop = () => { |
| | | const { btn } = this.props |
| | | const { popData, primaryId, visible } = this.state |
| | | |
| | | let ratio = btn.ratio || 85 |
| | | |
| | | if (btn.display !== 'drawer') { |
| | | if (ratio > 100) { |
| | | ratio = ratio + 'px' |
| | | } else { |
| | | ratio = ratio + 'vw' |
| | | } |
| | | return <Modal |
| | | className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')} |
| | | title={btn.label} |
| | | width={ratio} |
| | | maskClosable={false} |
| | | visible={visible} |
| | | onCancel={this.popclose} |
| | | footer={[ |
| | | <Button key="close" onClick={this.popclose}>{this.state.dict['main.close']}</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | {btn.$view !== 'CustomPage' ? <SubTabTable |
| | | Tab={btn} |
| | | MenuID={btn.linkTab} |
| | | SupMenuID={this.props.MenuID} |
| | | BID={popData ? primaryId : this.props.BID} |
| | | BData={popData || this.props.BData} |
| | | /> : null} |
| | | {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null} |
| | | </Modal> |
| | | } else { |
| | | let height = '100vh' |
| | | let width = '100vw' |
| | | if (btn.placement === 'top' || btn.placement === 'bottom') { |
| | | if (ratio > 100) { |
| | | ratio = ratio + 'px' |
| | | } else { |
| | | ratio = ratio + 'vh' |
| | | } |
| | | |
| | | height = ratio |
| | | } else { |
| | | if (ratio > 100) { |
| | | ratio = ratio + 'px' |
| | | } else { |
| | | ratio = ratio + 'vw' |
| | | } |
| | | |
| | | width = ratio |
| | | } |
| | | |
| | | return ( |
| | | <Drawer |
| | | title={btn.label} |
| | | className={btn.$view === 'CustomPage' ? 'custom-drawer-popview' : ''} |
| | | width={width} |
| | | height={height} |
| | | maskClosable={false} |
| | | onClose={this.popclose} |
| | | visible={visible} |
| | | placement={btn.placement || 'right'} |
| | | destroyOnClose |
| | | > |
| | | {btn.$view !== 'CustomPage' ? <SubTabTable |
| | | Tab={btn} |
| | | MenuID={btn.linkTab} |
| | | SupMenuID={this.props.MenuID} |
| | | BID={popData ? primaryId : this.props.BID} |
| | | BData={popData || this.props.BData} |
| | | /> : null} |
| | | {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null} |
| | | <div className="close-drawer"> |
| | | <Button onClick={this.popclose}> |
| | | 关闭 |
| | | </Button> |
| | | </div> |
| | | </Drawer> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { loading, popData, primaryId, disabled } = this.state |
| | | const { loading, disabled } = this.state |
| | | |
| | | let label = '' |
| | | let icon = '' |
| | |
| | | icon = '' |
| | | } else if (show === 'icon') { |
| | | icon = btn.icon || '' |
| | | // } else if (show === 'text') { |
| | | } else { |
| | | label = btn.label |
| | | } |
| | |
| | | icon={icon} |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{label}</Button> : null} |
| | | <Modal |
| | | className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')} |
| | | title={btn.label} |
| | | width={'85vw'} |
| | | maskClosable={false} |
| | | visible={this.state.visible} |
| | | onCancel={this.popclose} |
| | | footer={[ |
| | | <Button key="close" onClick={this.popclose}>{this.state.dict['main.close']}</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | {btn.$view !== 'CustomPage' ? <SubTabTable |
| | | Tab={btn} |
| | | MenuID={btn.linkTab} |
| | | SupMenuID={this.props.MenuID} |
| | | BID={popData ? primaryId : this.props.BID} |
| | | BData={popData || this.props.BData} |
| | | /> : null} |
| | | {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null} |
| | | </Modal> |
| | | {this.getPop()} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | padding: 0; |
| | | } |
| | | } |
| | | .custom-drawer-popview { |
| | | .ant-drawer-content { |
| | | .ant-drawer-header { |
| | | position: absolute; |
| | | width: 100%; |
| | | background: #ffffff; |
| | | z-index: 3; |
| | | } |
| | | .ant-drawer-body { |
| | | padding: 55px 0 50px 0; |
| | | .close-drawer { |
| | | position: absolute; |
| | | z-index: 3; |
| | | right: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | padding: 8px 16px; |
| | | background: #fff; |
| | | text-align: right; |
| | | box-shadow: 0 0 3px #cbcbcb; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | inputNumberRef = React.createRef() |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | |
| | | mkFormHandle = (type, uuid, value) => { |
| | | if (uuid !== this.props.config.uuid) return |
| | | if (type === 'focus') { |
| | | this.inputNumberRef.current.focus() |
| | | let node = document.getElementById(uuid) |
| | | node.select() |
| | | } else if (type === 'input') { |
| | | this.setState({value}) |
| | | this.props.onChange(value, true) |
| | |
| | | const { value, precision } = this.state |
| | | |
| | | if (precision === null) { |
| | | return (<InputNumber ref={this.inputNumberRef} value={value} disabled={config.readonly} onChange={this.handleChange} onPressEnter={onSubmit}/>) |
| | | return (<InputNumber id={config.uuid} value={value} disabled={config.readonly} onChange={this.handleChange} onPressEnter={onSubmit}/>) |
| | | } else { |
| | | return (<InputNumber ref={this.inputNumberRef} value={value} precision={precision} disabled={config.readonly} onChange={this.handleChange} onPressEnter={onSubmit} />) |
| | | return (<InputNumber id={config.uuid} value={value} precision={precision} disabled={config.readonly} onChange={this.handleChange} onPressEnter={onSubmit} />) |
| | | } |
| | | } |
| | | } |
| | |
| | | exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'], |
| | | popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose'], |
| | | popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'placement'], |
| | | tab: ['label', 'Ot', 'OpenType', 'tabTemplate', 'icon', 'class', 'position'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class'] |
| | |
| | | } |
| | | |
| | | let _sql = `Declare @${btn.sheet} table (${columns.map(item => item.Column + ' ' + item.type).join(',')},jskey nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Select @ErrorCode='', @retmsg='' |
| | | ` |
| | | |
| | |
| | | } |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | </Col> |
| | | {usefulFields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id{usefulFields ? ', ' + usefulFields : ''} |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, login_city, appkey, time_id{usefulFields ? ', ' + usefulFields : ''} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!usefulFields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, login_city, appkey, time_id |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!usefulFields ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''} |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, login_city, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={10} className="quick-add"> |
| | |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | } |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示方式', |
| | | initVal: card.display || 'modal', |
| | | required: true, |
| | | options: [{ |
| | | value: 'modal', |
| | | text: '模态框' |
| | | }, { |
| | | value: 'drawer', |
| | | text: '抽屉' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'ratio', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | label: '比例', |
| | | initVal: card.ratio || 85, |
| | | tooltip: '小于100为宽度(或高度)百分比,大于100为像素值。', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'placement', |
| | | label: '抽屉方向', |
| | | initVal: card.placement || 'right', |
| | | tooltip: '使用抽屉时有效。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'right', |
| | | text: '右侧' |
| | | }, { |
| | | value: 'left', |
| | | text: '左侧' |
| | | }, { |
| | | value: 'top', |
| | | text: '上侧' |
| | | }, { |
| | | value: 'bottom', |
| | | text: '下侧' |
| | | }] |
| | | }, |
| | | ] |
| | | } |
| | | |
| | |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | let _modularDetail = [] |
| | | let _billFields = [] |
| | | let _billFields = [{ |
| | | field: 'BID', |
| | | label: 'BID', |
| | | type: 'text', |
| | | uuid: 'BID' |
| | | }] |
| | | |
| | | if (this.props.modular.length > 0) { |
| | | _modularDetail = this.props.modularDetail.filter(item => item.BID === this.props.modular[0].ID) |
| | | } |
| | | |
| | | let fieldMap = new Map() |
| | | this.props.fields.forEach(_field => { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field)) { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field.toLowerCase())) { |
| | | _billFields.push(_field) |
| | | fieldMap.set(_field.field, true) |
| | | fieldMap.set(_field.field.toLowerCase(), true) |
| | | } |
| | | }) |
| | | |
| | | if (this.props.btn.Ot !== 'notRequired') { |
| | | this.props.columns.forEach(_field => { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field)) { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field.toLowerCase())) { |
| | | _billFields.push(_field) |
| | | fieldMap.set(_field.field, true) |
| | | fieldMap.set(_field.field.toLowerCase(), true) |
| | | } |
| | | }) |
| | | } |
| | |
| | | resolve(_fields) |
| | | } |
| | | }).then(_fields => { |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'login_city', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@login_city nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@login_city=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'RoleID', 'login_city', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@login_city nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@login_city=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) |
| | | let hasBid = false |
| | | |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | let _customScript = '' |
| | | |
| | | if (setting.customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${setting.customScript} |
| | | ` |
| | | } |
| | |
| | | let _customScript = '' |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | } |
| | | |
| | | if (setting.customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${setting.customScript} |
| | | ` |
| | | } |
| | |
| | | let sql = '' |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | |
| | | if (sql) { |
| | | sql = `/*前置脚本*/ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${sql} |
| | | aaa: |
| | | if @ErrorCode!='' |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${errSql} |
| | | ` |
| | | let _backCustomScript = ` |
| | |
| | | let diffUser = false |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | let _script = item.script |
| | | |
| | | if (index === 0) { |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${_script} |
| | | ` |
| | | } |
| | |
| | | let keys = ['delete', 'drop', 'insert', 'truncate', 'update'] |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let _sheet = item.sheet |
| | | |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (${declarefields.join(',')},jskey nvarchar(50),BID nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ${_initCustomScript} |
| | | ` |
| | | _sqlInsert = `Insert into @${sheet} (${fields},jskey,BID)` |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (jskey nvarchar(50)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}' |
| | | ` |
| | | } |
| | | |
| | |
| | | _declarefields = ',' + _declarefields |
| | | } |
| | | _sql = `/* 系统生成 */ |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@login_city nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}', @BillCode='', @ModularDetailCode='' |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @login_city='${city}', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | if (retmsg) { |
| | |
| | | delButtons: [], |
| | | copyButtons: [], |
| | | thawButtons: [], |
| | | menuloading: false, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | comloading: false |
| | | }) |
| | | menuloading: false |
| | | }) |
| | | notification.success({ |
| | | top: 92, |
| | |
| | | this.setState({ |
| | | config, |
| | | oriConfig: fromJS(config).toJS(), |
| | | menuloading: false, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | comloading: false |
| | | }) |
| | | menuloading: false |
| | | }) |
| | | |
| | | notification.success({ |
| | |
| | | delButtons: [], |
| | | copyButtons: [], |
| | | thawButtons: [], |
| | | menuloading: false, |
| | | comloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | comloading: false |
| | | }) |
| | | menuloading: false |
| | | }) |
| | | notification.success({ |
| | | top: 92, |