
var jwj=null;var isFlowNode=false;var wF_FlowId=-1;var wF_NodeId=-1;var han=-1;var wry=-1;var vvc=null;var vcv=null;function zcn(){if(ymr(jwj)){if(isFlowNode){jwj=vcv}else{try{var a=window.top.pec.MainObj.Json_Validate;if(ymr(a))a=pec.MainObj.Json_Validate;if(!ymr(a))jwj=JSON2.parse(a);else jwj=null}catch(err){jwj=null}}}
if(ymr(jwj)){jwj={MaxVlId:1,Ent:[]}}
return jwj}
function lhy(){var a={Id:-1,vlId:1,cdn:"",compT:1,compV:"",minV:"",maxV:"",rExp:"",err:"",ok:"",warn:"",ovt:1,jsFun:""};jwj=zcn();jwj.MaxVlId=jwj.MaxVlId+1;a.Id=jwj.MaxVlId;return a}
function xyj(){var a=lhy();a.err="不能为空";a.ok="";a.warn="必填";a.vlId=1;return a}
function jdu(){var a=lhy();a.err="此值已存在,请重新输入";a.ok="";a.warn="";a.vlId=5;return a}
function yjf(a,b){var c=lhy();if(ymr(b))c.err="输入有误,请重新输入";else c.err=b;c.ok="";c.warn="";if(ymr(a))c.rExp="";else c.rExp=a;c.vlId=4;return c}
function kpr(a){var b=xqn();var c=null;var i=0;for(;i<b.Vld.length;i++){if(b.Vld[i].Id==a){c=b.Vld[i];break}}
return{"json":b,"index":i}}
function wuc(a,b){if(ymr(b))b=xqn();var c=null;var i=0;for(;i<b.Vld.length;i++){if(b.Vld[i].vlId==a){c=b.Vld[i];break}}
return{"VldJson":c,"Index":i}}
function ilc(a,b){if(ymr(b))b=xqn();var c=null;var d=false;for(var i=b.Vld.length-1;i>=0;i--){if(b.Vld[i].vlId==a){b.Vld.splice(i,1);d=true}}
return d}
function xqn(a,b){var c=null;if(!isFlowNode){var c=window.top.bkj;if((ymr(a)||ymr(b))&&(ymr(c)||c.length<1))return null;else if(!ymr(c)&&c.length>0){if(ymr(b)||isNaN(b)||b<1)b=parseInt(c.attr("FldId"),10);if(ymr(a)||isNaN(a)||a<1)a=parseInt(c.attr("EntId"),10)}}else{b=wry;a=han}
jwj=zcn();var d=null;for(var i=0;i<jwj.Ent.length;i++){if(jwj.Ent[i].EntId==a){d=jwj.Ent[i];break}}
if(ymr(d)){d={EntId:a,Fld:[]};jwj.Ent.push(d)}
var e=null;for(var i=0;i<d.Fld.length;i++){if(d.Fld[i].FldId==b){e=d.Fld[i];break}}
if(ymr(e)){e={FldId:b,Vld:[]};d.Fld.push(e)}
hhv(jwj);return e}
function jwy(a,b,c){var d=null;for(var i=0;i<c.Ent.length;i++){if(c.Ent[i].EntId==a){d=c.Ent[i];break}}
if(ymr(d)){return c}
var e=null;for(var i=0;i<d.Fld.length;i++){if(d.Fld[i].FldId==b){d.Fld.splice(i,1);break}}
return c}
function vbj(a){if(ymr(a)||a.length<1)a=window.top.bkj;if(ymr(a)||a.length<1)return;var b=a;var c=b.next();var d=false;while(!ymr(c)&&c.length>0){if(c.attr("iserr")=="1"){d=true;break}else{b=c;c=c.next()}}
if(!d){b.after("<div iserr=1 class=\"form-vld\"></div>")}}
function hhv(a){if(!isFlowNode){if(!ymr(a)){var b=null;try{b=JSON2.stringify(a);if(!ymr(b)){if(!ymr(window.top.pec))window.top.pec.MainObj.Json_Validate=b;else pec.MainObj.Json_Validate=b}}catch(err){if(!ymr(b))window.top.pec.MainObj.Json_Validate=b}}}}