index.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <{include file='../public/admin_header.html'}>
  2. <{include file='../public/admin_navi.html'}>
  3. <!-- Right side column. Contains the navbar and content of the page -->
  4. <aside class="right-side">
  5. <!-- Content Header (Page header) -->
  6. <section class="content-header">
  7. <h1>
  8. 客户列表
  9. <small>Control panel</small>
  10. <small>临时队列数据剩余 <span style="color:red"> <{$tmp_num}> </span> </small>
  11. </h1>
  12. <ol class="breadcrumb">
  13. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  14. <li class="active">Blank page</li>
  15. </ol>
  16. </section>
  17. <!-- Main content -->
  18. <section class="content">
  19. <div class="span9">
  20. <{if $info}>
  21. <div class="alert alert-success nodisplay"><{$info}></div>
  22. <{/if}>
  23. <div style="margin-bottom:20px;float:right;">
  24. <a href="/?a=customer_list_admin&m=add" style="color:red;text-decoration:underline;">添加客户</a>
  25. </div>
  26. <div id='main' class="form-actions">
  27. <form method="post" action="/?a=customer_list_admin&m=index" >
  28. <div style="margin-left:20px;float:left;margin-bottom:20px;margin-right:20px;">
  29. 客户姓名:<input type="text" name="username" value="<{$username}>" style="width:200px;">
  30. </div>
  31. <div >
  32. 客户分组:
  33. <select name="group_name" style="width:280px;" id="group_name" >
  34. <option value="0">请选择</option>
  35. <{foreach from=$group_list item=item}>
  36. <option value="<{$item.name}>" <{if $group_name==$item.name}>selected<{/if}> ><{$item.name}></option>
  37. <{/foreach}>
  38. </select>
  39. </div>
  40. <div style="clear:both;margin-left:20px;">
  41. <input type="submit" class="btn btn-info" value="查询" style="clear:both;height: 30px; width: 600px; "/>
  42. </div>
  43. </form>
  44. <br/><br/>
  45. <form method="post" action="/?a=customer_list_admin&m=export" target="_blank">
  46. <div style="text-align:right;">
  47. <input type="hidden" name="group_name" value="<{$group_name}>" />
  48. <input type="submit" class="btn btn-primary" value="导出数据" style="width:200px;"/>
  49. </div>
  50. </form>
  51. <form method="post" id="batch_user_group" action="/?a=customer_list_admin&m=import" enctype="multipart/form-data" >
  52. <input type="hidden" name="to_import_user" value="yes" />
  53. <input type="file" name="inputExcel" style="width:175px;"><span style="color:red;">(excel是.xls格式的)</span>
  54. <input type="submit" class="btn btn-success" value="导入用户" style="cursor:pointer;height: 32px; width: 140px;margin-left:10px;margin-top:20px;" />
  55. </form>
  56. <form id="batch_delete" method="post" action="/?a=customer_list_admin&m=batch_delete">
  57. <input class="btn btn-warning" onclick="toSubmit();" value="批量删除" style="margin-bottom:20px;float:right;width:200px;" />
  58. <table class="table table-mailbox" style="margin-top:15px;">
  59. <tr>
  60. <th style="width:80px;"><input type="checkbox" id="check-all" />&nbsp;&nbsp;全选</th>
  61. <th>ID</th>
  62. <th>客户姓名</th>
  63. <th>邮箱</th>
  64. <th>客户所属分组</th>
  65. <th>国家</th>
  66. <th>城市</th>
  67. <th>操作</th>
  68. </tr>
  69. <{foreach from=$list item=item}>
  70. <tr>
  71. <td>
  72. <input type="checkbox" name="id_array[]" value="<{$item.id}>" />
  73. </td>
  74. <td><{$item.id}></td>
  75. <td><{$item.uname}></td>
  76. <td><{$item.email}></td>
  77. <td><{$item.group_name}></td>
  78. <td><{$item.country}></td>
  79. <td><{$item.city}></td>
  80. <td>
  81. <a href="/?a=customer_list_admin&m=edit&id=<{$item.id}>">编辑</a>
  82. <a onclick="to_confirm('<{$item.id}>','<{$item.uname}>')" style="float:right;margin-right:15px;cursor:pointer;">删除</a>
  83. </td>
  84. </tr>
  85. <{/foreach}>
  86. </table>
  87. </form>
  88. <{$show}> <select name="pagesize" id="pagesize" onchange="javascript:var pagesize=this.value;location='/?a=customer_list_admin&amp;m=index&amp;pagesize='+pagesize+'&group_name=<{$group_name}>'+'#ly'">
  89. <option value="20" <{if $pagesize==20}>selected<{/if}> > 20</option>
  90. <option value="30" <{if $pagesize==30}>selected<{/if}> >30</option>
  91. <option value="50" <{if $pagesize==50}>selected<{/if}> >50</option>
  92. <option value="100" <{if $pagesize==100}>selected<{/if}> >100</option>
  93. <option value="200" <{if $pagesize==200}>selected<{/if}> >200</option>
  94. <option value="500" <{if $pagesize==500}>selected<{/if}> >500</option>
  95. <option value="1000" <{if $pagesize==1000}>selected<{/if}> >1000</option>
  96. </select>
  97. </div>
  98. <script src="static/AdminLTE/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
  99. <script src="static/AdminLTE/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
  100. <link href="static/AdminLTE/css/iCheck/minimal/blue.css" rel="stylesheet" type="text/css" />
  101. <link href="static/AdminLTE/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
  102. <script src="static/AdminLTE/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
  103. <script type="text/javascript">
  104. $(function() {
  105. "use strict";
  106. //iCheck for checkbox and radio inputs
  107. $('input[type="checkbox"]').iCheck({
  108. checkboxClass: 'icheckbox_minimal-blue',
  109. radioClass: 'iradio_minimal-blue'
  110. });
  111. //When unchecking the checkbox
  112. $("#check-all").on('ifUnchecked', function(event) {
  113. //Uncheck all checkboxes
  114. $("input[type='checkbox']", ".table-mailbox").iCheck("uncheck");
  115. });
  116. //When checking the checkbox
  117. $("#check-all").on('ifChecked', function(event) {
  118. //Check all checkboxes
  119. $("input[type='checkbox']", ".table-mailbox").iCheck("check");
  120. });
  121. });
  122. </script>
  123. <script>
  124. function toSubmit(){
  125. var n = $("input:checked").length;
  126. if (n<=1) {
  127. alert("请选择要批量删除的客户");
  128. }else{
  129. if(confirm("确定要删除吗?")){
  130. $('#batch_delete').submit();
  131. }
  132. }
  133. }
  134. </script>
  135. </div>
  136. </section><!-- /.content -->
  137. </aside><!-- /.right-side -->
  138. </div><!-- ./wrapper -->
  139. <style>
  140. select{height:30px;}
  141. </style>
  142. <script>
  143. $('#treeview3').addClass('active');
  144. $(".return_rate_left").addClass('active');
  145. $(function() {
  146. //Date range picker
  147. $('#reservation').daterangepicker();
  148. });
  149. </script>
  150. <script>
  151. function to_confirm(id,name){
  152. if(confirm("确定要删除用户 "+name+" 吗?"))
  153. {
  154. window.location.href = "/?a=customer_list_admin&m=delete&id="+id;
  155. }
  156. }
  157. </script>
  158. </body>
  159. </html>