index.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <th>操作</th>
  38. </tr>
  39. <{foreach from=$list item=item}>
  40. <tr>
  41. <td>
  42. <input type="checkbox" name="id_array[]" value="<{$item.id}>" />
  43. </td>
  44. <td><{$item.id}></td>
  45. <td><{$item.name}></td>
  46. <td><{$item.count}></td>
  47. <td><{$item.position}></td>
  48. <td><{$item.update_time}></td>
  49. <td><{$item.add_time}></td>
  50. <td>
  51. <a href="/?a=user_group_admin&m=update&id=<{$item.id}>">编辑</a>
  52. <a style="margin-left:50px;text-align:right;" href="/?a=user_group_admin&m=group_list&id=<{$item.id}>&gname=<{$item.name}>">详情</a>
  53. <a onclick="to_delete('<{$item.name}>','<{$item.id}>');" style="margin-left:50px;text-align:right;cursor:pointer;" >删除</a>
  54. </td>
  55. </tr>
  56. <{/foreach}>
  57. </table>
  58. </form>
  59. </div>
  60. <script src="static/AdminLTE/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
  61. <script src="static/AdminLTE/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
  62. <link href="static/AdminLTE/css/iCheck/minimal/blue.css" rel="stylesheet" type="text/css" />
  63. <link href="static/AdminLTE/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
  64. <script src="static/AdminLTE/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
  65. <script type="text/javascript">
  66. $(function() {
  67. "use strict";
  68. //iCheck for checkbox and radio inputs
  69. $('input[type="checkbox"]').iCheck({
  70. checkboxClass: 'icheckbox_minimal-blue',
  71. radioClass: 'iradio_minimal-blue'
  72. });
  73. //When unchecking the checkbox
  74. $("#check-all").on('ifUnchecked', function(event) {
  75. //Uncheck all checkboxes
  76. $("input[type='checkbox']", ".table-bordered").iCheck("uncheck");
  77. });
  78. //When checking the checkbox
  79. $("#check-all").on('ifChecked', function(event) {
  80. //Check all checkboxes
  81. $("input[type='checkbox']", ".table-bordered").iCheck("check");
  82. });
  83. });
  84. </script>
  85. <script>
  86. function toSubmit(){
  87. var n = $("input:checked").length;
  88. if (n<=1) {
  89. alert("请选择要批量删除的黑名单吗");
  90. }else{
  91. if(confirm("确定要删除吗?")){
  92. $('#batch_delete').submit();
  93. }
  94. }
  95. }
  96. </script>
  97. </section><!-- /.content -->
  98. </aside><!-- /.right-side -->
  99. </div><!-- ./wrapper -->
  100. <script>
  101. $('#treeview3').addClass('active');
  102. $(".user_group_left").addClass('active');
  103. function to_delete(name,id){
  104. if(confirm("确定删除"+name)){
  105. window.location.href="/?a=user_group_admin&m=delete&id="+id+"&group_name="+name;
  106. }
  107. }
  108. </script>
  109. </body>
  110. </html>