208 lines
7.0 KiB
HTML
208 lines
7.0 KiB
HTML
{extend name="app/shop/view/base.html"/}
|
||
{block name="resources"}
|
||
<link rel="stylesheet" href="__STATIC__/element-ui/index.css">
|
||
<script src="STATIC_JS/vue.js"></script>
|
||
<script src="__STATIC__/element-ui/index.js"></script>
|
||
<style>
|
||
.pagination{
|
||
text-align: right!important;
|
||
padding-top: 20px!important;
|
||
}
|
||
.cell{
|
||
padding: 0!important;
|
||
}
|
||
.user-content{
|
||
width: 100%;
|
||
display: inline-flex;
|
||
flex-direction: row;
|
||
flex-wrap: nowrap;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.user-content .user-avatar{
|
||
height: 65px;
|
||
width: 65px;
|
||
display: inline-flex;
|
||
flex-direction: row;
|
||
flex-wrap: nowrap;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.user-content .user-avatar img{
|
||
height: 80%!important;
|
||
width: 80%!important;
|
||
border-radius: 50% !important;
|
||
}
|
||
.user-content .user-info{
|
||
width: calc(100% - 70px) !important;
|
||
display: inline-flex;
|
||
flex-direction: column;
|
||
flex-wrap: nowrap;
|
||
justify-content: center;
|
||
align-items: flex-start;
|
||
}
|
||
.user-content .user-info .nickname{
|
||
font-size: 15px;
|
||
font-weight: bold;
|
||
height: 30px;
|
||
line-height: 30px;
|
||
width: 100%;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.user-content .user-info .user-id{
|
||
font-size: 13px;
|
||
height: 25px;
|
||
line-height: 25px;
|
||
width: 100%;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.rate-num{
|
||
margin-top: 5px!important;
|
||
}
|
||
.selWidth {
|
||
width: 350px !important;
|
||
margin-bottom: 5px;
|
||
}
|
||
</style>
|
||
{/block}
|
||
|
||
{block name="main"}
|
||
<div id="vueContent">
|
||
<el-card class="box-card">
|
||
<!--顶部搜索栏-->
|
||
<div slot="header" class="clearfix">
|
||
<div class="container">
|
||
<el-form inline size="small" label-width="80px">
|
||
<el-form-item label="搜索">
|
||
<el-select v-model="tableFrom.status" placeholder="请选择结算状态" class="filter-item selWidth" clearable>
|
||
<el-option label="待结算" value="0"></el-option>
|
||
<el-option label="已结算" value="1"></el-option>
|
||
<el-option label="已退款" value="2"></el-option>
|
||
</el-select>
|
||
<el-select v-model="tableFrom.account_type" placeholder="请选择佣金类型" class="filter-item selWidth" clearable>
|
||
<el-option label="团队奖" value="1"></el-option>
|
||
<el-option label="平级奖" value="2"></el-option>
|
||
<el-option label="管理奖" value="3"></el-option>
|
||
</el-select>
|
||
<el-input v-model="tableFrom.member_id" placeholder="请输入用户ID" class="selWidth" clearable>
|
||
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getList(1)"></el-button>
|
||
</el-input>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
<!--表格信息-->
|
||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%">
|
||
<el-table-column prop="id" label="ID" min-width="50" align="center"></el-table-column>
|
||
<el-table-column label="用户信息" min-width="230" align="center">
|
||
<template slot-scope="scope">
|
||
<div class="user-content">
|
||
<div class="user-avatar">
|
||
<img :src="scope.row.headimg || moren" />
|
||
</div>
|
||
<div class="user-info">
|
||
<div class="nickname">{{ scope.row.nickname || scope.row.username }}</div>
|
||
<div class="user-id">UID:{{ scope.row.member_id }}</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="订单信息" align="center">
|
||
<el-table-column label="订单号" prop="order_no" min-width="160" align="center"></el-table-column>
|
||
<el-table-column label="订单金额" prop="order_money" min-width="80" align="center"></el-table-column>
|
||
<el-table-column label="商品名称" prop="sku_name" min-width="150" align="center"></el-table-column>
|
||
</el-table-column>
|
||
<el-table-column label="佣金信息" align="center">
|
||
<el-table-column label="佣金类型" min-width="80" align="center">
|
||
<template slot-scope="scope">
|
||
<el-tag v-if="scope.row.account_type == 1">团队奖励</el-tag>
|
||
<el-tag v-else-if="scope.row.account_type == 2" type="info">平级奖</el-tag>
|
||
<el-tag v-else-if="scope.row.account_type == 3" type="info">管理奖</el-tag>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="状态" min-width="80" align="center">
|
||
<template slot-scope="scope">
|
||
<el-tag v-if="scope.row.status == 0" type="info" effect="dark">待结算</el-tag>
|
||
<el-tag v-else-if="scope.row.status == 1" type="success" effect="dark">已结算</el-tag>
|
||
<el-tag v-else-if="scope.row.status == 2" type="danger" effect="dark">已退款</el-tag>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="比例" min-width="80" align="center">
|
||
<template slot-scope="scope">
|
||
{{scope.row.use_rate || 0}}%
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="佣金金额" prop="account_data" min-width="80" align="center"></el-table-column>
|
||
<el-table-column label="奖励层级" prop="tier" min-width="80" align="center"></el-table-column>
|
||
</el-table-column>
|
||
<el-table-column label="添加时间" prop="create_time" min-width="150" align="center"></el-table-column>
|
||
</el-table>
|
||
<!--分页-->
|
||
<div class="pagination">
|
||
<el-pagination :current-page="tableFrom.page" hide-on-single-page :total="tableData.total" @current-change="pageChange"></el-pagination>
|
||
</div>
|
||
</el-card>
|
||
</div>
|
||
{/block}
|
||
|
||
{block name="script"}
|
||
<script>
|
||
new Vue({
|
||
el:'#vueContent',
|
||
data(){
|
||
return {
|
||
moren: '/public/static/img/default_img/head.png',
|
||
// 列表相关
|
||
listLoading: true,
|
||
tableData: {
|
||
data: [],
|
||
total: 0,
|
||
},
|
||
tableFrom: {
|
||
page: 1,
|
||
limit: 10,
|
||
status: '',
|
||
account_type: '',
|
||
member_id: ''
|
||
},
|
||
};
|
||
},
|
||
mounted(){
|
||
this.getList('');
|
||
},
|
||
methods: {
|
||
// 获取列表
|
||
getList(num) {
|
||
let _this = this;
|
||
_this.listLoading = true;
|
||
_this.tableFrom.page = num ? num : this.tableFrom.page;
|
||
$.ajax({
|
||
url: ns.url("team://shop/index/commissionIndex"),
|
||
data: { params: _this.tableFrom },
|
||
dataType: 'JSON',
|
||
type: 'POST',
|
||
success: function(res) {
|
||
if(Number(res.code) === 0){
|
||
let data = res.data || {};
|
||
_this.tableData.data = data.list || {};
|
||
_this.tableData.total = data.count || 0;
|
||
_this.listLoading = false;
|
||
}
|
||
}
|
||
});
|
||
},
|
||
pageChange(page) {
|
||
this.tableFrom.page = page;
|
||
this.getList('');
|
||
},
|
||
|
||
}
|
||
});
|
||
</script>
|
||
{/block} |