Ei kuvausta

zuoXiTable.html 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  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 rel="stylesheet" href="js/select2/css/select2.min.css" />
  13. <link rel="stylesheet" href="./js/layui/css/layui.css" />
  14. <link rel="stylesheet" href="./css/init.css" />
  15. <style>
  16. .zxt-top {
  17. background: #f3f3f4;
  18. height: 60px;
  19. padding: 10px 20px;
  20. }
  21. .topCon {
  22. float: right;
  23. margin-right: 45px;
  24. }
  25. .zxt-content {
  26. width: 95%;
  27. margin: 0 auto;
  28. }
  29. .select2-container--default .select2-selection--single{
  30. border-color: #e5e6e7;
  31. }
  32. </style>
  33. </head>
  34. <body class="gray-bg" style="background: #fefefe;">
  35. <div class="zxtable">
  36. <div class="daoHang clearfix">
  37. <div class="dhLeft">
  38. <sapn><i class="syIcon"></i>位置:
  39. <a id="ReIndex" href="javaScript:;">首页</a>&gt;
  40. <a href="javaScript:;">报表分析</a>&gt;
  41. <a href="javaScript:;">员工考核分析</a>&gt;
  42. <a href="" class="nowPosition">坐席工作报表</a>
  43. </sapn>
  44. </div>
  45. <div class="dhRight">
  46. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  47. </div>
  48. </div>
  49. <div class="zxt-top clearfix">
  50. <div class="topCon">
  51. <div class="form-inline th-bar clearfix">
  52. <div class="time-box form-group">
  53. <i class="tub fa fa-calendar"></i>
  54. <input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
  55. </div>
  56. <!--<div class="time-box form-group">
  57. 部门:
  58. <select id="bumen">
  59. <option value="">请选择</option>
  60. </select>
  61. </div>-->
  62. <div class="time-box form-group">
  63. 月工作天数:
  64. <input type="text" id="dayss" class="form-control" style="width:50px; height: 28px;" />
  65. </div>
  66. <div class="form-group tool_bars pull-right">
  67. <button class="btns sear">搜索</button>
  68. <a class="btns export">导出</a>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="zxt-content">
  74. <table class="layui-hide" id="t_callTotal"></table>
  75. </div>
  76. </div>
  77. <script src="js/layui/layui.js"></script>
  78. <script src="./js/select2/js/select2.min.js"></script>
  79. <script>
  80. var token = $.cookie("token");
  81. var stime = ''; //开始时间
  82. var endtime = ''; //结束时间
  83. //var dpt = ''; //部门
  84. $(function() {
  85. var regNum = /^[0-9]+$/;
  86. layui.use('laydate', function() {
  87. var laydate = layui.laydate;
  88. //日期
  89. laydate.render({
  90. elem: '#startTime',
  91. range: '~',
  92. theme: '#1ab394',
  93. calendar: 'true'
  94. });
  95. });
  96. //getDept(); //获取部门下拉
  97. getTableDataList(); //获取表格数据
  98. //搜索事件
  99. $(".sear").click(function() {
  100. //dpt = $('#bumen').val();
  101. //dpt = dpt === null ? '' : dpt;
  102. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  103. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  104. if($.trim($('#dayss').val())) {
  105. if(!regNum.test($.trim($('#dayss').val()))) {
  106. layer.confirm('请在月工作天数内输入正确的数字', {
  107. icon: 2,
  108. btn: ['确定']
  109. });
  110. return;
  111. }
  112. }
  113. getTableDataList(); //获取表格数据
  114. });
  115. //导出
  116. $('.export').click(function() {
  117. //dpt = $('#bumen').val();
  118. //dpt = dpt === null ? '' : dpt;
  119. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  120. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  121. if($.trim($('#dayss').val())) {
  122. if(!regNum.test($.trim($('#dayss').val()))) {
  123. layer.confirm('请在月工作天数内输入正确的数字', {
  124. icon: 2,
  125. btn: ['确定']
  126. });
  127. return;
  128. }
  129. }
  130. dcexcel(this);
  131. });
  132. });
  133. function dcexcel(obj) {
  134. var url = huayi.config.callcenter_url + "ZuoXiWorkTotal/ExptList?token=" + token;
  135. url += "&stime=" + stime + "&endtime=" + endtime + "&dayss=" + $("#dayss").val();
  136. obj.href = url;
  137. }
  138. //加载表格
  139. function getTableDataList() {
  140. var loadindex = layer.load();
  141. layui.use('table', function() {
  142. var table = layui.table;
  143. //方法级渲染
  144. table.render({
  145. elem: '#t_callTotal',
  146. url: huayi.config.callcenter_url + "ZuoXiWorkTotal/GetDataList",
  147. method: 'get', //如果无需自定义HTTP类型,可不加该参数
  148. skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
  149. even: true, //开启隔行背景
  150. size: 'lg', //sm,lg尺寸的表格
  151. cellMinWidth: 160,
  152. where: {
  153. stime: stime,
  154. endtime: endtime,
  155. dayss: $("#dayss").val(),
  156. token: token
  157. }, //如果无需传递额外参数,可不加该参数
  158. //request: {}, //如果无需自定义请求参数,可不加该参数
  159. response: {
  160. statusName: 'state', //数据状态的字段名称,默认:code
  161. statusCode: 'success', //成功的状态码,默认:0
  162. msgName: 'message', //状态信息的字段名称,默认:msg
  163. //countName: 'total', //数据总数的字段名称,默认:count
  164. //dataName: 'rows', //数据列表的字段名称,默认:data
  165. }, //如果无需自定义数据响应名称,可不加该参数
  166. cols: [
  167. [ {
  168. field: '坐席',
  169. title: '坐席',
  170. align: 'center',
  171. width: '',
  172. },
  173. {
  174. field: '坐席工号',
  175. title: '坐席工号',
  176. align: 'center',
  177. width: '',
  178. },
  179. {
  180. field: '呼入电话数',
  181. title: '呼入电话数',
  182. align: 'center',
  183. width: '',
  184. },
  185. {
  186. field: '坐席接通量',
  187. title: '坐席接通量',
  188. align: 'center',
  189. width: '',
  190. },
  191. {
  192. field: '呼损量',
  193. title: '呼损量',
  194. align: 'center',
  195. width: '',
  196. },
  197. {
  198. field: '接通率',
  199. title: '接通率',
  200. align: 'center',
  201. width: '',
  202. },
  203. {
  204. field: '呼损率',
  205. title: '呼损率',
  206. align: 'center',
  207. width: '',
  208. },
  209. {
  210. field: '平均排队时间',
  211. title: '平均排队时间',
  212. align: 'center',
  213. width: '',
  214. },
  215. {
  216. field: '通话分钟数',
  217. title: '通话分钟数',
  218. align: 'center',
  219. width: '',
  220. },
  221. {
  222. field: '通话秒数',
  223. title: '通话秒数',
  224. align: 'center',
  225. width: '',
  226. },
  227. {
  228. field: '平均接听通话秒数',
  229. title: '平均接听通话秒数',
  230. align: 'center',
  231. width: '',
  232. },
  233. {
  234. field: '平均振铃秒数',
  235. title: '平均振铃秒数',
  236. align: 'center',
  237. width: '',
  238. },
  239. {
  240. field: '呼入占有率',
  241. title: '呼入占有率',
  242. align: 'center',
  243. width: '',
  244. },
  245. {
  246. field: '用户评价',
  247. title: '用户评价',
  248. align: 'center',
  249. width: '',
  250. },
  251. {
  252. field: '坐席登录次数',
  253. title: '坐席登录次数',
  254. align: 'center',
  255. width: '',
  256. },
  257. {
  258. field: '登录时长分钟数',
  259. title: '登录时长分钟数',
  260. align: 'center',
  261. width: '',
  262. },
  263. {
  264. field: '工作时长分钟数',
  265. title: '工作时长分钟数',
  266. align: 'center',
  267. width: '',
  268. },
  269. {
  270. field: '平均每天工作时长',
  271. title: '平均每天工作时长',
  272. align: 'center',
  273. width: '',
  274. },
  275. {
  276. field: '平均操作分钟数',
  277. title: '平均操作分钟数',
  278. align: 'center',
  279. width: '',
  280. },
  281. {
  282. field: '置忙次数',
  283. title: '置忙次数',
  284. align: 'center',
  285. width: '',
  286. },
  287. {
  288. field: '休息时长分钟数',
  289. title: '休息时长分钟数',
  290. align: 'center',
  291. width: '',
  292. },
  293. {
  294. field: '平均每天休息时长',
  295. title: '平均每天休息时长',
  296. align: 'center',
  297. width: '',
  298. },
  299. {
  300. field: '置忙平均休息分钟数',
  301. title: '置忙平均休息分钟数',
  302. align: 'center',
  303. width: '',
  304. },
  305. {
  306. field: '质检平均成绩',
  307. title: '质检平均成绩',
  308. align: 'center',
  309. width: '',
  310. },
  311. // {
  312. // field: '平均通话总时长',
  313. // title: '平均通话总时长',
  314. // align: 'center',
  315. // templet: '<div><span class="color_73926">{{d.平均通话总时长}}</span></div>',
  316. // width: '',
  317. // },
  318. ]
  319. ],
  320. height: 'full-150',
  321. done:function(){
  322. layer.close(loadindex);
  323. }
  324. });
  325. });
  326. }
  327. function getDept() {
  328. //部门下拉数据
  329. $("#bumen").select2({
  330. width: 'resolve',
  331. minimumResultsForSearch: -1,
  332. ajax: {
  333. type: "get",
  334. url: huayi.config.callcenter_url + "Department/GetDeptList",
  335. async: true,
  336. dataType: "json",
  337. data: function(params) {
  338. return {
  339. token: token,
  340. pid: params.id
  341. }
  342. },
  343. processResults: function(data) {
  344. return {
  345. results: data.data
  346. }
  347. },
  348. cache: true
  349. },
  350. placeholder: "请选择",
  351. });
  352. }
  353. </script>
  354. </body>
  355. </html>