三元财务UI

rankingReport.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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 href="../../css/Table/table1.css" rel="stylesheet" />
  10. <script src="../../js/laydate/laydate.js"></script>
  11. <link href="../../css/init.css" rel="stylesheet" />
  12. <link href="../css/report.css" rel="stylesheet" />
  13. </head>
  14. <body class="gray-bg">
  15. <div class="daoHang clearfix">
  16. <div class="dhLeft">
  17. <sapn><i class="syIcon"></i>位置:
  18. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  19. <a href="javaScript:;">外呼管理</a>&gt;
  20. <a href="javaScript:;">外呼报表</a>&gt;
  21. <a href="" style="color: #000;">区域排名报表</a>
  22. </sapn>
  23. </div>
  24. <div class="dhRight">
  25. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  26. </div>
  27. </div>
  28. <div class="wrapper wrapper-content animated fadeInRight">
  29. <div class="toolBox clearfix">
  30. <div class="pull-left">
  31. <div class="form-inline">
  32. <div class="time-box form-group">
  33. <i class="tub fa fa-calendar"></i>
  34. <input class="form-control search_time" type="text" id="s_time" placeholder="请选择起止时间" lay-key="1">
  35. </div>
  36. <div class="form-group">
  37. <select class="form-control" id="s_task"></select>
  38. </div>
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="key" placeholder="请输入电话号码">
  41. </div>
  42. </div>
  43. </div>
  44. <div class="pull-right tool_bars">
  45. <button type="button" class="btns" id="sc_btns">搜索</button>
  46. <a href="javascript:;" class="btns" onclick="dcexcel(this)">导出</a>
  47. </div>
  48. </div>
  49. <div style="width: 100%;padding: 10px;">
  50. <div class="table-head">
  51. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  52. <colgroup>
  53. <col style="width: 80px;" />
  54. <col/>
  55. </colgroup>
  56. <thead>
  57. <tr>
  58. <td>排名</td>
  59. <td>乡镇或单位</td>
  60. <td>总数</td>
  61. </tr>
  62. </thead>
  63. </table>
  64. </div>
  65. <div class="table-body">
  66. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  67. <colgroup>
  68. <col style="width: 80px;" />
  69. <col/>
  70. </colgroup>
  71. <tbody>
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. <script>
  78. $(document).ready(function() {
  79. /*var nt = helper.DateFormat.getNowDate();
  80. var pr = helper.DateFormat.getPreMonth(nt);
  81. var st = pr + ' ~ ' + nt;*/
  82. taskSelect();
  83. laydate.render({
  84. elem: '#s_time',
  85. range: '~',
  86. //value: st,
  87. calendar: true,
  88. theme: '#1ab394',
  89. });
  90. getRankList()
  91. $("#sc_btns").click(function() {
  92. getRankList();
  93. });
  94. $('#ReIndex').click(function() {
  95. top.home_index();
  96. });
  97. });
  98. //查询条件中获取任务列表
  99. function taskSelect() {
  100. $.ajax({
  101. type: "get",
  102. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  103. dataType: 'json',
  104. data: {
  105. token: $.cookie("token")
  106. },
  107. async: true,
  108. success: function(data) {
  109. if(data.state.toLowerCase() == "success") {
  110. var Count = data.data;
  111. if(Count.length > 0) {
  112. for(var i = 0; i < Count.length; i++) {
  113. $("<option value='" + Count[i].F_TaskID + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#s_task"));
  114. }
  115. } else {
  116. $("<option value=''>--暂无数据--</option>").appendTo($("#s_task"));
  117. }
  118. }
  119. }
  120. });
  121. }
  122. //获取数据
  123. function getRankList() {
  124. /*var nt = helper.DateFormat.getNowDate();
  125. var pr = helper.DateFormat.getPreMonth(nt);
  126. var st = $("#s_time").val() == "" ? pr : $("#s_time").val() && $("#s_time").val().split(' ~ ')[0];
  127. var et = $("#s_time").val() == "" ? nt : $("#s_time").val() && $("#s_time").val().split(' ~ ')[1];*/
  128. $.ajax({
  129. type: "get",
  130. url: huayi.config.callcenter_url + "CallOutReport/GetRank",
  131. dataType: 'json',
  132. data: {
  133. taskid: $("#s_task").val(),//传任务id
  134. sdate: $("#s_time").val() && $("#s_time").val().split(' ~ ')[0],
  135. edate: $("#s_time").val() && $("#s_time").val().split(' ~ ')[1],
  136. token: $.cookie("token")
  137. },
  138. async: true,
  139. success: function(data) {
  140. $(".hwbb tbody").empty();
  141. var Count = data.data;
  142. var countLength = Count.length;
  143. for(var i = 0; i < countLength - 1; i++) {
  144. $('<tr>' +
  145. '<td>' + (i + 1) + ' </td>' +
  146. '<td>' + Count[i].xiangzhen + ' </td>' +
  147. '<td> ' + Count[i].zongshu + ' </td>' +
  148. '</tr>').appendTo(".hwbb tbody");
  149. }
  150. $('<tr>' +
  151. '<td colspan="2">' + Count[i].xiangzhen + ' </td>' +
  152. '<td> ' + Count[countLength - 1].zongshu + ' </td>' +
  153. '</tr>').appendTo(".hwbb tbody");
  154. }
  155. });
  156. }
  157. function dcexcel(obj) {
  158. var url = huayi.config.callcenter_url + "CallOutReport/GetRankExpt?token=" + $.cookie("token");
  159. url += "&taskid=" + $("#s_task").val() + "&sdate=" + ($("#s_time").val() && $("#s_time").val().split(' ~ ')[0]) + "&edate=" + ($("#s_time").val() && $("#s_time").val().split(' ~ ')[1]);
  160. obj.href = url;
  161. }
  162. </script>
  163. </body>
  164. </html>