增加:餐费积分管理

This commit is contained in:
wuhui_zzw 2024-06-20 10:36:57 +08:00
parent c7035d511e
commit c6810e19c1
4 changed files with 381 additions and 2 deletions

View File

@ -413,3 +413,11 @@ export function merShareholderDel(id) {
return request.post(`system/merchant/shareholder/del_info/${id}`)
}
// 共创股东 - 餐费积分 - 分组持有信息
export function merShareholderIntegralGroupList(data) {
return request.get('system/merchant/shareholder_integral/group_list', data)
}
// 共创股东 - 餐费积分 - 组详细信息
export function merShareholderIntegralList(data) {
return request.get('system/merchant/shareholder_integral/list', data)
}

View File

@ -357,6 +357,78 @@ const merchantRouter =
},
component: () => import('@/views/merchant/shareholder/level')
},
// 共创股东 - 餐费积分
{
path: 'mer_shareholder_integral',
name: 'MerShareholderIntegral',
meta: {
title: '联盟商家餐费积分',
noCache: true,
merchant_type: 0,
},
component: () => import('@/views/merchant/shareholder/integral')
},
{
path: 'shop_shareholder_integral',
name: 'MerchantShareholderIntegral',
meta: {
title: '酒道馆餐费积分',
noCache: true,
merchant_type: 1,
},
component: () => import('@/views/merchant/shareholder/integral')
},
{
path: 'smoke_shareholder_integral',
name: 'SmokeShareholderIntegral',
meta: {
title: '烟酒店餐费积分',
noCache: true,
merchant_type: 3,
},
component: () => import('@/views/merchant/shareholder/integral')
},
{
path: 'supermarket_shareholder_integral',
name: 'supermarketShareholderIntegral',
meta: {
title: '超市餐费积分',
noCache: true,
merchant_type: 4,
},
component: () => import('@/views/merchant/shareholder/integral')
},
{
path: 'province_shareholder_integral',
name: 'provinceShareholderIntegral',
meta: {
title: '省公司门店餐费积分',
noCache: true,
merchant_type: 5,
},
component: () => import('@/views/merchant/shareholder/integral')
},
{
path: 'hall_shareholder_integral',
name: 'hallShareholderIntegral',
meta: {
title: '城市会客厅餐费积分',
noCache: true,
merchant_type: 6,
},
component: () => import('@/views/merchant/shareholder/integral')
},
{
path: 'health_shareholder_integral',
name: 'healthShareholderIntegral',
meta: {
title: '健康体检馆餐费积分',
noCache: true,
merchant_type: 7,
},
component: () => import('@/views/merchant/shareholder/integral')
},

View File

