index.blade.php 5.1 KB

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