voucherlist.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <a href="{:U('Voucher/add')}" class="btn btn-primary">新增优惠券</a>
  5. </div>
  6. <div class="row">
  7. <div class="col-xs-12">
  8. <div class="table-responsive">
  9. <table class="table table-striped table-bordered table-hover">
  10. <thead>
  11. <tr>
  12. <th>编号</th>
  13. <th>优惠券名称</th>
  14. <th>优惠券金额</th>
  15. <th>订单满多少可用</th>
  16. <th>是否领取</th>
  17. <th>使用时间</th>
  18. <th>状态</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <volist name="list" id="data" empty="$empty">
  23. <tr>
  24. <td>{$data.id}</td>
  25. <td>{$data.voucher_title}</td>
  26. <td>{$data.credit}</td>
  27. <td>{$data.limit_money}</td>
  28. <td>
  29. <?php if($data['user_id'] >0) {
  30. $mb_info = M('member')->where( array('member_id' => $data['user_id']) )->find();
  31. ?>
  32. <span class="red bold">已领取(<?php echo $mb_info['name']; ?>)</span>
  33. <?php }else{ ?>
  34. <span class="green bold">未领取</span>
  35. <?php } ?>
  36. </td>
  37. <td>
  38. 开始时间:<?php echo date('Y-m-d H:i:s',$voucher_info['begin_time']); ?>
  39. <br/>
  40. 结束时间:<?php echo date('Y-m-d H:i:s', $voucher_info['end_time']); ?>
  41. </td>
  42. <td>
  43. <?php if($data['consume'] == 'Y') {
  44. echo '<span class="red">已使用</span>';
  45. } else {
  46. echo '<span class="blue">未使用</span>';
  47. }
  48. ?>
  49. </tr>
  50. </volist>
  51. <tr>
  52. <td colspan="5" class="page">{$page}</td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. </div>
  57. </div>
  58. </div>
  59. </block>