index.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. </h1>
  11. <ol class="breadcrumb">
  12. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  13. <li class="active">Blank page</li>
  14. </ol>
  15. </section>
  16. <!-- Main content -->
  17. <section class="content">
  18. <{if $info}>
  19. <div class="alert alert-success"><{$info}></div>
  20. <{/if}>
  21. <{if $error}>
  22. <div class="alert alert-danger alert-dismissable"><{$error}></div>
  23. <{/if}>
  24. <div id='main' class="form-actions">
  25. <a href="/?a=user_group_admin&m=add" style="font-weight:bold;text-decoration:underline;">添加客户分组</a>
  26. <form id="batch_delete" method="post" action="/?a=user_group_admin&m=batch_delete">
  27. <input class="btn btn-warning" onclick="toSubmit();" value="批量删除" style="float:right;width:200px;margin-bottom:20px;" />
  28. <table class="table table-bordered" style="margin-top:15px;clear:both;">
  29. <tr>
  30. <th style="width:80px;"><input type="checkbox" id="check-all" />&nbsp;&nbsp;全选</th>
  31. <th>ID</th>
  32. <th >客户分组名称</th>
  33. <th >数量</th>
  34. <th >修改时间</th>
  35. <th >添加时间</th>
  36. <th>操作</th>
  37. </tr>
  38. <{foreach from=$list item=item}>
  39. <tr>
  40. <td>
  41. <input type="checkbox" name="id_array[]" value="<{$item.id}>" />
  42. </td>
  43. <td><{$item.id}></td>
  44. <td><{$item.name}></td>
  45. <td><{$item.count}></td>
  46. <td><{$item.update_time}></td>
  47. <td><{$item.add_time}></td>
  48. <td>
  49. <a href="/?a=user_group_admin&m=update&id=<{$item.id}>">编辑</a>
  50. <a style="margin-left:50px;text-align:right;" href="/?a=user_group_admin&m=group_list&id=<{$item.id}>&gname=<{$item.name}>">详情</a>
  51. <a onclick="to_delete('<{$item.name}>','<{$item.id}>');" style="margin-left:50px;text-align:right;cursor:pointer;" >删除</a>
  52. </td>
  53. </tr>
  54. <{/foreach}>
  55. </table>
  56. </form>
  57. </div>
  58. <script src="static/AdminLTE/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
  59. <script src="static/AdminLTE/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
  60. <link href="static/AdminLTE/css/iCheck/minimal/blue.css" rel="stylesheet" type="text/css" />
  61. <link href="static/AdminLTE/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
  62. <script src="static/AdminLTE/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
  63. <script type="text/javascript">
  64. $(function() {
  65. "use strict";
  66. //iCheck for checkbox and radio inputs
  67. $('input[type="checkbox"]').iCheck({
  68. checkboxClass: 'icheckbox_minimal-blue',
  69. radioClass: 'iradio_minimal-blue'
  70. });
  71. //When unchecking the checkbox
  72. $("#check-all").on('ifUnchecked', function(event) {
  73. //Uncheck all checkboxes
  74. $("input[type='checkbox']", ".table-bordered").iCheck("uncheck");
  75. });
  76. //When checking the checkbox
  77. $("#check-all").on('ifChecked', function(event) {
  78. //Check all checkboxes
  79. $("input[type='checkbox']", ".table-bordered").iCheck("check");
  80. });
  81. });
  82. </script>
  83. <script>
  84. function toSubmit(){
  85. var n = $("input:checked").length;
  86. if (n<=1) {
  87. alert("请选择要批量删除的黑名单吗");
  88. }else{
  89. if(confirm("确定要删除吗?")){
  90. $('#batch_delete').submit();
  91. }
  92. }
  93. }
  94. </script>
  95. </section><!-- /.content -->
  96. </aside><!-- /.right-side -->
  97. </div><!-- ./wrapper -->
  98. <script>
  99. $('#treeview3').addClass('active');
  100. $(".user_group_left").addClass('active');
  101. function to_delete(name,id){
  102. if(confirm("确定删除"+name)){
  103. window.location.href="/?a=user_group_admin&m=delete&id="+id+"&group_name="+name;
  104. }
  105. }
  106. </script>
  107. </body>
  108. </html>