Nessuna descrizione

zuoXiTime.html 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>坐席日通话时长报表</title>
  7. <!--[if lt IE 9]>
  8. <meta http-equiv="refresh" content="0;ie.html" />
  9. <![endif]-->
  10. <script src="../Script/Common/huayi.load.js"></script>
  11. <script src="../Script/Common/huayi.config.js"></script>
  12. <link href="../css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
  13. <link href="../css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  14. <link href="../css/animate.min.css" rel="stylesheet">
  15. <link href="../css/style.min862f.css?v=4.1.0" rel="stylesheet">
  16. <link rel="stylesheet" href="../css/init.css" />
  17. <style>
  18. .clearfix:after {
  19. content: "";
  20. display: block;
  21. clear: both;
  22. }
  23. .kpi-top {
  24. background: #f3f3f4;
  25. height: 60px;
  26. padding: 10px 20px;
  27. }
  28. .topCon {
  29. float: right;
  30. margin-right: 45px;
  31. }
  32. .kpi-content h2 {
  33. font-size: 18px;
  34. margin-bottom: 20px;
  35. }
  36. .topCon input {
  37. width: 200px;
  38. padding: 2px 2PX 2PX 10PX;
  39. height: 34px;
  40. border: 1px solid #ebebeb;
  41. outline: none;
  42. vertical-align: middle;
  43. }
  44. .kpi-content {
  45. width: 90%;
  46. margin: 0 auto;
  47. }
  48. .kpi-table table {
  49. font-size: 12px;
  50. }
  51. .kpi-table table thead tr td {
  52. background: #00a1cb;
  53. color: #fff;
  54. font-size: 14px;
  55. }
  56. #thead thead th {
  57. background: #00a0cd;
  58. color: #fff;
  59. }
  60. table thead,
  61. tbody tr {
  62. display: table;
  63. width: 100%;
  64. table-layout: fixed;
  65. }
  66. .table {
  67. margin-bottom: 0;
  68. }
  69. </style>
  70. </head>
  71. <body class="gray-bg" style="background: #fefefe;">
  72. <div class="hwkpi wrapper wrapper-content animated fadeInRight">
  73. <div class="daoHang clearfix">
  74. <div class="dhLeft">
  75. <sapn><i class="syIcon"></i>位置:
  76. <a id="ReIndex" href="javaScript:;">首页</a>&gt;
  77. <a href="javaScript:;">报表管理</a>&gt;
  78. <a href="" class="nowPosition">坐席日通话时长报表</a>
  79. </sapn>
  80. </div>
  81. </div>
  82. <div class="kpi-top clearfix">
  83. <div class="topCon">
  84. 查询时间:
  85. <input type="text" class="laydate-icon" id="startTime" autocomplete="off" /> 至
  86. <input type="text" class="laydate-icon" id="endTime" autocomplete="off" />
  87. <button class="btns sear">搜索</button>
  88. <a class="btns export ">导出</a>
  89. </div>
  90. </div>
  91. <div class="kpi-content">
  92. <div class="kpi-table">
  93. <h2 style="text-align: center;">坐席日通话时长报表</h2>
  94. <div style="width: 100%;padding: 10px;">
  95. <div class="table-head">
  96. <table id="thead" class="table table-hover table-striped table-bordered table-condensed">
  97. <colgroup>
  98. <col style="width: 80px;" />
  99. <col/>
  100. </colgroup>
  101. <thead>
  102. <tr>
  103. </tr>
  104. </thead>
  105. </table>
  106. </div>
  107. <div class="table-body">
  108. <table class="thTable table table-hover table-striped table-bordered table-condensed">
  109. <colgroup>
  110. <col style="width: 80px;" />
  111. <col/>
  112. </colgroup>
  113. <tbody>
  114. </tbody>
  115. </table>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <script src="../js/jquery.min.js?v=2.1.4"></script>
  122. <script src="../js/bootstrap.min.js?v=3.3.6"></script>
  123. <script src="../js/jquery.cookie.js"></script>
  124. <script src="../css/laydate/laydate.js"></script>
  125. <script>
  126. var token = $.cookie("token");
  127. laydate.skin('blue');
  128. laydate({
  129. elem: '#startTime',
  130. event: 'focus',
  131. istime: true,
  132. format: 'YYYY-MM-DD hh:mm:ss'
  133. });
  134. laydate({
  135. elem: '#endTime',
  136. event: 'focus',
  137. istime: true,
  138. format: 'YYYY-MM-DD hh:mm:ss'
  139. });
  140. var myDate=new Date();
  141. function turn(aa){
  142. if(aa<10){
  143. aa = "0" + aa;
  144. }
  145. return aa
  146. }
  147. $('#startTime').val(myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-"+turn(myDate.getDate()))
  148. $('#endTime').val(myDate.getFullYear()+"-"+turn(myDate.getMonth()+1)+"-"+turn(myDate.getDate()))
  149. $(document).ready(function() {
  150. Ajax();
  151. //搜索事件
  152. $(".sear").click(function() {
  153. $('.thTable tbody').html('');
  154. dpt = $('#bumen').val(); //部门
  155. Ajax();
  156. });
  157. //导出
  158. $('.export').click(function() {
  159. dcexcel(this);
  160. })
  161. function dcexcel(obj) {
  162. var url = huayi.config.callcenter_url + "ZuoXiTongHua/ExptList?token=" + $.cookie("token");
  163. url += "&stime=" + $("#startTime").val() + "&endtime=" + $("#endTime").val();
  164. obj.href = url;
  165. }
  166. //表头数据
  167. $.ajax({
  168. type: 'get',
  169. url: huayi.config.callcenter_url + "ZuoXiTongHua/GetColumnList",
  170. async: true,
  171. dataType: 'json',
  172. data: {
  173. token: token
  174. },
  175. success: function(res) {
  176. $('#thead thead tr').html('');
  177. var con = res.data;
  178. for(var j = 0; j < con.length; j++) {
  179. $('<th>' + con[j] + '</th>').appendTo('#thead thead tr')
  180. }
  181. }
  182. })
  183. function Ajax() {
  184. $.ajax({
  185. type: "get",
  186. url: huayi.config.callcenter_url + "ZuoXiTongHua/GetDataList",
  187. async: true,
  188. dataType: 'json',
  189. data: {
  190. token: token,
  191. stime: $('#startTime').val(),
  192. endtime: $('#endTime').val()
  193. },
  194. success: function(data) {
  195. var result = data.data;
  196. $('.thTable tbody').html('');
  197. for(var i = 0; i < result.length; i++) {
  198. $('<tr><td>' + result[i].坐席人员 + '</td><td>' + result[i].通话总时长 + '</td><td>' + result[i].呼出通话总时长 + '</td><td>' + result[i].呼出通话占比 + '</td><td>' + result[i].呼入通话总时长 + '</td><td>' + result[i].呼入通话占比 + '</td><td>' + result[i].平均日呼入通话时长 + '</td><td>' + result[i].平均日呼出通话时长 + '</td></tr>').appendTo('.thTable tbody')
  199. }
  200. }
  201. });
  202. }
  203. })
  204. </script>
  205. </body>
  206. </html>