index.blade.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. @if(check_auth('admin/lottery_score/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/lottery_score/add')}}" class="btn btn-primary">新增</a>
  9. </div>
  10. @endif
  11. <form action="" method="get" class="form-horizontal form-line">
  12. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入活动名称查询" />
  14. </div>
  15. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  16. <a href="{{url('admin/lottery_score/index')}}" class="btn btn-sm btn-default" >重置</a>
  17. </form>
  18. <div class="row">
  19. <div class="col-xs-12">
  20. <div class="table-responsive">
  21. <table class="table table-striped table-bordered table-hover">
  22. <thead>
  23. <tr>
  24. <th>活动ID</th>
  25. <th>活动名称</th>
  26. <th>开始时间</th>
  27. <th>结束时间</th>
  28. <th>活动状态</th>
  29. <th>修改时间</th>
  30. <th>操作</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. @foreach ($list as $a)
  35. <tr>
  36. <th>{{$a['id']}}</th>
  37. <td>{{$a['name']}}</td>
  38. <td>{{date('Y/m/d H:i:s',$a['start_time'])}}</td>
  39. <td>{{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  40. <td>
  41. @if( $a['status'] )
  42. 停用
  43. @else
  44. @if( $a['start_time'] <= time() && $a['end_time'] <= time() )
  45. 已结束
  46. @endif
  47. @if( $a['start_time'] <= time() && $a['end_time'] > time() )
  48. 进行中
  49. @endif
  50. @if( $a['start_time'] > time() )
  51. 待进行
  52. @endif
  53. @endif
  54. </td>
  55. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  56. <td>
  57. @if(check_auth('admin/lottery_score_reward/index'))
  58. <a href="{{url('admin/lottery_score_reward/index?'.http_build_query(['lottery_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >奖品配置</a>
  59. @endif
  60. @if(check_auth('admin/lottery_score_record/index'))
  61. <a href="{{url('admin/lottery_score_record/index?'.http_build_query(['lottery_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >中奖记录</a>
  62. @endif
  63. @if(check_auth('admin/lottery_score/edit'))
  64. <a href="{{url('admin/lottery_score/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  65. @endif
  66. @if(check_auth('admin/lottery_score/set_status'))
  67. @if($a['status'])
  68. <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>
  69. @else
  70. <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>
  71. @endif
  72. @endif
  73. </td>
  74. </tr>
  75. @endforeach
  76. <tr>
  77. <td colspan="20" class="page">{{$list->render()}}</td>
  78. </tr>
  79. <tr>
  80. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  81. </tr>
  82. </tbody>
  83. </table>
  84. </div>
  85. </div>
  86. </div>
  87. @endsection