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

属性值规则测试 --- fix10

上级 07c3a860
......@@ -398,7 +398,8 @@ import { Environment } from '@/environments/environment';
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public deRules:any = {
public deRules(){
return {
<#if ctrl.getPSDEFormItemVRs?? && ctrl.getPSDEFormItemVRs()??>
<#list ctrl.getPSDEFormItemVRs() as fideValueRule>
<#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??>
......@@ -414,7 +415,8 @@ import { Environment } from '@/environments/environment';
</#if>
</#list>
</#if>
};
}
}
/**
* 校验属性值规则
......@@ -423,7 +425,7 @@ import { Environment } from '@/environments/environment';
* @param {{ name: string }} { name }
* @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:""};
if(!rule[name]){
return falg;
......
......@@ -681,7 +681,8 @@ ${gridColumn.getName()}
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public deRules:any = {
public deRules(){
return {
<#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??>
......@@ -698,6 +699,7 @@ ${gridColumn.getName()}
</#list>
</#if>
};
}
/**
* 值规则集合
......@@ -726,7 +728,7 @@ ${gridColumn.getName()}
<#if fideValueRule.getPSDEFValueRule()??>
<#assign valueRule = fideValueRule.getPSDEFValueRule()/>
<#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>
......@@ -2609,7 +2611,7 @@ ${gridColumn.getName()}
* @param {{ name: string }} { name }
* @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 = {};
if(!rule || !rule[name]){
return falg;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册