商丘12345 前端

SMSlist.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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 rel="stylesheet" href="../css/bootstrap-select.css">
  8. <link href="../css/init.css" rel="stylesheet" />
  9. <script src="../Script/Common/huayi.load.js"></script>
  10. <script src="../Script/Common/huayi.config.js"></script>
  11. <!--<link href="../css/Table/table1.css" rel="stylesheet" />-->
  12. <!--<link rel="stylesheet" href="../css/init.css" />-->
  13. <script src="../css/laydate/laydate.js"></script>
  14. <style>
  15. ul li {
  16. list-style: none;
  17. float: left;
  18. margin-bottom: 10px;
  19. }
  20. .fl {
  21. float: left;
  22. }
  23. .fr {
  24. float: right;
  25. }
  26. .sc_btn {
  27. color: rgb(255, 255, 255);
  28. font-size: 12px;
  29. margin-left: 15px;
  30. box-sizing: border-box;
  31. background: #00a1cb;
  32. padding: 6px 10px;
  33. outline: none;
  34. border-width: 0px;
  35. border-style: initial;
  36. border-color: initial;
  37. border-image: initial;
  38. border-radius: 3px;
  39. position: relative;
  40. bottom: -7px;
  41. }
  42. .photo {
  43. background-color: #FFF;
  44. background-image: none;
  45. border: 1px solid #e5e6e7 !important;
  46. border-radius: 1px;
  47. color: inherit;
  48. padding: 6px 12px;
  49. height: 34px !important;
  50. }
  51. </style>
  52. </head>
  53. <body class="gray-bg">
  54. <div class="wrapper wrapper-content animated fadeInRight">
  55. <div class="daoHang clearfix">
  56. <div class="dhLeft">
  57. <sapn><i class="syIcon"></i>位置:
  58. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  59. <a href="javaScript:;">话务管理</a>&gt;
  60. <a href="" class="nowPosition">短信列表</a>
  61. </sapn>
  62. </div>
  63. <div class="dhRight">
  64. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  65. </div>
  66. </div>
  67. <div class="th-box">
  68. <div class="th-bar">
  69. <div class="seach-box fr">
  70. <ul>
  71. <li>电话号码:<input class="photo x-color" type="text" id="tel" />发送人:</li>
  72. <li style="width: 200px;">
  73. <select id="ZX" name="select" class="selectpicker show-tick form-control" multiple data-live-search="true">
  74. <option value="">请选择</option>
  75. </select>
  76. </li>
  77. <li>开始时间:<input class="photo x-color laydate-icon" type="text" id="lysj" /></li>
  78. <li>结束时间:<input class="laydate-icon photo x-color " type="text" id="clsj" /></li>
  79. <li>
  80. <a class="sc_btn seach">搜索</a>
  81. </li>
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. <div style="width: 100%;padding: 10px;">
  87. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  88. <thead>
  89. <tr>
  90. <th data-field="CallerNum" data-align="center">电话号码</th>
  91. <th data-field="Content" data-align="center">内容</th>
  92. <th data-field="usercode" data-align="center">发送人</th>
  93. <th data-field="RecvTime" data-align="center">发送时间</th>
  94. </tr>
  95. </thead>
  96. </table>
  97. </div>
  98. </div>
  99. <script src="../js/bootstrap-select.js"></script>
  100. <script>
  101. $(document).ready(function() {
  102. /*日期选择*/
  103. laydate.skin('blue');
  104. //留言时间
  105. laydate({
  106. elem: '#lysj',
  107. event: 'focus',
  108. festival: true, //显示节日
  109. });
  110. //处理时间
  111. laydate({
  112. elem: '#clsj',
  113. festival: true, //显示节日
  114. event: 'focus'
  115. });
  116. /*查询*/
  117. $(".seach").click(function() {
  118. initTable();
  119. });
  120. ZX($("#ZX"));
  121. initTable();
  122. })
  123. function initTable() {
  124. var usercodeID = "";
  125. var usercode_ = $("#ZX").val(); //坐席
  126. if(usercode_ != null) {
  127. $(usercode_).each(function(i, n) {
  128. var obj1 = '';
  129. obj1 = n + ",";
  130. usercodeID += obj1;
  131. })
  132. } else {
  133. usercodeID = ""
  134. }
  135. //先销毁表格
  136. $('#list').bootstrapTable('destroy');
  137. //初始化表格,动态从服务器加载数据
  138. $("#list").bootstrapTable({
  139. method: "get", //使用get请求到服务器获取数据
  140. url: huayi.config.callcenter_url + "SMS/GetRecvList", //获取数据的Servlet地址
  141. contentType: "application/x-www-form-urlencoded",
  142. striped: true, //表格显示条纹
  143. pagination: true, //启动分页
  144. pageSize: 10, //每页显示的记录数
  145. pageNumber: 1, //当前第几页
  146. pageList: [10, 20, 50, 100], //记录数可选列表
  147. search: false, //是否启用查询
  148. showColumns: false, //显示下拉框勾选要显示的列
  149. showRefresh: false, //显示刷新按钮
  150. sidePagination: "server", //表示服务端请求
  151. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  152. //设置为limit可以获取limit, offset, search, sort, order
  153. queryParamsType: "undefined",
  154. queryParams: function queryParams(params) { //设置查询参数
  155. var param = {
  156. page: params.pageNumber,
  157. pagesize: params.pageSize,
  158. tel: $("#tel").val(),
  159. starttime: $("#lysj").val(),
  160. endtime: $("#clsj").val(),
  161. userid: usercodeID,
  162. token: $.cookie("token")
  163. };
  164. return param;
  165. },
  166. onLoadSuccess: function() { //加载成功时执行
  167. //layer.msg("加载成功");
  168. },
  169. onLoadError: function() { //加载失败时执行
  170. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  171. }
  172. });
  173. }
  174. //坐席
  175. function ZX(obj) {
  176. obj.empty();
  177. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  178. "token": $.cookie("token"),
  179. }, function(data) {
  180. if(data.state.toLowerCase() == "success") {
  181. var content = data.data;
  182. $(content).each(function(i, n) {
  183. $("<option value='" + n.F_UserId + "'>" + n.F_UserName + "</option>").appendTo(obj);
  184. })
  185. obj.selectpicker({
  186. noneSelectedText: '请选择' //默认显示内容
  187. });
  188. obj.selectpicker('refresh');
  189. }
  190. })
  191. }
  192. </script>
  193. </body>
  194. </html>