伊川12345

CallInCount.html 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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: #1ab394;
  16. color: #fff;
  17. font-size: 14px;
  18. }
  19. </style>
  20. </head>
  21. <body class="gray-bg">
  22. <div class="wrapper wrapper-content animated fadeInRight">
  23. <div class="daoHang clearfix">
  24. <div class="dhLeft">
  25. <sapn><i class="syIcon"></i>位置:
  26. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  27. <a href="javaScript:;">报表管理</a>&gt;
  28. <a href="" style="color: #000;">系统报表</a>
  29. </sapn>
  30. </div>
  31. </div>
  32. <div class="Content_box">
  33. <!--待处理/-->
  34. <div class="complain Shows">
  35. <div class="th-box">
  36. <div class="th-bar">
  37. <div class="seach-box">
  38. <ul>
  39. <li>开始时间:
  40. <input class="photo x-color inputs laydate-icon" type="text" id="startTime" /> 结束时间:
  41. <input class="photo x-color inputs laydate-icon" type="text" id="endTime" />
  42. </li>
  43. <li>
  44. <a class="sc_btn btns db">搜索</a>
  45. <a class="sc_btn btns dbexecl">导出Execl</a>
  46. </li>
  47. </ul>
  48. </div>
  49. </div>
  50. </div>
  51. <div style="width: 100%;padding: 10px;">
  52. <table class="table hwbb table-bordered text-center table-hover" style="width: 100%;">
  53. <thead>
  54. <tr class="hwtr">
  55. </tr>
  56. </thead>
  57. <tbody class="tbody">
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <script>
  65. $(document).ready(function() {
  66. laydate.skin('molv');
  67. laydate({
  68. elem: '#startTime',
  69. event: 'focus'
  70. });
  71. laydate({
  72. elem: '#endTime',
  73. event: 'focus'
  74. });
  75. $('.db').click(function () {
  76. GetDataList();
  77. })
  78. //导出
  79. $('.dbexecl').click(function () {
  80. dcexcel(this);
  81. })
  82. GetDataList();
  83. })
  84. //加载数据
  85. function GetDataList() {
  86. /*请求后台*/
  87. $.ajax({
  88. type: "get",
  89. url: huayi.config.callcenter_url + "/TotalTel/GetCallInReport",
  90. dataType: 'json',
  91. async: true,
  92. data: {
  93. sdate: $("#startTime").val(),
  94. edate: $("#endTime").val(),
  95. token: $.cookie("token"),
  96. },
  97. success: function(data) {
  98. /*验证请求*/
  99. if(data.state == "success") {
  100. var content = data.data.CallInReport;
  101. $(".hwtr").html("");
  102. if (content.length > 0) {
  103. for (var x in content[0]) {
  104. $("<td>" + x + "</td>").appendTo($(".hwtr"));
  105. }
  106. }
  107. $(".tbody").html("");
  108. for(var i = 0; i < content.length; i++) {
  109. $("<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($(".tbody"));
  110. }
  111. }
  112. }
  113. });
  114. }
  115. function dcexcel(obj) {
  116. var url = huayi.config.callcenter_url + "/TotalTel/GetCallInReport?token=" + $.cookie("token");
  117. url += "&sdate=" + $("#startTime").val() + "&edate=" + $("#endTime").val() + "&isdc=1";
  118. obj.href = url;
  119. }
  120. </script>
  121. </body>
  122. </html>