提交 965972bf 编写于 作者: tony001's avatar tony001

属性值规则测试 --- fix10

上级 07c3a860
...@@ -398,23 +398,25 @@ import { Environment } from '@/environments/environment'; ...@@ -398,23 +398,25 @@ import { Environment } from '@/environments/environment';
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public deRules:any = { public deRules(){
<#if ctrl.getPSDEFormItemVRs?? && ctrl.getPSDEFormItemVRs()??> return {
<#list ctrl.getPSDEFormItemVRs() as fideValueRule> <#if ctrl.getPSDEFormItemVRs?? && ctrl.getPSDEFormItemVRs()??>
<#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??> <#list ctrl.getPSDEFormItemVRs() as fideValueRule>
<#assign deRule = fideValueRule.getPSDEFValueRule()/> <#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??>
<#if fideValueRule.getPSDEFormItemName?? && fideValueRule.getPSDEFormItemName()??> <#assign deRule = fideValueRule.getPSDEFValueRule()/>
${fideValueRule.getPSDEFormItemName()?lower_case}:[ <#if fideValueRule.getPSDEFormItemName?? && fideValueRule.getPSDEFormItemName()??>
<#if deRule.getPSDEFVRGroupCondition?? && deRule.getPSDEFVRGroupCondition()?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??> ${fideValueRule.getPSDEFormItemName()?lower_case}:[
<#list deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() as condItem> <#if deRule.getPSDEFVRGroupCondition?? && deRule.getPSDEFVRGroupCondition()?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<@getDeRule condItem deRule appde/> <#list deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() as condItem>
</#list> <@getDeRule condItem deRule appde/>
</#if>], </#list>
</#if>],
</#if>
</#if> </#if>
</#list>
</#if> </#if>
</#list> }
</#if> }
};
/** /**
* 校验属性值规则 * 校验属性值规则
...@@ -423,7 +425,7 @@ import { Environment } from '@/environments/environment'; ...@@ -423,7 +425,7 @@ import { Environment } from '@/environments/environment';
* @param {{ name: string }} { name } * @param {{ name: string }} { name }
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public verifyDeRules(name:string,rule:any = this.deRules,op:string = "AND") :{isPast:boolean,infoMessage:string}{ public verifyDeRules(name:string,rule:any = this.deRules(),op:string = "AND") :{isPast:boolean,infoMessage:string}{
let falg:any = {infoMessage:""}; let falg:any = {infoMessage:""};
if(!rule[name]){ if(!rule[name]){
return falg; return falg;
......
...@@ -681,23 +681,25 @@ ${gridColumn.getName()} ...@@ -681,23 +681,25 @@ ${gridColumn.getName()}
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public deRules:any = { public deRules(){
<#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??> return {
<#list ctrl.getPSDEGridEditItemVRs() as fideValueRule> <#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??> <#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#assign deRule = fideValueRule.getPSDEFValueRule()/> <#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??>
<#if fideValueRule.getPSDEGridEditItemName?? && fideValueRule.getPSDEGridEditItemName()??> <#assign deRule = fideValueRule.getPSDEFValueRule()/>
${fideValueRule.getPSDEGridEditItemName()}:[ <#if fideValueRule.getPSDEGridEditItemName?? && fideValueRule.getPSDEGridEditItemName()??>
<#if deRule.getPSDEFVRGroupCondition?? && deRule.getPSDEFVRGroupCondition()?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??> ${fideValueRule.getPSDEGridEditItemName()}:[
<#list deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() as condItem> <#if deRule.getPSDEFVRGroupCondition?? && deRule.getPSDEFVRGroupCondition()?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<@getDeRule condItem deRule appde/> <#list deRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() as condItem>
</#list> <@getDeRule condItem deRule appde/>
</#if>], </#list>
</#if>],
</#if>
</#if> </#if>
</#list>
</#if> </#if>
</#list> };
</#if> }
};
/** /**
* 值规则集合 * 值规则集合
...@@ -726,7 +728,7 @@ ${gridColumn.getName()} ...@@ -726,7 +728,7 @@ ${gridColumn.getName()}
<#if fideValueRule.getPSDEFValueRule()??> <#if fideValueRule.getPSDEFValueRule()??>
<#assign valueRule = fideValueRule.getPSDEFValueRule()/> <#assign valueRule = fideValueRule.getPSDEFValueRule()/>
<#if fideValueRule.getPSDEGridEditItemName?? && fideValueRule.getPSDEGridEditItemName()??> <#if fideValueRule.getPSDEGridEditItemName?? && fideValueRule.getPSDEGridEditItemName()??>
{validator:(rule:any, value:any, callback:any)=>{return this.verifyDeRules("${fideValueRule.getPSDEGridEditItemName()}",this.deRules,"AND",value).isPast},message: "<#if valueRule.getRuleInfo()??>${valueRule.getRuleInfo()}</#if>", trigger: 'blur' }, {validator:(rule:any, value:any, callback:any)=>{return this.verifyDeRules("${fideValueRule.getPSDEGridEditItemName()}",this.deRules(),"AND",value).isPast},message: "<#if valueRule.getRuleInfo()??>${valueRule.getRuleInfo()}</#if>", trigger: 'blur' },
</#if> </#if>
</#if> </#if>
</#if> </#if>
...@@ -2609,7 +2611,7 @@ ${gridColumn.getName()} ...@@ -2609,7 +2611,7 @@ ${gridColumn.getName()}
* @param {{ name: string }} { name } * @param {{ name: string }} { name }
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public verifyDeRules(name:string,rule:any = this.deRules,op:string = "AND",value:any) :{isPast:boolean}{ public verifyDeRules(name:string,rule:any = this.deRules(),op:string = "AND",value:any) :{isPast:boolean}{
let falg:any = {}; let falg:any = {};
if(!rule || !rule[name]){ if(!rule || !rule[name]){
return falg; return falg;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册