From c62724a2cdbafa3c660538955acbedafa5a01871 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 01 六月 2024 15:25:21 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/basetable/index.jsx | 64 ++++++++++++++++++-------------- 1 files changed, 36 insertions(+), 28 deletions(-) diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index a8c9ff9..b02c94b 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -512,37 +512,45 @@ } } - if (cell.verify && cell.verify.invalid === 'true') { - if (item.setting.maxScript && item.setting.maxScript >= 300) { - cell.verify.invalid = 'false' - } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { - cell.verify.invalid = 'false' - } else if (cell.sqlType === 'insert') { - cell.verify.invalid = 'false' - } else if (cell.Ot === 'notRequired') { - cell.verify.invalid = 'false' - } - } - - if (cell.verify && cell.verify.preHandle === 'true') { - let script = cell.verify.pre_func - if (!/#position-/.test(script) || /#position-init/.test(script)) { - try { - // eslint-disable-next-line - let func = new Function('btn', 'position', 'systemType', script) - func(cell, 'init', window.GLOB.systemType) - } catch (e) { - console.warn(e) + if (cell.verify) { + if (cell.verify.invalid === 'true') { + if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { + cell.verify.invalid = 'false' + } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { + cell.verify.invalid = 'false' + } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { + cell.verify.invalid = 'false' + } else if (cell.sqlType === 'insert') { + cell.verify.invalid = 'false' + } else if (cell.Ot === 'notRequired') { + cell.verify.invalid = 'false' } } - if (/#position-inner/.test(script)) { - cell.$innerScript = script + + if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) { + cell.returnValue = 'true' } - if (/#position-outer/.test(script)) { - cell.$outerScript = script - } - if (/#position-callback/.test(script)) { - cell.$callbackScript = script + + if (cell.verify.preHandle === 'true') { + let script = cell.verify.pre_func + if (!/#position-/.test(script) || /#position-init/.test(script)) { + try { + // eslint-disable-next-line + let func = new Function('btn', 'position', 'systemType', script) + func(cell, 'init', window.GLOB.systemType) + } catch (e) { + console.warn(e) + } + } + if (/#position-inner/.test(script)) { + cell.$innerScript = script + } + if (/#position-outer/.test(script)) { + cell.$outerScript = script + } + if (/#position-callback/.test(script)) { + cell.$callbackScript = script + } } } -- Gitblit v1.8.0