index.blade.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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" name="thisform" >
  12. <div class="form-group col col-md-1" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="name" value="{{request('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. <div class="form-group col col-xs-4 col-md-2" style="margin-right: 2px;">
  35. <button type="button" onclick="alter_from_attr({'method':'get','action':''})" class="btn btn-sm btn-primary" style="margin-right: 20px;"> 查询</button>
  36. <a href="{{url('admin/custom_redpacket/index')}}" class="btn btn-sm btn-default" style="margin-right: 20px;" >重置</a>
  37. @if( check_auth('admin/custom_redpacket/down_excel') )
  38. <button type="button" onclick="alter_from_attr({'method':'get','action':`{{url('admin/custom_redpacket/down_excel')}}`})" class="btn btn-sm btn-primary"> 下载表格</button>
  39. @endif
  40. </div>
  41. </form>
  42. <div class="row">
  43. <div class="col-xs-12">
  44. <div class="table-responsive">
  45. <table class="table table-striped table-bordered table-hover">
  46. <thead>
  47. <tr>
  48. <th>活动ID</th>
  49. <th>活动名称</th>
  50. <th>客户编码</th>
  51. <th>客户名称</th>
  52. <th>红包金额</th>
  53. <th>领取状态</th>
  54. <th>领取时间</th>
  55. <th>操作人员</th>
  56. <th>修改时间</th>
  57. <th>操作</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. @foreach ($list as $a)
  62. <tr>
  63. <td> {{$a['redpacket_id']}}</td>
  64. <td> {{$a['redpacket_name']}}</td>
  65. <td> {{$a['custom_code']}}</td>
  66. <td> {{$a['custom_name']}}</td>
  67. <td> {{$a['money']}}</td>
  68. <td>
  69. @if ($a['status'] == 0) 待领取 @endif
  70. @if ($a['status'] == 1) 已领取 @endif
  71. @if ($a['status'] == 2) 暂停 @endif
  72. @if ($a['status'] == 3) 过期 @endif
  73. @if ($a['status'] == 4) 作废 @endif
  74. </td>
  75. <td>{{date('Y/m/d H:i:s',$a['start_time'])}} ~ {{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  76. <td>{{$a['admin_name']}}</td>
  77. <td>{{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  78. <td>
  79. @if( check_auth('admin/custom_redpacket/set_status') )
  80. @if ( $a['status'] == 4 )
  81. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/custom_redpacket/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  82. 恢复
  83. </a>
  84. @endif
  85. @if ( $a['status'] == 0 )
  86. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/custom_redpacket/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'4']))}}">
  87. 作废
  88. </a>
  89. @endif
  90. @endif
  91. </td>
  92. </tr>
  93. @endforeach
  94. <tr>
  95. <td colspan="20" class="page">{{$list->render()}}</td>
  96. </tr>
  97. <tr>
  98. <td colspan="20">总计 {{$list->total()}} 个记录</td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. </div>
  103. </div>
  104. </div>
  105. @endsection