123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- @extends('admin.public.base')
- @section('body_class')
- style="margin: 0 auto;width: 96%;padding: 30px 0px;"
- @endsection
- @section('content')
- <div class="page-header">
- @if( check_auth('admin/coupon/add') )
- <a href="{{url('admin/coupon/add')}}" class="btn btn-primary">新增</a>
- @endif
- </div>
- <form action="" method="get" class="form-horizontal form-line">
- <div class="form-group col col-md-1" style="margin-right: 2px;">
- <input type="text" class="form-control" name="coupon_code" value="{{request('coupon_code','')}}" placeholder="请输入优惠券编码查询" />
- </div>
- <div class="form-group col col-md-1" style="margin-right: 2px;">
- <input type="text" class="form-control" name="coupon_name" value="{{request('coupon_name','')}}" placeholder="请输入优惠券名称查询" />
- </div>
- <div class="form-group col col-md-1" 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="2" @if (request('status') === '2' ) selected="selected" @endif >停用</option>
- <option value="3" @if (request('status') === '3' ) selected="selected" @endif >结束</option>
- <option value="4" @if (request('status') === '4' ) selected="selected" @endif >作废</option>
- </select>
- </div>
- <div class="form-group col col-md-1" style="margin-right: 2px;">
- <select name="rebate_type" class="form-control">
- <option value="0" >优惠券类型</option>
- <option value="1" @if (request('rebate_type') == '1' ) selected="selected" @endif >满减</option>
- <option value="2" @if (request('rebate_type') == '2' ) selected="selected" @endif >折扣</option>
- <option value="3" @if (request('rebate_type') == '3' ) selected="selected" @endif >赠品</option>
- </select>
- </div>
- <div class="form-group col col-md-1" style="margin-right: 2px;">
- <input type="text" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入开始时间查询" />
- </div>
- <div class="form-group col col-md-1" style="margin-right: 2px;">
- <input type="text" class="form-control" name="end_time" value="{{request('end_time','')}}" placeholder="请输入结束时间查询" />
- </div>
- <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
- <a href="{{url('admin/coupon/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>
- <th>发放时间</th>
- <th>修改时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($list as $a)
- <tr>
- <td> {{$a['coupon_code']}}</td>
- <td> {{$a['name']}}</td>
- <td>
- @if ($a['rebate_type'] == 1) 满减券 @endif
- @if ($a['rebate_type'] == 2) 折扣券 @endif
- @if ($a['rebate_type'] == 3) 赠品券 @endif
- </td>
- <td>
- 满 {{$a['std_pay']}} 元
- @if ($a['rebate_type'] == 1)
- 减 {{$a['rebate']}} 元
- @endif
- @if ($a['rebate_type'] == 2)
- 打 {{$a['rebate']}} 折
- @endif
- @if ($a['rebate_type'] == 3)
- 赠送 {{$a['rebate']}}
- @endif
- </td>
- <td> {{$a['custom_total']}}/{{$a['issue_total']}}</td>
- <td> {{$a['city_ids']}}</td>
- <td>
- @if ( $a['type_id'] == 1 )
- <a href="{{url('admin/coupon_product/index?'.http_build_query(['coupon_code'=>$a['coupon_code']]))}}">指定商品</a>
- @elseif ( $a['type_id'] == 3 )
- <a href="{{url('admin/coupon_product_exclude/index?'.http_build_query(['coupon_code'=>$a['coupon_code']]))}}">排除商品</a>
- @else
- 全部商品
- @endif
- </td>
- <td> {{$a['gant_name']}} </td>
- <td>
- @if ($a['status'] == 0)
- @if ( $a['start_time'] > time() )
- 待开始
- @else
- 进行中
- @endif
- @endif
- @if ($a['status'] == 2) 停用 @endif
- @if ($a['status'] == 3) 结束 @endif
- @if ($a['status'] == 4) 作废 @endif
- </td>
- <td> {{date('Y/m/d H:i',$a['start_time'])}} ~ {{date('Y/m/d H:i:s',$a['end_time'])}}</td>
- <td> {{date('Y/m/d H:i',$a['update_time'])}}</td>
- <td>
- @if( check_auth('admin/custom_coupon/add') )
- <a href="{{url('admin/custom_coupon/add?'.http_build_query(['coupon_code'=>$a['coupon_code']]))}}" class="btn btn-primary btn-sm ">发放优惠券</a>
- @endif
- @if( check_auth('admin/coupon/edit') )
- <a class="btn btn-sm btn-warning" href="{{url('admin/coupon/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
- 编辑
- </a>
- @endif
- @if( check_auth('admin/custom_coupon/index') )
- <a class="btn btn-sm btn-primary" href="{{url('admin/custom_coupon/index?'.http_build_query(['coupon_code'=>$a['coupon_code']]))}}" title="领用记录">
- 发放记录
- </a>
- @endif
- @if( check_auth('admin/coupon/set_status') )
- @if ( $a['status'] == 2)
- <a class="delete btn btn-sm btn-success" data-url="{{url('admin/coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
- 启用
- </a>
- @endif
- @if( $a['status'] == 0)
- <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'2']))}}">
- 停用
- </a>
- @endif
- @if ( $a['status'] < 3 )
- <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'4']))}}">
- 作废
- </a>
- @endif
- @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
|