index.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <style>
  2. .label{
  3. margin-right: 10px;
  4. }
  5. .table-body {
  6. padding: 20px;
  7. background-color: #fff;
  8. }
  9. .input-item {
  10. display: inline-block;
  11. width: 250px;
  12. margin: 0 0 20px;
  13. }
  14. .input-item .el-input__inner {
  15. border-right: 0;
  16. }
  17. .input-item .el-input__inner:hover {
  18. border: 1px solid #dcdfe6;
  19. border-right: 0;
  20. outline: 0;
  21. }
  22. .input-item .el-input__inner:focus {
  23. border: 1px solid #dcdfe6;
  24. border-right: 0;
  25. outline: 0;
  26. }
  27. .input-item .el-input-group__append {
  28. background-color: #fff;
  29. border-left: 0;
  30. width: 10%;
  31. padding: 0;
  32. }
  33. .input-item .el-input-group__append .el-button {
  34. padding: 0;
  35. }
  36. .input-item .el-input-group__append .el-button {
  37. margin: 0;
  38. }
  39. .table-body .el-button {
  40. padding: 0 !important;
  41. border: 0;
  42. margin: 0 5px;
  43. }
  44. .el-table th > .cell {
  45. color: #333;
  46. font-weight: bold;
  47. font-size: 14px;
  48. }
  49. .el-table__footer-wrapper, .el-table__header-wrapper {
  50. border-bottom: 1.4px solid #D6D6D6;
  51. }
  52. .el-button--primary2 {
  53. color: #FFF;
  54. background-color: #03C5FF;
  55. border-color: #03C5FF;
  56. }
  57. /*头像样式 start*/
  58. .default-avatar{
  59. width: 50px;
  60. height: 50px;
  61. border-radius: 50%;
  62. }
  63. .user_img{
  64. position: relative;
  65. margin-right: 8px;
  66. height: 50px;
  67. width: 50px;
  68. }
  69. .el-table_1_column_3 .cell { /*-2 表示在第二行*/
  70. display: flex;
  71. }
  72. /*头像样式 end*/
  73. </style>
  74. <div id="app" v-cloak>
  75. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  76. <div slot="header">
  77. <div>
  78. <span>参与记录</span>
  79. </div>
  80. </div>
  81. <div class="table-body">
  82. <div size="small" :inline="true" flex="dir:left cross:center" style="margin-bottom: 12px;">
  83. <div class="item-box" flex="dir:left cross:center" style="margin-left: 10px;">
  84. <div class="label">支付时间: </div>
  85. <el-date-picker
  86. size="small"
  87. v-model="search.create_time"
  88. type="datetimerange"
  89. value-format="yyyy-MM-dd HH:mm:ss"
  90. range-separator="至"
  91. start-placeholder="开始日期"
  92. end-placeholder="结束日期">
  93. </el-date-picker>
  94. </div>
  95. <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px; margin-left: 20px;">
  96. <div class="label">会员ID: </div>
  97. <el-input size="small" style="width: 210px" v-model="search.user_id" placeholder="请输入会员ID"></el-input>
  98. </div>
  99. <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px; margin-left: 20px;">
  100. <div class="label">会员: </div>
  101. <el-input size="small" style="width: 210px" v-model="search.user_keyword" placeholder="会员昵称/手机号码"></el-input>
  102. </div>
  103. <div class="item-box" flex="dir:left cross:center">
  104. <el-button type="primary" style="padding: 8px 34px !important;" @click="searchs">搜索
  105. </el-button>
  106. <el-button type="danger" style="padding: 12px 34px !important;" size="small" @click="resetSearch" v-if="show_clear_search_btn">清除条件</el-button>
  107. </div>
  108. </div>
  109. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  110. <el-table-column label="名次" min-width="80" align="center">
  111. <template slot-scope="scope">
  112. <com-ellipsis :line="1" ><span @click="po(scope)">{{15*(page-1)+scope.$index+1}}</span></com-ellipsis>
  113. </template>
  114. </el-table-column>
  115. <el-table-column label="会员ID" min-width="150" align="center">
  116. <template slot-scope="scope">
  117. <com-ellipsis :line="1">{{scope.row.user.id}}</com-ellipsis>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="会员" width="180" >
  121. <template slot-scope="scope">
  122. <div class="user_img" v-if="scope.row.user_id>0">
  123. <el-image class="default-avatar" :src="scope.row.user.avatar_url">
  124. <div slot="error" class="image-slot">
  125. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  126. </div>
  127. </el-image>
  128. </div>
  129. <div class="user_img" v-else>
  130. <el-image class="default-avatar" :src="scope.row.user_avatar_url">
  131. <div slot="error" class="image-slot">
  132. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  133. </div>
  134. </el-image>
  135. </div>
  136. <div>
  137. <div style="color:#000;" v-if="scope.row.user_id>0">{{scope.row.user.nickname}}</div>
  138. <div style="color:#000;" v-else>{{scope.row.user_name}}</div>
  139. <div style="font-size: 13px;" v-if="scope.row.user_id>0">{{scope.row.user.mobile}}</div>
  140. </div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="拉新人数" min-width="100" align="center">
  144. <template slot-scope="scope">
  145. <com-ellipsis :line="1">{{scope.row.new_num}}</com-ellipsis>
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <div style="text-align: right;margin: 20px 0;">
  150. <el-pagination v-if="pagination" :page-size="pagination.pageSize"
  151. style="display: inline-block;float: right;" background @current-change="pageChange"
  152. layout="prev, pager, next" :total="pagination.total_count">
  153. </el-pagination>
  154. </div>
  155. </div>
  156. </el-card>
  157. </div>
  158. <script>
  159. const app = new Vue({
  160. el: '#app',
  161. data() {
  162. return {
  163. list: [],
  164. cate_list:[],
  165. listLoading: false,
  166. btnLoading: false,
  167. pagination:null,
  168. page: 1,
  169. pageCount: 0,
  170. dataList: [],
  171. search: {
  172. user_id:'',
  173. user_keyword:'',
  174. cate_id:'',
  175. name:'',
  176. use_status:'',
  177. create_time:'',
  178. },
  179. // 对话框显示与否
  180. dialogVisible: false,
  181. dataloading: false,
  182. addGroupVisible: false,
  183. };
  184. },
  185. computed: {
  186. show_clear_search_btn: function() {
  187. return !isEmpty(this.search.user_id)
  188. ||!isEmpty(this.search.user_keyword)
  189. ||!isEmpty(this.search.name)
  190. ||!isEmpty(this.search.create_time)
  191. }
  192. },
  193. methods: {
  194. po(data){
  195. console.log(data,99);
  196. },
  197. resetSearch(){
  198. this.search = {
  199. user_id:'',
  200. user_keyword:'',
  201. name:'',
  202. create_time:'',
  203. }
  204. },
  205. searchs() {
  206. this.page = 1;
  207. this.getList();
  208. },
  209. pageChange(currentPage) {
  210. let self = this;
  211. self.page = currentPage; //console.log(currentPage,999999);
  212. self.getList();
  213. },
  214. getList() {
  215. let self = this;
  216. self.listLoading = true;
  217. request({
  218. params: {
  219. r: 'recommen/join-log/index',
  220. page: self.page,
  221. name: this.search.name,
  222. user_id: this.search.user_id,
  223. user_keyword: this.search.user_keyword,
  224. create_time: this.search.create_time,
  225. },
  226. method: 'get',
  227. }).then(e => {
  228. self.listLoading = false;
  229. self.list = e.data.data.list;
  230. this.pagination = e.data.data.pagination;
  231. this.pagination.pageSize = e.data.data.page_size;
  232. this.cate_list = e.data.data.cate;
  233. this.pagination.total_count = e.data.data.count;
  234. }).catch(e => {
  235. console.log(e);
  236. });
  237. },
  238. },
  239. mounted: function () {
  240. this.getList();
  241. }
  242. });
  243. </script>