| | |
| | | btn: null |
| | | } |
| | | |
| | | /** |
| | | * @description 触发创建读数据接口 |
| | | * @param { object } menu 菜单类型(三级菜单或标签页)、菜单ID、菜单参数、菜单名称 |
| | | * @param { object } config 菜单配置信息 |
| | | */ |
| | | triggerOutInterface = (menu, config) => { |
| | | let _search = [] |
| | | let _index = 1 |
| | | |
| | | if (menu.type !== 'main') { |
| | | // 子表页面增加BID字段,数据源中使用了@BID@时,BID类型为必传 |
| | | if (config.setting.dataresource && /@BID@/ig.test(config.setting.dataresource)) { |
| | | _search.push(`select 'BID' as searchfield,'BID' as label,'0' as Sort,'' as defaultvalue,'required' as DefaultType`) |
| | | } else { |
| | |
| | | Ltextsearchparam: _search.join(' union all '), |
| | | AppendWhere: config.setting.queryType === 'query' ? searchText.join(' AND ') : '', |
| | | WhereType: config.setting.queryType === 'statistics' ? 'Statistics' : 'query', |
| | | custom_script: config.setting.customScript || '', |
| | | // default_sql: config.setting.default || 'true', |
| | | OrderCol: config.setting.order |
| | | } |
| | | |
| | | param.Ltextsearchparam = Utils.formatOptions(param.Ltextsearchparam) |
| | | param.AppendWhere = Utils.formatOptions(param.AppendWhere) |
| | | param.custom_script = Utils.formatOptions(param.custom_script) |
| | | |
| | | this.setState({ |
| | | type: 'out', |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | resolve(false) |
| | | } else { |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else { |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 触发创建写入接口(按钮) |
| | | */ |
| | | triggerInInterface = (btn, config, menu) => { |
| | | if (!['pop', 'exec', 'prompt'].includes(btn.OpenType) || btn.funcType || btn.intertype !== 'inner' || btn.innerFunc ) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '打开方式为 弹窗(表单)、提示框或直接执行,且使用系统函数时,才可以创建接口!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (btn.Ot === 'requiredOnce') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '多行拼接时,不支持创建接口!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let param = { |
| | | func: 's_get_para_for_in', |
| | | Menuid: btn.uuid, |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 执行接口创建 |
| | | */ |
| | | createBtnInterfaceExec = (param, config, btn) => { |
| | | let formlist = [] |
| | | let receipt = param.Return === 'Y' |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | resolve(false) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请完善表单信息!', |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | resolve(false) |
| | | } |
| | |
| | | }) |
| | | |
| | | if (param.menuType !== 'main' && !_keys.includes('bid')) { |
| | | _keys.push('bid') |
| | | param.Ltexttableparam.unshift(`select 'BID' as searchfield,'BID' as label,'0' as Sort,'nvarchar(50)' as fieldtype,'required' as requiredtype,'' as defaultvalue`) |
| | | } |
| | | |
| | | if (btn.Ot !== 'notRequired' && !_keys.includes(config.setting.primaryKey.toLowerCase())) { |
| | | param.Ltexttableparam.unshift(`select '${config.setting.primaryKey}' as searchfield,'${config.setting.primaryKey}' as label,'1' as Sort,'nvarchar(50)' as fieldtype,'required' as requiredtype,'' as defaultvalue`) |
| | | } |
| | | |
| | | param.Ltexttableparam = param.Ltexttableparam.join(' union all ') |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else { |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else { |
| | |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | | @Type =${_voucher.Type}, |
| | | @UserID=@UserID@, |
| | | @Username=@Username, |
| | | @FullName=@FullName, |
| | | @BVoucher =@BVoucher OUTPUT , |
| | | @FIBVoucherDate =@FIBVoucherDate OUTPUT , |
| | | @FiYear =@FiYear OUTPUT , |