| | |
| | | cell.$ctrls = cell.$ctrls || [] |
| | | cell.$ctrls.push(key) |
| | | |
| | | if (cell.hidden) return |
| | | |
| | | if (cell.skip && supItem.forbid) { // 上级表单禁用时,此表单不受控制 |
| | | |
| | | if (cell.hidden) { |
| | | |
| | | } else if (supItem.hidden) { |
| | | cell.hidden = true |
| | | } else if (item.notNull) { |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | {value: 'public', label: '公共数据源', priKeyType: 'static'}, |
| | | ], |
| | | linkFields: ['priKeyType'], |
| | | controlFields: [ |
| | | controlFields: subtype === 'propcard' ? [ |
| | | {field: 'goback', values: ['dynamic', 'public']}, |
| | | {field: 'empty', values: ['dynamic', 'public']}, |
| | | {field: 'jump', values: ['dynamic', 'public']}, |
| | |
| | | {field: 'supModule', values: ['static']}, |
| | | {field: 'publicId', values: ['public']}, |
| | | {field: 'emptyExec', values: ['dynamic', 'public']}, |
| | | ], |
| | | ] : null, |
| | | forbid: subtype !== 'propcard' |
| | | }, |
| | | { |
| | |
| | | {value: 'normal', label: '正常显示'}, |
| | | {value: 'hidden', label: '不可见'}, |
| | | ], |
| | | controlFields: [ |
| | | controlFields: subtype === 'propcard' ? [ |
| | | {field: 'empty', values: ['normal']}, |
| | | ], |
| | | ] : null, |
| | | forbid: subtype !== 'propcard' |
| | | }, |
| | | { |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | {value: 'dynamic', label: '动态'}, |
| | | {value: 'static', label: '静态'}, |
| | | ], |
| | | controlFields: [ |
| | | controlFields: subtype === 'propcard' ? [ |
| | | {field: 'empty', values: ['dynamic']}, |
| | | ], |
| | | ] : null, |
| | | forbid: subtype !== 'propcard' |
| | | }, |
| | | { |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | skip: true, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | |
| | | {reg: /@Appkey@/ig, value: `'${window.GLOB.appkey}'`}, |
| | | {reg: /@lang@/ig, value: `'${sessionStorage.getItem('lang')}'`}, |
| | | {reg: /@\$|\$@/ig, value: ''}, |
| | | {reg: /@select\$|\$select@/ig, value: ''}, |
| | | {reg: /@sum\$|\$sum@/ig, value: ''}, |
| | | // {reg: /@select\$|\$select@/ig, value: ''}, |
| | | // {reg: /@sum\$|\$sum@/ig, value: ''}, |
| | | ] |
| | | |
| | | if (window.GLOB.process && type !== 'invoice') { |
| | |
| | | config.interfaces.forEach(m => { |
| | | if (m.status !== 'true' || m.setting.interType !== 'system') return false |
| | | |
| | | m.setting.laypage = 'false' |
| | | m.setting.$top = true |
| | | |
| | | let sql = this.formatDataSource(m, regs) |
| | | |
| | | this.sqlList.push({label: m.setting.name, children: [{label: '数据源', sql: sql}]}) |
| | |
| | | } |
| | | |
| | | if (item.setting && item.setting.interType === 'system') { |
| | | if (item.format === 'object') { |
| | | item.setting.laypage = 'false' |
| | | item.setting.$top = true |
| | | } |
| | | |
| | | let sql = this.formatDataSource(item, regs, _mainSearch) |
| | | |
| | | children.push({label: '数据源', sql: sql}) |
| | |
| | | let BID = Utils.getuuid() |
| | | let verify = btn.verify || {} |
| | | let _actionType = null |
| | | let setting = component.setting |
| | | let setting = component.setting || {} |
| | | let columns = component.columns || [] |
| | | |
| | | if (verify.invalid === 'true') { |
| | | if (component.wrap && (component.wrap.datatype === 'static' || component.wrap.datatype === 'public')) { |
| | | verify.invalid = 'false' |
| | | } else if (setting.maxScript && setting.maxScript >= 300) { |
| | | verify.invalid = 'false' |
| | | } else if (!setting.dataresource) { |
| | | verify.invalid = 'false' |
| | | } else if (btn.intertype !== 'system' && btn.procMode !== 'system') { |
| | | verify.invalid = 'false' |
| | | } else if (btn.sqlType === 'insert') { |
| | | verify.invalid = 'false' |
| | | } else if (btn.Ot === 'notRequired') { |
| | | verify.invalid = 'false' |
| | | } |
| | | } |
| | | |
| | | if (verify.default !== 'false') { // 判断是否使用默认sql |
| | | _actionType = btn.sqlType |
| | |
| | | }) |
| | | |
| | | // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过) |
| | | if (btn.Ot !== 'notRequired' && columns && columns.length > 0) { |
| | | if (btn.Ot !== 'notRequired' && columns.length > 0) { |
| | | const setField = (col) => { |
| | | if (!col.field) return |
| | | let _key = col.field.toLowerCase() |
| | |
| | | } |
| | | |
| | | // 失效验证,添加数据时不用 |
| | | if (btn.sqlType !== 'insert' && btn.Ot !== 'notRequired' && verify.invalid === 'true' && setting.dataresource) { |
| | | if (verify.invalid === 'true') { |
| | | let datasource = setting.dataresource |
| | | let customScript = setting.customScript || '' |
| | | let orderBy = setting.order |
| | |
| | | |
| | | formatDataSource = (item, regs, mainSearch = []) => { |
| | | if (!item.setting || item.setting.interType !== 'system') return false |
| | | |
| | | |
| | | let searches = item.search || [] |
| | | if (item.setting.useMSearch === 'true' && mainSearch.length > 0) { |
| | | searches = [...searches, ...mainSearch] |
| | |
| | | _dataresource = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search} ` |
| | | } else if (item.setting.laypage === 'true' && item.setting.order) { |
| | | _dataresource = `/*system_query*/select top 10 ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${item.setting.order}) as rows from ${_dataresource} ${_search}) tmptable where rows > 0 order by tmptable.rows ` |
| | | } else if (item.setting.$top) { |
| | | if (item.setting.order) { |
| | | _dataresource = `/*system_query*/select top 1 ${arr_field} from ${_dataresource} ${_search} order by ${item.setting.order} ` |
| | | } else { |
| | | _dataresource = `/*system_query*/select top 1 ${arr_field} from ${_dataresource} ${_search} ` |
| | | } |
| | | } else if (item.setting.order) { |
| | | _dataresource = `/*system_query*/select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${item.setting.order}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows ` |
| | | } else { |
| | |
| | | _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'1949-10-01 15:00:00'`) |
| | | _dataresource = _dataresource.replace(/@\$|\$@/ig, '') |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '') |
| | | _customScript = _customScript.replace(/@select\$|\$select@/ig, '') |
| | | // _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '') |
| | | // _customScript = _customScript.replace(/@select\$|\$select@/ig, '') |
| | | // _dataresource = _dataresource.replace(/@sum\$|\$sum@/ig, '') |
| | | _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '') |
| | | // _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '') |
| | | |
| | | _dataresource = _dataresource.replace(/\$sum@/ig, '/*$sum@') |
| | | _dataresource = _dataresource.replace(/@sum\$/ig, '@sum$*/') |
| | | // _dataresource = _dataresource.replace(/\$sum@/ig, '/*$sum@') |
| | | // _dataresource = _dataresource.replace(/@sum\$/ig, '@sum$*/') |
| | | |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | |
| | | { reg: /@orderBy@/ig, value: orderBy }, |
| | | { reg: /@pageSize@/ig, value: setting.laypage ? pageSize : '9999' }, |
| | | { reg: /@pageIndex@/ig, value: pageIndex}, |
| | | { reg: /@select\$|\$select@/ig, value: ''}, |
| | | { reg: /\$sum@/ig, value: '/*'}, |
| | | { reg: /@sum\$/ig, value: '*/'}, |
| | | // { reg: /@select\$|\$select@/ig, value: ''}, |
| | | // { reg: /\$sum@/ig, value: '/*'}, |
| | | // { reg: /@sum\$/ig, value: '*/'}, |
| | | { reg: /@ID@/ig, value: `'${id || ''}'`}, |
| | | { reg: /@BID@/ig, value: `'${BID || ''}'`}, |
| | | { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`}, |
| | |
| | | { reg: /@orderBy@/ig, value: orderBy }, |
| | | { reg: /@pageSize@/ig, value: 999999 }, |
| | | { reg: /@pageIndex@/ig, value: 1}, |
| | | { reg: /\$select@/ig, value: '/*'}, |
| | | { reg: /@select\$/ig, value: '*/'}, |
| | | { reg: /@sum\$|\$sum@/ig, value: ''}, |
| | | // { reg: /\$select@/ig, value: '/*'}, |
| | | // { reg: /@select\$/ig, value: '*/'}, |
| | | // { reg: /@sum\$|\$sum@/ig, value: ''}, |
| | | { reg: /@ID@/ig, value: `''`}, |
| | | { reg: /@BID@/ig, value: `'${BID || ''}'`}, |
| | | { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`}, |