| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <style>
- .item-box .label{
- margin-right:5px;
- }
- .item-box .search-btn{
- margin-left:5px;
- }
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div class="table-body el-input--small">
- <el-form size="small" :inline="true" flex="dir:left cross:center" style="margin-bottom: 12px;">
- <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px">
- <div class="label">释放期数</div>
- <el-input style="width: 250px" v-model="search.release_num" placeholder="释放期数"></el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">时间</div>
- <el-date-picker
- v-model="time"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <el-button type="primary" size="small" class="search-btn" @click="searchs">搜索
- </el-button>
- </div>
- </el-form>
- <el-table v-if="releaseList && releaseList.length > 0" :data="releaseList" fit stripe style="width: 100%;margin-top:10px;" >
- <el-table-column prop="release_num" label="释放期数" >
- <template slot-scope="scope">
- 第{{ scope.row.release_num }}期
- </template>
- </el-table-column>
- <el-table-column prop="total_seed_num" label="种子金数量" ></el-table-column>
- <el-table-column prop="release_energy_pool" label="能量池能量" ></el-table-column>
- <el-table-column prop="unit_price" label="价值增长额" ></el-table-column>
- <el-table-column label="状态" >
- <template slot-scope="scope">
- <el-tag v-if="scope.row.release_status == 0">释放中</el-tag>
- <el-tag v-if="scope.row.release_status == 1" type="success">释放成功</el-tag>
- <el-tooltip v-if="scope.row.release_status == 2" class="item" effect="dark" :content="scope.row.reason" placement="top">
- <el-tag type="danger">释放失败</el-tag>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column label="释放时间">
- <template slot-scope="scope">
- <div flex>
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s') }}
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination v-if="pagination" :page-size="pagination.pageSize"
- style="display: inline-block;float: right;" background @current-change="pageChange"
- layout="prev, pager, next" :total="pagination.total_count">
- </el-pagination>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- search:{
- release_num:null,
- start_at:'',
- end_at:''
- },
- page:1,
- limit:20,
- releaseList:[],
- listLoading: false,
- pagination:null,
- time:[]
- },
- mounted() {
- this.search.user_id = getQuery('user_id');
- this.getList()
- },
- methods: {
- searchs(){
- this.page = 1;
- this.getList();
- },
- toOrderDetail(order_no){
- this.$navigate({
- r: 'seed/index/change-log',
- order_no: order_no
- })
- },
- getList() { //种子金用户记录
- let self = this;
- self.listLoading = true;
- console.log(this.time,'--------------')
- if(this.time){
- this.search.start_at = this.time[0];
- this.search.end_at = this.time[1];
- }else{
- this.search.start_at ='';
- this.search.end_at = '';
- }
- request({
- method: 'get',
- params: {
- r: '/seed/pool/release',
- page: self.page,
- limit:self.limit,
- release_num: this.search.release_num,//订单号
- start_at: this.search.start_at,
- end_at: this.search.end_at,
- },
- data: {},
- }).then(e => {
- self.listLoading = false;
- self.releaseList = e.data.data.list;
- self.pagination = e.data.data.pagination;
- self.pagination.pageSize = e.data.data.page_size;
- self.pagination.total_count = e.data.data.count;
- }).catch(e => {
- console.log(e);
- });
- },
- pageChange(currentPage) {
- let self = this;
- self.page = currentPage;
- self.getList();
- },
- }
- });
- </script>
|