
var cst=2036;var oxe="DefaultF_";var wmq=null;var $SystemKey=null;var $DcxUserName=null;var WfRun={};$(window).load(function(){});var wf_mainObj=null;var dlg_run=null;var dlg_post=null;var dlg_rebut=null;var dlg_imprint=null;function ktq(a,b,c,d){var e=ftj(b,c);var f=tny(a,2056,"ListR_");return wzb(b,c,d,e,f)}
WfRun.GoToDealWf=ktq;function wzb(d,e,f,g,h,i){wf_mainObj=g;var j=escape(escape($.trim(g.runObj.KeyField)));var k=escape(escape($.trim(g.runObj.KeyFieldValue)));var l=escape(escape($.trim(g.runObj.KeyFieldValue)));var m=1;if(!ymr($.trim(g.runObj.KeyFieldValue)))m=2;var n=g.flowObj.FormUrl;if(ymr(n))n="/Template/Default/Form/AjaxForm/AjaxForm008.aspx";if(n.indexOf("?")<0)n=n+"?";else n=n+"&";var o="950px";var p="520px";var q=h.NodeId;n=n+"IsMain="+h.IsMain+"&entid="+g.flowObj.EntId+"&kfv="+k+"&mkfn="+j+"&mkfv="+l+"&optype="+m+"&RunId="+d+"&FlowId="+e+"&PrcsId="+f+"&NodeId="+q;if(isNaN(i)||i<1)i=1;n=n+"&targetType="+i;window.top.oud=g;window.top.wf_flowRunMsg=h;var s=window.location.href;var t=tzm("menuid");if(!ymr(t)&&!isNaN(t))t=parseInt(t,10);else t=-1;if(t==2632)s="/Template/default/ListReport/ListReport_Tree001.aspx?menuid=2633";var u=s.indexOf("fdawpqmz=")-1;if(u<1)u=s.length;if(i==1){n=n+"&parentUrl="+escape(wxo(s.substr(0,u),"&","^#%"));window.open(n,"_self")}else if(i==3){n=n+"&parentUrl="+escape(wxo(s.substr(0,u),"&","^#%"));window.open(n,EntId+"1")}else{dlg_run=art.VLdialog.open(n,{title:g.flowObj.EntName,width:o,height:p,zIndex:10,background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'痕迹',width:'250px',height:'20px',className:'float-left  aui_state_highlight',callback:function(){var a=this.iframe.contentWindow;dlg_imprint=ixq(h,2080,"MChildR_","痕迹");return false},focus:false},{name:'流程图',width:'250px',height:'20px',className:'float-left',callback:function(){var a=this.iframe.contentWindow;gmr(e,false);return false},focus:false},{name:'驳回',className:'float-left',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;dlg_rebut=jtn(2091,"驳回","DefaultF_","660px","440px","/Template/Default/Form/DefaultForm008.aspx?entid=2091&kfv="+f+"&mkfn=PrcsId&mkfv="+f+"&optype=1&RunId="+d+"&FlowId="+e+"&PrcsId="+f);return false},focus:false},{name:'转交下一步',title:"转交下一步",width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;var b=hpw(g.flowObj.EntId,a);if(a.npz(g.flowObj.EntId,b)){dlg_post=jbj(h,g,a,dlg_run,2078,"转交下一步","DefaultF_","690px","440px","/Template/Default/Form/DefaultForm008.aspx?entid=2078&kfv="+f+"&mkfn=PrcsId&mkfv="+f+"&optype=1&RunId="+d+"&FlowId="+e+"&PrcsId="+f+"&NodeId="+h.NodeId)}else{art.VLdialog.alert("您输入的数据有误，提交失败。",function(){},4,"提示")}
return false},focus:true},{name:'暂存',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;var b=hpw(g.flowObj.EntId,a);var r=a.col(g.flowObj.EntId,b);var c=r.SubmitForm(false);return false},focus:false},{name:'关闭',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;return true},focus:false}]},true)}
return true}
WfRun.GoToDealWf2=wzb;function lfm(a,b){var c=Dcx.FormRun.flowMsg;var e=c.ctrl;var f=c.nodeObj;var g=brp();var h=g.NodeId;if(isNaN(h))h=-1;if(ymr(g)){art.VLdialog.alert("请选择下一步骤！",function(){},2,"提示");return false}
if(ymr(hee))hee={};hee.BackToPrcsId=-1;hee.NextNodeId=h;hee.IsPostNext=true;hee.NodeId=f.NodeId;if(isNaN(c.mainUserId))c.mainUserId=-1;hee.UserId=c.mainUserId;hee.UserName=c.mainUserName;var j=Dcx.FormRun.flowMsg.rcUserIds;if(h>0&&(isNaN(c.mainUserId)||parseInt(c.mainUserId,10)<1)){art.VLdialog.alert("请选择主办人！",function(){},2,"提示");return false}else if(h<1){hee.UserId=c.mainUserId;hee.UserName=c.mainUserName}
var k="";var l=parseInt(c.mainUserId,10);if(!ymr(j)&&j.length>0){for(var i=0;i<j.length;i++){if(parseInt(j[i],10)!=l)k=k+j[i]+","}}
hee.DealIds=k;hee.PrcsName=g.PrcsName;hee.NotifyMode=1;hee.NotifyType=1;hee.NotifyContent=null;var d=col(a,b);var m=d.SubmitForm(false,true)}
WfRun.PostNode2Next=lfm;function xvx(a,b){return vzy(a,b)}
WfRun.PostNodeBack=xvx;function jbj(j,k,l,m,n,o,p,q,s,t){if(ymr(k))k=wf_mainObj;if(ymr(k)||k.flowObj.FlowId!=j.FlowId){k=ftj(RunId,FlowId);wf_mainObj=k}
k=ftj(RunId,FlowId);if(o==undefined||o==""||o==null)o="转交下一步";var u=art.VLdialog.open(t,{id:'dlg_post',title:o,width:q,height:s,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'确  认',title:"确  认",width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;var b=2078;var c="DefaultF_";var d=a.yci(b,c);var e=null;var f=a.col(b,c);e=f.$form;if(e==null){art.VLdialog.alert("获取表单的HTML对象失败。请确认代码正确。",function(){},4,"提示");return false}
var g=a.sme(e,false,b,c,true,b,d);if(ymr(g)||g==false){art.VLdialog.alert("您输入的数据有误。",function(){},4,"提示");return false}
l.hee.BackToPrcsId=-1;l.hee.NextNodeId=g.NextNodeId;l.hee.IsPostNext=true;l.hee.NodeId=j.NodeId;l.hee.UserId=g.UserId;l.hee.UserName=g.UserName;l.hee.DealIds=g.DealIds;l.hee.PrcsName=g.PrcsName;l.hee.NotifyMode=g.NotifyMode;l.hee.NotifyType=g.NotifyType;l.hee.NotifyContent=g.NotifyContent;var h=hpw(k.flowObj.EntId,l);var r=l.col(k.flowObj.EntId,h);var i=r.SubmitForm(false);return true},focus:true},{name:'关  闭',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;return true},focus:false}]},true);return u}
WfRun.ShowPostNextDlg=jbj;function vgu(a,b,c,d,e){if(ymr(a)){if(ymr(e))a=hxn();else a=tny(e,b,c)}
var f=wf_mainObj;if(ymr(wf_mainObj)||f.flowObj.FlowId!=a.FlowId){f=ftj(a.RunId,a.FlowId);wf_mainObj=f}
var g=a;var h=escape(escape($.trim(f.runObj.KeyField)));var i=escape(escape($.trim(f.runObj.KeyFieldValue)));var j=escape(escape($.trim(f.runObj.KeyFieldValue)));if(ymr($.trim(f.runObj.KeyFieldValue))){art.VLdialog.alert('此工作流的表单数据还没提交，请办理后再查看.');return false}
var k=f.flowObj.BrowseUrl;if(ymr(k))k="/Template/default/Browse/Browse003.aspx";if(k.indexOf("?")<0)k=k+"?";else k=k+"&";var l="950px";var m="520px";k=k+"entid=2054&kfv="+i+"&mkfv="+j+"&RunId="+a.RunId+"&FlowId="+a.FlowId+"&PrcsId="+a.PrcsId;if(d==undefined||d==""||d==null)d="表单明细";var n=art.VLdialog.open(k,{id:'dlg_flowFormDetail',title:d,width:l,height:m,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'关  闭'}]},true);return n}
WfRun.ShowFormDetailDlg=vgu;function kmu(a,b,c,d,e){if(ymr(a)){if(ymr(e))a=hxn();else a=tny(e,b,c)}
var f="/Template/default/Browse/Browse003.aspx";if(f.indexOf("?")<0)f=f+"?";else f=f+"&";var g="700px";var h="470px";f=f+"entid=2054&kfv="+a.CreatorId+"&mkfv="+a.CreatorId+"&RunId="+a.RunId+"&FlowId="+a.FlowId+"&PrcsId="+a.PrcsId;if(ymr(a.CreatorId)||isNaN(a.CreatorId)||a.CreatorId<1){art.VLdialog.alert('获取发起人信息失败.');return}
if(d==undefined||d==""||d==null)d="发起人的详情";var i=art.VLdialog.open(f,{id:'dlg_creatorDetail',title:d,width:g,height:h,zIndex:'99999',background:'#0c2136',lock:false,top:'47.2%',duration:0,opacity:0.2,button:[{name:'关  闭'}]},true);return i}
WfRun.ShowStartUserMsgDlg=kmu;function wrf(a,b,c,d,e){if(ymr(a)){a=hxn(e,b,c)}
art.VLdialog.confirm('确定要删除吗？',function(){iio(urlPama,url,b,c)},function(){art.VLdialog.tips('你取消了删除')})}
WfRun.RemoveOneFlow=wrf;function ixq(a,b,c,d,e){if(ymr(a)){if(ymr(e))a=hxn();else a=tny(e,b,c)}
var f="750px";var g="480px";var h="/WorkFlow/FlowHsty.html?flowId="+a.FlowId+"&runId="+a.RunId+"&&prcsId="+a.PrcsId;if(d==undefined||d==""||d==null)d="痕迹";var i=art.VLdialog.open(h,{id:'dlg_imprint',title:d,width:f,height:g,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'关  闭'}]},true);return i}
WfRun.ShowImprintDlg=ixq;function uob(k,l,m,n){if(ymr(m)){m={};var o=tzm("FlowId");if(!ymr(o)&&!isNaN(o))o=parseInt(o,10);else o=-1;m.FlowId=o;var p=tzm("RunId");if(!ymr(p)&&!isNaN(p))p=parseInt(p,10);else p=-1;m.RunId=p;var q=tzm("PrcsId");if(!ymr(q)&&!isNaN(q))q=parseInt(q,10);else q=-1;m.PrcsId=q}
var r=bcy(null,k,l,"NextNodeId",null,false,false);if(isNaN(r))r=-1;r=parseInt(r,10);var s="760px";var t="520px";var u=2079;var v="DefaultF_";var w="/Template/Default/Form/DefaultForm008.aspx?entid="+u+"&kfv="+q+"&mkfn=PrcsId&mkfv="+m.PrcsId+"&optype=1&RunId="+m.RunId+"&FlowId="+m.FlowId+"&PrcsId="+m.PrcsId+"&NodeId="+r;var x="选择经办人";var y=art.VLdialog.open(w,{id:'dlg_dealMan',title:x,width:s,height:t,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'确  认',title:"确  认",width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;var b=a.yci(u,v);var c=null;var d=a.col(u,v);c=d.$form;if(c==null){art.VLdialog.alert("获取表单的HTML对象失败。请确认代码正确。",function(){},4,"提示");return false}
var e=a.sme(c,false,u,v,true,u,b);if(ymr(e)||e==false){art.VLdialog.alert("您输入的数据有误。",function(){},4,"提示");return false}
var f=2078;var g="DefaultF_";var h=yci(f,g);var i=null;var j=col(f,g);i=j.$form;if(i==null){art.VLdialog.alert("获取表单的HTML对象失败。请确认代码正确。",function(){},4,"提示");return false}
xuv(f,g,"UserId",i,false,e.MainUserId,false);xuv(f,g,"UserName",i,false,e.MainUser,false);xuv(f,g,"DealIds",i,false,e.DealUsers,false);xuv(f,g,"DealUserNames",i,false,e.DealUserNames,false);return true},focus:true},{name:'关  闭'}]},true);return y}
function jtn(d,e,f,g,h,i){if(e==undefined||e==""||e==null)e="驳回";var j=art.VLdialog.open(i,{id:'dlg_rebut',title:e,width:g,height:h,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'确  认',title:"确  认",width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;var b=false;var c=a.tum(d,"DefaultF_");b=vzy(c);if(b){dlg_dealMan.close();Reflash(2056,'ListR_');return true}
return false},focus:true},{name:'关  闭'}]},true);return j}
WfRun.ShowRebutDlg=jtn;function vzy(c,d){var e={};var f=col(c,d);e.entId=c;e.entName=f.EntName;e.menuId=f.MenuId;var g=ggt(c,d);e.keyValue=g.Header.MKeyValue;if(g.Header.OpType!=2||ymr(e.keyValue)){art.VLdialog.alert("表单还没提交，不允许退回。",function(){},4,"提示");return false}
var h=Dcx.FormRun.flowBackMsg.ctrl;if(h.$sendOtherMsg.find("#d2078_0").attr("checked")==true)e.sms=true;else e.sms=false;if(h.$sendOtherMsg.find("#d2078_1").attr("checked")==true)e.email=true;else e.email=false;if(h.$sendOtherMsg.find("#d2078_2").attr("checked")==true)e.note=true;else e.note=false;var i={};if(ymr(hee)){art.VLdialog.alert("获取流程信息失败，无法退回。",function(){},14,"提示");return false}
i.FlowId=hee.FlowId;i.RunId=hee.RunId;i.PrcsId=hee.PrcsId;i.RebutToPrcsId=0;i.NoteType=0;i.NoteContent=null;i.Remark=h.xss.val();if(ymr(i.Remark)){art.VLdialog.alert("请输入退回原因。",function(){},4,"提示");return false}
i.Remark="您的提交被退回。原因："+i.Remark;e.rbObj=i;var j=false;var k="/WebServices/WorkFlow/FlowRun.asmx/Rebut";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:k,data:JSON2.stringify(e),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("提交失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){window.top.art.VLdialog.alert("您还没登陆系统。",function(){},4,"提示")}else if(a.IsOK){byg();window.top.art.VLdialog.tips("成功驳回！",3.8);j=true}else window.top.art.VLdialog.alert(a.ErrorMsg,function(){},4,"提示")}});return j}
function hej(c,d){var e={};var f=col(c,d);e.entId=c;e.entName=f.EntName;e.menuId=f.MenuId;var g=ggt(c,d);e.keyValue=g.Header.MKeyValue;if(g.Header.OpType!=2||ymr(e.keyValue)){art.VLdialog.alert("表单还没提交，不允许会签。",function(){},4,"提示");return false}
var h=Dcx.FormRun.flowSignMsg.ctrl;if(h.$sendOtherMsg.find("#d2078_0").attr("checked")==true)e.sms=true;else e.sms=false;if(h.$sendOtherMsg.find("#d2078_1").attr("checked")==true)e.email=true;else e.email=false;if(h.$sendOtherMsg.find("#d2078_2").attr("checked")==true)e.note=true;else e.note=false;var i={};if(ymr(hee)){art.VLdialog.alert("获取流程信息失败，无法退回。",function(){},14,"提示");return false}
e.flowId=hee.FlowId;e.runId=hee.RunId;e.prcsId=hee.PrcsId;e.msgContent=DcxEditor.rtg();if(ymr(e.msgContent)){art.VLdialog.alert("请输入会签原因。",function(){},4,"提示");return false}
var j=false;var k="/WebServices/WorkFlow/FlowRun.asmx/hej";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:k,data:JSON2.stringify(e),dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("提交失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){window.top.art.VLdialog.alert("您还没登陆系统。",function(){},4,"提示")}else if(a.IsOK){byg();window.top.art.VLdialog.tips("会签成功！",3.8);j=true}else window.top.art.VLdialog.alert(a.ErrorMsg,function(){},4,"提示")}});return j}
function tku(d,e,f){var g=tny(d,e,f);art.VLdialog.confirm("<font style=\"color:red;font-size:16px;\">您确定要收回本工作吗？</font>",function(){var c="/WebServices/WorkFlow/FlowRun.asmx/TakeBackWork";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{FlowId:"+g.FlowId+",RunId:"+g.RunId+",PrcsId:"+g.PrcsId+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){art.VLdialog.alert("您还没登陆系统。",function(){},4,"提示");return true}else if(a.IsOK){art.VLdialog.alert("成功工作收回。",function(){},4,"提示");return true}else art.VLdialog.alert(a.ErrorMsg+"。",function(){},4,"提示")}})});return true}
WfRun.TakeBackWf=tku;function iau(c,d,e,f){var g=c;var h=d;if(e.mxx(g,h)!=1){art.VLdialog.alert("您已经委托。",function(){},4,"提示");return false}
var i=e.yci(g,h);var j=null;var k=e.col(g,h);j=k.$form;if(j==null){art.VLdialog.alert("获取表单的HTML对象失败。请确认代码正确。",function(){},4,"提示");return false}
var l=e.sme(j,false,g,h,true,g,i);if(ymr(l)||l==false){art.VLdialog.alert("委托失败。您输入的数据有误。",function(){},4,"提示");return false}
if(l.UserId==l.CreatorId){art.VLdialog.alert("委托失败。您不能委托给自己。",function(){},4,"提示");return false}
var m={};m.entId=0;m.entName=null;m.menuId=0;m.keyValue=null;if(j.find("#ddcx_2090_NoteType_0").attr("checked")==true)m.sms=true;else m.sms=false;if(j.find("#ddcx_2090_NoteType_1").attr("checked")==true)m.email=true;else m.email=false;m.note=false;if(ymr(l.NoteContent)){art.VLdialog.alert("请输入委托原因。",function(){},4,"提示");return false}
l.NoteType=0;m.dpObj=l;var n=false;var t=art.VLdialog.tips("正在委托...",333.8);var o="/WebServices/WorkFlow/FlowRun.asmx/Depute";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:o,data:JSON2.stringify(m),dataType:'json',beforeSend:function(a){},complete:function(a,b){t.close()},error:function(a){alert("提交失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){window.top.art.VLdialog.alert("您还没登陆系统。",function(){},4,"提示")}else if(a.IsOK){pet(g,h,2);art.VLdialog.Succeed("委托成功！",function(){},2,"提示");t.close();f.close()}else window.top.art.VLdialog.alert(a.ErrorMsg,function(){},4,"提示")}});return n}
WfRun.ShowDeputeDlg=ugf;function ugf(d,e,f,g,h){if(ymr(d))d=hxn(h,e,f);var i=null;i=d;var j=i.FlowId;var g="委托";var k="800px";var l="500px";var m=2090;var n="/WorkFlow/Depute.aspx?entid="+m+"&kfv="+d.PrcsId+"&mkfn=PrcsId&mkfv="+d.PrcsId+"&optype=1&RunId="+d.RunId+"&FlowId="+d.FlowId+"&PrcsId="+d.PrcsId+"&NodeId="+d.NodeId;var o=art.VLdialog.open(n,{id:'dlg_rebut',title:g,width:k,height:l,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'确  认',title:"确  认",width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;var b=hpw(m,a);var c=iau(m,b,a,o);if(c){Reflash(2056,'ListR_')}
return false},focus:true},{name:'关  闭'}]},true);return dlg_rebut}
function gmr(b,c,d,e,f){var g=null;if(isNaN(b)||b<1){g=hxn();b=g.FlowId}
if(ymr(c))c=false;if(c)c=1;else c=0;if(ymr(b)||isNaN(b)||parseInt(b,10)<1){b=tzm("flowId");if(!ymr(b)&&!isNaN(b))b=parseInt(b,10);else b=-1}
if(ymr(b)||isNaN(b)||parseInt(b,10)<1){art.VLdialog.alert("由于flowId<1，没有找到相关流程！",function(){},20,"提示");return}
var h=-1;var i="/WorkFlow/FlowDesigner.html?IsDesigning="+c+"&flowId="+b+"&curNodeId="+h;var j=850;var k=450;var l=art.VLdialog.open(i,{id:'dlg_wfChart',title:"工作流设计",width:j,height:k,zIndex:'99999',background:'#0c2136',lock:true,top:'47.2%',duration:0,opacity:0.2,button:[{name:'保  存',title:"保  存",width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;return false},focus:true},{name:'关闭',width:'250px',height:'20px',callback:function(){var a=this.iframe.contentWindow;return true},focus:false}]},true);return l}
WfRun.ShowWfChart=gmr;DcxCom.ShowWfDlgChart=gmr;function src(c,d){var e=null;var f="/WebServices/WorkFlow/FlowRun.asmx/src";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,async:false,data:"{FlowId:"+d+",RunId:"+c+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){alert("获取表单数据失败！");return false}
e=a}});return e}
function hxn(a,b,c){if(ymr(a)){a=dnx.get(0)}
var d=mwu(a,b,c);var e={};e.RunId=wkz(a,b,c,"RunId",d,true);e.FlowId=wkz(a,b,c,"FlowId",d,true);e.PrcsId=wkz(a,b,c,"PrcsId",d,true);e.NodeId=wkz(a,b,c,"NodeId",d,true);e.CreatorId=wkz(a,b,c,"CreatorId",d,true);e.IsMain=wkz(a,b,c,"IsMainDealer",d,true);return e}
function tny(a,b,c){var d=mwu(a,b,c);var e={};e.RunId=wkz(a,b,c,"RunId",d,true);e.FlowId=wkz(a,b,c,"FlowId",d,true);e.PrcsId=wkz(a,b,c,"PrcsId",d,true);e.NodeId=wkz(a,b,c,"NodeId",d,true);e.CreatorId=wkz(a,b,c,"CreatorId",d,true);e.PrcsFlag=wkz(a,b,c,"PrcsFlag",d,true);e.IsMain=wkz(a,b,c,"IsMainDealer",d,true);return e}
function ftj(c,d){var e=null;var f="/WebServices/WorkFlow/FlowRun.asmx/ftj";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,async:false,data:"{FlowId:"+d+",RunId:"+c+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){alert("获取流程失败！");return false}
e=a}});return e}
function ryu(c,d,e){var f=null;var g="/WebServices/WorkFlow/FlowNode.asmx/ryu";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,async:false,data:"{flowId:"+c+",curNodeId:"+d+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){alert("获取数据失败。详情："+JSON2.stringify(a))},success:function(a){a=hmy(a);if(a==null){alert("获取下一步节点时失败！");return false}
f=a}});return f}
function geg(a){var b=new nzy();b.append("<div id='div_CreateFlowRun'  class='listreport'>\n");b.append("<ul class='ul-mform' style='width: 500px;'>\n");b.append(" <li class='li-area' style='position: static; width: 500px; min-height: 20px;'>\n");b.append("  <div class='field-content pad4'>\n");b.append("   <div class='form-title2' id='div2' style=''>\n");b.append("    <div style='width: 170px; float: left; clear: none;'>\n");b.append("     <h2 id='h2'>\n");b.append("      新建工作</h2>\n");b.append("    </div>\n");b.append("   </div>\n");b.append("  </div>\n");b.append(" </li>\n");b.append(" <li class='li-area' style='position: static; width: 500px; height:110px;'>\n");b.append("  <div class='field-content pad4'>\n");b.append("   <input type='text' class='form-txt' id='txt_RunName2' style='width: 494px; height: 40px;padding:10px 10px;' value='"+a+"' /></div>\n");b.append(" </li>\n");b.append(" <li class='li-area' style='position: static;display:none; width: 500px; min-height: 30px;'>\n");b.append("  <div class='field-content pad4'>\n");b.append("   <a class='f_hot_op_bt f_hot_op_bt1 ' href='javascript:void(0);' id='btn_UpdatePublish' style='float: left;margin-right:30px;'><span class='op_bt_i'>保&nbsp;&nbsp;&nbsp;&nbsp;存</span></a><a class='f_hot_op_bt f_hot_op_bt3 ' href='javascript:void(0);' onclick='javascript:byg();' style='float: left;'><span class='op_bt_i'>关&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;闭</span></a></div>\n");b.append(" </li>\n");b.append("</ul>\n");b.append("</div>\n");b.append("<br />\n");return b.toString()}
WfRun.CreateNewWorkHtml=geg;function CreateFlowRun(c){var d=kvw(c);var e=xmt(d);var f=parseInt(e.attr("TreeId"),10);var g=wbe(f);var h=$(c).parent();if(!ymr(g)&&g.length>0)g.removeClass("selected");kvt(f,h);var i=$(c).text()+"("+dpq(new Date())+")";$(c).parent().addClass("selected");var j=art.VLdialog({content:geg(i),fixed:true,id:'Fm7',icon:'',top:150,okVal:'新  建',title:"新建工作",ok:function(){var a=$(c).parent().parent().attr("tvalue");var b=$("#txt_RunName2").val();rry(b,a)},cancel:true});j.shake&&j.shake()}
WfRun.CreateNewWork=CreateFlowRun;function epr(b,c,d){var e=$(d).offset().top;e=e-150;if(e<50)e=50;var f=c+"("+dpq(new Date())+")";$(d).parent().addClass("selected");var g=art.VLdialog({content:geg(f),id:'Fm7',icon:'',top:e,okVal:'新  建',title:"新建工作",ok:function(){var a=$("#txt_RunName2").val();rry(a,b)},cancel:true})}
WfRun.CreateNewWork2=epr;function qgc(a,b,c){var d=b+"("+dpq(new Date())+")";art.VLdialog.confirm("<font style=\"color:red;font-size:16px;\">您确定要新建 "+b+" 流程的工作吗？",function(){rry(d,a)},function(){},false)}
WfRun.CreateNewWork3=qgc;function rry(d,e){var f="/WebServices/WorkFlow/FlowRun.asmx/CreateNewRunFlow";var g={"RunName":d,"FlowId":e};$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:f,data:JSON2.stringify(g),dataType:'json',success:function(a){a=hmy(a);if(a.reMsg.IsOK){var b=a;var c={};c.RunId=b.runObj.RunId;c.FlowId=b.runObj.FlowId;c.CreatorId=b.runObj.CreatorId;c.PrcsId=b.prcsObj.PrcsId;c.NodeId=b.prcsObj.NodeId;c.PrcsFlag=b.prcsObj.PrcsFlag;c.IsMain=1;wzb(c.RunId,c.FlowId,c.PrcsId,b,c)}else art.VLdialog.alert(a.reMsg.ErrorMsg,function(){},200,"提示")},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}})}
WfRun.CreateNewWork4=rry;function itz(){window.open("http://www.dcxCreator.com/Designer/main.html","_blank")}
WfRun.GoToDcx=itz;function jev(){art.VLdialog.open.api.close()}
function dwk(){art.VLdialog.open.api.hide()}
function edj(e,f,g,h){var i=tny(e,f,g);h=parseInt(h,10);art.VLdialog.confirm('确定要删除吗？',function(){var c="/WebServices/WorkFlow/FlowRun.asmx/DeleteRun";var d={"runId":i.RunId,"flowId":i.FlowId};$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:JSON2.stringify(d),dataType:'json',success:function(a){a=hmy(a);if(a.IsOK){art.VLdialog.tips('删除成功！',0.8);var b=$(e).parent();while(!ymr(b)&&b.length>0){if(b.attr("isgroup")=="1"){b.remove();break}
b=b.parent()}}else art.VLdialog.alert(a.ErrorMsg,function(){},200,"提示")},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}})},function(){art.VLdialog.tips('你取消了删除')})}
WfRun.DeleteRun=edj;