| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Cache-Control" content="no-store" /><meta http-equiv="Pragma" content="no-cache" /><meta http-equiv="Expires" content="-1" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><title>人员管理</title><script type="text/javascript" src="../../scripts/jquery-1.8.3.js"></script><link rel="stylesheet" type="text/css" href="../../themes/icon.css">	<script type="text/javascript" src="../../scripts/jquery.easyui.js"></script>	<script type="text/javascript" src="../../scripts/easyui-lang-zh_CN.js"></script>	<script type="text/javascript"		src="../../scripts/jquery.validate.rules.generate.js"></script>	<script type="text/javascript" src="../../scripts/config.js"></script>	<script type="text/javascript" src="../../scripts/comment.js"></script>	<script type="text/javascript" src="../../scripts/utils.js"></script>	<script type="text/javascript" src="../../scripts/init.js"></script>	<script type="text/javascript" src="../../scripts/jquery.edatagrid.js"></script></head><body>	<script type="text/javascript">		//准备加载本地和远程数据,为Grid选择框准备数据		var roleList=[]; //角色列表数据		// var deptList=[]; //机构名称列表数据		var deptMap=new MapUtils();		$(function(){        	sextypeData = getListData('sextype');        	usertyppData = getListData('usertype');        	//以下不直接返回List,不需要isList=1参数,直接加载使用,以下方式可以检测通讯故障        	syncAjaxCall('SYSROLE01','proNames=roleid&orderBy=roleid',function(data){	   			if(data){	   				roleList = data.rows;	   			}     		});			syncAjaxCall('GENERALD01','proNames=deptType&orderBy=id&rows=-1&deptType=1',function(data){				if(data){					// deptList=data.rows;					for(i=0;i<data.rows.length;++i){						deptMap.put(data.rows[i].deptCode,data.rows[i].deptName);					}				}				var timeOut = setTimeout(function(){					doSearch();					clearTimeout(timeOut);				}, 500);			});			doSearch(0)        });     </script>	<table id="dg" style="width: 98%; height: 512px" toolbar="#toolbar"		pagination="true" idField="userid" rownumbers="true"		fitColumns="false" singleSelect="true">		<thead>			<tr>				<th field="ck" align="center" data-options="checkbox:true" width="5"></th>				<th field="userid" align="left"					data-options="editor:valiBoxEtr(true,'',8,64)" sortable="true"					width="130">用户编码</th>				<th field="username" align="left"					data-options="editor:valiBoxEtr(false,'',2,16)" sortable="true"					width="130">用户名称</th>				<!-- <th field="orgname" align="left"					data-options="formatter:function(value,row,index){ return orgFmt(value)},editor:comboBox_Etr1(deptList,'deptCode','deptName')" sortable="true"					width="130">机构名称</th> -->				<th field="usersex" align="center"					data-options="formatter:dataFmt('sexType'),editor:comboBoxEtr('sexType')"					sortable="true" width="80">性别</th>				<th field="usertype" align="center"					data-options="formatter:dataFmt('userType'),editor:comboBoxEtr('userType')"					sortable="true" width="80">人员类型</th>				<th field="userdnflag" align="center"					data-options="formatter:dataFmt('boolType'),editor:comboBoxEtr('boolType')"					sortable="true" width="60">需要DN</th>				<th field="userdn" align="center"					data-options="editor:valiBoxEtr(false,'',0,512)" sortable="true"					width="100">用户DN</th>				<!--<th field="roleids" align="left"-->					<!--data-options="formatter:listFmt(roleList,'roleid','name'),editor:comboGridEtr(roleList,'roleid','name')"-->					<!--sortable="true" width="130">角色列表</th>-->				<th field="roleids" align="left"					data-options="formatter:listFmt(roleList,'roleid','name'),editor:comboGridEtr(roleList,'roleid','name')"					sortable="true" width="130">角色列表</th>				<th field="usertelnum" align="center"					data-options="editor:valiBoxEtr(false,'vBaseTelephone'),formatter:function(value){return cardFmt(value);}"					sortable="true" width="80">电话</th>				<th field="usermobnub" align="center"					data-options="editor:valiBoxEtr(false,'vBaseMobile'),formatter:function(value){return cardFmt(value);}"					sortable="true" width="80">手机</th>				<th field="nickname" align="left" sortable="true" width="80"					editor="text">昵称</th>				<th field="useremail" align="left"					data-options="editor:valiBoxEtr(false,'email')" sortable="true"					width="100">Email地址</th>				<th field="userdesc" align="left" sortable="true" width="120"					editor="text">用户描述</th>			</tr>		</thead>	</table>	<div id="toolbar">         <a href="#" class="easyui-linkbutton" iconCls="icon-search"			plain="true" onclick="doSearch(0)">查询</a>		<a href="javascript:void(0)" class="easyui-linkbutton"			iconCls="icon-add" plain="true"			onclick="javascript:$('#dg').edatagrid('addRow')">新增</a> <a			href="javascript:void(0)" class="easyui-linkbutton"			iconCls="icon-save" plain="true"			onclick="javascript:$('#dg').edatagrid('saveRow')">保存</a> <a			href="javascript:void(0)" class="easyui-linkbutton"			iconCls="icon-undo" plain="true"			onclick="javascript:$('#dg').edatagrid('cancelRow')">恢复</a> <a			href="javascript:void(0)" class="easyui-linkbutton"			iconCls="icon-remove" plain="true"			onclick="javascript:$('#dg').edatagrid('destroyRow')">删除</a> <a			href="javascript:void(0)" class="easyui-linkbutton"			iconCls="icon-edit" plain="true"			onclick="javascript:{resetPassword();}">密码重置</a> <a			href="javascript:void(0)" class="easyui-linkbutton"			iconCls="icon-reload" plain="true"			onclick="javascript:$('#dg').datagrid('reload')">刷新</a> <a href="#"			class="easyui-linkbutton" plain="true"			data-options="iconCls:'icon-excel',plain:true" onclick="doSearch(1)">导出</a>	</div>	<script type="text/javascript">	//页面加载调用    $(function(){    	// doSearch();//角色列表要先获取在加载数据    });	function doSearch(download){		var systemType = "service";//$('#systembox').combobox('getValue');		//区别于查询还是下载		if(download==1){			downloadExcel('#dg','用户信息查询','SYSUSER01','proNames=userid&rows=-1&channelNo='+systemType);		}else{			$('#dg').edatagrid({                url: getUrl('SYSUSER01','channelNo='+systemType),                saveUrl: getUrl('SYSUSER02','proNames=userid&channelNo='+systemType),                updateUrl: getUrl('SYSUSER03','proNames=userid&channelNo='+systemType),                destroyUrl: getUrl('SYSUSER04','proNames=userid&channelNo='+systemType),               	striped:true,                pagination: true,               	pageSize: 15,//每页显示的记录条数,默认为10             	pageList: [10, 15,25, 50,100],//可以设置每页记录条数的列表                  loadFilter: function (data){                	loadFilterError(data);                	return data;                }            });		}	}	function resetPassword(){		var systemType = "service";//$('#systembox').combobox('getValue');   		$('#passwordForm').form('clear');		var row = $('#dg').datagrid('getSelected');		if (row){			var params = 'usercode='+row.userid +'&channelNo='+systemType;     		syncAjaxCall('HM0004',params,function(data){     			if(!data)return;     			if(data.returnCode=='000000000'){     				$.messager.alert('系统提示','恭喜您,您的密码重置成功!','info');      			}     		},function(data){     			$.messager.alert('系统错误','错误码:['+data.returnCode+'],错误信息:['+data.returnMsg+'].','error');     		});		}else{			$.messager.alert('系统错误','请选中需要重置密码用户的所在行!','error');		}    };	function orgFmt(orgNo) {		var orgName = deptMap.get(orgNo);		if(orgName){			return orgName;		}else{			return orgNo;		}	}    </script></body></html>
 |