sim_list.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. {% load staticfiles %}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8" />
  6. <link href="{% static '/lib/bootstrap-3.3.7/css/bootstrap.css' %}" rel="stylesheet">
  7. <link rel="stylesheet" href="{% static '/lib/font-awesome/4.5.0/css/font-awesome.css' %}">
  8. <link rel="stylesheet" href="{% static '/lib/css/ace.min.css' %}" />
  9. <link rel="stylesheet" href="{% static '/lib/css/ace-skins.min.css' %}">
  10. <link rel="stylesheet" href="{% static '/lib/css/ace-rtl.min.css' %}">
  11. <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
  12. <link rel="stylesheet" href="{% static '/lib/css/jquery-ui.css' %}" />
  13. <link rel="stylesheet" href="{% static '/css/equipmanage_cbd.css' %}" />
  14. <style>
  15. #listPage {
  16. overflow-x: scroll;
  17. }
  18. .searchCover {
  19. margin: 20px 0;
  20. }
  21. .innerTable {
  22. padding: 0 1px 0 0;
  23. min-width: 750px;
  24. }
  25. .table,
  26. .table.table-striped>thead>tr>th {
  27. text-align: center;
  28. }
  29. table td {
  30. vertical-align: middle !important;
  31. }
  32. .nullData {
  33. width: 100%;
  34. height: 500px;
  35. background: #ddd;
  36. text-align: center;
  37. line-height: 500px;
  38. font-size: 20px;
  39. border: 1px solid #ddd;
  40. }
  41. /* 配置项 */
  42. .form-group>label {
  43. margin: 4px 0 0 0;
  44. text-align: right;
  45. }
  46. .initVal {
  47. position: absolute;
  48. left: 14px;
  49. top: 5px;
  50. }
  51. .ui-slider {
  52. top: 8px;
  53. left: 18px;
  54. }
  55. .sliderVal {
  56. position: absolute;
  57. right: 30px;
  58. top: 5px;
  59. }
  60. .collocateBtn {
  61. text-align: center;
  62. }
  63. .collocateBtn button {
  64. margin: 10px 10px 20px 10px;
  65. }
  66. .form-group select {
  67. width: 200px;
  68. }
  69. .widget-body {
  70. margin-top: 20px;
  71. }
  72. .timePattern {
  73. display: none;
  74. }
  75. .hintTitle {
  76. text-align: center;
  77. display: inline-block;
  78. width: 100px;
  79. margin-right: 15px;
  80. color: #777;
  81. }
  82. .form-group select[name='begin'],
  83. .form-group select[name='end'] {
  84. padding: 0 26px 0 37px;
  85. width: initial;
  86. }
  87. #desc {
  88. width: 100px;
  89. }
  90. </style>
  91. <body>
  92. <div class="content">
  93. <div id="detialPage"></div>
  94. <div id="listPage">
  95. <div class="searchCover">
  96. 设备ID:
  97. <input type="text" value="" id="eId" placeholder="请输入设备ID" onkeypress="if (event.keyCode == 13) sub_filter();" /> SIM卡状态:
  98. <select name="" id="status">
  99. <option value="">请选择</option>
  100. <option value="1">测试期</option>
  101. <option value="2">沉默期</option>
  102. <option value="3">使用中</option>
  103. <option value="4">停机</option>
  104. <option value="5">停机保号</option>
  105. <option value="6">预销号</option>
  106. <option value="7">销号</option>
  107. <option value="0">未知</option>
  108. </select>
  109. <!-- <input type="text" value="" class="fp-user" id="edver" placeholder="请输入设备版本" onkeypress="if (event.keyCode == 13) sub_filter();" /> -->
  110. <button type="button" onclick="sub_filter()" class="btn btn-sm btn-primary">筛选</button>
  111. </div>
  112. <div class="innerTable">
  113. <table id="datatable" class="table table-striped table-hover">
  114. <thead>
  115. <tr>
  116. <th>设备ID</th>
  117. <th>设备名称</th>
  118. <th>设备类型</th>
  119. <th>SIM卡状态</th>
  120. <th>套餐(Mb)</th>
  121. <th>剩余流量(Mb)</th>
  122. <th>到期时间</th>
  123. <th>绑定手机号</th>
  124. <th>操作</th>
  125. </tr>
  126. </thead>
  127. <tbody>
  128. </tbody>
  129. </table>
  130. <div class="fenpei-bottom">
  131. <input type="hidden" id="totalPage" value={{ nums }}>
  132. <div id="page" style="text-align: center;"></div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <script src="{% static '/lib/js/jquery-2.1.4.min.js' %}"></script>
  138. <script src="{% static '/lib/bootstrap-3.3.7/js/bootstrap.js' %}"></script>
  139. <script src="{% static '/lib/layui/layui.all.js' %}"></script>
  140. <script src="{% static '/js/common.js' %}?versions=0.5.0"></script>
  141. <!-- <script src="{% static '/js/warnmanage/cbd_list.js' %}?versions=0.5.0"></script> -->
  142. <script>
  143. $.ajaxSetup({
  144. data: { csrfmiddlewaretoken: '{{ csrf_token }}' },
  145. });
  146. </script>
  147. <script>
  148. $('#eId').on('focus', function () {
  149. $('#status').val('');
  150. })
  151. $('#status').on('change', function () {
  152. $('#eId').val('');
  153. })
  154. getData(1, 1, '', '', '')
  155. function getData(page, currpage, e_id, status) {
  156. $.ajax({
  157. type: 'get',
  158. url: 'sim_flow_view',
  159. data: {
  160. 'page': page,
  161. 'e_id': e_id,
  162. 'status': status
  163. },
  164. dataType: "html",
  165. beforeSend: function () {
  166. $('#loadingParent').show();
  167. },
  168. complete: function () {
  169. $('#loadingParent').hide();
  170. },
  171. success: function (data) {
  172. $('#datatable').children().eq(1).html(data);
  173. scrollBar();
  174. layui.use('laypage', function () {
  175. var laypage = layui.laypage;
  176. laypage.render({
  177. elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
  178. // ,count: 30
  179. , curr: currpage
  180. , count: $('#total_nums').val()
  181. , theme: '#428BCA'
  182. , layout: ['prev', 'page', 'next', 'skip']
  183. , jump: function (obj, first) {
  184. if (!first) {
  185. $("#datatable tr:not(:first)").html("");
  186. getData(obj.curr, obj.curr, e_id, status);
  187. }
  188. }
  189. });
  190. });
  191. },
  192. error: function (type) {
  193. console.log(type)
  194. }
  195. })
  196. }
  197. //筛选:
  198. function sub_filter() {
  199. getData(1, 1, $('#eId').val(), $('#status').val())
  200. }
  201. </script>
  202. </body>
  203. </html>