鹤壁电销版 自用

userlist.aspx 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="userlist.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.sysmanage.userlist" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head id="Head1" runat="server">
  5. <title>用户管理</title>
  6. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="../scripts/ui/json2.js" type="text/javascript"></script>
  9. <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
  10. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  11. <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  12. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  13. <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  14. <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
  15. <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
  16. <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
  17. <script src="../scripts/CustomersData.js" type="text/javascript"></script>
  18. <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  19. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  20. </head>
  21. <script type="text/javascript">
  22. var menu;
  23. var actionNodeID;
  24. var singleClick;
  25. var taotleCount = "";
  26. var manager = null;
  27. var a;
  28. function itemclick(item, i) {
  29. alert(actionNodeID + " | " + item.text);
  30. }
  31. var gridlist;
  32. $(function () {
  33. try {
  34. var vheight = document.body.clientHeight;
  35. document.getElementById("tableMessage").style.height = vheight - 130;
  36. document.getElementById("divTree").style.height = vheight - 130;
  37. }
  38. catch (e)
  39. { }
  40. $("#tree1").ligerTree({
  41. nodeWidth: 135,
  42. checkbox: false,
  43. isExpand: false,
  44. url: 'ajax/deptcategory.ashx?action=gettreelist',
  45. onClick: function (node, e) {
  46. actionNodeID = node.data.id;
  47. LoadList(node.data.id);
  48. }
  49. });
  50. LoadList("");
  51. });
  52. function getWhereStr() {
  53. var keyWords = "";
  54. if (document.getElementById("txtKeywords").value != "") {
  55. keyWords += document.getElementById("txtKeywords").value;
  56. }
  57. return keyWords;
  58. }
  59. function GetSql() {
  60. var sql = "";
  61. if (document.getElementById("txtKeywords").value != "") {
  62. sql += "&key=" + encodeURIComponent(document.getElementById("txtKeywords").value);
  63. }
  64. return sql;
  65. }
  66. function LoadList(id) {
  67. var sql = GetSql();
  68. if (actionNodeID == undefined) {
  69. actionNodeID = "";
  70. }
  71. gridlist = $("#divDataList").ligerGrid({
  72. height: '95%',
  73. columns: [
  74. { display: 'ID', name: '_f_userid', align: 'left', width: 1, hide: true },
  75. { display: '用户编号', name: '_f_usercode', width: 80 },
  76. { display: '坐席工号', name: '_f_worknumber', width: 80 },
  77. { display: '用户名称', name: '_f_username', width: 80 },
  78. { display: '用户电话', name: '_f_telephone', width: 100 },
  79. { display: '用户手机', name: '_f_mobile', width: 100 },
  80. { display: '用户角色', name: '_f_rolename', width: 90 },
  81. { display: '用户部门', name: '_f_deptname', width: 90 },
  82. { display: '用户状态', name: '_f_deleteflag', width: 100, render: function (rowdata, rowindex) {
  83. if (rowdata._f_deleteflag == 1) { return '注销'; }
  84. else { return '正常'; }
  85. }
  86. },
  87. { display: '最后登录时间', name: '_f_lastactivetime', type: 'date', width: 130, format: 'yyyy-MM-dd hh:mm:ss' }
  88. ], url: '../sysmanage/ajax/UserAjaxList.ashx?action=getUserList' + sql + '&id=' + id, pageSize: 10, rownumbers: true,
  89. onSelectRow: function (data, rowindex, rowobj) {
  90. singleClick = data._f_userid;
  91. },
  92. onDblClickRow: function (data, rowindex, rowobj) {
  93. Edit('edit');
  94. },
  95. onAfterShowData: function (data) {
  96. //var vheight = document.body.clientHeight;
  97. var vheight = $("#divDataList").height();
  98. document.getElementById("divTree").style.height = vheight;
  99. }
  100. });
  101. gridlist.changePage('first');
  102. $("#pageloading").hide();
  103. }
  104. function Add(param) {
  105. $.ligerDialog.open({ url: 'useredit.aspx?actionFlag=' + param, title: '添加用户信息', height: 600, width: 800, isResize: true
  106. });
  107. }
  108. function Edit(params) {
  109. if (singleClick == "" || singleClick == undefined) {
  110. alert("请选择修改行!");
  111. } else {
  112. $.ligerDialog.open({ url: 'usermodify.aspx?actionFlag=' + params + '&singleFlage=' + singleClick, title: '修改用户信息', height: 600, width: 800, isResize: true
  113. });
  114. }
  115. }
  116. function DeleteUser(type) {
  117. var row = gridlist.getSelectedRows();
  118. var idStr = "";
  119. jQuery.each(row, function (i, val) {
  120. idStr += val._f_userid + ",";
  121. });
  122. idStr = idStr.substring(0, idStr.length - 1);
  123. if (idStr == "") {
  124. alert("请选择行!");
  125. } else {
  126. if (type == "0") {
  127. $.ligerDialog.confirm('确定要启用吗?', function (yes) {
  128. if (yes) {
  129. gridlist = $("#divDataList").ligerGrid({
  130. url: '../sysmanage/ajax/UserAjaxList.ashx?action=delete&type=' + type + '&taolCount=' + idStr, pageSize: 10, rownumbers: true
  131. });
  132. }
  133. LoadList("");
  134. });
  135. }
  136. if (type == "1") {
  137. $.ligerDialog.confirm('确定要禁用吗?', function (yes) {
  138. if (yes) {
  139. gridlist = $("#divDataList").ligerGrid({
  140. url: '../sysmanage/ajax/UserAjaxList.ashx?action=delete&type=' + type + '&taolCount=' + idStr, pageSize: 10, rownumbers: true
  141. });
  142. }
  143. LoadList("");
  144. });
  145. }
  146. }
  147. }
  148. function ResetPass() {
  149. if (singleClick == "" || singleClick == undefined) {
  150. alert("请选择要重设密码的用户!");
  151. } else {
  152. $.ligerDialog.open({ url: 'ResetPassword.aspx?ResetPass=' + singleClick, title: '重设用户密码', height: 400, width: 430, isResize: true });
  153. }
  154. }
  155. function AllocationRole() {
  156. if (singleClick == "" || singleClick == undefined) {
  157. alert("请选择要分配用户的角色!");
  158. } else {
  159. $.ligerDialog.open({ url: 'userAllocationRole.aspx?ResetRole=' + singleClick, title: '分配用户角色', height: 300, width: 430, isResize: true });
  160. }
  161. }
  162. document.onkeydown = function (event) {
  163. var e = event || window.event || arguments.callee.caller.arguments[0];
  164. if (e && e.keyCode == 13) {
  165. LoadList();
  166. }
  167. };
  168. </script>
  169. <body>
  170. <form id="form1" runat="server">
  171. <div class="tools_box">
  172. <div class="tools_bar">
  173. <a class="tools_btn" href="#" onclick="Add('add');"><span><b class="add">添加</b></span>
  174. </a><a class="tools_btn" href="#" onclick="Edit('edit');"><span><b class="modify">修改</b></span>
  175. </a><a class="tools_btn" href="#" onclick="ResetPass();"><span><b class="recharge">重设密码</b></span>
  176. </a><a class="tools_btn" href="#" onclick="DeleteUser('1');"><span><b class="delete">
  177. 禁用用户</b></span> </a><a class="tools_btn" href="#" onclick="DeleteUser('0');"><span><b
  178. class="delete">启用用户</b></span> </a>
  179. <%-- <a class="tools_btn" href="#" onclick="ResetPass();">
  180. <span><b class="modify">重设密码</b></span>
  181. </a>--%>
  182. <%-- <a class="tools_btn" href="#" onclick="AllocationRole();">
  183. <span><b class="modify">角色分配</b></span>
  184. </a>--%>
  185. <div class="search_box">
  186. 关键字:<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>&nbsp;&nbsp;
  187. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="LoadList();" />
  188. </div>
  189. </div>
  190. </div>
  191. <table id="tableMessage" cellpadding="3" cellspacing="3" border="0" style="width: 100%;">
  192. <tr>
  193. <td valign="top" style="width: 230px; padding: 0px 2px 5px 2px;">
  194. <div class="tools_box" style="height: 30px;">
  195. <div class="tools_bar">
  196. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  197. color: red;">
  198. <img src="../images/icon_site.gif" />&nbsp;部门信息</div>
  199. </div>
  200. </div>
  201. <table id="tableTree" cellpadding="0" cellspacing="0" style="width: 100%; border: 1px solid #D6D6D6;">
  202. <tr>
  203. <td valign="top">
  204. <div id="divTree" style="overflow: auto;">
  205. <ul id="tree1">
  206. <li isexpand="false" id="-1"><span>部门信息</span>
  207. <ul>
  208. </ul>
  209. </li>
  210. </ul>
  211. </div>
  212. </td>
  213. </tr>
  214. </table>
  215. </td>
  216. <td valign="top" style="padding: 0px 2px 5px 2px;">
  217. <div class="tools_box" style="height: 30px;">
  218. <div class="tools_bar">
  219. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  220. color: red;">
  221. <img src="../images/ico_16_2.gif" />&nbsp;用户列表</div>
  222. </div>
  223. </div>
  224. <div id="divDataList">
  225. </div>
  226. </td>
  227. </tr>
  228. </table>
  229. </form>
  230. </body>
  231. </html>