From a9b02f6862522b54d0824152017bf2acfec2af7b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 21 三月 2024 10:29:50 +0800 Subject: [PATCH] 2024-03-21 --- src/tabviews/zshare/actionList/printbutton/index.jsx | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index a6a037c..e16a32c 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -962,7 +962,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: arrFields, default_sql: btn.verify.setting.defaultSql } @@ -1007,7 +1007,11 @@ } let isDataM = sessionStorage.getItem('dataM') === 'true' + let custompage = /@pageSize@|@orderBy@/i.test(_dataresource + _customScript + _tailScript) let regoptions = [ + { reg: /@orderBy@/ig, value: btn.verify.setting.order }, + { reg: /@pageSize@/ig, value: '9999' }, + { reg: /@pageIndex@/ig, value: '1'}, { reg: /@ID@/ig, value: `'${ID}'`}, { reg: /@BID@/ig, value: `'${BID || ''}'`}, { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`}, @@ -1125,7 +1129,11 @@ let LText = '' if (_dataresource) { - LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${btn.verify.setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows ` + if (custompage) { + LText = `/*system_query*/select ${arrFields} from ${_dataresource} ` + } else { + LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${btn.verify.setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows ` + } } if (_customScript) { @@ -1168,8 +1176,8 @@ param.menuname = btn.logLabel } - param.custom_script = Utils.formatOptions(_customScript) - param.LText = Utils.formatOptions(LText) + param.custom_script = Utils.formatOptions(_customScript, param.exec_type) + param.LText = Utils.formatOptions(LText, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -1968,6 +1976,8 @@ return } + if (res.ErrCode === '-2') return + if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) { MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus) } @@ -2184,6 +2194,20 @@ console.warn(e) _item.value = '' } + } else if (item.interception === 'charTure') { + let str = _item.value.replace(/(^\s*|\s*$)/g, '') + let result = '' + for (let i = 0 ; i < str.length; i++) { + let code = str.charCodeAt(i) + if (code >= 65281 && code <= 65373) { + result += String.fromCharCode(str.charCodeAt(i) - 65248) + } else if (code === 12288) { + result += String.fromCharCode(str.charCodeAt(i) - 12288 + 32) + } else { + result += str.charAt(i) + } + } + _item.value = result } else { _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') } -- Gitblit v1.8.0