| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selectusers.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.noticemanage.selectusers" %>
- <!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 runat="server">
- <title>设置查看人员信息</title>
- <link href="/scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="/scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="/scripts/ui/json2.js" type="text/javascript"></script>
- <script src="/scripts/ui/js/core/base.js" type="text/javascript"></script>
- <script src="/scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
- <link href="/scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- body
- {
- padding: 5px;
- margin: 0;
- padding-bottom: 15px;
- }
- #layout1
- {
- width: 100%;
- margin: 0;
- padding: 0;
- }
- .l-page-top
- {
- height: 80px;
- background: #f8f8f8;
- margin-bottom: 3px;
- }
- h4
- {
- margin: 20px;
- }
- .layout .l-layout-top
- {
- background: none;
- border: none;
- }
- .l-layout-bottom
- {
- border: none;
- }
- .btnSubmit
- {
- padding: 0 10px;
- height: 28px;
- line-height: 28px;
- color: #3D80B3;
- font-weight: bold;
- border: 1px solid #AED0EA;
- background: url(/images/btn_bg.gif) 0 -44px repeat-x;
- cursor: pointer;
- vertical-align: middle;
- overflow: hidden;
- }
- .btnSubmit:hover
- {
- background-position: 0 -72px;
- }
- .l-panel
- {
- border: 1px solid #99BBE8;
- }
- .l-panel-header
- {
- background-image: none; /* background-color: #F0F0F0; */ /* border-bottom: 1px solid #D6D6D6; */
- color: #333333;
- font-size: 12px;
- font-weight: bold;
- border-bottom: 1px solid #99BBE8;
- background-color: #E5EFFE;
- height: 28px;
- }
- .hrms
- {
- margin: 0px;
- padding: 0px;
- }
- .hrms li
- {
- float: left;
- border: 1px solid #FFF;
- list-style-type: none;
- }
- #issel a.close
- {
- background: url('/images/dot0913.png.gif') no-repeat scroll right 3px transparent;
- padding: 1px 20px 2px 5px;
- margin: 3px;
- float: left;
- text-decoration: none;
- }
- .R
- {
- border: 1px solid #E00102;
- color: #E00102;
- }
- .D
- {
- border: 1px solid #99BBE8;
- color: black;
- }
- </style>
- <script type="text/javascript">
- var gridlist = null;
- var actionNodeID;
- var singleClick;
- var count = 1;
- var counts = 1;
- $(function () {
- $("#global_layout").ligerLayout({ leftWidth: 180, topHeight: 100, allowLeftCollapse: false });
- $("#tree1").ligerTree({
- nodeWidth: 135,
- isExpand: false,
- url: '/sysmanage/ajax/deptcategory.ashx?action=gettreelist',
- onClick: function (node, e) {
- count += 1;
- counts = count;
- actionNodeID = node.data.id;
- LoadList(node.data.id);
- },
- onCheck: function (node, checked) {
- if (checked) {
- addSelDept(node.data.id, node.data.text);
- }
- },
- onSuccess: function (data) {
- LoadList(data[0].id);
- }
- });
- });
- function LoadList(deptId) {
- gridlist = $("#divDataList").ligerGrid({
- height: '100%',
- heightDiff: -53,
- columns: [
- { display: 'ID', name: '_f_userid', align: 'left', width: 1, hide: true },
- { display: '用户编号', name: '_f_usercode', width: 80 },
- { display: '坐席工号', name: '_f_worknumber', width: 80 },
- { display: '用户名称', name: '_f_username', width: 80 },
- { display: '用户电话', name: '_f_telephone', width: 100 },
- { display: '用户手机', name: '_f_mobile', width: 100 },
- { display: '用户角色', name: '_f_rolename', width: 90 },
- { display: '用户部门', name: '_f_deptname', width: 90 },
- { display: '用户状态', name: '_f_deleteflag', width: 100, render: function (rowdata, rowindex) {
- if (rowdata._f_deleteflag == 1) { return '注销'; }
- else { return '正常'; }
- }
- },
- { display: '最后登录时间', name: '_f_lastactivetime', type: 'date', width: 130, format: 'yyyy-MM-dd hh:mm:ss' }
- ], url: '/sysmanage/ajax/UserAjaxList.ashx?action=getUserList&id=' + deptId, pageSize: 10, rownumbers: true,
- onDblClickRow: function (data, rowindex, rowobj) {
- singleClick = data._f_userid;
- addSelRen(data._f_userid, '' + data._f_username + '');
- }
- });
- gridlist.changePage('first');
- $("#pageloading").hide();
- }
- function addSelDept(id, name) {
- var issel = false;
- $('.hrms>li').each(function (index) {
- var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
- if (aid == "D_" + id) {
- issel = true;
- $.ligerDialog.success('部门【' + name + '】已经选择!');
- }
- });
- if (!issel) {
- var aa = "<li><a class=\"close D\" href=\"javascript:void(0)\" onclick=\"delSel('D_" + id + "')\" rel=\"D_" + id + "\">部门-" + name + "</a></li>";
- $(".hrms").append(aa);
- }
- }
- function addSelRen(id, name) {
- if (count > 1) {
- count -= 1;
- return;
- } else {
- count = counts;
- var issel = false;
- $('.hrms>li').each(function (index) {
- var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
- if (aid == "R_" + id) {
- issel = true;
- $.ligerDialog.success('人员【' + name + '】已经选择!');
- }
- });
- if (!issel) {
- var aa = "<li><a class=\"close R\" href=\"javascript:void(0)\" onclick=\"delSel('R_" + id + "')\" rel=\"R_" + id + "\">人员-" + name + "</a></li>";
- $(".hrms").append(aa);
- }
- }
- }
- function delSel(id, name) {
- $('.hrms>li').each(function (index) {
- var a = $(".hrms>li:eq(" + index + ") a").attr("rel");
- if (a == id) {
- $(".hrms li:eq(" + index + ")").remove();
- }
- });
- }
- function saveSel() {
- var id = "";
- var name = "";
- $('.hrms>li').each(function (index) {
- var aid = $(".hrms>li:eq(" + index + ") a").attr("rel");
- var aname = $(".hrms>li:eq(" + index + ") a").html();
- id += aid + ",";
- name += aname + ",";
- });
- var lastIndex = name.lastIndexOf(',');
- var lastIndexid = id.lastIndexOf(',');
- if (lastIndex > -1) {
- name = name.substring(0, lastIndex) + name.substring(lastIndex + 1, name.length);
- id = id.substring(0, lastIndexid) + id.substring(lastIndexid + 1, id.length);
- }
- if ((id == "") || (name == "")) {
- $.ligerDialog.success('人员选择为空,暂时无法保存!');
- } else {
- parent.GetValue(id, name);
- CloseThis();
- }
- }
- function CloseThis() {
- var dialog = frameElement.dialog;
- dialog.close();
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div id="global_layout" class="layout" style="width: 100%">
- <div position="top" title="已选人员或者机构" id="topDiv">
- <div ligeruiid="panel1-2" class="l-panel" id="panel1-2" style="height: 98px;">
- <div class="l-panel-content" style="height: 98px; overflow-y: scroll;">
- <div id="issel" style="float: left; padding-left: 20px; height: 40px; padding-top: 8px;">
- <ul class="hrms">
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div position="left" title="机构" id="global_left_nav">
- <ul id="tree1">
- <li id="-1"><span>部门信息</span>
- <ul>
- </ul>
- </li>
- </ul>
- </div>
- <div position="center" title="人员" id="framecenter">
- <div id="divDataList" style="border: none;">
- </div>
- </div>
- <div position="bottom" id="bottomDiv" style="text-align: center; padding-top: 20px;">
- <input type="button" id="btnSave" class="btnSubmit" value="保 存"
- onclick="saveSel();" />
- </div>
- </div>
- </form>
- </body>
- </html>
|