index.blade.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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/coupon_reward_rule/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/coupon_reward_rule/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/coupon_reward_rule/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. <th>配置状态</th>
  32. <th>修改时间</th>
  33. <th>操作</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. @foreach ($list as $a)
  38. <tr>
  39. <th>{{$a['id']}}</th>
  40. <td>{{$a['name']}}</td>
  41. <td>{{$a['std_num']}}</td>
  42. <td> {{date('Y/m/d H:i:s',$a['start_time'])}}</td>
  43. <td> {{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  44. <td>{{$a['coupon_name']}}</td>
  45. <td>{{$a['business_name']}}</td>
  46. <td>{{$a['status']?'停用':'启用'}}</td>
  47. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  48. <td>
  49. @if(check_auth('admin/coupon_reward_product/index'))
  50. <a href="{{url('admin/coupon_reward_product/index?'.http_build_query(['reward_rule_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >商品范围</a>
  51. @endif
  52. @if(check_auth('admin/coupon_reward_rule/edit'))
  53. <a href="{{url('admin/coupon_reward_rule/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  54. @endif
  55. @if(check_auth('admin/coupon_reward_rule/set_status'))
  56. @if($a['status'])
  57. <a data-url="{{url('admin/coupon_reward_rule/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  58. @else
  59. <a data-url="{{url('admin/coupon_reward_rule/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  60. @endif
  61. @endif
  62. </td>
  63. </tr>
  64. @endforeach
  65. <tr>
  66. <td colspan="20" class="page">{{$list->render()}}</td>
  67. </tr>
  68. <tr>
  69. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </div>
  74. </div>
  75. </div>
  76. @endsection