index.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 search-row">
  8. <div class="panel-body">
  9. <ul class="nav nav-tabs">
  10. <li <?php if($type == 0){ ?>class="active" <?php } ?>><a href="{:U('Voucher/index')}">平台券管理</a></li>
  11. <li <?php if($type == 1){ ?>class="active" <?php } ?>><a href="{:U('Voucher/free_config')}">免单券配置</a></li>
  12. </ul>
  13. </div>
  14. </div>
  15. <div class="col-xs-12">
  16. <div class="table-responsive">
  17. <table class="table table-striped table-bordered table-hover">
  18. <thead>
  19. <tr>
  20. <th>编号</th>
  21. <th>优惠券名称</th>
  22. <th>优惠券金额</th>
  23. <th>订单满多少可用</th>
  24. <th>总生成张数</th>
  25. <th>已发送张数</th>
  26. <th>状态</th>
  27. <th>使用时间</th>
  28. <th>操作</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <volist name="list" id="data" empty="$empty">
  33. <tr>
  34. <td>{$data.id}</td>
  35. <td>{$data.voucher_title}</td>
  36. <td>{$data.credit}</td>
  37. <td>{$data.limit_money}</td>
  38. <td>{$data.total_count}</td>
  39. <td>{$data.send_count}</td>
  40. <td>
  41. <?php
  42. if($data['total_count'] > $data['send_count']){
  43. echo '<span class="green bold">剩余'.($data['total_count'] - $data['send_count']).'张</font>';
  44. }else {
  45. echo '<span class="red bold">已发完</font>';
  46. }
  47. ?>
  48. </td>
  49. <td>
  50. 开始时间:<?php echo date('Y-m-d H:i:s',$data['begin_time']); ?>
  51. <br/>
  52. 结束时间:<?php echo date('Y-m-d H:i:s', $data['end_time']); ?>
  53. </td>
  54. <td>
  55. <a class="btn btn-xs btn-info" href='{:U("Voucher/voucherlist",array("id"=>$data["id"]))}'>
  56. 查看所有券
  57. </a>
  58. <a class="btn btn-xs btn-info" href='{:U("Voucher/membersend",array("id"=>$data["id"]))}'>
  59. 赠送优惠券
  60. </a>
  61. <a class="delete btn btn-xs btn-danger" href='{:U("Voucher/del",array("id"=>$data["id"]))}' >
  62. <i class="icon-trash bigger-120"></i>删除所有券
  63. </a>
  64. </td>
  65. </tr>
  66. </volist>
  67. <tr>
  68. <td colspan="5" class="page">{$page}</td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. </block>