ZZDianXin_UI - 郑州电信 演示

zxSatisfaction.html 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../js/layui/css/layui.css" />
  10. <link rel="stylesheet" href="../js/select2/css/select2.min.css" />
  11. <link rel="stylesheet" href="../css/init.css" />
  12. <style>
  13. .toolBox {
  14. background: #f3f3f4;
  15. height: 60px;
  16. padding: 10px 20px;
  17. }
  18. .th-content {
  19. width: 90%;
  20. margin: 0 auto;
  21. }
  22. .select2-container--default .select2-selection--single{
  23. border-color: #e5e6e7;
  24. }
  25. </style>
  26. </head>
  27. <body class="gray-bg" style="background: #fefefe;">
  28. <div class="daoHang clearfix">
  29. <div class="dhLeft">
  30. <sapn><i class="syIcon"></i>位置:
  31. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  32. <a href="javaScript:;">报表分析</a>&gt;
  33. <a href="javaScript:;">员工考核分析</a>&gt;
  34. <a href="" style="color: #000;">坐席满意度评价</a>
  35. </sapn>
  36. </div>
  37. <div class="dhRight">
  38. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  39. </div>
  40. </div>
  41. <div class="toolBox">
  42. <div class="th-bar clearfix">
  43. <div class="pull-right">
  44. <div class="form-inline">
  45. <div class="time-box form-group">
  46. <i class="tub fa fa-calendar"></i>
  47. <input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
  48. </div>
  49. <!--<div class="time-box form-group">
  50. 部门:
  51. <select id="bumen">
  52. <option value="">请选择</option>
  53. </select>
  54. </div>-->
  55. <div class="pull-right">
  56. <button class="btns search">搜索</button>
  57. <a href="" class="btns export">导出</a>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="th-content">
  64. <table class="layui-hide" id="t_callTotal"></table>
  65. </div>
  66. <script src="../js/layui/layui.js"></script>
  67. <script src="../js/select2/js/select2.min.js"></script>
  68. <script src="js/ReportFormGetDepart.js"></script>
  69. <script>
  70. var token = $.cookie("token");
  71. var stime = ''; //开始时间
  72. var endtime = ''; //结束时间
  73. //getDept($('#bumen'));//部门
  74. $(document).ready(function() {
  75. layui.use('laydate', function() {
  76. var laydate = layui.laydate;
  77. //日期
  78. laydate.render({
  79. elem: '#startTime',
  80. range: '~',
  81. theme: '#1ab394',
  82. calendar: 'true'
  83. });
  84. });
  85. getTableDataList(); //获取表格数据
  86. /*搜索*/
  87. $(".search").click(function() {
  88. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  89. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  90. getTableDataList(); //获取表格数据
  91. })
  92. //按enter搜索
  93. document.onkeydown = function (e) { // 回车提交表单
  94. var theEvent = window.event || e;
  95. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  96. if (code == 13) {
  97. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  98. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  99. getTableDataList(); //获取表格数据
  100. }
  101. }
  102. //按回车搜索
  103. document.onkeydown = function (e) {
  104. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  105. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  106. var theEvent = window.event || e;
  107. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  108. if (code == 13) {
  109. getTableDataList();
  110. }
  111. }
  112. //导出
  113. $('.export').click(function() {
  114. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  115. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  116. dcexcel(this);
  117. });
  118. });
  119. function dcexcel(obj) {
  120. var url = huayi.config.callcenter_url + "ZuoXiManYiDu/ExptList?token=" + token;
  121. url += "&stime=" + stime + "&endtime=" + endtime;//+ "&dpt=" + $('#bumen').val();
  122. obj.href = url;
  123. }
  124. //加载表格
  125. function getTableDataList() {
  126. var loadindex = layer.load();
  127. layui.use('table', function() {
  128. var table = layui.table;
  129. //方法级渲染
  130. table.render({
  131. elem: '#t_callTotal',
  132. url: huayi.config.callcenter_url + "ZuoXiManYiDu/GetDataList",
  133. method: 'get', //如果无需自定义HTTP类型,可不加该参数
  134. skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
  135. even: true, //开启隔行背景
  136. size: 'lg', //sm,lg尺寸的表格
  137. cellMinWidth: 160,
  138. where: {
  139. stime: stime,
  140. endtime: endtime,
  141. //dpt: $('#bumen').val(),
  142. token: token,
  143. }, //如果无需传递额外参数,可不加该参数
  144. //request: {}, //如果无需自定义请求参数,可不加该参数
  145. response: {
  146. statusName: 'state', //数据状态的字段名称,默认:code
  147. statusCode: 'success', //成功的状态码,默认:0
  148. msgName: 'message', //状态信息的字段名称,默认:msg
  149. //countName: 'total', //数据总数的字段名称,默认:count
  150. //dataName: 'rows', //数据列表的字段名称,默认:data
  151. }, //如果无需自定义数据响应名称,可不加该参数
  152. /* page: true, //是否显示分页
  153. limits: [5, 20, 50, 100],
  154. limit: 5, //每页默认显示的数量
  155. request: {
  156. pageName: 'pageNumber', //页码的参数名称,默认:page
  157. limitName: 'pageSize' //每页数据量的参数名,默认:limit
  158. },
  159. */ cols: [
  160. [{
  161. field: '坐席姓名',
  162. title: '坐席姓名',
  163. align: 'center',
  164. fixed: true,
  165. //sort: true,
  166. width: 150,
  167. },
  168. {
  169. field: '非常满意',
  170. title: '非常满意',
  171. align: 'center',
  172. },
  173. {
  174. field: '非常满意占比',
  175. title: '非常满意占比',
  176. align: 'center',
  177. templet: function(d){
  178. return Number(d.非常满意占比 * 100).toFixed(2) + '%';
  179. },
  180. sort: true,
  181. },
  182. {
  183. field: '基本满意',
  184. title: '基本满意',
  185. align: 'center',
  186. },
  187. {
  188. field: '基本满意占比',
  189. title: '基本满意占比',
  190. align: 'center',
  191. templet: function(d){
  192. return Number(d.基本满意占比 * 100).toFixed(2) + '%';
  193. },
  194. sort: true,
  195. },
  196. {
  197. field: '不满意',
  198. title: '不满意',
  199. align: 'center',
  200. },
  201. {
  202. field: '不满意占比',
  203. title: '不满意占比',
  204. align: 'center',
  205. templet: function(d){
  206. return Number(d.不满意占比 * 100).toFixed(2) + '%';
  207. },
  208. sort: true,
  209. },
  210. {
  211. field: '未评价',
  212. title: '未评价',
  213. align: 'center',
  214. },
  215. {
  216. field: '未评价占比',
  217. title: '未评价占比',
  218. align: 'center',
  219. templet: function(d){
  220. return Number(d.未评价占比).toFixed(2) + '%';
  221. },
  222. sort: true,
  223. },
  224. ]
  225. ],
  226. height: 'full-150',
  227. done:function(){
  228. layer.close(loadindex);
  229. }
  230. });
  231. });
  232. }
  233. </script>
  234. </body>
  235. </html>