Commit f746960d by liuchenxi

update: 营销记录修改

parent e4b11283
......@@ -320,14 +320,20 @@
<div class="middle">
<div class="label">
{{ item.label }}
<el-tooltip v-if="item.key == 'numOfMarket'" content="只统计近年的数据" placement="top">
<el-tooltip v-if="item.key == 'numOfMarket'" content="只统计近年的数据" placement="top">
<i class="iconfont icon-QuestionCircleOutlined" style="color: #909399" />
</el-tooltip>
</div>
<div class="num">
{{ memberInfo[item.key]
?(item.key==='storedValue'?(memberInfo[item.key]|storedValue):(memberInfo[item.key]))
:0 }}
{{
memberInfo[item.key]
? item.key === "storedValue"
? memberInfo[item.key] || storedValue
: item.key == "numOfMarket"
? marketingRecordNum
: memberInfo[item.key]
: 0
}}
</div>
</div>
</div>
......
......@@ -198,6 +198,7 @@ export default {
},
{ title: '客户日志', name: 'log', class: 'log-info-contain' },
],
marketingRecordNum: 0
};
},
watch: {
......@@ -240,6 +241,7 @@ export default {
created () {
this.$store.commit('mutations-slide', true);
this.memberId = this.$route.query.memberId;
this.getMarketingRecordNum();
},
mounted () {
const rightWrap = document.querySelector('.right-maincontainer');
......@@ -456,6 +458,19 @@ export default {
checkStatus(err);
});
},
async getMarketingRecordNum() {
try {
const res = await doFetch(url.getMarketingRecordNum);
if (res.data.errorCode == 0) {
this.marketingRecordNum = res.data.result || 0;
console.log(this.marketingRecordNum);
} else {
checkFalse(res.data.message);
}
}catch(err) {
checkStatus(err);
}
}
},
components: {
'v-nav': nav,
......
......@@ -93,7 +93,8 @@ const urlConfig = {
ecmLogPage: '/api-marketing/member/ecm-log-page',
cardLogPage: '/api-marketing/member/card-log-page',
messageLogPage: '/api-marketing/member/sms-log-page',
wechatLogPage: '/api-marketing/member/wechat-log-page'
wechatLogPage: '/api-marketing/member/wechat-log-page',
getMarketingRecordNum: '/api-marketing/member/marketing-count'
}
const defaultUrl = Object.assign({}, urlConfig);
......
......@@ -5,9 +5,10 @@ export default {
// 四个页面选择器的禁用规则
pickerOptions: {
disabledDate: val => {
// 只能筛选一年之内得数据,并且最大跨度为六个月
const yearBefore = Date.now() - 12 * 30 * 24 * 60 * 60 * 1000;
const threeMonths = 3 * 30 * 24 * 60 * 60 * 1000;
const curMonth = new Date().getMonth() + 1;
// 只能筛选半年之内得数据,并且最大跨度为六个月
const yearBefore = new Date().setMonth(curMonth - (6 + 1));
const threeMonths = new Date().setMonth(curMonth - (6 + 1));
if (this.minDate) {
const curTime = this.minDate.getTime();
const min = curTime - threeMonths > yearBefore ? curTime - threeMonths : yearBefore;
......
......@@ -47,7 +47,7 @@ export default {
return {
navpath: [
{ name: "首页", path: "" },
{ name: "客户列表", path: "" },
{ name: "客户列表", path: "/allCustomers" },
{ name: "客户详情", path: '/customerDetail?memberId=' + this.$route.query.memberId || '' },
{ name: "营销记录", path: "" }
],
......
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