index.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {extend name="public/container"}
  2. {block name="content"}
  3. <style>
  4. .dropdown-menu li a i{
  5. width: 10px;
  6. }
  7. </style>
  8. <div class="row">
  9. <div class="col-sm-12">
  10. <div class="ibox">
  11. <div class="ibox-title">
  12. <div class="ibox-tools">
  13. </div>
  14. </div>
  15. <div class="ibox-content">
  16. <div class="row">
  17. <div class="m-b m-l">
  18. <form action="" class="form-inline">
  19. <div class="input-group">
  20. <input type="text" name="title" value="{$where.title}" placeholder="核销员昵称ID" class="input-sm form-control">
  21. <span class="input-group-btn">
  22. <button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
  23. </div>
  24. </form>
  25. </div>
  26. </div>
  27. <div class="table-responsive" style="overflow:visible">
  28. <table class="table table-striped table-bordered">
  29. <thead>
  30. <tr>
  31. <th class="text-center">编号</th>
  32. <th class="text-center">核销人</th>
  33. <th class="text-center">优惠券名称</th>
  34. <th class="text-center">优惠券商家</th>
  35. <th class="text-center">优惠券价格</th>
  36. <th class="text-center">核销时间</th>
  37. </tr>
  38. </thead>
  39. <tbody class="">
  40. {volist name="list" id="vo"}
  41. <tr>
  42. <td class="text-center">
  43. {$vo.id}
  44. </td>
  45. <td class="text-center">
  46. {$vo.nickname}
  47. </td>
  48. <td class="text-center">
  49. {$vo.coupon_title}
  50. </td>
  51. <td class="text-center">
  52. {$vo.d_name}
  53. </td>
  54. <td class="text-center">
  55. {$vo.coupon_price}
  56. </td>
  57. <td class="text-center">
  58. {$vo.add_time|date='Y-m-d H:i:s'}
  59. </td>
  60. </td>
  61. </tr>
  62. {/volist}
  63. </tbody>
  64. </table>
  65. </div>
  66. {include file="public/inner_page"}
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. {/block}
  72. {block name="script"}
  73. <script>
  74. $('.js-group-btn').on('click',function(){
  75. $('.js-group-btn').css({zIndex:1});
  76. $(this).css({zIndex:100});
  77. });
  78. $('.del').on('click',function(){
  79. window.t = $(this);
  80. var _this = $(this),url =_this.data('url');
  81. $eb.$swal('delete',function(){
  82. $eb.axios.get(url).then(function(res){
  83. console.log(res);
  84. if(res.status == 200 && res.data.code == 200) {
  85. $eb.$swal('success',res.data.msg);
  86. // _this.parents('tr').remove();
  87. }else
  88. return Promise.reject(res.data.msg || '修改失败')
  89. }).catch(function(err){
  90. $eb.$swal('error',err);
  91. });
  92. },{'title':'您确定要修改优惠券的状态吗?','text':'修改后将无法恢复并且已发出的优惠券将失效,请谨慎操作!','confirm':'是的,我要修改'})
  93. });
  94. $('.delstor').on('click',function(){
  95. window.t = $(this);
  96. var _this = $(this),url =_this.data('url');
  97. $eb.$swal('delete',function(){
  98. $eb.axios.get(url).then(function(res){
  99. console.log(res);
  100. if(res.status == 200 && res.data.code == 200) {
  101. $eb.$swal('success',res.data.msg);
  102. _this.parents('tr').remove();
  103. }else
  104. return Promise.reject(res.data.msg || '删除失败')
  105. }).catch(function(err){
  106. $eb.$swal('error',err);
  107. });
  108. },{'title':'您确定要删除优惠券吗?','text':'删除后将无法恢复,请谨慎操作!','confirm':'是的,我要删除'})
  109. });
  110. $(".open_image").on('click',function (e) {
  111. var image = $(this).data('image');
  112. $eb.openImage(image);
  113. })
  114. </script>
  115. {/block}