
var UserMng={};var cst=2054;var oxe="DefaultF_";var Sample_MenuId=3274;var lsf=null;var xjq=null;var ybi=null;var nhi=null;var znu=new Array();$(window).load(function(){});function ShowEditUserDialog(d,e){var f=cst;var g=oxe;var h=Sample_MenuId;if(ymr(e))e="";var e=escape(escape(e));var i=escape(escape(e));var j="UserId";var k="新建用户";var l=2;if(ymr(e))l=1;var m="/Template/Default/Form/AjaxForm/AjaxForm008.aspx?MenuId="+h+"&entid="+f+"&ment=1&mkfn="+j+"&mkfv="+i+"&optype="+l+"&showType=2";m=m+"&targetType=1";m=m+"&iframeId=iframe_"+h;art.VLdialog.open(m,{title:k,width:"800px",height:"520px",zIndex:10,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(f,a);if(a.User.IsAdd)var c=a.xgj(false);else a.pjx();return false},focus:true},{name:'关  闭'}]},true);return true}
UserMng.ShowEditUserDlg=ShowEditUserDialog;function SetCanLogin(a,b){var c=DcxReport.GetRow(a);var d=new Array();d.push(c);var e=new Array();var f=parseInt(DcxReport.GetRowKeyValue(a),10);if(isNaN(f))return false;e.push(f);SetCanLogin3(e,d,b)}
UserMng.AllowLogin=SetCanLogin;function SetCanLogin2(b,c){var d=$("#div_List_ListR_2054").children("[isgroup=1]");var e=new Array();var f=new Array();d.each(function(){f.push($(this));var a=parseInt($(this).attr("kv"),10);if(!isNaN(a))e.push(a)});SetCanLogin3(e,f,c)}
UserMng.AllowLogin2=SetCanLogin2;function SetCanLogin3(h,k,l){if(l!=true)l=false;var j={"userIdList":h,"canLogin":l};var m="停用";if(l)m="启用";art.VLdialog.confirm('确定要'+m+'吗？',function(){var g="/WebServices/System/User.asmx/SetCanLogin2";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,data:JSON2.stringify(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){a=hmy(a);if(a){var b="isCanLogin";var c="isnotlogin";if(l){b="isnotlogin";c="isCanLogin"}
for(var i=0;i<k.length;i++){var d=k[i];var e=d.find("a["+b+"=1]");e.show();var f=d.find("a["+c+"=1]");f.hide();e.after(f)}
art.VLdialog.tips('提交成功！',0.5)}else art.VLdialog.alert("提交失败。",function(){},320,"提示")}})},function(){art.VLdialog.tips('你取消了删除')})}
UserMng.AllowLogin3=SetCanLogin3;function ShowInsertUserDialog(){ShowEditUserDialog(null,null);return true}
UserMng.ShowAddUsrDlg=ShowInsertUserDialog;