147 lines
9.4 KiB
HTML
Executable File
147 lines
9.4 KiB
HTML
Executable File
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1>
|
|
产品管理
|
|
<small>产品回收站</small>
|
|
</h1>
|
|
<ol class="breadcrumb">
|
|
<li><a href="<?php echo url('/admin');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
|
<li><a href="<?php echo url('/admin/product/lists');?>"> 产品</a></li>
|
|
<li class="active"> 产品回收站</li>
|
|
</ol>
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">产品回收站</h3>
|
|
<div class="box-tools pull-right">
|
|
<div class="input-group input-group-sm">
|
|
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="<?php echo $search['skeyword'];?>">
|
|
<div class="input-group-btn">
|
|
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-tools -->
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body no-padding">
|
|
<?php if(!empty($list)):?>
|
|
<div class="table-responsive lists-table">
|
|
<table class="table table-hover table-bordered">
|
|
<tbody>
|
|
<tr>
|
|
<th width="35rem"> </th>
|
|
<th width="60rem" class="text-center">图片</th>
|
|
<th width="60rem" class="text-center">ID</th>
|
|
<th>产品名称</th>
|
|
<th width="75rem" class="text-center">货号</th>
|
|
<th class="text-center">分类</th>
|
|
<th width="75rem" class="text-center">产品排序</th>
|
|
<th width="45rem" class="text-center">新品</th>
|
|
<th width="45rem" class="text-center">热门</th>
|
|
<th width="45rem" class="text-center">爆款</th>
|
|
<th width="75rem" class="text-center">添加时间</th>
|
|
<th width="60rem" class="text-center">状态</th>
|
|
<th width="45rem" class="text-center">在售</th>
|
|
<th width="75rem" class="text-center">库存数量</th>
|
|
<th width="135rem" class="text-center">操作</th>
|
|
</tr>
|
|
<?php foreach($list as $k=>$product):?>
|
|
<tr>
|
|
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $product['id'];?>"></td>
|
|
<td><img src="<?php echo getImage($product['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $product['picture'];?>" data-toggle="preview-image"></td>
|
|
<td class="text-center"><?php echo $product['id'];?></td>
|
|
<td class="text-left">
|
|
<?php echo $product['name'];?>
|
|
</td>
|
|
<td class="text-center"><?php echo $product['item_number'];?></td>
|
|
<td class="text-center">
|
|
<?php echo $product['categoryname'];?>
|
|
</td>
|
|
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $product['sort'];?>" type="text" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/updatesort');?>" data-cod="sort"></td>
|
|
<td class="text-center">
|
|
<span class="fa <?php if($product['isnew']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/toggleisnew');?>" data-cod="state"></span>
|
|
</td>
|
|
<td class="text-center">
|
|
<span class="fa <?php if($product['ishot']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/toggleishot');?>" data-cod="state"></span>
|
|
</td>
|
|
<td class="text-center">
|
|
<span class="fa <?php if($product['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/togglerecommend');?>" data-cod="state"></span>
|
|
</td>
|
|
<td class="text-center"><?php echo date('Y-m-d',$product['createtime']);;?></td>
|
|
<td class="text-center"><?php echo array_switch(array('-2' => '<span class="label label-warning">已删除</span>','-1' => '<span class="label label-danger">删除</span>', '0' => '<span class="label label-success">启用</span>', '1' => '<span class="label label-info">已审核</span>'),$product['stat']);?></td>
|
|
<td class="text-center">
|
|
<span class="fa <?php if($product['is_onsale']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/toggleonsale');?>" data-cod="state"></span>
|
|
</td>
|
|
<td class="text-center"><?php echo $product['stock_quantity'];?></td>
|
|
<td>
|
|
<a class="btn btn-xs btn-info" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/destroy');?>" data-cod="dowarn">删除</a>
|
|
<a class="btn btn-xs btn-info" data-id="<?php echo $product['id'];?>" data-url="<?php echo url('/admin/product/recovery');?>" data-cod="dowarn">恢复</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach;?>
|
|
</tbody>
|
|
</table>
|
|
<!-- /.table -->
|
|
</div>
|
|
<?php endif;?>
|
|
<!-- /.lists-table -->
|
|
</div>
|
|
<!-- /.box-body -->
|
|
<div class="box-footer no-padding">
|
|
<div class="mailbox-controls row">
|
|
<div class="col-sm-3">
|
|
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/product/destroys');?>" data-cod="batch">删除</button>
|
|
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/product/recommends');?>" data-cod="batch">爆款</button>
|
|
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/product/recoverys');?>" data-cod="batch">恢复</button>
|
|
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
|
</div>
|
|
<!-- /.btn-group -->
|
|
<a href="<?php echo url('/admin/product/add');?>" class="btn btn-default btn-sm">添加</a>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="form-inline input-group">
|
|
<span class="input-group-addon">分类</span>
|
|
<select name="cid" id="move_cid" class="form-control input-sm">
|
|
<option value="0">默认值</option>
|
|
<?php echo $categoryOptions;?>
|
|
</select>
|
|
<span class="input-group-btn">
|
|
<button type="button" class="btn btn-info btn-sm" data-url="<?php echo url('/admin/product/movecategory');?>" data-cod="move">移动</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="pull-right">
|
|
<?php if($page):?>
|
|
<?php echo $page;?>
|
|
<?php endif;?>
|
|
</div>
|
|
<!-- /.pull-right -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box --
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<style>
|
|
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
|
|
vertical-align: middle;
|
|
}
|
|
</style>
|
|
<!-- Page Script -->
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
|
|
});
|
|
</script> |