@ -95,7 +95,7 @@
<el-pagination
:page-size="merTableFrom.limit"
:current-page="merTableFrom.page"
:total="merTableFrom.total"
:total="merTableData.total"
@current-change="allocationChangePage" />
<!-- 底部按钮 -->
<span slot="footer" class="dialog-footer">
@ -106,7 +106,7 @@
</template>
<script>
import {commissionList, deliveryMerList, deliveryOrderAllocation, deliveryOrderList} from '@/api/marketing'
import { deliveryMerList, deliveryOrderAllocation, deliveryOrderList} from '@/api/marketing'
export default {
name: "preSaleProductList",
components: { },

View File

@ -0,0 +1,299 @@
<template>
<div class="divBox">
<!--主要内容-->
<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-input v-model="tableFrom.uid" placeholder="请输入用户ID" clearable class="selWidth"></el-input>
<el-input v-model="tableFrom.mer_id" placeholder="请输入商户id" clearable class="selWidth">
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getGroupList(1)"/>
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<!--表格信息-->
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
<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.user.avatar || moren" />
</div>
<div class="user-info">
<div class="nickname">{{ scope.row.user.nickname || '' }}</div>
<div class="user-id">{{ scope.row.user.uid || '' }}</div>
</div>
</div>
</template>
</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.merchant.mer_avatar || moren" />
</div>
<div class="user-info">
<div class="nickname">{{ scope.row.merchant.mer_name || '' }}</div>
<div class="user-id">{{ scope.row.merchant.mer_id || '' }}</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="股东等级" prop="level_name" min-width="150" align="center"/>
<el-table-column label="餐费积分信息" align="center">
<el-table-column label="积分总额" prop="sum_integral_total" min-width="80" align="center"/>
<el-table-column label="已使用积分" prop="sum_integral_use" min-width="80" align="center"/>
<el-table-column label="冻结中积分" prop="sum_used_freeze" min-width="80" align="center"/>
<el-table-column label="已过期积分" prop="sum_used_overdue" min-width="80" align="center"/>
<el-table-column label="剩余可用积分" prop="sum_used_surplus" min-width="80" align="center"/>
</el-table-column>
<el-table-column label="操作" min-width="100" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="seeInfo(scope.row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<!--分页-->
<div class="block">
<el-pagination :page-size="tableFrom.limit" :current-page="tableFrom.page" :total="tableData.total" @current-change="pageChange" />
</div>
</el-card>
<!--详情列表弹框-->
<el-dialog title="请选择商户" :visible.sync="dialogStatus" width="1200px" :before-close="allocationClose">
<!--列表-->
<el-table v-loading="dialogLoading" :data="dialogTableData.data" style="width: 100%" size="small" highlight-current-row>
<el-table-column prop="mer_id" label="ID" min-width="60" align="center"/>
<el-table-column prop="integral_total" label="赠送积分" min-width="100" align="center"/>
<el-table-column prop="integral_use" label="已使用积分" min-width="100" align="center"/>
<el-table-column label="剩余可用积分" min-width="100" align="center">
<template slot-scope="scope">
{{ Number(scope.row.integral_total - scope.row.integral_use).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="状态" min-width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 0" type="info">冻结中</el-tag>
<el-tag v-else-if="scope.row.status == 1" type="success">可使用</el-tag>
<el-tag v-else-if="scope.row.status == 2" type="warning">已过期</el-tag>
</template>
</el-table-column>
<el-table-column prop="real_thaw_time" label="解冻时间" min-width="100" align="center"/>
<el-table-column prop="real_overdue_time" label="过期时间" min-width="100" align="center"/>
</el-table>
<!--分页-->
<el-pagination
:page-size="dialogTableFrom.limit"
:current-page="dialogTableFrom.page"
:total="dialogTableData.total"
@current-change="allocationChangePage" />
<!-- 底部按钮 -->
<span slot="footer" class="dialog-footer">
<el-button @click="allocationClose"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {merchantTypeText} from "@/filters";
import {merShareholderIntegralGroupList, merShareholderIntegralList} from "@/api/merchant";
export default {
name: "MerchantShareholderSet",
components: {},
data() {
return {
moren: require("@/assets/images/f.png"),
merchantTitle: '商户',
//
listLoading: false,
tableFrom: {
page: 1,
limit: 20,
uid: '',
mer_id: '',
merchant_type: '',
},
tableData: {
data: [],
total: 0,
},
//
currentInfo: {},
dialogStatus: false,
dialogLoading: false,
dialogTableFrom: {
page: 1,
limit: 10,
uid: '',
mer_id: '',
level_id: '',
},
dialogTableData: {
data: [],
total: 0
},
};
},
watch: {
//
'$route' () {
this.tableFrom.merchant_type = this.$route.meta.merchant_type || 0;
},
//
'tableFrom.merchant_type' () {
this.merchantTitle = merchantTypeText(this.tableFrom.merchant_type);
this.getGroupList();
},
},
mounted() {
this.tableFrom.merchant_type = this.$route.meta.merchant_type || 0;
},
methods: {
//
getGroupList(num = ''){
let _this = this;
_this.listLoading = true;
_this.tableFrom.page = num ? num : _this.tableFrom.page;
merShareholderIntegralGroupList(_this.tableFrom).then((res) => {
_this.tableData.data = res.data.list;
_this.tableData.total = res.data.count;
_this.listLoading = false;
}).catch((res) => {
_this.listLoading = false;
_this.$message.error(res.message);
});
},
pageChange(page) {
this.tableFrom.page = page;
this.getGroupList('');
},
// -
seeInfo(info){
this.currentInfo = Object.assign({}, info);
this.getList(1);
this.dialogStatus = true;
},
// -
getList(num){
let _this = this;
_this.dialogLoading = true;
_this.dialogTableFrom.page = num ? num : this.dialogTableFrom.page;
_this.dialogTableFrom.uid = this.currentInfo.uid;
_this.dialogTableFrom.mer_id = this.currentInfo.mer_id;
_this.dialogTableFrom.level_id = this.currentInfo.level_id;
//
merShareholderIntegralList(this.dialogTableFrom).then((res) => {
_this.dialogTableData.data = res.data.list;
_this.dialogTableData.total = res.data.count;
_this.dialogLoading = false;
}).catch((res) => {
_this.dialogLoading = false;
_this.$message.error(res.message);
});
},
// -
allocationClose(){
let _this = this;
_this.currentInfo = {};
_this.dialogStatus = false;
},
// -
allocationChangePage(page) {
this.getList(page);
},
}
};
</script>
<style scoped lang="scss">
.selWidth{
width: 300px;
}
/deep/ .el-select{
width: 100% !important;
}
/deep/ .cell{
padding: 0!important;
}
.user-content{
--user-content-height-: 80px;
height: var(--user-content-height-);
width: 100%;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
.user-avatar{
height: var(--user-content-height-);
width: var(--user-content-height-);
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
img{
height: 80%!important;
width: 80%!important;
border-radius: 50% !important;
}
}
.user-info{
max-width: calc(100% - var(--user-content-height-));
height: var(--user-content-height-);
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
.nickname{
width: 100%;
height: 25px;
line-height: 25px;
text-align: left;
font-size: 15px;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
.user-id{
color: #fff;
background-color: #409eff;
border-color: #409eff;
height: 18px;
line-height: 20px;
font-size: 13px;
padding: 0 5px;
border-radius: 5px;
margin-left: 10px;
width: max-content!important;
}
}
.user-id{
width: 100%;
text-align: left;
font-size: 13px;
line-height: calc(var(--user-content-height- * 35%));
}
}
}
</style>