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

integral.html 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-table-cell {
  4. height:auto;
  5. }
  6. .goods-content>div:not(:last-of-type) {
  7. brecharge-bottom:1px solid #DCDCDC;
  8. }
  9. .goods-data::after{
  10. display: block;
  11. content: '';
  12. clear: both;
  13. }
  14. .goods_name_hide{
  15. overflow:hidden;
  16. white-space:nowrap;
  17. text-overflow: ellipsis;
  18. }
  19. .operation-btn {
  20. margin: 5px;
  21. }
  22. .table-operate{
  23. text-align: left;
  24. font-size:14px;
  25. padding:0 5px;
  26. height:auto;
  27. overflow:visible;
  28. text-overflow:inherit;
  29. white-space:normal;
  30. word-break: break-all;
  31. }
  32. </style>
  33. <div class="wrapper">
  34. <div class="layui-card">
  35. <div class="layui-tab layui-tab-card" lay-filter="tab-all">
  36. <div class="layui-card-body layui-form">
  37. <div class="layui-form-item">
  38. <div class="layui-row">
  39. <div class="layui-inline">
  40. <label class="layui-form-label">用户信息:</label>
  41. <div class="layui-input-block">
  42. <input type="text" name="user_info" id="user_info" autocomplete="off" class="layui-input">
  43. </div>
  44. </div>
  45. <div class="layui-inline">
  46. <label class="layui-form-label">变动时间:</label>
  47. <div class="layui-input-inline">
  48. <div class="layui-input-inline">
  49. <input type="text" name="start_time" class="layui-input" id="start_time"
  50. placeholder="" autocomplete="off">
  51. </div>
  52. </div>
  53. <div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
  54. <label class="layui-form-mid">至</label>
  55. </div>
  56. <div class="layui-input-inline">
  57. <input type="text" name="end_time" class="layui-input" id="end_time"
  58. placeholder="" autocomplete="off">
  59. </div>
  60. </div>
  61. <div class="layui-inline">
  62. <button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
  63. lay-filter="recharge-search">查询
  64. </button>
  65. <button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
  66. lay-filter="recharge-clear-search">重置
  67. </button>
  68. <button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
  69. lay-filter="data-export">导出
  70. </button>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="layui-tab-item layui-show">
  76. <div class="layui-card">
  77. <div class="layui-card-body">
  78. <table id="recharge-lists" lay-filter="recharge-lists"></table>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <script>
  86. layui.config({
  87. version:"{$front_version}",
  88. base: '/static/lib/' //静态资源所在路径
  89. }).use(['form'], function(){
  90. var $ = layui.$
  91. , form = layui.form
  92. , table = layui.table
  93. , element = layui.element
  94. , laydate = layui.laydate;
  95. //监听搜索
  96. form.on('submit(recharge-search)', function (data) {
  97. var field = data.field;
  98. //执行重载
  99. table.reload('recharge-lists', {
  100. where: field,
  101. page: {
  102. curr: 1
  103. }
  104. });
  105. });
  106. //清空查询
  107. form.on('submit(recharge-clear-search)', function () {
  108. $('#user_info').val('');
  109. $('#start_time').val('');
  110. $('#end_time').val('');
  111. //刷新列表
  112. table.reload('recharge-lists', {
  113. where: [],
  114. page: {
  115. curr: 1
  116. }
  117. });
  118. });
  119. // 导出
  120. form.on('submit(data-export)', function (data) {
  121. var field = data.field;
  122. like.ajax({
  123. url: '{:url("finance.integral/export")}'
  124. , data: field
  125. , type: 'get'
  126. , success: function (res) {
  127. if (res.code == 1) {
  128. window.location.href = res.data.url;
  129. }
  130. }
  131. });
  132. });
  133. //日期时间范围
  134. laydate.render({
  135. elem: '#start_time'
  136. , type: 'datetime'
  137. ,theme: '#1E9FFF'
  138. });
  139. laydate.render({
  140. elem: '#end_time'
  141. , type: 'datetime'
  142. ,theme: '#1E9FFF'
  143. });
  144. //获取列表
  145. getList('');
  146. function getList() {
  147. table.render({
  148. elem: '#recharge-lists'
  149. , url: '{:url("finance.integral/integral")}'
  150. , cols: [[
  151. {field: 'user_sn', title: '用户编号', align: 'center',width:220}
  152. , {field: 'nickname', title: '会员信息', align: 'center',width:220}
  153. , {field: 'source_type', title: '事件', align: 'center',width:180}
  154. , {field: 'change_amount', title: '积分变动', align: 'center',width:180}
  155. , {field: 'left_amount', title: '剩余积分', align: 'center',width:120}
  156. , {field: 'remark', title: '备注', align: 'center',width:120}
  157. , {field: 'create_time', title: '变动时间', align: 'center',width:220}
  158. ]]
  159. , page: true
  160. , text: {none: '暂无数据!'}
  161. ,response: {
  162. statusCode: 1
  163. }
  164. , parseData: function (res) {
  165. return {
  166. "code": res.code,
  167. "msg": res.msg,
  168. "count": res.data.count,
  169. "data": res.data.lists,
  170. };
  171. }
  172. ,done: function(res, curr, count){
  173. // 解决操作栏因为内容过多换行问题
  174. $(".layui-table-main tr").each(function (index, val) {
  175. $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
  176. $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
  177. });
  178. }
  179. });
  180. }
  181. });
  182. </script>