思念食品 UI

workOrderComplain.html 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. </style>
  23. </head>
  24. <body class="gray-bg" style="background: #fefefe;">
  25. <div class="daoHang clearfix">
  26. <div class="dhLeft">
  27. <sapn><i class="syIcon"></i>位置:
  28. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  29. <a href="javaScript:;">报表分析</a>&gt;
  30. <a href="javaScript:;">业务数据分析</a>&gt;
  31. <a href="" style="color: #000;">投诉原因</a>
  32. </sapn>
  33. </div>
  34. <div class="dhRight">
  35. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  36. </div>
  37. </div>
  38. <div class="toolBox">
  39. <div class="th-bar clearfix">
  40. <div class="pull-right">
  41. <div class="form-inline">
  42. <div class="time-box form-group">
  43. <i class="tub fa fa-calendar"></i>
  44. <input class="form-control" type="text" id="startTime" placeholder="请选择起止时间" style="width: 228px;">
  45. </div>
  46. <!--<div class="time-box form-group">
  47. 部门:
  48. <select id="bumen">
  49. <option value="">请选择</option>
  50. </select>
  51. </div>-->
  52. <div class="pull-right">
  53. <button class="btns search">搜索</button>
  54. <!--<a href="" class="btns export">导出</a>-->
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="th-content">
  61. <div id="quantity" style="width: 100%;height: 500px;"></div>
  62. </div>
  63. <script src="../js/layui/layui.js"></script>
  64. <script src="../js/echarts.min.js"></script>
  65. <script src="../js/highcharts.js"></script>
  66. <script src="../js/select2/js/select2.min.js"></script>
  67. <script>
  68. var token = $.cookie("token");
  69. var stime = ''; //开始时间
  70. var endtime = ''; //结束时间
  71. $(document).ready(function() {
  72. layui.use('laydate', function() {
  73. var laydate = layui.laydate;
  74. //日期
  75. laydate.render({
  76. elem: '#startTime',
  77. range: '~',
  78. theme: '#1ab394',
  79. calendar: 'true'
  80. });
  81. });
  82. helper.getDropList.getDept($('#bumen')); //获取部门
  83. /*搜索*/
  84. $(".search").click(function() {
  85. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  86. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  87. partOne();
  88. //getTableDataList(); //获取表格数据
  89. })
  90. // //导出
  91. // $('.export').click(function() {
  92. // stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  93. // endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  94. // dcexcel(this);
  95. // });
  96. });
  97. function dcexcel(obj) {
  98. var url = huayi.config.callcenter_url + "GDLY/ExportExcel?token=" + token;
  99. url += "&stime=" + stime + "&endtime=" + endtime + "&dpt=" + $('#bumen').val();
  100. obj.href = url;
  101. }
  102. //投诉举报汇总 part1
  103. var quantity = echarts.init(document.getElementById('quantity'));
  104. quantity.setOption({
  105. tooltip: {
  106. trigger: 'item',
  107. formatter: "{a} <br/>{b} : {c} ({d}%)",
  108. axisPointer: {
  109. crossStyle: {
  110. color: '#fff'
  111. }
  112. }
  113. },
  114. legend: {
  115. // orient: 'vertical',
  116. bottom: 'bottom',
  117. data: [],
  118. textStyle: {
  119. color: '#fff'
  120. }
  121. },
  122. series: [{
  123. name: '数据',
  124. type: 'pie',
  125. radius: '55%',
  126. center: ['50%', '50%'],
  127. data: [],
  128. itemStyle: {
  129. emphasis: {
  130. shadowBlur: 10,
  131. shadowOffsetX: 0,
  132. shadowColor: 'rgba(0, 0, 0, 0.5)'
  133. },
  134. normal: {
  135. label: {
  136. show: true,
  137. formatter: '{b} : {c} ({d}%)'
  138. },
  139. labelLine: {
  140. show: true
  141. }
  142. }
  143. },
  144. label: {
  145. normal: {
  146. textStyle: {
  147. color: '#fff'
  148. }
  149. }
  150. }
  151. }]
  152. });
  153. partOne();
  154. //投诉举报汇总 part1
  155. var quantity = echarts.init(document.getElementById('quantity'));
  156. quantity.setOption({
  157. tooltip: {
  158. trigger: 'item',
  159. formatter: "{a} <br/>{b} : {c} ({d}%)",
  160. axisPointer: {
  161. crossStyle: {
  162. color: '#000'
  163. }
  164. }
  165. },
  166. legend: {
  167. bottom: 'bottom',
  168. data: [],
  169. textStyle: {
  170. color: '#000'
  171. }
  172. },
  173. series: [{
  174. name: '数据',
  175. type: 'pie',
  176. radius: '55%',
  177. center: ['50%', '50%'],
  178. data: [],
  179. itemStyle: {
  180. emphasis: {
  181. shadowBlur: 10,
  182. shadowOffsetX: 0,
  183. shadowColor: 'rgba(0, 0, 0, 0.5)'
  184. },
  185. normal: {
  186. label: {
  187. show: true,
  188. formatter: '{b} : {c} ({d}%)'
  189. },
  190. labelLine: {
  191. show: true
  192. }
  193. }
  194. },
  195. label: {
  196. normal: {
  197. textStyle: {
  198. color: '#000'
  199. }
  200. }
  201. }
  202. }]
  203. });
  204. function partOne() {
  205. var index = layer.load(1, {
  206. shade: [0.5, '#030303'] //0.1透明度的白色背景
  207. });
  208. $.ajax({
  209. type: "get",
  210. url: huayi.config.callcenter_url + "Business/GetTypeReport",
  211. async: true,
  212. dataType: 'json',
  213. data: {
  214. token: token,
  215. sdate: stime,
  216. edate: endtime
  217. },
  218. success: function(data) {
  219. if(data.state.toLowerCase() == 'success') {
  220. layer.close(index);
  221. var con = data.data;
  222. var part_1_legend = [];
  223. var part_1_ser = [];
  224. $(con).each(function(i, n) {
  225. part_1_legend.push(n.TypeName)
  226. var part_1_obj = {};
  227. part_1_obj.value = n.Count;
  228. part_1_obj.name = n.TypeName;
  229. part_1_ser.push(part_1_obj)
  230. })
  231. quantity.setOption({
  232. legend: {
  233. data: part_1_legend
  234. },
  235. series: [{
  236. data: part_1_ser
  237. }]
  238. })
  239. }
  240. }
  241. });
  242. }
  243. $('.part1Btn').click(function() {
  244. partOne()
  245. })
  246. </script>
  247. </body>
  248. </html>