| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>往期奖金池</span>
- <div style="float: right; margin: -5px 0">
- </div>
- </div>
- </div>
- <div class="table-body">
- 发放时间:
- <el-date-picker
- class="item-box"
- size="small"
- @change="win_changeTime"
- v-model="searchData.time"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- <div style="display: inline-block;margin-left: 10px;">
- <el-button type="primary" size="small" @click="search">查询</el-button>
- <el-button type="primary" size="small" @click="resetForm" style=" margin-left: 0px;background-color: #ef1818;border-color: #ef1818;">重置</el-button>
- </div>
- <el-table class="table-info" :data="form" stripe style="width: 100%" v-loading="listLoading">
- <el-table-column prop="id" label="期数" width="60" align="center"></el-table-column>
- <el-table-column prop="created_at" label="发放时间" width="160px" align="center">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column prop="money" label="总金额(元)" align="center">
- <template slot-scope="scope">{{scope.row.money ? scope.row.money :'--'}}</template>
- </el-table-column>
- <el-table-column prop="user_num" label="发放人数" align="center">
- <template slot-scope="scope">{{scope.row.user_num ? scope.row.user_num :'--'}}</template>
- </el-table-column>
- <el-table-column prop="user_price" label="人均分红(元)" align="center">
- <template slot-scope="scope">{{scope.row.user_price ? scope.row.user_price :'--'}}</template>
- </el-table-column>
- <el-table-column prop="after_money" label="发放后奖金池(元)" align="center">
- <template slot-scope="scope">{{scope.row.after_money ? scope.row.after_money :'--'}}</template>
- </el-table-column>
- <el-table-column label="操作" width="250" align="center">
- <template slot-scope="scope">
- <el-button circle size="small" type="text" @click="detail(scope.row.id)">查看人数</el-button>
- </template>
- </el-table-column>
-
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
- </div>
- </div>
-
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- searchData: {
- date_start:'',
- date_end:'',
- },
- form: [],
- member: [],
- pageCount: 0,
- page: 1,
- member_page: 1,
- currentPage: null,
- listLoading: false,
- btnLoading: false,
- group_status_map:[],
- attendTypeArr:[],
- };
- },
- methods: {
- openId(index) {
- let item = this.form;
- item[index].is_open_id = !item[index].is_open_id;
- this.form = JSON.parse(JSON.stringify(this.form));
- },
- win_changeTime() {
- if (this.searchData.time) {
- this.searchData.date_start = this.searchData.time[0];
- this.searchData.date_end = this.searchData.time[1];
- }
- console.log( this.searchData);
- },
-
- //搜索
- search() {
- this.page = 1;
- this.getList();
- },
- pagination(currentPage) {
- this.page = currentPage;
- this.getList();
- },
- getList() {
- this.listLoading = true;
- request({
- params: {
- r: 'lucky-group/bonus-log/index',
- page: this.page,
- date_start:this.searchData.date_start,
- date_end:this.searchData.date_end,
- pagesize:10
- },
- }).then(e => {
- if (e.data.code === 0) {
- this.form = e.data.data.list;
- this.pageCount = e.data.data.page_count;
- this.currentPage = e.data.data.pagination.current_page;
- } else {
- this.$message.error(e.data.msg);
- }
- this.listLoading = false;
- }).catch(e => {
- this.listLoading = false;
- });
- },
- detail(id = null) {
- let request_url = {
- r: 'lucky-group/reward-pool/index'
- };
- if (id) request_url.bonus_log_id = id;
- navigateTo(request_url);
- },
- //重置
- resetForm() {
- this.searchData.time = '';
- },
- },
- mounted: function() {
- this.page = getQuery('page') ? getQuery('page') : 1;
- this.getList();
- }
- });
- </script>
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- /* .table-info .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- } */
- .input-item {
- display: inline-block;
- width: 150px;
- margin: 0 0 20px;
- }
- .input-item .el-input__inner {
- border-right: 1px solid #dcdfe6;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .select {
- float: left;
- width: 100px;
- margin-right: 10px;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- </style>
|