
function mwt(d,e,f,g,h,j,k,l,m){if(ymr($.trim(h)))return;h=h+"";var n=null;var o=null;var p=null;if(!ymr(d)&&$(d).attr("isfield")!="1"){o=$(d);if(parseInt(o.attr("IsForField"),10)==1){p=o;n=wyb(o,p);if(isNaN(j)||j<1)j=parseInt(n.attr("cid"),10);if(j>33&&j<41)o=p.find("[CId]:first")}else{p=vuj(o);n=wyb(o,p);if(isNaN(j)||j<1)j=parseInt(n.attr("cid"),10);if(j>33&&j<41&&o.attr("tagName").toLowerCase()!="input")o=p.find("[CId]:first")}}else{if(ymr(d))n=ppq(null,e,f,g,k,l,"input");else n=$(d);if(isNaN(j)||j<1)j=parseInt(n.attr("cid"),10);p=jpy(n);if(!ymr(p)&&j>33&&j<41){o=p.find("[CId]:first")}}
if(ymr(n))return false;var q=leq(e,f);var r=null;r=h.split('/');if(r.length>1)n.val(r[1]);else n.val(r[0]);if(!ymr(o)&&o.length>0)o.val(r[0]);var s=m&&!isNaN(n.attr("UUT"))?true:false;if(s)o.attr("disabled","disabled");var t=true;if(!ymr(o)&&o.length>0&&o.attr("tagName").toLowerCase()!="input"&&o.attr("tagName").toLowerCase()!="textarea")t=false;if(j==34||j==35){var u="d"+e+"_"+g;var v=q.find("#dds_"+u+"_ul");if(v!=null){v.children().each(function(){var a=$(this).find("#"+u+"e");var b=a.html();b=$.trim(b);if(b==h){var c=a.prev().html();if(t)o.val(c);else o.html(c);return false}})}
if(o.attr("cback")=="1")o.change()}else if(j==36){var u="d"+e+"_"+g;var w=q.find("#ddc_"+u+"_div");if(w!=null){w.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);if(b==h){var c=a.attr("text");if(!ymr(o)&&o.length>0){if(t)o.val(c);else o.html(c)}
return false}})}
if(o.attr("cback")=="1")o.change()}else if(j==37){var x=h.split(',');var w=q.find("#ddc_d"+e+"_"+g+"_div");if(w!=null){var y="";w.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);for(var i=0;i<x.length;i++){if(b==x[i]){y=y+a.attr("text")+",";break}}});if(!ymr(o)&&o.length>0){if(t)o.val(y);else o.html(y)}}
if(o.attr("cback")=="1")o.change()}else if(j==39||j==40){var z=n.attr("TId");var A=q.children("div[TreeId="+z+"][IsTree=1]");izu(n.get(0),A)}else if(!ymr(o)&&o.length>0)o.val(h)}
function ybe(a){alert(1)}
var ydo=new Array();var ktz=null;var wzz=new Array();var lfl=0;var xkw=null;var jqh=null;var Deleted_kFVS_Id="";var dlgFormSum=null;function nhp(a,b,c,d){var e=col(a,b);if(ymr(e))return null;var f=e.EntMsg["E"+a];if(ymr(c)){c={rows:[]}}
var g=null;try{g=c.rows}catch(err){alert("数据中可能含有特殊字符，显示数据失败。其他提示："+err);return}
var h=0;if(!ymr(g))h=g.length;if(ymr(d)||d.length<1)d=xri(a,b);wfe(a,0,b);if(h>0){h=h;var j=0;var l=h;var m=new nzy();var n=null;var o=a;if(b!="ListF_")o=ntt(a,b);var p=DcxForm.GetLfTrContainer(a,b);var q=DcxForm.GetLfCtrlContainer(a,b);var r=q.html();var s=r.split('*avl*');var t=p.html();var u=t.split('*avl*');if(u.length>0){u[0]=u[0].replace(/<ul/i,"");u[0]=u[0].replace(/<UL/i,"")}
var v=s.length;var w="";var m=new nzy();for(var i=1;i<=l;i++){m.append("<ul id=\""+b+a+"_from_tr"+i+"\"  name=\""+b+a+"_from_tr"+i+"\" isRow=\"1\" EntId=\""+a+"\" state=\"1\" CtrlPrex=\""+b+"\" rowix=\""+i+"\" onmousedown=\"javascript:moi(this,"+a+",'"+b+"');\" ");for(var k=0;k<v;k++){if(k==0&&i%2==0)m.append(u[k].replace(/BodyTr/i,"\"BodyTr stripe\"").replace(/lf-btr/i,"lf-btr lf-Evenbtr"));else m.append(u[k]);if(k==v-2)m.append("<input id='"+b+a+"_hid_opSt_from_tr"+i+"' value ='1' sys=1  type='hidden' /><input id='"+b+a+"_hid_KeyField_from_tr"+i+"'  sys=1 type='hidden'  value ='-1'  KeyField=1  title='KeyFieldValue' />");var x=s[k].replaceAll("%trindex%","from_tr"+i);x=x.replaceAll("@index",i);m.append(x)}
j++}
d.html(m.toString());wfe(a,l,b);setTimeout(function(){dlgFormSum=art.VLdialog.tips("正在初始化...",6666);setTimeout(function(){zjc(a,b,g,d);dlgFormSum.close()},10)},1)}else{d.html("");g.splice(0,g.length);zma(null,5,a,b,d)}}
DcxForm.InitSheetForm=nhp;function zma(b,c,d,e,f){var g=col(d,e);if(ymr(g))return null;var h=g.EntMsg["E"+d];if(ymr(f))f=h.$listContainer;var j="";var l=-1;var m="";var n="";var o=-1;var p=$("#"+e+d+"_AutoAdd").val();var q=kzt(d,e);var r=null;var s=d;if(e!="ListF_")s=ntt(d,e);var t=DcxForm.GetLfTrContainer(d,e);var u=DcxForm.GetLfCtrlContainer(d,e);var v=u.html();var w=v.split('*avl*');var x=t.html();var y=x.split('*avl*');if(y.length>0){y[0]=y[0].replace(/<ul/i,"");y[0]=y[0].replace(/<UL/i,"")}
var z=w.length;c=c+q;var i=q+1;var A=new nzy();var B=2;var C=-1;for(;i<=c;i++){A=new nzy();A.append("<ul id=\""+e+d+"_from_tr"+i+"\"  name=\""+e+d+"_from_tr"+i+"\" isRow=\"1\" EntId=\""+d+"\" state=\"0\" CtrlPrex=\""+e+"\" rowix=\""+i+"\" onmousedown=\"javascript:moi(this,"+d+",'"+e+"');\" ");for(var k=0;k<z;k++){if(k==0&&i%2==0)A.append(y[k].replace(/BodyTr/i,"\"BodyTr stripe\"").replace(/lf-btr/i,"lf-btr lf-Evenbtr"));else A.append(y[k]);if(k==z-2)A.append("<input id='"+e+d+"_hid_opSt_from_tr"+i+"' value ='0' sys=1  type='hidden' /><input id='"+e+d+"_hid_KeyField_from_tr"+i+"'  sys=1 type='hidden'  value =''  KeyField=1  title='KeyFieldValue' />");var D=w[k].replaceAll("%trindex%","from_tr"+i).replaceAll("@index",i);A.append(D)}
var E=$(A.toString());f.append(E);if(i==q+1){var F="";if(i==1){var G=f.children(":last");while(!ymr(G)&&G.length>0&&ymr(p)){G.find("[isfield=1][autoadddigit=1]").each(function(){if(l>0)return true;var a=$.trim($(this).attr("digit"));B=parseInt($.trim($(this).attr("rdt")),10);if(!ymr(a)&&!isNaN(a)){a=parseInt(a,10)}else a=1;if(a<1)return true;l=a;p=$(this).val();F=p;C=parseInt($(this).attr("cid"),10);j=this.id});if(ymr(p))G=G.prev();else break}
if(l<1)l=0}else{var G=f.children(":last").prev();while(!ymr(G)&&G.length>0&&ymr(p)){G.find("[digit!=-1]").each(function(){if(l>0)return true;var a=$.trim($(this).attr("digit"));B=parseInt($.trim($(this).attr("rdt")),10);if(!ymr(a)&&!isNaN(a)){a=parseInt(a,10)}else a=-1;if(a<1)return true;l=a;C=parseInt($(this).attr("cid"),10);F=$(this).val();if(p!=""&&p!=undefined){F=p}else p=F;j=this.id});if(ymr(p))G=G.prev();else break}
if(l<1)l=1}
if(l<1)continue;var H=j.indexOf("from_tr");j=j.substr(0,H+7);o=q+1;m=F.substr(0,F.length-l);if(F.length<=l)n=parseInt(F,10);else n=parseInt(F.substr(F.length-l,l),10);if(ymr(n)||isNaN(n))n=0;var I=m;n=n+1;var J=n+"";var K=l-J.length;for(var L=0;L<K;L++)I=I+"0";p=I+J;var M=j+i;if(B==1)p=parseInt(p,10);if(C==4){try{var N=E.find("#"+M);N.html(p);N.next().val(p)}catch(err){}}else{try{E.find("#"+M).val(p)}catch(err){}}}else if(o>0){if(l<1)continue;var I=m;n=parseInt(n,10)+1;var J=n+"";var K=l-J.length;for(var L=0;L<K;L++)I=I+"0";p=I+J;if(B==1)p=parseInt(p,10);var M=j+i;if(C==4){try{var N=E.find("#"+M);N.html(p);N.next().val(p)}catch(err){}}else{try{E.find("#"+M).val(p)}catch(err){}}}}
wfe(d,c,e);if(o>0&&p!=""){$("#"+e+d+"_AutoAdd").val(p)}}
function lsm(a,b,c){var d=mwu(a,c,"");moi(d.get(0),c,"")}
function xjx(a,b,c){$("#"+c+b+"_CurRowIndex").val(a)}
function moi(a,b,c){var d=$(a);var c=d.attr("CtrlPrex");var e=d.attr("rowix");try{var f=bke(b,c);f["CurRowIndex"]=parseInt(e,10)}catch(err){alert(err)}
return true}
function yut(a,b){var c=bke(a,b);return c["CurRowIndex"]}
function lsm(a,v,b){var c=bke(a,b);c["CurRowIndex"]=parseInt(v,10)}
function kzt(a,b){var c=bke(a,b);return c["RowCount"]}
function wfe(a,v,b){var c=bke(a,b);c["RowCount"]=parseInt(v,10)}
function lvq(a,b,c){if(!ksi(b,c)){var d=bke(b,c);xbb(b,d["CurRowIndex"],c)}}
DcxForm.DeleteRow=lvq;DcxForm.DeleteAllRow=jhm;DcxForm.DeleteUnlawRow=wit;DcxForm.AddRow=zma;function xbb(a,b,c){b="from_tr"+b;iou(a,b,c);jil.hide();xdl.hide();wks="";mouseover_id="";ipe="";uvp="";mouseover_divId="";vrl=""}
function jhm(c,d,e){var f=xri(d,e);f.children().each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;if(b==0){a.attr("state","4")}else if(b==1){a.attr("state","5")}else if(b==2){a.attr("state","4")}else if(b==3){a.attr("state","5")}
a.hide()})}
function ymx(a,b,c){var d=false;var e=$(a);e=e.parent();var i=0;while(e.length>0&&i<20){if(parseInt(e.attr("EntId"),10)==b&&parseInt(e.attr("isrow"),10)==1){d=true;break}else e=e.parent();i++}
var f=e;var g=$.trim(f.attr("state"));if(!ymr(g))g=parseInt(g,10);else g=-1;if(g==0){f.attr("state","4")}else if(g==1){f.attr("state","5")}else if(g==2){f.attr("state","4")}else if(g==3){f.attr("state","5")}
f.hide()}
DcxForm.DeleteInRow=ymx;function ksi(d,e){var f=xri(d,e);var g=false;f.children().each(function(){var a=$(this);var b=a.find("input[issyscheck=1]");if(b.length<1||!b.attr("checked"))return true;var c=$.trim($(this).attr("state"));if(!ymr(c))c=parseInt(c,10);else c=-1;if(c==0){a.attr("state","4")}else if(c==1){a.attr("state","5")}else if(c==2){a.attr("state","4")}else if(c==3){a.attr("state","5")}
a.hide();g=true});return g}
function wit(d,e,f){var g=xri(e,f);var h=mxx(e,f);var i=bke(e,f);var j=ntt(e,f);g.children().each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;if(b!=4&&b!=5&&b!=-1){var c=sme(a,true,e,f,true,j,i,false,false,null,h);if(ymr(c)||c==false){if(b==0){a.attr("state","4");a.remove()}else if(b==1){a.attr("state","5");a.hide()}else if(b==2){a.attr("state","4");a.remove()}else if(b==3){a.attr("state","5");a.hide()}}}})}
function iou(a,b,c){var d=c+a+"_"+b;var e=c+a+"_hid_opSt_"+b;var f=$('#'+d);var g=f.attr("state");var h="-1";if(g=="0"||g=="2")h="4";else if(g=="1"||g=="3")h="5";if(h!="-1"){$('#'+e).val(h);f.attr("state",h).hide()}}
function xtf(a){var b=$('#'+a).attr("CtrlPrex");if(b==undefined)b="AjaxF_";var c=a.indexOf("_");var d="";if(c>=0)d=a.substr(0,c);var e=a.indexOf("from_tr");var f=a.substr(e,a.length-e);var g=b+d+"_hid_opSt_"+f;var h=$('#'+g).val();var i="-1";if(h=="0")i="2";else if(h=="1")i="3";if(i!="-1"){$('#'+g).val(i);$('#'+b+d+"_"+f).attr("state",i)}}
function jzq(a,b){var c=$('#'+a).attr("CtrlPrex");if(c==undefined)c="AjaxF_";var d=a.indexOf("from_tr");var e=a.substr(d,a.length-d);var f=""+c+b+"_hid_opSt_"+e;var g=$('#'+f).val();var h="-1";if(g=="0")h="2";else if(g=="1")h="3";if(h!="-1"){$('#'+f).val(h);$('#'+c+b+"_"+e).attr("state",h)}}
function vfb(a,b,c,d){var e=a.indexOf("from_tr");var f=a.substr(e,a.length-e);var g=""+d+c+"_hid_opSt_"+f;$('#'+g).val(b);$('#'+d+c+"_"+f).attr("state",b)}
function hkm(a,b,c,d){var e=""+d+c+"_hid_opSt_"+a;$('#'+e).val(b);$('#'+d+c+"_"+a).attr("state",b)}
function wbx(a,b){var c=mwu(a,b);var d=parseInt(c.attr("state"),10);var e=-1;if(d==0)e=2;else if(d==1)e=3;if(e!=-1){c.attr("state",e+"")}}
function igj(a){var b=parseInt(a.attr("state"),10);var c=-1;if(b==0)c=2;else if(b==1)c=3;if(c!=-1){a.attr("state",c+"")}}
function umu(a,b){var c=mwu(a,b);var d=parseInt(c.attr("state"),10);if(isNaN(d))return d;else return 0}
function gru(a,b,c){var d=$.trim($(c).attr("text"));var e=$.trim($(c).attr("value"));suo(d,e,DcxCkb.$targetObj,DcxCkb.FieldName,true,DcxCkb.EntId,DcxCkb.CtrlPrex);igj(DcxCkb.$rowObj);DcxCkb.$DDC.hide()}
DcxForm.SetRadioTxtVal=gru;function vxf(a,b,c){var d="d"+DcxCkb.EntId+"_"+DcxCkb.FieldName;var e=bgs('ddc_'+d);var f=e.Text;var g=e.Value;igj(DcxCkb.$rowObj);suo(f,g,DcxCkb.$targetObj,DcxCkb.FieldName,true,DcxCkb.EntId,DcxCkb.CtrlPrex);DcxCkb.$DDC.hide()}
DcxForm.SetCheckTxtVal=vxf;function hoq(a,b,c){}
DcxForm.ClickCkb=hoq;function ttb(a,b,c){wbx(a,b,c)}
DcxForm.ListTxtChange=ttb;function vlo(a,b,c,d){}
$(window).load(function(){var O=null;$("body",document).bind("click",function(a){var b=$(a.target);var c=b.attr("tagName");if(ymr(c))c="";else c=c.toLowerCase();O=null;if(c!="text"&&c!="textarea")return;if($.trim(b.val())=="")O=b;else O=null});$("body",document).bind("keydown",function(c){var d=0;if(c.keyCode==37)d=1;else if(c.keyCode==38)d=2;else if(c.keyCode==13||c.keyCode==39)d=3;else if(c.keyCode==40)d=4;if(d<1){O=null;return true}
var e=$(c.target);var g=e.attr("tagName");if(ymr(g))return true;g=g.toLowerCase();var h=e.attr("type");if(!ymr(h))h=h.toLowerCase();else h="";var j=true;var l=false;if($.trim(e.val())=="")l=true;if(c.keyCode==13){if(g=="textarea"){z=parseInt(e.attr("cid"),10);if(z>=34&&z<=40)l=true;else return true}else if(h=="text")l=true}
if(O!=null&&O.attr("id")==e.attr("id"))l=true;else O=null;if(d==2||d==4)l=true;if(!l)return true;var m="";m=e.parent();var k=0;var o=null;while(!ymr(m)&&m.length>0&&k<100&&isNaN(m.attr("isgroup"))){if(!isNaN(m.attr("areaid"))){o=m}
m=m.parent();k++}
if(ymr(m)||m.length<1||ymr(m.attr("isgroup")))return true;var p=m;var q=!isNaN(p.attr("rowix"))?true:false;var r=p;if(q){if(d==2)r=p.prev();else if(d==4)r=p.next()}else{if(d==2)d=1;else if(d==4)d=3}
var s=null;var t=null;var u=parseInt(p.attr("entId"),10);if(isNaN(u))var v=null;var w=ymr(e.attr("isfield"))?false:true;if(!w){var x=wyb(e);if(!ymr(x))v=x.attr("fieldName");u=parseInt(x.attr("entId"),10)}else{v=e.attr("fieldName");u=parseInt(e.attr("entId"),10)}
var y=jyh(u);var z=parseInt(e.attr("cid"),10);if(z>=34&&z<=40){var A=leq(u,y);A.children("div").hide()}
var B=false;z=0;s=null;var f=function(){z=parseInt(s.attr("cid"),10);if(z>=34&&z<=40){t=jpy(s);var a=t.find("input:text");if(a.length<1)a=t.find("textarea");if(a.length<1)return true;a=a.filter(":first");if(!a.is(":visible"))return false;a.focus();a.click();B=true;O=a;if($.trim(a.val())!=""&&(c.keyCode==13||c.keyCode==37||c.keyCode==39))O=null;return true}else if((z==1||z==2||z==5||z==6)||(z>=15&&z<=17)){t=s;if(!t.is(":visible"))return false;if(t.attr("readonly")||t.attr("disabled"))return false;t.focus();O=t;if($.trim(t.val())!=""&&(c.keyCode==13||c.keyCode==37||c.keyCode==39))O=null;B=true;return true}
return false};if(d==2||d==4){if(q){var C=e.attr("id").replace("_tr"+p.attr("rowix"),"_tr"+r.attr("rowix"));s=r.find("#"+C);f();return true}}else{var D=d==1?o.prev():o.next();if(!ymr(D)&&D.length>0){while(!ymr(D)&&D.length>0){var E=D.find("[isfield]");if(d==1){for(var k=E.length-1;k>=0;k--){s=E.eq(k);if(f())break;s=null}}else{for(var k=0;k<E.length;k++){s=E.eq(k);if(f())break;s=null}}
if(s!=null)break;D=d==1?D.prev():D.next()}}
if(!B&&s==null){if(q){var F=null;if(d==1)F=p.prev();else F=p.next();if(ymr(F)||F.length<1)return true;var E=F.find("[isfield]");if(d==1){for(var k=E.length-1;k>=0;k--){s=E.eq(k);if(f())break;s=null}}else{for(var k=0;k<E.length;k++){s=E.eq(k);if(f())break;s=null}}}else{var G=yvm(u,y);var H=parseInt(p.attr("groupId"),10);var I=null;var J=null;var K=null;var L=false;var M=G.find("ul[isgroup=1][isrow!=1]");var N=0;M.each(function(n){var a=$(this);if(parseInt(a.attr("groupId"),10)==H){if(d==1){for(var i=N-1;i>=0;i--){I=M.eq(i);var b=I.find("[isfield=1]");for(var k=b.length-1;k>=0;k--){s=b.eq(k);if(f())break;s=null}
if(s!=null)break}}else{for(var i=N+1;i<M.length;i++){J=M.eq(i);var b=J.find("[isfield=1]");for(var k=0;k<b.length;k++){s=b.eq(k);if(f())break;s=null}
if(s!=null)break}}
return false;L=true}
N++})}}}})});function fzn(a,b,c){wbx(a,b,c)}
DcxForm.ListSelectChange=fzn;function uey(a,b,c){wbx(a,b,c)}
DcxForm.ListRadioLClick=uey;function gkj(a,b,c){wbx(a,b,c)}
DcxForm.ListCheckLClick=gkj;function list_txtMouseover(a,b,c){var d=null;if(mouseover_id!=a.id&&mouseover_id!=""){d=document.getElementById(mouseover_id)}
if(wks!=a.id&&wks!=""){d=document.getElementById(wks)}
mouseover_id=$(a).attr("id");jil.css('display','block').css('left',$(a).offset().left+$(a).width()-11+'px').css('top',($(a).offset().top+$(a).height()/2+2)+'px')}
DcxForm.ListTxtMouseOver=list_txtMouseover;function tau(a,b,c){wbx(a,b,c)}
DcxForm.ClickCkbLf=tau;function fgf(c,d,e){var f="ajax=1&EntId="+d+"&KeyField="+e+"&DbConnectId="+Dcx.GetUPCId()+"&getdatastr="+c;var g="";$.ajax({type:"GET",url:"Ajax_ExecuteSQL.aspx",dataType:"text",data:""+f+"",beforeSend:function(a){},success:function(a){g=a},complete:function(a,b){},error:function(){g=""}});return g}
function umf(o,p){lfl=0;mxd=new Array();var q=ntt(o,p);var s=null;var t=col(o,p);s=t.Selector;if(ymr(s))return true;var u=null;for(var i=0;i<s.length;i++){if(s[i].e2==o){u=s[i];break}}
if(ymr(u))return;var v="/WebServices/Menu/Menu_Run.asmx/ctw";var w=0;var x=u.u;if(ymr(x)){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:v,async:false,data:"{MenuId:"+u.m+"}",dataType:'json',success:function(r){r=hmy(r);x=r}})}
if(isNaN(u.w)||u.w<100)u.w=850;if(isNaN(u.h)||u.h<100)u.h=550;if(!ymr(x)){if(x.indexOf("?")>=0)x=x+"&thisisselector=1";else x=x+"?thisisselector=1";if(x.toLowerCase().indexOf("menuid")<=0)x=x+"&menuid="+u.m;if(x.toLowerCase().indexOf("entid")<=0)x=x+"&entid="+u.e1;var y=null;for(var i=0;i<ydo.length;i++){if(ydo[i].entId==o){y=ydo[i];break}}
if(!ymr(y)){y.dlg.show()}else{var z=parseInt((Math.random()*100000000),10);y={"entId":u.e2,"Selector":u,"dlg":null};y.dlg=art.VLdialog.open(x,{id:'dlg'+o+p+z,fixed:false,title:"批量选择",left:'30%',width:u.w+"px",height:u.h+"px",zIndex:'9999',background:'#0c2136',lock:false,opacity:0.3,button:[{name:"确    定",title:"确    定",width:'250px',height:'20px',callback:function(){jqh.hide();this.hide();sxc(o,p,u);return false},focus:true},{name:'关   闭',callback:function(){jqh.hide();this.hide();return false}}],close:function(){jqh.hide();this.hide();return false},lto:function(){var a=document;var b=window;var c=a.getElementsByTagName('script');var d=null;for(var i=0;i<c.length;i++){if(c[i].src&&c[i].src.indexOf('artDialog')!==-1){d=c[i];break}}
var e=ymr(d)?c[c.length-1]:d;var f=a.createElement('link');f.rel='stylesheet';f.href='/css/style/default/control/Selector/Selector.css';var g=a.createElement('script');g.type='text/javascript';g.src='/js/module/form/formSelector.js';e.parentNode.insertBefore(f,e);e.parentNode.insertBefore(g,e);var h=y.dlg.iframe.contentWindow;var j=u.e1;var k=["ListR_","TitleL_","BlockL_","SummaryL_","ImgSummyL_"];var l=null;var i=0;for(i=0;i<k.length;i++){try{l=h.xch(j,k[i]);if(ymr(l))l=$("#div_List_"+k[i]+j,h.document);if(!ymr(l))break}catch(err){l=null}}
var m=null;if(i<k.length)m=k[i];var n=l.children();n.removeAttr("onclick").removeAttr("onmouseover").css("cursor","pointer");n.unbind("click").bind("click",function(){grr($(this),u)})}},true);ydo.push(y)}}
ktz=y;u.h=parseInt(u.h,10)+10;try{window.top.pnn=window}catch(err){}
if(ymr(jqh)){var z=parseInt((Math.random()*100000000),10);var A=art.VLdialog.through;jqh=A({content:"<div class=\"form-selector\" style=\"z-index:10000;width:180px; height :"+u.h+"px; overflow :auto ; padding :10px 0px 2px 0px; background-color:#fff !important;opacity: .8!important;filter: alpha(opacity=80)!important;\"><ul id=\"dcx_"+p+o+z+"_Selector\"></ul></div>",zIndex:13000,left:'97%',title:"已选项",fixed:false,width:"200px",padding:'10px 5px',height:(u.h)+"px",lock:false,id:'EF893L'});xkw=$("body",window.top.document).find("#dcx_"+p+o+z+"_Selector")}else{xkw.html("");jqh.show()}}
DcxForm.OpenSelector=umf;function grr(a,b){var d=$.trim(a.attr("kv"));var e=false;for(var i=0;i<mxd.length;i++){if(mxd[i].dcx_KeyValue==d){e=true;break}}
if(e){art.VLdialog.tips("已选择！",0.7);return}
if(ymr(b))b=ktz.Selector;lfl++;var f=b.f1;var g=b.f2;f=f.split(",");var h={};h.Id=lfl;var j="";h.dcx_KeyValue=d;for(var i=0;i<f.length;i++){if(!ymr($.trim(f[i]))){var l=a.find("[isfield=1][fieldname='"+f[i]+"']");if(!ymr(l)&&l.length>0){var m=$.trim(l.text());h[f[i]]=m;if(ymr(j)&&!ymr(m))j=m}}}
mxd.push(h);var n=lfl;if(n<10)n="0"+n;var o=0;var p=20;var q="";var k=0;for(k=0;k<j.length;k++){var c=j.charCodeAt(k);if(c>256){o+=2}else o++;if(o<p||(o==p&&(k==j.length-1)))q=q+j.charAt(k);else{if(k==j.length-1)q=q+j.charAt(k);else q=q+"..";break}}
var r=new nzy();r.append("<li><span class=\"row-index\">"+n+"</span><span class=\"row-title\"");if(o>=p&&k<j.length-1){r.append(" title=\""+j+"\" ")}
r.append(">"+q+"</span><span class=\"delete\" onclick=\"javascript:pnn.tty("+lfl+",this);\"><img src=\"/images/WriteN.gif\"/></span>");xkw.append(r.toString());if(lfl==1){}}
var iii=0;function sxc(a,b,c){if(ymr(mxd)||mxd.length<1)return;var d=null;try{d=xri(a,b);if(ymr(d))d=$("#div_List_"+b+a)}catch(err){d=null}
if(ymr(d))return;var e=d.children(":last");var f=null;var g=0;while(!ymr(e)&&e.length>0){var h=$.trim(e.attr("state"));if(!ymr(h))h=parseInt(h,10);else h=-1;if(h!=0)break;g++;f=e;e=e.prev()}
if(g>0)e=f;else e=null;if(mxd.length-g>0)zma(null,mxd.length-g,a,b);var j=c.f1;var l=c.f2;j=j.split(",");l=l.split(",");if(g<1){var m=d.children(":last");for(var i=mxd.length-1;i>=0;i--){var n=mxd[i];for(var k=0;k<j.length;k++){if(!ymr($.trim(j[k]))){var o=l[k];var p=n[j[k]];var q=ppq(null,a,b,o,m,true,null);var r=null;var s=$.trim(q.attr("tfn"));if(!ymr(s)){for(var t=0;t<l.length;t++){if(s==l[t]){r=n[j[t]];break}}}
m.attr("state",2);if(!ymr(q))kdn(q,p,a,b,o,m,true,null,r)}}
m=m.prev()}}else{var m=e;for(var i=0;i<mxd.length;i++){var n=mxd[i];for(var k=0;k<j.length;k++){if(!ymr($.trim(j[k]))){var o=l[k];var p=n[j[k]];var q=ppq(null,a,b,o,m,true,null);var r=null;var s=$.trim(q.attr("tfn"));if(!ymr(s)){for(var t=0;t<l.length;t++){if(s==l[t]){r=n[j[t]];break}}}
m.attr("state",2);if(!ymr(q))kdn(q,p,a,b,o,m,true,null,r)}}
m=m.next()}}
mxd=new Array()}
function ecn(a,b){}
function tty(a,b){if(ymr(mxd)||mxd.length<1)return;$(b).parent().remove();for(var i=0;i<mxd.length;i++){if(mxd[i].Id==a){mxd.splice(i,1);break}}}
function reu(a){mxd=new Array();$(a).parent().parent().html("")}
Dcx.FormRun={entId:0,ctrlPrex:null,buildNew:false,closeDlg:false,formEntMsg:null,formMsg:null,ewi:null,submitData:null,submitUrl:null,formData:null,upFileList:null,gpo:function(a){return true},svz:function(a){return true},success:function(a,b){return true},error:function(a,b,c){},complete:function complete(a,b,c){return true},opType:-1,hee:null,sendMsg:{ctrl:null},dkg:function(a,b,c,d,e){if(d!=true)d=false;if(c!=true)c=false;if(!ymr(e)&&e.length>0)Dcx.FormRun.submitUrl=e;Dcx.FormRun.entId=a;Dcx.FormRun.ctrlPrex=b;Dcx.FormRun.buildNew=c;Dcx.FormRun.closeDlg=d;var f=Dcx.FormRun.formEntMsg;if(f==null){f=col(a,b);Dcx.FormRun.formEntMsg=f}
if(!Dcx.FormRun.gpo(f))return false;Dcx.FormRun.spg();f=Dcx.FormRun.formEntMsg;if(f.IsFlow!=true&&Dcx.FormRun.opType==1){var g=f.OtherMsg;if(!ymr(Dcx.FormRun.submitData)&&!ymr(Dcx.FormRun.submitData.ValueList)&&!ymr(f.OtherMsg)&&!ymr(f.OtherMsg.msg)&&f.OtherMsg.msg.supportMsg==true){Dcx.FormRun.submitData.ValueList[0][0].Header.SendMsg=null;var h=avo(a,b);if(ymr(h)){art.VLdialog.alert("您还没设置发送消息。",function(){},2111,"提示");return false}else Dcx.FormRun.submitData.ValueList[0][0].Header.SendMsg=h}}else if(f.IsFlow&&!ymr(hee)&&hee.IsPostNext){Dcx.FormRun.submitData.ValueList[0][0].Header.SendMsg=plz(a,b);if(ymr(Dcx.FormRun.submitData.ValueList[0][0].Header.SendMsg))return false}
return Dcx.FormRun.egr()},spg:function(h,j,k,l){h=ymr(h)||h<1?Dcx.FormRun.entId:h;j=ymr(j)?Dcx.FormRun.ctrlPrex:j;k=k==undefined?Dcx.FormRun.buildNew:k;l=l==undefined?Dcx.FormRun.closeDlg:l;var m=Dcx.FormRun.formEntMsg;if(m==null){m=col(h,j);Dcx.FormRun.formEntMsg=m}
var n={FormData:[]};var o=ggt(h,j);n.FormData.push(o);var p=DcxForm.GetHtmlContainer(h,j);if(p==null){alert("获取表单的HTML对象失败。请确认代码正确。");return false}
var q=yci(h,j);Dcx.FormRun.ewi=p;Dcx.FormRun.formMsg=q;var r=new Array();var s={EntId:h,RowIndex:1,Items:[]};s.Items=new Array();var t=sme(p,false,h,j,true,h,q,false,false,s,o.Header.OpType);if(m.VrfFldId!=undefined&&!isNaN(m.VrfFldId)&&!ymr(m.VrfFieldName)){var u=m.VrfFieldName;var v=p.find("#d"+m.EntId+"_"+u);var w=$.trim(v.val());if(!rnk(w)){v.removeClass("form-txt-err").val("");art.VLdialog.alert("验证码错误，请重新输入。您输入的数据有误。",function(){},2,"提示");GetVerifyImg(v.get(0));return false}}
if(!ymr(s.Items)&&s.Items.length>0)r.push(s);t.Dcx_Keymsg.KeyField=o.Header.MKeyField;t.Dcx_Keymsg.RowIx=1;t.Dcx_Keymsg.KeyFieldValue=o.Header.MKeyValue;t.Dcx_Keymsg.DataTypeId=o.Header.DataTypeId;t.Dcx_Keymsg.OpType=o.Header.OpType;if((m.IsFlow!=true&&t.Dcx_Keymsg.OpType==2)||(m.IsFlow&&!ymr(hee)&&hee.IsPostNext)){var x=tzm("RcvMsgId");if(!ymr(x)&&!isNaN(x))x=parseInt(x,10);else x=-1;if(x>0)o.Header.RcvMsgId=x}
Dcx.FormRun.opType=o.Header.OpType;if(m.IsFlow==true&&hee!=null){try{hee.Feedback=CKEDITOR.instances.dcxwf_YiJian.getData()}catch(err){}
t.Dcx_RunFlow=hee}
o.Header.EntName=m.EntName;o.Data.Row.push(t);var i=0;for(key in m.EntMsg){if(key.indexOf("E")<0)continue;var y=m.EntMsg[key];if(y.EntId==h||ymr(y.EntId))continue;i++;var z=y.EntId;var A=ggt(z,j);var B=y.$listContainer;if(B!=null){var C=yci(z,j);var D=0;var E="";var F=true;var G=1000;B.children().each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;var c=null;var d=1;if(b==2)d=1;else if(b==3){d=2}else if(b==5){d=3;c=a.children().last().find("input:hidden").filter("[KeyField=1]").val();E=E+c+"^";return true}else return true;if(c==null)c=a.children().last().find("input:hidden").filter("[KeyField=1]").val();var e={EntId:h,RowIndex:D+1,Items:[]};e.Items=new Array();var f=sme(a,true,z,j,true,h,C,false,false,e,d);if(ymr(f)||f==false){F=false;art.VLdialog.alert("提交失败。您输入的数据有误。",function(){},2,"提示");return false}
if(!ymr(e.Items)&&e.Items.length>0)r.push(e);f.Dcx_Keymsg.KeyField=A.Header.KeyField;f.Dcx_Keymsg.KeyFieldValue=c;f.Dcx_Keymsg.DataTypeId=A.Header.DataTypeId;f.Dcx_Keymsg.OpType=d;var g=a.attr("rowix");if(ymr(g)||isNaN(g)){G++;a.attr("rowix",G);g=G}else g=parseInt(g,10);f.Dcx_Keymsg.RowIx=g;D++;A.Data.Row.push(f)});if(!F)return false;A.Header.TotalRows=D;A.Header.DeletedKeyVS=E;o.Data.Row[0].Dcx_Childmsg.Child.push(A)}}
var H=m.EntMsg["E"+h];if(k!=true)k=false;if(k==true&&ymr(H.DefaultFormData))k=true;else k=false;var I=new Array();I.push("FormData");var J=new Array();J.push(n.FormData);if(m.IsFlow!=true)m.IsFlow=false;var K={MenuId:m.MenuId,EntId:h,"DbConnectId":Dcx.GetUPCId(),CtrlPrex:j,OpTypeId:m.OperateType,IsFlow:m.IsFlow,GetNew:k,KeyList:I,ValueList:J};Dcx.FormRun.submitData=K;Dcx.FormRun.upFileList=r;Dcx.FormRun.formData=n.FormData;return true},krz:function(a,b){},egr:function(f,g,h,i){f=ymr(f)||f<1?Dcx.FormRun.entId:f;g=ymr(g)?Dcx.FormRun.ctrlPrex:g;h=h==undefined?Dcx.FormRun.buildNew:h;i=i==undefined?Dcx.FormRun.closeDlg:i;var j=Dcx.FormRun.formEntMsg;if(j==null){j=col(f,g);Dcx.FormRun.formEntMsg=j}
if(j.VrfFldId!=undefined&&!isNaN(j.VrfFldId)&&j.VrfFldId>0){var k=j.VrfFieldName}
var l=Dcx.FormRun.upFileList;var m=Dcx.FormRun.submitData;var j=Dcx.FormRun.formEntMsg;var n=Dcx.FormRun.ewi;var o=Dcx.FormRun.formMsg;if(!Dcx.FormRun.svz(j))return false;var p=false;var q=ymr(l)||l.length<1?true:false;var r=false;var s=ymr(l)||l.length<1?true:false;var t=null;var u=null;var v=null;if(m==null)return false;try{if(window.DcxEditor!=undefined)m.fileList=window.DcxEditor.FileList;else m.fileList=null}catch(e){m.fileList=null}
var w="/WebServices/Form/Form_Run.asmx/SumbitFormData";if(!ymr(Dcx.FormRun.submitUrl))w=Dcx.FormRun.submitUrl;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:w,data:JSON2.stringify(m),dataType:'json',beforeSend:function(a){},complete:function(a,b){p=true},error:function(a){p=true;r=false;art.VLdialog.alert("提交表单失败。详情："+JSON2.stringify(a),function(){},42,"提示");return false},success:function(a){a=hmy(a);var b=a.IsOK;if(b){r=true;var c=a.ErrorMsg;if(h==true&&!ymr(c)){try{c=eval("("+c+")")}catch(e){c=null}}
if(!h){var d=a.ReturnValue;if(!ymr(d)){try{d=eval("("+d+")")}catch(e){d=null;window.top.art.VLdialog.alert("提交成功，但获取返回的主键值时失败！",function(){},42,"提示")}}
if(!ymr(d))mif(f,g,d)}
if(h==true&&!ymr(c)){u="提交成功！  您可以继续添加。";if(ymr(Form_EntMsg.DefaultFormData)&&!ymr(c))Form_EntMsg.DefaultFormData=c}else u="提交成功！";r=true}else if(!ymr(a.ErrorMsg))window.top.art.VLdialog.alert(a.ErrorMsg,function(){},42,"错误提示")}});if(!ymr(l)&&l.length>0){$.bpd(l,{url:'/js/Control/AjaxFileUpload/AjaxFileUpload.ashx',secureuri:false,fileElementId:'fileToUpload',dataType:'text',success:function(a){a=hmy(a);s=true},error:function(a,b,e){q=true;if(b=='error'){alert(e)}},complete:function(a,b){q=true}})}
var x=window.setTimeout(function(){y()},100);var y=function(){if(q&&p){window.clearTimeout(x);x=null;if(r&&!s)u=u+"表单数据提交成功，但文件保存失败。";if(r)Dcx.FormRun.success(j,s);else Dcx.FormRun.error(j,s,u);if(i){try{if(r)window.top.art.VLdialog.tips("提交成功！",2.8);byg()}catch(err){}}else{try{if(!ymr(u))window.top.art.VLdialog.Succeed(u,function(){},2,"提示");if(j.IsFlow&&hee.IsPostNext&&r){window.top.art.VLdialog.open.api.hide();window.setTimeout(function(){window.top.art.VLdialog.open.api.close()},4000)}}catch(err){}
if(r&&h!=true){pet(f,g,2)}else if(r&&h==true&&!ymr(Form_EntMsg.DefaultFormData))yyr(f,g,true)}
Dcx.FormRun.complete(j,r,s)}else{window.clearTimeout(x);x=null;x=window.setTimeout(function(){y()},500)}};return true}}
function crn(a,b,c,d,e){return Dcx.FormRun.dkg(a,b,c,d,e)}
DcxForm.SumbitAf=crn;function rxy(a,b,c,d,e){return cjr(a,b,c,d,e)}
DcxForm.SumbitLf=rxy;function dck(a,b){yyr(a,b)}
DcxForm.BuildNew=dck;function piv(){try{window.close();art.VLdialog.open.api.close()}catch(Error){art.VLdialog.open.api.close()}}
DcxForm.jev=piv;function byg(){var a=tzm("closeFrameMid");if(!isNaN(a)&&!ymr(a)){window.top.hbq(a);return}
try{window.close();art.VLdialog.open.api.close()}catch(Error){try{var b=tzm("targetType");if(!ymr(b)&&!isNaN(b))b=parseInt(b,10);else b=-1;if(b==1){var c=tzm("parentUrl");if(!ymr(c)){c=unescape(c);c=wxo(c,"^#%","&");if(c.indexOf("?")>0)c=c+"&fdawpqmz="+Math.random();else c=c+"?fdawpqmz="+Math.random();window.open(c,"_self")}}}catch(e){alert(e);art.VLdialog.open.api.close()}}}
DcxForm.Close=byg;function qeg(a,b){var c=col(a,b);c.OperateType=1;c.MKeyFieldValue="";c.EntMsg["E"+a].KeyFieldValue="";art.VLdialog.alert("请编辑",function(){},2,"提示")}
DcxForm.CopyForm=qeg;function cjr(h,j,k,l,m){if(!ymr(m)&&m.length>0)Dcx.FormRun.submitUrl=m;Dcx.FormRun.entId=h;Dcx.FormRun.ctrlPrex=j;Dcx.FormRun.buildNew=k;Dcx.FormRun.closeDlg=l;var n=col(h,j);Dcx.FormRun.formEntMsg=n;if(!Dcx.FormRun.gpo(n))return false;var o={FormData:[]};var p=ggt(h,j);o.FormData.push(p);var q=null;var n=col(h,j);q=n.$form;if(q==null){alert("获取表单的HTML对象失败。请确认代码正确。");return false}
var r=yci(h,j);var s=new Array();var i=0;var t=n.EntMsg["E"+h];i++;var u=t.$listContainer;if(u!=null){var v=0;var w="";var x=true;var y=1000;u.children().each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;var c=null;var d=1;if(b==2)d=1;else if(b==3){d=2}else if(b==5){d=3;c=a.children().last().find("input:hidden").filter("[KeyField=1]").val();w=w+c+"^";return true}else return true;if(c==null)c=a.children().last().find("input:hidden").filter("[KeyField=1]").val();var e={EntId:h,RowIndex:v+1,Items:[]};e.Items=new Array();var f=sme(a,true,h,j,true,h,r,false,false,e,d);if(ymr(f)||f==false){x=false;art.VLdialog.alert("提交失败。您输入的数据有误。",function(){},2,"提示");return false}
if(!ymr(e.Items)&&e.Items.length>0)s.push(e);f.Dcx_Keymsg.KeyField=p.Header.KeyField;f.Dcx_Keymsg.KeyFieldValue=c;f.Dcx_Keymsg.DataTypeId=p.Header.DataTypeId;f.Dcx_Keymsg.OpType=d;var g=a.attr("rowix");if(ymr(g)||isNaN(g)){y++;a.attr("rowix",y);g=y}else g=parseInt(g,10);f.Dcx_Keymsg.RowIx=g;v++;p.Data.Row.push(f)});if(!x)return false;p.Header.TotalRows=v;p.Header.DeletedKeyVS=w}
if(k!=true)k=false;if(k==true&&ymr(t.DefaultFormData))k=true;else k=false;var z=new Array();z.push("FormData");var A=new Array();A.push(o.FormData);var B=false;var C=ymr(s)||s.length<1?true:false;var D=false;var E=ymr(s)||s.length<1?true:false;var F=null;var G=null;var H=null;var I={MenuId:n.MenuId,EntId:h,CtrlPrex:j,"DbConnectId":Dcx.GetUPCId(),OpTypeId:n.OperateType,IsFlow:n.IsFlow,GetNew:k,KeyList:z,ValueList:A,fileList:null};var J="/WebServices/Form/Form_Run.asmx/SumbitFormData";if(!ymr(m))J=m;Dcx.FormRun.submitData=I;Dcx.FormRun.upFileList=s;Dcx.FormRun.formData=o.FormData;if(!Dcx.FormRun.svz(n))return false;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:J,data:JSON2.stringify(I),dataType:'json',beforeSend:function(a){},complete:function(a,b){B=true},error:function(a){B=true;alert("提交表单失败。详情："+JSON2.stringify(a));return false},success:function(a){a=hmy(a);var b=a.IsOK;if(b){D=true;var c=a.ErrorMsg;if(k==true&&!ymr(c)){try{c=eval("("+c+")")}catch(e){c=null}}
if(!k){var d=a.ReturnValue;if(!ymr(d)){try{d=eval("("+d+")")}catch(e){d=null;art.VLdialog.alert("提交成功，但获取返回的主键值时失败！",function(){},42,"提示")}}
if(!ymr(d))mif(h,j,d)}
if(k==true&&!ymr(c)){G="<span style=\"font-size:16px;\">提交成功！ 您可以继续添加。 </span> ";if(ymr(t.DefaultFormData)&&!ymr(c))t.DefaultFormData=c}else G="<span style=\"font-size:16px;\">提交成功！ </span>";D=true}else if(!ymr(a.ErrorMsg))alert(a.ErrorMsg)}});if(!ymr(s)&&s.length>0){$.bpd(s,{url:'/js/Control/AjaxFileUpload/AjaxFileUpload.ashx',secureuri:false,fileElementId:'fileToUpload',dataType:'text',success:function(a){a=hmy(a);E=true},error:function(a,b,e){C=true;if(b=='error'){alert(e)}},complete:function(a,b){C=true}})}
var K=window.setTimeout(function(){L()},500);var L=function(){if(C&&B){window.clearTimeout(K);K=null;if(D&&!E)G=G+"表单数据提交成功，但文件保存失败。";if(D)Dcx.FormRun.success(n,E);else Dcx.FormRun.error(n,E,G);if(l){art.VLdialog.open.api.close();art.VLdialog.tips("提交成功！",0.8)}else{art.VLdialog.Succeed(G,function(){},42,"提示");if(D&&k!=true){pet(h,j,2)}else if(D&&k==true&&!ymr(t.DefaultFormData))yyr(h,j,true)}
Dcx.FormRun.complete(n,D,E)}else{window.clearTimeout(K);K=null;K=window.setTimeout(function(){L()},500)}}}
DcxForm.SubmitLf=cjr;function opc(h,j){var k=col(h,j);var l={FormData:[]};var m=ggt(h,j);l.FormData.push(m);var n=null;var k=col(h,j);n=k.$form;if(n==null){alert("获取表单的HTML对象失败。请确认代码正确。");return false}
var o=yci(h,j);var p=new Array();var i=0;var q=k.EntMsg["E"+h];i++;var r=q.$listContainer;if(r!=null){var s=0;var t="";var u=true;var v=1000;r.children().each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;var c=null;var d=1;if(b==2)d=1;else if(b==3){d=2}else if(b==5){d=3;c=a.children().last().find("input:hidden").filter("[KeyField=1]").val();t=t+c+"^";return true}else return true;if(c==null)c=a.children().last().find("input:hidden").filter("[KeyField=1]").val();var e={EntId:h,RowIndex:s+1,Items:[]};e.Items=new Array();var f=sme(a,true,h,j,true,h,o,false,false,e,d);if(ymr(f)||f==false){u=false;art.VLdialog.alert("提交失败。您输入的数据有误。",function(){},2,"提示");return false}
if(!ymr(e.Items)&&e.Items.length>0)p.push(e);f.Dcx_Keymsg.KeyField=m.Header.KeyField;f.Dcx_Keymsg.KeyFieldValue=c;f.Dcx_Keymsg.DataTypeId=m.Header.DataTypeId;f.Dcx_Keymsg.OpType=d;var g=a.attr("rowix");if(ymr(g)||isNaN(g)){v++;a.attr("rowix",v);g=v}else g=parseInt(g,10);f.Dcx_Keymsg.RowIx=g;s++;m.Data.Row.push(f)});if(!u)return false;m.Header.TotalRows=s;m.Header.DeletedKeyVS=t}
return m.Data.Row}
DcxForm.GetLfData=opc;function avo(a,b){var c=Dcx.FormRun.submitData;if(!ymr(c)&&!ymr(c.ValueList)&&c.ValueList.length>0)c=c.ValueList[0][0];var d=Dcx.FormRun.formEntMsg;if(ymr(d.OtherMsg)||ymr(d.OtherMsg.msg)||d.OtherMsg.msg.supportMsg!=true||ymr(c.Data.Row)||c.Data.Row.length<1)return null;var e={"SupportMsg":true,"SendOther":{"Note":false,"Sms":false,"Email":false},"MsgContent":"您有新的消息，请查看！","OtherReceiver":{"MyDept":false,"All":false,"MySelf":false},"Receiver":{deptIds:null,roleIds:null,userIds:null}};var f=Dcx.FormRun.sendMsg.ctrl;var g=c.Data.Row[0];if(ymr(f)){var h=d.OtherMsg.msg;if(!ymr(h.msgContent)){var j="";var k=h.msgContent;for(var i=0;i<k.length;i++){if(!ymr(k[i].b))j=j+k[i].b;if(!ymr(k[i].fid)&&k[i].fid>0){msgFromForm=true;if(c.Data.Row.length>0&&!ymr(g[k[i].fn]))j=j+g[k[i].fn]}
if(!ymr(k[i].l))j=j+k[i].l}
e.MsgContent=j}
if(h.receiver.deptIds!=undefined)e.Receiver.deptIds=h.receiver.deptIds;if(h.receiver.roleIds!=undefined)e.Receiver.roleIds=h.receiver.roleIds;if(h.receiver.userIds!=undefined)e.Receiver.userIds=h.receiver.userIds;if(h.receiver.all!=undefined)e.OtherReceiver.All=h.receiver.all;if(h.receiver.myDept!=undefined)e.OtherReceiver.MyDept=h.receiver.myDept;if(h.receiver.mySelf!=undefined)e.OtherReceiver.MySelf=h.receiver.mySelf;if(h.receiver.note!=undefined)e.SendOther.Note=h.receiver.note;if(h.receiver.sms!=undefined)e.SendOther.Sms=h.receiver.sms;if(h.receiver.email!=undefined)e.SendOther.Email=h.receiver.email;return e}
var j=DcxEditor.rtg();var l="";var m=new Array();var n=0;var o=j.indexOf("{@");var p=2;var q=1;var r=-1;var s=null;var t=null;var u=null;while(o>=0){o=o+p;r=j.indexOf("}",o);if(o<r){s=j.substr(o,r-o);if(s.indexOf("{")<0&&s.indexOf("}")<0){if(o<p||o-p<=n)t=null;else t=j.substr(n,o-p-n);s=$.trim(s);var v=s.split(',');var w=null;if(v!=null||v.length>0)w=$.trim(v[0].toLowerCase());t=ymr(t)?"":t;l=l+t;if(v==null||(w!="rowindex"&&v.length<2)){if(c.Data.Row.length>0&&!ymr(g[w]))l=l+g[w]}}}else break;n=r+q;o=j.indexOf("{@",n)}
if(n<j.length){if(l.length>0)l=l+j.substr(n,j.length-n);else l=l+j}
e.MsgContent=l;if(f.$sendToAll.attr("checked")==true){e.OtherReceiver.All=true}else{if(f.$sendToMyDept.attr("checked")==true)e.OtherReceiver.MyDept=true;if(f.$sendToMySelf.attr("checked")==true)e.OtherReceiver.MySelf=true;if(f.$sendOtherMsg.find("#d2273_0").attr("checked")==true)e.SendOther.Sms=true;if(f.$sendOtherMsg.find("#d2273_1").attr("checked")==true)e.SendOther.Email=true;if(f.$sendOtherMsg.find("#d2273_2").attr("checked")==true)e.SendOther.Note=true;if(!ymr(d.OtherMsg)&&!ymr(d.OtherMsg.msg)&&d.OtherMsg.msg.supportMsg){var h=d.OtherMsg.msg;if(!isNaN(h.receiver.deptfid)&&h.receiver.deptfid>0){e.Receiver.DeptIds=g[h.receiver.deptf]}else{e.Receiver.DeptIds=f.$deptIdsHid.val()}
if(!isNaN(h.receiver.rolefid)&&h.receiver.rolefid>0){e.Receiver.RoleIds=g[h.receiver.rolef]}else{e.Receiver.RoleIds=f.$roleIdsHid.val()}
if(!isNaN(h.receiver.userfid)&&h.receiver.userfid>0){e.Receiver.UserIds=g[h.receiver.userf]}else{e.Receiver.UserIds=f.$userIdsHid.val()}}}
return e}
function plz(a,b){var c=Dcx.FormRun.submitData;if(!ymr(c)&&!ymr(c.ValueList)&&c.ValueList.length>0)c=c.ValueList[0][0];var d=Dcx.FormRun.formEntMsg;if(ymr(c.Data.Row)||c.Data.Row.length<1){art.VLdialog.tips("获取表单数据失败。",0.8);return null}
var e={"SupportMsg":true,"SendOther":{"Note":false,"Sms":false,"Email":false},"MsgContent":"您有新的消息，请查看！","OtherReceiver":{"MyDept":false,"All":false,"MySelf":false},"Receiver":{deptIds:null,roleIds:null,userIds:null}};var f=Dcx.FormRun.flowMsg.ctrl;var g=c.Data.Row[0];var h=DcxEditor.rtg();if(ymr($.trim(h))){art.VLdialog.tips("请输入您的审批意见。",0.8);return null}
var j="";var k=new Array();var l=0;var m=h.indexOf("{@");var n=2;var o=1;var p=-1;var q=null;var r=null;var s=null;while(m>=0){m=m+n;p=h.indexOf("}",m);if(m<p){q=h.substr(m,p-m);if(q.indexOf("{")<0&&q.indexOf("}")<0){if(m<n||m-n<=l)r=null;else r=h.substr(l,m-n-l);q=$.trim(q);var t=q.split(',');var u=null;if(t!=null||t.length>0)u=$.trim(t[0].toLowerCase());r=ymr(r)?"":r;j=j+r;if(t==null||(u!="rowindex"&&t.length<2)){if(c.Data.Row.length>0&&!ymr(g[u]))j=j+g[u]}}}else break;l=p+o;m=h.indexOf("{@",l)}
if(l<h.length){if(j.length>0)j=j+h.substr(l,h.length-l);else j=j+h}
e.MsgContent=j;if(f.$sendOtherMsg.find("#d2078_0").attr("checked")==true)e.SendOther.Sms=true;if(f.$sendOtherMsg.find("#d2078_1").attr("checked")==true)e.SendOther.Email=true;if(f.$sendOtherMsg.find("#d2078_2").attr("checked")==true)e.SendOther.Note=true;var v=Dcx.FormRun.flowMsg.rcUserIds;var w="";var x=Dcx.FormRun.flowMsg.mainUserId;if(!ymr(x)&&!isNaN(x)&&parseInt(x,10)>0)w=x+",";x=parseInt(x,10);if(isNaN(x))x=-1;if(!ymr(v)&&v.length>0){for(var i=0;i<v.length;i++){if(parseInt(v[i],10)!=x)w=w+v[i]+","}}
e.Receiver.UserIds=w;return e}
function brk(a,b,c,d){}
function nwv(c,d,e,f){if(ymr(Dcx.FormRun.sendMsg.tct)){glg("LTreeRList.js","/js/Control/LTreeRList/LTreeRList.js");var g=yjo();var h=$(g.toString());$(document.body).append(h);Dcx.FormRun.sendMsg.tct=h;var j=col(d,e);Dcx.FormRun.sendMsg.ctrl={};Dcx.FormRun.sendMsg.ctrl.xss=h.find("#d2273_SendMsgContent");Dcx.FormRun.sendMsg.ctrl.$deptIdsTxt=h.find("#d2273_SendDeptIds_Text");Dcx.FormRun.sendMsg.ctrl.$deptIdsHid=h.find("#d2273_SendDeptIds_hid");Dcx.FormRun.sendMsg.ctrl.$roleIdsTxt=h.find("#d2273_SendRoleIds_Text");Dcx.FormRun.sendMsg.ctrl.$roleIdsHid=h.find("#d2273_SendRoleIds_hid");Dcx.FormRun.sendMsg.ctrl.$userIdsTxt=h.find("#d2273_SendUserIds_Text");Dcx.FormRun.sendMsg.ctrl.$userIdsHid=h.find("#d2273_SendUserIds_hid");Dcx.FormRun.sendMsg.ctrl.$sendToAll=h.find("#d2273_SendToAll");Dcx.FormRun.sendMsg.ctrl.$sendToMyDept=h.find("#d2273_SendToMyDept");Dcx.FormRun.sendMsg.ctrl.$sendToMySelf=h.find("#d2273_SendToMySelf");Dcx.FormRun.sendMsg.ctrl.$sendOtherMsg=h.find("#d2273_SendOtherMsg");var k=Dcx.FormRun.sendMsg.ctrl;if(!ymr(j.OtherMsg)&&!ymr(j.OtherMsg.msg)&&j.OtherMsg.msg.supportMsg){var l=false;var m=j.OtherMsg.msg;if(!ymr(m.msgContent)){var n="";var o=m.msgContent;for(var i=0;i<o.length;i++){if(!ymr(o[i].b))n=n+o[i].b;if(!ymr(o[i].fid)&&o[i].fid>0){l=true;n=n+"{@"+o[i].fn+","+o[i].fid+"}"}
if(!ymr(o[i].l))n=n+o[i].l}
DcxEditor.sec(n)}
if(!ymr(m.receiver.dept)&&!ymr(m.receiver.deptIds)){k.$deptIdsTxt.val(m.receiver.dept);k.$deptIdsHid.val(m.receiver.deptIds)}
if(!ymr(m.receiver.role)&&!ymr(m.receiver.roleIds)){k.$roleIdsTxt.val(m.receiver.role);k.$roleIdsHid.val(m.receiver.roleIds)}
if(!ymr(m.receiver.user)&&!ymr(m.receiver.userIds)){k.$userIdsTxt.val(m.receiver.user);k.$userIdsHid.val(m.receiver.userIds)}
if(m.receiver.all==true)k.$sendToAll.attr("checked",true);if(m.receiver.myDept==true)k.$sendToMyDept.attr("checked",true);if(m.receiver.mySelf==true)k.$sendToMySelf.attr("checked",true);if(!ymr(m.send)){if(m.send.sms==true)k.$sendOtherMsg.find("#d2273_0").attr("checked",true);if(m.send.email==true)k.$sendOtherMsg.find("#d2273_1").attr("checked",true);if(m.send.note==true)k.$sendOtherMsg.find("#d2273_2").attr("checked",true)}}
var p=h.find("#d2273_SendDeptIds_Text");var q=function(a,b){if(!ymr(a)){h.find("#DefaultF_2273_Dropdown").append(a);Dcx.FormRun.sendMsg.HaveGetDept=true;ohn(p.get(0),b,2273,'SendDeptIds',true,h)}};p.unbind("click").bind("click",function(){if(Dcx.FormRun.sendMsg.HaveGetDept==true)ohn(p.get(0),56,2273,'SendDeptIds',true,h);else gtc(null,null,'SendDeptIds',2273,1,true,q)});var r=h.find("#d2273_SendRoleIds_Text");var s=function(a,b){if(!ymr(a)){h.find("#DefaultF_2273_Dropdown").append(a);Dcx.FormRun.sendMsg.HaveGetRole=true;ohn(r.get(0),b,2273,'SendRoleIds',true,h)}};r.unbind("click").bind("click",function(){if(Dcx.FormRun.sendMsg.HaveGetRole==true)ohn(r.get(0),55,2273,'SendRoleIds',true,h);else eez(null,null,'SendRoleIds',2273,1,true,s)});var t=h.find("#d2273_SendUserIds_Text");var u=function(a,b){if(!ymr(a)){h.find("#DefaultF_2273_Dropdown").append(a);Dcx.FormRun.sendMsg.HaveGetUser=true;ohn(t.get(0),b,2273,'SendUserIds',true,h)}};t.unbind("click").bind("click",function(){if(Dcx.FormRun.sendMsg.HaveGetUser==true)ohn(t.get(0),58,2273,'SendUserIds',true,h);else tkk(null,null,'SendUserIds',2273,1,true,u)});if(ymr(Dcx.FormRun.sendMsg.fie)){Dcx.FormRun.sendMsg.fie=$("#dcx_SendMsgBtn")}
var v=$.browser.msie?"mouseenter":"mouseover";var w=$.browser.msie?"mouseleave":"mouseout";Dcx.FormRun.sendMsg.tct.unbind(v).bind(v,function(){$(this).attr("isInDlg",1)});Dcx.FormRun.sendMsg.tct.unbind(w).bind(w,function(){$(this).attr("isInDlg",0)})}
var x=xfx(c,"Left");var y=xfx(c,"Top")+40;Dcx.FormRun.sendMsg.tct.css({"left":x+"px","top":y+"px"});if(Dcx.FormRun.sendMsg.tct.get(0).style.display=="none"){Dcx.FormRun.sendMsg.tct.show();Dcx.FormRun.sendMsg.tct.attr("isShowing",1);Dcx.FormRun.sendMsg.fie.find(".dcx-msgtoolbar4").css({"background-position":"-13px 0px"})}else{Dcx.FormRun.sendMsg.tct.attr("isShowing",0);Dcx.FormRun.sendMsg.tct.hide();Dcx.FormRun.sendMsg.fie.find(".dcx-msgtoolbar4").css({"background-position":"0px 0px"})}}
function yjo(){var a=new nzy();a.append("<div id=\"div_DefaultF_2273\" isform=\"1\" class=\"nui-menu\" onclick=\"javascript:$(this).attr('isShowing',1);\" entid=\"2273\" style=\"position :absolute ; left :0; top :0; display :none ;z-index:9999;background: #FFFFFF; padding:10px 0px 20px 10px;\">\n");a.append("<div id=\"div_FormHtml_DefaultF_2273\" >");a.append("    <div class=\"defaultform\">");a.append("        <div class=\"frame-div\">");a.append("            <ul class=\"ul-group\"  style=\"width: 560px;;\">");a.append("                <li class=\"li-area  h55\" style=\"height: 60px;\">");a.append("                    <label class=\"area-title pad126\"   style=\"width:81px;font-size: 13px;padding-top:10px;\">");a.append("                        发送内容<span style=\"color:red;position:relative;top:2px;\"> *</span></label>");a.append("                    <div class=\"field-content pad17\">");a.append("                        <span class=\"form-ctr\" >");a.append("                            <textarea  id=\"d2273_SendMsgContent\" class=\"form-txts\" style=\"width: 415px; height: 35px;padding-top:7px;padding-left:8px;\" >您有新的“请假审批”需要办理，请点击审批进入办理。</textarea></span>");a.append("                    </div>");a.append("                </li>");a.append("                <li class=\"li-area  h55\" >");a.append("                    <label class=\"area-title pad126\"  style=\"width:81px;font-size: 13px;padding-top:10px;\">");a.append("                        请选择部门</label>");a.append("                    <div class=\"field-content pad17\">");a.append("                            <div id=\"d2273_SendDeptIds\" class=\"form-ddl\" isforfield=\"1\" entid=\"2273\" fieldname=\"SendDeptIds\">");a.append("                                <textarea readonly id=\"d2273_SendDeptIds_Text\" class=\"form-ddl-txts\" style=\"width: 400px; height: 32px;\" ");a.append("                                    ></textarea><span ");a.append("                                        class=\"form-ddl-bt\" onclick=\"javascript:$(this).prev().click();\"></span></div>");a.append("                            <input id=\"d2273_SendDeptIds_hid\" type=\"hidden\" entid=\"2273\" isfield=\"1\"  fieldname=\"SendDeptIds\"  /></span> ");a.append("                    </div>");a.append("                </li>");a.append("                <li class=\"li-area  h55\" >");a.append("                    <label class=\"area-title pad126\"  style=\"width:81px;font-size: 13px;padding-top:10px;\">");a.append("                        请选择角色</label>");a.append("                    <div class=\"field-content pad17\">");a.append("                        ");a.append("                            <div id=\"d2273_SendRoleIds\" class=\"form-ddl\" isforfield=\"1\" entid=\"2273\"");a.append("                                fid=\"3\" vtp=\"5\" rid=\"2\" isc=\"0\" cid=\"40\" fieldname=\"SendRoleIds\">");a.append("                                <textarea readonly id=\"d2273_SendRoleIds_Text\" class=\"form-ddl-txts\" fid=\"3\" style=\"width: 400px; height: 32px;\" ");a.append("                                  ></textarea><span ");a.append("                                        class=\"form-ddl-bt\" onclick=\"javascript:$(this).prev().click();\"></span></div>");a.append("                            <input id=\"d2273_SendRoleIds_hid\" type=\"hidden\" entid=\"2273\" isfield=\"1\" fieldname=\"SendRoleIds\" fid=\"3\" />");a.append("                    </div>");a.append("                </li>");a.append("                <li class=\"li-area  h55\" >");a.append("                    <label class=\"area-title pad126\"  style=\"width:81px;font-size: 13px;padding-top:10px;\">");a.append("                        请选择用户</label>");a.append("                    <div class=\"field-content pad17\">");a.append("                        ");a.append("                            <div id=\"d2273_SendUserIds\" class=\"form-ddl\" isforfield=\"1\" entid=\"2273\"");a.append("                                fid=\"7\" fieldname=\"SendUserIds\">");a.append("                                <textarea readonly id=\"d2273_SendUserIds_Text\" class=\"form-ddl-txts\" fid=\"7\" style=\"width: 400px; height: 32px;\" ");a.append("                                 ></textarea><span ");a.append("                                        class=\"form-ddl-bt\" onclick=\"javascript:$(this).prev().click();\"></span></div>");a.append("                            <input id=\"d2273_SendUserIds_hid\" type=\"hidden\" entid=\"2273\" isfield=\"1\" fieldname=\"SendUserIds\" fid=\"7\"/> ");a.append("                    </div>");a.append("                </li>");a.append("                <li  class=\"li-area  h32\" >");a.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");a.append("                        其他对象</label>");a.append("                    <div class=\"field-content pad17\">");a.append("                        ");a.append("                            <div class=\"form-radio\"  style=\"float:left;clear:none;\">");a.append("                                <span class=\"form-radio-item\">");a.append("                                    <input id=\"d2273_SendToAll\" type=\"checkbox\" class=\"form-ckb\"");a.append("                                       /><label for=\"d2273_SendToAll\">发给整个公司</label></span></div>");a.append("                        ");a.append("                            <div class=\"form-radio\"  style=\"float:left;clear:none;\">");a.append("                                <span class=\"form-radio-item\">");a.append("                                    <input id=\"d2273_SendToMyDept\" type=\"checkbox\" class=\"form-ckb\"");a.append("                                       /><label for=\"d2273_SendToMyDept\">发给我的部门</label></span></div>");a.append("                        ");a.append("                            <div class=\"form-radio\"  style=\"float:left;clear:none;\">");a.append("                                <span class=\"form-radio-item\">");a.append("                                    <input id=\"d2273_SendToMySelf\"  type=\"checkbox\" class=\"form-ckb\"");a.append("                                      /><label for=\"d2273_SendToMySelf\">发给我自己</label></span></div>");a.append("                        ");a.append("                    </div>");a.append("                </li>");a.append("                <li class=\"li-area  h32\" style=\"display:none;\">");a.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");a.append("                        同时发送</label>");a.append("                    <div class=\"field-content pad17\">");a.append("                        ");a.append("                            <div id=\"d2273_SendOtherMsg\" class=\"form-radio\" >");a.append("                                <span class=\"form-radio-item\">");a.append("                                    <input id=\"d2273_0\" name=\"d2273_g\" type=\"checkbox\"");a.append("                                        text=\"手机短信\" value=\"1\" /><label  for=\"d2273_0\">手机短信</label></span>");a.append("                                <span class=\"form-radio-item\">");a.append("                                    <input id=\"d2273_1\" name=\"d2273_g\" type=\"checkbox\"");a.append("                                        text=\"外部邮件\" value=\"2\" /><label  for=\"d2273_1\">外部邮件</label></span>");a.append("                            </div>");a.append("                        </span>");a.append("                    </div>");a.append("                </li>");a.append("              ");a.append("            </ul>");a.append("        </div>");a.append("    </div>");a.append("</div>");a.append("<div id=\"DefaultF_2273_Dropdown\" dropdown=\"1\" entid=\"2273\">");a.append("    <div id=\"VL_DefaultF_2273_Dropdown\" dropdown=\"1\" entid=\"2273\">");a.append("    </div>");a.append("</div>");a.append("</div>");return a.toString()}
function npz(d,e){d=parseInt(d,10);var f=col(d,e);var g=f.MEntId;var h=null;var f=col(d,e);h=f.$form;if(h==null){alert("获取表单的HTML对象失败。请确认代码正确。");return false}
var j=yci(d,e);var k=zuk(h,false,d,e,true,g,j,false);if(!k)return false;var i=0;for(key in f){if(key.indexOf("E")<0)continue;var l=f[key];if(l.EntId==d||ymr(l.EntId))continue;i++;var m=l.EntId;var n=l.$listContainer;if(n!=null){var o=yci(m,e);n.children().each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;var c=1;if(b==2)c=1;else if(b==3){c=2}else if(b==5){c=3;return true}else return true;k=zuk(a,true,m,e,true,d,o,false);if(!k)return false});if(!k)return false}}
return k}
function zuk(d,e,f,g,h,i,j,k){var l=true;if(ymr(j))j=yci(f,g);if(ymr(i))i=ntt(f,g);var m="IsPost=1";if(k==true)m="IsField=1";d.find("input[EntId="+f+"]["+m+"]").each(function(){var a=$(this);var b="";var c=a.attr("type").toLowerCase();if(c[0]=='c'){if(a.attr("checked"))b=a.attr("yesv");else b=a.attr("nov");if(b=="")b=true;else if(b=="true")b=true;else if(b=="false")b=false}else if(c[0]=='f')b="vl_isfile";else b=a.val();try{b=hdy(b,a.attr("rdt"))}catch(err){alert("字段 "+FieldName+" 数据类型有误。详情："+err)}
l=nws(this,f,g,i,e,b,d,j,false,true);if(!l){return false}});if(!l)return l;d.find("select[EntId="+f+"]").filter("["+m+"]").each(function(){var a=$(this);var b=a.val();b=hdy(b,a.attr("rdt"));l=nws(this,f,g,i,e,b,d,j,false,true);if(!l)return false});if(!l)return l;d.find("textarea[EntId="+f+"]").filter("["+m+"]").each(function(){var a=$(this);var b=a.val();b=hdy(b,a.attr("rdt"));l=nws(this,f,g,i,e,b,d,j,false,true);if(!l)return false});if(!l)return l;d.find("span[EntId="+f+"]").filter("["+m+"]").each(function(){var a=$(this);var b=a.html();b=hdy(b,a.attr("rdt"));l=nws(this,f,g,i,e,b,d,j,false,true);if(!l)return false});if(!l)return l;d.find("div[EntId="+f+"]["+m+"]").each(function(){var a=$(this);var b="";var c=a.attr("FieldName");if($(this).attr('Type')=='1'){b="";$(this).find("input").filter(":radio").filter(":checked").each(function(){b=this.value})}else if($(this).attr('Type')=='2'){b="";$(this).find("input").filter(":checkbox").filter(":checked").each(function(){b=b+this.value+","})}
b=hdy(b,a.attr("rdt"));if(h==true){l=nws(this,f,g,i,e,b,d,j,false,true);if(!l)return false}});if(!l)return l;return l}
DcxVld.ValidateTotalForm=npz;function maw(a){a.removeClass("form-txt-err");var b=wuh(a);b.hide()}
DcxVld.StopValidate=maw;function yqh(a,b,c,d,e,f,g){var h=$(a);if(ymr(g)||g.length<1)g=wuh(h);if(g==null)return true;if(h.attr("ValIsOk")=="1"&&h.attr("mustShow")!="1")return true;var j=parseInt(h.attr("fid"),10);var k=col(b,c);var l=k.Validate;var m=kow(d,b,j,c,l);if(ymr(m)||m.Vld.length<1)return true;var n=null;var o=null;if(ymr(f))o=erf(h);else o=f;var p=h.hasClass("form-ddl-txt");if(!p)p=h.hasClass("form-ddl-txts");for(var i=0;i<m.Vld.length;i++){var n=m.Vld[i];g.hide();if(e){if(!p)h.removeClass("form-lstxt-err").removeClass("form-lstxt-warn")}else if(!p)h.removeClass("form-txt-err").addClass("form-txt-warn");if(!ymr(n.warn)&&!e){var q=h.width();var r=xfx(h.get(0),"Left")+q+18;var s=xfx(h.get(0),"Top");if(p)r=r+20;g.attr("title","点击关闭").html("<div class=\"form-vld-warn\"><span class=\"action_po\"><span class=\"action_po_top\">"+n.warn+"</span><span class=\"action_po_bot\"></span></span></div>").css("position","absolute").css("left",r+"px").css("top",s+"px").show();g.unbind("click").click(function(){$(this).html("").hide()});break}}
return}
DcxVld.ValidateFocus=yqh;function nws(f,g,h,j,k,l,m,n,o,p,q){var r=$(f);var s=parseInt(r.attr("rid"),10);var t=parseInt(r.attr("isField"),10);if(t==1)t=true;else t=false;var u=false;if($.trim(h).toLowerCase()=="searchf_")u=true;if(k){r.removeClass("form-lstxt-warn");var v=r.attr("class");if(!ymr(v)){if(v.indexOf("lt2-txt")>=0)v=v.replaceAll("lt2-txt","lt-txt");if(v.indexOf("ddl2-txt")>=0)v=v.replaceAll("ddl2-txt","ddl-txt");r.attr("class",v)}}else r.removeClass("form-txt-warn");if(ymr(q)||q.length<1)q=wuh(r);if(q==null)return true;if(k!=true){q.html("");r.removeClass("form-txt-err form-txt-ok form-txt-warn")}
var w=parseInt(r.attr("fid"),10);var x=null;var y=col(j,h);x=y.Validate;var z=kow(j,g,w,h,x);if(ymr(z)||z.Vld.length<1)return true;var A=null;var B=null;if(!t){var C=wyb(r,null);if(s==2||s==10)B=C.val();else B=erf(r,false)}else{if(l==undefined||l==null){B=erf(r)}else B=l}
var D=true;var E=-1;for(var i=0;i<z.Vld.length;i++){var A=z.Vld[i];var F=A.vlId;var G=A.cdn;var H=true;var I=true;if(!ymr(G)){if(ymr(m)){if(k)m=mwu(f,g,h);else m=yvm(g,h)}
H=xno(G,-1,g,h,m,k,B)}
if(H==false)continue;if(F==1){if(u){D=true;continue}
if(ymr(B))D=false;else D=true;if(k){if(ymr(m)){m=mwu(f,g,h)}
E=m.attr("rowix")}
if(!D||i==z.Vld.length-1){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I)}}else if(F==2){var J=r.attr("FieldName");var K=r.attr("rdt");if(ymr(K)||ymr(J)){var L=r.next();var M=0;while(!ymr(L)&&L.length>0&&M<15){if(L.attr("isfield")!=undefined){J=L.attr("FieldName");K=L.attr("rdt");break}
M++}}
if(!ymr(K))K=parseInt(K,10);else K=2;if(ymr(m)){if(k)m=mwu(f,g,h);else m=yvm(g,h)}
if(k){E=m.attr("rowix")}
B=zcs(B,K);if(!ymr(B)){var N=xno(A.compV,K,g,h,m,k,B);if(!ymr(N)){var O=parseInt(A.compT,10);D=lhd(B,N,O);if(!D||i==z.Vld.length-1){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I,u)}}}}else if(F==3){var J=r.attr("FieldName");var K=r.attr("rdt");if(ymr(K)||ymr(J)){var L=r.next();var M=0;while(!ymr(L)&&L.length>0&&M<15){if(L.attr("isfield")!=undefined){J=L.attr("FieldName");K=L.attr("rdt");break}
M++}}
if(!ymr(K))K=parseInt(K,10);else K=2;if(ymr(m)){if(k)m=mwu(f,g,h);else m=yvm(g,h)}
if(k){E=m.attr("rowix")}
B=zcs(B,K);if(!ymr(B)){var N=xno(A.minV,K,g,h,m,k,B);if(!ymr(N)){var O=4;D=lhd(B,N,O);if(!D){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I,u)}}
if(D){N=xno(A.maxV,K,g,h,m,k,B);if(!ymr(N)){var O=6;D=lhd(B,N,O);if(!D||i==z.Vld.length-1){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I,u)}}}}}else if(F==4){if(!ymr(B)){if(k){if(ymr(m)){m=mwu(f,g,h)}
E=m.attr("rowix")}
D=(new RegExp(A.rExp,"i")).test(B);if(!D||i==z.Vld.length-1){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I,u)}}}else if(F==5){if(u){continue}
if(!ymr(B)){if(ymr(n)){n=yci(g,h)}
if(k&&!ymr(n)){if(ymr(m)){if(k)m=mwu(f,g,h);else m=yvm(g,h)}
n.OperateType=vnn(m);if(n.OperateType==2){n.KeyFieldValue=m.find("input:hidden").filter("[KeyField=1]").val()}else n.KeyFieldValue=""}else if(!ymr(n)){n.KeyFieldValue=n.MKeyFieldValue}
var P=0;if(k){var Q=parseInt(r.attr("EntId"),10);var R=Q+"_"+r.attr("FieldName")+"from_tr";var J=r.attr("FieldName");var S=xri(g,h);if(!ymr(S)){S.children().each(function(){var a=$(this);var b=$.trim(a.attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;if(b!=1&&b!=2&&b!=3)return true;var c=a.attr("rowix");var d=null;var d=fob(g,h,J,a,true,false);if(d==B){P++;if(P>1)return false}});if(P>1){D=false;if(!D||i==z.Vld.length-1){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I)}}}}
if(!ymr(n)&&A.ovt!=2&&P<2){if(ymr(o))o=true;var T=i;var U=z.Vld.length-1;var V=false;var W=f;var X=g;var Y=m;var Z=A.err;var ba=A.ok;var bb=E;var bc=k;var bd=q;var be=r;var bf="EntId="+g+"&tn="+n.TableName+"&fn="+r.attr("fieldname")+"&fnv="+B+"&dtid="+r.attr("dType")+"&opt="+n.OperateType+"&DbConnectId="+Dcx.GetUPCId()+"&kf="+n.KeyField+"&kfv="+n.KeyFieldValue+"&kdtid="+n.KeydtId;var bg="";$.ajax({type:"GET",url:"/Ajax/form/Ajax_CheckExist.aspx",dataType:"text",async:o,data:""+bf+"",beforeSend:function(a){var b=r.width();var c=r.position().left+b+10;var d=r.position().top;bd.attr("title","点击关闭").html("<div class=\"form-vld-warn\"><span class=\"action_po\"><span class=\"action_po_top\">正在验证...</span><span class=\"action_po_bot\"></span></span></div>").css("position","absolute").css("left",c+"px").css("top",d+"px").show();bd.unbind("click").click(function(){$(this).html("").hide()})},success:function(a){if(!D)return true;bd.html("").hide();try{var b=JSON2.parse(a);V=b.OK;D=V;if(bc){if(ymr(Y)){Y=mwu(W,X,h);m=Y}
bb=Y.attr("rowix");E=bb}
if(!V||T==U){I=yjl(r,D,bc,p);var c=V?ba:Z;if(b.reId<0)c=b.err;mda(be,bd,V,c,bc,bb,I)}}catch(e){art.VLdialog.alert(a,function(){},8,"提示")}},complete:function(a,b){},error:function(a){alert("验证时有误，提交失败！详情："+JSON2.stringify(a));D=false;bd.html("").hide()}})}}}else if(F==6){if(!ymr(B)&&!ymr(A.jsFun)){if(k){if(ymr(m)){m=mwu(f,g,h)}
E=m.attr("rowix")}
var bh=A.jsFun.replaceAll("{value}",B);try{bh=xno(bh,2,g,h,m,k,B);D=eval(bh)}catch(err){D=false;alert("验证JS函数时出错。详细："+err)}
if(!D||i==z.Vld.length-1){I=yjl(r,D,k,p);mda(r,q,D,(D?A.ok:A.err),k,E,I,u)}}}
if(!D){break}}
return D}
DcxVld.Validate=nws;function zcs(a,b){if(!ymr(a)){if(b==1){var N=isNaN(a+"");if(!N)a=parseInt(a,10);else a=null}else if(b==5){a=a.valplaceAll(",","");var N=isNaN(a);if(!N)a=dev(a,3);else a=null}else if(b==3){var c=qucTime(a);if(!c)c=quc(a);if(c)a=new Date(Date.parse(a.replace(/-/g,"/")));else a=null}else if(b==4){if(a=="1"||a=="true")a=true;else a=false}}
return a}
DcxVld.DealWithValueType=zcs;function lhd(a,b,c){var d=false;try{switch(c){case 1:if(a==b){d=true}else{d=false}
break;case 2:if(a!=b){d=true}else{d=false}
break;case 3:if(a>b){d=true}else{d=false}
break;case 4:if(a>=b){d=true}else{d=false}
break;case 5:if(a<b){d=true}else{d=false}
break;case 6:if(a<=b){d=true}else{d=false}
break;case 7:if(a.indexOf(b)>=0){d=true}else{d=false}
break;case 8:if(a.indexOf(b)<0){d=true}else{d=false}
break;case 9:if(a.indexOf(b)==0){d=true}else{d=false}
break;case 10:if(a.indexOf(b)==(a.length-b.length-1)){d=true}else{d=false}
break}}catch(err){d=false}
return d}
DcxVld.CompareValue=lhd;function xno(a,b,c,d,f,g,h){var j=h;if(h==true)j='true';else if(h==false)j='false';a=a.replaceAll("{value}",j);var k=a.indexOf("{@");var l=-1;var i=0;var x=c;var y=d;var z=f;var w=g;var u=b;while(k>=0&&i<20){k=k+2;l=a.indexOf("}",k);if(k<l){var m=$.trim(a.substr(k,l-k));a=a.replaceAll("{@"+m+"}","DcxForm.MakNumOk(DcxForm.GetCtrlValueByFieldName(x,y,'"+m+"',z,w),u)");k=a.indexOf("{@")}else break;i++}
var n=null;try{n=eval(a)}catch(e){n=null}
if(!ymr(n)){if(n==true||n==false)return n;n=hdy(n);n=zcs(n,b);return n}
return n}
DcxVld.DealWithValue=xno;function xfx(a,b){var c=0;while(a!=null){c+=a["offset"+b];a=a.offsetParent}
return c}
function mda(a,b,c,d,e,f,g,h){var i=a.hasClass("form-ddl-txt");if(!i)i=a.hasClass("form-ddl-txts");var j=parseInt(a.attr("cid"),10);var k=a.width();var l=xfx(a.get(0),"Left")+k+18;if(a.attr("cid")=="13")l=l+a.parent().width()-k;if(j==45)l=l+100;var m=xfx(a.get(0),"Top");if(a.css("display").toLowerCase()=="none"){var n=a.prev();if(ymr(n)||n.length<1)n=a.parent();k=n.width();l=xfx(n.get(0),"Left")+k+18;m=xfx(n.get(0),"Top")}
if(c)m=m+3;if(i)l=l+20;a.attr("ValIsOk",(c?"1":"0"));if(e){b.html("").hide();if(!c&&g!=false){b.attr("title","点击关闭").html("<div class=\"form-vld-err\"><span class=\"action_po\"><span class=\"action_po_top\">"+d+"</span><span class=\"action_po_bot\"></span></span></div>").css("position","absolute").css("left",l+"px").css("top",m+"px").show()}
if(a.attr("tagName").toLowerCase()=="input"&&a.attr("type").toLowerCase()=="text"){a.removeClass("form-lstxt-err").removeClass("form-lstxt-warn");if(!a.hasClass("lt-ddl-txt")){if(c)a.removeClass("form-lstxt-err").removeClass("form-lstxt-warn");else a.removeClass("form-lstxt-warn").addClass("form-lstxt-err")}}}else{if(c){if(h!=true)b.attr("title","点击关闭").html("<div class=\"form-vld-ok\"></div>").css("position","absolute").css("left",(l-4)+"px").css("top",m+"px").show()}else{b.attr("title","点击关闭").html("<div class=\"form-vld-err\"><span class=\"action_po\"><span class=\"action_po_top\">"+d+"</span><span class=\"action_po_bot\"></span></span></div>").css("position","absolute").css("left",l+"px").css("top",m+"px").show();b.show()}
if(a.attr("tagName").toLowerCase()=="input"&&a.attr("type").toLowerCase()=="text"){if(!a.hasClass("form-ddl-txt")&&!a.hasClass("form-ddl-txts")){if(c)a.removeClass("form-txt-err").removeClass("form-txt-warn");else a.removeClass("form-txt-warn").addClass("form-txt-err")}}}
b.unbind("click").click(function(){$(this).html("").hide()})}
DcxVld.ShowValidateResult=mda;function yjl(a,b,c,d){var e=true;if(d==true)return e;if(!b&&c){if(a.attr("IsWrong")=="1")e=false;else a.attr("IsWrong","1")}else if(c){a.removeAttr("IsWrong")}
return e}
DcxVld.yjl=yjl;function kow(a,b,c,d,e){if(ymr(a)){a=ntt(b,d)}
if(ymr(e)){var f=col(b,d);e=f.Validate}
if(ymr(e)){return null}
var g=null;for(var i=0;i<e.Ent.length;i++){if(e.Ent[i].EntId==b){g=e.Ent[i];break}}
if(ymr(g)){return null}
var h=null;for(var i=0;i<g.Fld.length;i++){if(g.Fld[i].FldId==c){h=g.Fld[i];break}}
if(ymr(h)){return null}
return h}
DcxVld.nzjVlds=kow;function wuh(a){var b=a.parent();var c=false;var i=0;while(!ymr(b)&&b.length>0&&i<15){if(b.hasClass("form-ctr")){c=true;break}else{b=b.parent()}
i++}
if(!c)return null;var d=b.next();c=false;i=0;while(!ymr(d)&&d.length>0&&i<15){if(d.attr("iserr")=="1"){c=true;break}else{d=d.next()}
i++}
if(c)return d;else{var e=$("<div class=\"form-vld\" iserr=\"1\" title=\"点击关闭\" ></div>");b.after(e);return e}
return null}
DcxVld.wuh=wuh;function xqs(a){var b="";switch(a){case"ListR_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"MChildR_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"TitleL_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"BlockL_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"SummaryL_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"ListF_":b="/WebServices/Form/FormHelp.asmx/GetListForm_DataJson";break;case"ImgSummyL_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"DefaultR_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"CrossR_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"GroupI_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;case"GroupR_":b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break;default:b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";break}
return b}
DcxSch.xqs=xqs;function Ajax_GetChildListReport(a,b,c,d){}
DcxSch.AjaxGetChildListReport=Ajax_GetChildListReport;function vbp(a,b,c){var d=xqs(b);isw(a,b,"a",-1,d,c)}
DcxSch.SearchByOtherCondition=vbp;function kha(a,b,c,d,e,f){var g=xqs(b);var h=new Array();var i={Relation:null,FieldName:c,Value:d,DataTypeId:e,Length:20,CompareType:f};if(ymr(i.DataTypeId))i.DataTypeId=2;if(ymr(i.CompareType)){if(e==2)i.CompareType="LIKE";else i.CompareType="="}
if(ymr(i.Value)||ymr(i.FieldName))i=null;else h.push(i);isw(a,b,"a",-1,g,null,null,null,h)}
DcxSch.SearchByOneCondition=kha;function wml(a,b,c,d,e){var f=xqs(b);isw(a,b,"a",-1,f,c,d,e)}
DcxSch.SearchByView=wml;function isw(j,k,l,m,n,o,p,q,r){if(n==undefined){ujh(j,k,l,m)}else{if(ymr(r))r=new Array();var s=las(k);var t=null;try{if(s!=13)t=ker(j,k);else t=col(j,k)}catch(err){t=col(j,k)}
if(ymr(t)){art.VLdialog.alert("无法获取报表信息",110.6);return}
var u=t.EntMsg["E"+j];var v=t.EntMsg["E"+j];if(ymr(u)){art.VLdialog.alert("无法获取报表信息",110.6);return}
var w=u.EntName;var x=u.PageSize;if(isNaN(x)||x==undefined||x==""||x<0)x=10;var y=u.FlowId;if(ymr(y))y=-1;var z=u.CondLT;var A=u.OCon;if(!ymr(o)){if(A!=undefined&&A!="")A=A+" and "+o;else A=o}
var B=t.MKeyFieldValue;var C=u.ViewOptionIds;if(ymr(C))C="";if(!ymr(q)){C=q;u.ViewOptionIds=C}
var D="Next";if(isNaN(x)||ymr(x)||x<1){x=10;u.PageSize=PageSizePageSize}
if(!isNaN($.trim(m))&&!ymr(m))m=parseInt($.trim(m),10);else m=-1;if(ymr(m)||isNaN(m)||m<1){var E=parseInt(u.RecortCount/u.PageSize,10)+(u.RecortCount%x>0?1:0);m=u.CurPageIndex;if(ymr(m)||isNaN(m)){m=1}
l=$.trim(l.toLowerCase());if(l=='h')temp_CurrentPage=1;else if(l=='t'){m=E}else if(l=='p'){if(m>1)m--}else if(l=='n'){if(m<E)m++}else m=1}
var F={};F.SqlParamList=gzb(j);if(ymr(F.SqlParamList)){F.SqlParamList=new Array()}
var G=null;if(ymr(z))z="";if(ymr(A))A="";if(ymr(B))B="";if(ymr(D))D="";F["EntId"]=j;F["MKeyFieldValue"]=B;F["KeyFieldName"]=u.KeyField;F["KeyFieldValue"]=u.KeyFieldValue;F["ViewOptionIds"]=C;F["ConditionFromLeftTree"]=z;F["OtherCondition"]=A;F["PageSize"]=x;F["CurrentPage"]=m;F["CheckPower"]=false;F["CtrlPrex"]=k;for(var i=0;i<r.length;i++){F.SqlParamList.push(r[i])}
var H=Dcx.GetUPCId();F.DbConnectId=H;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:n,data:"{sqlCdtn:"+JSON2.stringify(F)+",TypeId:"+s+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){if(!ymr(a.readyState)){alert("读取数据失败。详情："+JSON2.stringify(a))}else alert("读取数据失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){alert("读取数据失败！");return false}
if(!ymr(a.ErrObj)&&!a.ErrObj.IsOK){alert(a.ErrObj.ErrorMsg);return false}
if(s!=13&&!ymr(a.StrValue)&&a.StrValue.length>0){var b=xch(j,k);b.html(a.StrValue[0]);if(!ymr(a.IntValue)&&a.IntValue.length>0){u.RecortCount=a.IntValue[0];if(a.IntValue.length>1)u.CurRecortCount=a.IntValue[1]}
var c=true;try{u.CurPageIndex=m;onh(j,k)}catch(err){c=false}
if(!c){try{t.SetReportPage()}catch(err){}}
ReportFieldDeal(j,k,true);try{var d=tzm("thisisselector");if(!ymr(d)&&!isNaN(d))d=parseInt(d,10);else d=-1;if(d==1){var e=b.children();e.removeAttr("onclick").removeAttr("onmouseover").css("cursor","pointer");e.unbind("click").bind("click",function(){art.VLdialog.parent.grr($(this),null)})}}catch(err){}
art.VLdialog.tips("加载完成",0.6)}else if(s==13&&!ymr(a.StrValue)&&a.StrValue.length>0){var f=a.StrValue[0];var g=v.FormData;if(!ymr(g))g=eval("("+f+")");var h=v.$formContainer;nhp(j,k,g,h);if(!ymr(a.IntValue)&&a.IntValue.length>0){u.RecortCount=a.IntValue[0];if(a.IntValue.length>1)u.CurRecortCount=a.IntValue[1]}
u.CurPageIndex=m;onh(j,k);art.VLdialog.tips("加载完成",0.6)}else{alert("读取数据失败。原因未知！");return false}
try{u.AfterSearch()}catch(err){}}})}}
DcxSch.GetHtml2=isw;function ujh(a,b,c,d,e){if(ymr(b)){b=wwk(a)}
if(ymr(e)){e=xqs(b)}
if(!ymr(d)&&typeof d=="object")d=parseInt($(d).val(),10);if(ymr(d)||isNaN(d))d=-1;isw(a,b,c,d,e)}
DcxSch.GetHtml=ujh;function wwk(a){var b="ListR_";var c=DcxRun[b+a];if(c==undefined||c==null)c=DcxRun["TitleL_"+a];else return"ListR_";if(c==undefined||c==null)c=DcxRun["BlockL_"+a];else return"TitleL_";if(c==undefined||c==null)c=DcxRun["SummaryL_"+a];else return"BlockL_";if(c==undefined||c==null)c=DcxRun["ImgSummyL_"+a];else return"SummaryL_";if(c==undefined||c==null)c=DcxRun["ListF_"+a];else return"ImgSummyL_";if(c==undefined||c==null)c=DcxRun["MChildR_"+a];else return"ListF_";if(c==undefined||c==null)c=DcxRun["DefaultR_"+a];else return"MChildR_";return"DefaultR_"}
function Dcx_Search(a,b){if(ymr(b)){b=wwk(a)}
switch(b){case"ListR_":Search_ListReport(a);break;case"MChildR_":utp(a);break;case"TitleL_":Search_TitleReport(a);break;case"BlockL_":smi(a);break;case"SummaryL_":txe(a);break;case"ListF_":foe(a);break;case"ImgSummyL_":hst(a);break;case"DefaultR_":jot(a);break;case"CrossR_":ubl(a);break;case"GroupI_":iva(a);break;case"GroupR_":tfp(a);break;default:Search_ListReport(a);break}}
DcxSch.Search=Dcx_Search;function jot(a){var b="DefaultR_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchDefaultReport=jot;function Search_ListReport(a){var b="ListR_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchListReport=Search_ListReport;function Search_ListReport2(a){var b="ListR_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchListReport2=Search_ListReport2;function tfp(a){var b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";var c="GroupR_";ujh(a,c,'s',0,b)}
DcxSch.SearchGroupReport=tfp;function iva(a){var b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";var c="GroupI_";ujh(a,c,'s',0,b)}
DcxSch.SearchGroupIFReport=iva;function ubl(a){var b="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";var c="CrossR_";ujh(a,c,'s',0,b)}
DcxSch.SearchCrossReport=ubl;function ghx(a){var b="TitleL_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchTitleList=ghx;function smi(a){var b="BlockL_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchBlockList=smi;function hst(a){var b="ImgSummyL_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchImgSummyList=hst;function txe(a){var b="SummaryL_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchSummaryList=txe;function foe(a){var b="ListF_";var c="/WebServices/Form/FormHelp.asmx/GetListForm_DataJson";ujh(a,b,'s',0,c)}
DcxSch.SearchListForm=foe;function utp(a){var b="MChildR_";var c="/WebServices/Report/ReportHelp.asmx/GetListPartHtml";ujh(a,b,'s',0,c)}
DcxSch.SearchMCReport=utp;function gzb(a){var b="SearchF_";var c=yci(a,b);var d=null;var e=col(a,b);try{d=e.$form}catch(err){return null}
if(ymr(d))d=$("#div_"+b+a);if(d==null){return null}
var f=sme(d,false,a,b,true,a,c,true,true,null,1,true);if(ymr(f)||f==false){return null}
var g=new nzy();var h=0;var i=new Array();for(var j in f){var k=parseInt(f["SearchFormDataType"][j],10);if(isNaN(k))continue;if(typeof f[j]=="object"){if(k!=3)continue;else f[j]=dpq(f[j])}
if(ymr($.trim(f[j])))continue;var l=$.trim(f[j]);if(l=="true")l="1";else if(l=="false")l="0";var m=f["SearchFormComPre"][j];var n=f["SearchFormFieldName"][j];var o=parseInt(f["SearchFormfny"][j],10);if(o==1)o=true;else o=false;var p={Relation:null,FieldName:n,Value:l,DataTypeId:k,CompareType:m,Length:20,IsSqlCondField:o};i.push(p);if(h==0)h=1;else p.Relation="and"}
return i}
DcxSch.gzb=gzb;function sfm(a){var b="SearchF_";var c=yci(a,b);var d=null;var e=col(a,b);d=e.$form;if(ymr(d))d=$("#div_"+b+a);if(d==null){return""}
var f=sme(d,false,a,b,true,a,c,true,true);if(ymr(f)||f==false){return""}
var g=new nzy();var h=0;for(var i in f){if(typeof f[i]=="object")continue;if(ymr($.trim(f[i])))continue;var j=$.trim(f[i]);var k=f["SearchFormComPre"][i];var l=parseInt(f["SearchFormDataType"][i],10);var m="["+$.trim(i)+"]";var n=ekx(m,k,j,l);if(h==0){h=1;g.append(n)}else g.append(" and "+n)}
return g.toString()}
DcxSch.sfm=sfm;function ekx(a,b,c,d){if(c=="")return"";var e="";var f="'";switch(d){case 1:case 4:break;f="";default:break}
switch(b){case"Like":case"Not Like":e=a+" "+b+" '%"+c+"%'";break;case"=":e=a+" "+b+f+c+f;break;case"<>":e=a+" "+b+f+c+f;break;case"<=":e=a+" "+b+f+c+f;break;case">=":e=a+" "+b+f+c+f;break;case"Like%":e=a+" "+" Like '"+c+"%'";break;case"Like%%":e=a+" "+" Like '%"+c+"'";break;case"In":case"Not In":e=a+" "+b+" ("+c+")";break;case"Is Null":case"Is Not Null":e=a+" "+b;break;default:e=a+" "+b+"  "+f+c+f;break}
return e}
DcxSch.ekx=ekx;function ggt(a,b){var c=ntt(a,b);var d=col(a,b);var e=d.EntMsg["E"+a].GetSubmitModel();if(e==null){alert("获取主体的JSON对象失败。请确认代码正确。");return null}
var f=d.EntMsg["E"+a];var g="";var h=1;var i=0;if(!ymr(a))e.Header.EntId=a;else e.Header.EntId=-1;e.Header.OpType=d.OperateType;e.Header.IsMEnt=f.IsMEnt;e.Header.DataTypeId=f.KeydtId;if(c==a){e.Header.MKeyValue=d.MKeyFieldValue;e.Header.MKeyField=f.KeyField}
e.Header.TableName=f.DBTableName;e.Header.KeyField=f.KeyField;e.Header.InsertTrigger=f.InsertTrigger;e.Header.UpdateTrigger=f.UpdateTrigger;e.Header.DeleteTrigger=f.DeleteTrigger;e.Header.TotalRows=h;var j=Dcx.GetUPCId();e.Header.DbConnectId=j;return e}
DcxForm.GetEntityMsg=ggt;function tum(a,b,c,d,e,f,g,h,i,j,k){var f=yci(a,b);var l=DcxForm.GetHtmlContainer(a,b);if(l==null){return null}
return sme(l,c,a,b,d,e,f,g,h,i,j,k)}
DcxForm.tum=tum;function sme(l,m,n,o,p,q,r,s,t,u,v,w){if(w!=true)w=false;var x="";var y=col(n,o);var z=y.EntMsg["E"+n].GetDataRowModel();var A=true;if(p==true){if(ymr(r))r=yci(n,o);if(ymr(q))q=ntt(n,o)}
var B="IsPost=1";if(s==true)B="IsField=1";if(t!=true)t=false;else{z["SearchFormComPre"]={};z["SearchFormDataType"]={};z["SearchFormFieldName"]={};z["SearchFormfny"]={}}
l.find("input[EntId="+n+"]["+B+"]").each(function(){var a=$(this);var b="";var c=a.attr("FieldName");x=w?a.attr("FId"):c;var d=a.attr("type").toLowerCase();var e=false;var f=null;if(d[0]=='c'){if(a.attr("checked"))b=a.attr("yesv");else b=a.attr("nov");if(b=="")b=true;else if(b=="true")b=true;else if(b=="false")b=false}else if(d[0]=='f'){b="vl_isfile";e=true;f=a}else{var g=parseInt(a.attr("cid"),10);if(g==43||g==33){var h=jpy(a);f=!ymr(h)&&h.length>0?h.find(":file"):null;e=true}
b=a.val()}
if(p==true){A=nws(this,n,o,q,m,b,l,r,false,true);if(!A){return false}}
try{b=tjj(b,a.attr("rdt"))}catch(err){alert("字段 "+c+" 数据类型有误。详情："+err)}
if(e&&!ymr(u)){var i=null;i=$.trim(a.attr("oldValue"));b=$.trim(b);if(b!=i&&!ymr(a.attr("ischange"))){var j=aww(b);var k={"FId":parseInt(a.attr("fid"),10),"FN":a.attr("fieldname"),"Value":b,"NewFile":j,"OldValue":i,"Obj":f};u.Items.push(k);b=j}}
if(!ymr(c))z[x]=b;if(t){z["SearchFormComPre"][x]=a.attr("Cpre");z["SearchFormDataType"][x]=a.attr("rdt");z["SearchFormFieldName"][x]=c;z["SearchFormfny"][x]=a.attr("isPost")}});if(p==true&&!A)return null;l.find("select[EntId="+n+"]").filter("["+B+"]").each(function(){var a=$(this);var b=a.val();var c=a.attr("FieldName");x=w?a.attr("FId"):c;if(p==true){A=nws(this,n,o,q,m,b,l,r,false,true);if(!A){return false}}
b=tjj(b,a.attr("rdt"));if(t){b=$.trim(a.text())?b:"";z["SearchFormComPre"][x]=a.attr("Cpre");z["SearchFormDataType"][x]=a.attr("rdt");z["SearchFormFieldName"][x]=c;z["SearchFormfny"][x]=a.attr("isPost")}
if(!ymr(c))z[x]=b});if(p==true&&!A)return null;l.find("textarea[EntId="+n+"]").filter("["+B+"]").each(function(){var a=$(this);var b=a.val();var c=a.attr("FieldName");x=w?a.attr("FId"):c;if(p==true){A=nws(this,n,o,q,m,b,l,r,false,true);if(!A){return false}}
b=tjj(b,a.attr("rdt"));var d=a.attr("cid");if(!isNaN(d))d=parseInt(d,10);else d=-1;if(d==22||d==23||d==28)b=akq(a.get(0),n,o,c,l,m);if(!ymr(c))z[x]=b;if(t){z["SearchFormComPre"][x]=a.attr("Cpre");z["SearchFormDataType"][x]=a.attr("rdt");z["SearchFormFieldName"][x]=c;z["SearchFormfny"][x]=a.attr("isPost")}});if(p==true&&!A)return null;l.find("div[EntId="+n+"]["+B+"]").each(function(){var a=$(this);var b="";var c=a.attr("FieldName");x=w?a.attr("FId"):c;if($(this).attr('Type')=='1'){b="";$(this).find("input").filter(":radio").filter(":checked").each(function(){b=this.value})}else if($(this).attr('Type')=='2'){b="";$(this).find("input").filter(":checkbox").filter(":checked").each(function(){b=b+this.value+","})}
if(p==true){A=nws(this,n,o,q,m,b,l,r,false,true);if(!A){return false}}
b=tjj(b,a.attr("rdt"));if(!ymr(c))z[x]=b;if(t){z["SearchFormComPre"][x]=a.attr("Cpre");z["SearchFormDataType"][x]=a.attr("rdt");z["SearchFormFieldName"][x]=c;z["SearchFormfny"][x]=a.attr("isPost")}});if(p==true&&!A)return null;return z}
DcxForm.GetAllCtrlValue=sme;function erf(a,b){var c=a;if(ymr(c)||c.length<1){return false}
if(b!=true)b=false;var d=c.attr("rdt");var e="";var f=c.attr("type");if(!ymr(f))f=f.toLowerCase();else f="";var g=parseInt(c.attr("rid"),10);if(g==2){if(b){return c.val()}
var h=c.next();var i=false;while(!ymr(h)&&h.length>0){if(h.attr("IsField")=="1"){i=true;break}else{h=h.next()}}
if(i){e=h.val();d=h.attr("rdt")}
return e}else if(g==10){if(b&&(parseInt(c.attr("cid"),10)==30||parseInt(c.attr("cid"),10)==50)){return lwa(c.get(0),parseInt(c.attr("EntId"),10),"AjaxF_",c.attr("FieldName"),null,false)}else{var j=wyb(c);return j.val()}}
var k=c.attr("tagName").toLowerCase();if(k=="input"){if(f[0]=='c'){if(c.attr("checked"))e=c.attr("yesv");else e=c.attr("nov");if(e=="")e=true;else if(e=="true")e=true;else if(e=="false")e=false}else if(f[0]=='f'){e=c.val()}else{e=c.val()}}else if(k=="select"){if(b)e=c.val();else e=c.find("option:selected").text()}else if(k=="div"){var l=c.attr("FieldName");if(c.attr('Type')=='1'){e="";c.find("input").filter(":radio").filter(":checked").each(function(){if(b)e=$(this).attr("text");else e=this.value})}else if(c.attr('Type')=='2'){e="";c.find("input").filter(":checkbox").filter(":checked").each(function(){if(b)e=e+$(this).attr("text")+",";else e=e+this.value+","})}}else if(k=="textarea"||k=="span"){e=c.val()}
return e}
DcxForm.GetCtrlValueByObj=erf;function txq(a,b){var c=$("#"+a);if(ymr(c)||c.length<1)return null;else return erf(c,b)}
DcxForm.GetCtrlValueById=txq;function fob(a,b,c,d,e,f){var g=ppq(null,a,b,c,d,e,null);if(!ymr(g))return erf(g,f);else return null}
DcxForm.GetCtrlValueByFieldName=fob;function rtm(a,b,c,d,e,f){var g=ppq(a,b,c,d,e,f,"input");if(!ymr(g))return g.val();else return""}
DcxForm.GetTxtValue=rtm;function dzx(a,b,c,d,e,f){var g=ppq(a,b,c,d,e,f,"textarea");if(!ymr(g))return g.val();else return""}
DcxForm.GetTxtsValue=dzx;function eku(a,b,c,d,e,f){var g=ppq(a,b,c,d,e,f,"input");if(!ymr(g))return g.val();else return""}
DcxForm.GetHiddenValue=eku;function qpf(a,b,c,d,e,f,g){var h=ppq(a,b,c,d,e,f,"select");if(!ymr(h)){if(g){var i=h.find("option:selected").text();if(!ymr(i))return i;else return""}else return h.val()}else return""}
DcxForm.GetDdlValue=qpf;function cgq(a,b,c,d,e,f){var g=null;if(ymr(a))g=ppq(null,b,c,d,e,f,"input");else g=$(a);if(ymr(g))return"";else return g.val()}
DcxForm.GetLabelValue=cgq;function rmq(a,b,c,d,e,f,g){var h=ppq(a,b,c,d,e,f,"input");return drb(h,g)}
DcxForm.GetCkbValue=rmq;function drb(a,b){var c="";if(a.attr("checked"))c=a.attr("yesv");else c=a.attr("nov");if(c=="")c=true;else if(c=="true")c=true;else if(c=="false")c=false;return c}
DcxForm.GetCkbValue2=drb;function pxm(a,b,c,d,e,f,g){var h=ppq(a,b,c,d,e,f,"div");if(g!=true)g=false;var i="";h.find("input").filter(":checkbox").filter(":checked").each(function(){if(g)i=i+$(this).attr("text")+",";else i=i+this.value+","});return i}
DcxForm.GetCkbListValue=pxm;function bcy(a,b,c,d,e,f,g){var h=ppq(a,b,c,d,e,f,"div");if(g!=true)g=false;var i="";h.find("input").filter(":radio").filter(":checked").each(function(){if(g)i=$(this).attr("text");else i=this.value});return i}
DcxForm.GetRadioListValue=bcy;function qtj(a,b,c,d,e,f,g,h){var i=null;if(h!=true)h=false;if(ymr(a))i=ppq(null,b,c,d,f,g,"input");else i=$(a).next();if(h){if(ymr(i))return"";else return i.prev().find("[fid]").val()}else{if(ymr(i))return"";else return i.val()}}
DcxForm.GetDdlValue=qtj;function cyu(a,b,c,d,e,f,g){if(g==true)return lwa(a,b,c,d,e,f);var h=null;if(ymr(a))h=ppq(null,b,c,d,e,f,"input");else if($(a).attr("IsField")!="1")h=$(a).next();else h=$(a);if(!ymr(h)&&h.length>0&&h.attr("IsField")=="1")return h.val();else{h=ppq(null,b,c,d,e,f,"input");if(ymr(h))return"";else return h.val()}}
DcxForm.GetLrListValue=cyu;function oef(a,b,c,d,e,f){var g=null;if(ymr(a))g=ppq(null,b,c,d,e,f,"input");else g=$(a).next();if(!ymr(g)&&g.length>0&&g.attr("IsField")=="1")return g.val();else{g=ppq(null,b,c,d,e,f,"input");if(ymr(g))return"";else return g.val()}}
DcxForm.GetUpLoadImgValue=oef;function akq(a,b,c,d,f,g){var h=null;if(ymr(a))h=ppq(null,b,c,d,f,g,"input");else h=$(a);if(ymr(h)||h.length<1)return"";try{var i=null;var j="obj=CKEDITOR.instances."+h.attr("id")+";";eval(j);if(!ymr(i))return i.getData()}catch(e){return""}
return""}
DcxForm.GetHtmlEditorValue=akq;function ppq(a,b,c,d,e,f,g){var h=null;if(ymr(a)){if(ymr(e)){if(f==true){var i=yut(b,c);if(ymr(i)||i<0)i=1;e=yvm(b,c);if(!ymr(e))e=e.children().filter("[rowix="+i+"]")}else e=yvm(b,c)}
if(!ymr(g))h=e.find(g).filter("[IsField=1][FieldName='"+d+"'][EntId="+b+"]");else h=e.find("[IsField=1][FieldName='"+d+"'][EntId="+b+"]")}else h=$(a);return h}
DcxForm.ppq=ppq;function bgc(c,d){var e=Dcx.GetUPCId();var f=null;var g="/WebServices/Form/Form_Run.asmx/owj";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,async:false,data:"{EntId:"+c+",CtrlPrex:\""+d+"\",\"dbConnectId\":"+e+"}",dataType:'json',success:function(a){a=hmy(a);var b=bke(c,d);b.DefaultFormData=a;f=a},beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))}});return f}
DcxForm.bgc=bgc;function nln(c,d){var e=Dcx.GetUPCId();var f=null;var g="/WebServices/Form/Form_Run.asmx/nln";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,async:false,data:"{EntId:"+c+",CtrlPrex:\""+d+"\",\"dbConnectId\":"+e+"}",dataType:'json',success:function(a){a=hmy(a);var b=bke(c,d);b.DefaultFormData=a;f=a},beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))}});return f}
DcxForm.GetDefaultDataDf2=nln;function zry(c,d,e,f){var g=Dcx.GetUPCId();var h=null;var i="/WebServices/Form/Form_Run.asmx/GetAjaxForm_DataJson";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:i,async:false,data:"{CurEntId:"+c+",MKeyFieldValue:\""+e+"\",CheckPower:false,\"dbConnectId\":"+g+"}",dataType:'json',success:function(a){a=hmy(a);if(!ymr(a))h=eval("("+a.StrValue[0]+")")},beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取表单数据失败。详情："+JSON2.stringify(a))}});return h}
DcxForm.GetDefaultDataAf=zry;function owj(c,d,e,f){var g=Dcx.GetUPCId();var h=null;var i="/WebServices/Form/Form_Run.asmx/GetDefaultForm_DataJson";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:i,async:false,data:"{CurEntId:"+c+",MKeyFieldValue:\""+e+"\",CheckPower:false,\"dbConnectId\":"+g+"}",dataType:'json',success:function(a){a=hmy(a);if(!ymr(a))h=eval("("+a.StrValue[0]+")")},beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取表单数据失败。详情："+JSON2.stringify(a))}});return h}
DcxForm.GetDefaultDataDf=owj;function acu(g,h,j){if(j!=true)j=false;var k=col(g,h);var l={FormData:[]};var m=ggt(g,h);l.FormData.push(m);var n=null;var k=col(g,h);n=k.$form;if(n==null){alert("获取表单的HTML对象失败。请确认代码正确。");return null}
var o=yci(g,h);var p=new Array();var q={EntId:g,RowIndex:1,Items:[]};q.Items=new Array();var r={};r["E"+g]={rows:[]};r["E"+g].rows=new Array();var s=dpq(new Date());var t=sme(n,false,g,h,true,g,o,false,false,q,m.Header.OpType);if(ymr(t)||t==false){art.VLdialog.alert("提交失败。您输入的数据有误。",function(){},2,"提示");return null}
var u=dpq(new Date());t.Dcx_Keymsg.KeyField=m.Header.MKeyField;t.Dcx_Keymsg.RowIx=1;t.Dcx_Keymsg.KeyFieldValue=m.Header.MKeyValue;t.Dcx_Keymsg.DataTypeId=m.Header.DataTypeId;t.Dcx_Keymsg.OpType=m.Header.OpType;r["E"+g].rows.push(t);var i=0;for(key in k.EntMsg){if(key.indexOf("E")<0)continue;var v=k.EntMsg[key];if(v.EntId==g||ymr(v.EntId))continue;i++;var w=v.EntId;var x=ggt(w,h);var y=v.$listContainer;if(y!=null){var z=yci(w,h);r["E"+w]={rows:[]};r["E"+w].rows=new Array();var A=0;var B="";var C=true;var D=1000;var E=null;if(j)E=y.children();else E=y.children("[state!=1]");E.each(function(){var a=$(this);var b=$.trim($(this).attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;var c=null;var d=1;if(b==1){if(j)d=4;else return true}else if(b==2){d=1}else if(b==3){d=2}else if(b==5){d=3;c=a.children(":last").find("input[KeyField=1]:hidden").val();B=B+c+"^";return true}else{return true}
if(c==null)c=a.children(":last").find("input[KeyField=1]:hidden").val();var e=sme(a,true,w,h,true,g,z,false,false,false,d);if(ymr(e)||e==false){C=false;art.VLdialog.alert("提交失败。您输入的数据有误。",function(){},2,"提示");return false}
e.Dcx_Keymsg.KeyField=x.Header.KeyField;e.Dcx_Keymsg.KeyFieldValue=c;e.Dcx_Keymsg.DataTypeId=x.Header.DataTypeId;e.Dcx_Keymsg.OpType=d;var f=a.attr("rowix");if(ymr(f)||isNaN(f)){D++;a.attr("rowix",D);f=D}else f=parseInt(f,10);e.Dcx_Keymsg.RowIx=f;r["E"+w].rows.push(e)});if(!C)return null;r["E"+w+"_Delete"]=B}}
var F=dpq(new Date());$("#h2_title").html("时间1："+s+"；时间2："+u+"；时间3："+F);return r}
DcxForm.tumAf=acu;function mif(c,d,e){var f=col(c,d);var g=f.MEntId;var h=(d.toLowerCase()=="listf_"?true:false);if(ymr(e)||e.length<1)return false;var j=-1;var k=0;var l=null;var m=null;for(var i=0;i<e.length;i++){k=parseInt(e[i].EntId);if(k>0){m=f.EntMsg["E"+k];if(k!=j||ymr(l)){l=m.$listContainer;if(ymr(l)){if(g==k&&!h)l=yvm(k,d);else l=xri(k,d)}}
if(g==k&&!h){f.MKeyFieldValue=e[i].Value;f.OperateType=2;m.KeyFieldValue=e[i].Value;var n=l.find("#d"+k+"_"+e[i].KeyField+"");if(!ymr(n)&&n.length>0){n=n.filter("[isfield=1]:first");kdn(n,e[i].Value,g,d,m.KeyField,l,false,null,null,true);l.find("[EntId="+k+"][uut=1]").each(function(){var a=$(this);if(a.attr("tagName").toLowerCase()=="div"){var b=a.find("input");if(b.length>0)b.attr("disabled","disabled");b=a.find("select");if(b.length>0)b.attr("disabled","disabled")}else a.attr("disabled","disabled")})}}else{var o=e[i].RowIx;var p=l.children("ul[rowix="+o+"]");if(!ymr(p)&&p.length>0){var q=$.trim(p.attr("state"));if(!ymr(q))q=parseInt(q,10);else q=-1;var r=-1;if(q==0||q==2)r=1;if(r>=0)p.attr("state",r+"");var s=p.children();s.last().find("input:hidden").filter("[KeyField=1]").val(e[i].Value);s.find("[uut=1]").each(function(){var a=$(this);if(a.attr("tagName").toLowerCase()=="div"){var b=a.find("input");if(b.length>0)b.attr("disabled","disabled");b=a.find("select");if(b.length>0)b.attr("disabled","disabled")}else a.attr("disabled","disabled")})}}}
j=k}
return true}
DcxForm.SetAllKey=mif;function yyr(a,b,c){var d=col(a,b);d.OperateType=1;d.MKeyFieldValue="";var e=d.EntMsg["E"+a];e.KeyFieldValue="";var f=e.DefaultFormData;if(ymr(f))f=bgc(a,b);if(!ymr(e.FormData)){if(!ymr(e.FormData.rows))e.FormData.rows.splice(0,e.FormData.rows.length)}
ner(a,b,f,e.$formContainer,c);for(key in d.EntMsg){if(key.indexOf("E")<0)continue;var g=d.EntMsg[key];if(g.EntId==a){g.KeyFieldValue="";continue}
if(g.EntId==a||ymr(g.EntId))continue;if(!ymr(g.FormData)){if(!ymr(g.FormData.rows))g.FormData.rows.splice(0,g.FormData.rows.length)}
g.KeyFieldValue="";var h=g.EntId;var i=g.FormData;nhp(h,b,i,g.$listContainer,c)}}
DcxForm.InitTotalAf=yyr;function ner(d,e,f,g,h){if(ymr(h))h=false;if(ymr(f)){var j=bke(d,e);f=j.DefaultFormData;if(ymr(f))f=bgc(d,e);if(ymr(f))return}
if(ymr(g)){var j=bke(d,e);if(!ymr(j.$formContainer))g=j.$formContainer;else g=j.$listContainer}
g.find("[IsField=1]").each(function(){var a=$(this);var b=$.trim(a.attr("FieldName"));var c=null;if(ymr(b))return true;a.removeAttr("oldValue").removeAttr("ischange");for(var i=0;i<f.length;i++){if(f[i].FieldName==b){c=f[i];break}}
if(!ymr(c))kdn(a,c.DefaultValue,d,e,b,g,false,c.DdlHtml,c.DefaultText,false);if(h)maw(a)})}
DcxForm.InitAfDefaultV=ner;function zjc(E,F,G,H){var I=col(E,F);if(ymr(I))return null;var J=I.EntMsg["E"+E];var K=null;if(ymr(G)){var L=J.FormData;if(!ymr(L)){G=L.rows;var M=G.length;wfe(E,M,F)}else{alert("无法获取表单数据。");return false}}
if(ymr(H)){H=I.$container.find("#div_List_"+F+E+":first").filter("[ype=1]")}
if(ymr(H)){alert("无法获取表单的容器。");return false}
var N=new Array();var O=I.OperateType==2?true:false;var P=I.OperateType==1?true:false;var Q=false;var R=J.KeyField;var S=1;var k=0;var T=leq(E,F);var U=-1;H.children().each(function(){var A=G[k];if(ymr(A))return true;var B="from_tr"+S;var C=$(this);if(O){C.attr("state",1)}else if(P){C.attr("state",2)}
C.find("[DBField=1]").each(function(){var d=$(this);var e=d.attr("tagName").toLowerCase();d.removeAttr("oldValue").removeAttr("ischange");Q=O&&!isNaN(d.attr("UUT"))?true:false;var f=e.substr(0,1);if(f=="i"){var d=$(this);var g=d.attr("FieldName");var h=A[g];if(h==undefined)h="";var j=d.attr("type").toLowerCase();if(j=="checkbox"){h=h+"";var k=d.attr("yesv");if(h==k)d.attr("checked",true);else d.attr("checked",false);if(Q)d.attr("disabled","disabled")}else if(j=="hidden"){var v=A[g]?A[g]:"";d.val(v);U=parseInt(d.attr("fid"),10);var l=$.trim(d.attr("TFN"));var m=v;if(!ymr(l)){m=A[l];if(ymr(m))m=v}
var n=null;var o=parseInt(d.attr("CId"),10);var p="d"+E+"_"+g;if(o==34||o==35){n=jpy(d);if(ymr(n)||n.length<1)n=d.prev();else if(n.attr("tagName").toLowerCase()!="input")n=n.find("input:first");if(Q)n.attr("disabled","disabled");var q=null;for(var i=0;i<N.length;i++){if(N[i].FieldName==g){q=N[i].DropdownObj;break}}
if((ymr(q)||q.length<1)&&T!=null){q=T.find("#dds_"+p+"_ul");var r={"FieldName":g,"DropdownObj":q};N.push(r)}
if(q!=null&&q.length>0){q.children().each(function(){var a=$(this).find("#"+p+"e");var b=a.html();b=$.trim(b);if(b==v){var c=a.prev().html();n.val(c);return true}})}}else if(o==36){n=jpy(d);if(ymr(n)||n.length<1)n=d.prev();n=n.find("[fid="+U+"]:first");if(Q)n.attr("disabled","disabled");var s=null;for(var i=0;i<N.length;i++){if(N[i].FieldName==g){s=N[i].DropdownObj;break}}
if(s==null&&T!=null){s=T.find("#ddc_"+p+"_div");var t={"FieldName":g,"DropdownObj":s};N.push(t)}
if(s!=null){s.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);if(b==v){var c=a.attr("text");n.val(c);return false}})}}else if(o==37){n=jpy(d);if(ymr(n)||n.length<1)n=d.prev();n=n.find("[fid="+U+"]:first");var u=v.split(',');if(Q)n.attr("disabled","disabled");var s=null;for(var i=0;i<N.length;i++){if(N[i].FieldName==g){s=N[i].DropdownObj;break}}
if(s==null&&T!=null){s=T.find("#ddc_"+p+"_div");var t={"FieldName":g,"DropdownObj":s};N.push(t)}
if(s!=null){var w="";s.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);for(var i=0;i<u.length;i++){if(b==u[i]){w=w+a.attr("text")+",";break}}});if(ymr(w)&&!ymr(m))w=m;n.val(w)}}else if(o==39||o==40){n=jpy(d);if(ymr(n)||n.length<1)n=d.prev();n=n.find("[fid="+U+"]:first");var x=null;var y=parseInt(d.attr("tid"),10);for(var i=0;i<N.length;i++){if(N[i].TreeId==y){x=N[i].DropdownObj;break}}
if(x==null&&T!=null){x=T.find("#sptree"+y).find("#sptree_left"+y);var t={"TreeId":y,"FieldName":g,"DropdownObj":x};N.push(t)}
if(x!=null){var z=x.find("dl[tvalue='"+v+"']");if(!ymr(z)&&z.length>0){m=z.children("dt:first").find("a.nd-text").text()}}
if(!ymr(m))n.val(m);if(Q)n.attr("disabled","disabled")}else if(o==43){ufd(this,E,F,g,v,C,true,O)}else if(o==33){gwo(this,E,F,g,v,C,true,O)}else if(o==4){unz(this,E,F,g,v,C,true,O)}else if(o==46){InitCtrlHtml_Address(this,E,F,g,d.attr("FId"),v,C,true,O)}else if(o==48){InitCtrlHtml_DateYMD(this,E,F,g,d.attr("FId"),v,C,true,O)}else{n=jpy(d);if(ymr(n)||n.length<1)n=d.prev();else if(n.attr("tagName").toLowerCase()!="input")n=n.find("input:first");n.val(h);if(Q)n.attr("disabled","disabled")}}else{d.val(h);if(Q)d.attr("disabled","disabled")}}else if(e.substr(2,1)=="l"){var d=$(this);var g=d.attr("FieldName");var h=A[g]+"";if(h==undefined)h="";if(d.find("option[value='"+h+"']").length<1){var l=$.trim(d.attr("TFN"));var m=h;if(!ymr(l)){m=A[l];if(ymr(m))m=A[l+"_hid"];if(ymr(m))m=h}
d.prepend("<option value='"+h+"'>"+m+"</option>")}
d.val(h);if(Q)d.attr("disabled","disabled")}else if(f=="t"){var d=$(this);var g=d.attr("FieldName");var h=A[g];if(h==undefined)h="";d.val(h);if(Q)d.attr("disabled","disabled")}else if(f=="d"){var d=$(this);var g=d.attr("FieldName");var o=parseInt(d.attr("CId"),10);var h=A[g];if(h==undefined)h="";if(o==7){d.find("input").each(function(){var a=$(this);if(a.attr("value")==h){a.attr("checked",true);return true}
if(Q)a.attr("disabled","disabled")})}else if(o==10){var u=h.split(',');d.find("input").each(function(){var a=$(this);if(Q)a.attr("disabled","disabled");var b=a.attr("value");if(b!=undefined){for(var i=0;i<u.length;i++){if(b==u[i]){a.attr("checked",true);break}}}})}}});var D=C.children().last();D.find("#"+F+E+"_hid_KeyField_"+B).val(A[R]);S++;k++})}
DcxForm.InitLf=zjc;Date.prototype.lpn=function(a,b){var d=this;var k={"y":"FullYear","q":"Month","m":"Month","w":"Date","d":"Date","h":"Hours","n":"Minutes","s":"Seconds","ms":"MilliSeconds"};var n={"q":3,"w":7};eval("d.set"+k[a]+"(d.get"+k[a]+"()+"+((n[a]||1)*b)+")");return d};Date.prototype.dateDiff=function(a,b){var d=this,t=d.getTime(),t2=b.getTime(),i={};a=a.toLowerCase();i["y"]=b.getFullYear()-d.getFullYear();if(a=='q')i["q"]=i["y"]*4+Math.floor(b.getMonth()/4)-Math.floor(d.getMonth()/4);else if(a=='m')i["m"]=i["y"]*12+b.getMonth()-d.getMonth();else if(a=='ms')i["ms"]=b.getTime()-d.getTime();else if(a=='w')i["w"]=Math.floor((t2+345600000)/(604800000))-Math.floor((t+345600000)/(604800000));else if(a=='d')i["d"]=Math.floor(t2/86400000)-Math.floor(t/86400000);else if(a=='h')i["h"]=Math.floor(t2/3600000)-Math.floor(t/3600000);else if(a=='n')i["n"]=Math.floor(t2/60000)-Math.floor(t/60000);else if(a=='s')i["s"]=Math.floor(t2/1000)-Math.floor(t/1000);return i[a]};function mlj(){if(fpa==null){fpa=new Date()}else{var a=new Date();if(fpa.dateDiff("s",a)<0.3){fpa=new Date();return false}
fpa=new Date()}
return true}
DcxForm.mlj=mlj;function lwg(d,e,f,g,h,i){if(h!=false)h=true;var j=col(d,e);if(ymr(j))return null;var k=j.EntMsg["E"+d];if(ymr(f)){var l=k.FormData;if(!ymr(l))f=l.rows[0];else{alert("无法获取表单数据。");return false}}
if(ymr(g)){g=yvm(d,e)}
if(ymr(g)){alert("无法获取表单的容器。");return false}
if(d==j.MEntId&&!ymr(f[k.KeyField])){j.MKeyFieldValue=f[k.KeyField];k.KeyFieldValue=f[k.KeyField]}
var m=g.find("[EntId="+d+"][isfield=1]");m.each(function(){var a=$(this);var b=a.attr("FieldName");var c=f[b];if(c!=undefined)kdn(a,c,d,e,b,g,false,null,null,true)});if(i!=true){try{m.each(function(){var a=$(this);try{a.blur();a.change();if(a.attr("valisok")=="1"||!h)maw(a)}catch(err){}})}catch(err){}}}
DcxForm.InitAf=lwg;function xcr(a,b,c,d){var e=zry(a,b,c);ync(a,b,e,c,d)}
DcxForm.InitAf3=xcr;function mhc(a,b,c,d){var e=owj(a,b,c);ync(a,b,e,c,d)}
DcxForm.InitDf=mhc;function ync(a,b,c,d,e){if(ymr(c))return false;var f=col(a,b);f.OperateType=2;f.MKeyFieldValue=d;var g=f.EntMsg["E"+a];g.KeyFieldValue=d;var h=c["E"+a];if(ymr(h))return false;else if(!ymr(h.rows)&&h.rows.length>0){h=h.rows[0]}else return false;lwg(f.MEntId,f.CtrlPrex,h,null);for(key in f.EntMsg){if(key.indexOf("E")<0)continue;var i=f.EntMsg[key];if(i.EntId==a){i.KeyFieldValue="";continue}
if(i.EntId==a||ymr(i.EntId))continue;var j=c["E"+i.EntId];i.KeyFieldValue="";var k=i.EntId;if(ymr(j))continue;else if(!ymr(j.rows)){nhp(k,b,j,i.$listContainer,e)}else continue}}
DcxForm.InitAf2=ync;function kdn(a,b,c,d,e,f,g,h,i,j){var k=null;if(ymr(a)||a.length<1)return false;var l=parseInt(a.attr("rid"),10);var e=a.attr("FieldName");if(ymr(c))c=a.attr("EntId");if(ymr(d)){d="AjaxF_";var m=col(c,d);if(ymr(m)){d="DefaultF_";m=col(c,d)}
if(ymr(m)){d="ListF_";m=col(c,d)}
if(ymr(m)){d="SearchF_"}}
var n=a.attr("tagName").toLowerCase();a.removeAttr("oldValue").removeAttr("ischange");var o=j&&!isNaN(a.attr("UUT"))?true:false;var p=b;var q=n.substr(0,1);if(q=="i"){var e=a.attr("FieldName");if(p==undefined)p="";var r=a.attr("type").toLowerCase();if(r=="checkbox"){b=b+"";var s=a.attr("yesv");if(b==s)a.attr("checked",true);else a.attr("checked",false)}else if(r=="hidden"){a.val(b);var t=null;var u=parseInt(a.attr("CId"),10);if(l==2){if(!ymr(h)){if(ymr(k))k=leq(c,d);var u=parseInt(a.attr("CId"),10);var e=a.attr("FieldName");if(u==34||u==35){k.find("#dds_"+c+"_"+e+"").remove();k.append(h)}else if(u==36||u==37){k.find("#ddc_"+c+"_"+e+"").remove();k.append(h)}}
if(!ymr(i)&&b.indexOf("/")<0)b=i+"/"+b;mwt(a.get(0),c,d,e,b,-1,null,g,j)}else if(u==30){if(!ymr(h)){nhz(c,d,e,"",h,g,$LRList_HiddenObj)}
tus(a.get(0),c,d,e,b,f,g,j)}else if(u==43){ufd(a.get(0),c,d,e,b,f,g,j)}else if(u==33){gwo(a.get(0),c,d,e,b,f,g,j)}else if(u==4){unz(a.get(0),c,d,e,b,f,g,j)}else if(u==46){InitCtrlHtml_Address(a.get(0),c,d,e,a.attr("FId"),b,f,g,j)}else if(u==48){InitCtrlHtml_DateYMD(a.get(0),c,d,e,a.attr("FId"),b,f,g,j)}else{t=jpy(a);if(ymr(t)||t.length<1)t=a.prev();else if(t.attr("tagName").toLowerCase()!="input")t=t.find("input:first");t.val(p)}}else{a.val(p);if(o)a.attr("disabled","disabled")}}else if(n.substr(2,1)=="l"){if(b==undefined)b="";if(a.find("option[value='"+b+"']").length<1){a.prepend("<option value='"+b+"'>"+b+"</option>")}
a.val(b);if(o)a.attr("disabled","disabled")}else if(q=="t"){if(b==undefined)b="";a.val(b);if(o)a.attr("disabled","disabled")}else if(q=="d"){if(!ymr(h))a.html(h);if(a.attr('Type')=='1')vjv(a.get(0),c,d,e,b,f,g,j);else if(a.attr('Type')=='2')hog(a.get(0),c,d,e,b,f,g,j)}}
DcxForm.SetCtrlValueByObj=kdn;function lpk(a,b,c){var d=$("#"+a);if(ymr(d)||d.length<1)return;else kdn(d,b,null,null,null,null,null,null,null,c)}
DcxForm.SetCtrlValueById=lpk;function xuv(a,b,c,d,e,f,g){var h=ppq(null,a,b,c,d,e,null);if(!ymr(h))kdn(h,f,null,null,null,null,null,null,null,g);else return}
DcxForm.SetCtrlValueByFieldName=xuv;function jag(a,b,c,d,e,f,g,h){var i=ppq(a,b,c,d,f,g,"input");if(!ymr(i))i.val(e);var j=h&&!isNaN(i.attr("UUT"))?true:false;if(j)i.attr("disabled","disabled");if(i.attr("cback")=="1")i.change()}
DcxForm.SetTxtValue=jag;function vqr(a,b,c,d,e,f,g,h){var i=ppq(a,b,c,d,f,g,"input");if(!ymr(i))i.val(e);var j=h&&!isNaN(i.attr("UUT"))?true:false;if(j)i.attr("disabled","disabled")}
DcxForm.SetTxtsValue=vqr;function wbd(a,b,c,d,e,f,g,h){var i=ppq(a,b,c,d,f,g,"input");if(!ymr(i))i.val(e)}
DcxForm.SetHiddenValue=wbd;function iho(a,b,c,d,e,f,g,h){var i=ppq(a,b,c,d,f,g,"select");if(!ymr(i))i.val(e);var j=h&&!isNaN(i.attr("UUT"))?true:false;if(j)i.attr("disabled","disabled")}
DcxForm.SetDropDownListValue=iho;function unz(a,b,c,d,e,f,g,h){e=ymr(e)?"":e+"";var i=null;if(ymr(a))i=ppq(null,b,c,d,f,g,"input");else i=$(a);if(ymr(i))return;i.val(e);var j=jpy(i);var l=i.attr("vitems");if(ymr($.trim(l))){j.html(e);return}
var h=ymr($.trim(e))?false:true;var m=l.split(',');var n="";if(m.length>0){var o=null;var p=null;for(var k=0;k<m.length;k++){p=m[k].split('/');if(p.length>1)o=p[1].ngj();else o=p[0].ngj();if(h&&e==o){n=$.trim(p[0]);break}else if(!h){if(p.length>2&&$.trim(p[2])=="1"){n=$.trim(p[0]);break}}}
if(n==""){p=m[0].Split('/');n=p[0].ngj()}}
if(!ymr($.trim(n)))j.html(n);else j.html(e)}
DcxForm.SetLabelValue=unz;function jdk(a,b,c,d,e,f,g,h){if(ymr($.trim(e)))e="";var i=null;if(ymr(a))i=ppq(a,b,c,d,f,g,"input");else i=$(a);var j=h&&!isNaN(i.attr("UUT"))?true:false;if(j)i.attr("disabled","disabled");e=e+"";var k=i.attr("yesv");var l=k.toLowerCase();if(l=="true"||l=="false")k=l;l=e.toLowerCase();if(l=="true"||l=="false")e=l;if(e==k)i.attr("checked",true);else i.attr("checked",false)}
DcxForm.SetCkbValue=jdk;function vjv(c,d,e,f,g,h,i,j){if(ymr($.trim(g)))g="";g=g+"";var k=ppq(c,d,e,f,h,i,"div");var l=j&&!isNaN(k.attr("UUT"))?true:false;k.find("input").each(function(){var a=$(this);if(l)a.attr("disabled","disabled");if(g.toLowerCase()=="false")g="false";if(g.toLowerCase()=="true")g="true";var b=a.attr("value");if(b.toLowerCase()=="false")b="false";if(b.toLowerCase()=="true")b="true";if(b==g||(b=="1"&&g=="true")||(b=="true"&&g=="1")){a.attr("checked",true);return true}else a.attr("checked",false)})}
DcxForm.SetRadioListValue=vjv;function hog(c,d,e,f,g,h,j,k){if(ymr($.trim(g)))g="";g=g+"";var l=ppq(c,d,e,f,h,j,"div");var m=k&&!isNaN(l.attr("UUT"))?true:false;var n=g.split(',');l.find("input").each(function(){var a=$(this);if(m)a.attr("disabled","disabled");var b=a.attr("value");if(b!=undefined){a.attr("checked",false);for(var i=0;i<n.length;i++){if(b==n[i]){a.attr("checked",true);break}}}})}
DcxForm.SetCkbListValue=hog;function mwt(d,e,f,g,h,j,k,l,m){if(ymr($.trim(h)))h="";h=h+"";var n=null;var o=null;var p=null;if(!ymr(d)&&$(d).attr("isfield")!="1"){o=$(d);if(parseInt(o.attr("IsForField"),10)==1){p=o;n=wyb(o,p);if(isNaN(j)||j<1)j=parseInt(n.attr("cid"),10);if(j>33&&j<41)o=p.find("[CId]:first")}else{p=vuj(o);n=wyb(o,p);if(isNaN(j)||j<1)j=parseInt(n.attr("cid"),10);if(j>33&&j<41&&o.attr("tagName").toLowerCase()!="input")o=p.find("[CId]:first")}}else{if(ymr(d))n=ppq(null,e,f,g,k,l,"input");else n=$(d);if(isNaN(j)||j<1)j=parseInt(n.attr("cid"),10);p=jpy(n);if(!ymr(p)&&j>33&&j<41){o=p.find("[CId]:first")}}
if(ymr(n))return false;var q=leq(e,f);var r=null;r=h.split('/');if(r.length>1)n.val(r[1]);else n.val(r[0]);if(!ymr(o)&&o.length>0)o.val(r[0]);else o.val("");var s=m&&!isNaN(n.attr("UUT"))?true:false;if(s)o.attr("disabled","disabled");var t=true;if(!ymr(o)&&o.length>0&&o.attr("tagName").toLowerCase()!="input"&&o.attr("tagName").toLowerCase()!="textarea")t=false;if(j==34||j==35){var u="d"+e+"_"+g;var v=q.find("#dds_"+u+"_ul");if(v!=null){v.children().each(function(){var a=$(this).find("#"+u+"e");var b=a.html();b=$.trim(b);if(b==h){var c=a.prev().html();if(t)o.val(c);else o.html(c);return false}})}
if(o.attr("cback")=="1")o.change()}else if(j==36){var u="d"+e+"_"+g;var w=q.find("#ddc_"+u+"_div");if(w!=null){w.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);if(b==h){var c=a.attr("text");if(!ymr(o)&&o.length>0){if(t)o.val(c);else o.html(c)}
return false}})}
if(o.attr("cback")=="1")o.change()}else if(j==37){var x=h.split(',');var w=q.find("#ddc_d"+e+"_"+g+"_div");if(w!=null){var y="";w.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);for(var i=0;i<x.length;i++){if(b==x[i]){y=y+a.attr("text")+",";break}}});if(!ymr(o)&&o.length>0){if(t)o.val(y);else o.html(y)}}
if(o.attr("cback")=="1")o.change()}else if(j==39||j==40){var z=n.attr("TId");var A=q.children("div[TreeId="+z+"][IsTree=1]");izu(n.get(0),A)}else if(!ymr(o)&&o.length>0)o.val(h)}
DcxForm.SetDdlValue=mwt;function tus(d,e,f,g,h,i,j,k){var l=ppq(d,e,f,g,i,j,"input");if(ymr(l)||l.length<1){if(ymr(i))i=yvm(e,f);l=ppq(null,e,f,g,i,j,"input")}
var m=null;var n=null;if(parseInt(l.attr("CId"),10)==39){m=jpy(l);n=m.find("[CId]");var o=leq(e,f);if(!ymr(o))m=o.children("div[FieldName='"+$.trim(g)+"']:first")}else{m=jpy(l)}
var p=(parseInt(m.attr("OnlyLeft"),10)==1?true:false);if(!ymr(l))l.val(h);else return;var q=false;if(ymr(h))q=true;var r="";var s=","+h+",";var t=l.prev();var u=t.find("ul[IsRight=1]");var p=(parseInt(m.attr("OnlyLeft"),10)==1?true:false);var v=new nzy();var w=k&&!isNaN(l.attr("UUT"))?true:false;t.find("ul[IsLeft=1]").children().each(function(){var a=$(this);var b=$.trim(a.attr("tvalue"));if(w)a.removeAttr("click");if(s.indexOf(","+b+",")<0||b==""){a.attr("IsChecked","0");a.find(".form-lrlist-checked").hide();return true}
var c=a.attr("ttext");r=r+$.trim(a.attr("ttext"))+",";if(!p&&!ymr(b)){v.append("<li class=\"form-lrlist-selected\" tvalue=\""+b+"\" ttext=\""+c+"\" title=\"可拖动\">\n");v.append("<a class=\"form-lrlist-text\" href=\"javascript:void(0);\">"+c+"</a>\n");v.append("<div class=\"form-lrlist-remove\" title=\"移除\" onclick='javascript:mos(this);' ></div><br style=\"clear:both;\" />\n");v.append("</li>\n")}
a.attr("IsChecked","1");a.find(".form-lrlist-checked").show()});if(!p){u.html(v.toString());u.sortable({update:function(a,b){ymh(b.item)}}).disableSelection()}else{if(!ymr(n)&&n.length>0)n.val(r);qew.sortable({update:function(a,b){kds(b.item)}}).disableSelection()}}
DcxForm.SetLRListValue=tus;function iad(c,d,e,f,g,h,i,j){if(ymr(g))g="";var k=ppq(c,d,e,f,h,i,"input");var k=$LRList_HiddenObj;if(ymr(k)||k.length<1){if(ymr(h))h=yvm(d,e);k=ppq(null,d,e,f,h,i,"input")}
var l=null;var m=null;if(parseInt(k.attr("CId"),10)==39){l=jpy(k);m=l.find("[CId]");var n=leq(d,e);if(!ymr(n))l=n.children("div[FieldName='"+$.trim(f)+"']:first")}else{l=jpy(k)}
var o=(parseInt(l.attr("OnlyLeft"),10)==1?true:false);if(!ymr(k))k.val(g);else return;var p=","+g;var q=new nzy();var r="";var s=l.find("ul[IsLeft=1]");var t=j&&!isNaN(k.attr("UUT"))?true:false;s.children().each(function(){var a=$(this);var b=$.trim(a.attr("tvalue"));if(t)a.removeAttr("click");if(p.indexOf(","+b+",")<0){$$li.attr("IsChecked","0");a.find(".form-lrlist-checked").hide();return true}
r=r+$.trim(a.attr("ttext"))+",";a.attr("IsChecked","1");a.find(".form-lrlist-checked").show()});if(!ymr(m)&&m.length>0)m.val(r);if(!t)s.sortable({update:function(a,b){kds(b.item)}}).disableSelection()}
DcxForm.SetSingleListValue=iad;function ufd(b,c,d,e,f,g,h,i){if(ymr(f))f="";var j=ppq(b,c,d,e,g,h,"input");if(!ymr(j))j.val(f);else return;var k=","+f;var l=j.prev();var m=l.attr("imgWidth");var n=l.attr("imgHeight");if(!isNaN(m))m=parseInt(m,10);else m=200;if(!isNaN(n))n=parseInt(n,10);else n=200;if(!ymr(f)){var o=l.find("img");if(o.length>0){if(o.filter("[isImg=1]").length>0)o=o.filter("[isImg=1]");else o=o.filter(":first")}
var p=o.parent();var q=$("<a href=\""+f+"\" title=\"点击看原图\" target=\"_blank\" class=\"link\"></a>");o.get(0).src=f;q.append(o).appendTo(p)}else{f="/UpLoadFiles/common/blank.png";var o=l.find("img");if(o.length>0){if(o.filter("[isImg=1]").length>0)o=o.filter("[isImg=1]");else o=o.filter(":first")}
o.get(0).src=f}
var r=i&&!isNaN(j.attr("UUT"))?true:false;if(l.attr("isrunFirstTime")!="1"){l.find(":file").each(function(){var a=this;if(r)$(a).attr("disabled","disabled");$(a).unbind("click").bind("click",function(){sjg(a,c,d,h,true)}).unbind("change").bind("change",function(){eor(a,c,d,h,true)})});$.qju({imgPath:f,id:"#"+l.attr("id"),container:l,nas:304,maxHeight:305});l.attr("isrunFirstTime","1")}}
DcxForm.SetUpLoadImgValue=ufd;function gwo(b,c,d,e,f,g,h,i){if(ymr(f))f="";var j=ppq(b,c,d,e,g,h,"input");if(!ymr(j))j.val(f);else return false;var k=jpy(j);var l=new nzy();if(!ymr(f)){l.append("<div class=\"uped\">");l.append("      <a href=\""+f+"\" title=\"打开\" target=\"_blank\" class=\"link\">"+bhh(f)+"</a>");l.append(" </div>");k.append(l.toString())}else{l.append("<div class=\"uped\" style='display:none;'>");l.append("      <a href=\"javascript:void(0);\" title=\"打开\" target=\"_blank\" class=\"link\"></a>");l.append(" </div>");k.append(l.toString())}
var m=i&&!isNaN(j.attr("UUT"))?true:false;k.find(":file").each(function(){var a=this;if(m)$(a).attr("disabled","disabled");$(a).removeAttr("onclick").removeAttr("onchange").unbind("click").bind("click",function(){sjg(a,c,d,h,false)}).unbind("change").bind("change",function(){eor(a,c,d,h,false)})});return false}
DcxForm.SetUpFileValue=gwo;function sbz(a,b,c,d,f,g,h,i){var j=null;if(ymr(a))j=ppq(null,b,c,d,g,h,"input");else j=$(a);try{if(ymr(j)||j.length<1)return"";var k=null;eval("obj=CKEDITOR.instances."+j.attr("id"));if(!ymr(k))return k.setData(f)}catch(e){return""}}
DcxForm.SetHtmlEditorValue=sbz;function hhk(a,b,c,d,e,f,g,h,i){if(ymr(a))return false;if(isNaN(e)||e<1)e=500;if(isNaN(f)||f<1)f=500;if(g!=true)g=false;if(isNaN(h)||h<1)h=1;if(i!=true)i=false;if(h==1){CKEDITOR.replace(a,{width:e+'px',height:f+'px',toolbar:[['Source','Undo','Redo','Bold','Italic','-','OrderedList','FontSize','TextField','-','Link','Unlink','-','Image','Table','Smiley','TextColor','BGColor','FitWindow']]})}else if(h==2){CKEDITOR.replace(a,{width:e+'px',height:f+'px'})}}
DcxForm.CreateHtmlEditor=hhk;function InitCtrlHtml_DateYMD(a,b,c,e,f,g,h,j,k){if(ymr(g))g="";var l=ppq(a,b,c,e,h,j,"input");if(!ymr(l)){if(!ymr(g))l.val(g)}else return;var m=jpy(l);var n=m.find("select[vlabel=1]");var o=m.find("select[vlabel=2]");var p=m.find("select[vlabel=3]");var g=l.val();var q=k&&!isNaN(l.attr("UUT"))?true:false;if(q){n.attr("disabled","disabled");o.attr("disabled","disabled");p.attr("disabled","disabled")}
var d=new Date();var r=d.getFullYear();var s=(d.getMonth()+1);var t=d.getDate();if(!ymr(g)){var u="";for(var i=0;i<g.length;i++){if(!ymr($.trim(g[i]))&&isNaN($.trim(g[i]))){u=$.trim(g[i]);break}}
if(!ymr($.trim(u))){g=g.split(u);if(g.length>0&&!ymr($.trim(g[0]))&&!isNaN($.trim(g[0])))r=parseInt($.trim(g[0]),10);if(g.length>1&&!ymr($.trim(g[1]))&&!isNaN($.trim(g[1])))s=parseInt($.trim(g[1]),10);if(g.length>2&&!ymr($.trim(g[2]))){var v=$.trim(g[2]);var i=0;for(;i<v.length;i++){if(!ymr($.trim(v[i]))&&isNaN($.trim(v[i]))){break}}
if(i>0)t=parseInt(v.substr(0,i),10)}}}
var w=r-80;var x=r+50;if(x<d.getFullYear())x=d.getFullYear()+50;var y=new nzy();for(var i=x;i>=w;i--){if(i==r)y.append("<option value=\""+i+"\" selected>"+i+"</option>");else y.append("<option value=\""+i+"\">"+i+"</option>")}
n.html(y.toString());var z=new Array("1","2","3","4","5","6","7","8","9","10","11","12");y=new nzy();for(var i=0;i<z.length;i++){if(i+1==s)y.append("<option value=\""+(i+1)+"\" selected>"+z[i]+"</option>");else y.append("<option value=\""+(i+1)+"\" >"+z[i]+"</option>")}
o.html(y.toString());var A=lzm(r,s-1);y=new nzy();for(var i=1;i<=A;i++){if(i==t)y.append("<option value=\""+i+"\" selected>"+i+"</option>");else y.append("<option value=\""+i+"\" >"+i+"</option>")}
p.html(y.toString());l.val(r+"-"+s+"-"+t)}
DcxForm.InitCtrlDateYMD=InitCtrlHtml_DateYMD;function GetChildOption_DateYMD(a){var b=vuj($(a));var c=wyb(b);var d=parseInt($(a).attr("vlabel"),10);var e=b.find("select[vlabel=1]");var f=b.find("select[vlabel=2]");var g=b.find("select[vlabel=3]");var h=parseInt(e.val(),10);var j=parseInt(f.val(),10);var k=parseInt(g.val(),10);if(d==2){var l=lzm(h,j-1);if(isNaN(k))k=1;var m=new nzy();for(var i=1;i<=l;i++){if(i==k)m.append("<option value=\""+i+"\" selected>"+i+"</option>");else m.append("<option value=\""+i+"\" >"+i+"</option>")}
g.html(m.toString())}
c.val(h+"-"+j+"-"+k)}
function lzm(a,b){var c;var d;var e;var f;var g;c=b+1;if(c>11){d=a+1;c=0}else{d=a}
e=new Date(a,b,1);f=new Date(d,c,1);g=(f-e)/(24*60*60*1000);return g}
DcxForm.owp=lzm;function InitCtrlHtml_Address(c,d,e,f,g,h,i,j,k){if(ymr(h))h="";var l=ppq(c,d,e,f,i,j,"input");if(!ymr(l)){if(!ymr(h))l.val(h)}else return;var m=jpy(l);var n=m.find("select[vlabel=1]");var o=m.find("select[vlabel=2]");var p=m.find("select[vlabel=3]");var h=l.val();var q=k&&!isNaN(l.attr("UUT"))?true:false;if(q){$year.attr("disabled","disabled");$month.attr("disabled","disabled");vbe.attr("disabled","disabled")}
var r="";var s="";var t="";if(!ymr(h)){var u="-";h=h.split(u);if(h.length>0&&!ymr($.trim(h[0])))r=$.trim(h[0]);if(h.length>1&&!ymr($.trim(h[1])))s=$.trim(h[1]);if(h.length>2&&!ymr($.trim(h[2])))t=$.trim(h[2]);var v="/WebServices/Comman/Comman.asmx/GetAddress_OptionHtml";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:v,data:"{Value1:\""+r+"\",Value2:\""+s+"\",Value3:\""+t+"\"}",dataType:'json',success:function(a){a=hmy(a);if(!ymr(a)){n.html(a[0]);o.html(a[1]).attr("disabled",false);p.html(a[2]).attr("disabled",false)}},beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))}})}else{var v="/WebServices/Comman/Comman.asmx/GetAddress_OptionHtml2";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:v,data:"{ParentId:0,VLabel:1}",dataType:'json',success:function(a){a=hmy(a);n.html(a).attr("disabled",false);n.find("option[value='中国']").attr("selected",true);GetChildOption_Address(n.get(0))}})}}
DcxForm.InitCtrlAddress=InitCtrlHtml_Address;function GetChildOption_Address(i){var j=vuj($(i));var k=parseInt($(i).attr("vlabel"),10);var l=$(i).find("option:selected").attr("Vid");var m=null;if(k==1)m=j.find("select[vlabel=2]");else if(k==2)m=j.find("select[vlabel=3]");if(!ymr(m)&&m.length>0){k=parseInt(m.attr("vlabel"),10);var n="/WebServices/Comman/Comman.asmx/GetAddress_OptionHtml2";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:n,data:"{ParentId:"+l+",VLabel:"+k+"}",dataType:'json',success:function(a){a=hmy(a);m.html(a).attr("disabled",false);if(k==2)j.find("select[vlabel=3]").html("<option vid=\"-1\" value=\"\">选择市</option>").attr("disabled",true);var b=wyb(j);var c=j.find("select[vlabel=1]");var d=j.find("select[vlabel=2]");var e=j.find("select[vlabel=3]");var f=$.trim(c.val());var g=$.trim(d.val());var h=$.trim(e.val());b.val(f+(!ymr(g)?"-"+g:"")+(!ymr(h)?"-"+h:""))},beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))}})}else{var o=wyb(j);var p=j.find("select[vlabel=1]");var q=j.find("select[vlabel=2]");var r=j.find("select[vlabel=3]");var s=$.trim(p.val());var t=$.trim(q.val());var u=$.trim(r.val());o.val(s+(!ymr(t)?"-"+t:"")+(!ymr(u)?"-"+u:""))}}
DcxForm.GetAddressChildOption=GetChildOption_Address;function suo(d,f,g,h,j,k,l){if(ymr(f))f=d;var m=null;var n=null;var o=0;if(parseInt(g.attr("IsForField"),10)==1){n=g;m=wyb(g,n);o=parseInt(m.attr("cid"),10);if(o>33&&o<41)g=n.find("[CId]:first")}else{n=vuj(g);m=wyb(g,n);o=parseInt(m.attr("cid"),10);if(o>33&&o<41&&g.attr("tagName").toLowerCase()!="input")g=n.find("[CId]:first")}
if(ymr(m))return false;m.val(f);g.val(d);var p=true;var q=m.attr("fieldname");k=parseInt(m.attr("entid"),10);l=n.attr("ctrlprex");var r=f;var s=leq(k,l);if(o==34||o==35){var t="d"+k+"_"+q;var u=s.find("#dds_"+t+"_ul");if(u!=null){u.children().each(function(){var a=$(this).find("#"+t+"e");var b=a.html();b=$.trim(b);if(b==r){var c=a.prev().html();if(p)g.val(c);else g.html(c);return false}})}
try{g.change()}catch(e){}}else if(o==36){var t="d"+k+"_"+q;var v=s.find("#ddc_"+t+"_div");if(v!=null){v.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);if(b==r){var c=a.attr("text");if(!ymr(g)&&g.length>0){if(p)g.val(c);else g.html(c)}
return false}})}
if(g.attr("cback")=="1")g.change()}else if(o==37){var w=r.split(',');var v=s.find("#ddc_d"+k+"_"+q+"_div");if(v!=null&&v.length>0){var x="";v.find("input").each(function(){var a=$(this);var b=a.attr("value");b=$.trim(b);for(var i=0;i<w.length;i++){if(b==w[i]){x=x+a.attr("text")+",";break}}});if(!ymr(g)&&g.length>0){if(p)g.val(x);else g.html(x)}}
if(g.attr("cback")=="1")g.change()}else if(o==39||o==40){var y=m.attr("TId");var z=s.children("div[TreeId="+y+"][IsTree=1]");izu(m.get(0),z)}else if(!ymr(g)&&g.length>0)g.val(r)}
DcxForm.SetCtrlDdValue=suo;function ezo(l,m,n){var o=null;var p=col(l,m);o=p.$form;if(o==null){alert("获取表单的HTML对象失败。请确认代码正确。");return false}
o.find("[EntId="+l+"][IsField=1]").each(function(){var a=$(this);var b=a.attr("FieldName");var c=a.attr("fid");if(qfa(c,n)){return true}
var d=a.attr("type").toLowerCase();var f=parseInt(a.attr("cid"),10);var g=a.attr("tagName").toLowerCase();var h=parseInt(a.attr("rid"),10);a.attr("IsDisabled","1").attr("disabled","disabled");if(g=="input"&&d=="hidden"){var i=jpy(a);if(!ymr(i)&&i.length>0){i.attr("IsDisabled","1")}
if(h==2){if(!ymr(i)&&i.length>0){i.find("input").attr("disabled","disabled");i.find("select").attr("disabled","disabled");i.find("textarea").attr("disabled","disabled")}}else if(f==30){}else if(f==43){i.find("input").attr("disabled","disabled")}else if(f==33){i.find("input").attr("disabled","disabled")}else if(f==4){}else if(f==46){i.find("select").attr("disabled","disabled")}else if(f==48){i.find("select").attr("disabled","disabled")}}else if(g=="div")a.find("input").attr("disabled","disabled");else if(g=="textarea"){if(f==22||f==23||f==28){try{var j=null;var k="obj=CKEDITOR.instances."+a.attr("id")+";";eval(k);if(!ymr(j))j.setReadOnly(true)}catch(e){}}}})}
DcxForm.UnableAllCtrl=ezo;function qfa(a,b){a=parseInt(a,10);if(!ymr(b)&&b.length>0){for(var i=0;i<b.length;i++){if(a==parseInt(b[i].FldId,10))return true}}
return false}
DcxForm.qfa=qfa;function fvl(a,b,c,d,e){var f=ppq(null,a,b,c,d,e,null);if(!ymr(f)&&f.length>0){var g=f.attr("tagName").toLowerCase();if(g=="input"||g=="select"||g=="textarea"||g=="span"){f.attr("disabled","disabled");var h=f.attr("type").toLowerCase();if(h=="hidden"){f.attr("IsDisabled","1");var i=jpy(f);if(!ymr(i)&&i.length>0){i.find("input").attr("disabled","disabled");i.find("select").attr("disabled","disabled");i.find("textarea").attr("disabled","disabled");i.attr("IsDisabled","1")}}}else if(g=="div"){if(f.attr('Type')=='1'){f.find("input").filter(":radio").each(function(){$(this).attr("disabled","disabled")})}else if(f.attr('Type')=='2'){f.find("input").filter(":checkbox").each(function(){$(this).attr("disabled","disabled")})}}}}
DcxForm.fvl=fvl;function sbw(a){if(!ymr(a)&&a.length>0){var b=a.attr("tagName").toLowerCase();if(b=="input"||b=="select"||b=="textarea"||b=="span"){a.attr("disabled","disabled");var c=a.attr("type").toLowerCase();if(c=="hidden"){a.attr("IsDisabled","1");var d=jpy(a);if(!ymr(d)&&d.length>0){d.find("input").attr("disabled","disabled");d.find("select").attr("disabled","disabled");d.find("textarea").attr("disabled","disabled");d.attr("IsDisabled","1")}}}else if(b=="div"){if(a.attr('Type')=='1'){a.find("input").filter(":radio").each(function(){$(this).attr("disabled","disabled")})}else if(a.attr('Type')=='2'){a.find("input").filter(":checkbox").each(function(){$(this).attr("disabled","disabled")})}}}}
DcxForm.sbw=sbw;function qms(a,b,c,d,e){var f=ppq(null,a,b,c,d,e,null);if(!ymr(f)&&f.length>0){var g=f.attr("tagName").toLowerCase();if(g=="input"||g=="select"||g=="textarea"||g=="span"){f.attr("disabled","disabled")}else if(g=="div"){if(f.attr('Type')=='1'){value="";f.find("input").filter(":radio").each(function(){$(this).removeAttr("disabled")})}else if(f.attr('Type')=='2'){value="";f.find("input").filter(":checkbox").each(function(){$(this).removeAttr("disabled")})}}}}
DcxForm.qms=qms;function fsd(a,b,c,d,e){var f=ppq(null,a,b,c,d,e,null);if(!ymr(f)&&f.length>0)f.hide()}
DcxForm.fsd=fsd;function rxp(a,b,c,d,e){var f=ppq(null,a,b,c,d,e,null);if(!ymr(f)&&f.length>0)f.show()}
DcxForm.rxp=rxp;function dop(a,b,c,d,e){var f=ppq(null,a,b,c,d,e,null);if(!ymr(f)&&f.length>0){var g=f.parent();var h=false;while(!ymr(g)&&g.length>0){if(!ymr(g.attr("areaid"))){h=true;break}else{g=g.parent()}}
if(h){g.hide()}}}
DcxForm.dop=dop;function pta(a,b,c,d,e){var f=ppq(null,a,b,c,d,e,null);if(!ymr(f)&&f.length>0){var g=f.parent();var h=false;while(!ymr(g)&&g.length>0){if(!ymr(g.attr("areaid"))){h=true;break}else{g=g.parent()}}
if(h){g.show()}}}
DcxForm.pta=pta;function ezl(a){if(ymr(a))return;var b=$(a);var c=b.parent();var d=false;while(!ymr(c)&&c.length>0){if(!ymr(c.attr("areaid"))){c=c.parent();d=true;break}else{c=c.parent()}}
if(d&&!ymr(c)){for(var i=1;i<arguments.length;i++){var e=arguments[i];var f=c.children().filter("[AreaId="+e+"]");if(f.css("display"=="none"))f.show();else f.hide()}}}
DcxForm.ShowdopByAreaId=ezl;function qfw(a,b){if(ymr(a))return;var c=$(a);var d=c.parent();var e=false;while(!ymr(d)&&d.length>0){if(!ymr(d.attr("areaid"))){d=d.parent();e=true;break}else{d=d.parent()}}
if(e&&!ymr(d)){for(var i=0;i<b&&!ymr(d);i++){d=d.next();if(!ymr(d)){if(d.css("display"=="none"))d.show();else d.hide()}}}}
DcxForm.ShowdopByCount=qfw;function ckh(a){if(ymr(a))return;var b=$(a);var c=b.parent();var d=false;while(!ymr(c)&&c.length>0){if(!ymr(c.attr("areaid"))){c=c.parent();d=true;break}else{c=c.parent()}}
if(d&&!ymr(c)){for(var i=1;i<arguments.length;i++){var e=arguments[i];c.children().filter("[AreaId="+e+"]").hide()}}}
DcxForm.dopByObj=ckh;function rbt(a,b){if(ymr(a))return;var c=$(a);var d=c.parent();var e=false;while(!ymr(d)&&d.length>0){if(!ymr(d.attr("areaid"))){e=true;break}else{d=d.parent()}}
if(e){for(var i=0;i<b&&!ymr(d);i++){d=d.next();if(!ymr(d))d.hide()}}}
DcxForm.dopByCount=rbt;function dge(a){if(ymr(a))return;var b=$(a);var c=b.parent();var d=false;while(!ymr(c)&&c.length>0){if(!ymr(c.attr("areaid"))){c=c.parent();d=true;break}else{c=c.parent()}}
if(d&&!ymr(c)){for(var i=1;i<arguments.length;i++){var e=arguments[i];c.children().filter("[AreaId="+e+"]").show()}}}
DcxForm.ptaByObj=dge;function pmp(a,b){if(ymr(a))return;var c=$(a);var d=c.parent();var e=false;while(!ymr(d)&&d.length>0){if(!ymr(d.attr("areaid"))){e=true;break}else{d=d.parent()}}
if(e){for(var i=0;i<b&&!ymr(d);i++){d=d.next();if(!ymr(d))d.show()}}}
DcxForm.ptaByCount=pmp;function brp(){var a=Dcx.FormRun.flowMsg;var b=a.ctrl;var c=b.$nextNode.find("input:checked");var d=parseInt(c.attr("value"),10);if(isNaN(d))d=-1;var e=a.nextNodeList;var f=null;for(var i=0;e.length;i++){if(e[i].NodeId==d){f=e[i];break}}
return f}
function cjm(c,d,e,f){if(ymr(Dcx.FormRun.flowMsg))Dcx.FormRun.flowMsg={};var g=Dcx.FormRun.flowMsg;if(ymr(g.rvDlg))g.rvDlg={};var h=g.rvDlg.hpm;var j=g.rvDlg;var k=j.ctrl;var l=-1;if(ymr(h)){glg("LTreeRList.js","/js/Control/LTreeRList/LTreeRList.js");var m=g.ctrl;var n=m.$nextNode.find("input:checked");var o=parseInt(n.attr("value"),10);if(isNaN(o))o=-1;var p=g.nextNodeList;var q=null;for(var i=0;p.length;i++){if(p[i].NodeId==o){q=p[i];break}}
if(ymr(q)){alert("获取下一步节点失败！");return false}
var r=agi(q);h=$(r.toString());$(document.body).append(h);j.hpm=h;k={};k.$queryType=h.find("#d2079_queryType");k.zcb=h.find("#sptree27");k.$lTree=k.zcb.find("#sptree_left27");k.$rTree=k.zcb.find("#rightlist_ul27");j.ctrl=k;var s=k.$queryType.children("li");s.unbind("click").click(function(){s.removeClass("current");$(this).addClass("current");var a=parseInt($(this).attr("value"),10);if(a==1)h.find("a[isAddAllTree=1]").show();else h.find("a[isAddAllTree=1]").hide();aoz(a,f)});var u=$.browser.msie?"mouseenter":"mouseover";var w=$.browser.msie?"mouseleave":"mouseout";h.unbind(u).bind(u,function(){$(this).attr("isInDlg",1)});h.unbind(w).bind(w,function(){$(this).attr("isInDlg",0)});$(document).mouseup(function(a){if(h!=null){if(h.attr("IsShowing")=="2"){h.attr("IsShowing",1)}else if(h.attr("IsShowing")=="1"){if(h.attr("isInDlg")!="1"){h.hide();h.attr("IsShowing",0);$(c).find(".dcx-msgtoolbar4").css({"background-position":"0px 0px"})}}}})}
if(parseInt(h.attr("targetType"),10)!=f){var x=k.zcb.attr("treeId");var r=new nzy();var y=0;if(f==1&&!isNaN(g.mainUserId)&&g.mainUserId>0){var v=g.mainUserId;var t=g.mainUserName;y++;r.append("<li tvalue=\""+v+"\" treeid=\""+x+"\">");r.append("<a class=\"nd-remove\" title=\"移除\" href=\"javascript:void(0);\" onclick=\"javascript:nxl(this,'"+x+"',1,'1');\">删除</a>");r.append("<a class=\"nd-right\" href=\"javascript:void(0);\">"+t+"</a>");r.append("</li>")}else if(f==2&&!ymr(g.rcUserIds)&&g.rcUserIds.length>0){var z=g.rcUserIds;var A=g.rcUserNames;for(var i=0;i<z.length;i++){if(!isNaN(z[i])&&parseInt(z[i],10)>0){y++;var v=z[i];var t=A[i];r.append("<li tvalue=\""+v+"\" treeid=\""+x+"\">");r.append("<a class=\"nd-remove\" title=\"移除\" href=\"javascript:void(0);\" onclick=\"javascript:nxl(this,'"+x+"',1,'1');\">删除</a>");r.append("<a class=\"nd-right\" href=\"javascript:void(0);\">"+t+"</a>");r.append("</li>")}}}
k.$rTree.html(r.toString());k.zcb.find("div.right-count").html("(<span>"+y+"</span>)");try{k.$rTree.unbind("sortable").sortable({update:function(a,b){}}).disableSelection()}catch(err){}}
l=h.attr("targetType");h.attr("targetType",f);if(h.attr("targetType")=="1"){k.$rTree.parent().parent().parent().hide();h.width(385).css("padding-left","40px")}else{k.$rTree.parent().parent().parent().show();h.width(455).css("padding-left","10px")}
aoz(0,f);var B=xfx(c,"Left")-1;var C=xfx(c,"Top")+$(c).height()+5;h.css({"left":B+"px","top":C+"px"});if(h.get(0).style.display=="none"){h.show();h.attr("isShowing",1);$(c).find(".dcx-msgtoolbar4").css({"background-position":"-13px 0px"})}else{h.attr("isShowing",0);h.hide();$(c).find(".dcx-msgtoolbar4").css({"background-position":"0px 0px"})}
if(parseInt(l,10)!=f){var D=k.$rTree.children();if(D.length<1)k.$lTree.find(".nd-checked").hide();else{k.$lTree.find("dl[dsl=2]").each(function(){var v=$(this).attr("tvalue");if(D.filter("[tvalue='"+v+"']").length>0)$(this).children("dt").find(".nd-checked").show();else $(this).children("dt").find(".nd-checked").hide()})}}}
function agi(a){var b=new nzy();b.append("<div id=\"div_DefaultF_2079\" isform=\"1\" class=\"nui-menu\" onclick=\"javascript:$(this).attr('isShowing',1);\" entid=\"2079\" style=\"overflow:hidden;width: 455px; height: 453px;position :absolute ; left :0; top :0; display :none ;z-index:20100;background: #FFFFFF; padding:0px 0px 0px 10px;\">\n");b.append("<div id=\"div_FormHtml_DefaultF_2079\" >");b.append("    <div class=\"defaultform \"  style=\"margin-left: 0px;\">");b.append("        <div class=\"frame-div\">");b.append("            <ul class=\"ul-group\"  style=\"width: 510px;margin-top: 10px;\">");b.append("                <li class=\"li-area  \"  style=\"display:none;\">");b.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:0px;\">");b.append("                        </label>");b.append("                    <div class=\"field-content pad17\" style=\"margin-left:275px;margin-top:0px;\">");b.append("                        <div class=\"aui_buttons\" style=\"background-color: #ffffff;border-top-width:0px;\">");b.append("                            <button class=\"aui_state_highlight\" indexid=\"4\" type=\"button\">确&nbsp;&nbsp;定</button>");b.append("                            <button type=\"button\" indexid=\"6\"  onclick=\"javascript:Dcx.FormRun.flowMsg.rvDlg.hpm.hide();\" style=\"margin-left:20px;\" title=\"\">取&nbsp;消</button>");b.append("                        </div>");b.append("                    </div>");b.append("                </li>");b.append("                <li  class=\"li-area  \"   style=\"");var k=0;if(ymr(a.PrcsUsers))k++;if(ymr(a.PrcsDepts))k++;if(ymr(a.PrcsPositions))k++;if(ymr(a.PrcsRoles))k++;if(k>2)b.append("display:none;");b.append("min-height: 35px;\">");b.append("                    <label class=\"area-title pad126\" style=\"width:21px;font-size: 12px;padding-top:4px;text-align: left;padding-left:12px;color:#999;\">");b.append("                        筛选：</label>");b.append("                    <div class=\"field-content pad17\" style=\"margin-left: 0px;width:320px;\">");b.append("                        <ul id=\"d2079_queryType\" class=\"tag-radio\">");var c=false;var d=false;if(!ymr(a.PrcsUsers)){b.append("                        <li value=\"1\" title=\"\" class=\""+(!c?"current":"")+"\"><a href=\"javascript:void(0);\"  target=\"\">按用户</a></li>");c=true;d=true}
if(!ymr(a.PrcsDepts)){b.append("                        <li value=\"2\" title=\"\" class=\""+(!c?"current":"")+"\"><a href=\"javascript:void(0);\"  target=\"\">按部门</a></li>");c=true}
if(!ymr(a.PrcsPositions)){b.append("                        <li value=\"3\" title=\"\" class=\""+(!c?"current":"")+"\"><a href=\"javascript:void(0);\"  target=\"\">按职位</a></li>");c=true}
if(!ymr(a.PrcsRoles)){b.append("                        <li value=\"4\" title=\"\" class=\""+(!c?"current":"")+"\"><a href=\"javascript:void(0);\"  target=\"\">按角色</a></li>");c=true}
b.append("                        </ul>");b.append("                </div>");b.append("                </li>");b.append("                <li class=\"li-area  \"  style=\"min-height: 400px;\">");b.append("                        </label>");b.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;\">");b.append("<input type=\"hidden\" sptreemsg=\"1\" id=\"vl_superTreeMsg27\" treeid=\"27\" entid=\"2079\" Js_removeRight=\"nxl(\" formtype=\"55\" ctrlprex=\"DefaultF_\" JsRightRemove=\"nxl(\" treenode_jsonclick1=\"ago(\" treenode_jsonclick2=\"ago(\" usecache1=\"0\" usecache2=\"1\" righthidden=\"0\" topnode_parentvalue1=\"0\" topnode_parentvalue2=\"0\" tree_dynamic1=\"0\" tree_dynamic2=\"1\" isdoubledatasource=\"1\" textfieldname=\"\" fieldname=\"PrcsUsers\" fielddtype=\"2\" isbindtovalue=\"1\" bindmode=\"0\" moduletype=\"0\" parentfieldname1=\"ParentId\" textfieldname1=\"DeptName\" valuefieldname1=\"DeptId\" parentfieldname2=\"\" textfieldname2=\"RealName\" valuefieldname2=\"UserName\" leftdrag=\"0\" rightdrag=\"0\" docallback=\"0\" linkfieldname=\"DeptId\" treenodecount=\"24\">");b.append("<div id=\"sptree27\" class=\"sptree\" style=\"width: 426px; height: 353px;display: block;\" treeid=\"27\" istree=\"1\" lastentid=\"2079\"  lastfieldname=\"PrcsUsers\">");b.append("<div id=\"sptree-container27\">");b.append("<div id=\"selector27\" class=\"sptree-container left sptree_width\" style=\"width: 184px;height: 353px;\">");b.append("<div id=\"title27\" class=\"sptree_title\">");b.append("<div class=\"sptree_tab\">");b.append("<a id=\"sptree_tab27\" class=\"tab_now\" href=\"javascript:void(0);\">请选择</a></div>");b.append("<div class=\"tree-ok\"><a href=\"javascript:void(0);\" isAddAllTree=\"1\" style=\""+(!d?"display:none;":"")+"\" onclick=\"javascript:yra(this);\">全选</a></div>");b.append("</div>");b.append("<div id=\"sptree_leftcontainer27\" class=\"sptree_height\">");b.append("<div id=\"sptree_left27\" class=\"sptree-list dcx-scroll\" style=\"width: 180px; height: 331px;\">");b.append("<div contentType=\"1\"></div><div contentType=\"2\"></div><div contentType=\"3\"></div><div contentType=\"4\"></div></div>");b.append("</div>");b.append("</div>");b.append("<div id=\"sptree_right27\" class=\"sptree-container sptree_width right\" style=\"width: 180px;height: 353px;\">");b.append("<div class=\"sptree_title\">");b.append("<div class=\"fs_tit\">");b.append("已选项</div>");b.append("<div class=\"right-count\" id=\"sptree-rightCount27\">");b.append("(<span>0</span>)</div>");b.append("<div class=\"fs_tit_op\">");b.append("<a class=\"fs_empty\" href=\"javascript:void(0);\" onclick=\"javascript:lbd(this);\">");b.append("清空</a></div>");b.append("<div class=\"tree-ok\">");b.append("<a href=\"javascript:void(0);\" onclick=\"javascript:zks(this);\">确定</a></div>");b.append("</div>");b.append("<div class=\"sptree_height\">");b.append("<div id=\"sptree_rightcontainer27\" class=\"sptree-list sptree_selected dcx-scroll\" style=\"height: 331px;\">");b.append("<ul id=\"rightlist_ul27\" class=\"ul-node-list\" isrightlist=\"1\"></ul>");b.append("<p id=\"overflow\" class=\"sptree-awoke fs_hit none\"><span class=\"fs_ico_warn\"></span></p>");b.append("</div>");b.append("</div>");b.append("</div>");b.append("</div>");b.append("</div>");b.append("                    </div>");b.append("                </li>");b.append("            </ul>");b.append("        </div>");b.append("    </div>");b.append("</div>");b.append("<div id=\"DefaultF_2079_Dropdown\" dropdown=\"1\" entid=\"2079\">");b.append("    <div id=\"VL_DefaultF_2079_Dropdown\" dropdown=\"1\" entid=\"2079\">");b.append("    </div>");b.append("</div>");b.append("</div>");return b.toString()}
function qxa(a,b,c){var d=new nzy();d.append("<div style=\"width: 700px; min-height: 453px; position: absolute; left: 807px; top: 137px;display: none;\" class=\"drop-dialog  dropdown\" id=\"div_DefaultF_2078\" moveupdown=\"1\" dealtitle=\"1\" left=\"-5\" top=\"40\">");d.append("    <div class=\"overlay-b \" style=\"position: absolute;width: 700px; height: 100%; opacity: 1.0!important;filter: alpha(opacity=100)!important;\">");d.append("        <div style=\"position: relative;\" class=\"drop-dialog-content\">");d.append("            <div class=\"drop-dialog-bd\">");d.append("                <div style=\"display: block;\" class=\"usercard-content\"> ");d.append("<div class=\"arrow arrow_t\" node-type=\"arrow\" style=\"left: 38px;\"></div>");d.append("<div id=\"div_FormHtml_DefaultF_2078\" >");d.append("    <div class=\"defaultform \">");d.append("        <div class=\"frame-div\" style=\"padding-left: 30px;;\">");d.append("            <ul class=\"ul-group\"  style=\"width: 660px;_width: 640px;\">");d.append("                <li  class=\"li-area  \"   style=\"min-height: 35px;\">");d.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");d.append("                        下一步骤<span style=\"color:red;line-height: 20px;\"> *</span></label>");d.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;width:420px;\">");d.append("                            <div class=\"form-radio\"  id=\"d2078_NextNode\" style=\"float:left;clear:none;\">");if(!ymr(a)){for(var i=0;i<a.length;i++){d.append("<span class=\"form-radio-item\"><input id=\"ddcx_2078_NextNodeId_"+i+"\" name=\"ddcx_2078_NextNodeId\" type=\"radio\" "+(i==0?" checked ":"")+"  value=\""+a[i].NodeId+"\" text=\""+a[i].NodeName+"\" class=\"form-ckb\"  /><label for=\"ddcx_2078_NextNodeId_"+i+"\">");if(a[i].NodeId>0)d.append("第"+a[i].Step+"步."+a[i].NodeName+"");else d.append(""+a[i].NodeName+"");d.append("</label></span>")}}
d.append("                           </div>");d.append("                    </div>");d.append("                </li>");var e=a[0];var f=true;if(e.NodeId>0)f=false;d.append("                <li class=\"li-area clearfix \"  isMainDeal=\"1\" style=\"min-height: 60px;"+(f?"display:none;":"")+"\">");d.append("                    <label class=\"area-title pad126\"  style=\"width:81px;font-size: 13px;padding-top:20px;\">");d.append("                        主办人<span style=\"color:red;line-height: 20px;\"> *</span></label>");d.append("                    <div class=\"field-content pad17\">");d.append("                        ");d.append("<div id=\"dcx_mainUserBtn\" class=\"dcx-msgtoolbar clearfix\" style=\"width:420px;_height: 23px;*height:36px;\" title=\"请点击，设置主办人。\" onclick=\"javascript:cjm(this,"+b+",'"+c+"',1);\" >");d.append("<div class=\"dcx-msgtoolbar2 \" style=\"padding-top:0px;_padding: 4px 6px 0px 6px;float:left;clear:none;width:340px;height: auto;\">");var g=-1;var h=null;var j=null;var k=null;d.append("<div class=\"tag_edit S_line2\" id=\"d2078_MainReceiver\" style=\"border-width:0px;\" >");d.append("<div class=\"fake_input S_bg5 S_line2\" style=\"border-width:0px;padding-top: 0px;margin-top: 0px;\" >");if(!ymr(e.PrcsUsers)){j=e.PrcsUsers.split(',');k=e.PrcsUserNames.split(',');if(!ymr(j)&&j.length>0&&!isNaN(j[0])&&parseInt(j[0],10)>0){Dcx.FormRun.flowMsg.mainUserId=parseInt(j[0],10);Dcx.FormRun.flowMsg.mainUserName=k[0];g=Dcx.FormRun.flowMsg.mainUserId;h=Dcx.FormRun.flowMsg.mainUserName;d.append("<div class=\"W_btn_arrow tag\" userId=\""+j[0]+"\" userName=\""+k[0]+"\" style='float:left;clear:none;'><span class=\"S_func1\">"+k[0]+"<a href=\"javascript:void(0)\" class=\"W_ico12 icon_close\"></a></span></div>")}}else{d.append("<span style=\"font-weight:bold;\">+</span> 请选择主办人")}
d.append("</div>");d.append("</div>");d.append("</div>");d.append("<div  class=\"dcx-msgtoolbar3 \" style=\"float:right;clear:none;_height: 36px;\"><div  class=\"dcx-msgtoolbar4 \"></div></div>");d.append("</div>");d.append("                    </div>");d.append("                </li>");var l="经办人";if(f)l="通知人员";d.append("                <li class=\"li-area  clearfix\" style=\"height: 98px;\">");d.append("                    <label class=\"area-title pad126\" isDealLbl=\"1\" style=\"width:81px;font-size: 13px;padding-top:20px;\">");d.append("                        "+l+"</label>");d.append("                    <div class=\"field-content pad17\" style=\"\" >");d.append("<div id=\"dcx_receiverBtn\" class=\"dcx-msgtoolbar clearfix\" style=\"width:420px;height: 65px;overflow:hidden;\" title=\"请点击，设置"+l+"。\" onclick=\"javascript:cjm(this,"+b+",'"+c+"',2);\" >");d.append("<div class=\"dcx-msgtoolbar2 dcx-scroll dcx-msg4\" style=\"padding-top:5px;float:left;clear:none;width:377px;hidden;height:49px;\">");d.append("<div class=\"tag_edit S_line2\" id=\"d2078_Receiver\" style=\"border-width:0px;\" >");d.append("<div class=\"fake_input S_bg5 S_line2\" style=\"border-width:0px;padding-top: 0px;margin-top: 0px;\" >");if(!ymr(e.PrcsUsers)){if(!ymr(j)&&j.length>0){var m=new Array();var n=new Array();for(var i=0;i<j.length;i++){if(!isNaN(j[i])&&parseInt(j[i],10)>0&&parseInt(j[i],10)!=g){m.push(j[i]);n.push(k[i]);d.append("<div class=\"W_btn_arrow tag\" userId=\""+j[i]+"\" userName=\""+k[i]+"\" style='float:left;clear:none;'><span class=\"S_func1\">"+k[i]+"<a href=\"javascript:void(0)\" class=\"W_ico12 icon_close\"></a></span></div>")}}
Dcx.FormRun.flowMsg.rcUserIds=m;Dcx.FormRun.flowMsg.rcUserNames=n}}else{d.append("<div    style=\"margin-top:15px;\" isDealDiv=\"1\" ><span style=\"font-weight:bold;\">+</span> 请选择"+l+"</div>")}
d.append("</div>");d.append("</div>");d.append("</div>");d.append("<div  class=\"dcx-msgtoolbar3 \" style=\"float:right;clear:none;\"><div  class=\"dcx-msgtoolbar4 \" style=\"margin-top: 22px;\"></div></div>");d.append("                    </div>");d.append("                </li>");d.append("                <li class=\"li-area  h55\"  style=\"min-height:140px;*min-height:155px;\">");d.append("                    <div class=\"field-content pad17\" style=\"margin-left: 40px;*margin-left: 40px;-margin-left: 20px;\">");d.append("                        <span class=\"form-ctr\" >");d.append(DcxEditor.pwg({"id":"d2078_SendMsgContent","title":false,"width":420,"height":104,"map":false,"kwl":"发 布"}));d.append("                    </span></div>");d.append("                </li>");d.append("                <li class=\"li-area   \"  style=\"min-height: 30px;display:none;\">");d.append("                    <label class=\"area-title pad126\" style=\"float:left;clear:none;width:81px;font-size: 13px;padding-top:6px;\">");d.append("                        同时发送</label>");d.append("                    <div class=\"field-content pad17\" style=\"float:left;clear:none; margin-left: 10px;\">");d.append("                        ");d.append("                            <div id=\"d2078_SendOtherMsg\" class=\"form-radio\" >");d.append("                                <span class=\"form-radio-item\">");d.append("                                    <input id=\"d2078_0\" name=\"d2078_g\" type=\"checkbox\"");d.append("                                        text=\"手机短信\" value=\"1\" /><label  for=\"d2078_0\">手机短信</label></span>");d.append("                                <span class=\"form-radio-item\">");d.append("                                    <input id=\"d2078_1\" name=\"d2078_g\" type=\"checkbox\"");d.append("                                        text=\"外部邮件\" value=\"2\" /><label  for=\"d2078_1\">外部邮件</label></span>");d.append("                                <span class=\"clearfix\"></span>");d.append("                            </div>");d.append("                        </span>");d.append("                    </div>");d.append("                </li>");d.append("                <li class=\"li-area  \"  style=\"min-height:60px;width:550px;\">");d.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");d.append("                        </label>");d.append("                    <div class=\"field-content pad17\" style=\"margin-left: 270px;*margin-left: 270px;-margin-left: 190px;margin-top:15px;\">");d.append("                        <div class=\"aui_buttons\" style=\"background-color: #ffffff;border-top-width:0px;\">");d.append("                            <button class=\"aui_state_highlight\"  onclick=\"javascript:lfm("+b+",'"+c+"');\" indexid=\"4\" type=\"button\">提&nbsp;&nbsp;交</button>");d.append("                            <button type=\"button\" indexid=\"6\" onclick=\"javascript:Dcx.FormRun.flowMsg.$divSumbDlg.hide();\" style=\"margin-left:20px;\" title=\"继续编辑\">取&nbsp;消</button>");d.append("                        </div>");d.append("                    </div>");d.append("                </li>");d.append("            </ul>");d.append("        </div>");d.append("    </div>");d.append("</div>");d.append("<div id=\"DefaultF_2078_Dropdown\" dropdown=\"1\" entid=\"2078\">");d.append("    <div id=\"VL_DefaultF_2078_Dropdown\" dropdown=\"1\" entid=\"2078\">");d.append("    </div>");d.append("</div>");d.append("                </div>");d.append("            </div>");d.append("            <div class=\"arrow arrow-top\" style=\"left:530px;\"></div>");d.append("        </div>");d.append("    </div>");d.append("</div>");return d.toString()}
function byq(a,b){var c=new nzy();var d=a;var e=b;if(typeof(a)=="string"){d=a.split(',');e=b.split(',')}
if(!ymr(d)&&d.length>0){for(var i=0;i<d.length;i++){if(!ymr(d[i])){c.append("<div class=\"W_btn_arrow tag\" userId=\""+d[i]+"\" userName=\""+e[i]+"\" style='float:left;clear:none;'><span class=\"S_func1\">"+e[i]+"<a href=\"javascript:void(0)\" class=\"W_ico12 icon_close\"></a></span></div>")}}}
return c.toString()}
function col(a,b){if(b==undefined||b==null||b=="")b="AjaxF_";var c=ntt(a,b);if(c<1)return null;var d=DcxRun[b+c];if(d==undefined||d==null)d=DcxRun["AjaxF_"+c];else return d;if(d==undefined||d==null)d=DcxRun["DefaultF_"+c];else return d;if(d==undefined||d==null)d=DcxRun["ListF_"+c];else return d;if(d==undefined||d==null)d=DcxRun["SearchF_"+c];if(d==undefined||d==null)return null;else return d}
DcxForm.GetAllFormMsg=col;function jyh(a){var b="AjaxF_";var c=ntt(a,b);if(c<1)return null;var d=DcxRun[b+c];if(d==undefined||d==null)d=DcxRun["DefaultF_"+c];else return"AjaxF_";if(d==undefined||d==null)d=DcxRun["ListF_"+c];else return"DefaultF_";if(d==undefined||d==null)d=DcxRun["SearchF_"+c];else return"ListF_";if(d==undefined||d==null)return null;else return"SearchF_"}
DcxForm.GetAllFormMsg=col;function otx(a,b){var c=col(a,b);if(ymr(c))return null;return c.EntMsg["E"+a]}
DcxForm.yci=otx;function azi(a,b){var c=ntt(a,b);if(c<1)return-3;var d=DcxRun[b+c];return d.OperateType?d.OperateType:-2}
DcxForm.GetState=azi;function pet(a,b,c){if(isNaN(c)||c!=2)c=1;var d=ntt(a,b);if(d<1)return null;var e=DcxRun[b+d];try{e.OperateType=(c==2?2:1)}catch(err){return false}}
DcxForm.SetState=pet;function bke(a,b){var c=col(a,b);if(ymr(c))return null;return c.EntMsg["E"+a]}
DcxForm.GetEntMsg=bke;function npp(a,b){var c={MKeyFieldValue:"",KeyFieldValue:"",OpTypeId:0};var d=col(a,b);if(ymr(d))return null;return d.MKeyFieldValue}
DcxForm.GetMKeyValue=npp;function zgp(a,b){var c=bke(a,b);if(ymr(c))return null;return c["KeyFieldValue"]}
DcxForm.GetKeyValue=zgp;function omb(b,c,d,e){var f=bke(b,c);if(ymr(f))return null;f["KeyFieldValue"]=d;f=col(b,c);f["MKeyFieldValue"]=d;var g=f.EntMsg["E"+b];g.KeyFieldValue=d;if(e>-1&&!isNaN(e))f.OperateType=e;var h=yci(b,c);var i=yvm(b,c);var j=i.find("[entid="+b+"][isfield=1][fieldname='"+h.KeyField+"']");if(j.length>0){j.each(function(){var a=$(this);a.val(d)})}}
DcxForm.SetKeyValue=omb;function arm(a,b){var c={MKeyFieldValue:"",KeyFieldValue:"",OpTypeId:0};var d=col(a,b);if(ymr(d))return null;c.MKeyFieldValue=d.MKeyFieldValue;c.KeyFieldValue=d.EntMsg["E"+a]["KeyFieldValue"];c.OpTypeId=d.OperateType;return c}
DcxForm.GetKeyMainMsg=arm;function mxx(a,b){return azi(a,b)}
function yci(a,b){var c=col(a,b);if(ymr(c))return null;var d={EntId:a,CtrlPrex:b,MKeyFieldValue:"",KeyFieldValue:"",MenuId:-1,TableName:"",OperateType:1,KeyField:"",IsMEnt:true,KeydtId:2,JoinKeyField:""};if(ymr(c))return null;var e=c.EntMsg["E"+a];d.MKeyFieldValue=c.MKeyFieldValue;d.KeyFieldValue=e["KeyFieldValue"];d.KeyField=e["KeyField"];d.TableName=e["DBTableName"];d.MenuId=c.MenuId;d.KeydtId=e["KeydtId"];d.JoinKeyField=e["JoinKeyField"];d.OperateType=c.OperateType;d.IsMEnt=e["IsMEnt"];return d}
DcxForm.GetFormMainMsg=yci;function ntt(a,b){var c=-1;var d=null;c=DcxRun.MEnt["_"+a];if(!isNaN(c))return c;else return a}
DcxForm.GetMainEntId=ntt;function IsChildEntity(a,b){if(b==undefined||b==null||b=="")b="AjaxF_";var c=ntt(a,b);if(c<1)return false;var d=DcxRun[b+c];if(d==undefined||d==null)return true;if(c!=a)return true;return false}
DcxForm.IsChildEnt=IsChildEntity;function leq(a,b){var c=ntt(a,b);var d=col(a,b);if(ymr(d))return null;var e=d.EntMsg["E"+a];var f=e.$dropdown;if(!ymr(f)&&f.length>0)return f;else{f=d.$dropdown.children("#VL_"+b+a+"_Dropdown");if(ymr(f)||f.length<1){var g="<div id=\"VL_"+b+a+"_Dropdown\" dropdown=\"1\" EntId=\""+a+"\"></div>";d.$dropdown.append(g);f=d.$dropdown.children("#VL_"+b+a+"_Dropdown")}
e.$dropdown=f}
return f}
DcxForm.GetFormDdlContainer=leq;function xkb(a,b){var c=ntt(a,b);var d=col(a,b);if(ymr(d))return null;var e=d.EntMsg["E"+a];var f=d.EntMsg["E"+a].$ctrlArea;if(!ymr(f)&&f.length>0)return f;else{f=d.$ctrlArea.children().filter("#VL_"+b+a+"_CtrlArea");if(ymr(f)){f=null}
e.$ctrlArea=f}
return f}
DcxForm.GetLfCtrlContainer=xkb;function mpb(a,b){var c=ntt(a,b);var d=col(a,b);if(ymr(d))return null;var e=d.EntMsg["E"+a];var f=e.$trArea;if(!ymr(f)&&f.length>0)return f;else{f=d.$trArea.children().filter("#VL_"+b+a+"_TrArea");if(ymr(f)){f=null}
e.$trArea=f}
return f}
DcxForm.GetLfTrContainer=mpb;function yvm(a,b){var c=ntt(a,b);var d=col(a,b);if(ymr(d))return null;var e=d.$form;if(ymr(e)||e.length<1){e=$("#div_FormHtml_"+b+c);if(!ymr(e)&&e.length>0){d.$form=e}}
return e}
DcxForm.GetHtmlContainer=yvm;function klx(a,b){var c=ntt(a,b);var d=col(a,b);if(ymr(d))return null;var e=d.$container;if(ymr(e)||e.length<1){e=$("#div_"+b+c);if(!ymr(e)&&e.length>0){d.$container=e}}
return e}
DcxForm.GetContainer=klx;function xri(a,b){var c=ntt(a,b);var d=col(a,b);if(ymr(d))return null;var e=d.EntMsg["E"+a];var f=e.$listContainer;if(ymr(f)||f.length<1){f=$("#div_List_"+b+a);if(!ymr(f)&&f.length>0){e.$listContainer=f}}
return f}
DcxForm.GetListContainer=xri;function mwu(a,b,c){var i=0;var d=$(a);var e=false;while(i<25&&d.length>0){if(d.attr("isgroup")=="1"){e=true;break}
d=d.parent();i++}
if(e)return d;else return null}
DcxForm.GetRow=mwu;function ycf(a,b,c){var d=DcxForm.GetRow(a,b,c);var i=-1;if(!ymr(d)&&d.length>0)i=parseInt(d.attr("rowix"),10);if(isNaN(i)||ymr(i))i=-1;return i}
DcxForm.GetRowIdx=ycf;function kiq(a,b,c){var d=a;var i=-1;if(!ymr(d)&&d.length>0)i=parseInt(d.attr("rowix"),10);if(isNaN(i)||ymr(i))i=-1;return i}
DcxForm.GetRowIdx2=kiq;function eml(a,b,c){var d=DcxForm.GetRow(a,b,c);var i=-1;if(!ymr(d)&&d.length>0)i=parseInt(d.attr("state"),10);if(isNaN(i)||ymr(i))i=-1;return i}
DcxForm.umu=eml;function wuh(a){var b=a.parent();var c=false;var i=0;while(!ymr(b)&&b.length>0&&i<15){if(b.hasClass("form-ctr")){c=true;break}else{b=b.parent()}
i++}
if(!c)return null;var d=b.next();c=false;i=0;while(!ymr(d)&&d.length>0&&i<15){if(d.attr("iserr")=="1"){c=true;break}else{d=d.next()}
i++}
if(c)return d;else{var e=$("<div class=\"form-vld\" iserr=\"1\" title=\"点击关闭\" ></div>");b.after(e);return e}
return null}
DcxForm.GetVldContainer=wuh;function wyb(a,b){if(ymr(b)||b.length<1)b=vuj(a);if(ymr(b)||b.length<1)b=a;var c=b.next();i=0;while(!ymr(c)&&c.length>0&&i<20){if(!ymr(c.attr("IsField")))break;c=c.next();i++}
if(ymr(c)||c.length<1){c=b.prev();i=0;while(!ymr(c)&&c.length>0&&i<20){if(!ymr(c.attr("IsField")))break;c=c.prev();i++}
if(ymr(c)||c.length<1)return null}
return c}
DcxForm.GetBindingVCtrl=wyb;function leb(a,b){var c=wyb(a,b);if(!ymr(c)&&c.length>0)return c.val();else return""}
DcxForm.GetBindingVCtrlValue=leb;function xjm(a,v,b){var c=wyb(a,b);if(!ymr(c)&&c.length>0)c.val(v)}
DcxForm.SetBindingVCtrlValue=xjm;function jpy(a){if(ymr(a)||a.length<1)return null;if(!ymr(a.attr("IsForField")))return a;var b=a.prev();i=0;while(!ymr(b)&&b.length>0&&i<20){if(!ymr(b.attr("IsForField")))break;b=b.prev();i++}
if(ymr(b)||b.length<1){b=a.next();i=0;while(!ymr(b)&&b.length>0&&i<20){if(!ymr(b.attr("IsForField")))break;b=b.next();i++}
if(ymr(b)||b.length<1)return null}
return b}
DcxForm.GetBindingHCtrl=jpy;function vuj(a){if(ymr(a)||a.length<1)return null;var b=a;var c=b;var i=0;while(!ymr(c)&&c.length>0&&i<20){if(!ymr(c.attr("IsForField")))break;c=c.parent();i++}
if(ymr(c)||c.length<1)return null;else return c}
DcxForm.GetTopHCtrl=vuj;function klu(a){var b=false;var c=a.parent();while(!ymr(c)&&c.length>0){if(c.attr("isforfield")=="1"){b=true;break}else{c=c.parent()}}
if(b)return c.next();else return null}
DcxForm.GetRCtrl=klu;function iwq(a,b,c){var d=col(a,b);d.MKeyFieldValue=c;d.OperateType=2;d.EntMsg["E"+a]["KeyFieldValue"]=c}
function ucc(a,b){var c=col(a,b);c.MKeyFieldValue="";c.OperateType=1;c.EntMsg["E"+a]["KeyFieldValue"]=""}
function jhc(a,b,c){var d=DcxRun[b+a];d.MKeyFieldValue="";d.OperateType=c;d["EntMsg"]["E"+a]["KeyFieldValue"]=""}
DcxForm.SetFormState=jhc;function vnn(a){var b=$.trim(a.attr("state"));if(!ymr(b))b=parseInt(b,10);else b=-1;var c=1;if(b==2)c=1;else if(b==3||b==1){c=2}else if(b==5){c=3}else c=1;return c}
function IsIn(){if(arguments.length==0)return true;var a=arguments[0];for(var i=1;i<arguments.length;i++){if(a==arguments[i])return true}
return false}
function hdy(a,b){if(!isNaN(b))b=parseInt(b,10);else return a;if(b==1||b==5){a=a.replaceAll(",","");N=isNaN(a);if(N)return"0";else return a}
return a}
DcxForm.MakNumOk=hdy;function tjj(a,b){if(!isNaN(b))b=parseInt(b,10);else return a;if(a==null||a=="")return a;switch(b){case 1:if(isNaN(a))return null;else return parseInt(a,10);break;case 2:return a;break;case 3:return new Date(Date.parse(a.replace(/-/g,"/")));break;case 4:return!a||a=="0"||a=="false"?false:true;break;case 5:a=a.replaceAll(",","");if(isNaN(a))return null;else return parseFloat(a);break;default:return a;break}
return a}
function ipu(a){return new Date(Date.parse(a.replace(/-/g,"/")))}
DcxForm.ConvertMoney=uug;String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")}
function gar(a){var b=new Date();var c=b.getTime()+a;while(true){b=new Date();if(b.getTime()>c)return}}
function sqc(d){var a="";var t=d.split(",");var b=t.length;for(i=0;i<b;i++){flag=true;for(j=i+1;j<b;j++){if(t[i]==t[j]){flag=false;break}}
if(flag==true)a=a+t[i]+","}
return a}
function hwn(){var a=new Object();var b=window.location.search.substring(1);var c=b.split("& ");for(var i=0;i<c.length;i++){var d=c[i].indexOf('= ');if(d==-1)continue;var e=c[i].substring(0,d);var f=c[i].substring(d+1);a[e]=unescape(f)}
return a}
function tzm(a){var b=new RegExp("(^|\\?|&)"+a+"=([^&]*)(\\s|&|$)","i");if(b.test(location.href))return unescape(RegExp.$2.replace(/\+/g," "));return""}
function tbn(a){if(location.href.indexOf("?")==-1||location.href.indexOf(a+'=')==-1){return''}
var b=location.href.substring(location.href.indexOf("?")+1);var c=b.split("&");var d,paraName,paraValue;for(var i=0;i<c.length;i++){d=c[i].indexOf('=');if(d==-1){continue}
paraName=c[i].substring(0,d);paraValue=c[i].substring(d+1);if(paraName==a){return unescape(paraValue.replace(/\+/g," "))}}
return''}
function fhy(a,b,c){if(ymr(a))return"";if(ymr(b))return a;if(c==undefined||c==null||$.trim(c))c=true;if(c!=true)c=false;b=b+"";var d=a.split(b);if(d.length<2||ymr(d))return a;if(c)return $.trim(d[0]);else return $.trim(d[1])}
function rnk(b){var c=true;var d="/WebServices/Form/Form_Run.asmx/rnk";$.ajax({type:"GET",cache:false,async:false,url:d,data:({"code":b}),dataType:'json',success:function(a){a=hmy(a);c=a}});return c}
DcxForm.VCodeIsOk=rnk;function GetVerifyImg(a){if(ymr(a))return;var b=vuj($(a));if(ymr(b)||b.length<1)return;var c=b.find("img");if(ymr(c)||c.length<1)return;var d=c.attr("len");var e=c.width();var f=c.height();var g=c.attr("onlynum");if(isNaN(d)||parseInt(d)<1)d=4;if(isNaN(e)||parseInt(e)<1)e=120;if(isNaN(f)||parseInt(f)<1)f=60
if(isNaN(g)||parseInt(g)<1)g=0;else g=1;c.get(0).src="/ajax/VerifyImage.ashx?len="+d+"&width="+e+"&height="+f+"&onlyNum="+g+"&xxx="+Math.random();if(ymr(h)||h.length<1)return;var h=b.find("input:text");h.val('')}
DcxForm.CreateVCodeImg=GetVerifyImg;function sjg(a,b,c,d,f){var g=-1;var h=wyb($(a));if(ymr(h)||h.length<1)return false;var i=$.trim(h.attr("oldValue"));var v=$.trim(h.val());if(d){g=umu(h.get(0),b);if(g==1||g==3){if(ymr(i))h.attr("oldValue",v)}else h.removeAttr("oldValue")}else{try{g=azi(b,c)}catch(e){g=1}
if(g==2){if(ymr(i))h.attr("oldValue",v)}else h.removeAttr("oldValue")}}
function eor(a,b,c,d,e){var g=$(a);var h=wyb(g);if(ymr(h)||h.length<1)return false;if(!e){var i=jpy(h);var j=i.find(".uped");var k=$(a).val();if(j.length>0){j.show();var l=j.find("a");var f=bhh(k);l.attr("href",k).html(f)}else{var m=new nzy();m.append("<div class=\"uped\">");m.append("      <a href=\""+k+"\" title=\"打开\" target=\"_blank\" class=\"link\">"+bhh(k)+"</a>");m.append(" </div>");i.append(m.toString())}}
h.val(g.val());h.attr("ischange","1");if(d)wbx(a,b,c)}
var ygs=null;var heh=false;var wks="";var mouseover_id="";var ipe="";var uvp="";var mouseover_divId="";var vrl="";var ixl=false;var ucw=false;var gii="";var vyt="";var kmd=null;var vzw="";var CurFormCtrlId_LF="";var wro=null;var ixa=null;var hee=null;var fpa=null;var xdl=null;var jil=null;var uvl=null;var gam=null;String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")}
function quc(d){return d.constructor==Date}
function rfo(n){return n==null}
function dwz(i){return typeof(i)=="number"}
function pbk(o){return typeof(o)=="object"}
function fhv(j,l,m){var n=tzm("PrcsId");if(!ymr(n)&&!isNaN(n))n=parseInt(n,10);else n=-1;if(n>0&&(l=="AjaxF_"||l=="DefaultF_")){var o=col(j,l);if(o.IsFlow==true){if(ymr(m))m=yvm(j,l);var p="ajaxform";if(l=="DefaultF_")p="defaultform";var q=new nzy();var s=794;if(m.width()>10)s=m.width();var t=tzm("FlowId");if(!ymr(t)&&!isNaN(t))t=parseInt(t,10);else t=-1;var u=tzm("RunId");if(!ymr(u)&&!isNaN(u))u=parseInt(u,10);else u=-1;var v=tzm("NodeId");if(!ymr(v)&&!isNaN(v))v=parseInt(v,10);else v=-1;var w=tzm("IsMain");if(!ymr(w)&&!isNaN(w))w=parseInt(u,10);else w=0;hee={FlowId:t,NodeId:v,RunId:u,PrcsId:n,IsMain:w,BackToPrcsId:-1,ParentId:-1,IsPostNext:false,FirstManFlag:false};glg("DcxEditor.js","/js/Control/Editor/DcxEditor.js");var x="/WebServices/WorkFlow/FlowRun.asmx/LoadingFlowForm";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:x,data:"{FlowId:"+t+",RunId:"+u+",PrcsId:"+n+",NodeId:"+v+"}",dataType:'json',success:function(a){a=hmy(a);uvl=a.canWriteFieldList;gam=a.nodeObj;var b=gam.Json_Validate;var c=null;try{c=o.Validate}catch(err){}
if(!ymr(b)){try{b=eval("("+b+")")}catch(err){}}
if(ymr(c)||ymr(c.Ent)||c.Ent.length<1){c=b}else if(!ymr(b)&&!ymr(b.Ent)&&b.Ent.length>0){c.MaxVlId=c.MaxVlId+b.MaxVlId;for(var i=0;i<b.Ent.length;i++){var d=false;for(var k=0;k<c.Ent.length;k++){if(b.Ent[i].EntId==c.Ent[k].EntId){d=true;if(ymr(b.Ent[i].Fld)||b.Ent[i].Fld.length<1)break;if(ymr(c.Ent[k].Fld||c.Ent[k].Fld.length<1)){c.Ent[k].Fld=b.Ent[i].Fld;break}
for(var e=0;e<b.Ent[i].Fld.length;e++){if(!rfo(b.Ent[i].Fld[e].Vld)&&b.Ent[i].Fld[e].Vld.length>0){var f=false;for(var g=0;g<c.Ent[k].Fld.length;g++){if(b.Ent[i].Fld[e].FldId==c.Ent[k].Fld[g].FldId){f=true;for(var h=0;h<b.Ent[i].Fld[e].Vld.length;h++)c.Ent[k].Fld[g].Vld.push(b.Ent[i].Fld[e].Vld[h])}}
if(!f)c.Ent[k].Fld[g].Vld=b.Ent[i].Fld[e].Vld}}}}
if(!d)c.Ent.push(b.Ent[i])}}
ezo(j,l,uvl)},error:function(a){alert(JSON2.stringify(a))}});var y=null;if(window.top.wf_flowRunMsg!=undefined)y=window.top.wf_flowRunMsg;if(ymr(y))y=hee;if(hee.IsMain==1||hee.IsMain==true)y.IsMain=1;var z=null;if(window.top.oud!=undefined)z=window.top.oud;if(ymr(z))z=null;var A=new nzy();var B=$('body',document);A.append("<div class=\"aui_buttons\" style=\"position :fixed ;_position :absolute;width:"+(B.width()-40)+"px;top:0px;left:0px;display:block;padding-left:20px;padding-right:20px;\">\n");A.append("<button class=\"float-left aui_state_highlight\" indexId=\"1\" type=\"button\">痕迹</button>\n");A.append("<button class=\"float-left\"  indexId=\"2\"type=\"button\">流程图</button>\n");if(y.IsMain){A.append("<button class=\"float-left\"  indexId=\"3\"type=\"button\">驳回</button>\n");A.append("<button class=\"aui_state_highlight\" indexId=\"4\" type=\"button\">转交下一步</button>\n");A.append("<button type=\"button\" indexId=\"5\">暂存</button>\n")}else A.append("<button class=\"aui_state_highlight\" indexId=\"7\" type=\"button\">会签</button>\n");A.append("<button type=\"button\" indexId=\"6\">关闭</button>\n");A.append("</div>\n");var C=$(A.toString());B.prepend(C);var D=-1;try{D=B.css("padding-top");D=parseInt(D.toLowerCase().replace("px",""),10)}catch(err){D=-1}
if(D<40)B.css("padding-top","40px");if(ymr(Dcx.FormRun))Dcx.FormRun={};if(ymr(Dcx.FormRun.flowMsg))Dcx.FormRun.flowMsg={};Dcx.FormRun.flowMsg.nodeObj=y;Dcx.FormRun.flowMsg.mainObj=z;$('body,html',window.top.document).scrollTop(0);C.click(function(e){var a=$(e.target);var b=a.attr("indexId");if(ymr(z)){z=ftj(u,t)}
if(ymr(z)){y=src(u,t)}
if(!isNaN(b)){b=parseInt(b,10);var r=col(j,l);switch(b){case 1:dlg_imprint=ixq(y,2080,"MChildR_","痕迹");break;case 2:gmr(t,false);break;case 3:lth(a.get(0),j,l);break;case 4:oxz(a.get(0),j,l,1);break;case 5:var c=r.SubmitForm(false);break;case 6:byg();break;case 7:ykp(a.get(0),j,l);break}}})}}
if(ymr(xdl)||xdl.length<1)xdl=$('#div_DropDowImg:first');if(ymr(jil)||jil.length<1)jil=$('#div_DropDowImg2:first');xdl.mouseup(function(){if(vrl!="")$('#'+vrl).show()});jil.mouseup(function(){if(vrl!="")$('#'+vrl).show()});$(document).mouseup(function(a){documentMouseup(a)})}
DcxForm.InitForm=fhv;function rmg(d,f,g,h){if(f=='DefaultF_'||f=='AjaxF_'){var i=h;if(ymr(i))i=col(d,f);if(i.IsFlow==true){glg("FlowRun.js","/Js/WorkFlow/FlowRun.js");glg("LTreeRList.js","/js/Control/LTreeRList/LTreeRList.js")}else if(window.top.DcxHome!=undefined&&(ymr(i.OtherMsg)||i.OtherMsg.showToolbar)){var j=new nzy();var k=$('body',document);j.append("<div class=\"aui_buttons\" style=\"border-radius: 0px;border-top-width:0px;position :fixed ;_position :absolute;width:"+(k.width()-40)+"px;top:0px;left:0px;display:block;padding-left:20px;padding-right:20px;\">\n");j.append("<button class=\"float-left aui_state_highlight\" style=\"width:75px;\" indexId=\"1\" type=\"button\"><span style=\"position:relative;top:-1px;\">+</span> 新建</button>\n");j.append("<button class=\"aui_state_highlight\" indexId=\"2\" type=\"button\">提  交</button>\n");j.append("<button type=\"button\" indexId=\"3\">提交&新建</button>\n");j.append("<button type=\"button\" indexId=\"4\">提交&关闭</button>\n");j.append("<button type=\"button\" indexId=\"5\">关  闭</button>\n");j.append("</div>\n");var l=$(j.toString());k.prepend(l);var m=-1;try{m=k.css("padding-top");m=parseInt(m.toLowerCase().replace("px",""),10)}catch(err){m=-1}
if(m<40)k.css("padding-top","50px");$('body,html',window.top.document).scrollTop(0);l.click(function(e){var a=$(e.target);var b=a.attr("indexId");if(!isNaN(b)){b=parseInt(b,10);var c=false;var r=col(d,f);switch(b){case 1:yyr(d,f,true);break;case 2:c=r.SubmitForm(false);break;case 3:c=r.SubmitForm(true);break;case 4:c=r.SubmitForm(false,true);break;case 5:byg();break}}})}
if(!i.IsFlow&&!ymr(i.OtherMsg)&&!ymr(i.OtherMsg.msg)&&i.OtherMsg.msg.supportMsg&&i.OtherMsg.msg.showMode==1){if(ymr(g))g=yvm(d,f);var j=new nzy();j.append("<div id=\"dcx_SendMsgBtn\" class=\"dcx-msgtoolbar clearfix\" title=\"请点击，设置您要发送的消息。\" onclick=\"javascript:nwv(this,"+d+",'"+f+"',"+i.OtherMsg.msg.showMode+");\" >");j.append("<div class=\"dcx-msgtoolbar2 \" style=\"float:left;clear:none;\"><span style=\"font-weight:bold;\">+</span> 选择可视范围...</div>");j.append("<div  class=\"dcx-msgtoolbar3 \" style=\"float:right;clear:none;\"><div  class=\"dcx-msgtoolbar4 \"></div></div>");j.append("</div>");var n=$(j.toString());g.after(n);if(Dcx.FormRun==undefined||Dcx.FormRun==null)Dcx.FormRun={};if(Dcx.FormRun.sendMsg.fie==null){Dcx.FormRun.sendMsg.fie=n}
g.before(n.clone())}}
if(window.top.DcxHome!=undefined&&(f=='DefaultF_'||f=='AjaxF_'||f=='ListF_')){Dcx.qco(d,f)}}
DcxForm.InitAfterLoad=rmg;function dsr(a){var v=$(a).val();CKEDITOR.instances.dcxwf_YiJian.insertHtml(v+"。")}
function pid(a,b){var i=0;var c=$(b);var d=false;while(i<100&&c.length>0){var e=c.attr("id");if(e==a){d=true;break}
c=c.parent();i++}
return d}
function documentMouseup(a){if(vzw!=""){if(!pid(vzw,a.target)){$('#'+vzw).hide()}}
if(gii!=""){if(!pid(gii,a.target)){$('#'+gii).hide()}}
if(vrl!=""){var b=pid(vrl,a.target);if(!b){$('#'+vrl).hide();jil.hide();xdl.hide();if($(a.target).attr("id")!=ipe)$('#'+ipe).attr("class","lt-txt")}else{$('#'+ipe).attr("class","temp_txt")}}else{jil.hide();xdl.hide()}
if(Dcx.FormRun!=undefined&&Dcx.FormRun!=null&&Dcx.FormRun.sendMsg.tct!=null){if(Dcx.FormRun.sendMsg.tct.attr("IsShowing")=="2"){Dcx.FormRun.sendMsg.tct.attr("IsShowing",1)}else if(Dcx.FormRun.sendMsg.tct.attr("IsShowing")=="1"){if(Dcx.FormRun.sendMsg.tct.attr("isInDlg")!="1"){Dcx.FormRun.sendMsg.tct.hide();Dcx.FormRun.sendMsg.tct.attr("IsShowing",0);Dcx.FormRun.sendMsg.fie.find(".dcx-msgtoolbar4").css({"background-position":"0px 0px"})}}}}
function txt_mouseover(a,b){var c=null;if(mouseover_id!=a.id&&mouseover_id!=""){c=document.getElementById(mouseover_id)}
if(wks!=a.id&&wks!=""){c=document.getElementById(wks)}
mouseover_divId=b;mouseover_id=a.id;jil.css('display','block');jil.css('left',$('#'+a.id).offset().left+$('#'+a.id).width()-11+'px');jil.css('top',($('#'+a.id).offset().top+$('#'+a.id).height()/2+2)+'px')}
function eoo(a){}
function txt_mouseout(a){}
function quo(a,b){if(uvp!="")$('#'+uvp).hide();if(mouseover_divId!="")$('#'+mouseover_divId).hide();wks=a.id;ipe=wks;vrl=b;uvp=b;var c=$('#'+ipe).val();var d="";$('#'+ipe+"_hid").each(function(m){d=$('#'+ipe+"_hid").val()});ucw=false;$('#'+vrl).find("input").filter(":radio").each(function(m){ucw=true;if(this.value!=d)this.checked=false;else this.checked=true});ixl=false;d=","+d;$('#'+vrl).find("input").filter(":checkbox").each(function(m){ixl=true;this.checked=false;if(d.indexOf(","+this.value+",")>=0)this.checked=true;else this.checked=false});czz(a);$('#'+vrl).css('left',($('#'+a.id).offset().left+10)+'px');$('#'+vrl).css('top',$('#'+a.id).offset().top+$('#'+a.id).height()+7+'px');$('#'+vrl).show();$('#'+vrl).css('display','block');try{var e=$('#'+vrl).height();var f=document.documentElement?document.documentElement:document.body;var g=f.offsetHeight}catch(err){}
var h=-1;if(ixl||ucw){h=$('#'+vrl+'_c2').find('tr').length+1;var i=$('#'+a.id).width()+6;var j=-1;$('#'+vrl+" table").each(function(){j=$(this).width()+40;if(j>i)i=j})}else h=$('#'+vrl+'_c2').find('div').length;if(h>2){var k=h*20;if(k>400)k=400}
ofk(vrl,a)}
function czz(a){jil.hide();xdl.show();xdl.css('left',$(a).offset().left+$('#'+a.id).width()-11+'px');xdl.css('top',($(a).offset().top+$('#'+a.id).height()/2+2)+'px')}
function ofk(a,b){var c=dkv(b);var d=document.all[a];if(d==null)return;var e=b.offsetWidth;var f=b.offsetHeight;var g=c.X;var h=(c.Y+b.offsetHeight);d.style.pixelLeft=g;d.style.pixelTop=h;d.style.display='block';$('#'+a).show()}
function dkv(o){var t=o.offsetTop;var l=o.offsetLeft;while(o=o.offsetParent){t+=o.offsetTop;l+=o.offsetLeft}
return{X:l,Y:t}}
function pbh(a,b,c){if(c!=undefined)a=c+a;$("#"+a).find("input").filter(":radio").each(function(i){$(this).attr("checked",this.value==b)})}
DcxForm.pbh=function(a,b){var c=a.find("input:radio");if(c.length<1){DcxForm.cso(a,b);return}
c.each(function(i){$(this).attr("checked",this.value==b)})}
function GetRadioListValue(a){var b={Text:"",Value:""};$("#"+a).find("input").filter(":radio").filter(":checked").each(function(m){b.Text=$(this).attr("value");b.Value=$(this).attr("text")});return b}
function bgs(a){var b={Text:"",Value:""};var c="";var d="";$("#"+a).find("input").filter(":checkbox").filter(":checked").each(function(m){c+=$(this).attr("value")+",";d+=$(this).attr("text")+","});if(d.length>0)d=d.substr(0,d.length-1);b.Text=d;if(c.length>0)c=c.substr(0,c.length-1);b.Value=c;return b}
function nmd(a,b,c,d){var e=d.split(",");$("#"+a+"_"+c).filter("[List=0]").find(":checkbox").each(function(i){$(this).attr("checked",false);for(var k=0;k<e.length;k++){if(e[k]!=""&&e[k]==$(this).val()){$(this).attr("checked",true);break}}})};DcxForm.cso=function(a,b){b=b.split(",");a.find(":checkbox").each(function(i){$(this).attr("checked",false);for(var k=0;k<b.length;k++){if(b[k]!=""&&b[k]==$(this).val()){$(this).attr("checked",true);break}}})};function oxz(f,g,h){if(ymr(Dcx.FormRun.flowMsg))Dcx.FormRun.flowMsg={};var j=Dcx.FormRun.flowMsg;var k=j.$divSumbDlg;if(ymr(j.nextNodeList)){j.nextNodeList=ryu(j.nodeObj.FlowId,j.nodeObj.NodeId)}
if(ymr(j.$divSumbDlg)){var l=qxa(j.nextNodeList,g,h);k=$(l.toString());$(document.body).append(k);j.$divSumbDlg=k;var m=col(g,h);var n={};n.xss=k.find("#d2078_SendMsgContent");n.$nextNode=k.find("#d2078_NextNode");n.$mainUserBtn=k.find("#dcx_mainUserBtn");n.$receiverBtn=k.find("#dcx_receiverBtn");n.$sendOtherMsg=k.find("#d2078_SendOtherMsg");Dcx.FormRun.flowMsg.ctrl=n;DcxEditor.Init(n.xss,"txtMsgContent","inputCharCount","/Ajax/UploadFile/Upload.ashx",true);n.xss=DcxEditor.zcw;DcxEditor.wbt=7;DcxEditor.kwi="/Ajax/UploadFile/Upload.ashx";if(!ymr(m.OtherMsg)&&!ymr(m.OtherMsg.msg)&&m.OtherMsg.msg.supportMsg){var o=false;var p=m.OtherMsg.msg;if(!ymr(p.msgContent)){var q="";var r=p.msgContent;for(var i=0;i<r.length;i++){if(!ymr(r[i].b))q=q+r[i].b;if(!ymr(r[i].fid)&&r[i].fid>0){o=true;q=q+"{@"+r[i].fn+","+r[i].fid+"}"}
if(!ymr(r[i].l))q=q+r[i].l}
DcxEditor.sec(q)}
if(!ymr(p.send)){if(p.send.sms==true)n.$sendOtherMsg.find("#d2078_0").attr("checked",true);if(p.send.email==true)n.$sendOtherMsg.find("#d2078_1").attr("checked",true);if(p.send.note==true)n.$sendOtherMsg.find("#d2078_2").attr("checked",true)}}
n.$nextNode.unbind("click").bind("click",function(e){var a=$(e.target);var b=k.find("[isDealLbl=1]");var c=k.find("[isDealDiv=1]");var d=k.find("[isMainDeal=1]");if(parseInt(a.attr("value"),10)<1){if(!ymr(b)&&b.length>0)b.text("通知人员");if(!ymr(c)&&c.length>0)b.text("请选择通知人员");d.hide();Dcx.FormRun.flowMsg.mainUserId=0;Dcx.FormRun.flowMsg.mainUserName=null;d.find(".S_bg5").html("<span style=\"font-weight:bold;\">+</span> 请选择主办人")}else{if(!ymr(b)&&b.length>0)b.text("经办人");if(!ymr(c)&&c.length>0)b.text("请选择经办人");d.show()}});j.ctrl.$mainUserBtn.unbind("click").bind("click",function(e){var a=$(e.target);if(a.hasClass("icon_close")){var b=a.parent().parent();var c=b.attr("userId");Dcx.FormRun.flowMsg.mainUserId=0;Dcx.FormRun.flowMsg.mainUserName=null;j.ctrl.$mainUserBtn.find("div.S_bg5").html("<span style=\"font-weight:bold;\">+</span> 请选择主办人");if(Dcx.FormRun.flowMsg.rvDlg.hpm.attr("targettype")=="1"&&!ymr(Dcx.FormRun.flowMsg.rvDlg.ctrl.$rTree))Dcx.FormRun.flowMsg.rvDlg.ctrl.$rTree.find("li[tvalue='"+c+"']").find(".nd-remove").click()}});j.ctrl.$receiverBtn.unbind("click").bind("click",function(e){var a=$(e.target);if(a.hasClass("icon_close")){var b=a.parent().parent();var c=parseInt(b.attr("userId"),10);if(!isNaN(c)&&!ymr(c)&&!ymr(j.rcUserIds)&&j.rcUserIds.length>0){for(var i=0;i<j.rcUserIds.length;i++){if(j.rcUserIds[i]==c){j.rcUserIds.splice(i,1);j.rcUserNames.splice(i,1);if(Dcx.FormRun.flowMsg.rvDlg.hpm.attr("targettype")=="2"&&!ymr(Dcx.FormRun.flowMsg.rvDlg.ctrl.$rTree))Dcx.FormRun.flowMsg.rvDlg.ctrl.$rTree.find("li[tvalue='"+c+"']").find(".nd-remove").click();break}}}
if(ymr(j.rcUserIds)||j.rcUserIds.length<1){j.ctrl.$mainUserBtn.find("div.S_bg5").html("<div    style=\"margin-top:0px;\" isDealDiv=\"1\" ><span style=\"font-weight:bold;\">+</span> 请选择主办人</div>")}else b.remove()}})}
var s=xfx(f,"Left")-480;var t=xfx(f,"Top")+35;j.$divSumbDlg.css({"left":s+"px","top":t+"px"});if(!ymr(Dcx.FormRun)&&!ymr(Dcx.FormRun.flowBackMsg)&&!ymr(Dcx.FormRun.flowBackMsg.lmh))Dcx.FormRun.flowBackMsg.lmh.hide();j.$divSumbDlg.show()}
function aoz(a,b){var c=Dcx.FormRun.flowMsg;if(ymr(c.rvDlg))c.rvDlg={};var d=c.rvDlg.hpm;var e=c.rvDlg;var f=e.ctrl;if(isNaN(a)||a<1)a=parseInt(f.$queryType.find("li.current").attr("value"),10);var g=f.zcb;var h=f.$lTree;var j=f.$rTree;var k=c.ctrl;var l=k.$nextNode.find("input:checked");var m=parseInt(l.attr("value"),10);if(isNaN(m))m=-1;var n=c.nextNodeList;var o=null;for(var i=0;n.length;i++){if(n[i].NodeId==m){o=n[i];break}}
if(ymr(o)){alert("获取下一步节点失败！");return false}
if(o.NodeId<1){var p=h.children("div[contentType=2]:first");if(!ymr(p.attr("isLoadFirst"))){p.parent().children().hide();p.show();return false}
p.parent().children().hide();p.show();mtl(27,0,null,2,true);return false}
var p=h.children("div[contentType="+a+"]:first");if(!ymr(p.attr("isLoadFirst"))){p.parent().children().hide();p.show();return false}
var q=j.attr("treeId");var r=new nzy();var r=new nzy();if(a==1&&!ymr(o.PrcsUsers)){var s=o.PrcsUsers.split(',');var u=o.PrcsUserNames.split(',');for(var i=0;i<s.length;i++){if(!isNaN(s[i])&&parseInt(s[i],10)>0){var v=s[i];var t=u[i];r.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"1\" index=\""+(i+1)+"\" dsl=\"2\" class=\"nd-unfold\" isfold=\"0\">");r.append("<dt class=\"\">");r.append("<span class=\"spicon-no\" onclick=\"javascript:bjy(this);\">d</span>");r.append("<span class=\"spicon-unfold\"></span>");r.append("<a class=\"nd-text\" href=\"javascript:void(0);\" isuser=\"1\" onclick=\"javascript:ago(this);\">"+t+"</a>");r.append("<span class=\"nd-checked hide\">已选中</span>");r.append("</dt>");r.append("<dd></dd>");r.append("</dl>")}}}else{var s=new Array();var u=new Array();if(a==2&&!ymr(o.PrcsDepts)){s=o.PrcsDepts.split(',');u=o.PrcsDeptNames.split(',')}else if(a==3&&!ymr(o.PrcsPositions)){s=o.PrcsPositions.split(',');u=o.PrcsPositionNames.split(',')}else if(a==4&&!ymr(o.PrcsRoles)){s=o.PrcsRoles.split(',');u=o.PrcsRoleNames.split(',')}
for(var i=0;i<s.length;i++){if(!isNaN(s[i])&&parseInt(s[i],10)>0){var v=s[i];var t=u[i];r.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"0\" geted2=\"0\" index=\""+(i+1)+"\" dsl=\"1\" class=\"nd-unfold\" isfold=\"1\">");r.append("<dt class=\"\">");r.append("<span class=\"spicon-close\" onclick=\"javascript:bjy(this);\">d</span>");r.append("<span class=\"spicon-fold\"></span>");r.append("<a class=\"nd-text\" href=\"javascript:void(0);\" onclick=\"javascript:ago(this);\">"+t+"</a>");r.append("<a class=\"nd-add-all\" title=\"全部增加\" href=\"javascript:void(0);\" onclick=\"javascript:mma(this);\">全部增加</a>");r.append("</dt>");r.append("<dd></dd>");r.append("</dl>")}}}
p.html(r.toString());p.parent().children().hide();p.show();p.attr("isLoadFirst","1")}
function mtl(f,g,h,j,k){var l=f,tmp_parentId=g,tmp_clickedNode=h,tmp_qType=j;j=9;g=ymr(g)?0:g;var m=true;var n=null;var o=null;try{o=wbi(f,h)}catch(e){o=null}
if(!ymr(h))m=false;if(ymr(o)||o.length<1){o=Dcx.FormRun.flowMsg.rvDlg.$lTree.children("[contenttype=2]")}
if(isNaN(j)||j<1){j=parseInt(Dcx.FormRun.flowMsg.rvDlg.ctrl.$queryType.find("li.current").attr("value"),10)}
var p=Dcx.FormRun.flowMsg;var q=Dcx.FormRun.flowMsg.rvDlg.hpm;var r=p.rvDlg.ctrl;if(!m&&o.parent().attr("geted")=="1"){return true}
var s=jrb(f);var u=wtm(f);var w="/WebServices/System/System.asmx/GetChildDeptList";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:w,data:"{deptId:"+g+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取树节点失败。详情："+b);return false},success:function(a){try{qus=true}catch(err){}
a=hmy(a);if(ymr(a)){art.VLdialog.alert("读取树节点时失败3。",function(){},14,"提示");return false}
var b=0;var c=a;if(!ymr(c)){var d=new nzy();for(var i=0;i<c.length;i++){var v=c[i].DeptId;var t=c[i].DeptName;s=s+i+1;d.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"0\" geted2=\"0\" index=\""+s+"\" dsl=\"1\" class=\"nd-unfold\" isfold=\"1\">");d.append("<dt class=\"\">");d.append("<span class=\"spicon-close\" onclick=\"javascript:bjy(this);\">d</span>");d.append("<span class=\"spicon-fold\"></span>");d.append("<a class=\"nd-text\" href=\"javascript:void(0);\" onclick=\"javascript:ago(this);\">"+t+"</a>");d.append("<a class=\"nd-add-all\" title=\"全部增加\" href=\"javascript:void(0);\" onclick=\"javascript:mma(this);\">全部增加</a>");d.append("</dt>");d.append("<dd></dd>");d.append("</dl>")}
b=c.length;o.prepend(d.toString());if(parseInt(g,10)>0)bzw(l,tmp_parentId,tmp_clickedNode,tmp_qType)}
var e=o.prev();if(e.next().children().length<1&&!m&&(s>0&&a.Id<1)){e.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");e.find(".nd-add-all").hide()}
o.parent().attr("geted","1");if(k){o.parent().children().hide();o.show()}
umq(f,b+1)}});return}
function bzw(f,g,h,j){g=ymr(g)?0:g;var k=true;var l=null;var m=wbi(f,h);if(!ymr(h))k=false;if(ymr(m)||m.length<1){art.VLdialog.alert("获取父级节点时失败",function(){},10,"提示");return false}
if(isNaN(j)||j<1){j=parseInt(Dcx.FormRun.flowMsg.rvDlg.ctrl.$queryType.find("li.current").attr("value"),10)}
var n=Dcx.FormRun.flowMsg;var o=Dcx.FormRun.flowMsg.rvDlg.hpm;var p=n.rvDlg.ctrl;if(!k&&m.parent().attr("geted")=="1")return true;var q=jrb(f);var r=wtm(f);var s="/WebServices/System/User.asmx/fhf";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:s,data:"{id:"+g+",qType:"+j+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取树节点失败。详情："+b);return false},success:function(a){try{qus=true}catch(err){}
a=hmy(a);if(ymr(a)){var b=m.prev();b.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");b.find(".nd-add-all").hide();return false}
var c=0;var d=a;if(!ymr(d)){var e=new nzy();for(var i=0;i<d.length;i++){var v=d[i].UserId;var t=d[i].UserName;q=q+i+1;e.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"1\" index=\""+q+"\" dsl=\"2\" class=\"nd-unfold\" isfold=\"0\">");e.append("<dt class=\"\">");e.append("<span class=\"spicon-no\" onclick=\"javascript:bjy(this);\">d</span>");e.append("<span class=\"spicon-unfold\"></span>");e.append("<a class=\"nd-text\" href=\"javascript:void(0);\" isuser=\"1\" onclick=\"javascript:ago(this);\">"+t+"</a>");if(p.$rTree.children("li[tvalue='"+v+"']").length>0)e.append("<span class=\"nd-checked \">已选中</span>");else e.append("<span class=\"nd-checked hide\">已选中</span>");e.append("</dt>");e.append("<dd></dd>");e.append("</dl>")}
c=d.length;m.append(e.toString())}
var b=m.prev();if(b.next().children().length<1&&!k&&(q>0&&a.Id<1)){b.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");b.find(".nd-add-all").hide()}
m.parent().attr("geted","1");umq(f,c+1)}});return}
DcxTree["T2079_27"].egm=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2079&&i==27){var l=$(j).attr("tagName").toLowerCase();if(!isNaN(f)){var m=brp();if(m!=null){if(m.NodeId<1)mtl(i,f,j,2);else bzw(i,f,j)}}}}
function zks(a){qlx(true)}
function qlx(a){var b=Dcx.FormRun.flowMsg;var c=b.rvDlg.hpm;var d=Dcx.FormRun.flowMsg.rvDlg.ctrl;var e=null;if(c.attr("targetType")=="1")e=d.$rTree.children(":first");else e=d.$rTree.children();var f=new Array();var g=new Array();e.each(function(){f.push($(this).attr("tvalue"));g.push($(this).find(".nd-right").text())});var h=b.ctrl.$mainUserBtn;var i="请选择主办人";var j=true;if(c.attr("targetType")!="1"){h=b.ctrl.$receiverBtn;b.rcUserIds=f;b.rcUserNames=g;i="请选择经办人";j=false}else{if(f.length>0){b.mainUserId=f[0];b.mainUserName=g[0]}}
if(f.length>0){h.find("div.S_bg5").html(byq(f,g))}else{if(j)h.find("div.S_bg5").html("<span style=\"font-weight:bold;\">+</span> "+i);else{var k=h.find("div.S_bg5");k.html("<div    style=\"margin-top:7px;\" isDealDiv=\"1\" ><span style=\"font-weight:bold;\">+</span> "+i+"</div>")}}
if(a)b.rvDlg.hpm.hide()}
function lbd(a,b){var c=Dcx.FormRun.flowMsg;var d=c.rvDlg.hpm;var e=Dcx.FormRun.flowMsg.rvDlg.ctrl;eru(a,b);qlx(false)}
function ago(a){if($(a).attr("isuser")=="1"){var b=Dcx.FormRun.flowMsg;var c=b.rvDlg.hpm;var d=Dcx.FormRun.flowMsg.rvDlg.ctrl;var e=parseInt(d.$queryType.find("li.current").attr("value"),10);if(c.attr("targetType")=="1"){eru(d.$rTree.get(0),d.zcb);npj(a);qlx(true)}else{npj(a);qlx(false)}}else npj(a)}
function mma(a){var b=Dcx.FormRun.flowMsg;var c=b.rvDlg.hpm;if(c.attr("targetType")!="1"){otr(a)}}
function yra(a){var b=Dcx.FormRun.flowMsg;var c=b.rvDlg.hpm;if(c.attr("targetType")!="1"){otr(a);qlx(false)}}
function nxl(a,b,c,d){plj(a,b,c,d);var e=Dcx.FormRun.flowMsg;var f=e.rvDlg.hpm;var g=Dcx.FormRun.flowMsg.rvDlg.ctrl;if(f.attr("targetType")=="1")qlx(true);else qlx(false)}
DcxTree["T2079_27"].ptq=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2079&&i==27){}}
function lth(a,b,c){if(ymr(Dcx.FormRun.flowBackMsg))Dcx.FormRun.flowBackMsg={};var d=Dcx.FormRun.flowBackMsg;var e=d.lmh;if(ymr(d.lmh)){var f=mee(b,c);e=$(f.toString());$(document.body).append(e);d.lmh=e;var g=col(b,c);var h={};h.xss=e.find("#d2078_SendMsgContent");h.$sendOtherMsg=e.find("#d2078_SendOtherMsg");Dcx.FormRun.flowBackMsg.ctrl=h}
var i=xfx(a,"Left")-130;var j=xfx(a,"Top")+35;d.lmh.css({"left":i+"px","top":j+"px"});if(!ymr(Dcx.FormRun)&&!ymr(Dcx.FormRun.flowMsg)&&!ymr(Dcx.FormRun.flowMsg.$divSumbDlg))Dcx.FormRun.flowMsg.$divSumbDlg.hide();d.lmh.show()}
function mee(a,b){var c=new nzy();c.append("<div style=\"width: 600px; min-height:333px; position: absolute; left: 807px; top: 137px;display: none;\" class=\"drop-dialog  dropdown\" id=\"div_SendBack_2078\" moveupdown=\"1\" dealtitle=\"1\" left=\"-5\" top=\"40\">");c.append("    <div class=\"overlay-b \" style=\"position: absolute; width: 100%; height: 100%; opacity: 1.0!important;filter: alpha(opacity=100)!important;\">");c.append("        <div style=\"position: relative;\" class=\"drop-dialog-content\">");c.append("            <div class=\"drop-dialog-bd\">");c.append("                <div style=\"display: block;\" class=\"usercard-content\"> ");c.append("<div class=\"arrow arrow_t\" node-type=\"arrow\" style=\"left: 38px;\"></div>");c.append("<div id=\"div_FormHtml_DefaultF_2078\" >");c.append("    <div class=\"defaultform \">");c.append("        <div class=\"frame-div\" style=\"padding-left: 10px;;\">");c.append("            <ul class=\"ul-group\"  style=\"width: 660px;_width:630px;\">");c.append("                <li class=\"li-area  \"  style=\"min-height: 130px;\">");c.append("                    <label class=\"area-title pad126\"   style=\"width:81px;font-size: 13px;padding-top:20px;\">");c.append("                        退回原因<span style=\"color:red;position:relative;top:2px;\"> *</span></label>");c.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;\">");c.append("                        <span class=\"form-ctr\" >");c.append("                            <textarea  id=\"d2078_SendMsgContent\" class=\"form-txts\" style=\"width: 405px; height: 100px;padding-top:7px;padding-left:8px;\" ></textarea></span>");c.append("                    </div>");c.append("                </li>");c.append("                <li class=\"li-area   \"  style=\"min-height: 30px;\">");c.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");c.append("                        其他方式</label>");c.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;\">");c.append("                        ");c.append("                            <div id=\"d2078_SendOtherMsg\" class=\"form-radio\" >");c.append("                                <span class=\"form-radio-item\">");c.append("                                    <input id=\"d2078_0\" name=\"d2078_g\" type=\"checkbox\"");c.append("                                        text=\"手机短信\" value=\"1\" /><label  for=\"d2078_0\">手机短信</label></span>");c.append("                                <span class=\"form-radio-item\">");c.append("                                    <input id=\"d2078_1\" name=\"d2078_g\" type=\"checkbox\"");c.append("                                        text=\"外部邮件\" value=\"2\" /><label  for=\"d2078_1\">外部邮件</label></span>");c.append("                            </div>");c.append("                        </span>");c.append("                    </div>");c.append("                </li>");c.append("                <li class=\"li-area  \"  style=\"min-height: 105px;_width:500px;\">");c.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");c.append("                        </label>");c.append("                    <div class=\"field-content pad17\" style=\"margin-left: 170px;margin-top:85px;\">");c.append("                        <div class=\"aui_buttons\" style=\"background-color: #ffffff;border-top-width:0px;\">");c.append("                            <button class=\"aui_state_highlight\"  onclick=\"javascript:xvx("+a+",'"+b+"');\" indexid=\"4\" type=\"button\">提&nbsp;&nbsp;交</button>");c.append("                            <button type=\"button\" indexid=\"6\" onclick=\"javascript:Dcx.FormRun.flowBackMsg.lmh.hide();\" style=\"margin-left:20px;\" title=\"继续编辑\">取&nbsp;消</button>");c.append("                        </div>");c.append("                    </div>");c.append("                </li>");c.append("            </ul>");c.append("        </div>");c.append("    </div>");c.append("</div>");c.append("                </div>");c.append("            </div>");c.append("            <div class=\"arrow arrow-top\" style=\"left:140px;\"></div>");c.append("        </div>");c.append("    </div>");c.append("</div>");return c.toString()}
function ykp(a,b,c){if(ymr(Dcx.FormRun.flowSignMsg))Dcx.FormRun.flowSignMsg={};var d=Dcx.FormRun.flowSignMsg;var e=d.$divSignDlg;if(ymr(d.$divSignDlg)){var f=kpa(b,c);e=$(f.toString());$(document.body).append(e);d.$divSignDlg=e;var g=col(b,c);var i={};i.xss=e.find("#d2078_SendMsgContent");i.$sendOtherMsg=e.find("#d2078_SendOtherMsg");Dcx.FormRun.flowSignMsg.ctrl=i;DcxEditor.Init(i.xss,"txtMsgContent","inputCharCount","/Ajax/UploadFile/Upload.ashx",true);i.xss=DcxEditor.zcw;DcxEditor.wbt=7}
var w=d.$divSignDlg.width();var h=d.$divSignDlg.height();var j=xfx(a,"Left");var k=xfx(a,"Top");d.$divSignDlg.show();j=(j-w+100);var l=(k-h-20)+20;if(l<0){l=(k+20+20)}
if(j<0){j=10}
d.$divSignDlg.css({"left":j+"px","top":l+"px"});if(!ymr(Dcx.FormRun)&&!ymr(Dcx.FormRun.flowMsg)&&!ymr(Dcx.FormRun.flowMsg.$divSumbDlg))Dcx.FormRun.flowMsg.$divSumbDlg.hide();d.$divSignDlg.show()}
function kpa(a,b){var c=new nzy();c.append("<div style=\"width: 550px; min-height:333px; position: absolute; left: 807px; top: 137px;display: none;\" class=\"drop-dialog  dropdown\" id=\"div_SendSign_2078\" moveupdown=\"1\" dealtitle=\"1\" left=\"-5\" top=\"40\">");c.append("    <div class=\"overlay-b \" style=\"position: absolute; width: 100%; height: 100%; opacity: 1.0!important;filter: alpha(opacity=100)!important;\">");c.append("        <div style=\"position: relative;\" class=\"drop-dialog-content\">");c.append("            <div class=\"drop-dialog-bd\">");c.append("                <div style=\"display: block;\" class=\"usercard-content\"> ");c.append("<div class=\"arrow arrow_t\" node-type=\"arrow\" style=\"left: 38px;\"></div>");c.append("<div id=\"div_FormHtml_DefaultF_2078\" >");c.append("    <div class=\"defaultform \">");c.append("        <div class=\"frame-div\" style=\"padding-left: 10px;;\">");c.append("            <ul class=\"ul-group\"  style=\"width: 660px;;\">");c.append("                <li class=\"li-area  \"  style=\"min-height: 130px;\">");c.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;\">");c.append("                        <span class=\"form-ctr\" >");c.append(DcxEditor.pwg({"id":"d2078_SendMsgContent","title":false,"width":370,"height":104,"img":false,"file":false,"map":false,"kwl":"发 布"}));c.append("                    </span></div>");c.append("                </li>");c.append("                <li class=\"li-area   \"  style=\"min-height: 30px;\">");c.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");c.append("                        其他方式</label>");c.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;\">");c.append("                        ");c.append("                            <div id=\"d2078_SendOtherMsg\" class=\"form-radio\" >");c.append("                                <span class=\"form-radio-item\">");c.append("                                    <input id=\"d2078_0\" name=\"d2078_g\" type=\"checkbox\"");c.append("                                        text=\"手机短信\" value=\"1\" /><label  for=\"d2078_0\">手机短信</label></span>");c.append("                                <span class=\"form-radio-item\">");c.append("                                    <input id=\"d2078_1\" name=\"d2078_g\" type=\"checkbox\"");c.append("                                        text=\"外部邮件\" value=\"2\" /><label  for=\"d2078_1\">外部邮件</label></span>");c.append("                            </div>");c.append("                        </span>");c.append("                    </div>");c.append("                </li>");c.append("                <li class=\"li-area  \" style='width:550px;'>");c.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:6px;\">");c.append("                        </label>");c.append("                    <div class=\"field-content pad17\" style=\"margin-left: 120px;margin-top:55px;\">");c.append("                        <div class=\"aui_buttons\" style=\"background-color: #ffffff;border-top-width:0px;\">");c.append("                            <button class=\"aui_state_highlight\"  onclick=\"javascript:hej("+a+",'"+b+"');\" indexid=\"4\" type=\"button\">提&nbsp;&nbsp;交</button>");c.append("                            <button type=\"button\" indexid=\"6\" onclick=\"javascript:Dcx.FormRun.flowSignMsg.$divSignDlg.hide();\" style=\"margin-left:20px;\" title=\"继续编辑\">取&nbsp;消</button>");c.append("                        </div>");c.append("                    </div>");c.append("                </li>");c.append("            </ul>");c.append("        </div>");c.append("    </div>");c.append("</div>");c.append("                </div>");c.append("            </div>");c.append("            <div class=\"arrow arrow-top\" style=\"left:460px;\"></div>");c.append("        </div>");c.append("    </div>");c.append("</div>");return c.toString()}
DcxDTime={Width:200,izi:new Date(),Id:null,uft:null,jlt:null,vbe:null,hhq:null,yvr:null,$container:null,$target:null,ism:false,uxx:true,goi:true,hzf:true,tmb:-1,tff:-1,eui:function(a){},fkq:null};DcxDTime.Init=function(e){if(ymr(e))e="mydealCalender";DcxDTime.Id=e;DcxDTime.separator="-";DcxDTime.oBtnTodayTitle="今天";DcxDTime.oBtnCancelTitle="关闭";DcxDTime.weekDaySting=new Array("S","M","T","W","T","F","S");DcxDTime.monthSting=new Array("January","February","March","April","May","June","July","August","September","October","November","December");DcxDTime.Width=200;DcxDTime.weekDaySting=new Array("日","一","二","三","四","五","六");DcxDTime.monthSting=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");DcxDTime.izi=new Date();DcxDTime.today=new Date();var f=DcxDTime.today.getFullYear();if(DcxDTime.tff>=0)DcxDTime.startYear=f-DcxDTime.tff;else DcxDTime.startYear=1930;if(DcxDTime.tmb>=0)DcxDTime.endYear=f+DcxDTime.tmb;else DcxDTime.endYear=f+20;DcxDTime.buttonClass="ManagerButton";DcxDTime.normalfontColor="#666666";DcxDTime.selectedfontColor="green";DcxDTime.divBorderCss="1px solid #BCD0DE";DcxDTime.titleTableBgColor="#98B8CD";DcxDTime.tableBorderColor="#CCCCCC";DcxDTime.TagetObj=null;DcxDTime.oPreviousCell=null;DcxDTime.divId=e+"_Div";DcxDTime.sTABLEId=e+"_Table";DcxDTime.sMONTHId=e+"_Month";DcxDTime.sYEARId=e+"_Year";DcxDTime.sHourId=e+"_Hour";DcxDTime.sMinuteId=e+"_Minute";DcxDTime.sSecondId=e+"_Second";DcxDTime.sTODAYBTNId=e+"_TODAYBTN";DcxDTime.wga=function(a,b){}
var g,year;g=DcxDTime.izi.getMonth();year=DcxDTime.izi.getFullYear();var h=new nzy();h.append("<div id=\""+DcxDTime.divId+"\" class=\"ui-calendar\"  style=\"display:none;position:absolute;z-index:999;width:"+DcxDTime.Width+";border:"+DcxDTime.divBorderCss+";\">\n");h.append("<div class=\"ui-calendar-header\" isTop=\"1\">\n");h.append("<a class=\"ui-calendar-prev\" href=\"javascript:void(0);\" onclick=\"javascript:DcxDTime.lte2(true);\" data-rma=\"prev\" data-event=\"click\" title=\"Prev\"><span class=\"ui-icon ui-icon-circle-triangle-w\">Prev</span></a>\n");h.append("<a class=\"ui-calendar-next\"  href=\"javascript:void(0);\" onclick=\"javascript:DcxDTime.lte2(false);\" data-rma=\"next\" data-event=\"click\" title=\"Next\"><span class=\"ui-icon ui-icon-circle-triangle-e\">Next</span></a>\n");h.append("<div class=\"ui-calendar-title\" >\n");h.append("<select id=\""+DcxDTime.sMONTHId+"\" isMonth=1 onchange=\"javascript:DcxDTime.lte(this);\" class=\"ui-calendar-month\" style=\"width:70px\">\n");for(var i=0;i<12;i++){h.append("<option value='"+i+"' >"+DcxDTime.monthSting[i]+"</option>\n")}
h.append("</select>\n");h.append("<select id=\""+DcxDTime.sYEARId+"\" isYear=1 onchange=\"javascript:DcxDTime.wct(this);\" class=\"ui-calendar-year\" style='width:70px'>\n");for(var i=DcxDTime.startYear;i<=DcxDTime.endYear;i++){h.append("<option value='"+i+"'>"+i+"</option>")}
h.append("</select>");h.append("</div>");h.append("</div>");h.append("<table id=\""+DcxDTime.sTABLEId+"\"  isList=\"1\" class=\"ui-calendar-calendar\">");h.append("<thead>");h.append("<tr>");h.append("<th class=\"ui-calendar-week-end\">");h.append("<span title=\"星期日\">日</span></th>");h.append("<th>");h.append("<span title=\"星期一\">一</span></th>");h.append("<th>");h.append("<span title=\"星期二\">二</span></th>");h.append("<th>");h.append("<span title=\"星期三\">三</span></th>");h.append("<th>");h.append("<span title=\"星期四\">四</span></th>");h.append("<th>");h.append("<span title=\"星期五\">五</span></th>");h.append("<th class=\"ui-calendar-week-end\">");h.append("<span title=\"星期六\">六</span></th>");h.append("</tr>");h.append("</thead>");h.append("<tbody>");for(var i=1;i<=5;i++){h.append("<tr isdayList=1>");for(j=0;j<7;j++){h.append("<td height='20' align='center' valign='middle' class=\""+(j==0?"ui-calendar-week-end":"")+"\" style='cursor:hand'");h.append(" onmouseover=DcxDTime.yrw(this)");h.append(" onmouseout=DcxDTime.kxi(this)");h.append(" onclick=DcxDTime.xyp(this)>\n");h.append("&nbsp;</td>")}
h.append("</tr>")}
h.append("</tbody>");h.append("</table>");h.append("<div class=\"ui-calendar-header\" isTimePart=\"1\" style=\"margin-top:5px;\">\n");h.append("<div class=\"ui-calendar-title\" style=\"width:100%;margin-left:6px;\">\n");h.append("<select id=\""+DcxDTime.sHourId+"\" isHour=1 onchange=\"javascript:DcxDTime.kpm(this);\" class=\"ui-calendar-month\" style=\"width:50px\">\n");for(var i=0;i<24;i++){h.append("<option value='"+i+"'>"+(i<10?"0":"")+i+"</option>\n")}
h.append("</select>\n");h.append("<select id=\""+DcxDTime.sMinuteId+"\" isMinute=1 onchange=\"javascript:DcxDTime.kpm(this);\" class=\"ui-calendar-year\" style='width:50px'>\n");for(var i=0;i<=59;i++){h.append("<option value='"+i+"'>"+(i<10?"0":"")+i+"</option>")}
h.append("</select>");h.append("<select id=\""+DcxDTime.sSecondId+"\" isSecond=1 onchange=\"javascript:DcxDTime.kpm(this);\" class=\"ui-calendar-year\" style='width:50px'>\n");for(var i=0;i<=59;i++){h.append("<option value='"+i+"'>"+(i<10?"0":"")+i+"</option>")}
h.append("</select>");h.append("</div>");h.append("</div>");h.append("<div class=\"ui-calendar-buttonpane \" isBottom=1>\n");h.append("<button type=\"button\" onclick=\"javascript:DcxDTime.vkl(this);\" class=\"ui-calendar-current ui-state-default ui-priority-secondary ui-corner-all ui-state-hover\" data-rma=\"today\" data-event=\"click\">\n");h.append(""+DcxDTime.oBtnTodayTitle+"</button>\n");h.append("<button type=\"button\" onclick=\"javascript:DcxDTime.ReturnValue(this);\" IsOkBtn=1 class=\"ui-calendar-close ui-state-default ui-priority-primary ui-corner-all\" data-rma=\"hide\" data-event=\"click\">\n");h.append("确定</button>\n");h.append("</div>\n");h.append("</div>\n");$("body",document).append(h.toString());DcxDTime.uft=$("body",document).children("#"+DcxDTime.divId+":last");DcxDTime.jlt=DcxDTime.uft.children("[isTop=1]");DcxDTime.vbe=DcxDTime.uft.children("[isList=1]");DcxDTime.hhq=DcxDTime.uft.children("[isTimePart=1]");DcxDTime.yvr=DcxDTime.uft.children("[isBottom=1]");DcxDTime.qkt();var k=$.browser.msie?"mouseenter":"mouseover";var l=$.browser.msie?"mouseleave":"mouseout";DcxDTime.uft.unbind(k).bind(k,function(){heh=true});DcxDTime.uft.unbind(l).bind(l,function(){heh=false});$(document).mouseup(function(a){var b=a;var c=$(a.target);var d=c.attr("cid");if(d!="5"&&d!="6"&&!wsj(c,DcxDTime.divId,10)){DcxDTime.uft.hide()}})}
DcxDTime.qkt=function(){var a,year,weekDay,today,tableObj,currRow,maxDay,iDaySn,sIndex,rowIndex,cellIndex,monthObj,yearObj,hour,minute,second;a=DcxDTime.izi.getMonth();year=DcxDTime.izi.getFullYear();today=DcxDTime.izi.getDate();weekDay=(new Date(year,a,1)).getDay();iDaySn=1;tableObj=DcxDTime.vbe.get(0);currRow=tableObj.rows[1];maxDay=DcxDTime.owp(year,a);monthObj=DcxDTime.jlt.find("[IsMonth=1]").get(0);monthObj.selectedIndex=a;yearObj=DcxDTime.jlt.find("[IsYear=1]").get(0);var b=DcxDTime.hhq.find("[Ishour=1]");var c=DcxDTime.hhq.find("[Isminute=1]");var d=DcxDTime.hhq.find("[Issecond=1]");for(i=0;i<yearObj.length;i++){if(parseInt(yearObj.options[i].value)==year)yearObj.selectedIndex=i}
for(rowIndex=1;rowIndex<=6;rowIndex++){if(iDaySn>maxDay)break;currRow=tableObj.rows[rowIndex];cellIndex=0;if(rowIndex==1)cellIndex=weekDay;if(currRow==undefined||currRow==null||currRow.cells==undefined||currRow.cells==null)return;for(;cellIndex<currRow.cells.length;cellIndex++){if(iDaySn==today){currRow.cells[cellIndex].innerHTML="<a class=\"ui-state-default ui-state-highlight\" href=\"javascript:void(0);\">"+iDaySn+"</a>";this.oPreviousCell=currRow.cells[cellIndex]}else{currRow.cells[cellIndex].innerHTML="<a class=\"ui-state-default\" href=\"javascript:void(0);\">"+iDaySn+"</a>";currRow.cells[cellIndex].style.color=this.normalfontColor}
DcxDTime.ili(0,currRow.cells[cellIndex]);iDaySn++;if(iDaySn>maxDay)break}}}
DcxDTime.lml=function(){var i,j,tableObj;tableObj=DcxDTime.vbe.get(0);for(i=1;i<tableObj.rows.length;i++){for(j=0;j<tableObj.rows[i].cells.length;j++){DcxDTime.ili(0,tableObj.rows[i].cells[j]);tableObj.rows[i].cells[j].innerHTML="&nbsp;"}}}
DcxDTime.Refresh=function(a){this.izi=a;DcxDTime.lml();DcxDTime.qkt()}
DcxDTime.yrw=function(a){var b=event.srcElement;DcxDTime.ili(0,DcxDTime.oPreviousCell);if(b){DcxDTime.ili(1,b);DcxDTime.oPreviousCell=b}}
DcxDTime.kxi=function(a){var b=event.srcElement;DcxDTime.ili(0,b)}
DcxDTime.wct=function(){var a,month,year,newDate;a=DcxDTime.izi.getDate();month=DcxDTime.izi.getMonth();year=document.all[DcxDTime.sYEARId].value;newDate=new Date(year,month,a);DcxDTime.Refresh(newDate)}
DcxDTime.lte=function(){var a,month,year,newDate;a=DcxDTime.izi.getDate();month=document.all[DcxDTime.sMONTHId].value;year=DcxDTime.izi.getFullYear();newDate=new Date(year,month,a);DcxDTime.Refresh(newDate)}
DcxDTime.lte2=function(a){var b,month,year,newDate;b=DcxDTime.izi.getDate();var c=DcxDTime.jlt.find("[ismonth=1]").get(0);month=c.value;year=DcxDTime.izi.getFullYear();var d=0;var e=null;if(a==true)month--;else if(a==false)month++;if(month<0){month=11;d=1;e=DcxDTime.jlt.find("[isyear=1]").get(0);year=e.value;year--}else if(month>11){month=0;d=2;e=DcxDTime.jlt.find("[isyear=1]").get(0);year=e.value;year++}
$(c).val(month);if(d!=0)$(e).val(year);newDate=new Date(year,month,b);DcxDTime.Refresh(newDate)}
DcxDTime.xyp=function(a){var b,month,year,newDate;year=DcxDTime.izi.getFullYear();month=DcxDTime.izi.getMonth();b=DcxDTime.izi.getDate();var c=null;if(a.innerText!=null&&$.trim(a.innerText)!=""&&a.innerText!=" "){b=parseInt(a.innerText);if(isNaN(b))return;if(b!=DcxDTime.izi.getDate()){newDate=new Date(year,month,b);c=newDate;DcxDTime.Refresh(newDate)}}else return;DcxDTime.kpm();if(c!=null&&DcxDTime.wga!=undefined&&DcxDTime.wga!=null)DcxDTime.wga(DcxDTime.TagetObj,c);if(!DcxDTime.ism)DcxDTime.Cancel(DcxDTime);return sDateString}
DcxDTime.jea=function(){if(DcxDTime.TagetObj.tagName.toLowerCase()=="input")DcxDTime.TagetObj.value="";DcxDTime.Cancel(DcxDTime);return""}
DcxDTime.vkl=function(){DcxDTime.Refresh(new Date());DcxDTime.kpm();return sDateString}
DcxDTime.ReturnValue=function(){DcxDTime.kpm();DcxDTime.Cancel(DcxDTime);return sDateString}
DcxDTime.kpm=function(){var a,month,year,newDate;year=DcxDTime.izi.getFullYear();month=DcxDTime.izi.getMonth();a=DcxDTime.izi.getDate();var b=DcxDTime.hhq.find("[Ishour=1]");var c=DcxDTime.hhq.find("[Isminute=1]");var d=DcxDTime.hhq.find("[Issecond=1]");var f=b.val();var g=c.val();var h=d.val();sDateString=year+DcxDTime.separator+DcxDTime.phm(month+1)+DcxDTime.separator+DcxDTime.phm(a);if(DcxDTime.ism)sDateString=sDateString+' '+DcxDTime.phm(f)+':'+DcxDTime.phm(g)+':'+DcxDTime.phm(h);if(DcxDTime.TagetObj.tagName.toLowerCase()=="input")DcxDTime.TagetObj.value=sDateString;try{$(DcxDTime.TagetObj).change();$(DcxDTime.TagetObj).blur()}catch(e){}
return sDateString}
DcxDTime.yhm=function(a,b){if(b!=true)b=false;DcxDTime.ism=b;if(ymr(DcxDTime.uft))DcxDTime.Init();if(DcxDTime.ism){DcxDTime.hhq.show();DcxDTime.yvr.find("[isOkbtn=1]").show()}else{DcxDTime.hhq.hide();DcxDTime.yvr.find("[isOkbtn=1]").hide()}
DcxDTime.TagetObj=a;if($(DcxDTime.TagetObj).attr("disabled"))return;var w=$(a).width();var h=$(a).height();var c=xfx(a,"Left")-3;var d=xfx(a,"Top");var e=d+h;DcxDTime.uft.css({"left":c+"px","top":e+"px"});DcxDTime.uft.show()}
DcxDTime.ili=function(a,b){}
DcxDTime.owp=function(a,b){var c,qxu,izi,esj,smy;c=b+1;if(c>11){qxu=a+1;c=0}else{qxu=a}
izi=new Date(a,b,1);esj=new Date(qxu,c,1);smy=(esj-izi)/(24*60*60*1000);return smy}
DcxDTime.phm=function(a){if(a<10)return"0"+a;else return a}
DcxDTime.Cancel=function(){DcxDTime.uft.hide()}
$(window).load(function(){Dcx.srs('dcxcalendar.js','dcxcalendar.css','/Css/style/Common/control/Calendar/dcxcalendar.css')});var DcxCkb={$DDC:null};function urt(c,d,e,f){var g=wyb($(c),null);if($(c).attr("disabled"))return false;var h="d"+d+"_"+e;DcxCkb.$DDC=$('#ddc_'+h);DcxCkb.$DDC.css('left',($(c).offset().left-5)+'px');DcxCkb.$DDC.css('top',$(c).offset().top+$(c).height()+7+'px');DcxCkb.$DDC.attr("EntId",d);DcxCkb.$DDC.attr("FieldName",e);if(f==false)DcxCkb.$DDC.show();DcxCkb.$DDC.css('display','block');gii='ddc_'+h;DcxCkb.gii='ddc_'+h;DcxCkb.vyt=$(c).attr("id");DcxCkb.$targetObj=$(c);DcxCkb.EntId=d;DcxCkb.FieldName=e;DcxCkb.CtrlPrex="AjaxF_";var i=DcxForm.leb(DcxCkb.$targetObj);DcxForm.pbh(DcxCkb.$DDC,i);if(DcxCkb.$DDC.attr("isNotFirstTime")!="1"){$(document).mouseup(function(a){var b=$(a.target);if(!Dcx.wsj(b,DcxCkb.$DDC.attr("id"),20))DcxCkb.$DDC.hide()});DcxCkb.$DDC.attr("isNotFirstTime","1")}}
DcxCkb.ShowDialogAf=urt;function vcp(a,b,c){var d=$.trim($(c).attr("text"));var e=$.trim($(c).attr("value"));if(ymr(e))e=d;igj(DcxCkb.$rowObj);suo(d,e,DcxCkb.$targetObj,DcxCkb.FieldName,false,DcxCkb.EntId,DcxCkb.CtrlPrex);DcxCkb.$DDC.hide()}
DcxCkb.GetRadioValueAf=vcp;function hib(a,b,c){var d=$(c).attr("text");var e=$(c).attr("value");if(!ymr(DcxCkb.$targetObj)&&DcxCkb.$targetObj.length>0){try{DcxCkb.$targetObj.change()}catch(err){}}}
DcxCkb.GetCkbValAf=hib;function tym(a,b){var c="d"+b+"_"+a;var d=bgs('ddc_'+c);var e=d.Text;var f=d.Value;igj(DcxCkb.$rowObj);suo(e,f,DcxCkb.$targetObj,DcxCkb.FieldName,false,DcxCkb.EntId,DcxCkb.CtrlPrex)}
DcxCkb.ReturnValueAf=tym;function iem(a,b){DcxCkb.$DDC.hide();if(!ymr(DcxCkb.$targetObj)&&DcxCkb.$targetObj.length>0){try{DcxCkb.$targetObj.change();$DDC.hide()}catch(err){}}}
DcxCkb.CancelAf=iem;function ujx(c,d,e,f){var g=wyb($(c),null);if($(c).attr("disabled"))return false;var h="d"+d+"_"+e;DcxCkb.$DDC=$('#ddc_'+h);DcxCkb.$DDC.css('left',($(c).offset().left-5)+'px');DcxCkb.$DDC.css('top',$(c).offset().top+$(c).height()+7+'px');DcxCkb.$DDC.attr("EntId",d);DcxCkb.$DDC.attr("FieldName",e);if(f==false)DcxCkb.$DDC.show();DcxCkb.$DDC.css('display','block');DcxCkb.vzw='ddc_'+h;DcxCkb.CurFormCtrlId_LF=$(c).attr("id");DcxCkb.$targetObj=$(c);DcxCkb.EntId=d;DcxCkb.FieldName=e;DcxCkb.CtrlPrex="ListF_";var i=DcxForm.IsChildEnt(d,DcxCkb.CtrlPrex);if(i)DcxCkb.CtrlPrex="AjaxF_";DcxCkb.$rowObj=DcxForm.GetRow(c,d,DcxCkb.CtrlPrex);DcxCkb.rowIndex=DcxForm.GetRowIdx2(DcxCkb.$rowObj,d,DcxCkb.CtrlPrex);lsm(d,DcxCkb.rowIndex,DcxCkb.CtrlPrex);var j=DcxForm.leb(DcxCkb.$targetObj);DcxForm.pbh(DcxCkb.$DDC,j);if(DcxCkb.$DDC.attr("isNotFirstTime")!="1"){$(document).mouseup(function(a){var b=$(a.target);if(!Dcx.wsj(b,DcxCkb.$DDC.attr("id"),20))DcxCkb.$DDC.hide()});DcxCkb.$DDC.attr("isNotFirstTime","1")}}
DcxCkb.ShowDialogLf=ujx;function gpi(a,b,c){var d=$.trim($(c).attr("text"));var e=$.trim($(c).attr("value"));suo(d,e,DcxCkb.$targetObj,DcxCkb.FieldName,true,DcxCkb.EntId,DcxCkb.CtrlPrex);igj(DcxCkb.$rowObj);DcxCkb.$DDC.hide()}
DcxCkb.GetRadioValueLf=gpi;function sut(a,b,c){if(!ymr(DcxCkb.$targetObj)&&DcxCkb.$targetObj.length>0){try{DcxCkb.$targetObj.change()}catch(err){}}}
DcxCkb.GetCheckBoxValueLf=sut;function haf(a,b){var c="d"+b+"_"+a;var d=bgs('ddc_'+c);var e=d.Text;var f=d.Value;igj(DcxCkb.$rowObj);suo(e,f,DcxCkb.$targetObj,DcxCkb.FieldName,true,DcxCkb.EntId,DcxCkb.CtrlPrex);DcxCkb.$DDC.hide()}
DcxCkb.GetValueLf=haf;function fwb(a,b){DcxCkb.$DDC.hide();try{jil.hide();xdl.hide()}catch(err){}
if(!ymr(DcxCkb.$targetObj)&&DcxCkb.$targetObj.length>0){try{DcxCkb.$targetObj.change();$DDC.hide()}catch(err){}}
return false}
DcxCkb.CancelLf=fwb;var DcxDdl={$DDS:null};function rcm(c,d,e,f){var g=wyb($(c),null);if($(c).attr("disabled"))return false;var h="d"+d+"_"+e;DcxDdl.$DDS=$('#dds_'+h);DcxDdl.$DDS.css('left',($(c).offset().left-5)+'px');DcxDdl.$DDS.css('top',$(c).offset().top+$(c).height()+7+'px');DcxDdl.$DDS.attr("EntId",d);DcxDdl.$DDS.attr("FieldName",e);if(f==false)DcxDdl.$DDS.show();DcxDdl.$DDS.css('display','block');DcxDdl.CurDDcxDdlId_AF='dds_'+h;DcxDdl.vyt=$(c).attr("id");DcxDdl.$targetObj=$(c);DcxDdl.EntId=d;DcxDdl.FieldName=e;DcxDdl.CtrlPrex="AjaxF_";if(DcxDdl.$DDS.attr("isNotFirstTime")!="1"){$(document).mouseup(function(a){var b=$(a.target);if(!Dcx.wsj(b,DcxDdl.$DDS.attr("id"),20))DcxDdl.$DDS.hide()});DcxDdl.$DDS.attr("isNotFirstTime","1")}}
DcxDdl.ShowDialogAf=rcm;function ghm(a,i){var b=$.trim($(a).find("span").text());var c=$.trim($(a).find("em").text());if(ymr(c))c=b;suo(b,c,DcxDdl.$targetObj,DcxDdl.FieldName,false,DcxDdl.EntId,DcxDdl.CtrlPrex);DcxDdl.$DDS.hide();DcxDdl.$targetObj.focus()}
DcxDdl.GetValueAf=ghm;function snx(c,d,e,f){var g=wyb($(c),null);if($(c).attr("disabled"))return false;var h="d"+d+"_"+e;DcxDdl.$DDS=$('#dds_'+h);DcxDdl.$DDS.css('left',($(c).offset().left-5)+'px');DcxDdl.$DDS.css('top',$(c).offset().top+$(c).height()+7+'px');DcxDdl.$DDS.attr("EntId",d);DcxDdl.$DDS.attr("FieldName",e);if(f==false)DcxDdl.$DDS.show();DcxDdl.$DDS.css('display','block');DcxDdl.CurDDcxDdlId_LF='dds_'+h;DcxDdl.CurFormCtrlId_LF=$(c).attr("id");DcxDdl.$targetObj=$(c);DcxDdl.EntId=d;DcxDdl.FieldName=e;DcxDdl.CtrlPrex="ListF_";var i=DcxForm.IsChildEnt(d,DcxDdl.CtrlPrex);if(i)DcxDdl.CtrlPrex="AjaxF_";DcxDdl.$rowObj=DcxForm.GetRow(c,d,DcxDdl.CtrlPrex);DcxDdl.rowIndex=DcxForm.GetRowIdx2(DcxDdl.$rowObj,d,DcxDdl.CtrlPrex);lsm(d,DcxDdl.rowIndex,DcxDdl.CtrlPrex);if(DcxDdl.$DDS.attr("isNotFirstTime")!="1"){$(document).mouseup(function(a){var b=$(a.target);if(!Dcx.wsj(b,DcxDdl.$DDS.attr("id"),20))DcxDdl.$DDS.hide()});DcxDdl.$DDS.attr("isNotFirstTime","1")}}
DcxDdl.ShowDialogLf=snx;function DDS_GetValue_LF(a,i){var b=$.trim($(a).find("span").text());var c=$.trim($(a).find("em").text());if(ymr(c))c=b;igj(DcxDdl.$rowObj);suo(b,c,DcxDdl.$targetObj,DcxDdl.FieldName,true,DcxDdl.EntId,DcxDdl.CtrlPrex);DcxDdl.$DDS.hide();DcxDdl.$targetObj.focus()}
DcxDdl.GetValueLf=DDS_GetValue_LF;(function($){var f=function(a){var b=this;var c=a.id;if(a.cotainer)b.cotainer=a.cotainer;else b.cotainer=$(c);b.file=b.cotainer.find("input:file").get(0);var d=b.cotainer.find("img");if(d.length>0){if(d.filter("[isImg=1]").length>0)d=d.filter("[isImg=1]");else d=d.filter(":first")}
b.img=d.get(0);b.bnw=null;b._data="";b.mil=null;var e=b.ruq(a);e.mode="remote";if(!ymr(e.imgPath))b.img.src=e.imgPath;else b.img.src="/UpLoadFiles/common/blank.png";b.imgType=e.imgType;if(e.action!=null&&e.action!=""&&e.action!=undefined)b.action=e.action;b.timeout=e.timeout;b.ratio=e.ratio;b.nas=e.nas;b.maxHeight=e.maxHeight;b.width=e.width;b.height=e.height;b.acz=e.acz;b.onShow=e.onShow;b.onErr=e.onErr;b.oldValue=e.imgPath?e.imgPath:null;b.crd=b.pqm(e.mode);b._show=e.mode!=="filter"?b.chg:b.asc;this.fpf2=function(){if($(b.file).attr("hasBindPreview")!="1"){$(b.file).bind("change",function(){return b.preview()});$(b.file).attr("hasBindPreview","1")}}};f.MODE=$.browser.msie||$.browser.msie?"filter":$.browser.firefox?"domfile":$.browser.opera||$.browser.chrome||$.browser.safari?"remote":"simple";f.TRANSPARENT=$.browser.msie||$.browser.msie?"mhtml:"+document.scripts[document.scripts.length-1].getAttribute("src",4)+"!blankImage":"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";f.fn=f.prototype={version:'4.1.6',fpf:function(a){var b=new f(a);b.fpf2()},ruq:function(a){this.options={id:null,container:null,mode:"remote",ratio:0,nas:200,maxHeight:200,width:200,height:200,acz:function(){},onShow:function(){},onErr:function(){},action:"/js/Control/UploadImg/ImagePreview.ashx",imgType:["gif","jpeg","jpg","bmp","png"],defaultImgUrl:null,imgPath:null,timeout:0};return $.extend(this.options,a||{})},preview:function(){if(!$.trim(this.file.value))return false;var a=this.file.value.toLowerCase().split('.');var b=$.trim(a.length>0?a[a.length-1]:null);if(ymr(b))b=b.toLowerCase();if(this.imgType){var i=0;for(i=0;i<this.imgType.length;i++){if(this.imgType[i]==b)break}
if(i==this.imgType.length){this.file.value=this.oldValue;alert("图片类型必须是"+this.imgType.join("，")+"中的一种");return false}}
this.oldValue=this.file.value;try{a=$.trim(this.file.value);var i=a.lastIndexOf("\\");i=i<0?a.lastIndexOf("/"):i;var c=i<0?a:a.substr(i+1,a.length-i-1);this.cotainer.next().val(c)}catch(err){}
if(this.file&&false!==this.acz()){this._preview(this.crd())}
return true},pqm:function(a){switch(a){case"filter":return this.ewy;case"domfile":return this.qby;case"remote":return this.dhj;case"simple":default:return this.pnu}},ewy:function(){this.file.select();try{return document.selection.createRange().text}finally{document.selection.empty()}},qby:function(){return this.file.files[0].getAsDataURL()},dhj:function(){this.esf();this.mil&&this.mil.upload()},pnu:function(){return this.file.value},esf:function(){if(!this.mil&&this.action!==undefined&&typeof zzk==="function"){var b=this;this.mil=new zzk(this.file,{qjq:function(){this.action=b.action;this.timeout=b.timeout;var a=this.parameter;a.ratio=b.ratio;a.width=b.nas;a.height=b.maxHeight},coc:function(a){try{b._preview(a.contentWindow.document.body.innerHTML)}catch(e){b.nuy("remote error")}},oun:function(){b.nuy("timeout error")}})}},_preview:function(a){if(!!a&&a!==this._data){this._data=a;this._show()}},pfy:function(){if(!this.bnw){var a=this.bnw=new Image();var b=this;var c=function(){b.min(b._data,this.width,this.height)};this.bwj=function(){this.onload=null;c.call(this)};a.onload=$.browser.msie?this.bwj:c;a.nbu=function(){b.nuy()}}else if($.browser.msie){this.bnw.onload=this.bwj}},chg:function(){this.img.src=this._data;this.pfy();this.bnw.src=this._data;$(this.img).width(this.width);$(this.img).height(this.height)},omr:function(){if(!this.bnw){var a=this.bnw=document.createElement("div");$(a).css({width:"1px",height:"1px",visibility:"hidden",position:"absolute",left:"-9999px",top:"-9999px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image')"});var b=document.body;b.insertBefore(a,b.childNodes[0])}},asc:function(){this.omr();var a=this.bnw,data=this._data.replace(/[)'"%]/g,function(s){return escape(escape(s))});a.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src=data;this.img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale',src=\""+data+"\")";$(this.img).width(this.width);$(this.img).height(this.height);this.min(f.TRANSPARENT,a.offsetWidth,a.offsetHeight)},min:function(a,b,c){var d=this.img,style=d.style,ratio=Math.max(0,this.ratio)||Math.min(1,Math.max(0,this.nas)/b||1,Math.max(0,this.maxHeight)/c||1);style.width=Math.round(b*ratio)+"px";style.height=Math.round(c*ratio)+"px";d.src=a;this.onShow()},boy:function(){if(this.mil){this.mil.boy();this.mil=null}
if(this.bnw){var a=this.bnw,parent=a.parentNode;this.bnw=a.onload=a.nbu=null;parent&&parent.removeChild(a)}
this.file=this.img=null},nuy:function(a){this.onErr(a)}}
$.qju=f.fn.fpf})(jQuery);var zzk=function(a,b){this.file=a;this.pxs=false;this.qio=null;this.ecd=null;this._form=null;this.cyz={};this.rlg=null;$.extend(this,this.ruq(b))};zzk.oek=1;zzk.prototype={ruq:function(a){this.options={action:"",timeout:0,parameter:{},qjq:function(){},coc:function(){},onStop:function(){},oun:function(){}};return $.extend(this.options,a||{})},upload:function(){this.stop();if(!this.file||!this.file.value)return;this.qjq();this.lfv();this.akg();this.mbr();if(this.timeout>0){}
this._form.submit();this.pxs=true},lfv:function(){if(!this.ecd){var a="QUICKUPLOAD_"+zzk.oek++,iframe=document.createElement($.browser.msie?"<iframe name=\""+a+"\">":"iframe");iframe.name=a;iframe.style.display="none";var b=this;$(iframe).bind("load",function(){b.lxk()});var c=document.body;c.insertBefore(iframe,c.childNodes[0]);this.ecd=iframe}},akg:function(){if(!this._form){var a=this;var b=document.createElement('form'),file=this.file;$.extend(b,{target:this.ecd.name,method:"post",encoding:"multipart/form-data"});$(b).css({padding:0,margin:0,border:0,backgroundColor:"transparent",display:"inline"});if(file.form)$(file.form).remove();file.parentNode.insertBefore(b,file).appendChild(file);this._form=b}
this._form.action=this.action},mbr:function(){var a=this._form,bvh=this.cyz,pph={},name;for(name in this.parameter){var b=a[name];if(!b){b=document.createElement("input");b.name=name;b.type="hidden";a.appendChild(b)}
b.value=this.parameter[name];pph[name]=b;delete bvh[name]}
for(name in bvh){a.removeChild(bvh[name])}
this.cyz=pph},stop:function(){if(this.pxs){this.pxs=false;clearTimeout(this.qio);this.ecd.src="";this.ygc();this.onStop()}},boy:function(){this.pxs=false;clearTimeout(this.qio);this.ygc();this.kmn();this.cyz=this.rlg=this.file=null},ygc:function(){if(this.ecd){$(this.ecd).remove();this.ecd=null}},kmn:function(){if(this._form){var a=this._form,parent=a.parentNode;if(parent){parent.insertBefore(this.file,a);parent.removeChild(a)}
this._form=this.cyz=null}},zsz:function(){if(this.pxs){this.pxs=false;this.stop();this.oun()}},lxk:function(){if(this.pxs){this.pxs=false;this.coc(this.ecd)}}}
var DcxMoney={};var old_value="";function xok(a){if(event.keyCode<=40&&event.keyCode>=37){return false}
var b=$(a);var c="";var d=b.val();var e=0;var g="";var h="";if(d.length>0&&d.substr(0,1)!="+"&&d.substr(0,1)!="-"&&(d.substr(0,1)<"0"||d.substr(0,1)>"9")){alert('输入错误,第一个字符只能为+,-和0到9.');b.val(old_value);return false}
for(var j=0;j<d.length;j++){if(d.substr(j,1)!=","&&d.substr(j,1)!="."&&(d.substr(j,1)<"0"||d.substr(j,1)>"9")){if(j!=0||d.substr(j,1)!="-"){b.val(old_value);alert('输入错误,只能输入数字和小数点.');return false}}
if(d.substr(j,1)!=","&&d.substr(j,1)!=".")c=c+d.substr(j,1);else if(d.substr(j,1)=="."){e++;g=c;c=""}}
if(e>1){b.val(old_value);alert('输入错误,只能有一个小数点');return false}
if(e>0){h="."+c;c=g}
var k="";if(c.length<=3||((c.substr(0,1)=="-"||c.substr(0,1)=="+")&&c.length<=4)){old_value=b.val();return false}
var f="";if(c.substr(0,1)=="-"||c.substr(0,1)=="+"){f=c.substr(0,1);c=c.substr(1,c.length-1)}
var i=1;for(;i<=c.length/3;i++){var l=c.substr(c.length-3*i,3);if(3*i==c.length)k=l+k;else k=","+l+k}
k=c.substr(0,c.length%3)+k;b.val(f+k+h);old_value=b.val()}
DcxMoney.Keyup=xok;function jtv(a){var b=$(a);old_value=b.val()}
DcxMoney.Focus=jtv;function yzg(a){xok(a);var b=$(a);var c=b.val();if(c.length==0){return false}
var d=0;var p=0;for(var e=0;e<c.length;e++){if(c.substr(e,1)=="."){d=e;break}}
if(d==0)b.val(c+".00");else if(c.length-d-1==0)b.val(c.substr(0,d)+".00");else if(c.length-d-1>=2)b.val(c.substr(0,d)+"."+c.substr(d+1,2));else if(c.length-d-1==1)b.val(c.substr(0,d)+"."+c.substr(d+1,1)+"0")}
DcxMoney.Blur=yzg;