list.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?php
  2. use common\services\xhMerchantService;
  3. use common\services\xhActiveTicketClassService;
  4. use common\components\stringUtil;
  5. ?>
  6. <div class="page-title">
  7. <div class="title-env">
  8. <h1 class="title">我的邀请码</h1>
  9. </div>
  10. <div class="breadcrumb-env">
  11. <ol class="breadcrumb bc-1">
  12. <li>
  13. <a href="/"><i class="fa-home"></i>Home</a>
  14. </li>
  15. <li>
  16. <a href="javascript:void(0)">营销管理</a>
  17. </li>
  18. <li class="active">
  19. <strong>我的邀请码</strong>
  20. </li>
  21. </ol>
  22. </div>
  23. </div>
  24. <div class="panel panel-default">
  25. <div class="panel-body">
  26. <div class="dataTables_wrapper form-inline dt-bootstrap no-footer">
  27. <div class="row">
  28. <form action="" method="GET">
  29. <div class="col-xs-6" style="width:90%;">
  30. <div class="dataTables_length">
  31. <a href="javascript:void(0)" name="generateCode" class="btn btn-secondary btn-single" style="margin-right:15px;">生成邀请码</a>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. <div class="table-responsive">
  37. <table class="table table-bordered table-striped table-hover">
  38. <thead>
  39. <tr class="active">
  40. <th class="no-sorting hidden-xs"><input type="checkbox"></th>
  41. <th class="hidden-xs">编号</th>
  42. <th>邀请码</th>
  43. <th class="hidden-xs">优惠</th>
  44. <th class="hidden-xs">过期时间</th>
  45. <th>领取状态</th>
  46. <th class="hidden-xs">受邀花店</th>
  47. <th class="hidden-xs">店长</th>
  48. <th class="hidden-xs">操作</th>
  49. </tr>
  50. </thead>
  51. <tbody class="middle-align">
  52. <?php if(!empty($models)){ foreach($models as $key => $val){ ?>
  53. <tr>
  54. <td class="hidden-xs"><input type="checkbox"></td>
  55. <td class="hidden-xs"><?= $val['id'] ?></td>
  56. <td><?= $val['code'] ?></td>
  57. <td class="hidden-xs"><?= $val['save'] ?></td>
  58. <td class="hidden-xs"><?= date("Y-m-d H:i",$val['deadline']) ?></td>
  59. <td><?php if(!empty($val['takeStatus'])){ echo '已领取'; } ?></td>
  60. <td class="hidden-xs">
  61. <?php if(!empty($val['invitedMerchantId'])){ $m = xhMerchantService::getById($val['invitedMerchantId']);echo $m['merchantName']; } ?>
  62. </td>
  63. <td class="hidden-xs"></td>
  64. <td class="hidden-xs"></td>
  65. </tr>
  66. <?php } }?>
  67. </tbody>
  68. </table>
  69. </div>
  70. <div class="row">
  71. <div>
  72. <!--
  73. <div style="display:inline-block;margin-left:15px;">
  74. <label><select name="example-1_length"
  75. aria-controls="example-1" class="form-control">
  76. <option value="0">批量操作</option>
  77. <option value="1">批量下架</option>
  78. <option value="2">批量删除</option>
  79. </select>
  80. </label>
  81. <input class="btn btn-secondary btn-single" type="submit" name="" value="确认" />
  82. </div>
  83. -->
  84. <div class="dataTables_paginate paging_simple_numbers" style="float:right;padding-top:0px;margin-right:15px;">
  85. <?= $paging ?>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- footer -->
  93. <?php
  94. use backend\widgets\FooterWidget;
  95. ?>
  96. <?= FooterWidget::widget()?>
  97. <!-- footer -->
  98. <script>
  99. $("a[name=generateCode]").click(function(){
  100. $.ajax({type:"get",url:'/invite/generate',async:true,dataType:'json',success:function(data){
  101. xhPopMsg(data.msg);
  102. setTimeout(function(){
  103. window.location.reload();
  104. },1500);
  105. }});
  106. });
  107. </script>