Brak opisu

City.html 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. <link href="../css/init.css" rel="stylesheet" />
  8. <script src="../Script/Common/huayi.load.js"></script>
  9. <script src="../Script/Common/huayi.config.js"></script>
  10. <link href="../css/Table/table1.css" rel="stylesheet" />
  11. <script src="../js/laydate/laydate.js"></script>
  12. <style>
  13. .LY:hover {
  14. color: #fff;
  15. }
  16. .LY:active {
  17. color: #fff!important;
  18. }
  19. #Task thead td {
  20. color: #fff;
  21. background-color: #1ab394;
  22. text-align: center;
  23. }
  24. .table-head table thead {
  25. width: calc( 100% - 5px);
  26. }
  27. table thead,
  28. tbody tr {
  29. display: table;
  30. width: 100%;
  31. table-layout: fixed;
  32. text-align: center;
  33. }
  34. .table {
  35. margin-bottom: 0;
  36. }
  37. .table-body {
  38. width: 100%;
  39. height: 515px;
  40. overflow-y: scroll;
  41. overflow-x: scroll;
  42. }
  43. .sc_btn {
  44. line-height: 34px;
  45. }
  46. .laydate-icon {
  47. font-size: 14px;
  48. }
  49. </style>
  50. </head>
  51. <body class="gray-bg">
  52. <div class="wrapper wrapper-content animated fadeInRight">
  53. <div class="daoHang clearfix">
  54. <div class="dhLeft">
  55. <sapn><i class="syIcon"></i>位置:
  56. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  57. <a href="javaScript:;">外呼管理</a>&gt;
  58. <a href="javaScript:;">外呼报表</a>&gt;
  59. <a href="" style="color: #000;">乡镇或单位排名报表</a>
  60. </sapn>
  61. </div>
  62. </div>
  63. <div class="th-box">
  64. <div class="th-bar">
  65. <div class="seach-box fr">
  66. <ul>
  67. <li>任务列表:
  68. <select id="cljg" class="x-color select"></select>
  69. </li>
  70. <li>
  71. <label for="">时间:</label>
  72. <input type="text" id="ss_kssj" class="photo laydate-icon" placeholder="请选择开始时间和结束时间" />
  73. </li>
  74. <li>
  75. <a class="sc_btn seach">搜索</a>
  76. </li>
  77. <li>
  78. <a class="sc_btn export">导出</a>
  79. </li>
  80. </ul>
  81. </div>
  82. </div>
  83. </div>
  84. <div style="width: 100%;padding: 10px;">
  85. <div class="table-head">
  86. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  87. <colgroup>
  88. <col style="width: 80px;" />
  89. <col/>
  90. </colgroup>
  91. <thead>
  92. <tr>
  93. <td>排名</td>
  94. <td>乡镇或单位</td>
  95. <td>总数</td>
  96. </tr>
  97. </thead>
  98. </table>
  99. </div>
  100. <div class="table-body">
  101. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  102. <colgroup>
  103. <col style="width: 80px;" />
  104. <col/>
  105. </colgroup>
  106. <tbody>
  107. </tbody>
  108. </table>
  109. </div>
  110. </div>
  111. </div>
  112. <script>
  113. $(document).ready(function() {
  114. /*var nt = helper.DateFormat.getNowDate();
  115. var pr = helper.DateFormat.getPreMonth(nt);
  116. var st = pr + ' ~ ' + nt;*/
  117. taskSelect();
  118. laydate.render({
  119. elem: '#ss_kssj',
  120. range: '~',
  121. //value: st,
  122. calendar: true,
  123. theme: '#1ab394',
  124. });
  125. getRankList()
  126. $(".seach").click(function() {
  127. getRankList();
  128. });
  129. $('#ReIndex').click(function() {
  130. top.home_index();
  131. });
  132. });
  133. //查询条件中获取任务列表
  134. function taskSelect() {
  135. $.ajax({
  136. type: "get",
  137. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  138. dataType: 'json',
  139. data: {
  140. token: $.cookie("token")
  141. },
  142. async: true,
  143. success: function(data) {
  144. if(data.state.toLowerCase() == "success") {
  145. var Count = data.data;
  146. if(Count.length > 0) {
  147. for(var i = 0; i < Count.length; i++) {
  148. $("<option value='" + Count[i].F_TaskID + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
  149. }
  150. } else {
  151. $("<option value=''>--暂无数据--</option>").appendTo($("#cljg"));
  152. }
  153. }
  154. }
  155. });
  156. }
  157. //获取数据
  158. function getRankList() {
  159. /*var nt = helper.DateFormat.getNowDate();
  160. var pr = helper.DateFormat.getPreMonth(nt);
  161. var st = $("#ss_kssj").val() == "" ? pr : $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0];
  162. var et = $("#ss_kssj").val() == "" ? nt : $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1];*/
  163. $.ajax({
  164. type: "get",
  165. url: huayi.config.callcenter_url + "CallOutReport/GetRank",
  166. dataType: 'json',
  167. data: {
  168. taskid: $("#cljg").val(),//传任务id
  169. sdate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0],
  170. edate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1],
  171. token: $.cookie("token")
  172. },
  173. async: true,
  174. success: function(data) {
  175. $(".hwbb tbody").empty();
  176. var Count = data.data;
  177. var countLength = Count.length;
  178. for(var i = 0; i < countLength - 1; i++) {
  179. $('<tr>' +
  180. '<td>' + (i + 1) + ' </td>' +
  181. '<td>' + Count[i].xiangzhen + ' </td>' +
  182. '<td> ' + Count[i].zongshu + ' </td>' +
  183. '</tr>').appendTo(".hwbb tbody");
  184. }
  185. $('<tr>' +
  186. '<td colspan="2">' + Count[i].xiangzhen + ' </td>' +
  187. '<td> ' + Count[countLength - 1].zongshu + ' </td>' +
  188. '</tr>').appendTo(".hwbb tbody");
  189. }
  190. });
  191. }
  192. //导出功能
  193. $('.export').click(function() {
  194. dcexcel(this);
  195. })
  196. function dcexcel(obj) {
  197. var url = huayi.config.callcenter_url + "CallOutReport/GetRankExpt?token=" + $.cookie("token");
  198. url += "&taskid=" + $("#cljg").val() + "&sdate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0]) + "&edate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1]);
  199. obj.href = url;
  200. }
  201. </script>
  202. </body>
  203. </html>