12345市长热线标准版-前端

seatsCheck.html 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. .tub{
  22. position: absolute;
  23. right: 8px;
  24. top: 5px;
  25. font-size: 18px;
  26. color: #00a0ca;
  27. }
  28. #thead thead th{
  29. background: #00a0cd;
  30. color: #fff;
  31. }
  32. table thead, tbody tr {
  33. display:table;
  34. width:100%;
  35. table-layout:fixed;
  36. }
  37. .table{
  38. margin-bottom: 0;
  39. }
  40. </style>
  41. </head>
  42. <body class="gray-bg">
  43. <div class="wrapper wrapper-content animated fadeInRight">
  44. <div class="daoHang clearfix">
  45. <div class="dhLeft">
  46. <sapn>
  47. <i class="syIcon"></i>位置:
  48. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  49. <a href="javaScript:;">报表管理</a>&gt;
  50. <a href="javaScript:;" class="nowPosition">坐席考勤</a>
  51. </sapn>
  52. </div>
  53. <div class="dhRight">
  54. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  55. </div>
  56. </div>
  57. <div class="Content_box">
  58. <!--待处理/-->
  59. <div class="complain Shows">
  60. <div class="th-box">
  61. <div class="toolBar clearfix">
  62. <div class="toolRight">
  63. 开始时间: <span class="time-box"><i class="tub fa fa-calendar"></i><input type="text" id="startTime" /></span>
  64. 结束时间: <span class="time-box"><i class="tub fa fa-calendar"></i><input type="text" id="endTime" /></span>
  65. <a class="search btns">搜索</a>
  66. <a class="btns export">导出</a>
  67. </div>
  68. </div>
  69. </div>
  70. <div style="width: 100%;padding: 10px;">
  71. <div class="table-head">
  72. <table id="thead" class="table table-hover table-striped table-bordered table-condensed">
  73. <colgroup>
  74. <col style="width: 80px;"/>
  75. <col/>
  76. </colgroup>
  77. <thead>
  78. <tr>
  79. <th >工号</th>
  80. <th>姓名</th>
  81. <th>分机号</th>
  82. <th>签入时间</th>
  83. <th>签出时间</th>
  84. <th>签入总时长</th>
  85. <th>空闲时长</th>
  86. <th>通话时长</th>
  87. <th>话后处理时长</th>
  88. <th>置忙时长</th>
  89. <th>置忙次数</th>
  90. <th>登录次数</th>
  91. <th>呼入量</th>
  92. <th>呼出量</th>
  93. </tr>
  94. </thead>
  95. </table>
  96. </div>
  97. <div class="table-body">
  98. <table id="table1" class="table table-hover table-striped table-bordered table-condensed">
  99. <colgroup>
  100. <col style="width: 80px;"/>
  101. <col/>
  102. </colgroup>
  103. <tbody>
  104. </tbody>
  105. </table>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <script>
  112. var table1=$('#table1');
  113. var dates=new Date();
  114. var time=dates.getFullYear()+"-"+(dates.getMonth()+1)+"-"+(dates.getDate());
  115. $(document).ready(function() {
  116. $('#startTime').val(time)
  117. //年月选择器
  118. laydate.render({
  119. elem: '#startTime'
  120. ,format: 'yyyy-MM-dd',
  121. // type: 'month',
  122. theme: '#00a1cb'
  123. // value: new Date()
  124. });
  125. $('#endTime').val(time)
  126. //年月选择器
  127. laydate.render({
  128. elem: '#endTime'
  129. ,format: 'yyyy-MM-dd',
  130. // type: 'month',
  131. theme: '#00a1cb'
  132. // value: new Date()
  133. });
  134. initTable1();
  135. //返回首页
  136. $('#ReIndex').click(function(){
  137. top.home_index();
  138. })
  139. //搜索
  140. $('.search').click(function(){
  141. initTable1();
  142. })
  143. })
  144. function initTable1() {
  145. $.ajax({
  146. type:"get",
  147. url:huayi.config.callcenter_url+"SeatMonitoring/GetReportList",
  148. async:true,
  149. dataType:'json',
  150. data:{
  151. token: $.cookie("token"),
  152. stime: $('#startTime').val(),
  153. etime:$('#endTime').val()
  154. },
  155. success:function(data){
  156. if(data.state.toLowerCase()=='success'){
  157. $('#table1 tbody').html('');
  158. $(data.data).each(function(i,n){
  159. // console.log(n)
  160. $('<tr>'+
  161. '<td>'+ n.UserCode +'</td>'+
  162. '<td>'+ n.UserName +'</td>'+
  163. '<td>'+ n.ExtNumber +'</td>'+
  164. '<td>'+ n.logintime +'</td>'+//签入
  165. '<td>'+ n.logouttime +'</td>'+//签出
  166. '<td>'+ n.logintimes +'</td>'+//签入总时长
  167. '<td>'+ n.free +'</td>'+//空闲
  168. '<td>'+ n.talking +'</td>'+//通话
  169. '<td>'+ n.postprocess +'</td>'+//话后处理
  170. '<td>'+ n.repose +'</td>'+//置忙
  171. '<td>'+ n.reposeconut +'</td>'+//置忙次数
  172. '<td>'+ n.logcount +'</td>'+//登录次数
  173. '<td>'+ n.callincount +'</td>'+//呼入
  174. '<td>'+ n.calloutcount +'</td>'+//呼出
  175. '</tr>').appendTo('#table1 tbody')
  176. })
  177. }
  178. }
  179. });
  180. }
  181. //导出
  182. $('.export').click(function() {
  183. dcexcel(this);
  184. })
  185. function dcexcel(obj) {
  186. var dpt = "";
  187. var url = huayi.config.callcenter_url + "SeatMonitoring/ExptList?token=" + $.cookie("token");
  188. url += "&stime=" + $('#startTime').val() + "&etime=" + $('#endTime').val();
  189. obj.href = url;
  190. }
  191. </script>
  192. </body>
  193. </html>