index.blade.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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/promo/add') )
  8. <a href="{{url('admin/promo/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-2" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="promo_code" value="{{request('promo_code','')}}" placeholder="请输入活动编码查询" />
  14. </div>
  15. <div class="form-group col col-md-2" style="margin-right: 2px;">
  16. <input type="text" class="form-control" name="promo_name" value="{{request('promo_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="3" @if (request('status') === '3' ) selected="selected" @endif >结束</option>
  24. <option value="4" @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. <th>操作</th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. @foreach ($list as $a)
  66. <tr>
  67. <td> {{$a['promo_code']}}</td>
  68. <td> {{$a['name']}}</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. 满 {{$a['std_pay']}} 元
  76. @if ($a['rebate_type'] == 1)
  77. 减 {{$a['rebate']}} 元
  78. @endif
  79. @if ($a['rebate_type'] == 2)
  80. 打 {{$a['rebate']}} 折
  81. @endif
  82. @if ($a['rebate_type'] == 3)
  83. 赠送 {{$a['rebate']}}
  84. @endif
  85. </td>
  86. <td> {{$a['city_ids']}}</td>
  87. <td> {{$a['tag_scope']}}</td>
  88. <td>
  89. @if ( $a['type_id'] == 1 )
  90. <a href="{{url('admin/promo_product/index?'.http_build_query(['promo_code'=>$a['promo_code']]))}}">指定商品</a>
  91. @else
  92. 全部商品
  93. @endif
  94. </td>
  95. <td>
  96. @if ($a['status'] == 0)
  97. @if ( $a['start_time'] > time() )
  98. 待开始
  99. @else
  100. 进行中
  101. @endif
  102. @endif
  103. @if ($a['status'] == 2) 停用 @endif
  104. @if ($a['status'] == 3) 结束 @endif
  105. @if ($a['status'] == 4) 作废 @endif
  106. </td>
  107. <td> {{date('Y/m/d H:i',$a['start_time'])}} ~ {{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  108. <td> {{date('Y/m/d H:i',$a['update_time'])}}</td>
  109. <td>
  110. @if( check_auth('admin/promo/edit') )
  111. <a class="btn btn-sm btn-warning" href="{{url('admin/promo/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
  112. 编辑
  113. </a>
  114. @endif
  115. @if( check_auth('admin/promo/set_status') )
  116. @if ( $a['status'] == 2)
  117. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/promo/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  118. 启用
  119. </a>
  120. @endif
  121. @if( $a['status'] == 0)
  122. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/promo/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'2']))}}">
  123. 停用
  124. </a>
  125. @endif
  126. @if ( $a['status'] < 3 )
  127. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/promo/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'4']))}}">
  128. 作废
  129. </a>
  130. @endif
  131. @endif
  132. </td>
  133. </tr>
  134. @endforeach
  135. <tr>
  136. <td colspan="20" class="page">{{$list->render()}}</td>
  137. </tr>
  138. <tr>
  139. <td colspan="20">总计 {{$list->total()}} 个活动</td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. </div>
  144. </div>
  145. </div>
  146. @endsection