Commit 1e4aac72 by shaojiawen

update: 集团积分/预扣积分

parent 7819c336
......@@ -372,12 +372,30 @@
<div class="flex-wrap">
<!-- 积分相关 -->
<div :class="['scores', { 'is-clique': showClique }]">
<div class="scores-clique" v-if="showClique">
<icon-label-value label="集团积分" :value="memberInfo.cliqueMemberIntegral ? memberInfo.cliqueMemberIntegral : 0">
<div class="scores-box" v-if="showClique" @click="goLinkWithClique('/enterpriseIntegralDataPage')">
<div class="scores-info">
<icon-label-value label="集团积分" :value="memberInfo.cliqueMemberIntegral ? memberInfo.cliqueMemberIntegral : 0">
<div class="score-icon" slot="icon">
<i class="iconfont icon-jifenjiabei"></i>
</div>
</icon-label-value>
<div class="score-detail">
<p class="score-detail-item">
<span class="score-detail-label">可用积分</span>
<span class="score-detail-value">{{ memberInfo.cliqueMemberIntegral ? memberInfo.cliqueMemberIntegral : 0 }}</span>
</p>
<p class="score-detail-item">
<span class="score-detail-label">
不可用积分
<el-tooltip content="不可用原因:积分为冻结/预扣状态,详情可查看客户日志" placement="top">
<i class="iconfont icon-QuestionCircleOutlined" style="font-size: 14px;color: #606266"/>
</el-tooltip>
</span>
<span class="score-detail-value">{{ memberInfo.cliqueMemberInvalidIntegral ? memberInfo.cliqueMemberInvalidIntegral : 0 }}</span>
</p>
</div>
</div>
<i class="el-icon-arrow-right" style="font-size: 16px;color: #909399"></i>
</div>
<div class="scores-box" @click="goLink('/integralDataPage')">
<div class="scores-info">
......
......@@ -384,6 +384,9 @@ export default {
goLink (v) {
if (v) this.$router.push({ path: v, query: { memberId: this.memberId } });
},
goLinkWithClique (v) {
if (v) this.$router.push({ path: v, query: { memberId: this.memberId ,cliqueMemberId: this.memberInfo.cliqueMemberId || ''} });
},
goStoreValue () {
if (this.memberInfo.storedValueFlag) {
this.$router.push({
......
......@@ -65,6 +65,8 @@ const urlConfig = {
updateRemark: '/api-member/member-load-update-remark',//修改导购备注信息
integralDataPage: '/api-member/member-integral-data-page',//积分列表(积分明细列表)
integralOperateType: '/api-member/member-integral-operate-type',//积分操作类型(字典列表)
enterpriseIntegralDetailData: '/api-member/page_clique_member_integral_log', // 集团积分(集团积分明细列表)
enterpriseIntegralWithholdData: '/api-member/member-integral-pre-deduction-page', // 预扣积分(集团积分明细列表)
memberIntegralUpdate: '/api-member/member-integral-update', //调整积分进行保存
enterpriseInfo: '/api-member/enterprise-info',//获取企业配置信息
memberLoadBaseDetail: '/api-member/member-load-base-detail',//获取客户基本信息
......
<template>
<div class="integral-tab">
<el-tabs v-model="activeName">
<el-tab-pane label="集团积分明细" name="first" >
<p class="font14 tip-p">展示近两年的积分明细</p>
<enterprise-integral-detial :member-id="memberId"></enterprise-integral-detial>
</el-tab-pane>
<el-tab-pane label="集团预扣明细" name="second">
<p class="font14 tip-p">展示近两年的预扣明细</p>
<enterprise-intergral-withhold :member-id="cliqueMemberId"></enterprise-intergral-withhold>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import enterpriseIntegralDetial from './enterpriseIntegralDetial.vue';
import enterpriseIntergralWithhold from './enterpriseIntergralWithhold.vue';
export default {
name: 'enterpriseIntegralDataPage',
components: { enterpriseIntegralDetial,enterpriseIntergralWithhold },
props: {
},
data() {
return {
activeName: 'first',
memberId: this.$route.query.memberId || "",
cliqueMemberId: this.$route.query.cliqueMemberId || ""
};
},
methods: {
goback() {
this.$router.push({
path: "wechatmemberDetail",
query: { memberId: this.memberId }
});
},
},
mounted() {
},
destroyed() {
}
};
</script>
<style lang="scss" scoped>
.integral-tab {
height: 100%;
// position: fixed;
/deep/ .el-tabs__header {
margin-bottom: 16px;
.el-tabs__nav-wrap {
padding: 0 20px;
}
}
/deep/ .el-tabs__content {
padding: 0 20px 20px;
height: calc(100% - 60px);
overflow-y: auto;
box-sizing: border-box;
}
}
.tip-p{
color: #6B6D71;
padding-bottom: 16px;
// position: fixed;
}
</style>
\ No newline at end of file
<template>
<div >
<div class="search-top mBottom20">
<div class="left-search-wrap">
<el-select
v-model="form.intervalInOut"
class="width160"
placeholder="所有日志"
@change="handleSearch"
>
<el-option
:key=-1
label="所有日志"
:value=-1
></el-option>
<el-option
:key=1
label="积分获取"
:value=1
></el-option>
<el-option
:key=2
label="积分扣除"
:value=2
></el-option>
</el-select>
<el-select
v-model="form.dictCode"
class="width160"
placeholder="所有事由"
@change="handleSearch"
>
<el-option
:key=-1
label="所有事由"
:value=-1
></el-option>
<el-option
v-for="item in dictList"
:key="item.dictCode"
:label="item.dictName"
:value="item.dictCode"
></el-option>
</el-select>
<el-select class="width160" v-model="form.sourceType" placeholder="所有来源渠道" @change="handleSearch">
<el-option label="所有来源渠道" :value=-1></el-option>
<el-option v-for="item in sourceTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="width160" v-model="form.frozenStatus" placeholder="所有积分状态" @change="handleSearch">
<el-option label="所有积分状态" :value=-1></el-option>
<el-option v-for="item in frozenStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-date-picker style="width: 256px;" v-model="dateDefault" type="daterange" range-separator="~" start-placeholder="创建开始日期" end-placeholder="创建结束日期" :default-time="['00:00:00', '23:59:59']" :picker-options="pickerOptions()" value-format="yyyy-MM-dd" @change="handleSearch"> </el-date-picker>
</div>
<el-button
type="primary"
@click="linkRoute('/integralDataPage')"
>查看品牌积分</el-button>
</div>
<div class="table-content">
<el-table
:data="memberData"
tooltip-effect="dark"
ref="multipleTable"
max-height="659"
>
<el-table-column
prop="createTime"
label="时间"
min-width="155px"
>
<template slot-scope="scope">
<div class="line-20">{{ scope.row.createTime | formatYMD }}</div>
<div class="line-20">{{ scope.row.createTime | formatHMS }}</div>
</template>
</el-table-column>
<el-table-column
prop="intervalInout"
label="日志类型"
min-width="90px"
>
<template slot-scope="scope">
<span v-if="scope.row.intervalInout == 1">积分获取</span>
<span v-if="scope.row.intervalInout == 0">积分扣除</span>
</template>
</el-table-column>
<el-table-column
prop="memberIntegralName"
label="事由"
min-width="90px"
></el-table-column>
<el-table-column
prop="intervalHistory"
label="日志详情"
min-width="90px"
></el-table-column>
<el-table-column prop="sourceType" label="来源渠道" min-width="90px" :formatter="formatSourceType"></el-table-column>
<el-table-column
prop="brandName"
label="来源品牌"
min-width="150px"
>
<template slot-scope="scope">
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.brandName || '--'}}</div>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
min-width="160px"
>
<template slot-scope="scope">
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.remark }}</div>
</template>
</el-table-column>
</el-table>
<div
class="page mTop20"
>
<dm-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[20, 40, 60, 80]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next"
:total="page.totalCount"
>
</dm-pagination>
</div>
</div>
</div>
</template>
<script>
import mixin from './integralMixin';
import nav from "../../common/navbar/navbar.vue";
import { doFetch } from "../../components/axios/api";
import url from "../../components/axios/url";
import {
checkFalse,
checkStatus
} from "../../../static/js/checkStatus";
// import searchinput from "common/searchinput";
// import authMethods from '@/mixins/auth';
export default {
name: "enterpriseIntegralDetial",
props:{
memberId:{
type: String,
default() {
return '';
}
}
},
components: {
"v-nav": nav,
// searchinput
},
data() {
return {
page: {
currentPage: 1,
pageSize: 20,
totalCount: 0
},
dictList: [],
sourceTypeList: [
{ label: 'GIC计算', value: 1 },
{ label: 'ERP同步', value: 2 },
{ label: 'API同步', value: 3 },
{ label: '批处理导入', value: 4 },
{ label: '天猫会员通', value: 5 },
{ label: '抖音', value: 7 }
],
frozenStatusList:[
{label:'冻结积分',value:1},
{label:'可用积分',value:0}
],
memberData: [
// {createTime:12334494943,intervalInout:1,memberIntegralName:'新增其他',intervalHistory:1333,sourceType:1}
],
form:{
intervalInOut: -1,
dictCode: -1,
sourceType: -1,
frozenStatus:-1,
},
};
},
mixins: [mixin],
methods: {
formatSourceType(row, col, val) {
const type = this.sourceTypeList.find(el => el.value == val) || {};
return type.label || '--';
},
linkRoute(route) {
this.$router.push({ path: route, query: { memberId: this.memberId } });
},
handleSearch() {
this.page.currentPage = 1;
this.getIntegralDataPage();
},
handleCurrentChange(val) {
this.page.currentPage = val;
this.getIntegralDataPage();
},
handleSizeChange(val) {
this.page.pageSize = val;
this.getIntegralDataPage();
},
getIntegralDataPage() {
let para = this.form
para['memberId'] = this.memberId
para['pageSize'] = this.page.pageSize
para['currentPage'] = this.page.currentPage
para['beginTime'] = this.dateDefault[0]
para['endTime'] = this.dateDefault[1]
// console.log(para);
doFetch(url.enterpriseIntegralDetailData, para)
.then(res => {
if (res.data.errorCode === 0) {
this.memberData =
res.data.result.page.result
// &&
// res.data.result.page.result.map(ele => ({
// ...ele,
// mainStoreName: !!ele.mainStoreName ? ele.mainStoreName : "--",
// openStoreName: !!ele.openStoreName ? ele.openStoreName : "--"
// }));
this.page.currentPage = res.data.result.page.currentPage;
this.page.totalCount = res.data.result.page.totalCount;
} else {
checkFalse(res.data.message);
}
})
.catch(err => {
checkStatus(err);
});
},
getIntegralOperateType() {
doFetch(url.integralOperateType, {
businessType: "member_integral",
dictStatus: 0
})
.then(res => {
if (res.data.errorCode === 0) {
res.data.result.dictList.forEach(ele => {
if (ele.dictCode == "1113") {
// 占位
}
});
this.dictList = res.data.result.dictList;
} else {
checkFalse();
}
})
.catch(err => {
checkStatus(err);
});
},
},
created() {
this.setDefalutTime()
if (this.memberId) {
this.getIntegralDataPage();
this.getIntegralOperateType();
}
},
};
</script>
<style lang="stylus">
.search-top{
display: flex;
justify-content:space-between;
align-items:center;
.left-search-wrap{
display: flex;
align-items:center;
gap:10px;
}
}
.width160{
width: 160px;
}
.w256{
width: 256px;
}
.wechat-point-details {
overflow: auto;
}
.line-20{
line-height: 20px;
}
</style>
<template>
<div >
<div class="mBottom20 search-top">
<div class="left-search-wrap">
<el-select
class="width160"
v-model="processStatus"
placeholder="处理状态"
@change="handleSearch"
>
<el-option
v-for="item in statusList"
:key="item.code"
:label="item.name"
:value="item.code"
></el-option>
</el-select>
<el-date-picker style="width: 256px;" v-model="dateDefault" type="daterange" range-separator="~" start-placeholder="创建开始日期" end-placeholder="创建结束日期" :default-time="['00:00:00', '23:59:59']" :picker-options="pickerOptions()" value-format="yyyy-MM-dd" @change="handleSearch"> </el-date-picker>
</div>
</div>
<div>
<el-table
:data="memberData"
tooltip-effect="dark"
ref="multipleTable"
max-height="659"
>
<el-table-column
prop="createTime"
label="时间"
min-width="157px"
>
<template slot-scope="scope">
<div class="line-20">{{ scope.row.createTime | formatYMD }}</div>
<div class="line-20">{{ scope.row.createTime | formatHMS }}</div>
</template>
</el-table-column>
<el-table-column prop="processStatus" label="处理状态" min-width="110px">
<template slot-scope="scope">
<span :class="statusList[scope.row.processStatus].icon"></span>
{{ statusList[scope.row.processStatus].name }}
</template>
</el-table-column>
<el-table-column
prop="integralVal"
label="预扣除积分值"
min-width="128px"
></el-table-column>
<el-table-column
prop="integralCode"
label="事由"
min-width="90px"
></el-table-column>
<el-table-column prop="sourceType" label="预扣截止时间" min-width="138px">
<template slot="header">
预扣截止时间
<el-tooltip effect="dark" placement="top">
<div slot="content">
<p>预扣积分到达“截止日期”,若还未确认扣除,系统将自动将这笔积分转为“可用”状态(无截止日期的预扣积分,系统不会主动变更积分状态)</p>
</div>
<i class="iconfont icon-QuestionCircleOutlined icon"></i>
</el-tooltip>
</template>
<template slot-scope="scope">
<div class="line-20">{{ scope.row.limitTime | formatYMD }}</div>
<div class="line-20">{{ scope.row.limitTime | formatHMS }}</div>
</template>
</el-table-column>
<el-table-column
prop="relationId"
label="关联id"
min-width="160px"
>
<template slot-scope="scope">
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.relationId }}</div>
</template>
</el-table-column>
<el-table-column
prop="openStoreName"
label="积分成本主体"
min-width="180px"
>
<template slot-scope="scope">
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.openStoreName }}</div>
</template>
</el-table-column>
<el-table-column
prop="intervalEffect"
label="备注信息"
min-width="130px"
>
<template slot-scope="scope">
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.intervalEffect }}</div>
</template>
</el-table-column>
</el-table>
<div
class="page mTop20"
>
<dm-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[20, 40, 60, 80]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next"
:total="page.totalCount"
>
</dm-pagination>
</div>
</div>
</div>
</template>
<script>
import mixin from './integralMixin';
import { doFetch } from "../../components/axios/api";
import url from "../../components/axios/url";
import {
checkFalse,
checkStatus
} from "../../../static/js/checkStatus";
export default {
name: 'enterpriseIntegralDataPage',
components: { },
mixins: [mixin],
props: {
memberId:{
type: String,
default() {
return '';
}
}
},
data() {
return {
memberData: [
// {createTime:1723736363636,integralVal:344,intervalEffect:'的好多好多',processStatus:2,limitTime:236363738821,openStoreName:'i u 合适',relationId:'udjdhdu883733737'},
// {createTime:1723736363636,integralVal:344,intervalEffect:'的好多好多',processStatus:1,openStoreName:'i u 合精华的和阿胶恶毒的接电话电话讲的点点滴滴是适'},
// {createTime:1723736363636,integralVal:344,intervalEffect:'的好多好多',processStatus:3},
// {createTime:1723736363636,integralVal:344,intervalEffect:'的好多好多',processStatus:4},
],
page: {
currentPage: 1,
pageSize: 20,
totalCount: 0
},
statusList:[
{code: -1 ,name:'全部处理状态'},
{code: 1 ,name:'待处理',icon:'dm-status--warning'},
{code: 2 ,name:'扣除成功',icon:'dm-status--success'},
{code: 3 ,name:'到时失效',icon:'dm-status--error'},
{code: 4 ,name:'取消操作',icon:'dm-status--info'},
],
processStatus: -1
};
},
methods: {
handleSearch() {
this.page.currentPage = 1;
this.getIntegralDataPage();
},
handleCurrentChange(val) {
this.page.currentPage = val;
this.getIntegralDataPage();
},
handleSizeChange(val) {
this.page.pageSize = val;
this.getIntegralDataPage();
},
getIntegralDataPage() {
// console.log({
// memberId: this.memberId,
// pageSize: this.page.pageSize,
// currentPage: this.page.currentPage,
// processStatus: this.processStatus,
// beginTime: this.dateDefault[0],
// endTime: this.dateDefault[1],
// });
// return
doFetch(url.enterpriseIntegralWithholdData, {
memberId: this.memberId,
pageSize: this.page.pageSize,
currentPage: this.page.currentPage,
processStatus: this.processStatus,
beginTime: this.dateDefault[0],
endTime: this.dateDefault[1],
})
.then(res => {
if (res.data.errorCode === 0) {
this.memberData = res.data.result.page.result
this.page.currentPage = res.data.result.page.currentPage;
this.page.totalCount = res.data.result.page.totalCount;
} else {
checkFalse(res.data.message);
}
})
.catch(err => {
checkStatus(err);
});
},
},
mounted() {
this.setDefalutTime()
console.log(this.memberId,1);
if(this.memberId){
this.getIntegralDataPage()
}
},
destroyed() {
}
};
</script>
<style lang="scss" scoped>
.width160{
width: 160px;
}
.search-top{ .left-search-wrap{
display: flex;
align-items:center;
gap:10px;
}
}
.line-20{
line-height: 20px;
}
.integral-box{
display: flex;
align-items: center;
}
.text-ellipsis-2 {
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
</style>
<template>
<div class="wechat-point-details">
<div class="integral-tab" >
<el-tabs v-model="activeName">
<el-tab-pane label="积分明细" name="first" >
<p class="font14 tip-p">展示近两年的积分明细</p>
<div class="wechat-point-details">
<div class="search-top mBottom20">
<div class="left-search-wrap">
<el-select
......@@ -218,9 +222,17 @@
<vue-gic-footer></vue-gic-footer>
</div> -->
</div>
</el-tab-pane>
<el-tab-pane label="预扣明细" name="second">
<p class="font14 tip-p">展示近两年的预扣明细</p>
<enterprise-intergral-withhold :member-id="memberId"></enterprise-intergral-withhold>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import enterpriseIntergralWithhold from './enterpriseIntergralWithhold.vue';
import nav from "../../common/navbar/navbar.vue";
import { doFetch } from "../../components/axios/api";
import url from "../../components/axios/url";
......@@ -235,6 +247,7 @@ export default {
name: "talkLogPage",
data() {
return {
activeName: 'first',
loseVisible: false,
loseData: [],
memberId: this.$route.query.memberId || "",
......@@ -390,12 +403,17 @@ export default {
},
components: {
"v-nav": nav,
searchinput
searchinput,
enterpriseIntergralWithhold
}
};
</script>
<style lang="stylus">
.tip-p{
color: #6B6D71;
padding-bottom: 16px;
}
.clerk {
display: flex;
align-items: center;
......@@ -413,9 +431,7 @@ export default {
}
.wechat-point-details {
padding:20px;
overflow: auto;
}
.footer-box {
......@@ -431,4 +447,20 @@ export default {
gap:10px;
}
}
.integral-tab {
height: 100%;
// position: fixed;
/deep/ .el-tabs__header {
margin-bottom: 16px;
.el-tabs__nav-wrap {
padding: 0 20px;
}
}
/deep/ .el-tabs__content {
padding: 0 20px 20px;
height: calc(100% - 60px);
overflow-y: auto;
box-sizing: border-box;
}
}
</style>
import {formatYMD} from '@/common/filters/custom.js';
export default {
data() {
return {
// dateKey: 0,
dateDefault: [],
pickerOptions() {
// let pickerMinDate;
return {
onPick(obj) {
// pickerMinDate = obj.minDate;
},
disabledDate(time) {
let start = new Date();
start.setFullYear(start.getFullYear() - 2);
start.setDate(start.getDate() + 1);
start = new Date(`${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`);
let end = new Date();
end = new Date(`${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()} 23:59:59`);
return time.getTime() < start.getTime() || time.getTime() > end;
}
};
}
};
},
methods: {
setDefalutTime(){
let start = new Date();
start.setFullYear(start.getFullYear() - 2);
start.setDate(start.getDate() + 1);
start = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`;
let end = new Date();
end = `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}`;
this.dateDefault = [formatYMD(new Date(start).getTime()), formatYMD(new Date(end).getTime())]
},
}
};
\ No newline at end of file
......@@ -252,6 +252,13 @@ export const constantRouterMap = [
},
},
{
path: '/enterpriseIntegralDataPage',
component: _import('wechatmembers', 'enterpriseIntegralDataPage'),
meta: {
title: '微信会员-集团积分',
},
},
{
path: '/storedValue',
component: _import('wechatmembers', 'storedValue'),
meta: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment