截流自动化的商城平台
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.

record.html 7.3KB

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