济源12345的前端

CallTime.html 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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 rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  10. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  11. <link href="../css/init.css" rel="stylesheet" />
  12. <script src="../css/laydate/laydate.js"></script>
  13. <style>
  14. .hwbb thead tr td {
  15. background: #00a1cb;
  16. color: #fff;
  17. font-size: 14px;
  18. }
  19. #thead thead th{
  20. background: #00a0cd;
  21. color: #fff;
  22. }
  23. table thead, tbody tr {
  24. display:table;
  25. width:100%;
  26. table-layout:fixed;
  27. }
  28. .table{
  29. margin-bottom: 0;
  30. }
  31. </style>
  32. </head>
  33. <body class="gray-bg">
  34. <div class="wrapper wrapper-content animated fadeInRight">
  35. <div class="daoHang clearfix">
  36. <div class="dhLeft">
  37. <sapn><i class="syIcon"></i>位置:
  38. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  39. <a href="javaScript:;">报表管理</a>&gt;
  40. <a href="" class="nowPosition">话务日报</a>
  41. </sapn>
  42. </div>
  43. <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
  44. </div>
  45. <div class="Content_box">
  46. <!--待处理/-->
  47. <div class="complain Shows">
  48. <div class="toolBar clearfix">
  49. <div class="toolRight">
  50. 开始时间:
  51. <input class="photo x-color inputs laydate-icon" type="text" id="startTime" /> 结束时间:
  52. <input class="photo x-color inputs laydate-icon" type="text" id="endTime" />
  53. <a class="btns db">搜索</a>
  54. <a class="btns dbexecl">导出Execl</a>
  55. </div>
  56. </div>
  57. <div style="width: 100%;padding: 10px;">
  58. <div class="table-head">
  59. <table id="thead" class="table table-hover table-striped table-bordered table-condensed">
  60. <colgroup>
  61. <col style="width: 80px;"/>
  62. <col/>
  63. </colgroup>
  64. <thead>
  65. <tr>
  66. </tr>
  67. </thead>
  68. </table>
  69. </div>
  70. <div class="table-body">
  71. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  72. <colgroup>
  73. <col style="width: 80px;"/>
  74. <col/>
  75. </colgroup>
  76. <tbody>
  77. </tbody>
  78. </table>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <script>
  85. $(document).ready(function(){
  86. laydate.skin('blue');
  87. laydate({
  88. elem: '#startTime',
  89. event: 'focus'
  90. });
  91. laydate({
  92. elem: '#endTime',
  93. event: 'focus'
  94. });
  95. $('.db').click(function () {
  96. GetDataList();
  97. })
  98. //导出
  99. $('.dbexecl').click(function () {
  100. dcexcel(this);
  101. })
  102. GetColumnList();
  103. GetDataList();
  104. })
  105. //加载表头
  106. function GetColumnList() {
  107. $("#thead thead tr").html('');
  108. /*请求后台*/
  109. $.ajax({
  110. type: "get",
  111. url: huayi.config.callcenter_url + "/TotalTel/GetColumnList",
  112. dataType: 'json',
  113. async: true,
  114. data: {
  115. token: $.cookie("token")
  116. },
  117. success: function(data) {
  118. /*验证请求*/
  119. if(data.state == "success") {
  120. var content = data.data;
  121. for(var i = 0; i < content.length; i++) {
  122. $("<th>" + content[i] + "</th>").appendTo($("#thead thead tr"));
  123. }
  124. }
  125. }
  126. });
  127. }
  128. //加载数据
  129. function GetDataList() {
  130. $(".hwbb tbody").html('');
  131. /*请求后台*/
  132. $.ajax({
  133. type: "get",
  134. url: huayi.config.callcenter_url + "/TotalTel/GetDataList",
  135. dataType: 'json',
  136. async: true,
  137. data: {
  138. stime: $("#startTime").val(),
  139. etime: $("#endTime").val(),
  140. token: $.cookie("token"),
  141. },
  142. success: function(data) {
  143. /*验证请求*/
  144. if(data.state == "success") {
  145. var content = data.rows;
  146. $(".tbody").html("");
  147. for(var i = 0; i < content.length; i++) {
  148. //$("<tr><td>" + content[i].时间 + "</td><td>" + content[i].电话呼入次数 + "</td><td>" + content[i].电话呼出次数 + "</td><td>" + content[i].正常接听次数 + "</td><td>" + content[i].未接通次数 + "</td><td>" + content[i].语音留言次数 + "</td><td>" + content[i].主动放弃次数 + "</td><td>" + content[i].电话骚扰次数 + "</td><td>" + content[i].平均呼入时间 + "</td></tr>").appendTo(".hwbb tbody");
  149. $("<tr><td>" + content[i].时间 + "</td><td>" + content[i].电话呼入次数 + "</td><td>" + content[i].电话呼出次数 + "</td><td>" + content[i].正常接听次数 + "</td><td>" + content[i].未接通次数 + "</td><td>" + content[i].主动放弃次数 + "</td><td>" + content[i].电话骚扰次数 + "</td><td>" + content[i].平均呼入时间 + "</td></tr>").appendTo(".hwbb tbody");
  150. //$("<tr><td>" + content[i].时间 + "</td><td>" + content[i].电话呼入次数 + "</td><td>" + content[i].电话呼出次数 + "</td><td>" + content[i].正常接听次数 + "</td><td>" + content[i].语音留言次数 + "</td><td>" + content[i].主动放弃次数 + "</td><td>" + content[i].平均呼入时间 + "</td></tr>").appendTo(".hwbb tbody");
  151. }
  152. }
  153. }
  154. });
  155. }
  156. function dcexcel(obj) {
  157. var url = huayi.config.callcenter_url + "/TotalTel/ExptList?token=" + $.cookie("token");
  158. url += "&stime=" + $("#startTime").val() + "&etime=" + $("#endTime").val() + "";
  159. obj.href = url;
  160. }
  161. </script>
  162. </body>
  163. </html>