UU跑腿标准版

selectusers.aspx 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selectusers.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.noticemanage.selectusers" %>
  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 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/grid.css" rel="stylesheet" type="text/css" />
  12. <style type="text/css">
  13. body
  14. {
  15. padding: 5px;
  16. margin: 0;
  17. padding-bottom: 15px;
  18. }
  19. #layout1
  20. {
  21. width: 100%;
  22. margin: 0;
  23. padding: 0;
  24. }
  25. .l-page-top
  26. {
  27. height: 80px;
  28. background: #f8f8f8;
  29. margin-bottom: 3px;
  30. }
  31. h4
  32. {
  33. margin: 20px;
  34. }
  35. .layout .l-layout-top
  36. {
  37. background: none;
  38. border: none;
  39. }
  40. .l-layout-bottom
  41. {
  42. border: none;
  43. }
  44. .btnSubmit
  45. {
  46. padding: 0 10px;
  47. height: 28px;
  48. line-height: 28px;
  49. color: #3D80B3;
  50. font-weight: bold;
  51. border: 1px solid #AED0EA;
  52. background: url(/images/btn_bg.gif) 0 -44px repeat-x;
  53. cursor: pointer;
  54. vertical-align: middle;
  55. overflow: hidden;
  56. }
  57. .btnSubmit:hover
  58. {
  59. background-position: 0 -72px;
  60. }
  61. .l-panel
  62. {
  63. border: 1px solid #99BBE8;
  64. }
  65. .l-panel-header
  66. {
  67. background-image: none; /* background-color: #F0F0F0; */ /* border-bottom: 1px solid #D6D6D6; */
  68. color: #333333;
  69. font-size: 12px;
  70. font-weight: bold;
  71. border-bottom: 1px solid #99BBE8;
  72. background-color: #E5EFFE;
  73. height: 28px;
  74. }
  75. .hrms
  76. {
  77. margin: 0px;
  78. padding: 0px;
  79. }
  80. .hrms li
  81. {
  82. float: left;
  83. border: 1px solid #FFF;
  84. list-style-type: none;
  85. }
  86. #issel a.close
  87. {
  88. background: url('/images/dot0913.png.gif') no-repeat scroll right 3px transparent;
  89. padding: 1px 20px 2px 5px;
  90. margin: 3px;
  91. float: left;
  92. text-decoration: none;
  93. }
  94. .R
  95. {
  96. border: 1px solid #E00102;
  97. color: #E00102;
  98. }
  99. .D
  100. {
  101. border: 1px solid #99BBE8;
  102. color: black;
  103. }
  104. </style>
  105. <script type="text/javascript">
  106. var gridlist = null;
  107. var actionNodeID;
  108. var singleClick;
  109. var count = 1;
  110. var counts = 1;
  111. $(function () {
  112. $("#global_layout").ligerLayout({ leftWidth: 180, topHeight: 100, allowLeftCollapse: false });
  113. $("#tree1").ligerTree({
  114. nodeWidth: 135,
  115. isExpand: false,
  116. url: '/sysmanage/ajax/deptcategory.ashx?action=gettreelist',
  117. onClick: function (node, e) {
  118. count += 1;
  119. counts = count;
  120. actionNodeID = node.data.id;
  121. LoadList(node.data.id);
  122. },
  123. onCheck: function (node, checked) {
  124. if (checked) {
  125. addSelDept(node.data.id, node.data.text);
  126. }
  127. },
  128. onSuccess: function (data) {
  129. LoadList(data[0].id);
  130. }
  131. });
  132. });
  133. function LoadList(deptId) {
  134. gridlist = $("#divDataList").ligerGrid({
  135. height: '100%',
  136. heightDiff: -53,
  137. columns: [
  138. { display: 'ID', name: '_f_userid', align: 'left', width: 1, hide: true },
  139. { display: '用户编号', name: '_f_usercode', width: 80 },
  140. { display: '坐席工号', name: '_f_worknumber', width: 80 },
  141. { display: '用户名称', name: '_f_username', width: 80 },
  142. { display: '用户电话', name: '_f_telephone', width: 100 },
  143. { display: '用户手机', name: '_f_mobile', width: 100 },
  144. { display: '用户角色', name: '_f_rolename', width: 90 },
  145. { display: '用户部门', name: '_f_deptname', width: 90 },
  146. { display: '用户状态', name: '_f_deleteflag', width: 100, render: function (rowdata, rowindex) {
  147. if (rowdata._f_deleteflag == 1) { return '注销'; }
  148. else { return '正常'; }
  149. }
  150. },
  151. { display: '最后登录时间', name: '_f_lastactivetime', type: 'date', width: 130, format: 'yyyy-MM-dd hh:mm:ss' }
  152. ], url: '/sysmanage/ajax/UserAjaxList.ashx?action=getUserList&id=' + deptId, pageSize: 10, rownumbers: true,
  153. onDblClickRow: function (data, rowindex, rowobj) {
  154. singleClick = data._f_userid;
  155. addSelRen(data._f_userid, '' + data._f_username + '');
  156. }
  157. });
  158. gridlist.changePage('first');
  159. $("#pageloading").hide();
  160. }
  161. function addSelDept(id, name) {
  162. var issel = false;
  163. $('.hrms>li').each(function (index) {
  164. var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
  165. if (aid == "D_" + id) {
  166. issel = true;
  167. $.ligerDialog.success('部门【' + name + '】已经选择!');
  168. }
  169. });
  170. if (!issel) {
  171. var aa = "<li><a class=\"close D\" href=\"javascript:void(0)\" onclick=\"delSel('D_" + id + "')\" rel=\"D_" + id + "\">部门-" + name + "</a></li>";
  172. $(".hrms").append(aa);
  173. }
  174. }
  175. function addSelRen(id, name) {
  176. if (count > 1) {
  177. count -= 1;
  178. return;
  179. } else {
  180. count = counts;
  181. var issel = false;
  182. $('.hrms>li').each(function (index) {
  183. var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
  184. if (aid == "R_" + id) {
  185. issel = true;
  186. $.ligerDialog.success('人员【' + name + '】已经选择!');
  187. }
  188. });
  189. if (!issel) {
  190. var aa = "<li><a class=\"close R\" href=\"javascript:void(0)\" onclick=\"delSel('R_" + id + "')\" rel=\"R_" + id + "\">人员-" + name + "</a></li>";
  191. $(".hrms").append(aa);
  192. }
  193. }
  194. }
  195. function delSel(id, name) {
  196. $('.hrms>li').each(function (index) {
  197. var a = $(".hrms>li:eq(" + index + ") a").attr("rel");
  198. if (a == id) {
  199. $(".hrms li:eq(" + index + ")").remove();
  200. }
  201. });
  202. }
  203. function saveSel() {
  204. var id = "";
  205. var name = "";
  206. $('.hrms>li').each(function (index) {
  207. var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
  208. var aname = $(".hrms>li:eq(" + index + ") a").html();
  209. id += aid + ",";
  210. name += aname + ",";
  211. });
  212. var lastIndex = name.lastIndexOf(',');
  213. var lastIndexid = id.lastIndexOf(',');
  214. if (lastIndex > -1) {
  215. name = name.substring(0, lastIndex) + name.substring(lastIndex + 1, name.length);
  216. id = id.substring(0, lastIndexid) + id.substring(lastIndexid + 1, id.length);
  217. }
  218. if ((id == "") || (name == "")) {
  219. $.ligerDialog.success('人员选择为空,暂时无法保存!');
  220. } else {
  221. parent.GetValue(id, name);
  222. CloseThis();
  223. }
  224. }
  225. function CloseThis() {
  226. var dialog = frameElement.dialog;
  227. dialog.close();
  228. }
  229. </script>
  230. </head>
  231. <body>
  232. <form id="form1" runat="server">
  233. <div id="global_layout" class="layout" style="width: 100%">
  234. <div position="top" title="已选人员或者机构" id="topDiv">
  235. <div ligeruiid="panel1-2" class="l-panel" id="panel1-2" style="height: 98px;">
  236. <div class="l-panel-content" style="height: 98px; overflow-y: scroll;">
  237. <div id="issel" style="float: left; padding-left: 20px; height: 40px; padding-top: 8px;">
  238. <ul class="hrms">
  239. </ul>
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. <div position="left" title="机构" id="global_left_nav">
  245. <ul id="tree1">
  246. <li id="-1"><span>部门信息</span>
  247. <ul>
  248. </ul>
  249. </li>
  250. </ul>
  251. </div>
  252. <div position="center" title="人员" id="framecenter">
  253. <div id="divDataList" style="border: none;">
  254. </div>
  255. </div>
  256. <div position="bottom" id="bottomDiv" style="text-align: center; padding-top: 20px;">
  257. <input type="button" id="btnSave" class="btnSubmit" value="保&nbsp;&nbsp;&nbsp;存"
  258. onclick="saveSel();" />
  259. </div>
  260. </div>
  261. </form>
  262. </body>
  263. </html>