Commit efd36ad9 by 姜鹏凯

离职继承优化

1 parent 2aa13666
<script> <script>
import { import { updateBirthday, getDetail, getSummary, getFollowUpRecord, getCustomerInfoByUserId } from '@/api/customer'
updateBirthday,
getDetail,
getSummary,
getFollowUpRecord,
getCustomerInfoByUserId,
} from '@/api/customer'
import { dictAddType, dictJoinGroupType, dictTrackState } from '@/utils/dictionary' import { dictAddType, dictJoinGroupType, dictTrackState } from '@/utils/dictionary'
import InfoTab from './customer/infoTab.vue' import InfoTab from './customer/infoTab.vue'
export default { export default {
name: 'CustomerDetail', name: 'CustomerDetail',
components: { InfoTab }, components: { InfoTab },
data() { data() {
...@@ -22,14 +16,14 @@ export default { ...@@ -22,14 +16,14 @@ export default {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() return time.getTime() > Date.now()
}, }
}, },
dictAddType, dictAddType,
dictJoinGroupType, dictJoinGroupType,
dictTrackState, dictTrackState,
active: 0, active: 0,
openedTabs: ['0'], openedTabs: ['0']
} }
}, },
created() { created() {
...@@ -59,7 +53,7 @@ export default { ...@@ -59,7 +53,7 @@ export default {
* userId 是 当前跟进人id * userId 是 当前跟进人id
*/ */
getDetail() { getDetail() {
getDetail(this.$route.query).then(({ data }) => { getDetail({ ...this.$route.query, delFlag: 1 }).then(({ data }) => {
data.companyTags && (data.companyTags = data.companyTags.split(',')) data.companyTags && (data.companyTags = data.companyTags.split(','))
this.customer = data this.customer = data
...@@ -71,7 +65,7 @@ export default { ...@@ -71,7 +65,7 @@ export default {
}, },
changeTab(tab) { changeTab(tab) {
this.openedTabs.includes(tab.$attrs.id) || this.openedTabs.push(tab.$attrs.id) this.openedTabs.includes(tab.$attrs.id) || this.openedTabs.push(tab.$attrs.id)
}, }
// remark(item) { // remark(item) {
// return ( // return (
...@@ -79,15 +73,15 @@ export default { ...@@ -79,15 +73,15 @@ export default {
// this.customer.customerName + (item.remarkCorpName ? '-' + item.remarkCorpName : '') // this.customer.customerName + (item.remarkCorpName ? '-' + item.remarkCorpName : '')
// ) // )
// } // }
}, }
} }
</script> </script>
<template> <template>
<div> <div>
<!-- <el-button slot="append" circle icon="el-icon-back" @click="$router.back()"></el-button>返回 --> <!-- <el-button slot="append" circle icon="el-icon-back" @click="$router.back()"></el-button>返回 -->
<div class="flex aic mb20" @click="goRoute(customer)"> <div class="flex aic mb20" @click="goRoute(customer)">
<el-image style="width: 80px; height: 80px" :src="customer.avatar" fit="fit"></el-image> <el-image style="width: 80px; height: 80px;" :src="customer.avatar" fit="fit"></el-image>
<div class="ml10"> <div class="ml10">
<div> <div>
{{ customer.customerName + (customer.corpName ? '-' + customer.corpName : '') }} {{ customer.customerName + (customer.corpName ? '-' + customer.corpName : '') }}
...@@ -112,10 +106,7 @@ export default { ...@@ -112,10 +106,7 @@ export default {
</el-card> --> </el-card> -->
<div class="card-title mb5">社交关系</div> <div class="card-title mb5">社交关系</div>
<el-tabs value="1"> <el-tabs value="1">
<el-tab-pane <el-tab-pane :label="`跟进员工(${customer.trackUsers ? customer.trackUsers.length : 0})`" name="1">
:label="`跟进员工(${customer.trackUsers ? customer.trackUsers.length : 0})`"
name="1"
>
<el-table :data="customer.trackUsers"> <el-table :data="customer.trackUsers">
<el-table-column label="员工" align="center" prop="userName" /> <el-table-column label="员工" align="center" prop="userName" />
<el-table-column prop="addMethod" label="添加方式" align="center"> <el-table-column prop="addMethod" label="添加方式" align="center">
...@@ -144,11 +135,7 @@ export default { ...@@ -144,11 +135,7 @@ export default {
</el-tabs> </el-tabs>
<el-tabs value="0" @tab-click="changeTab"> <el-tabs value="0" @tab-click="changeTab">
<el-tab-pane <el-tab-pane v-if="customer.trackUsers && customer.trackUsers.length > 1" label="客户画像汇总" id="0">
v-if="customer.trackUsers && customer.trackUsers.length > 1"
label="客户画像汇总"
id="0"
>
<info-tab :trackUsers="customer.trackUsers"></info-tab> <info-tab :trackUsers="customer.trackUsers"></info-tab>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
...@@ -157,30 +144,27 @@ export default { ...@@ -157,30 +144,27 @@ export default {
:label="item.userName" :label="item.userName"
:id="item.trackUserId" :id="item.trackUserId"
> >
<info-tab <info-tab v-if="openedTabs.includes(item.trackUserId)" :userId="item.trackUserId"></info-tab>
v-if="openedTabs.includes(item.trackUserId)"
:userId="item.trackUserId"
></info-tab>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.info-wrap { .info-wrap {
margin-left: 20px; margin-left: 20px;
.info { .info {
color: #aaa; color: #aaa;
line-height: 32px; line-height: 32px;
} }
} }
.el-card { .el-card {
::v-deep.el-card__header { ::v-deep.el-card__header {
border: 0; border: 0;
} }
} }
.el-icon-s-custom { .el-icon-s-custom {
font-size: 16px; font-size: 16px;
margin-left: 4px; margin-left: 4px;
color: #999; color: #999;
...@@ -190,9 +174,9 @@ export default { ...@@ -190,9 +174,9 @@ export default {
&.woman { &.woman {
color: #f753b2; color: #f753b2;
} }
} }
.card-title { .card-title {
font-weight: 600; font-weight: 600;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!