detail.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-image');
  4. ?>
  5. <div id="app" v-cloak>
  6. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  7. <div slot="header">
  8. <span style="color: #409EFF;cursor: pointer" @click="$navigate({r:'happiness/store-weight/index'})">
  9. 奖金池结算列表
  10. </span>
  11. <span>/</span>
  12. <span>结算明细</span>
  13. </div>
  14. <div class="table-body">
  15. <div class="input-item">
  16. <el-input @keyup.enter.native="getList" size="small" placeholder="请输入用户ID" v-model="search.user_id" clearable @clear="toSearch">
  17. <el-button slot="append" icon="el-icon-search" @click="toSearch"></el-button>
  18. </el-input>
  19. </div>
  20. <div class="input-item">
  21. <el-input @keyup.enter.native="getList" size="small" placeholder="请输入搜索会员昵称/手机号" v-model="search.keyword" clearable @clear="toSearch">
  22. <el-button slot="append" icon="el-icon-search" @click="toSearch"></el-button>
  23. </el-input>
  24. </div>
  25. <el-select size="small" placeholder="请选择等级" v-model="search.level" @change='toSearch' class="select">
  26. <el-option key="all" label="全部等级" value=""></el-option>
  27. <el-option :key="index" :label="item" :value="index" v-for="(item, index) in level_list"></el-option>
  28. </el-select>
  29. <el-tabs v-model="activeName" @tab-click="handleClick">
  30. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  31. <el-table-column prop="user_id" label="用户ID" align="center"></el-table-column>
  32. <el-table-column label="基本信息" align="center">
  33. <template slot-scope="scope">
  34. <template v-if="scope.row.user">
  35. <div style="display:flex;justify-content:center;">
  36. <com-image mode="aspectFill" :src="scope.row.user.avatar_url?scope.row.user.avatar_url:'/resources/img/common/default-avatar.png'"></com-image>
  37. <div style="padding-left:8px">
  38. <div style="text-align:left;margin-top:10px">{{scope.row.user.nickname}}</div>
  39. <div>{{scope.row.user.mobile}}</div>
  40. </div>
  41. </div>
  42. </template>
  43. <template v-else>
  44. --
  45. </template>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="分红池金额" prop="total_amount" align="center">
  49. </el-table-column>
  50. <el-table-column label="分红比例" prop="scale" align="center">
  51. <template slot-scope="scope">
  52. {{scope.row.scale}}%
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="统计可获得人数" prop="num" align="center">
  56. </el-table-column>
  57. <el-table-column label="结算金额" prop="amount" align="center">
  58. </el-table-column>
  59. <el-table-column label="备注" prop="remark" align="center">
  60. </el-table-column>
  61. </el-table>
  62. <div style="text-align: right;margin: 20px 0;" v-if="list.length > 0">
  63. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  64. </div>
  65. </el-tabs>
  66. </div>
  67. </el-card>
  68. </div>
  69. <script>
  70. const app = new Vue({
  71. el: '#app',
  72. data: {
  73. activeName: '',
  74. bossDialog: false,
  75. loading: false,
  76. page: 1,
  77. pageCount: 0,
  78. list: [],
  79. exportList: [],
  80. choose_list: [],
  81. search: {
  82. keyword:'',
  83. level:''
  84. },
  85. level_list:[],
  86. job_id: null,
  87. },
  88. mounted() {
  89. this.job_id = getQuery('job_id')
  90. this.getList();
  91. },
  92. methods: {
  93. // 操作处理
  94. handle(type, data = null) {
  95. let id = data ? parseInt(data.id) : '';
  96. let params = {};
  97. switch (type) {
  98. }
  99. },
  100. getList() {
  101. let self = this;
  102. self.loading = true;
  103. let params = {
  104. r: 'happiness/store-weight/detail',
  105. page: self.page,
  106. job_id: this.job_id,
  107. };
  108. params = Object.assign(params, this.search);
  109. request({
  110. params: params,
  111. method: 'get',
  112. }).then(e => {
  113. self.loading = false;
  114. if (e.data.code == 0) {
  115. self.list = e.data.data.list.list;
  116. self.level_list=e.data.data.levels
  117. self.pageCount = e.data.data.list.page_count;
  118. } else {
  119. self.$message.error(e.data.msg);
  120. }
  121. }).catch(e => {
  122. self.loading = false;
  123. });
  124. },
  125. pagination(currentPage) {
  126. let self = this;
  127. self.page = currentPage;
  128. self.search.page = currentPage;
  129. self.getList();
  130. },
  131. handleClick(tab, event) {
  132. this.search.page = 1;
  133. this.search.status = this.activeName;
  134. this.getList()
  135. },
  136. toSearch() {
  137. this.search.page = 1;
  138. this.getList();
  139. },
  140. handleSelectionChange(val) {
  141. let self = this;
  142. self.choose_list = [];
  143. val.forEach(function(item) {
  144. self.choose_list.push(item.id);
  145. })
  146. },
  147. handleSelect(item) {
  148. },
  149. }
  150. });
  151. </script>
  152. <style>
  153. .el-tabs__header {
  154. font-size: 16px;
  155. }
  156. .table-body {
  157. padding: 20px;
  158. background-color: #fff;
  159. }
  160. .table-body .el-button {
  161. padding: 0 !important;
  162. border: 0;
  163. margin: 0 5px;
  164. }
  165. .input-item {
  166. width: 250px;
  167. margin: 0 0 20px;
  168. display: inline-block;
  169. }
  170. .input-item .el-input__inner {
  171. border-right: 0;
  172. }
  173. .input-item .el-input__inner:hover {
  174. border: 1px solid #dcdfe6;
  175. border-right: 0;
  176. outline: 0;
  177. }
  178. .input-item .el-input__inner:focus {
  179. border: 1px solid #dcdfe6;
  180. border-right: 0;
  181. outline: 0;
  182. }
  183. .input-item .el-input-group__append {
  184. background-color: #fff;
  185. border-left: 0;
  186. width: 10%;
  187. padding: 0;
  188. }
  189. .input-item .el-input-group__append .el-button {
  190. padding: 0;
  191. }
  192. .input-item .el-input-group__append .el-button {
  193. margin: 0;
  194. }
  195. .batch {
  196. margin: 0 0 20px;
  197. display: inline-block;
  198. }
  199. .batch .el-button {
  200. padding: 9px 15px !important;
  201. }
  202. .el-table th>.cell {
  203. color: #333;
  204. font-weight: bold;
  205. font-size: 14px;
  206. }
  207. .el-table__footer-wrapper,
  208. .el-table__header-wrapper {
  209. border-bottom: 1.4px solid #D6D6D6;
  210. }
  211. .com-image img {
  212. border-radius: 50%;
  213. }
  214. </style>