"use strict";var fnGetFiles=function(n,t,i,r,u){var f=function(t){var e=t,f="";$.each(e,function(n,t){if(t.fileid){var i="default";t.subname=t.subname.toLowerCase();"doc|xls|txt|exe|mp3|mv|pdf|ppt|psd|".indexOf(t.subname)>-1?i=t.subname:"png|jpg|jpeg|gif|bmp".indexOf(t.subname)>-1?i="jpg":"7z|zip|rar".indexOf(t.subname)>-1?i="rar":"docx|doc".indexOf(t.subname)>-1?i="doc":"xls|xlsx".indexOf(t.subname)>-1?i="xls":"pptx".indexOf(t.subname)>-1&&(i="ppt");f+='

'+t.filename+"<\/span><\/a><\/p>"}});i&&(f+='

'+r+"<\/span><\/a><\/p>");n.append(f).find("a").on("click",function(){var n=$(this).attr("path"),r=$(this).text().split(".")[0],u=$(this).attr("subname"),t=$(this).attr("goprg"),f=$(this).attr("oldid"),i;t?parent.layer.open({type:2,title:i18next.t("common.Info"),area:["900px","600px"],shade:!1,closeBtn:1,shadeClose:!0,maxmin:!0,offset:"100px",anim:0,content:"/Page/Eip/"+t+".html?Action=Upd&Guid="+f,success:function(n){n.find("iframe").contents().find("#Toolbar").hide()}}):"pdf|jpg".indexOf(u)>-1?(i=gServerUrl+"/"+n,window.open(i)):DownLoadFile(n,r)})};return fnGetUploadFiles(t,f)},fnPrePrint=function(n){$(":input,select").not('[type="button"],[type="radio"]').each(function(){var n=$(this).parent(),t,i;n.attr("printele")||(t="",i="",n.find(":input,select").each(function(){$(this).attr("value",this.value);var r=this.outerHTML,n=$("

",{"class":"show-text"});switch(this.type){case"text":case"number":case"textarea":n.html(this.value);break;case"select":case"select-one":n.html($(this).find("option:selected").text())}t+=r;i+=n[0].outerHTML}));n.attr("printele",t).html(i)});n.jqprint({operaSupport:!1});$("[printele]").each(function(){var n=$(this).attr("printele");$(this).html(n).removeAttr("printele").find(":input,select").each(function(){this.value=$(this).attr("value")})})},fnCheckFlows=function(n,t,i,r){var h=n.Applicant?n.Applicant:n.AskTheDummy,f=[],e=0,o,u,s;return t&&n.Agent_Person&&(e++,o=$.grep(r,function(t){return t.MemberID===n.Agent_Person})[0],u={},u.ParentId="0",u.FlowId=guid(),u.Order=e,u.SignedWay="flow1",u.SignedId=n.Agent_Person,u.SignedMember=o.MemberName,u.Department=o.DepartmentName,u.Jobtitle=o.JobtitleName,u.SignedDecision="",u.SignedOpinion="",u.SignedDate="",f.push(u)),s=0,$.each(n.CheckOrder,function(i,r){if(t&&i===0){var u=Jsonget(r.SignedMember,"id",n.Agent_Person);u.length>0&&(e--,f=[])}$.each(r.SignedMember,function(n,t){if(t.id!==h){let u=parseInt(r.Order);var i={};i.ParentId=r.id;i.FlowId=guid();i.Order=u+e+s;i.SignedWay=r.SignedWay;i.SignedId=t.id;i.SignedMember=t.name;i.Department=t.deptname;i.Jobtitle=t.jobname;i.SignedDecision="";i.SignedOpinion="";i.SignedDate="";r.SignedMember.length>1&&n!==r.SignedMember.length-1&&(i.Line=!0);n===0&&(i.Icon=!0);f.push(i)}else r.SignedWay=="flow1"&&--s})}),i?JSON.stringify(f):f},fnHandleFlows=function(n,t){var u=[],r,i;return n.Handle_Person&&(r=$.grep(t,function(t){return t.MemberID===n.Handle_Person})[0],i={},i.FlowId=guid(),i.Order=1,i.SignedWay="flow1",i.SignedId=n.Handle_Person,i.SignedMember=r.MemberName,i.Department=r.DepartmentName,i.Jobtitle=r.JobtitleName,i.SignedDecision="N",i.SignedOpinion="",i.SignedDate="",u.push(i)),JSON.stringify(u)},releaseGridList=function(n){var t=[],i=[];return n=Enumerable.From(n).OrderBy("$.Order").ToArray(),$.each(n,function(r,u){if(t.indexOf(r)===-1){var f=n[r+1],e=n[r+2],o=!1;f&&f.SignedWay===u.SignedWay&&u.SignedWay==="flow4"&&(u.SignedMember=u.SignedMember.concat(f.SignedMember),t.push(r+1),o=!0);o&&e&&e.SignedWay===u.SignedWay&&u.SignedWay==="flow4"&&(u.SignedMember=u.SignedMember.concat(e.SignedMember),t.push(r+2));i.push(u)}}),$.each(i,function(n,t){t.Order=n+1}),i},oPenUserListPop=function(n){n=n||{};var t=[];layer.open({type:1,title:i18next.t("common.SelectUsers"),shadeClose:!1,shade:.1,maxmin:!0,area:["500px","460px"],content:'