index.blade.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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_coupon/add') )
  8. <!-- <a href="{{url('admin/custom_coupon/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="coupon_code" value="{{request('coupon_code','')}}" 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. <select name="rebate_type" class="form-control">
  30. <option value="0" >优惠券类型</option>
  31. <option value="1" @if (request('rebate_type') == '1' ) selected="selected" @endif >满减</option>
  32. <option value="2" @if (request('rebate_type') == '2' ) selected="selected" @endif >折扣</option>
  33. <option value="3" @if (request('rebate_type') == '3' ) selected="selected" @endif >赠品</option>
  34. </select>
  35. </div>
  36. <div class="form-group col col-md-1" style="margin-right: 2px;">
  37. <input type="text" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入开始时间查询" />
  38. </div>
  39. <div class="form-group col col-md-1" style="margin-right: 2px;">
  40. <input type="text" class="form-control" name="end_time" value="{{request('end_time','')}}" placeholder="请输入结束时间查询" />
  41. </div>
  42. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  43. <a href="{{url('admin/custom_coupon/index')}}" class="btn btn-sm btn-default" >重置</a>
  44. </form>
  45. <div class="row">
  46. <div class="col-xs-12">
  47. <div class="table-responsive">
  48. <table class="table table-striped table-bordered table-hover">
  49. <thead>
  50. <tr>
  51. <th>优惠券编码</th>
  52. <th>优惠券名称</th>
  53. <th>店铺名称</th>
  54. <th>客户编码</th>
  55. <th>客户名称</th>
  56. <th>商品范围</th>
  57. <th>优惠券类型</th>
  58. <th>优惠券状态</th>
  59. <th>领取时间</th>
  60. <th>有效期限</th>
  61. <th>使用时间</th>
  62. <th>操作人员</th>
  63. <th>操作</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. @foreach ($list as $a)
  68. <tr>
  69. <td> {{$a['coupon_code']}}</td>
  70. <td> {{$a['coupon_name']}}</td>
  71. <td> {{$a['business_name']}}</td>
  72. <td> {{$a['custom_code']}}</td>
  73. <td> {{$a['custom_name']}}</td>
  74. <td>
  75. @if ( $a['type_id'] == 1 )
  76. <a href="{{url('admin/coupon_product/index?'.http_build_query(['coupon_code'=>$a['coupon_code']]))}}">指定商品</a>
  77. @else
  78. 全部商品
  79. @endif
  80. </td>
  81. <td>
  82. @if ($a['rebate_type'] == 1) 满减券 @endif
  83. @if ($a['rebate_type'] == 2) 折扣券 @endif
  84. @if ($a['rebate_type'] == 3) 赠品券 @endif
  85. </td>
  86. <td>
  87. @if ($a['status'] == 0) 正常 @endif
  88. @if ($a['status'] == 1) 已用 @endif
  89. @if ($a['status'] == 2) 暂停 @endif
  90. @if ($a['status'] == 3) 过期 @endif
  91. @if ($a['status'] == 4) 作废 @endif
  92. </td>
  93. <td> {{date('Y/m/d H:i:s',$a['insert_time'])}}</td>
  94. <td> {{date('Y/m/d H:i:s',$a['exp_time'])}}</td>
  95. <td>
  96. @if ($a['status'] == 1)
  97. {{date('Y/m/d H:i:s',$a['update_time'])}}
  98. @endif
  99. </td>
  100. <td> {{$a['admin_name']}}</td>
  101. <td>
  102. @if( check_auth('admin/custom_coupon/set_status') )
  103. @if ( $a['status'] == 4 )
  104. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/custom_coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  105. 恢复
  106. </a>
  107. @endif
  108. @if ( $a['status'] == 0 )
  109. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/custom_coupon/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'4']))}}">
  110. 作废
  111. </a>
  112. @endif
  113. @endif
  114. </td>
  115. </tr>
  116. @endforeach
  117. <tr>
  118. <td colspan="20" class="page">{{$list->render()}}</td>
  119. </tr>
  120. <tr>
  121. <td colspan="20">总计 {{$list->total()}} 个记录</td>
  122. </tr>
  123. </tbody>
  124. </table>
  125. </div>
  126. </div>
  127. </div>
  128. @endsection