三元财务UI

zuoXiTable.html 9.9KB

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