Aucune description

dayHuaWu.html 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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. <link href="../css/init.css" rel="stylesheet" />
  8. <link href="../css/Table/table1.css" rel="stylesheet" />
  9. <script src="../Script/Common/huayi.load.js"></script>
  10. <script src="../Script/Common/huayi.config.js"></script>
  11. <script src="../My97DatePicker/WdatePicker.js"></script>
  12. <script src="../css/laydate/laydate.js"></script>
  13. <style>
  14. body {
  15. font-family: "微软雅黑";
  16. font-size: 14px;
  17. }
  18. ul li {
  19. list-style: none;
  20. float: left;
  21. }
  22. .fr {
  23. float: right;
  24. }
  25. /*标头*/
  26. .th-box {
  27. width: 100%;
  28. padding: 5px;
  29. border-bottom: 1px solid #e7eaec;
  30. }
  31. .th-bar {
  32. height: 40px;
  33. }
  34. #list thead tr th{
  35. background: #01a1cb;
  36. color: #fff;
  37. }
  38. </style>
  39. </head>
  40. <body class="gray-bg">
  41. <div class="wrapper wrapper-content animated fadeInRight">
  42. <div class="daoHang clearfix">
  43. <div class="dhLeft">
  44. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">报表管理</a>&gt;<a href="" class="nowPosition">话务受理日周月报表</a></sapn>
  45. </div>
  46. <div class="dhRight">
  47. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  48. </div>
  49. </div>
  50. <div class="th-box">
  51. <div class="th-bar">
  52. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  53. <div class="seach-box fr">
  54. <ul>
  55. <li>开始时间:<input id="start" class="photo x-color laydate-icon" type="text" autocomplete="off" /></li>
  56. <li>结束时间:<input id="end" class="photo x-color laydate-icon" type="text" autocomplete="off" /></li>
  57. <li>
  58. 时间类型:
  59. <select style="width: 100px;" class="select_ dataType">
  60. <option value="0" selected="selected">日</option>
  61. <option value="1">周</option>
  62. <option value="2">月</option>
  63. </select>
  64. </li>
  65. <li>
  66. <button class="btns search">查询</button>
  67. <a class="btns export">导出</a>
  68. </li>
  69. </ul>
  70. </div>
  71. </div>
  72. </div>
  73. <div style="width: 100%;padding: 10px;">
  74. <table id="list" class="table table-hover table-striped table-bordered table-condensed">
  75. <thead>
  76. <tr>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. </tbody>
  81. </table>
  82. <!--高级搜索框-->
  83. </div>
  84. </div>
  85. <script>
  86. $(document).ready(function () {
  87. var start=$('#start').val();//开始时间
  88. var end=$('#end').val();//结束时间
  89. var usercode;//工号
  90. var type=$('.dataType').val();//时间类型
  91. laydate.skin('blue');
  92. laydate({
  93. elem: '#start',
  94. event: 'focus',
  95. istime: true,
  96. format: 'YYYY-MM-DD hh:mm:ss'
  97. });
  98. laydate({
  99. elem: '#end',
  100. event: 'focus',
  101. istime: true,
  102. format: 'YYYY-MM-DD hh:mm:ss'
  103. });
  104. //表头
  105. $.ajax({
  106. type:"get",
  107. url:huayi.config.callcenter_url +"TelWOReport/GetColumnList",
  108. async:true,
  109. dataType:'json',
  110. data:{
  111. token:$.cookie("token")
  112. },
  113. success:function(data){
  114. var con=data.data;
  115. if(data.state.toLowerCase()=='success'){
  116. $(con).each(function(i,n){
  117. $('<th>'+n +'</th>').appendTo('#list thead tr')
  118. })
  119. }
  120. }
  121. });
  122. tableAjax(start,end,type)
  123. //表内数据
  124. function tableAjax(start,end,type){
  125. $('#list tbody').html('');
  126. $.ajax({
  127. type:"get",
  128. url:huayi.config.callcenter_url +"TelWOReport/GetTrafficReport",
  129. async:true,
  130. dataType:'json',
  131. data:{
  132. token:$.cookie("token"),
  133. btime:start,
  134. etime:end,
  135. type:type
  136. // usercode:usercode
  137. },
  138. success:function(data){
  139. var con=data.data;
  140. if(data.state.toLowerCase()=='success'){
  141. $(con).each(function(i,n){
  142. $('<tr><td>' + n.日期 + '</td><td>' + n.来电总量 + '</td><td>' + n.有效来电 + '</td><td>' + n.受理 + '</td><td>' + n.在线办结 + '</td><td>' + n.转派工单 + '</td><td>' + n.办结 + '</td></tr>').appendTo('#list tbody')
  143. })
  144. }
  145. }
  146. });
  147. }
  148. $('.search').click(function(){
  149. start=$('#start').val();
  150. end=$('#end').val();
  151. type=$('.dataType').val();
  152. tableAjax(start,end,type)
  153. })
  154. $('.export').click(function(){
  155. dcexcel(this);
  156. })
  157. function dcexcel(obj) {
  158. var url = huayi.config.callcenter_url + "TelWOReport/ExptList?token=" + $.cookie("token");
  159. url += "&btime=" + $("#start").val() + "&etime=" + $("#end").val()+ "&type=" + $(".dataType").val();
  160. obj.href = url;
  161. }
  162. })
  163. </script>
  164. </body>
  165. </html>