开封利通水务前端

zxSatisfaction.html 6.0KB

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