123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- ##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/add')">+添加瓶子</a>
- </div>
- </div>
- <div class="page-content">
- <div class="row" style="margin-top:10px;">
- <div class="col-xs-12">
- <div class="alert alert-block alert-success">
- <div style="float: left;">注意事项:</div>
- <div style="float: left;">
- <div>1.瓶子启用之前请确认瓶子信息准确无误,否则定制信息生成将无法修改</div>
- <div>2.瓶子启用之前请确认有水源可选,否则客户无法完成加购物车,下单等后续操作</div>
- </div>
- <div style="clear: both;"></div>
- </div>
- </div>
- <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>重量/g</th>
- <th>图片</th>
- <th>标签尺寸/mm</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- ##if(results!=null && results.list.~size!=0){
- ##for(_item in results.list!){
- <tr>
- <td>${_item.title!}</td>
- <td>
- ##for(_type in _item.type_list!){
- <div style="margin-top: 5px;">${_type.title!}:${_type.price!}元</div>
- ##}
- </td>
- <td>${_item.weight!}</td>
- <td>
- <a href="${_item.img_url!}" target="_blank"><img src="${_item.img_url!}" style="height:100px;" /></a>
- </td>
- <td>${_item.diy_width!}mm * ${_item.diy_height!}mm</td>
- <td>
- ##if(_item.status==1){
- 启用
- ##}else{
- 禁用
- ##}
- </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/edit?id=${_item.id!}')">编辑</a></li>
- <li><a href="/admin/bottle/type?id=${_item.id!}">水源管理</a></li>
- ##if(_item.status==1){
- <li><a href="javascript:changeStatus(${_item.id!}, 0, '禁用')">禁用</a></li>
- ##}else{
- <li><a href="javascript:changeStatus(${_item.id!}, 1, '启用')">启用</a></li>
- ##}
- <li><a href="javascript:changeStatus(${_item.id!}, 9, '删除')">删除</a></li>
- </ul>
- </div>
- </td>
- </tr>
- ##}
- ##}
- </tbody>
- </table>
- ##if(totalPage>1){
- <div class="fenye">
- <#_pagination page="${results!}">
- <ul id="Pagination"></ul>
- </#_pagination>
- </div>
- ##}
- </div>
- </div>
- </div>
- </div>
- <script>
- function changeStatus(id, status, msg){
-
- if(confirm("确定要" + msg + "该记录吗?")){
- $.post("/admin/bottle/changeStatus",{id:id,status:status},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- </script>
- ##}
|