user_push.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. {extend name="public/container"}
  2. {block name="head_top"}
  3. {/block}
  4. {block name="content"}
  5. <style>
  6. .btn-outline {
  7. border: none;
  8. }
  9. .btn-outline:hover {
  10. background-color: #0e9aef;
  11. color: #fff;
  12. }
  13. .layui-form-item .layui-btn {
  14. margin-top: 5px;
  15. margin-right: 10px;
  16. }
  17. .layui-btn-primary {
  18. margin-right: 10px;
  19. margin-left: 0 !important;
  20. }
  21. label {
  22. margin-bottom: 0 !important;
  23. margin-top: 4px;
  24. }
  25. </style>
  26. <div class="layui-fluid">
  27. <div class="layui-row layui-col-space15" id="app">
  28. 搜索条件
  29. <div class="layui-col-md12">
  30. <div class="layui-card">
  31. <div class="layui-card-header">搜索条件</div>
  32. <div class="layui-card-body">
  33. <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
  34. <form class="layui-form layui-form-pane" action="">
  35. <div class="layui-form-item">
  36. <div class="layui-col-lg12">
  37. <label class="layui-form-label" style="top: -5.5px;">推广人</label>
  38. <div class="layui-input-inline">
  39. <input type="text" id="spread_uid" name="spread_uid" class="layui-input" placeholder="推广人">
  40. </div>
  41. <label class="layui-form-label" style="top: -5.5px;">消费人</label>
  42. <div class="layui-input-inline">
  43. <input type="text" id="uid" name="uid" class="layui-input" placeholder="消费人">
  44. </div>
  45. </div>
  46. <div class="layui-inline">
  47. <div class="layui-input-inline">
  48. <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
  49. <i class="layui-icon layui-icon-search"></i>搜索</button>
  50. </div>
  51. </div>
  52. </div>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <!-- 中间详细信息-->
  59. <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
  60. v-for="item in badge" v-cloak="" v-if="item.count > 0">
  61. </div>
  62. <!--enb-->
  63. </div>
  64. <!--列表-->
  65. <div class="layui-row layui-col-space15">
  66. <div class="layui-col-md12">
  67. <div class="layui-card">
  68. <div class="layui-card-header">消费列表</div>
  69. <div class="layui-card-body">
  70. <table class="layui-hide" id="List" lay-filter="List"></table>
  71. <script type="text/html" id="image">
  72. <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
  73. </script>
  74. <script type="text/html" id="is_participate">
  75. {{# if(d.is_participate == 0){ }}
  76. <button type="button" class="layui-btn layui-btn-primary layui-btn-xs" style="color: red">未结算</button>
  77. {{# } }}
  78. {{# if(d.is_participate == 1){ }}
  79. <button type="button" class="layui-btn layui-btn-primary layui-btn-xs">已结算</button>
  80. {{# } }}
  81. </script>
  82. <script type="text/html" id="act">
  83. <button type="button" class="layui-btn layui-btn-xs layui-btn-normal"
  84. onclick="$eb.createModalFrame('{{d.title}}-编辑','{:Url('edit')}?id={{d.id}}',{h:700,w:1100})">
  85. 编辑
  86. </button>
  87. <button type="button" class="layui-btn layui-btn-xs layui-btn-normal"
  88. onclick="$eb.createModalFrame('{{d.title}}-编辑内容','{:Url('edit_content')}?id={{d.id}}')">
  89. 编辑内容
  90. </button>
  91. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
  92. 删除
  93. </button>
  94. </script>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <!--end-->
  100. </div>
  101. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  102. {/block}
  103. {block name="script"}
  104. <script>
  105. layList.tableList('List', "{:Url('user_push_list')}", function () {
  106. return [
  107. {type: 'checkbox'},
  108. {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
  109. {field: 'spread_name', title: '推广人', align: 'center'},
  110. {field: 'nickname', title: '消费人', align: 'center'},
  111. {field: 'pay_price', title: '消费额度', align: 'center'},
  112. {field: 'is_participate', title: '是否结算',templet: '#is_participate', align: 'center'},
  113. // {field: 'status', title: '状态', templet: '#status', align: 'center'},
  114. // {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
  115. ];
  116. });
  117. //查询
  118. layList.search('search', function (where) {
  119. layList.reload(where, true);
  120. });
  121. //点击事件绑定
  122. layList.tool(function (event, data, obj) {
  123. switch (event) {
  124. case 'delete':
  125. var url = layList.U({c: 'user.out', a: 'delete', q: {id: data.id}});
  126. var code = {title: "操作提示", text: "确定将该商品移入回收站吗?", type: 'info', confirm: '是的,移入回收站'};
  127. $eb.$swal('delete', function () {
  128. $eb.axios.get(url).then(function (res) {
  129. if (res.status == 200 && res.data.code == 200) {
  130. $eb.$swal('success', res.data.msg);
  131. obj.del();
  132. location.reload();
  133. } else
  134. return Promise.reject(res.data.msg || '删除失败')
  135. }).catch(function (err) {
  136. $eb.$swal('error', err);
  137. });
  138. }, code)
  139. break;
  140. case 'open_image':
  141. $eb.openImage(data.image);
  142. break;
  143. case 'edit':
  144. location.href = layList.U({a: 'edit', q: {id: data.id}});
  145. break;
  146. }
  147. })
  148. //改状态
  149. layList.switch('status', function (odj, value) {
  150. if (odj.elem.checked == true) {
  151. layList.baseGet(layList.Url({c: 'user.out', a: 'set_status', p: {status: 1, id: value}}), function (res) {
  152. layList.msg(res.msg, function () {
  153. layList.reload();
  154. });
  155. });
  156. } else {
  157. layList.baseGet(layList.Url({c: 'user.out', a: 'set_status', p: {status: 0, id: value}}), function (res) {
  158. layList.msg(res.msg, function () {
  159. layList.reload();
  160. });
  161. });
  162. }
  163. });
  164. </script>
  165. {/block}