提交 17ffc70b 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--表格编辑项值规则

上级 8f573a92
...@@ -469,18 +469,20 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -469,18 +469,20 @@ import CodeListService from "@service/app/codelist-service";
${edititem.getName()}: [ ${edititem.getName()}: [
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'change' }, { required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'change' },
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'blur' }, { required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'blur' },
<#if ctrl.getPSGEIDEFValueRules?? && ctrl.getPSGEIDEFValueRules()??> <#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#list ctrl.getPSGEIDEFValueRules() as fideValueRule> <#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#if fideValueRule.getPSSysValueRule()??> <#if fideValueRule.getPSDEGridEditItemName() == edititem.getName()>
<#assign valueRule = fideValueRule.getPSSysValueRule()/> <#if fideValueRule.getPSSysValueRule()??>
<#if valueRule.getRuleType?? && valueRule.getRuleType()??> <#assign valueRule = fideValueRule.getPSSysValueRule()/>
<#if valueRule.getRuleType() == "REG"> <#if valueRule.getRuleType?? && valueRule.getRuleType()??>
<#if valueRule.getRuleType() == "REG">
{ <#if valueRule.getRegExCode?? && valueRule.getRegExCode()??>pattern: /^${valueRule.getRegExCode()}$/</#if><#if valueRule.getRuleInfo?? && valueRule.getRuleInfo()??>, message: '${valueRule.getRuleInfo()}'</#if>, trigger: 'change' }, { <#if valueRule.getRegExCode?? && valueRule.getRegExCode()??>pattern: /^${valueRule.getRegExCode()}$/</#if><#if valueRule.getRuleInfo?? && valueRule.getRuleInfo()??>, message: '${valueRule.getRuleInfo()}'</#if>, trigger: 'change' },
<#elseif valueRule.getRuleType() == "SCRIPT"> <#elseif valueRule.getRuleType() == "SCRIPT">
{ <#if valueRule.getScriptCode?? && valueRule.getScriptCode()??>validator: (rule:any, value:any, callback:any) => { ${valueRule.getScriptCode()} }</#if><#if valueRule.getRuleInfo?? && valueRule.getRuleInfo()??>, message: '${valueRule.getRuleInfo()}'</#if>, trigger: 'change' }, { <#if valueRule.getScriptCode?? && valueRule.getScriptCode()??>validator: (rule:any, value:any, callback:any) => { ${valueRule.getScriptCode()} }</#if><#if valueRule.getRuleInfo?? && valueRule.getRuleInfo()??>, message: '${valueRule.getRuleInfo()}'</#if>, trigger: 'change' },
</#if>
</#if> </#if>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
], ],
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册