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

属性值规则测试 --- fix10

上级 07c3a860
...@@ -398,7 +398,8 @@ import { Environment } from '@/environments/environment'; ...@@ -398,7 +398,8 @@ import { Environment } from '@/environments/environment';
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public deRules:any = { public deRules(){
return {
<#if ctrl.getPSDEFormItemVRs?? && ctrl.getPSDEFormItemVRs()??> <#if ctrl.getPSDEFormItemVRs?? && ctrl.getPSDEFormItemVRs()??>
<#list ctrl.getPSDEFormItemVRs() as fideValueRule> <#list ctrl.getPSDEFormItemVRs() as fideValueRule>
<#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??> <#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??>
...@@ -414,7 +415,8 @@ import { Environment } from '@/environments/environment'; ...@@ -414,7 +415,8 @@ import { Environment } from '@/environments/environment';
</#if> </#if>
</#list> </#list>
</#if> </#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,7 +681,8 @@ ${gridColumn.getName()} ...@@ -681,7 +681,8 @@ ${gridColumn.getName()}
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public deRules:any = { public deRules(){
return {
<#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??> <#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#list ctrl.getPSDEGridEditItemVRs() as fideValueRule> <#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??> <#if fideValueRule.getCheckMode?? && fideValueRule.getCheckMode()?? && fideValueRule.getCheckMode() != 2 && fideValueRule.getPSDEFValueRule?? && fideValueRule.getPSDEFValueRule()??>
...@@ -698,6 +699,7 @@ ${gridColumn.getName()} ...@@ -698,6 +699,7 @@ ${gridColumn.getName()}
</#list> </#list>
</#if> </#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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册