12345市长热线标准版-前端

seatsCheck.html 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>坐席考勤</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  10. <link href="../css/init.css" rel="stylesheet" />
  11. <!--<script src="../css/laydate/laydate.js"></script>-->
  12. <script src="../js/laydate/laydate.js"></script>
  13. <style type="text/css">
  14. .time-box {
  15. display: inline-block;
  16. position: relative;
  17. }
  18. .toolRight input {
  19. padding-right: 30px;
  20. }
  21. .toolBar {
  22. margin-bottom: 0;
  23. border: 0;
  24. }
  25. .tub {
  26. position: absolute;
  27. right: 8px;
  28. top: 5px;
  29. font-size: 18px;
  30. color: #00a0ca;
  31. }
  32. #thead1 thead th,
  33. #thead2 thead th {
  34. background: #00a0cd;
  35. color: #fff;
  36. }
  37. table thead,
  38. tbody tr {
  39. display: table;
  40. width: 100%;
  41. table-layout: fixed;
  42. }
  43. .table {
  44. margin-bottom: 0;
  45. }
  46. </style>
  47. </head>
  48. <body class="gray-bg">
  49. <div class="wrapper wrapper-content animated fadeInRight">
  50. <div class="daoHang clearfix">
  51. <div class="dhLeft">
  52. <sapn>
  53. <i class="syIcon"></i>位置:
  54. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  55. <a href="javaScript:;">报表管理</a>&gt;
  56. <a href="javaScript:;" class="nowPosition">坐席考勤</a>
  57. </sapn>
  58. </div>
  59. <div class="dhRight">
  60. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  61. </div>
  62. </div>
  63. <div class="Content_box">
  64. <div class="complain Shows">
  65. <ul class="nav nav-tabs ul_tab" role="tablist">
  66. <li class="active">
  67. <a>汇总</a>
  68. </li>
  69. <li>
  70. <a>详情</a>
  71. </li>
  72. </ul>
  73. <div class="tab-content">
  74. <div class="one_content">
  75. <div class="toolBar clearfix">
  76. <div class="toolLeft">
  77. 开始时间: <span class="time-box"><i class="tub fa fa-calendar"></i><input type="text" id="startTime" /></span> 结束时间: <span class="time-box"><i class="tub fa fa-calendar"></i><input type="text" id="endTime" /></span>
  78. <a class="search btns">搜索</a>
  79. <a class="btns export">导出</a>
  80. </div>
  81. </div>
  82. <div style="width: 100%;padding: 10px;">
  83. <div class="table-head">
  84. <table id="thead1" class="table table-hover table-striped table-bordered table-condensed">
  85. <colgroup>
  86. <col style="width: 80px;" />
  87. <col/>
  88. </colgroup>
  89. <thead>
  90. <tr>
  91. <th>工号</th>
  92. <th>姓名</th>
  93. <th>分机号</th>
  94. <th>首次签入时间</th>
  95. <th>最后签出时间</th>
  96. <th>签入总时长</th>
  97. <th>空闲时长</th>
  98. <th>通话时长</th>
  99. <th>话后处理时长</th>
  100. <th>置忙时长</th>
  101. <th>置忙次数</th>
  102. <th>登录次数</th>
  103. <th>呼入量</th>
  104. <th>呼出量</th>
  105. </tr>
  106. </thead>
  107. </table>
  108. </div>
  109. <div class="table-body">
  110. <table id="table1" class="table table-hover table-striped table-bordered table-condensed">
  111. <colgroup>
  112. <col style="width: 80px;" />
  113. <col/>
  114. </colgroup>
  115. <tbody>
  116. </tbody>
  117. </table>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="two_content" style="display: none;">
  122. <div class="toolBar clearfix">
  123. <div class="toolLeft">
  124. 开始时间: <span class="time-box"><i class="tub fa fa-calendar"></i><input type="text" id="startTime1" /></span> 结束时间: <span class="time-box"><i class="tub fa fa-calendar"></i><input type="text" id="endTime1" /></span>
  125. <a class="search2 btns">搜索</a>
  126. <a class="btns export2">导出</a>
  127. </div>
  128. </div>
  129. <table id="workorderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  130. <thead>
  131. <tr>
  132. <th data-field="UserCode" data-align="center">工号</th>
  133. <th data-field="UserName" data-align="center">姓名</th>
  134. <th data-field="ExtNumber" data-align="center">分机号</th>
  135. <th data-field="logintime" data-align="center">签入时间</th>
  136. <th data-field="logouttime" data-align="center"> 签出时间</th>
  137. <th data-field="logtimes" data-align="center"> 签入总时长</th>
  138. <th data-field="free" data-align="center"> 空闲时长</th>
  139. <th data-field="talking" data-align="center"> 通话时长</th>
  140. <th data-field="postprocess" data-align="center"> 话后处理时长</th>
  141. <th data-field="repose" data-align="center"> 置忙时长</th>
  142. <th data-field="reposeconut" data-align="center"> 置忙次数</th>
  143. <th data-field="callincount" data-align="center"> 呼入量</th>
  144. <th data-field="calloutcount" data-align="center"> 呼出量</th>
  145. </tr>
  146. </thead>
  147. </table>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <script>
  154. var table1 = $('#table1');
  155. var dates = new Date();
  156. var time = dates.getFullYear() + "-" + (dates.getMonth() + 1) + "-" + (dates.getDate());
  157. $(document).ready(function() {
  158. $('.ul_tab li').click(function() {
  159. // $(this).parent().find("li").removeClass("active");
  160. $(this).addClass("active").siblings().removeClass("active");
  161. var index = $(this).index();
  162. $('.tab-content').children("div").eq(index).show().siblings().hide();
  163. })
  164. $('#startTime').val(time)
  165. laydate.render({
  166. elem: '#startTime',
  167. format: 'yyyy-MM-dd',
  168. theme: '#00a1cb'
  169. });
  170. $('#endTime').val(time)
  171. laydate.render({
  172. elem: '#endTime',
  173. format: 'yyyy-MM-dd',
  174. theme: '#00a1cb'
  175. });
  176. $('#startTime1').val(time)
  177. laydate.render({
  178. elem: '#startTime1',
  179. format: 'yyyy-MM-dd',
  180. theme: '#00a1cb'
  181. });
  182. $('#endTime1').val(time)
  183. laydate.render({
  184. elem: '#endTime1',
  185. format: 'yyyy-MM-dd',
  186. theme: '#00a1cb'
  187. });
  188. initTable1();
  189. //搜索
  190. $('.search').click(function() {
  191. initTable1();
  192. })
  193. initTable2();
  194. //搜索
  195. $('.search2').click(function() {
  196. initTable2();
  197. })
  198. })
  199. function initTable1() {
  200. $.ajax({
  201. type: "get",
  202. url: huayi.config.callcenter_url + "SeatMonitoring/GetReportList",
  203. async: true,
  204. dataType: 'json',
  205. data: {
  206. token: $.cookie("token"),
  207. stime: $('#startTime').val(),
  208. etime: $('#endTime').val()
  209. },
  210. success: function(data) {
  211. if(data.state.toLowerCase() == 'success') {
  212. $('#table1 tbody').html('');
  213. $(data.data).each(function(i, n) {
  214. // console.log(n)
  215. $('<tr>' +
  216. '<td>' + n.UserCode + '</td>' +
  217. '<td>' + n.UserName + '</td>' +
  218. '<td>' + n.ExtNumber + '</td>' +
  219. '<td>' + n.logintime + '</td>' + //签入
  220. '<td>' + n.logouttime + '</td>' + //签出
  221. '<td>' + n.logintimes + '</td>' + //签入总时长
  222. '<td>' + n.free + '</td>' + //空闲
  223. '<td>' + n.talking + '</td>' + //通话
  224. '<td>' + n.postprocess + '</td>' + //话后处理
  225. '<td>' + n.repose + '</td>' + //置忙
  226. '<td>' + n.reposeconut + '</td>' + //置忙次数
  227. '<td>' + n.logcount + '</td>' + //登录次数
  228. '<td>' + n.callincount + '</td>' + //呼入
  229. '<td>' + n.calloutcount + '</td>' + //呼出
  230. '</tr>').appendTo('#table1 tbody')
  231. })
  232. }
  233. }
  234. });
  235. }
  236. var table = $("#workorderlist");
  237. function initTable2() {
  238. //先销毁表格
  239. table.bootstrapTable('destroy');
  240. //初始化表格,动态从服务器加载数据
  241. table.bootstrapTable({
  242. method: "get", //使用get请求到服务器获取数据
  243. url: huayi.config.callcenter_url + "SeatMonitoring/GetReportDetailList", //获取数据的Servlet地址
  244. contentType: "application/x-www-form-urlencoded",
  245. striped: true, //表格显示条纹
  246. pagination: true, //启动分页
  247. pageSize: 10, //每页显示的记录数
  248. pageNumber: 1, //当前第几页
  249. pageList: [5, 10, 50, 100], //记录数可选列表
  250. search: false, //是否启用查询
  251. showColumns: false, //显示下拉框勾选要显示的列
  252. showRefresh: false, //显示刷新按钮
  253. sidePagination: "server", //表示服务端请求
  254. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  255. //设置为limit可以获取limit, offset, search, sort, order
  256. queryParamsType: "undefined",
  257. queryParams: function queryParams(params) { //设置查询参数
  258. var param = {
  259. page: params.pageNumber,
  260. pagesize: params.pageSize,
  261. token: $.cookie("token"),
  262. stime: $('#startTime1').val(),
  263. etime: $('#endTime1').val()
  264. };
  265. return param;
  266. },
  267. onLoadSuccess: function() { //加载成功时执行
  268. //layer.msg("加载成功");
  269. },
  270. onLoadError: function() { //加载失败时执行
  271. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  272. }
  273. });
  274. }
  275. //导出
  276. $('.export').click(function() {
  277. dcexcel(this);
  278. })
  279. function dcexcel(obj) {
  280. var dpt = "";
  281. var url = huayi.config.callcenter_url + "SeatMonitoring/ExptList?token=" + $.cookie("token");
  282. url += "&stime=" + $('#startTime').val() + "&etime=" + $('#endTime').val();
  283. obj.href = url;
  284. }
  285. //导出
  286. $('.export2').click(function() {
  287. dcexcel2(this);
  288. })
  289. function dcexcel2(obj) {
  290. var dpt = "";
  291. var url = huayi.config.callcenter_url + "SeatMonitoring/GetReportDetailList?token=" + $.cookie("token");
  292. url += "&stime=" + $('#startTime1').val() + "&etime=" + $('#endTime1').val()+"&isdc=1";
  293. obj.href = url;
  294. }
  295. </script>
  296. </body>
  297. </html>