| | |
| | | } |
| | | |
| | | if (cell.OpenType === 'excelOut') { // 导出 |
| | | cell.$menuName = item.name |
| | | cell.$menuName = item.$menuname |
| | | |
| | | if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { |
| | | cell.errorType = 'error1' |
| | |
| | | } |
| | | |
| | | if (cell.OpenType === 'excelOut') { // 导出 |
| | | cell.$menuName = item.name |
| | | cell.$menuName = item.$menuname |
| | | |
| | | if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { |
| | | cell.errorType = 'error1' |
| | |
| | | } |
| | | |
| | | if (cell.OpenType === 'excelOut') { // 导出 |
| | | cell.$menuName = item.name |
| | | cell.$menuName = item.$menuname |
| | | |
| | | if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { |
| | | cell.errorType = 'error1' |
| | |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | config.setting.MenuName = Tab.label |
| | | config.setting.$name = Tab.label |
| | | config.setting.foreignKey = Tab.foreignKey || '' |
| | | config.setting.supModule = Tab.supMenu || '' |
| | | config.setting.ContainerId = Tab.ContainerId || '' |
| | | } catch (e) { |
| | |
| | | { |
| | | required: true, |
| | | message: '请输入字段!' |
| | | }, |
| | | { |
| | | pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, |
| | | message: '只允许包含数字、字母、汉字以及_' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleConfirm}/>)} |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={6}> |
| | | <Col span={6} style={{clear: 'left'}}> |
| | | <Form.Item style={{marginBottom: 0}} label="导入"> |
| | | {getFieldDecorator('import', { |
| | | initialValue: 'true' |
| | |
| | | width: 89.5%; |
| | | } |
| | | } |
| | | .ant-form-explain { |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | .custom-table .ant-empty { |
| | | margin: 20px 8px!important; |
| | |
| | | { |
| | | required: true, |
| | | message: '请输入字段!' |
| | | }, |
| | | { |
| | | pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, |
| | | message: '只允许包含数字、字母、汉字以及_' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleConfirm}/>)} |
| | |
| | | .add { |
| | | padding-top: 4px; |
| | | } |
| | | .ant-form-explain { |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | .custom-table .ant-empty { |
| | | margin: 20px 8px!important; |
| | |
| | | required: false, |
| | | options: equalTabs |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'foreignKey', |
| | | label: '外键', |
| | | tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段', |
| | | initVal: card.foreignKey || '', |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'text', |
| | | // key: 'foreignKey', |
| | | // label: '外键', |
| | | // tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段', |
| | | // initVal: card.foreignKey || '', |
| | | // required: false |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | key: 'level', |
| | |
| | | required: false, |
| | | options: equalTabs |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'foreignKey', |
| | | label: '外键', |
| | | tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段', |
| | | initVal: card.foreignKey || '', |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'text', |
| | | // key: 'foreignKey', |
| | | // label: '外键', |
| | | // tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段', |
| | | // initVal: card.foreignKey || '', |
| | | // required: false |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | key: 'level', |
| | |
| | | if (item.type === 'text') { |
| | | let rules = [] |
| | | |
| | | if (item.key === 'foreignKey') { |
| | | rules.push({ |
| | | pattern: /^[a-zA-Z_]*$/ig, |
| | | message: item.label + '字段只允许包含字母及下划线!' |
| | | }) |
| | | } |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={ |
| | |
| | | let datavars = {} // 声明的变量,表单及显示列 |
| | | let _actionType = null |
| | | let _callbacksql = '' |
| | | let foreignKey = setting.foreignKey ? setting.foreignKey.toLowerCase() : '' |
| | | |
| | | if (verify.default !== 'false') { // 判断是否使用默认sql |
| | | _actionType = btn.sqlType |
| | |
| | | item.field.split(',').forEach((_field, index) => { |
| | | let _key = _field.toLowerCase() |
| | | let _val = datavars[_key] !== undefined ? datavars[_key] : '' |
| | | let _fval = `'${_val}'` |
| | | |
| | | if (_key === 'bid' && !datavars.bid) { // 表单中没有bid则使用系统bid变量 |
| | | _fval = '@BID@' |
| | | } |
| | | if (_key === 'bid' && foreignKey) { |
| | | arr.push(foreignKey) |
| | | _fieldValue.push(`${foreignKey}=${_fval}`) |
| | | } else { |
| | | arr.push(_key) |
| | | _fieldValue.push(`${_key}=${_fval}`) |
| | | if (_key === 'bid' && !_val) { // 表单中没有bid则使用系统bid变量 |
| | | _val = BID |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}='${_val}'`) |
| | | _value.push(`${_labels[index] || ''}:${_val || ''}`) |
| | | }) |
| | | |
| | |
| | | values.push('@fullname') |
| | | } |
| | | if (!keys.includes('bid')) { |
| | | if (foreignKey && !keys.includes(foreignKey)) { |
| | | keys.push(foreignKey) |
| | | } else { |
| | | keys.push('bid') |
| | | } |
| | | values.push('@BID@') |
| | | } else if (foreignKey && !keys.includes(foreignKey)) { |
| | | keys.push(foreignKey) |
| | | values.push('@BID@') |
| | | } |
| | | |