123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- @extends('admin.public.base')
- @section('body_class')
- style="margin: 0 auto;width: 96%;padding: 30px 0px;"
- @endsection
- @section('content')
- <div class="page-header">
- <a href="{{url('admin/product/add')}}" class="btn btn-primary">新增</a>
- </div>
- <form action="" method="get" class="form-horizontal form-line">
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
- <input type="text" class="form-control" name="product_code" value="{{request('product_code','')}}" placeholder="请输入产品编码查询" />
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
- <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入产品名称查询" />
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
- <select name="status" class="form-control">
- <option value="" >产品状态</option>
- <option value="0" @if (request('status') === '0' ) selected="selected" @endif >已上架</option>
- <option value="1" @if (request('status') === '1' ) selected="selected" @endif >已下架</option>
- </select>
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
- <input type="date" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入创建时间查询" />
- </div>
- <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
- <a href="{{url('admin/product/index')}}" class="btn btn-sm btn-default" >重置</a>
- </form>
- <div class="row">
- <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>
- <th>产品状态</th>
- <th>生产厂家</th>
- <th>创建人</th>
- <th>创建时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($list as $a)
- <tr>
- <td> {{$a['product_code']}}</td>
- <td> {{$a['name']}}</td>
- <td> {{$a['spec']}}</td>
- <td> ¥<del>{{$a['market_price']}}</del> ¥{{$a['price']}}</td>
- <td> {{$a['stock']}} </td>
- <td> {{$a['status']?'已下架':'已上架'}} </td>
- <td> {{$a['producer_name']}}</td>
- <td> {{$a['admin_name']}}</td>
- <td> {{date('Y/m/d H:i:s',$a['insert_time'])}}</td>
- <td>
- <a class="btn btn-sm btn-warning" href="{{url('admin/product/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
- 编辑
- </a>
- @if ($a['status'])
- <a class="delete btn btn-sm btn-success" data-url="{{url('admin/product/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
- 上架
- </a>
- @else
- <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/product/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'1']))}}">
- 下架
- </a>
- @endif
- </td>
- </tr>
- @endforeach
- <tr>
- <td colspan="20" class="page">{{$list->render()}}</td>
- </tr>
- <tr>
- <td colspan="20">总计 {{$list->total()}} 个产品</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- @endsection
|