PingAnYeXianSZCG_Web 前端代码

TaskResult.html 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. <link href="../css/init.css" rel="stylesheet" />
  11. <style>
  12. table td {
  13. word-break: break-all;
  14. word-wrap: break-word;
  15. }
  16. table th {
  17. min-width: 120px;
  18. }
  19. </style>
  20. </head>
  21. <body class="gray-bg">
  22. <div class="wrapper wrapper-content animated fadeInRight">
  23. <div class="daoHang clearfix">
  24. <div class="dhLeft" >
  25. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">外呼计划</a>&gt;<a href="" style="color: #000;">任务结果</a></sapn>
  26. </div>
  27. </div>
  28. <div class="th-box">
  29. <div class="th-bar">
  30. <div class="seach-box ">
  31. <ul>
  32. <li>关键字:<input class="photo x-color" type="text" id="key" placeholder="请输入电话号码" /></li>
  33. <li>呼叫结果:
  34. <select name="" class="photo" id="hjjgid"></select>
  35. </li>
  36. <li>用户反馈:
  37. <select name="" class="photo" id="yhfkid"></select>
  38. </li>
  39. <li>坐席:
  40. <select name="" class="photo" id="zx"></select>
  41. </li>
  42. <li>
  43. <a class="sc_btn Block" id="sc_btns">搜索</a>
  44. </li>
  45. </ul>
  46. </div>
  47. </div>
  48. </div>
  49. <div style="width: 100%;padding: 10px;">
  50. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  51. <thead>
  52. <tr>
  53. <th data-field="state" data-checkbox="true"></th>
  54. <th data-field="F_Phone" data-align="center"data-formatter="Code">号码</th>
  55. <th data-field="F_UserName" data-align="center">分配坐席</th>
  56. <th data-field="F_HJJGName" data-align="center">呼叫结果</th>
  57. <th data-field="F_YHFKName" data-align="center">用户反馈</th>
  58. </tr>
  59. </thead>
  60. <tbody id="tbody"></tbody>
  61. </table>
  62. </div>
  63. </div>
  64. <script>
  65. $(document).ready(function () {
  66. initTable();
  67. GetHJJG() ;//呼叫结果
  68. GetYHFK();//用户反馈
  69. $("#sc_btns").click(function () {
  70. initTable();
  71. });
  72. $('#ReIndex').click(function(){
  73. top.home_index();
  74. })
  75. //坐席
  76. $.ajax({
  77. type: "get",
  78. url: huayi.config.callcenter_url + "UserAccount/GetSeatList",
  79. dataType: 'json',
  80. async: true,
  81. data: {
  82. token: $.cookie("token")
  83. },
  84. success: function(data) {
  85. var Count = data.data;
  86. $("<option value=''>--全部--</option>").appendTo($("#zx"));
  87. for(var i = 0; i < Count.length; i++) {
  88. //console.log(Count[i].F_UserName);
  89. $("<option value='" + Count[i].F_UserId + "'>" + Count[i].F_UserName + "</option>").appendTo($("#zx"));
  90. }
  91. }
  92. });
  93. })
  94. function initTable() {
  95. //先销毁表格
  96. $('#list').bootstrapTable('destroy');
  97. //初始化表格,动态从服务器加载数据
  98. $("#list").bootstrapTable({
  99. method: "get", //使用get请求到服务器获取数据
  100. url: huayi.config.callcenter_url + "CallOutPlan/GetResultList", //获取数据的Servlet地址
  101. striped: true, //表格显示条纹
  102. pagination: true, //启动分页
  103. pageSize: 10, //每页显示的记录数
  104. pageNumber: 1, //当前第几页
  105. pageList: [10, 20, 50, 100], //记录数可选列表
  106. search: false, //是否启用查询
  107. showColumns: false, //显示下拉框勾选要显示的列
  108. showRefresh: false, //显示刷新按钮
  109. sidePagination: "server", //表示服务端请求
  110. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  111. //设置为limit可以获取limit, offset, search, sort, order
  112. queryParamsType: "undefined",
  113. queryParams: function queryParams(params) { //设置查询参数
  114. var param = {
  115. pageindex: params.pageNumber,
  116. pagesize: params.pageSize,
  117. key: $("#key").val(),
  118. hjjgid:$("#hjjgid").val(),//呼叫结果ID
  119. yhfkid:$("#yhfkid").val(), //用户反馈ID
  120. userid:$("#zx").val(),
  121. token: $.cookie("token")
  122. };
  123. return param;
  124. },
  125. onLoadSuccess: function () { //加载成功时执行
  126. //layer.msg("加载成功");
  127. },
  128. onLoadError: function () { //加载失败时执行
  129. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  130. }
  131. });
  132. }
  133. //获取呼叫结果
  134. function GetHJJG() {
  135. $.ajax({
  136. type: "get",
  137. url: huayi.config.callcenter_url +"Dictionary/GetDicValueListByFlag",
  138. dataType: 'json',
  139. data: {
  140. flag: 'HJJG',
  141. token: $.cookie("token")
  142. },
  143. async: true,
  144. success: function(data) {
  145. var Count = data.data;
  146. $("<option value=''>--全部--</option>").appendTo($("#hjjgid"));
  147. for(var i = 0; i < Count.length; i++) {
  148. console.log(Count[i].F_UserName);
  149. $("<option value='" + Count[i].F_DictionaryValueId + "'>" + Count[i].F_Name + "</option>").appendTo($("#hjjgid"));
  150. }
  151. }
  152. });
  153. }
  154. //用户反馈
  155. function GetYHFK() {
  156. $.ajax({
  157. type: "get",
  158. url: huayi.config.callcenter_url +"Dictionary/GetDicValueListByFlag",
  159. dataType: 'json',
  160. data: {
  161. flag: 'YHFK',
  162. token: $.cookie("token")
  163. },
  164. async: true,
  165. success: function(data) {
  166. var Count = data.data;
  167. $("<option value=''>--全部--</option>").appendTo($("#yhfkid"));
  168. for(var i = 0; i < Count.length; i++) {
  169. console.log(Count[i].F_UserName);
  170. $("<option value='" + Count[i].F_DictionaryValueId + "'>" + Count[i].F_Name + "</option>").appendTo($("#yhfkid"));
  171. }
  172. }
  173. });
  174. }
  175. function Code(val,row){
  176. return'<div><a onclick="XX('+row.F_Id+')">'+row.F_Phone+'</a></div>'
  177. }
  178. //详情
  179. function XX(str){
  180. console.log(str);
  181. layer.open({
  182. type: 2,
  183. content: "../OutboundMessage/LookMessages.html?Str="+str, //iframe的url,no代表不显示滚动条
  184. title: '任务信息',
  185. maxmin: true, //开启最大化最小化按钮
  186. id: 'LAY_layuipro',//防止重复弹出
  187. area: ['86%', '88%'], //宽高
  188. });
  189. }
  190. </script>
  191. </body>
  192. </html>