index.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <style>
  4. .search-row {
  5. margin-bottom: 10px;
  6. }
  7. </style>
  8. <div class="row">
  9. <div class="col-xs-12 search-row">
  10. <div class="">
  11. <ul class="nav nav-tabs">
  12. <li <?php if($state == -1){ ?>class="active" <?php } ?>><a href="{:U('Pin/index')}">全部拼团</a></li>
  13. <li <?php if($state == 1){ ?>class="active" <?php } ?>><a href="{:U('Pin/index', array('state' => 1))}">拼团成功</a></li>
  14. <li <?php if($state == 2){ ?>class="active" <?php } ?>><a href="{:U('Pin/index', array('state' => 2))}" >拼团失败</a></li>
  15. <li <?php if($state == 0){ ?>class="active" <?php } ?>><a href="{:U('Pin/index', array('state' => 0))}" >拼团中</a></li>
  16. </ul>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="row" style="display:none;">
  21. <div class="col-xs-12">
  22. <div class="panel panel-info">
  23. <div class="panel-heading">筛选</div>
  24. <div class="panel-body">
  25. <form id="list-form" method="get" action="#">
  26. <div class="col-xs-12 search-row">
  27. <div class="col-sm-4">
  28. <span class="form-label">团编号:</span>
  29. <input type="text" name="gid" class="form-item" value="">
  30. </div>
  31. <div class="col-sm-4">
  32. <span class="form-label">商品ID:</span>
  33. <input type="text" name="goodsId" class="form-item" value="">
  34. </div>
  35. <div class="col-sm-4">
  36. <span class="form-label">团购状态: </span>
  37. <select name="order_status" class="combox form-item ">
  38. <option value="">all</option>
  39. <option value="W">待付款</option>
  40. <option value="D">已取消</option>
  41. <option value="E">已过期</option>
  42. <option value="C">已完成</option>
  43. <option value="N">进行中</option>
  44. </select>
  45. </div>
  46. </div>
  47. <div class="col-xs-12 search-row">
  48. <div class="col-sm-4">
  49. <span class="form-label"> 团购人数:</span>
  50. <input type="text" name="groupNum" class="form-item" value="" placeholder="支持>、<、=,如>5">
  51. </div>
  52. <div class="col-sm-4">
  53. <span class="form-label">开始时间:</span>
  54. <input type="text" name="createStartTime" value="" id="datetimepicker0" class="datetimepicker data_input">
  55. <a class="red reset" data-did="datetimepicker0" href="#"><i class="icon-trash bigger-130"></i></a>
  56. </div>
  57. <div class="col-sm-4">
  58. <span class="form-label">结束时间:</span>
  59. <input type="text" name="createEndTime" value="" id="datetimepicker1" class="datetimepicker data_input">
  60. <a class="red reset" data-did="datetimepicker1" href="#"><i class="icon-trash bigger-130"></i></a>
  61. </div>
  62. </div>
  63. <div class="col-xs-12 search-row">
  64. <div class="col-sm-4">
  65. <span class="form-label">团长UID:</span>
  66. <input type="text" name="uid" class="form-item" value="">
  67. </div>
  68. <div class="col-sm-4">
  69. <div class="onlySuper">
  70. <span class="form-label">所属用户:</span>
  71. <select title="选择用户" name="muid">
  72. <option value="">全部</option>
  73. <option value="-1">超级用户</option>
  74. <option value="100009">管理员</option>
  75. <option value="100013">花千千</option>
  76. <option value="100014">聚啦商城</option>
  77. <option value="100015">水果商城</option>
  78. <option value="100016">测试马东</option>
  79. <option value="100017">花仁网全球精品水果</option>
  80. </select>
  81. </div>
  82. </div>
  83. <div class="col-sm-4">
  84. <button type="submit" class="btn btn-white"> <i class="icon-search"></i> 检 索 </button>
  85. <button type="button" class="btn btn-white btn-exp"> <i class="icon-cloud-upload"></i> 导 出 </button>
  86. </div>
  87. </div>
  88. </form>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="row">
  94. <div class="col-xs-12">
  95. <div class="table-responsive">
  96. <table class="table table-striped table-bordered table-hover">
  97. <thead>
  98. <tr>
  99. <th>拼团ID</th>
  100. <th>商品ID</th>
  101. <th>商品名称</th>
  102. <th>状态</th>
  103. <th>已买/总需</th>
  104. <th>开团时间</th>
  105. <th>到期时间</th>
  106. <th>操作</th>
  107. </tr>
  108. </thead>
  109. <tbody>
  110. <volist name="list" id="v" empty="$empty">
  111. <tr>
  112. <td>{$v.pin_id}</td>
  113. <td>{$v.goods_id}</td>
  114. <td>
  115. {$v.name}
  116. </td>
  117. <td>
  118. <?php if($v['state'] == 0){ ?>
  119. <span class="blue">拼团中</span>
  120. <?php }else if($v['state'] == 1){ ?>
  121. <span class="red">已完成</span>
  122. <?php }else if($v['state'] == 2){ ?>
  123. <span class="grey">已过期</span>
  124. <?php } ?>
  125. </td>
  126. <td><span class="red">{$v.buy_count}</span>/{$v.need_count}</td>
  127. <td><?php echo date('Y-m-d H:i:s',$v['begin_time']);?></td>
  128. <td>
  129. <?php echo date('Y-m-d H:i:s',$v['end_time']);?>
  130. </td>
  131. <td>
  132. <a href='{:U("Pin/show_order",array("pin_id"=>$v["pin_id"]))}' class="btn btn-success btn-sm">查看团信息</a>
  133. </td>
  134. </tr>
  135. </volist>
  136. <tr>
  137. <td colspan="20" class="page">{$page}</td>
  138. </tr>
  139. </tbody>
  140. </table>
  141. </div>
  142. </div>
  143. </div>
  144. </block>
  145. <block name="javascript">
  146. <script>
  147. $(function(){
  148. $("#search").click(function () {
  149. var url = $(this).attr('url');
  150. var query = $('.search-form').find('input,select').serialize();
  151. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  152. query = query.replace(/^&/g, '');
  153. if (url.indexOf('?') > 0) {
  154. url += '&' + query;
  155. } else {
  156. url += '?' + query;
  157. }
  158. window.location.href = url;
  159. });
  160. });
  161. </script>
  162. </block>