安图前端代码

zuoXiTable.html 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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/laydate/need/laydate.css" />
  17. <link rel="stylesheet" href="js/select2/css/select2.min.css" />
  18. <link rel="stylesheet" href="./css/init.css" />
  19. <style>
  20. .clearfix:after {
  21. content: "";
  22. display: block;
  23. clear: both;
  24. }
  25. .zxt-top{
  26. background: #f3f3f4;
  27. height: 60px;
  28. padding: 10px 20px;
  29. }
  30. .topCon{
  31. float: right;
  32. margin-right: 45px;
  33. }
  34. .topCon select{
  35. padding: 2px;
  36. height: 28px;
  37. border: 1px solid #ebebeb;
  38. color: #1ab394;
  39. outline: none;
  40. vertical-align: middle;
  41. }
  42. .topCon input{
  43. width: 128px;
  44. padding: 2px 2PX 2PX 10PX;
  45. height: 28px;
  46. border: 1px solid #ebebeb;
  47. color: #1ab394;
  48. outline: none;
  49. vertical-align: middle;
  50. }
  51. .zxt-content{
  52. width: 95%;
  53. margin: 0 auto;
  54. }
  55. .zxt-table table{
  56. font-size: 12px;
  57. margin-top: 20px;
  58. }
  59. .zxt-table table thead tr td {
  60. background: #1ab394;
  61. color: #fff;
  62. }
  63. </style>
  64. </head>
  65. <body class="gray-bg" style="background: #fefefe;">
  66. <div class="zxtable">
  67. <div class="daoHang clearfix">
  68. <div class="dhLeft">
  69. <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">报表分析</a>&gt;<a href="javaScript:;">员工考核分析</a>&gt;<a href="" class="nowPosition">坐席工作报表</a></sapn>
  70. </div>
  71. <div class="dhRight">
  72. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  73. </div>
  74. </div>
  75. <div class="zxt-top clearfix">
  76. <div class="topCon">
  77. 部门:<select name="" id="bumen">
  78. </select>
  79. 开始时间:
  80. <input type="text" class="laydate-icon" id="startTime"/>
  81. 结束时间:
  82. <input type="text" class="laydate-icon" id="endTime" />
  83. 月工作天数:
  84. <input type="text" id="dayss" style="width:50px;" />
  85. <button class="btns sear">搜索</button>
  86. <a class="btns export">导出</a>
  87. </div>
  88. </div>
  89. <div class="zxt-content">
  90. <div class="zxt-table">
  91. <table class="table table-bordered text-center thTable table-hover" style="width: 100%;">
  92. <thead>
  93. <tr>
  94. </tr>
  95. </thead>
  96. <tbody class="tbody">
  97. </tbody>
  98. </table>
  99. </div>
  100. </div>
  101. </div>
  102. <script src="./js/jquery.min.js?v=2.1.4"></script>
  103. <script src="./js/bootstrap.min.js?v=3.3.6"></script>
  104. <script src="./js/jquery.cookie.js"></script>
  105. <script src="./css/laydate/laydate.js"></script>
  106. <script src="./js/select2/js/select2.min.js"></script>
  107. <script>
  108. $(function(){
  109. var token = $.cookie("token");
  110. laydate.skin('molv');
  111. laydate({
  112. elem: '#startTime',
  113. event: 'focus',
  114. format: 'YYYY-MM-DD' // 分隔符可以任意定义,该例子表示只显示年月
  115. });
  116. laydate({
  117. elem: '#endTime',
  118. event: 'focus',
  119. format: 'YYYY-MM-DD',// 分隔符可以任意定义,该例子表示只显示年月
  120. });
  121. var stime,//开始时间
  122. endtime,//结束时间
  123. dpt;//部门
  124. //部门下拉数据
  125. $("#bumen").select2({
  126. width: 'resolve' ,
  127. minimumResultsForSearch: -1,
  128. ajax:{
  129. type:"get",
  130. url:huayi.config.callcenter_url+"Department/GetDeptList",
  131. async:true,
  132. dataType: "json",
  133. data:function(params){
  134. return{
  135. token:token,
  136. pid:params.id
  137. }
  138. },
  139. processResults:function(data){
  140. return{
  141. results:data.data
  142. }
  143. },
  144. cache: true
  145. },
  146. placeholder: "请选择",
  147. });
  148. Ajax();
  149. //搜索事件
  150. $(".sear").click(function(){
  151. Ajax();
  152. });
  153. //导出
  154. $('.export').click(function() {
  155. dcexcel(this);
  156. })
  157. function dcexcel(obj) {
  158. var url = huayi.config.callcenter_url + "ZuoXiWorkTotal/ExptList?token=" + $.cookie("token");
  159. url += "&stime=" + $("#startTime").val() + "&endtime=" + $("#endTime").val() + "&dpt=" + $("#bumen").val() + "&dayss=" + $("#dayss").val();
  160. obj.href = url;
  161. }
  162. //表头
  163. $.ajax({
  164. type:'get',
  165. url:huayi.config.callcenter_url+"ZuoXiWorkTotal/GetColumnList",
  166. async:true,
  167. dataType:'json',
  168. data:{
  169. token:token
  170. },
  171. success:function(res){
  172. var con=res.data;
  173. $('.thTable thead tr').html('');
  174. for(var i=0;i<con.length;i++){
  175. $('<td>' + con[i]+ '</td>').appendTo('.thTable thead tr')
  176. }
  177. }
  178. })
  179. //表内数据
  180. function Ajax() {
  181. $.ajax({
  182. type:"get",
  183. url:huayi.config.callcenter_url+"ZuoXiWorkTotal/GetDataList",
  184. async:true,
  185. dataType:'json',
  186. data:{
  187. stime:$('#startTime').val(),
  188. endtime: $("#endTime").val(),
  189. dpt: $("#bumen").val(),
  190. dayss: $("#dayss").val(),
  191. token:token
  192. },
  193. success:function(res){
  194. var result=res.data;
  195. $('.thTable tbody').html('');
  196. for(var i = 0; i < result.length; i++) {
  197. $('<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><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><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><td>' + result[i].置忙平均休息分钟数 + '</td><td>' + result[i].质检平均成绩 + '</td></tr>').appendTo('.thTable tbody')
  198. }
  199. }
  200. });
  201. }
  202. })
  203. </script>
  204. </body>
  205. </html>