index.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <div>
  5. <span>往期奖金池</span>
  6. <div style="float: right; margin: -5px 0">
  7. </div>
  8. </div>
  9. </div>
  10. <div class="table-body">
  11. 发放时间:
  12. <el-date-picker
  13. class="item-box"
  14. size="small"
  15. @change="win_changeTime"
  16. v-model="searchData.time"
  17. type="datetimerange"
  18. value-format="yyyy-MM-dd HH:mm:ss"
  19. range-separator="至"
  20. start-placeholder="开始日期"
  21. end-placeholder="结束日期">
  22. </el-date-picker>
  23. <div style="display: inline-block;margin-left: 10px;">
  24. <el-button type="primary" size="small" @click="search">查询</el-button>
  25. <el-button type="primary" size="small" @click="resetForm" style=" margin-left: 0px;background-color: #ef1818;border-color: #ef1818;">重置</el-button>
  26. </div>
  27. <el-table class="table-info" :data="form" stripe style="width: 100%" v-loading="listLoading">
  28. <el-table-column prop="id" label="期数" width="60" align="center"></el-table-column>
  29. <el-table-column prop="created_at" label="发放时间" width="160px" align="center">
  30. <template slot-scope="scope">
  31. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="money" label="总金额(元)" align="center">
  35. <template slot-scope="scope">{{scope.row.money ? scope.row.money :'--'}}</template>
  36. </el-table-column>
  37. <el-table-column prop="user_num" label="发放人数" align="center">
  38. <template slot-scope="scope">{{scope.row.user_num ? scope.row.user_num :'--'}}</template>
  39. </el-table-column>
  40. <el-table-column prop="user_price" label="人均分红(元)" align="center">
  41. <template slot-scope="scope">{{scope.row.user_price ? scope.row.user_price :'--'}}</template>
  42. </el-table-column>
  43. <el-table-column prop="after_money" label="发放后奖金池(元)" align="center">
  44. <template slot-scope="scope">{{scope.row.after_money ? scope.row.after_money :'--'}}</template>
  45. </el-table-column>
  46. <el-table-column label="操作" width="250" align="center">
  47. <template slot-scope="scope">
  48. <el-button circle size="small" type="text" @click="detail(scope.row.id)">查看人数</el-button>
  49. </template>
  50. </el-table-column>
  51. </el-table>
  52. <div style="text-align: right;margin: 20px 0;">
  53. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  54. </div>
  55. </div>
  56. </el-card>
  57. </div>
  58. <script>
  59. const app = new Vue({
  60. el: '#app',
  61. data() {
  62. return {
  63. searchData: {
  64. date_start:'',
  65. date_end:'',
  66. },
  67. form: [],
  68. member: [],
  69. pageCount: 0,
  70. page: 1,
  71. member_page: 1,
  72. currentPage: null,
  73. listLoading: false,
  74. btnLoading: false,
  75. group_status_map:[],
  76. attendTypeArr:[],
  77. };
  78. },
  79. methods: {
  80. openId(index) {
  81. let item = this.form;
  82. item[index].is_open_id = !item[index].is_open_id;
  83. this.form = JSON.parse(JSON.stringify(this.form));
  84. },
  85. win_changeTime() {
  86. if (this.searchData.time) {
  87. this.searchData.date_start = this.searchData.time[0];
  88. this.searchData.date_end = this.searchData.time[1];
  89. }
  90. console.log( this.searchData);
  91. },
  92. //搜索
  93. search() {
  94. this.page = 1;
  95. this.getList();
  96. },
  97. pagination(currentPage) {
  98. this.page = currentPage;
  99. this.getList();
  100. },
  101. getList() {
  102. this.listLoading = true;
  103. request({
  104. params: {
  105. r: 'lucky-group/bonus-log/index',
  106. page: this.page,
  107. date_start:this.searchData.date_start,
  108. date_end:this.searchData.date_end,
  109. pagesize:10
  110. },
  111. }).then(e => {
  112. if (e.data.code === 0) {
  113. this.form = e.data.data.list;
  114. this.pageCount = e.data.data.page_count;
  115. this.currentPage = e.data.data.pagination.current_page;
  116. } else {
  117. this.$message.error(e.data.msg);
  118. }
  119. this.listLoading = false;
  120. }).catch(e => {
  121. this.listLoading = false;
  122. });
  123. },
  124. detail(id = null) {
  125. let request_url = {
  126. r: 'lucky-group/reward-pool/index'
  127. };
  128. if (id) request_url.bonus_log_id = id;
  129. navigateTo(request_url);
  130. },
  131. //重置
  132. resetForm() {
  133. this.searchData.time = '';
  134. },
  135. },
  136. mounted: function() {
  137. this.page = getQuery('page') ? getQuery('page') : 1;
  138. this.getList();
  139. }
  140. });
  141. </script>
  142. <style>
  143. .table-body {
  144. padding: 20px;
  145. background-color: #fff;
  146. }
  147. /* .table-info .el-button {
  148. padding: 0 !important;
  149. border: 0;
  150. margin: 0 5px;
  151. } */
  152. .input-item {
  153. display: inline-block;
  154. width: 150px;
  155. margin: 0 0 20px;
  156. }
  157. .input-item .el-input__inner {
  158. border-right: 1px solid #dcdfe6;
  159. }
  160. .input-item .el-input__inner:hover {
  161. border: 1px solid #dcdfe6;
  162. border-right: 0;
  163. outline: 0;
  164. }
  165. .input-item .el-input__inner:focus {
  166. border: 1px solid #dcdfe6;
  167. border-right: 0;
  168. outline: 0;
  169. }
  170. .input-item .el-input-group__append {
  171. background-color: #fff;
  172. border-left: 0;
  173. width: 10%;
  174. padding: 0;
  175. }
  176. .input-item .el-input-group__append .el-button {
  177. padding: 0;
  178. }
  179. .input-item .el-input-group__append .el-button {
  180. margin: 0;
  181. }
  182. .select {
  183. float: left;
  184. width: 100px;
  185. margin-right: 10px;
  186. }
  187. .el-table th>.cell {
  188. color: #333;
  189. font-weight: bold;
  190. font-size: 14px;
  191. }
  192. .el-table__footer-wrapper,
  193. .el-table__header-wrapper {
  194. border-bottom: 1.4px solid #D6D6D6;
  195. }
  196. </style>