Commit 6628ea9b by shaojiawen

update: 积分

parent 23dae48a
......@@ -395,7 +395,7 @@
</div>
<div class="scores-box" @click="goLink('/integralDataPage')">
<div class="scores-info">
<icon-label-value label="积分" :value="memberInfo.totalPoint ? memberInfo.totalPoint : 0">
<icon-label-value label="积分" :value="memberInfo.totalPoint || 0">
<div class="score-icon" slot="icon">
<i class="iconfont icon-jifenduihuan"></i>
</div>
......
......@@ -181,9 +181,36 @@ export default {
},
watch: {
count: function (n, o) {
if (n === 3){
this.fullscreenLoading = false;
if(!this.memberInfo.erpIntegralFlag) this.$message.error('查询ERP积分失败,当前积分为上次同步积分,实际积分以ERP为准');
if (n === 3) {
if (this.memberInfo.erpIntegralFlag) {
// 需要erp积分
doFetch(url.getErpIntegral, { cardNo: this.memberInfo.cardNum })
.then(res => {
this.fullscreenLoading = false;
if (res.data.errorCode === 0) {
if (
res.data.result == null ||
(res.data.result + "").length <= 0
) {
this.$message.error(
"查询ERP积分失败,当前积分为上次同步积分,实际积分以ERP为准"
);
return;
}
this.memberInfo.totalPoint = res.data.result;
this.memberInfo.accumulatPoints = res.data.result;
this.memberInfo.invalidIntegral = 0;
} else {
this.fullscreenLoading = false;
checkFalse(res.data.message);
}
})
.catch(err => {
checkStatus(err);
});
} else {
this.fullscreenLoading = false;
}
}
},
},
......
......@@ -69,6 +69,7 @@
prop="createTime"
label="时间"
min-width="155px"
show-overflow-tooltip
>
<template slot-scope="scope">
<div class="line-20">{{ scope.row.createTime | formatYMD }}</div>
......@@ -79,6 +80,7 @@
prop="intervalInout"
label="日志类型"
min-width="90px"
show-overflow-tooltip
>
<template slot-scope="scope">
<span v-if="scope.row.intervalInout == 1">积分获取</span>
......@@ -89,17 +91,20 @@
prop="memberIntegralName"
label="事由"
min-width="90px"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="intervalHistory"
label="日志详情"
min-width="90px"
show-overflow-tooltip
></el-table-column>
<el-table-column prop="sourceType" label="来源渠道" min-width="90px" :formatter="formatSourceType"></el-table-column>
<el-table-column prop="sourceType" label="来源渠道" min-width="90px" :formatter="formatSourceType" show-overflow-tooltip></el-table-column>
<el-table-column
prop="brandName"
label="来源品牌"
min-width="150px"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tooltip placement="top">
......@@ -115,15 +120,10 @@
prop="remark"
label="备注"
min-width="160px"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tooltip placement="top">
<div slot="content">
<p>{{scope.row.remark}}</p>
</div>
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.remark }}</div>
</el-tooltip>
<!-- <div class="integral-box text-ellipsis-2 line-20">{{ scope.row.remark }}</div> -->
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.remark }}</div>
</template>
</el-table-column>
</el-table>
......
......@@ -31,6 +31,7 @@
prop="createTime"
label="时间"
min-width="157px"
show-overflow-tooltip
>
<template slot-scope="scope">
<div class="line-20">{{ scope.row.createTime | formatYMD }}</div>
......@@ -47,13 +48,15 @@
prop="integralVal"
label="预扣除积分值"
min-width="128px"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="integralCode"
label="事由"
min-width="90px"
show-overflow-tooltip
></el-table-column>
<el-table-column prop="sourceType" label="预扣截止时间" min-width="138px">
<el-table-column prop="sourceType" label="预扣截止时间" min-width="138px" show-overflow-tooltip>
<template slot="header">
预扣截止时间
<el-tooltip effect="dark" placement="top">
......@@ -72,44 +75,30 @@
prop="relationId"
label="关联id"
min-width="160px"
show-overflow-tooltip
>
<template slot-scope="scope">
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.relationId }}</div>
</template>
</el-table-column>
<el-table-column
v-if="isEnterprise"
prop="brandName"
label="来源品牌"
min-width="100px"
></el-table-column>
<el-table-column
prop="openStoreName"
label="积分成本主体"
min-width="180px"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tooltip placement="top">
<div slot="content">
<p>{{scope.row.openStoreName}}</p>
</div>
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.openStoreName }}</div>
</el-tooltip>
<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"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tooltip placement="top">
<div slot="content">
<p>{{scope.row.intervalEffect}}</p>
</div>
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.intervalEffect }}</div>
</el-tooltip>
<!-- <div class="integral-box text-ellipsis-2 line-20">{{ scope.row.intervalEffect }}</div> -->
<div class="integral-box text-ellipsis-2 line-20">{{ scope.row.intervalEffect }}</div>
</template>
</el-table-column>
</el-table>
......
......@@ -229,7 +229,7 @@
</div> -->
</div>
</el-tab-pane>
<el-tab-pane label="预扣明细" name="second">
<el-tab-pane label="预扣明细" name="second" v-if="dmUserInfo.cliqueId.length <= 0">
<p class="font14 tip-p">展示近两年的预扣明细</p>
<enterprise-intergral-withhold :member-id="memberId"></enterprise-intergral-withhold>
</el-tab-pane>
......@@ -288,7 +288,8 @@ export default {
curRecordUrl: "",
dictList: [],
dilogIntegralVisible: false,
integralFlag: ""
integralFlag: "",
dmUserInfo: JSON.parse(window.localStorage.getItem('dmUserInfo'))
};
},
mixins: [authMethods, mixin],
......@@ -407,6 +408,7 @@ export default {
this.getIntegralDataPage();
this.getIntegralOperateType();
}
console.log(window.localStorage.getItem('dmUserInfo'), 111)
this.$store.commit("mutations-slide", false);
},
components: {
......
......@@ -27,12 +27,12 @@ export default {
methods: {
setDefalutTime(){
let start = new Date();
start.setFullYear(start.getFullYear());
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(end).getTime()), formatYMD(new Date(start).getTime())]
this.dateDefault = [formatYMD(new Date(start).getTime()), formatYMD(new Date(end).getTime())]
},
},
filters: {
......
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