封丘民意调查

Tasks.html 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. <style>
  12. .LY:hover {
  13. color: #fff;
  14. }
  15. .LY:active {
  16. color: #fff!important;
  17. }
  18. #Task thead td {
  19. color: #fff;
  20. background-color: #1ab394;
  21. text-align: center;
  22. }
  23. .table-head table thead {
  24. width: calc( 100% - 5px);
  25. }
  26. table thead,
  27. tbody tr {
  28. display: table;
  29. width: 100%;
  30. table-layout: fixed;
  31. text-align: center;
  32. }
  33. .table {
  34. margin-bottom: 0;
  35. }
  36. .table-body {
  37. width: 100%;
  38. height: 515px;
  39. overflow-y: scroll;
  40. overflow-x: scroll;
  41. }
  42. #ss_kssj{
  43. width: 240px;
  44. }
  45. </style>
  46. </head>
  47. <body class="gray-bg">
  48. <div class="wrapper wrapper-content animated fadeInRight">
  49. <div class="daoHang clearfix">
  50. <div class="dhLeft">
  51. <sapn><i class="syIcon"></i>位置:
  52. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  53. <a href="javaScript:;">外呼管理</a>&gt;
  54. <a href="javaScript:;">外呼报表</a>&gt;
  55. <a href="" style="color: #000;">外呼任务报表</a>
  56. </sapn>
  57. </div>
  58. </div>
  59. <div class="th-box clearfix">
  60. <div class="th-bar">
  61. <div class="seach-box fl">
  62. <ul>
  63. <li style="position: relative;">
  64. 时间:
  65. <i class="tub fa fa-calendar"></i>
  66. <input type="text" id="ss_kssj" class="photo size-14 laydate-icon" placeholder="请选择开始时间和结束时间" />
  67. </li>
  68. <li>任务列表:
  69. <select id="cljg" class="x-color select"></select>
  70. </li>
  71. <li>问题列表:
  72. <select id="Wt" class="x-color select"></select>
  73. </li>
  74. <li>乡镇或单位:
  75. <select id="country" class="x-color select">
  76. <option value="">--全部--</option>
  77. </select>
  78. </li>
  79. <li>
  80. <a class="sc_btn seach">搜索</a>
  81. </li>
  82. <li>
  83. <a class="sc_btn export">导出</a>
  84. </li>
  85. </ul>
  86. </div>
  87. </div>
  88. </div>
  89. <div style="width: 100%;padding: 10px;">
  90. <div class="table-head">
  91. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  92. <colgroup>
  93. <col style="width: 80px;" />
  94. <col/>
  95. </colgroup>
  96. <thead>
  97. <tr>
  98. <td>问题</td>
  99. <td>选项</td>
  100. <td>数量</td>
  101. <td>比例</td>
  102. </tr>
  103. </thead>
  104. </table>
  105. </div>
  106. <div class="table-body">
  107. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  108. <colgroup>
  109. <col style="width: 80px;" /><col/>
  110. </colgroup>
  111. <tbody></tbody>
  112. </table>
  113. </div>
  114. </div>
  115. </div>
  116. <script src="../../js/laydate/laydate.js"></script>
  117. <script>
  118. $(document).ready(function() {
  119. taskSelect();
  120. getCountry();
  121. laydate.render({
  122. elem: '#ss_kssj',
  123. range: '~',
  124. calendar: true,
  125. theme: '#1ab394',
  126. });
  127. $(".sc_btn").click(function() {
  128. getDataList();
  129. })
  130. //导出功能
  131. $('.export').click(function() {
  132. dcexcel(this);
  133. })
  134. });
  135. //查询条件中获取任务列表
  136. function taskSelect() {
  137. $.ajax({
  138. type: "get",
  139. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  140. dataType: 'json',
  141. data: {
  142. token: $.cookie("token")
  143. },
  144. async: true,
  145. success: function(data) {
  146. if(data.state.toLowerCase() == "success") {
  147. var Count = data.data;
  148. if(Count.length > 0) {
  149. //$("<option value=''>--全部--</option>").appendTo($("#cljg"));
  150. for(var i = 0; i < Count.length; i++) {
  151. $("<option value='" + Count[i].F_TaskID + ',' + Count[i].F_PagerID +"'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
  152. }
  153. } else {
  154. $("<option value=''>--暂无数据--</option>").appendTo($("#cljg"));
  155. }
  156. questionnaireSelect();
  157. }
  158. }
  159. });
  160. }
  161. ///查询条件问题任务列表
  162. function questionnaireSelect() {
  163. $.ajax({
  164. type: "get",
  165. // url: huayi.config.callcenter_url + "Questionnaire/GetQList",
  166. url: huayi.config.callcenter_url + "Questionnaire/GetQuestionsByPageId",
  167. dataType: 'json',
  168. data: {
  169. pageid: $("#cljg").val().split(',')[1],
  170. token: $.cookie("token")
  171. },
  172. async: true,
  173. success: function(data) {
  174. if(data.state.toLowerCase() == "success") {
  175. var Count = data.data;
  176. // $("<option value=''>--全部--</option>").appendTo($("#Wt"));
  177. for(var i = 0; i < Count.length; i++) {
  178. $("<option value='" + Count[i].F_QuestionId + "' >" + Count[i].F_Title + "</option>").appendTo($("#Wt"));
  179. }
  180. } else {
  181. $("<option value=''>--暂无数据--</option>").appendTo($("#Wt"));
  182. }
  183. }
  184. })
  185. .then(function(){
  186. getDataList();
  187. });
  188. }
  189. //获取乡镇或单位下拉
  190. function getCountry(){
  191. $.ajax({
  192. type: "get",
  193. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  194. dataType: 'json',
  195. data: {
  196. flag: 'JBDW',
  197. token: $.cookie("token")
  198. },
  199. async: true,
  200. success: function(data) {
  201. if(data.state.toLowerCase() == "success") {
  202. var res = data.data;
  203. for(var i = 0; i < res.length; i++) {
  204. $('<option value="'+ res[i].F_DictionaryValueId +'">'+ res[i].F_Name +'</option>').appendTo($("#country"));
  205. }
  206. }else{
  207. $("<option value=''>--暂无数据--</option>").appendTo($("#country"));
  208. }
  209. }
  210. });
  211. }
  212. //获取数据
  213. function getDataList() {
  214. $.ajax({
  215. type: "get",
  216. url: huayi.config.callcenter_url + "CallOutReport/GetReport",
  217. dataType: 'json',
  218. data: {
  219. TaskID: $("#cljg").val().split(',')[0], //string 是 任务id
  220. quesid: $('#Wt').val(), // string 是 问题id
  221. countryid: $('#country').val(), // string 否 乡镇或单位id
  222. sdate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0],// string 否 开始时间
  223. edate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1],//string 否 结束时间
  224. token: $.cookie("token")
  225. },
  226. async: true,
  227. success: function(data) {
  228. $(".thTable tbody").empty();
  229. if(data.state.toLowerCase() == "success") {
  230. var Count = data.data;
  231. if(Count.length > 0) {
  232. for(var i = 0; i < Count.length; i++) {
  233. $('<tr><td>' + Count[i].wenti + ' </td>' +
  234. '<td> ' + Count[i].xuanxiang + ' </td>' +
  235. '<td> ' + Count[i].shuliang + ' </td>' +
  236. '<td> ' + Count[i].bili + ' </td>' +
  237. '</tr>').appendTo(".hwbb tbody");
  238. }
  239. } else {
  240. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  241. }
  242. } else {
  243. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  244. }
  245. }
  246. });
  247. }
  248. function dcexcel(obj) {
  249. var url = huayi.config.callcenter_url + "CallOutReport/GetReportExpt?token=" + $.cookie("token");
  250. url += "&TaskID=" + $("#cljg").val();
  251. url += "&quesid=" + $("#Wt").val();
  252. url += "&countryid=" + $("#country").val();
  253. url += "&sdate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0]);// string 否 开始时间
  254. url += "&edate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1]);// string 否 开始时间
  255. obj.href = url;
  256. }
  257. </script>
  258. </body>
  259. </html>