12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- ##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/freight/add')">+添加运费模板</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>首重500g运费</th>
- <th>续重500g运费</th>
- <th>状态</th>
- <th>添加时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- ##if(results!=null && results.list.~size!=0){
- ##for(_item in results.list!){
- <tr>
- <td>
- ##if(_item.area_name!=null && _item.area_name!=""){
- ${_item.area_name!}
- ##}else{
- 默认运费
- ##}
- </td>
- <td>${_item.price!}</td>
- <td>${_item.price_ext!}</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/freight/edit?id=${_item.id!}')">编辑</a></li>
- ##if(_item.area_name!=null && _item.area_name!=""){
- ##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/freight/changeStatus",{id:id,status:status},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- </script>
- ##}
|