| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <?php
- /**
- * @link:http://www.goodmall.com/
- * @copyright: Copyright (c) 2020
- * 名片
- * Author: james
- * Date: 2020-07-10
- * Time: 15:48
- */
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>提成明细</span>
- </div>
- <div class="table-body">
- <el-form size="small" :inline="true" flex="dir:left cross:center">
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">视频ID</div>
- <el-input size="small" style="width: 200px" v-model="search.video_id" placeholder="请输入ID"></el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">会员昵称</div>
- <el-input size="small" style="width: 200px" v-model="search.nickname" placeholder="请输入会员呢称"></el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">订单编号</div>
- <el-input size="small" style="width: 200px" v-model="search.order_no" placeholder="请输入订单编号"></el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">创建时间</div>
- <el-date-picker @change="selectedDateTime" size="small" v-model="time" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" clearable>
- </el-date-picker>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索
- </el-button>
- </div>
- <div class="item-box" flex="dir:left cross:center" v-if="search.video_id || search.nickname || search.order_no || search.start_time || search.end_time">
- <el-button size="small" type="warning" style="padding: 9px 15px !important;" @click="clearSearchs">清除搜索条件
- </el-button>
- </div>
- </el-form>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
- <el-table-column prop="video_id" label="视频ID" min-width="80" align="center"></el-table-column>
- <el-table-column prop="avatar_url,nickname" label="会员" min-width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div v-if="scope.row.nickname">{{scope.row.nickname}} [ID: {{scope.row.user_id}}]</div>
- <div>{{scope.row.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="goods_name" label="关联商品" min-width="100" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.goods_name}}</div>
- </template>
- </el-table-column>
- <el-table-column label="订单号" prop="order_no" min-width="150" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.order_no}}</div>
- </template>
- </el-table-column>
- <el-table-column label="订单金额(元)" prop="total_pay_price" min-width="100" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.total_pay_price}}</div>
- </template>
- </el-table-column>
- <el-table-column label="商品售价(元)" prop="goods_price" min-width="100" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.goods_price}}</div>
- </template>
- </el-table-column>
- <el-table-column label="分红比例(%)" prop="award_percentage" min-width="100" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.award_percentage}}</div>
- </template>
- </el-table-column>
- <el-table-column label="分红金额(元)" prop="dividend" min-width="100" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.award_money}}</div>
- </template>
- </el-table-column>
- <el-table-column label="状态" width="150" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.is_settlement==0?'待结算':'已结算'}}</div><!-- flex="cross:top cross:center" -->
- </template>
- </el-table-column><!-- fixed="right" -->
- <el-table-column label="发布时间" prop="created_at" min-width="160" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- </el-table>
- </el-tabs>
- <!-- 分页器 -->
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :page-count="pageCount">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- page: 1,
- time: [], //本地存时间,请求时不发送
- search: {
- video_id: null, //视频id
- nickname: null, //昵称
- order_no: null,
- start_time: null,
- end_time: null,
- },
- loading: false,
- activeName: '-1',
- list: [], //列表数据
- pagination: null,
- pageCount: 1,
- },
- mounted() {
- this.loadData(this.page, this.search); //获取列表数据
- },
- methods: {
- // 1.0 获取分红列表
- loadData(page, others) {
- this.loading = true;
- request({
- params: {
- r: 'short-video/default/share-benefits',
- page: page,
- ...others, //其他搜索字段
- },
- method: 'get'
- }).then(e => {
- this.loading = false;
- if (e.data.code === 0) {
- this.list = e.data.data.list;
- this.pagination = e.data.data.pagination;
- this.pageCount = e.data.data.page_count;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {});
- },
- pageChange(page) {
- this.page = page;
- this.loadData(this.page, this.search);
- },
- handleClick(tab, event) {
- this.page = 1;
- this.search.status = this.activeName;
- this.loadData(this.page, this.search)
- },
- handleSelectionChange(val) {
- let self = this;
- self.choose_list = [];
- val.forEach(function(item) {
- self.choose_list.push(item.id);
- })
- },
- searchs() {
- this.page = 1;
- this.loadData(this.page, this.search);
- },
- clearSearchs() {
- this.search.video_id = null;
- this.search.nickname = null;
- this.search.order_no = null;
- this.search.start_time = null;
- this.search.end_time = null;
- this.time = [];
- this.loadData(this.page, this.search);
- },
- // 时间搜索选中
- selectedDateTime(val) {
- console.log(val);
- if (val) {
- this.search.start_time = val[0];
- this.search.end_time = val[1];
- } else {
- this.time = [];
- this.search.start_time = null;
- this.search.end_time = null;
- }
- this.loadData(1, this.search);
- },
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .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;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- .item-box {
- margin-right: 20px;
- }
- .item-box .label {
- margin-right: 8px;
- }
- .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>
|