| | |
| | | } else if (this.record.type === 'close' || this.record.type === 'reset') { |
| | | shows = ['typeName', 'label'] |
| | | } else { |
| | | shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton'] // 选项列表 |
| | | shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton', 'refreshTab'] // 选项列表 |
| | | |
| | | if (this.record.execSuccess === 'never') { |
| | | shows.push('resetForms') |
| | |
| | | }) |
| | | } |
| | | |
| | | let closetab = [] |
| | | if (!appType && viewType !== 'popview') { |
| | | closetab = [{ |
| | | value: 'closetab', |
| | | text: '关闭标签' |
| | | }] |
| | | } |
| | | |
| | | let resets = [] |
| | | fields.forEach(item => { |
| | | if (item.type !== 'text' && item.type !== 'number') return |
| | |
| | | }, { |
| | | value: 'mainline', |
| | | text: '刷新上级组件 - 行' |
| | | }, ...refresh] |
| | | }, ...closetab, ...refresh] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'refreshTab', |
| | | label: '刷新菜单', |
| | | initVal: card.refreshTab || [], |
| | | tooltip: '执行成功后(或功能按钮中标签关闭类型),需要同步刷新的菜单', |
| | | required: false, |
| | | forbid: appType === 'pc' || appType === 'mob' || viewType === 'popview', |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader', |
| | |
| | | pasteForm = (forms, res) => { |
| | | let _config = fromJS(this.state.card).toJS() |
| | | |
| | | forms.forEach(item => { |
| | | delete item.focus |
| | | }) |
| | | |
| | | _config.subcards[0].fields = forms |
| | | |
| | | if (res.subButton) { |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | _config.subcards[0].fields = forms |
| | | |
| | | this.updateComponent(_config) |
| | | } |
| | | } |
| | |
| | | |
| | | res.fields.forEach(item => { |
| | | item.uuid = Utils.getuuid() |
| | | delete item.focus |
| | | }) |
| | | |
| | | if (!res.prevButton) { |
| | |
| | | {value: 'show', label: '显示'}, |
| | | {value: 'hidden', label: '隐藏'}, |
| | | ], |
| | | // controlFields: [ |
| | | // {field: 'labelSize', values: ['show']}, |
| | | // ] |
| | | controlFields: [ |
| | | // {field: 'labelSize', values: ['show']}, |
| | | {field: 'labelJump', values: ['show']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'labelJump', |
| | | label: '名称切换', |
| | | initval: wrap.labelJump || 'false', |
| | | tooltip: '开启时,可通过点击分组名称向前跳转。', |
| | | required: false, |
| | | forbid: config.subtype === 'tabform', |
| | | options: [ |
| | | {value: 'false', label: '关闭'}, |
| | | {value: 'true', label: '开启'}, |
| | | ] |
| | | }, |
| | | // { |
| | | // type: 'number', |
| | |
| | | |
| | | res.fields.forEach(item => { |
| | | item.uuid = Utils.getuuid() |
| | | delete item.focus |
| | | }) |
| | | |
| | | delete res.prevButton |
| | |
| | | {verify.type === 'billout' ? <Col span={8}> |
| | | <Form.Item label="回调表名"> |
| | | {getFieldDecorator('cbTable', { |
| | | initialValue: verify.cbTable || '' |
| | | initialValue: verify.cbTable || '', |
| | | rules: [ |
| | | { required: true, message: '请输入表名!' } |
| | | ] |
| | | })( |
| | | <Input autoComplete="off"/> |
| | | )} |
| | |
| | | |
| | | if (shows.includes('linkmenu') && this.record.linkmenu[0] === 'multiMenu') { |
| | | shows.push('multiMenus') |
| | | } else if (this.record.sysId === 'js') { |
| | | } else if (Ot === 'notRequired' && this.record.sysId === 'js') { |
| | | shows.push('sign') |
| | | } |
| | | |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '空' |
| | | text: '组件BID' |
| | | }, { |
| | | value: 'js', |
| | | text: '前端生成' |
| | | }, { |
| | | value: 'empty', |
| | | text: '空' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '空' |
| | | text: '组件BID' |
| | | }, { |
| | | value: 'js', |
| | | text: '前端生成' |
| | | }, { |
| | | value: 'empty', |
| | | text: '空' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | fields.push('jskey') |
| | | |
| | | let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '') |
| | | let _sql = `create table #${sheet} (${usefulfields.map(item => item.field + ' ' + item.datatype).join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(50)) |
| | | let _sql = `create table #${sheet} (${usefulfields.map(item => item.field + ' ' + item.datatype).join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(256)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Select @ErrorCode='', @retmsg='' |
| | | ` |
| | |
| | | ` |
| | | } |
| | | |
| | | sql = `create table #${sheet} (${declarefields.join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(50) ) |
| | | sql = `create table #${sheet} (${declarefields.join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(256)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' |
| | |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<SwapOutlined title="浮动"/>} |
| | | label={<SwapOutlined title="显示"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} defaultValue={card.display || 'block'} onChange={(e) => this.changeNormalStyle(e.target.value, 'display')}> |
| | |
| | | visible={visible} |
| | | closable={false} |
| | | maskClosable={false} |
| | | width={1050} |
| | | width={1070} |
| | | centered={true} |
| | | onOk={this.confirm} |
| | | onCancel={() => this.setState({visible: false})} |
| | |
| | | } else if (node.mknode === 'end') { |
| | | |
| | | } else if (node.mknode === 'endEdge') { |
| | | options = ['approvalMethod'] |
| | | options = ['approvalMethod', 'execCondition'] |
| | | } else if (node.mknode === 'startEdge') { |
| | | readOnly = true |
| | | } else if (node.mknode === 'firstEdge') { |
| | |
| | | return ( |
| | | <Form {...formItemLayout} className="normal-node-form"> |
| | | <Row gutter={24}> |
| | | {options.includes('approver') ? <Col span={24}> |
| | | {options.includes('approver') || options.includes('execCondition') ? <Col span={24}> |
| | | <p className="mk-split">按钮执行命令</p> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | |
| | | _config.sortStyle = {width: s, height: s, lineHeight: s, borderRadius: s} |
| | | } |
| | | |
| | | _config.style['--mk-active-color'] = _config.wrap.color || '#1890ff' |
| | | |
| | | this.setState({ |
| | | data: _data, |
| | | group: _group, |
| | |
| | | }) |
| | | } |
| | | |
| | | changeGroup = (sort) => { |
| | | const { config, step } = this.state |
| | | |
| | | if (config.wrap.labelJump !== 'true' || sort > step) return |
| | | |
| | | let _group = config.subcards.filter(item => item.sort === sort)[0] |
| | | |
| | | this.setState({group: null, step: sort - 1}, () => { |
| | | this.setState({group: _group}) |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { config, loading, BID, BData, data, group, step } = this.state |
| | | |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | {config.wrap.groupLabel !== 'hidden' ? <div className="mk-normal-form-title"> |
| | | {config.wrap.groupLabel !== 'hidden' ? <div className={'mk-normal-form-title' + (config.wrap.labelJump === 'true' ? ' jumpable' : '')}> |
| | | {config.subcards.map(card => ( |
| | | <div key={card.uuid} style={config.titleStyle} className={'form-title' + (card.sort <= step ? ' active' : '')}> |
| | | <span className="form-sort" style={{background: config.wrap.color, ...config.sortStyle}}>{card.sort}</span> |
| | | <span className="before-line" style={{background: config.wrap.color}}></span> |
| | | <span className="after-line" style={{background: config.wrap.color}}></span> |
| | | {card.setting.title} |
| | | <span className="form-sort" onClick={() => this.changeGroup(card.sort)} style={config.sortStyle}>{card.sort}</span> |
| | | <br/> |
| | | <span className="form-label" onClick={() => this.changeGroup(card.sort)}>{card.setting.title}</span> |
| | | <span className="before-line"></span> |
| | | <span className="after-line"></span> |
| | | </div>)) |
| | | } |
| | | </div> : null} |
| | |
| | | background-size: cover; |
| | | position: relative; |
| | | min-height: 50px; |
| | | --mk-active-color: #1890ff; |
| | | |
| | | .mk-normal-form-title { |
| | | display: flex; |
| | |
| | | font-weight: inherit; |
| | | .form-sort { |
| | | background: #d8d8d8; |
| | | display: block; |
| | | display: inline-block; |
| | | width: 20px; |
| | | height: 20px; |
| | | line-height: 20px; |
| | |
| | | top: 18px; |
| | | } |
| | | .form-title:not(.active) { |
| | | .form-sort { |
| | | background: #d8d8d8!important; |
| | | .form-sort, .before-line, .after-line { |
| | | background: #d8d8d8; |
| | | } |
| | | .before-line, .after-line { |
| | | background: #d8d8d8!important; |
| | | } |
| | | .form-title.active { |
| | | .form-sort, .before-line, .after-line { |
| | | background: var(--mk-active-color); |
| | | } |
| | | } |
| | | } |
| | | .mk-normal-form-title.jumpable { |
| | | .form-title.active { |
| | | .form-label, .form-sort { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | |
| | | ` |
| | | let _backCustomScript = '' |
| | | |
| | | btn.verify.cbScripts.forEach(script => { |
| | | btn.cbScripts.forEach(script => { |
| | | if (script.status === 'false') return |
| | | |
| | | if (script.position === 'front') { |
| | |
| | | _config.colsCtrls = null |
| | | } |
| | | |
| | | // if (_config.hasExtend) { |
| | | |
| | | // } |
| | | |
| | | this.setState({ |
| | | pageSize: setting.pageSize || 10, |
| | | BID: BID || '', |
| | |
| | | return uuid |
| | | })() |
| | | primaryId = primaryId + (btn.sign || '') |
| | | } else { |
| | | } else if (btn.sysId !== 'empty') { |
| | | primaryId = BID || '' |
| | | } |
| | | } |
| | |
| | | return uuid |
| | | })() |
| | | primaryId = primaryId + (tab.sign || '') |
| | | } else { |
| | | } else if (btn.sysId !== 'empty') { |
| | | primaryId = BID || '' |
| | | } |
| | | } |
| | |
| | | if (item.hidden) return |
| | | |
| | | if (item.type === 'split') { |
| | | fields.push( |
| | | <Col span={24} key={index}> |
| | | <p className="mk-form-split-line" style={item.style}>{item.label}</p> |
| | | </Col> |
| | | ) |
| | | if (item.opacity === 'false') { |
| | | fields.push( |
| | | <div key={index}></div> |
| | | ) |
| | | } else { |
| | | fields.push( |
| | | <Col span={24} key={index}> |
| | | <p className="mk-form-split-line" style={item.style}>{item.label}</p> |
| | | </Col> |
| | | ) |
| | | } |
| | | } else if (item.type === 'hint') { |
| | | fields.push( |
| | | <Col span={item.span || 24} key={index}> |
| | |
| | | newcard.span = 24 |
| | | newcard.labelwidth = 16.2 |
| | | } |
| | | } else if (item.type === 'text') { |
| | | newcard.fieldlength = item.length || 50 |
| | | } |
| | | |
| | | items.push(newcard) |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'opacity', |
| | | label: '是否可见', |
| | | initVal: card.opacity || 'true', |
| | | tooltip: '不可见时仅用作表单分隔,不显示名称。', |
| | | required: false, |
| | | forbid: appType === 'mob', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '可见' |
| | | }, { |
| | | value: 'false', |
| | | text: '不可见' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'regularExtra', |
| | | label: '正则扩展符', |
| | |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'], |
| | | rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'color', 'rateCount', 'character', 'place'], |
| | | hint: ['label', 'field', 'type', 'blacklist', 'supField', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField', 'opacity'], |
| | | formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], |
| | | brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'], |
| | | funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | |
| | | } |
| | | |
| | | 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: { |
| | |
| | | } |
| | | |
| | | 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 |
| | | if (window.GLOB.process && card.intertype !== 'inner') { |
| | | let cols = [] |
| | | fields.forEach(col => { |
| | | if (!col.field) return |
| | | |
| | | cols.push(col.field.toLowerCase()) |
| | | _columns.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) |
| | | }) |
| | | } |
| | | |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}></Col> |
| | | {window.GLOB.process ? <Col span={8}> |
| | | {window.GLOB.process && card.intertype !== 'inner' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="在菜单开启工作流时有效。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | </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> |
| | |
| | | </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="执行位置在系统默认sql之后。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | </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> |
| | |
| | | {verify.default === 'false' ? <span className="count-tip"><ExclamationOutlined style={{color: 'orange'}}/></span> : null} |
| | | </span> |
| | | } key="base"> |
| | | <BaseForm card={card} appType={appType} columns={columns} unionFields={unionFields} verify={verify} notes={notes} emailCodes={emailCodes} onChange={(verify) => this.setState({verify})} wrappedComponentRef={(inst) => this.baseForm = inst}/> |
| | | <BaseForm card={card} appType={appType} fields={fields} columns={columns} unionFields={unionFields} verify={verify} notes={notes} emailCodes={emailCodes} onChange={(verify) => this.setState({verify})} wrappedComponentRef={(inst) => this.baseForm = inst}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | <span> |
| | |
| | | |
| | | sql = ` |
| | | /* 系统生成 */ |
| | | create table #${sheet} (${declarefields.join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(50) ) |
| | | create table #${sheet} (${declarefields.join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(256)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}' |
| | |
| | | } |
| | | } else { |
| | | let branchKey = verify.flowBranch ? verify.flowBranch.toLowerCase() : '' |
| | | |
| | | formdata && formdata.forEach(form => { |
| | | let _key = form.key.toLowerCase() |
| | | _data[_key] = form.value |
| | | }) |
| | | |
| | | if (!branchKey) { |
| | | lines.forEach(line => { |
| | |
| | | line = lines[0] |
| | | } |
| | | } else if (!_data.hasOwnProperty(branchKey)) { |
| | | error = '行信息中无流程控制字段。' |
| | | error = '信息中无流程控制字段。' |
| | | } else { |
| | | if (endEdge) { |
| | | line = endEdge |