ZZDianXin_UI - 郑州电信 演示

Tasks.html 7.4KB

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