説明なし

zuoXiTable.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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: 34px;
  37. border: 1px solid #ebebeb;
  38. outline: none;
  39. vertical-align: middle;
  40. }
  41. .topCon input {
  42. width: 200px;
  43. padding: 2px 2PX 2PX 10PX;
  44. height: 34px;
  45. border: 1px solid #ebebeb;
  46. outline: none;
  47. vertical-align: middle;
  48. }
  49. .zxt-content {
  50. width: 95%;
  51. margin: 0 auto;
  52. }
  53. .zxt-table table {
  54. font-size: 12px;
  55. }
  56. .zxt-table table thead tr td {
  57. background: #00a1cb;
  58. color: #fff;
  59. }
  60. #thead thead th {
  61. background: #00a0cd;
  62. color: #fff;
  63. }
  64. table thead,
  65. tbody tr {
  66. display: table;
  67. width: 100%;
  68. table-layout: fixed;
  69. }
  70. .table {
  71. margin-bottom: 0;
  72. }
  73. </style>
  74. </head>
  75. <body class="gray-bg" style="background: #fefefe;">
  76. <div class="zxtable wrapper wrapper-content animated fadeInRight">
  77. <div class="daoHang clearfix">
  78. <div class="dhLeft">
  79. <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a
  80. href="javaScript:;">报表管理</a>&gt;<a href="" class="nowPosition">坐席工作报表</a></sapn>
  81. </div>
  82. <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
  83. </div>
  84. <div class="toolBar clearfix">
  85. <div class="topCon">
  86. <span>开始时间:</span>
  87. <input type="text" class="laydate-icon" id="startTime" autocomplete="off" />
  88. <span>结束时间:</span>
  89. <input type="text" class="laydate-icon" id="endTime" autocomplete="off" />
  90. <span>月工作天数:</span>
  91. <input type="text" id="dayss" style="width:150px;" />
  92. <button class="btns sear">搜索</button>
  93. <a class="btns export">导出</a>
  94. </div>
  95. </div>
  96. <div class="zxt-content">
  97. <div class="zxt-table">
  98. <div style="width: 100%;padding: 10px;">
  99. <div class="table-head">
  100. <table id="thead" class="table table-hover table-striped table-bordered table-condensed">
  101. <colgroup>
  102. <col style="width: 150px;" />
  103. <col />
  104. </colgroup>
  105. <thead>
  106. <tr></tr>
  107. </thead>
  108. </table>
  109. </div>
  110. <div class="table-body">
  111. <table class="thTable table table-hover table-striped table-bordered table-condensed">
  112. <colgroup>
  113. <col style="width: 150px;" />
  114. <col />
  115. </colgroup>
  116. <tbody></tbody>
  117. </table>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <script src="../js/jquery.min.js?v=2.1.4"></script>
  124. <script src="../js/bootstrap.min.js?v=3.3.6"></script>
  125. <script src="../js/jquery.cookie.js"></script>
  126. <script src="../css/laydate/laydate.js"></script>
  127. <script src="../js/select2/js/select2.min.js"></script>
  128. <script>
  129. $(function () {
  130. var token = $.cookie("token");
  131. laydate.skin('blue');
  132. laydate({
  133. elem: '#startTime',
  134. event: 'focus',
  135. istime: true,
  136. format: 'YYYY-MM-DD hh:mm:ss'
  137. });
  138. laydate({
  139. elem: '#endTime',
  140. event: 'focus',
  141. istime: true,
  142. format: 'YYYY-MM-DD hh:mm:ss'
  143. });
  144. var stime, //开始时间
  145. endtime, //结束时间
  146. dpt; //部门
  147. //部门下拉数据
  148. $("#bumen").select2({
  149. width: 'resolve',
  150. minimumResultsForSearch: -1,
  151. ajax: {
  152. type: "get",
  153. url: huayi.config.callcenter_url + "Department/GetDeptListtree",
  154. async: true,
  155. dataType: "json",
  156. data: function (params) {
  157. return {
  158. token: token,
  159. pid: params.id
  160. }
  161. },
  162. processResults: function (data) {
  163. return {
  164. results: data.data
  165. }
  166. },
  167. cache: true
  168. },
  169. placeholder: "请选择",
  170. });
  171. Ajax();
  172. //搜索事件
  173. $(".sear").click(function () {
  174. $('.thTable tbody').html('');
  175. stime = $('#startTime').val(); //开始时间
  176. endtime = $('#endTime').val(); //结束时间
  177. dpt = $('#bumen').val(); //部门
  178. if (stime != '' && endtime != '') {
  179. Ajax(stime, endtime, dpt);
  180. } else {
  181. Ajax();
  182. if (stime == '') {
  183. layer.confirm('请选择开始时间!', {
  184. btn: ['确定']
  185. });
  186. return;
  187. } else if (endtime == '') {
  188. layer.confirm('请选择结束时间!', {
  189. btn: ['确定']
  190. });
  191. return;
  192. }
  193. }
  194. });
  195. //导出
  196. $('.export').click(function () {
  197. stime = $('#startTime').val(); //开始时间
  198. endtime = $('#endTime').val(); //结束时间
  199. if (stime != '' && endtime != '') {
  200. dcexcel(this);
  201. } else {
  202. if (stime == '') {
  203. layer.confirm('请选择开始时间!', {
  204. btn: ['确定']
  205. });
  206. //return;
  207. } else if (endtime == '') {
  208. layer.confirm('请选择结束时间!', {
  209. btn: ['确定']
  210. });
  211. //return;
  212. }
  213. }
  214. })
  215. function dcexcel(obj) {
  216. var dpt = "";
  217. if ($("#bumen").val())
  218. dpt = $("#bumen").val();
  219. var url = huayi.config.callcenter_url + "ZuoXiWorkTotal/ExptList?token=" + $.cookie("token");
  220. url += "&stime=" + $("#startTime").val() + "&endtime=" + $("#endTime").val() + "&dpt=" + dpt +
  221. "&dayss=" + $("#dayss").val();
  222. obj.href = url;
  223. }
  224. //表头
  225. $.ajax({
  226. type: 'get',
  227. url: huayi.config.callcenter_url + "ZuoXiWorkTotal/GetColumnList",
  228. async: true,
  229. dataType: 'json',
  230. data: {
  231. token: token
  232. },
  233. success: function (res) {
  234. $('#thead thead tr').html('');
  235. var con = res.data;
  236. for (var i = 0; i < con.length; i++) {
  237. if (con[i] !== "部门") {
  238. $('<th>' + con[i] + '</th>').appendTo('#thead thead tr')
  239. }
  240. }
  241. }
  242. })
  243. //表内数据
  244. function Ajax(stime, endtime, dpt, dayss) {
  245. $.ajax({
  246. type: "get",
  247. url: huayi.config.callcenter_url + "ZuoXiWorkTotal/GetDataList",
  248. async: true,
  249. dataType: 'json',
  250. data: {
  251. stime: stime,
  252. endtime: endtime,
  253. dpt: dpt,
  254. dayss: dayss,
  255. token: token
  256. },
  257. success: function (res) {
  258. var result = res.data;
  259. $('.thTable tbody').html('');
  260. if (result != null) {
  261. for (var i = 0; i < result.length; i++) {
  262. $('<tr><td>' + result[i].坐席 +'</td><td>' + result[i].坐席工号
  263. +'</td><td>' + result[i].呼入电话数 + '</td><td>'+ result[i].坐席接通量
  264. +'</td><td>' + result[i].呼损量 + '</td><td>' + result[i].接通率
  265. +'</td><td>' + result[i].呼损率 + '</td><td>' + result[i].平均排队时间
  266. +'</td><td>' + result[i].接听通话次数 + '</td><td>' + result[i] .通话分钟数
  267. +'</td><td>' + result[i].通话秒数 + '</td><td>' + result[i].平均接听通话秒数
  268. +'</td><td>' + result[i].平均振铃秒数 + '</td><td>' + result[i].呼入占有率
  269. +'</td><td>' + result[i].用户评价 + '</td><td>' + result[i].坐席登录次数
  270. +'</td><td>' + result[i].登录时长分钟数 + '</td><td>' + result[i].工作时长分钟数
  271. +'</td><td>'+ result[i].平均每天工作时长 + '</td><td>' + result[i].置忙次数
  272. +'</td><td>'+ result[i].休息时长分钟数 + '</td><td>' + result[i].平均每天休息时长
  273. +'</td><td>'+ result[i].置忙平均休息分钟数 +'</td></tr>').appendTo('.thTable tbody')
  274. }
  275. }
  276. }
  277. });
  278. }
  279. })
  280. </script>
  281. </body>
  282. </html>