UU跑腿标准版

userlist.aspx 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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_groupname', width: 90 },
  83. // { display: '坐席类型', name: '_f_hjtype', width: 90, render: function (rowdata, rowindex) {
  84. // if (rowdata._f_hjtype == 0) { return '呼入组'; }
  85. // else { return '呼出组'; }
  86. // }
  87. //},
  88. { display: '用户状态', name: '_f_deleteflag', width: 100, render: function (rowdata, rowindex) {
  89. if (rowdata._f_deleteflag == 1) { return '注销'; }
  90. else { return '正常'; }
  91. }
  92. },
  93. { display: '最后登录时间', name: '_f_lastactivetime', type: 'date', width: 130, format: 'yyyy-MM-dd hh:mm:ss' }
  94. ], url: '../sysmanage/ajax/UserAjaxList.ashx?action=getUserList' + sql + '&id=' + id, pageSize: 10, rownumbers: true,
  95. onSelectRow: function (data, rowindex, rowobj) {
  96. singleClick = data._f_userid;
  97. },
  98. onDblClickRow: function (data, rowindex, rowobj) {
  99. Edit('edit');
  100. },
  101. onAfterShowData: function (data) {
  102. //var vheight = document.body.clientHeight;
  103. var vheight = $("#divDataList").height();
  104. document.getElementById("divTree").style.height = vheight;
  105. }
  106. });
  107. gridlist.changePage('first');
  108. $("#pageloading").hide();
  109. }
  110. function Add(param) {
  111. $.ligerDialog.open({ url: 'useredit.aspx?actionFlag=' + param, title: '添加用户信息', height: 600, width: 800, isResize: true
  112. });
  113. }
  114. function Edit(params) {
  115. if (singleClick == "" || singleClick == undefined) {
  116. alert("请选择修改行!");
  117. } else {
  118. $.ligerDialog.open({ url: 'usermodify.aspx?actionFlag=' + params + '&singleFlage=' + singleClick, title: '修改用户信息', height: 600, width: 800, isResize: true
  119. });
  120. }
  121. }
  122. function DeleteUser(type) {
  123. var row = gridlist.getSelectedRows();
  124. var idStr = "";
  125. jQuery.each(row, function (i, val) {
  126. idStr += val._f_userid + ",";
  127. });
  128. idStr = idStr.substring(0, idStr.length - 1);
  129. if (idStr == "") {
  130. alert("请选择行!");
  131. } else {
  132. if (type == "0") {
  133. $.ligerDialog.confirm('确定要启用吗?', function (yes) {
  134. if (yes) {
  135. gridlist = $("#divDataList").ligerGrid({
  136. url: '../sysmanage/ajax/UserAjaxList.ashx?action=delete&type=' + type + '&taolCount=' + idStr, pageSize: 10, rownumbers: true
  137. });
  138. }
  139. LoadList("");
  140. });
  141. }
  142. if (type == "1") {
  143. $.ligerDialog.confirm('确定要禁用吗?', function (yes) {
  144. if (yes) {
  145. gridlist = $("#divDataList").ligerGrid({
  146. url: '../sysmanage/ajax/UserAjaxList.ashx?action=delete&type=' + type + '&taolCount=' + idStr, pageSize: 10, rownumbers: true
  147. });
  148. }
  149. LoadList("");
  150. });
  151. }
  152. }
  153. }
  154. function ResetPass() {
  155. if (singleClick == "" || singleClick == undefined) {
  156. alert("请选择要重设密码的用户!");
  157. } else {
  158. $.ligerDialog.open({ url: 'ResetPassword.aspx?ResetPass=' + singleClick, title: '重设用户密码', height: 400, width: 430, isResize: true });
  159. }
  160. }
  161. function AllocationRole() {
  162. if (singleClick == "" || singleClick == undefined) {
  163. alert("请选择要分配用户的角色!");
  164. } else {
  165. $.ligerDialog.open({ url: 'userAllocationRole.aspx?ResetRole=' + singleClick, title: '分配用户角色', height: 300, width: 430, isResize: true });
  166. }
  167. }
  168. document.onkeydown = function (event) {
  169. var e = event || window.event || arguments.callee.caller.arguments[0];
  170. if (e && e.keyCode == 13) {
  171. LoadList();
  172. }
  173. };
  174. </script>
  175. <body>
  176. <form id="form1" runat="server">
  177. <div class="tools_box">
  178. <div class="tools_bar">
  179. <a class="tools_btn" href="#" onclick="Add('add');"><span><b class="add">添加</b></span>
  180. </a><a class="tools_btn" href="#" onclick="Edit('edit');"><span><b class="modify">修改</b></span>
  181. </a><a class="tools_btn" href="#" onclick="ResetPass();"><span><b class="recharge">重设密码</b></span>
  182. </a><a class="tools_btn" href="#" onclick="DeleteUser('1');"><span><b class="delete">
  183. 禁用用户</b></span> </a><a class="tools_btn" href="#" onclick="DeleteUser('0');"><span><b
  184. class="delete">启用用户</b></span> </a>
  185. <%-- <a class="tools_btn" href="#" onclick="ResetPass();">
  186. <span><b class="modify">重设密码</b></span>
  187. </a>--%>
  188. <%-- <a class="tools_btn" href="#" onclick="AllocationRole();">
  189. <span><b class="modify">角色分配</b></span>
  190. </a>--%>
  191. <div class="search_box">
  192. 关键字:<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>&nbsp;&nbsp;
  193. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="LoadList();" />
  194. </div>
  195. </div>
  196. </div>
  197. <table id="tableMessage" cellpadding="3" cellspacing="3" border="0" style="width: 100%;">
  198. <tr>
  199. <td valign="top" style="width: 230px; padding: 0px 2px 5px 2px;">
  200. <div class="tools_box" style="height: 30px;">
  201. <div class="tools_bar">
  202. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  203. color: red;">
  204. <img src="../images/icon_site.gif" />&nbsp;部门信息</div>
  205. </div>
  206. </div>
  207. <table id="tableTree" cellpadding="0" cellspacing="0" style="width: 100%; border: 1px solid #D6D6D6;">
  208. <tr>
  209. <td valign="top">
  210. <div id="divTree" style="overflow: auto;">
  211. <ul id="tree1">
  212. <li isexpand="false" id="-1"><span>部门信息</span>
  213. <ul>
  214. </ul>
  215. </li>
  216. </ul>
  217. </div>
  218. </td>
  219. </tr>
  220. </table>
  221. </td>
  222. <td valign="top" style="padding: 0px 2px 5px 2px;">
  223. <div class="tools_box" style="height: 30px;">
  224. <div class="tools_bar">
  225. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  226. color: red;">
  227. <img src="../images/ico_16_2.gif" />&nbsp;用户列表</div>
  228. </div>
  229. </div>
  230. <div id="divDataList">
  231. </div>
  232. </td>
  233. </tr>
  234. </table>
  235. </form>
  236. </body>
  237. </html>