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

index.html 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. {layout name="layout1" /}
  2. <style>
  3. </style>
  4. <div class="wrapper">
  5. <div class="layui-card">
  6. <!--操作提示-->
  7. <div class="layui-card-body">
  8. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  9. <div class="layui-colla-item">
  10. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  11. <div class="layui-colla-content layui-show">
  12. <p>*分销订单明细;</p>
  13. </div>
  14. </div>
  15. </div>
  16. </div>
  17. <!--搜索区域-->
  18. <div class="layui-card-body layui-form">
  19. <div class="layui-form-item">
  20. <div class="layui-inline">
  21. <div class="layui-form-label">订单信息:</div>
  22. <div class="layui-input-inline">
  23. <input type="text" id="order_keyword" name="order_keyword" placeholder="订单编号" class="layui-input" />
  24. </div>
  25. </div>
  26. <div class="layui-inline">
  27. <div class="layui-form-label">商品信息:</div>
  28. <div class="layui-input-inline">
  29. <input type="text" id="goods_keyword" name="goods_keyword" placeholder="名称" class="layui-input" />
  30. </div>
  31. </div>
  32. <div class="layui-inline">
  33. <div class="layui-form-label">分销会员:</div>
  34. <div class="layui-input-inline">
  35. <input type="text" id="distribution_keyword" placeholder="编号/昵称" name="distribution_keyword" class="layui-input" />
  36. </div>
  37. </div>
  38. <div class="layui-inline">
  39. <div class="layui-form-label">佣金状态:</div>
  40. <div class="layui-input-inline">
  41. <select name="status" id="status" placeholder="请选择" >
  42. <option value="0">全部</option>
  43. <option value="1">待返佣</option>
  44. <option value="2">已结算</option>
  45. <option value="3">已失效</option>
  46. </select>
  47. </div>
  48. </div>
  49. <div class="layui-inline">
  50. <button class="layui-btn layui-btn-primary layui-bg-blue" lay-submit lay-filter="search">搜索</button>
  51. <button class="layui-btn layui-btn-primary" lay-submit lay-filter="reset">重置</button>
  52. </div>
  53. </div>
  54. </div>
  55. <!--数据表格-->
  56. <div class="layui-card-body">
  57. <table id="lists" lay-filter="lists"></table>
  58. <!--自定义模板-->
  59. <script type="text/html" id="order-info">
  60. <div class="layui-input-inline" style="text-align: left;">
  61. <p>订单编号:{{d.order_sn}}</p>
  62. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">下单时间:{{d.order_create_time}}</p>
  63. </div>
  64. </script>
  65. <script type="text/html" id="user-info">
  66. <img src="{{d.user_info.avatar}}" style="height:60px;width: 60px" class="image-show">
  67. <div class="layui-input-inline" style="text-align: left;">
  68. <p>用户编号:{{d.user_info.sn}}</p>
  69. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">用户昵称:{{d.user_info.nickname}}</p>
  70. </div>
  71. </script>
  72. <script type="text/html" id="goods-info">
  73. <img src="{{d.goods_image}}" style="height:60px;width: 60px" class="image-show">
  74. <div class="layui-input-inline" style="text-align: left;">
  75. <p>商品名称:{{d.goods_name}}</p>
  76. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">规格名称:{{d.spec_value}}</p>
  77. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">数量:{{d.goods_num}}</p>
  78. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">实付金额:{{d.total_pay_price}}</p>
  79. </div>
  80. </script>
  81. <script type="text/html" id="distribution-member-info">
  82. <img src="{{d.distribution_avatar}}" style="height:60px;width: 60px" class="image-show">
  83. <div class="layui-input-inline" style="text-align: left;">
  84. <p>分销会员编号:{{d.distribution_sn}}</p>
  85. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">分销会员昵称:{{d.distribution_nickname}}</p>
  86. </div>
  87. </script>
  88. <script type="text/html" id="distribution-order-info">
  89. <div class="layui-input-inline" style="text-align: left;">
  90. <p>分销等级:{{d.level_name}}</p>
  91. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">分销层级:{{d.level}}级</p>
  92. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">佣金比例:{{d.ratio}}</p>
  93. </div>
  94. </script>
  95. <script type="text/html" id="earnings-info">
  96. <div class="layui-input-inline" style="text-align: left;">
  97. <p>佣金金额:{{d.money}}</p>
  98. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">佣金状态:{{d.status_desc}}</p>
  99. <p style="width: 300px;text-overflow:ellipsis;overflow: hidden">结算时间:{{d.settlement_time}}</p>
  100. </div>
  101. </script>
  102. </div>
  103. </div>
  104. </div>
  105. <script>
  106. layui.config({
  107. version:"{$front_version}",
  108. base: '/static/lib/'
  109. }).use(['table', 'form'], function () {
  110. let $ = layui.$
  111. , form = layui.form
  112. , table = layui.table;
  113. //监听搜索
  114. form.on('submit(search)', function(data){
  115. var field = data.field;
  116. //执行重载
  117. table.reload('lists', {
  118. where: field,
  119. page: {curr: 1}
  120. });
  121. });
  122. //清空查询
  123. form.on('submit(reset)', function(){
  124. $('#order_keyword').val('');
  125. $('#goods_keyword').val('');
  126. $('#distribution_keyword').val('');
  127. $('#status').val('0');
  128. form.render('select');
  129. //刷新列表
  130. table.reload('lists', {
  131. where: [], page: {curr: 1}
  132. });
  133. });
  134. // 数据表格渲染
  135. table.render({
  136. elem: '#lists'
  137. ,url: '{:url("distribution.order/index")}' //数据接口
  138. ,method: 'post'
  139. ,page: true //开启分页
  140. ,cols: [[ //表头
  141. {templet: '#order-info', title: '订单信息', width:280}
  142. ,{templet: '#user-info', title: '买家信息', width:280}
  143. ,{templet: '#goods-info', title: '商品信息', width:280}
  144. ,{templet: '#distribution-member-info', title: '分销会员', width:280}
  145. ,{templet: '#distribution-order-info', title: '分销信息', width:280}
  146. ,{templet: '#earnings-info', title: '佣金信息', width:220}
  147. ]]
  148. , text: {none: '暂无数据!'}
  149. , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
  150. return {
  151. "code": res.code,
  152. "msg": res.msg,
  153. "count": res.data.count, //解析数据长度
  154. "data": res.data.lists, //解析数据列表
  155. };
  156. },
  157. response: {
  158. statusCode: 1
  159. }
  160. ,done: function(res, curr, count){
  161. // 解决操作栏因为内容过多换行问题
  162. $(".layui-table-main tr").each(function (index, val) {
  163. $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
  164. $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
  165. });
  166. }
  167. });
  168. });
  169. </script>