市长热线演示版

selectfinishuser.aspx 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selectfinishuser.aspx.cs"
  2. Inherits="HySoft.BaseCallCenter.Web.workordermanage.workorder.selectfinishuser" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head runat="server">
  6. <title></title>
  7. <link href="../../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <script src="../../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  9. <script src="../../scripts/ui/json2.js" type="text/javascript"></script>
  10. <script src="../../scripts/ui/js/core/base.js" type="text/javascript"></script>
  11. <script src="../../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  12. <link href="../../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  13. <link href="../../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  14. <script src="../../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  15. <script src="../../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
  16. <script src="../../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
  17. <script src="../../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
  18. <script src="../../scripts/CustomersData.js" type="text/javascript"></script>
  19. <link href="../../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  20. <link href="../../images/style.css" rel="stylesheet" type="text/css" />
  21. <script type="text/javascript">
  22. var actionNodeID;
  23. var singleClick;
  24. var count = 1;
  25. var counts = 1;
  26. $(function () {
  27. $("#layout1").ligerLayout({
  28. leftWidth: 200,
  29. allowCenterBottomResize: false
  30. });
  31. $("#tree1").ligerTree({
  32. nodeWidth: 135,
  33. isExpand: false,
  34. checkbox: false,
  35. url: '../../sysmanage/ajax/deptcategory.ashx?action=gettreelist',
  36. onClick: function (node, e) {
  37. count += 1;
  38. counts = count;
  39. actionNodeID = node.data.id;
  40. LoadList(node.data.id);
  41. }
  42. });
  43. var deptid = $("#hfdeptID").val();
  44. LoadList(deptid);
  45. });
  46. function addSelRen(id, name) {
  47. if (count > 1) {
  48. count -= 1;
  49. return;
  50. } else {
  51. count = counts;
  52. var issel = false;
  53. $('.hrms>li').each(function (index) {
  54. var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
  55. if (aid == id) {
  56. issel = true;
  57. $.ligerDialog.success('人员【' + name + '】已经选择!');
  58. }
  59. });
  60. if (!issel) {
  61. var aa = "<li><a class=\"close\" href=\"javascript:void(0)\" onclick=\"delSelRen(" + id + ")\" rel=\"" + id + "\">" + name + "</a></li>";
  62. $(".hrms").append(aa);
  63. }
  64. }
  65. }
  66. function delSelRen(id, name) {
  67. $('.hrms>li').each(function (index) {
  68. var a = $(".hrms>li:eq(" + index + ") a").attr("rel");
  69. if (a == id) {
  70. $(".hrms li:eq(" + index + ")").remove();
  71. }
  72. });
  73. }
  74. function Load() {
  75. count += 1;
  76. counts = count;
  77. LoadList("");
  78. }
  79. function LoadList(id) {
  80. var sql = GetSql();
  81. if (actionNodeID == undefined) {
  82. actionNodeID = "";
  83. }
  84. gridlist = $("#divDataList").ligerGrid({
  85. height: '95%',
  86. columns: [
  87. { display: 'ID', name: '_f_userid', align: 'left', width: '1%', hide: true },
  88. { display: '用户编号', name: '_f_usercode', width: '30%' },
  89. { display: '用户名称', name: '_f_username', width: '30%' },
  90. { display: '部门信息', name: '_f_deptname', width: '30%' }
  91. ], url: '../../sysmanage/ajax/UserAjaxList.ashx?action=getUserListFinish' + '&id=' + id + sql, pageSize: 4, rownumbers: true,
  92. onSelectRow: function (data, rowindex, rowobj) {
  93. singleClick = data._f_userid;
  94. addSelRen(data._f_userid, '' + data._f_username + '');
  95. }
  96. });
  97. gridlist.changePage('first');
  98. $("#pageloading").hide();
  99. }
  100. function GetSql() {
  101. var sql = "";
  102. if (document.getElementById("txtName").value != "") {
  103. sql += "&name=" + escape(document.getElementById("txtName").value);
  104. }
  105. return sql;
  106. }
  107. function saveSel() {
  108. var id = "";
  109. var name = "";
  110. $('.hrms>li').each(function (index) {
  111. var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
  112. var aname = $(".hrms>li:eq(" + index + ") a").html();
  113. id += aid + ",";
  114. name += aname + ",";
  115. });
  116. var lastIndex = name.lastIndexOf(',');
  117. var lastIndexid = id.lastIndexOf(',');
  118. if (lastIndex > -1) {
  119. name = name.substring(0, lastIndex) + name.substring(lastIndex + 1, name.length);
  120. id = id.substring(0, lastIndexid) + id.substring(lastIndexid + 1, id.length);
  121. }
  122. if ((id == "") || (name == "")) {
  123. $.ligerDialog.success('人员选择为空,暂时无法保存!');
  124. } else {
  125. parent.GetValue(id);
  126. CloseThis();
  127. }
  128. }
  129. function CloseThis() {
  130. var dialog = frameElement.dialog;
  131. dialog.close();
  132. }
  133. </script>
  134. <style type="text/css">
  135. .hrms
  136. {
  137. margin: 0px;
  138. padding: 0px;
  139. }
  140. .hrms li
  141. {
  142. float: left;
  143. border: 1px solid #FFF;
  144. list-style-type: none;
  145. }
  146. #issel a.close
  147. {
  148. background: url('../../../images/dot0913.png.gif') no-repeat scroll right 3px transparent;
  149. border: 1px solid #E00102;
  150. color: #E00102;
  151. padding: 1px 20px 2px 5px;
  152. margin: 3px;
  153. float: left;
  154. }
  155. </style>
  156. </head>
  157. <body>
  158. <form id="form1" runat="server">
  159. <asp:HiddenField ID="hfdeptID" runat="server" />
  160. <div data-options="region:'north',collapsible:false,border:false" style="height: 50px;"
  161. title="已经选择人员:">
  162. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  163. <tr>
  164. <td>
  165. <div id="issel" style="float: left; padding-left: 20px; height:40px; padding-top: 8px;">
  166. <ul class="hrms">
  167. </ul>
  168. </div>
  169. </td>
  170. <td style="width:100px; text-align:right; vertical-align:top; padding-top:8px; padding-right:8px;">
  171. <a href="javascript:void(0)" class="btnSearch" iconcls="icon-ok" onclick="saveSel()">
  172. 完成</a> <a href="javascript:void(0)" class="btnSearch" iconcls="icon-no" onclick="CloseThis()">
  173. 关闭</a>
  174. </td>
  175. </tr>
  176. </table>
  177. </div>
  178. <div class="tools_box">
  179. <div class="tools_bar">
  180. <div class="search_box">
  181. 用户名称:<input id="txtName" type="text" style=" width:100px;" />&nbsp;&nbsp;
  182. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="Load();" />&nbsp;&nbsp;
  183. <%--<input id="btnSearchGaoJi" type="button" value="高级搜索" class="btnSearch" />--%>
  184. </div>
  185. </div>
  186. </div>
  187. <div id="layout1" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px;
  188. padding-top: 0px">
  189. <div style="height: 99%; overflow: scroll;" position="left" title="部门信息">
  190. <ul id="tree1">
  191. <li isexpand="false" id="-1"><span>部门信息</span>
  192. <ul>
  193. </ul>
  194. </li>
  195. </ul>
  196. </div>
  197. <div position="center" title="用户列表">
  198. <div id="divDataList">
  199. </div>
  200. </div>
  201. </div>
  202. </form>
  203. </body>
  204. </html>