1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- @extends('admin.public.base')
- @section('body_class')
- style="margin: 0 auto;width: 96%;padding: 30px 0px;"
- @endsection
- @section('content')
- @if(check_auth('admin/lottery_score/add'))
- <div class="page-header">
- <a href="{{url('admin/lottery_score/add')}}" 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;">
- <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入活动名称查询" />
- </div>
- <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
- <a href="{{url('admin/lottery_score/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>
- <th>操作</th>
- </tr>
- </thead>
-
- <tbody>
- @foreach ($list as $a)
- <tr>
- <th>{{$a['id']}}</th>
- <td>{{$a['name']}}</td>
- <td>{{date('Y/m/d H:i:s',$a['start_time'])}}</td>
- <td>{{date('Y/m/d H:i:s',$a['end_time'])}}</td>
- <td>
- @if( $a['status'] )
- 停用
- @else
- @if( $a['start_time'] <= time() && $a['end_time'] <= time() )
- 已结束
- @endif
- @if( $a['start_time'] <= time() && $a['end_time'] > time() )
- 进行中
- @endif
- @if( $a['start_time'] > time() )
- 待进行
- @endif
- @endif
- </td>
- <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
- <td>
- @if(check_auth('admin/lottery_score_reward/index'))
- <a href="{{url('admin/lottery_score_reward/index?'.http_build_query(['lottery_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >奖品配置</a>
- @endif
- @if(check_auth('admin/lottery_score_record/index'))
- <a href="{{url('admin/lottery_score_record/index?'.http_build_query(['lottery_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >中奖记录</a>
- @endif
- @if(check_auth('admin/lottery_score/edit'))
- <a href="{{url('admin/lottery_score/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
- @endif
- @if(check_auth('admin/lottery_score/set_status'))
- @if($a['status'])
- <a data-url="{{url('admin/lottery_score/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/lottery_score/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
|