Commit 479fcfc5 by caoyanzhi

update: 会员通

parent 2fe22296
......@@ -25,6 +25,7 @@
"sycodecomponent": "^1.0.2",
"viser-vue": "^2.3.0",
"vue": "2.6.6",
"vue-clipboard2": "^0.3.3",
"vue-router": "^3.0.1",
"vue-style-loader": "^3.1.2",
"vuex": "^3.0.1",
......
......@@ -98,7 +98,7 @@
:label="memberFieldsName[colum]"
:prop="colum"
show-overflow-tooltip
:min-width="colum==='name'?200:150"
:min-width="colum==='name' ?200 : colum == 'status' ? 170 : 150"
:fixed="colum==='name'"
:sortable="['name','grade','status','channel','createCardStoreName','cardNo','forzenStatus','mainStoreName'].includes(colum)?false:isExist[colum]?'custom':false"
>
......@@ -114,19 +114,26 @@
<span v-else-if="colum == 'grade'">{{ row.gradeName }}</span>
<!-- 状态 -->
<span v-else-if="colum == 'status'">
<span title="取消关注公众号" v-if="row.status==0" style="margin-right: 6px;"><svg
class="icon status-icon unfollow"
aria-hidden="true"
>
<use xlink:href="#icon-weixinquguan" />
</svg></span><i
:title="row.status==1?'已关注公众号':'未关注公众号'"
v-else
:class="['iconfont status-icon ',row.status==1?'icon-weixin1 follow':'icon-weixin1']"
/><i
:title="row.wxStatus==1?'已使用小程序':'未使用小程序'"
:class="['iconfont status-icon icon-xiaochengxu1',row.wxStatus==1?'used':'']"
/>
<template v-if="!Array.isArray(row.memberSources) || row.memberSources.filter(el => el.highlight != 0).length == 0">--</template>
<template v-else>
<!-- 1100:公众号 1600:小程序 1700:企业微信 1303:微盟 1302:天猫会员通 -->
<span class="channel-box" v-for="channel in row.memberSources" :key="channel.parentSourceCode">
<template v-if="channel.highlight == 1">
<img class="channel-icon" v-if="channel.parentSourceCode == 1100" src="../../../static/img/channel-icon/weixin-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1600" src="../../../static/img/channel-icon/xiaochengxu-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-1.png" alt="">
</template>
<template v-if="channel.highlight == 2">
<img class="channel-icon" v-if="channel.parentSourceCode == 1100" src="../../../static/img/channel-icon/weixin-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1600" src="../../../static/img/channel-icon/xiaochengxu-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-2.png" alt="">
</template>
</span>
</template>
</span>
<!-- 关联渠道 -->
<span v-else-if="colum == 'channel'">
......@@ -276,6 +283,17 @@ export default { ...action };
@import './allCustomersList.less';
</style>
<style lang="less">
.channel-box {
display: inline-block;
+.channel-box {
margin-left: 6px;
}
.channel-icon {
width: 20px;
height: 20px;
vertical-align: middle;
}
}
// 去除dailog-footer上边框
.customer-dialog .el-dialog__footer {
padding-top: 0;
......
......@@ -51,17 +51,49 @@
<el-tag type="success" v-if="member.customerType" class="tag">
{{ member.customerType|customerTypeFilter }}
</el-tag>
<span title="取消关注公众号" v-if="member.status==0" style="margin-right: 6px;">
<icon-svg icon-class="icon-weixinquguan" class="status-icon" />
</span><i
:title="member.status==1?'已关注公众号':'未关注公众号'"
v-if="member.status==1"
class="iconfont status-icon icon-weixin1 follow"
/><i
title="已使用小程序"
v-if="member.wxStatus==1"
class="iconfont status-icon icon-xiaochengxu1"
/>
<div class="channel-box" v-for="channel in (member.memberSources || [])" :key="channel.parentSourceCode">
<el-popover popper-class="channel-info-popover" v-if="channel.highlight == 1" trigger="hover" placement="top">
<div class="channel-info">
<div class="channel-title">{{ channel.sourceName }}</div>
<div class="channel-info-item">
<span class="channel-info-label">来 源:</span>
<span class="channel-info-value">{{ channel.event || '--' }}</span>
</div>
<div class="channel-info-item">
<span class="channel-info-label">关联时间:</span>
<span class="channel-info-value">{{ channel.lastEffectiveTime }}</span>
</div>
</div>
<template slot="reference">
<img class="channel-icon" v-if="channel.parentSourceCode == 1100" src="../../../static/img/channel-icon/weixin-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1600" src="../../../static/img/channel-icon/xiaochengxu-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-1.png" alt="">
</template>
</el-popover>
<el-popover popper-class="channel-info-popover" v-if="channel.highlight == 2 && (channel.parentSourceCode == 1100 || channel.parentSourceCode == 1700)" trigger="hover" placement="top">
<div class="channel-info">
<div class="channel-title">
{{ channel.sourceName }}
<span class="channel-title-tip">
{{ channel.parentSourceCode == 1100 ? '(已取关)' : '(好友关系已解除)' }}
</span>
</div>
<div class="channel-info-item">
<span class="channel-info-label">{{ channel.parentSourceCode == 1100 ? '取关时间:' : '解除时间:' }}</span>
<span class="channel-info-value">{{ channel.lastUnEffectiveTime }}</span>
</div>
</div>
<template slot="reference">
<img class="channel-icon" v-if="channel.parentSourceCode == 1100" src="../../../static/img/channel-icon/weixin-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-2.png" alt="">
</template>
</el-popover>
<img class="channel-icon" v-if="channel.highlight == 2 && channel.parentSourceCode == 1600" src="../../../static/img/channel-icon/xiaochengxu-2.png" alt="">
<img class="channel-icon" v-if="channel.highlight == 2 && channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-2.png" alt="">
<img class="channel-icon" v-if="channel.highlight == 2 && channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-2.png" alt="">
</div>
</el-descriptions-item>
<el-descriptions-item label="性别">
{{ member.memberGender|genderFilter }}
......@@ -71,15 +103,25 @@
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{ member.phoneNumber ||'--' }}
<el-button
class="copy-btn"
type="text"
v-if="typeof member.phoneNumber == 'string' && member.phoneNumber.indexOf('*') == -1"
v-clipboard:copy="member.phoneNumber"
v-clipboard:success="onCopy">
<i class="iconfont icon-fuzhi"></i>
</el-button>
</el-descriptions-item>
<el-descriptions-item label="常驻城市">
{{ member.memberMainStoreArea||'--' }}
</el-descriptions-item>
<el-descriptions-item label="关注来源">
{{ member.attentionChannelDict||'--' }}
<el-descriptions-item label="客户来源">
<!-- {{ member.attentionChannelDict||'--' }} -->
{{ member.firstMemberSource ? member.firstMemberSource.sourceName || '--' : '--' }}
</el-descriptions-item>
<el-descriptions-item label="首次关注时间">
{{ member.attentionTime|formatTime }}
<!-- {{ member.attentionTime|formatTime }} -->
{{ Array.isArray(member.memberSources) ? (member.memberSources.find(el => el.parentSourceCode == 1100) || { lastEffectiveTime: '--' }).lastEffectiveTime : '--' }}
</el-descriptions-item>
<el-descriptions-item label="达摩同意协议时间">
{{ member.memberProtocolInfo.consentPrivacyProtocolTime|formatTime }}
......@@ -197,6 +239,14 @@
<template v-if="showClique">
<el-descriptions-item label="集团会员卡号:">
{{ memberInfo.cliqueCardNo||'--' }}
<el-button
class="copy-btn"
type="text"
v-if="typeof memberInfo.cliqueCardNo == 'string' && memberInfo.cliqueCardNo.indexOf('*') == -1"
v-clipboard:copy="memberInfo.cliqueCardNo"
v-clipboard:success="onCopy">
<i class="iconfont icon-fuzhi"></i>
</el-button>
</el-descriptions-item>
<el-descriptions-item label="集团会员等级:">
{{ memberInfo.cliqueGradeName||'--' }}
......@@ -220,6 +270,14 @@
</template>
<el-descriptions-item label="会员卡号:">
{{ memberInfo.cardNum||'--' }}
<el-button
class="copy-btn"
type="text"
v-if="typeof memberInfo.cardNum == 'string' && memberInfo.cardNum.indexOf('*') == -1"
v-clipboard:copy="memberInfo.cardNum"
v-clipboard:success="onCopy">
<i class="iconfont icon-fuzhi"></i>
</el-button>
</el-descriptions-item>
<el-descriptions-item label="会员等级:">
{{ memberInfo.gradeName||'--' }}
......@@ -654,6 +712,51 @@ export default { ...action };
@import './customerDetail.less';
</style>
<style lang="less">
.channel-info-popover {
width: 193px;
.channel-info {
.channel-title {
margin-bottom: 4px;
font-size: 12px;
font-weight: 600;
color: #303133;
line-height: 18px;
.channel-title-tip {
font-weight: 400;
color: #FA8C16;
}
}
.channel-info-item {
+.channel-info-item {
margin-top: 2px;
}
.channel-info-label, .channel-info-value {
font-size: 12px;
font-weight: 400;
color: #303133;
line-height: 17px;
}
.channel-info-label {
word-spacing: 1.7em;
width: 60px;
}
}
}
}
.channel-box {
display: inline-block;
+.channel-box {
margin-left: 6px;
}
.channel-icon {
width: 20px;
height: 20px;
vertical-align: middle;
}
}
.copy-btn {
color: #606266;
}
.grade-confirm-wrap {
.el-popconfirm__main {
align-items: flex-start;
......
......@@ -259,6 +259,9 @@ export default {
this.getCliqueGradeList();
},
methods: {
onCopy() {
this.$message.success('复制成功');
},
initData () {
this.count = 0;
this.fullscreenLoading = true;
......
......@@ -22,6 +22,8 @@ import directive from './utils/directive.js';
// import vueGicFooter from '@gic-test/vue-gic-footer'
import authCode from '../config/authCode';
import * as custom from './common/filters/custom'
import VueClipboard from 'vue-clipboard2';
Vue.use(VueClipboard);
Vue.config.productionTip = false;
Vue.config.devtools = true;
axios.defaults.withCredentials = true;
......
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