三元财务UI

calloutTasksReport.html 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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/init.css" rel="stylesheet" />
  10. <link href="../../css/Table/table1.css" rel="stylesheet" />
  11. <link href="../css/report.css" rel="stylesheet" />
  12. </head>
  13. <body class="gray-bg">
  14. <div class="daoHang clearfix">
  15. <div class="dhLeft">
  16. <sapn><i class="syIcon"></i>位置:
  17. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  18. <a href="javaScript:;">外呼管理</a>&gt;
  19. <a href="javaScript:;">外呼报表</a>&gt;
  20. <a href="" style="color: #000;">外呼任务报表</a>
  21. </sapn>
  22. </div>
  23. <div class="dhRight">
  24. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  25. </div>
  26. </div>
  27. <div class="wrapper wrapper-content animated fadeInRight">
  28. <div class="toolBox clearfix">
  29. <div class="pull-left">
  30. <div class="form-inline">
  31. <div class="time-box form-group">
  32. <i class="tub fa fa-calendar"></i>
  33. <input class="form-control search_time" type="text" id="s_time" placeholder="请选择起止时间" lay-key="1">
  34. </div>
  35. <div class="form-group">
  36. <select class="form-control" id="s_task"></select>
  37. </div>
  38. <div class="form-group">
  39. <select class="form-control" id="s_questions"></select>
  40. </div>
  41. <div class="form-group">
  42. <input type="text" class="form-control" id="key" placeholder="请输入电话号码">
  43. </div>
  44. </div>
  45. </div>
  46. <div class="pull-right tool_bars">
  47. <button type="button" class="btns" id="sc_btns">搜索</button>
  48. <a href="javascript:;" class="btns" onclick="dcexcel(this)">导出</a>
  49. </div>
  50. </div>
  51. <div style="width: 100%;padding: 10px;">
  52. <div class="table-head">
  53. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  54. <colgroup>
  55. <col style="width: 80px;" />
  56. <col/>
  57. </colgroup>
  58. <thead>
  59. <tr>
  60. <td>问题</td>
  61. <td>选项</td>
  62. <td>数量</td>
  63. <td>比例</td>
  64. </tr>
  65. </thead>
  66. </table>
  67. </div>
  68. <div class="table-body">
  69. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  70. <colgroup>
  71. <col style="width: 80px;" />
  72. <col/>
  73. </colgroup>
  74. <tbody>
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <script src="../../js/laydate/laydate.js"></script>
  82. <script>
  83. $(document).ready(function() {
  84. taskSelect();
  85. questionnaireSelect();
  86. laydate.render({
  87. elem: '#s_time',
  88. range: '~',
  89. //value: st,
  90. calendar: true,
  91. theme: '#1ab394',
  92. });
  93. $("#sc_btns").click(function() {
  94. getDataList();
  95. })
  96. });
  97. //查询条件中获取任务列表
  98. function taskSelect() {
  99. $.ajax({
  100. type: "get",
  101. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  102. dataType: 'json',
  103. data: {
  104. token: $.cookie("token")
  105. },
  106. async: true,
  107. success: function(data) {
  108. if(data.state.toLowerCase() == "success") {
  109. var Count = data.data;
  110. if(Count.length > 0) {
  111. //$("<option value=''>--全部--</option>").appendTo($("#s_task"));
  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 questionnaireSelect() {
  124. $.ajax({
  125. type: "get",
  126. url: huayi.config.callcenter_url + "Questionnaire/GetQList",
  127. dataType: 'json',
  128. data: {
  129. token: $.cookie("token")
  130. },
  131. async: true,
  132. success: function(data) {
  133. if(data.state.toLowerCase() == "success") {
  134. var Count = data.data;
  135. // $("<option value=''>--全部--</option>").appendTo($("#s_questions"));
  136. for(var i = 0; i < Count.length; i++) {
  137. $("<option value='" + Count[i].F_QuestionId + "'>" + Count[i].F_Title + "</option>").appendTo($("#s_questions"));
  138. }
  139. } else {
  140. $("<option value=''>--暂无数据--</option>").appendTo($("#s_questions"));
  141. }
  142. }
  143. })
  144. .then(function() {
  145. getDataList();
  146. });
  147. }
  148. //获取数据
  149. function getDataList() {
  150. $.ajax({
  151. type: "get",
  152. url: huayi.config.callcenter_url + "CallOutReport/GetReport",
  153. dataType: 'json',
  154. data: {
  155. TaskID: $("#s_task").val(), //string 是 任务id
  156. quesid: $('#s_questions').val(), // string 是 问题id
  157. sdate: $("#s_time").val() && $("#s_time").val().split(' ~ ')[0], // string 否 开始时间
  158. edate: $("#s_time").val() && $("#s_time").val().split(' ~ ')[1], //string 否 结束时间
  159. token: $.cookie("token")
  160. },
  161. async: true,
  162. success: function(data) {
  163. $(".thTable tbody").empty();
  164. if(data.state.toLowerCase() == "success") {
  165. var Count = data.data;
  166. if(Count.length > 0) {
  167. for(var i = 0; i < Count.length; i++) {
  168. $('<tr><td>' + Count[i].wenti + ' </td>' +
  169. '<td> ' + Count[i].xuanxiang + ' </td>' +
  170. '<td> ' + Count[i].shuliang + ' </td>' +
  171. '<td> ' + Count[i].bili + ' </td>' +
  172. '</tr>').appendTo(".hwbb tbody");
  173. }
  174. } else {
  175. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  176. }
  177. } else {
  178. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  179. }
  180. }
  181. });
  182. }
  183. function dcexcel(obj) {
  184. var url = huayi.config.callcenter_url + "CallOutReport/GetReportExpt?token=" + $.cookie("token");
  185. url += "&TaskID=" + $("#s_task").val();
  186. url += "&quesid=" + $("#s_questions").val();
  187. url += "&sdate=" + ($("#s_time").val() && $("#s_time").val().split(' ~ ')[0]); // string 否 开始时间
  188. url += "&edate=" + ($("#s_time").val() && $("#s_time").val().split(' ~ ')[1]); // string 否 开始时间
  189. obj.href = url;
  190. }
  191. </script>
  192. </body>
  193. </html>