1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- @extends('admin.public.base')
- @section('body_class')
- style="margin: 0 auto;width: 96%;padding: 30px 0px;"
- @endsection
- @section('content')
- @if(check_auth('admin/coupon_active_coupon/add'))
- <div class="page-header">
- <a href="{{url('admin/coupon_active_coupon/add?'.http_build_query(['active_id'=>request('active_id',0)]))}}" class="btn btn-primary">新增</a>
- </div>
- @endif
- <form action="" method="get" class="form-horizontal form-line">
- <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
- <select name="active_id" required="required" class="form-control" >
- <option value="0" > 选择活动 </option>
- @foreach ($activeList as $value)
- <option value="{{$value['id']}}" @if( request('active_id',0) == $value['id'] ) selected @endif>{{$value['name']}}</option>
- @endforeach
- </select>
- </div>
- <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
- <input type="text" class="form-control" name="coupon_code" value="{{request('coupon_code','')}}" placeholder="请输入优惠券编码查询" />
- </div>
- <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
- <a href="{{url('admin/coupon_active_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>配置ID</th>
- <th>优惠券名称</th>
- <th>所属活动</th>
- <th>状态</th>
- <th>修改时间</th>
- <th>操作</th>
- </tr>
- </thead>
-
- <tbody>
- @foreach ($list as $a)
- <tr>
- <th>{{$a['id']}}</th>
- <td>{{$a['coupon_name']}}</td>
- <td>
- @foreach ($activeList as $value)
- @if( $a['active_id'] == $value['id'] ) {{$value['name']}} @endif
- @endforeach
- </td>
- <td>{{$a['status']?'停用':'启用'}}</td>
- <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
- <td>
- @if(check_auth('admin/coupon_active_coupon/set_status'))
- @if($a['status'])
- <a data-url="{{url('admin/coupon_active_coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
- @else
- <a data-url="{{url('admin/coupon_active_coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</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
|