截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. {layout name="layout1" /}
  2. <div class="wrapper">
  3. <div class="layui-card">
  4. <!-- 操作提示 -->
  5. <div class="layui-card-body">
  6. <div class="layui-collapse" style="border:1px dashed #c4c4c4">
  7. <div class="layui-colla-item">
  8. <h2 class="layui-colla-title like-layui-colla-title">操作提示</h2>
  9. <div class="layui-colla-content layui-show">
  10. <p>*拼团列表,查看拼团商品,拼团团长,拼团订单等信息。</p>
  11. <p>*拼团失败的订单系统原路退款,退款失败时可在订单管理手动退款。</p>
  12. </div>
  13. </div>
  14. </div>
  15. </div>
  16. <!-- 搜索区域 -->
  17. <div class="layui-card-body layui-form">
  18. <div class="layui-form-item">
  19. <div class="layui-inline">
  20. <label for="team_sn" class="layui-form-label">拼团编号:</label>
  21. <div class="layui-inline" style="margin-right:0;">
  22. <div class="layui-input-inline" >
  23. <input type="text" id="team_sn" name="team_sn" autocomplete="off" class="layui-input">
  24. </div>
  25. </div>
  26. </div>
  27. <div class="layui-inline">
  28. <label for="nickname" class="layui-form-label">团长:</label>
  29. <div class="layui-inline" style="margin-right:0;">
  30. <div class="layui-input-inline" >
  31. <input type="text" id="nickname" name="nickname" autocomplete="off" class="layui-input">
  32. </div>
  33. </div>
  34. </div>
  35. <div class="layui-inline">
  36. <label for="goods" class="layui-form-label">拼团商品:</label>
  37. <div class="layui-inline" style="margin-right:0;">
  38. <div class="layui-input-inline" >
  39. <input type="text" id="goods" name="goods" autocomplete="off" class="layui-input">
  40. </div>
  41. </div>
  42. </div>
  43. <div class="layui-inline">
  44. <label for="datetime" class="layui-form-label">开团时间:</label>
  45. <div class="layui-inline" style="margin-right:0;">
  46. <div class="layui-input-inline" >
  47. <input type="text" id="datetime" name="datetime" autocomplete="off" class="layui-input">
  48. </div>
  49. </div>
  50. </div>
  51. <div class="layui-inline">
  52. <a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
  53. <a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
  54. </div>
  55. </div>
  56. </div>
  57. <!-- 主体区域 -->
  58. <div class="layui-card-body">
  59. <div class="layui-tab layui-tab-card" lay-filter="like-tab">
  60. <ul class="layui-tab-title">
  61. <li lay-id="100" class="layui-this">全部拼团({$statistics.total})</li>
  62. <li lay-id="0">拼团中({$statistics.stayStatus})</li>
  63. <li lay-id="1">拼团成功({$statistics.successStatus})</li>
  64. <li lay-id="2">拼团失败({$statistics.failStatus})</li>
  65. </ul>
  66. <div class="layui-tab-content" style="padding:20px;">
  67. <table id="like-table-lists" lay-filter="like-table-lists"></table>
  68. <script type="text/html" id="table-teamGoods">
  69. <img src="{{d.goods_snap.image}}" alt="图" style="width:50px;height:50px;">
  70. <div class="layui-inline">{{d.goods_snap.name}}</div>
  71. </script>
  72. <script type="text/html" id="table-user">
  73. <img src="{{d.avatar}}" alt="图" style="width:50px;height:50px;">
  74. <div class="layui-inline">
  75. <p>会员编号:{{d.sn}}</p>
  76. <p>会员昵称:{{d.nickname}}</p>
  77. </div>
  78. </script>
  79. <script type="text/html" id="table-orderSn">
  80. <img src="{{d.goods_snap.image}}" alt="图" style="width:50px;height:50px;">
  81. <div class="layui-inline">{{d.goods_snap.name}}</div>
  82. </script>
  83. <script type="text/html" id="table-operation">
  84. <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="detail">拼团详情</a>
  85. </script>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <script>
  92. layui.use(["table", "form", "element", "laydate"], function(){
  93. var table = layui.table;
  94. var form = layui.form;
  95. var element = layui.element;
  96. var laydate = layui.laydate;
  97. laydate.render({elem:"#datetime", range: true, trigger:"click"});
  98. like.tableLists("#like-table-lists", "{:url()}", [
  99. {field:"id", width:80, align:"center", title:"ID"}
  100. ,{field:"team_sn", width:200, align:"center",title:"拼团编号"}
  101. ,{field:"user", width:220, title:"团长", templet:"#table-user"}
  102. ,{field:"teamGoods", width:220, title:"拼团商品", templet:"#table-teamGoods"}
  103. ,{field:"peopleJoin", width:130, align:"center", title:"参团/成团人数"}
  104. ,{field:"status_text", width:100, align:"center", title:"拼团状态"}
  105. ,{field:"kaituan_time", width:160, align:"center", title:"开团时间"}
  106. ,{title:"操作", width:100, align:"center", fixed:"right", toolbar:"#table-operation"}
  107. ]);
  108. var active = {
  109. detail: function (obj) {
  110. layer.open({
  111. type: 2
  112. ,title: "拼团详细"
  113. ,content: "{:url('team.Found/detail')}?id="+obj.data.id
  114. ,area: ["60%", "80%"]
  115. });
  116. },
  117. statistics: function () {
  118. like.ajax({
  119. url: "{:url('team.Found/statistics')}",
  120. data: {},
  121. type: "GET",
  122. success:function(res) {
  123. if(res.code === 1) {
  124. $(".layui-tab-title li[lay-id=100]").html("全部拼团("+res.data.total+")");
  125. $(".layui-tab-title li[lay-id=0]").html("拼团中("+res.data.stayStatus+")");
  126. $(".layui-tab-title li[lay-id=1]").html("拼团成功("+res.data.successStatus+")");
  127. $(".layui-tab-title li[lay-id=2]").html("拼团失败("+res.data.failStatus+")");
  128. }
  129. }
  130. });
  131. }
  132. };
  133. like.eventClick(active);
  134. element.on("tab(like-tab)", function(){
  135. active.statistics();
  136. var type = this.getAttribute("lay-id");
  137. table.reload("like-table-lists", {
  138. where: {type: type},
  139. page: {
  140. curr: 1
  141. }
  142. });
  143. });
  144. form.on("submit(search)", function(data){
  145. table.reload("like-table-lists", {
  146. where: data.field,
  147. page: {
  148. curr: 1
  149. }
  150. });
  151. });
  152. form.on("submit(clear-search)", function(){
  153. $("#team_sn").val("");
  154. $("#nickname").val("");
  155. $("#goods").val("");
  156. $("#datetime").val("");
  157. table.reload("like-table-lists", {
  158. where: {},
  159. page: {
  160. curr: 1
  161. }
  162. });
  163. });
  164. })
  165. </script>