No Description

zxSatisfaction.html 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. //按回车搜索
  93. document.onkeydown = function (e) {
  94. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  95. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  96. var theEvent = window.event || e;
  97. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  98. if (code == 13) {
  99. getTableDataList();
  100. }
  101. }
  102. //导出
  103. $('.export').click(function() {
  104. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  105. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  106. dcexcel(this);
  107. });
  108. });
  109. function dcexcel(obj) {
  110. var url = huayi.config.callcenter_url + "ZuoXiManYiDu/ExptList?token=" + token;
  111. url += "&stime=" + stime + "&endtime=" + endtime;//+ "&dpt=" + $('#bumen').val();
  112. obj.href = url;
  113. }
  114. //加载表格
  115. function getTableDataList() {
  116. var loadindex = layer.load();
  117. layui.use('table', function() {
  118. var table = layui.table;
  119. //方法级渲染
  120. table.render({
  121. elem: '#t_callTotal',
  122. url: huayi.config.callcenter_url + "ZuoXiManYiDu/GetDataList",
  123. method: 'get', //如果无需自定义HTTP类型,可不加该参数
  124. skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
  125. even: true, //开启隔行背景
  126. size: 'lg', //sm,lg尺寸的表格
  127. cellMinWidth: 160,
  128. where: {
  129. stime: stime,
  130. endtime: endtime,
  131. //dpt: $('#bumen').val(),
  132. token: token,
  133. }, //如果无需传递额外参数,可不加该参数
  134. //request: {}, //如果无需自定义请求参数,可不加该参数
  135. response: {
  136. statusName: 'state', //数据状态的字段名称,默认:code
  137. statusCode: 'success', //成功的状态码,默认:0
  138. msgName: 'message', //状态信息的字段名称,默认:msg
  139. //countName: 'total', //数据总数的字段名称,默认:count
  140. //dataName: 'rows', //数据列表的字段名称,默认:data
  141. }, //如果无需自定义数据响应名称,可不加该参数
  142. /* page: true, //是否显示分页
  143. limits: [5, 20, 50, 100],
  144. limit: 5, //每页默认显示的数量
  145. request: {
  146. pageName: 'pageNumber', //页码的参数名称,默认:page
  147. limitName: 'pageSize' //每页数据量的参数名,默认:limit
  148. },
  149. */ cols: [
  150. [{
  151. field: '坐席姓名',
  152. title: '坐席姓名',
  153. align: 'center',
  154. fixed: true,
  155. //sort: true,
  156. width: 150,
  157. },
  158. {
  159. field: '非常满意',
  160. title: '非常满意',
  161. align: 'center',
  162. },
  163. {
  164. field: '非常满意占比',
  165. title: '非常满意占比',
  166. align: 'center',
  167. templet: function(d){
  168. return Number(d.非常满意占比 * 100).toFixed(2) + '%';
  169. },
  170. sort: true,
  171. },
  172. {
  173. field: '基本满意',
  174. title: '基本满意',
  175. align: 'center',
  176. },
  177. {
  178. field: '基本满意占比',
  179. title: '基本满意占比',
  180. align: 'center',
  181. templet: function(d){
  182. return Number(d.基本满意占比 * 100).toFixed(2) + '%';
  183. },
  184. sort: true,
  185. },
  186. {
  187. field: '不满意',
  188. title: '不满意',
  189. align: 'center',
  190. },
  191. {
  192. field: '不满意占比',
  193. title: '不满意占比',
  194. align: 'center',
  195. templet: function(d){
  196. return Number(d.不满意占比 * 100).toFixed(2) + '%';
  197. },
  198. sort: true,
  199. },
  200. {
  201. field: '未评价',
  202. title: '未评价',
  203. align: 'center',
  204. },
  205. {
  206. field: '未评价占比',
  207. title: '未评价占比',
  208. align: 'center',
  209. templet: function(d){
  210. return Number(d.未评价占比 * 100).toFixed(2) + '%';
  211. },
  212. sort: true,
  213. },
  214. ]
  215. ],
  216. height: 'full-150',
  217. done:function(){
  218. layer.close(loadindex);
  219. }
  220. });
  221. });
  222. }
  223. </script>
  224. </body>
  225. </html>