| | |
| | | }) |
| | | } |
| | | |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // special 函数 s_sDataDictb_TBBack 云端验证 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | param[setting.primaryKey] = primaryId |
| | | } |
| | | |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // special 函数 s_sDataDictb_TBBack 云端验证 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | result.func = btn.outerFunc |
| | | } |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | if (btn.outerFunc === 's_app_version_upt') { // special 更新版本号时访问sso |
| | | if (window.GLOB.mainSystemApi) { |
| | | result.rduri = window.GLOB.mainSystemApi |
| | | } |
| | | } else if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | result.rduri = options.cloudServiceApi |
| | | result.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | result.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | |
| | | } |
| | | } |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | // special 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (result.func === 's_sDataDictb_TBBack' && result.LTextOut) { |
| | | result.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | result.secretkey = Utils.encrypt(result.LTextOut, result.timestamp) |
| | |
| | | result.mk_api_key = record.mk_api_key |
| | | } |
| | | |
| | | if (btn.callbackType === 'script' || btn.callbackType === 'default') { |
| | | // special 版本升级回调处理 |
| | | if (window.GLOB.mkHS && btn.outerFunc === 's_get_sVersionDetail_Ltext' && btn.callbackFunc) { |
| | | if (result.status) { |
| | | this.verupRequest(params, result, outParam, _resolve) |
| | | } else { |
| | | this.execError(result) |
| | | _resolve() |
| | | } |
| | | return |
| | | } else if (btn.callbackType === 'script' || btn.callbackType === 'default') { |
| | | param = this.getCallBackSql(result, record) |
| | | } else if (btn.callbackType === 'func' || btn.callbackFunc) { |
| | | delete result.message |
| | |
| | | func: btn.callbackFunc |
| | | } |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | // special 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | |
| | | _resolve() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | verupRequest = (params, result, outParam, _resolve) => { |
| | | const { btn } = this.props |
| | | |
| | | delete result.message |
| | | delete result.status |
| | | |
| | | result.func = btn.callbackFunc |
| | | |
| | | let ssoParam = null |
| | | let callParam = {...outParam, ...result} |
| | | |
| | | if (callParam.LTextOut) { |
| | | callParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | callParam.secretkey = Utils.encrypt(callParam.LTextOut, callParam.timestamp) |
| | | callParam.open_key = Utils.encryptOpenKey(callParam.secretkey, callParam.timestamp) |
| | | } |
| | | |
| | | if (callParam.UpType === 'SSO' && window.GLOB.mainSystemApi) { |
| | | ssoParam = fromJS(callParam).toJS() |
| | | |
| | | ssoParam.rduri = window.GLOB.mainSystemApi |
| | | |
| | | delete ssoParam.UpType |
| | | } else { |
| | | delete callParam.UpType |
| | | } |
| | | |
| | | if (ssoParam) { |
| | | Api.genericInterface(ssoParam).then(res => { |
| | | if (!res.status) { |
| | | this.execError(res) |
| | | _resolve() |
| | | } else { |
| | | Api.genericInterface(callParam).then(re => { |
| | | if (!re.status) { |
| | | this.execError(re) |
| | | _resolve() |
| | | } else { |
| | | if (params.length === 0) { |
| | | this.execSuccess(res) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, _resolve) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | Api.genericInterface(callParam).then(re => { |
| | | if (!re.status) { |
| | | this.execError(re) |
| | | _resolve() |
| | | } else { |
| | | if (params.length === 0) { |
| | | this.execSuccess(re) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, _resolve) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | modelconfirm = () => { |
| | | const { btn } = this.props |
| | | const { btn, BID } = this.props |
| | | const { btnconfig, selines } = this.state |
| | | let _this = this |
| | | |
| | |
| | | _initval = moment().subtract(_initval, 'days').format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | |
| | | if (_initval === undefined) { |
| | | _initval = '' |
| | | } |
| | | |
| | | let _fieldlen = item.fieldlength || 50 |
| | | if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') { |
| | | _fieldlen = item.fieldlength || 512 |
| | | } else if (item.type === 'number') { |
| | | _fieldlen = item.decimal ? item.decimal : 0 |
| | | } |
| | | |
| | | if (_initval === undefined) { |
| | | _initval = '' |
| | | } else if (item.type === 'text' && /@appkey@|@SessionUid@|@bid@/ig.test(_initval)) { // 特殊字段替换 |
| | | _initval = _initval.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (BID || '')) |
| | | } |
| | | |
| | | let _type = item.type |