2024-12-04 11:08:06 +00:00
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="tips">
|
|
|
|
|
<div>请谨慎操作此页面数据,避免频繁修改导致会员流失等不必要的损失。</div>
|
|
|
|
|
<div style="margin-top: 10px">
|
|
|
|
|
请注意,用户一旦达到某会员等级,后续修改会员等级要求不会影响用户已达到的会员等级,但可享有该等级对应的会员权益
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-top: 20px">
|
|
|
|
|
举例:24年2月,用户在本商铺的成长值达到500升级为VIP2,此时,VIP2会员权益享有的生日优惠卷1;
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-top: 10px">
|
|
|
|
|
24年3月,本商铺修改VIP2所需成长值为700,并新增会员生日优惠卷2;修改提交后,该用户会员等级保持VIP2不变且享有会员优惠卷1和会员优惠卷2;
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-13 10:59:26 +00:00
|
|
|
|
<div v-if="storeList.length > 1">
|
|
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
|
|
<el-form-item label="摊铺:">
|
|
|
|
|
<el-select v-model="formInline.shopId" placeholder="请选择摊铺::">
|
2024-12-04 11:08:06 +00:00
|
|
|
|
<el-option
|
2024-12-13 10:59:26 +00:00
|
|
|
|
v-for="item in storeList"
|
|
|
|
|
:key="item.shopId"
|
|
|
|
|
:label="item.shopName"
|
|
|
|
|
:value="item.shopId"
|
2024-12-04 11:08:06 +00:00
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
2024-12-13 10:59:26 +00:00
|
|
|
|
<el-button @click="getList" type="primary">查询</el-button>
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</el-form-item>
|
2024-12-13 10:59:26 +00:00
|
|
|
|
</el-form>
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="tipsLevel">
|
|
|
|
|
<div>
|
2024-12-12 12:42:06 +00:00
|
|
|
|
<span style="margin-right: 30px">全部等级({{ list.length }})</span
|
2024-12-13 10:59:26 +00:00
|
|
|
|
><el-button @click="add" type="primary">+新增套餐</el-button>
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2024-12-13 10:59:26 +00:00
|
|
|
|
<span v-if="!form.effective" style="margin-right: 30px"
|
|
|
|
|
>未开通会员</span
|
|
|
|
|
>
|
|
|
|
|
<span v-if="form.effective" style="margin-right: 30px"
|
|
|
|
|
>会员到期时间 {{ form.effectiveEndTime }}</span
|
|
|
|
|
>
|
|
|
|
|
<el-button @click="addSetMenu" type="primary">购买工具</el-button>
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="list" :border="true" style="width: 100%">
|
|
|
|
|
<el-table-column
|
2024-12-12 09:51:19 +00:00
|
|
|
|
width="140"
|
2024-12-04 11:08:06 +00:00
|
|
|
|
align="center"
|
2024-12-12 09:51:19 +00:00
|
|
|
|
label="等级名称"
|
|
|
|
|
prop="levelName"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="140"
|
|
|
|
|
align="center"
|
|
|
|
|
label="所需成长值"
|
|
|
|
|
prop="requiredGrowthValue"
|
2024-12-04 11:08:06 +00:00
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
2024-12-12 09:51:19 +00:00
|
|
|
|
width="140"
|
2024-12-04 11:08:06 +00:00
|
|
|
|
align="center"
|
|
|
|
|
label="会员人数"
|
2024-12-12 09:51:19 +00:00
|
|
|
|
prop="memberCount"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
label="会员权益"
|
|
|
|
|
prop="packageEffectiveTimeQuantity"
|
2024-12-04 11:08:06 +00:00
|
|
|
|
>
|
2024-12-12 09:51:19 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>
|
2024-12-12 12:42:06 +00:00
|
|
|
|
<span>{{ scope.row.enableMemberDiscount ? "会员折扣," : "" }}</span>
|
|
|
|
|
<span>{{
|
|
|
|
|
scope.row.enablePointsRedemption ? "积分兑换," : ""
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>{{
|
|
|
|
|
scope.row.enableBirthdayCoupons ? "生日优惠卷," : ""
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>{{
|
|
|
|
|
scope.row.enableBirthdayReward ? "生日双倍积分" : ""
|
|
|
|
|
}}</span>
|
2024-12-12 09:51:19 +00:00
|
|
|
|
</div>
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-12 09:51:19 +00:00
|
|
|
|
|
|
|
|
|
<!-- <el-table-column align="center" label="操作" fixed="right" width="240"> -->
|
|
|
|
|
<!-- <template v-slot="scope">
|
2024-12-04 11:08:06 +00:00
|
|
|
|
<el-button @click="add(scope.row)" type="primary">编辑</el-button>
|
|
|
|
|
<el-button @click="add(scope.row)" type="primary">转移</el-button>
|
|
|
|
|
<el-popconfirm
|
|
|
|
|
confirm-button-text="确定"
|
|
|
|
|
cancel-button-text="取消"
|
|
|
|
|
icon-color="#626AEF"
|
|
|
|
|
title="确定删除吗?"
|
|
|
|
|
@confirm="confirmEvent(scope.row)"
|
|
|
|
|
@cancel="cancelEvent"
|
|
|
|
|
>
|
|
|
|
|
<template #reference>
|
|
|
|
|
<el-button type="danger">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-popconfirm>
|
2024-12-12 09:51:19 +00:00
|
|
|
|
</template> -->
|
|
|
|
|
<!-- </el-table-column> -->
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</el-table>
|
2024-12-12 09:51:19 +00:00
|
|
|
|
<!-- 添加 -->
|
2024-12-12 12:42:06 +00:00
|
|
|
|
<addOrUpdate @getList="getList" ref="addOrUpdate"></addOrUpdate>
|
2024-12-13 10:59:26 +00:00
|
|
|
|
<!-- 添加套餐 -->
|
|
|
|
|
<set-menu @getList="getList" ref="setMenu"></set-menu>
|
2024-12-04 11:08:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-12-13 10:59:26 +00:00
|
|
|
|
import setMenu from "./popup/set-menu.vue";
|
2024-12-12 09:51:19 +00:00
|
|
|
|
import addOrUpdate from "./popup/add-or-update.vue";
|
2024-12-05 11:57:56 +00:00
|
|
|
|
import { mapState } from "vuex";
|
2024-12-04 11:08:06 +00:00
|
|
|
|
export default {
|
2024-12-12 09:51:19 +00:00
|
|
|
|
components: {
|
|
|
|
|
addOrUpdate,
|
2024-12-13 10:59:26 +00:00
|
|
|
|
setMenu,
|
2024-12-12 09:51:19 +00:00
|
|
|
|
},
|
2024-12-04 11:08:06 +00:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
list: [],
|
|
|
|
|
formInline: {
|
2024-12-13 10:59:26 +00:00
|
|
|
|
unitType: "",
|
2024-12-04 11:08:06 +00:00
|
|
|
|
marketId: "",
|
|
|
|
|
shopId: "",
|
|
|
|
|
},
|
2024-12-13 10:59:26 +00:00
|
|
|
|
form: {},
|
2024-12-04 11:08:06 +00:00
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
2024-12-05 11:57:56 +00:00
|
|
|
|
this.formInline = {
|
2025-02-19 02:02:39 +00:00
|
|
|
|
unitType:
|
|
|
|
|
JSON.parse(sessionStorage.getItem("userInfo")).role == "ROLE_MERCHANT"
|
|
|
|
|
? 3
|
|
|
|
|
: 2,
|
2024-12-05 11:57:56 +00:00
|
|
|
|
marketId: this.marketId,
|
2024-12-12 12:42:06 +00:00
|
|
|
|
shopId: this.shopId,
|
2024-12-05 11:57:56 +00:00
|
|
|
|
};
|
|
|
|
|
this.getList();
|
2024-12-04 11:08:06 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-12-05 11:57:56 +00:00
|
|
|
|
// getData() {
|
|
|
|
|
// this.$api.mer_admin
|
|
|
|
|
// .storeList({ marketId: this.formInline.marketId })
|
|
|
|
|
// .then((res) => {
|
|
|
|
|
// this.storeList = res.data.data;
|
|
|
|
|
// this.formInline.shopId = res.data.data[0].shopId;
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.getList();
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// },
|
2024-12-04 11:08:06 +00:00
|
|
|
|
getList() {
|
|
|
|
|
this.$api.marketing.marketingLevelPage(this.formInline).then((res) => {
|
2024-12-13 10:59:26 +00:00
|
|
|
|
this.list = res.data.data ? res.data.data : [];
|
|
|
|
|
});
|
|
|
|
|
this.$api.marketing.getEffective(this.formInline).then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.form = res.data.data;
|
2024-12-04 11:08:06 +00:00
|
|
|
|
});
|
|
|
|
|
},
|
2024-12-12 09:51:19 +00:00
|
|
|
|
add() {
|
2024-12-13 10:59:26 +00:00
|
|
|
|
this.$refs.addOrUpdate.toggle().add(this.formInline);
|
|
|
|
|
},
|
|
|
|
|
addSetMenu() {
|
|
|
|
|
this.$refs.setMenu.toggle().add(this.formInline);
|
2024-12-12 09:51:19 +00:00
|
|
|
|
},
|
2024-12-04 11:08:06 +00:00
|
|
|
|
confirmEvent() {},
|
|
|
|
|
cancelEvent() {},
|
|
|
|
|
},
|
2024-12-05 11:57:56 +00:00
|
|
|
|
computed: {
|
|
|
|
|
...mapState("userData", [
|
|
|
|
|
"isMerchant",
|
|
|
|
|
"marketList",
|
|
|
|
|
"storeList",
|
|
|
|
|
"marketId",
|
|
|
|
|
"shopId",
|
|
|
|
|
]),
|
|
|
|
|
},
|
2024-12-04 11:08:06 +00:00
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss" >
|
|
|
|
|
.tips {
|
|
|
|
|
padding: 15px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
background: #e5e5e5;
|
|
|
|
|
color: #faa639;
|
|
|
|
|
}
|
|
|
|
|
.tipsLevel {
|
|
|
|
|
margin: 20px 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
</style>
|