index.blade.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. <div class="page-header">
  7. @if( check_auth('admin/custom_redpacket/add') )
  8. <!-- <a href="{{url('admin/custom_redpacket/add')}}" class="btn btn-primary">新增</a> -->
  9. @endif
  10. </div>
  11. <form action="" method="get" class="form-horizontal form-line">
  12. <div class="form-group col col-md-1" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="redpacket_name" value="{{request('redpacket_name','')}}" placeholder="请输入活动名称查询" />
  14. </div>
  15. <div class="form-group col col-md-1" style="margin-right: 2px;">
  16. <input type="text" class="form-control" name="custom_code" value="{{request('custom_code','')}}" placeholder="请输入客户编码查询" />
  17. </div>
  18. <div class="form-group col col-md-1" style="margin-right: 2px;">
  19. <select name="status" class="form-control">
  20. <option value="" >领取状态</option>
  21. <option value="0" @if (request('status') === '0' ) selected="selected" @endif >待领取</option>
  22. <option value="1" @if (request('status') === '1' ) selected="selected" @endif >已领取</option>
  23. <option value="2" @if (request('status') === '2' ) selected="selected" @endif >暂停</option>
  24. <option value="3" @if (request('status') === '3' ) selected="selected" @endif >过期</option>
  25. <option value="4" @if (request('status') === '4' ) selected="selected" @endif >作废</option>
  26. </select>
  27. </div>
  28. <div class="form-group col col-md-1" style="margin-right: 2px;">
  29. <input type="text" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入开始时间查询" />
  30. </div>
  31. <div class="form-group col col-md-1" style="margin-right: 2px;">
  32. <input type="text" class="form-control" name="end_time" value="{{request('end_time','')}}" placeholder="请输入结束时间查询" />
  33. </div>
  34. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  35. <a href="{{url('admin/custom_redpacket/index')}}" class="btn btn-sm btn-default" >重置</a>
  36. </form>
  37. <div class="row">
  38. <div class="col-xs-12">
  39. <div class="table-responsive">
  40. <table class="table table-striped table-bordered table-hover">
  41. <thead>
  42. <tr>
  43. <th>活动ID</th>
  44. <th>活动名称</th>
  45. <th>客户编码</th>
  46. <th>客户名称</th>
  47. <th>红包金额</th>
  48. <th>领取状态</th>
  49. <th>领取时间</th>
  50. <th>操作人员</th>
  51. <th>修改时间</th>
  52. <th>操作</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. @foreach ($list as $a)
  57. <tr>
  58. <td> {{$a['redpacket_id']}}</td>
  59. <td> {{$a['redpacket_name']}}</td>
  60. <td> {{$a['custom_code']}}</td>
  61. <td> {{$a['custom_name']}}</td>
  62. <td> {{$a['money']}}</td>
  63. <td>
  64. @if ($a['status'] == 0) 待领取 @endif
  65. @if ($a['status'] == 1) 已领取 @endif
  66. @if ($a['status'] == 2) 暂停 @endif
  67. @if ($a['status'] == 3) 过期 @endif
  68. @if ($a['status'] == 4) 作废 @endif
  69. </td>
  70. <td>{{date('Y/m/d H:i:s',$a['start_time'])}} ~ {{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  71. <td>{{$a['admin_name']}}</td>
  72. <td>{{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  73. <td>
  74. @if( check_auth('admin/custom_redpacket/set_status') )
  75. @if ( $a['status'] == 4 )
  76. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/custom_redpacket/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  77. 恢复
  78. </a>
  79. @endif
  80. @if ( $a['status'] == 0 )
  81. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/custom_redpacket/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'4']))}}">
  82. 作废
  83. </a>
  84. @endif
  85. @endif
  86. </td>
  87. </tr>
  88. @endforeach
  89. <tr>
  90. <td colspan="20" class="page">{{$list->render()}}</td>
  91. </tr>
  92. <tr>
  93. <td colspan="20">总计 {{$list->total()}} 个记录</td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. </div>
  98. </div>
  99. </div>
  100. @endsection