123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- ##tlayout("admin/layout.htm"){
- <div class="breadcrumbs" style="padding-top:10px;height: 50px;">
- <div class="col-xs-12">
- <a class="btn btn-info btn-sm" style="margin-top: -12px;margin-left: 10px;" href="javascript:showAlert('/admin/bottle/addType?id=${bottle.id!}')">+添加水源</a>
- </div>
- </div>
- <div class="page-content">
- <div class="row" style="margin-top:10px;">
- <div class="col-xs-12">
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>名称</th>
- <th>价格/箱</th>
- <th>状态</th>
- <th>添加时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- ##for(_item in type_list!){
- <tr>
- <td>${_item.title!}</td>
- <td>${_item.price!}</td>
- <td>
- ##if(_item.status==1){
- 启用
- ##}else{
- 禁用
- ##}
- </td>
- <td>${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm'}</td>
- <td style="width:100px;">
- <div class="btn-group">
- <button class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
- 操作<span class="icon-caret-down icon-on-right"></span>
- </button>
- <ul class="dropdown-menu dropdown-info pull-right">
- <li><a href="javascript:showAlert('/admin/bottle/editType?id=${_item.id!}')">编辑</a></li>
- ##if(_item.status==1){
- <li><a href="javascript:changeTypeStatus(${_item.id!}, 0, '禁用')">禁用</a></li>
- ##}else{
- <li><a href="javascript:changeTypeStatus(${_item.id!}, 1, '启用')">启用</a></li>
- ##}
- <li><a href="javascript:changeTypeStatus(${_item.id!}, 9, '删除')">删除</a></li>
- </ul>
- </div>
- </td>
- </tr>
- ##}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <script>
- function changeTypeStatus(id, status, msg){
-
- if(confirm("确定要" + msg + "该记录吗?")){
- $.post("/admin/bottle/changeTypeStatus",{id:id,status:status},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- </script>
- ##}
|