index.blade.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_order_product/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/lottery_order_product/add?'.http_build_query(['lottery_id'=>request('lottery_id',0)]))}}" 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. <select name="lottery_id" required="required" class="form-control" >
  14. <option value="0" > 选择活动 </option>
  15. @foreach ($lotteryList as $value)
  16. <option value="{{$value['id']}}" @if( request('lottery_id',0) == $value['id'] ) selected @endif>{{$value['name']}}</option>
  17. @endforeach
  18. </select>
  19. </div>
  20. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  21. <input type="text" class="form-control" name="product_code" value="{{request('product_code','')}}" placeholder="请输入产品编码查询" />
  22. </div>
  23. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  24. <a href="{{url('admin/lottery_order_product/index')}}" class="btn btn-sm btn-default" >重置</a>
  25. </form>
  26. <div class="row">
  27. <div class="col-xs-12">
  28. <div class="table-responsive">
  29. <table class="table table-striped table-bordered table-hover">
  30. <thead>
  31. <tr>
  32. <th>范围ID</th>
  33. <th>商品编码</th>
  34. <th>商品名称</th>
  35. <th>所属活动</th>
  36. <th>状态</th>
  37. <th>修改时间</th>
  38. <th>操作</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach ($list as $a)
  43. <tr>
  44. <th>{{$a['id']}}</th>
  45. <td>{{$a['product_code']}}</td>
  46. <td>{{$a['product_name']}}</td>
  47. <td>{{$a['lottery_name']}}</td>
  48. <td>{{$a['status']?'停用':'启用'}}</td>
  49. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  50. <td>
  51. @if(check_auth('admin/lottery_order_product/edit'))
  52. <a href="{{url('admin/lottery_order_product/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  53. @endif
  54. @if(check_auth('admin/lottery_order_product/set_status'))
  55. @if($a['status'])
  56. <a data-url="{{url('admin/lottery_order_product/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  57. @else
  58. <a data-url="{{url('admin/lottery_order_product/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  59. @endif
  60. @endif
  61. </td>
  62. </tr>
  63. @endforeach
  64. <tr>
  65. <td colspan="20" class="page">{{$list->render()}}</td>
  66. </tr>
  67. <tr>
  68. <td colspan="20">总计 {{$list->total()}} 个商品</td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. @endsection