Commit 1c64f1ca by 姜鹏凯

跟进状态改为商机阶段

1 parent 7ec1e945
<script> <script>
import { getFollowUpRecord, syncTrack } from '@/api/customer' import { getFollowUpRecord, syncTrack } from '@/api/customer'
import { dictTrackState } from '@/utils/dictionary' import { dictTrackState } from '@/utils/dictionary'
import { dateFormat } from '@/utils' import { dateFormat } from '@/utils'
export default { import { getList } from '@/api/salesCenter/businessConver.js'
export default {
name: '', name: '',
props: { props: {
// 当前跟进人id // 当前跟进人id
userId: { userId: {
type: String, type: String,
default: null, default: null
}, },
// 所有跟进人id(用于客户画像汇总的同步) // 所有跟进人id(用于客户画像汇总的同步)
userIdAll: { userIdAll: {
type: String, type: String,
default: null, default: null
}, },
// 1:客户动态;2:员工动态;3:互动动态;4:跟进动态 // 1:客户动态;2:员工动态;3:互动动态;4:跟进动态
trajectoryType: { trajectoryType: {
type: String, type: String,
default: null, default: null
}, },
// 视图展示类型 1:表格展示,2:轨迹时间线展示 // 视图展示类型 1:表格展示,2:轨迹时间线展示
viewType: { viewType: {
type: String, type: String,
default: '', default: ''
}, },
lastSyncTime: String, lastSyncTime: String
}, },
components: {}, components: {},
data() { data() {
return { return {
stageList: [],
query: { query: {
pageNum: 0, pageNum: 0,
pageSize: 10, pageSize: 10,
externalUserid: '', // 是 当前客户id externalUserid: '', // 是 当前客户id
userId: null, // 当前跟进人id, userId: null, // 当前跟进人id,
trajectoryType: null, // 1:客户动态;2:员工动态;3:互动动态;4:跟进动态 trajectoryType: null // 1:客户动态;2:员工动态;3:互动动态;4:跟进动态
}, },
loading: false, loading: false,
total: 0, total: 0,
list: [], // 列表 list: [], // 列表
dictTrackState, dictTrackState,
dateFormat, dateFormat,
goto: true, goto: true
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
this.viewType && this.getList(1) this.viewType && this.getList(1)
this.getStage()
}, },
mounted() {}, mounted() {},
methods: { methods: {
getStage() {
getList().then((res) => {
this.stageList = res.data
})
},
setValue(data) {
let str = ''
this.stageList.forEach((dd) => {
if (dd.stageVal == data) {
str = dd.stageKey
}
})
return str
},
/** 查询 */ /** 查询 */
getList(page) { getList(page) {
Object.assign(this.query, { Object.assign(this.query, {
externalUserid: this.$route.query.externalUserid, externalUserid: this.$route.query.externalUserid,
weUserId: this.userId, weUserId: this.userId,
trajectoryType: this.trajectoryType, trajectoryType: this.trajectoryType
}) })
if (this.viewType) { if (this.viewType) {
page && (this.query.pageNum = page) page && (this.query.pageNum = page)
...@@ -122,9 +140,9 @@ export default { ...@@ -122,9 +140,9 @@ export default {
this.loading = false this.loading = false
console.error(fail) console.error(fail)
}) })
}, }
}, }
} }
</script> </script>
<template> <template>
...@@ -133,10 +151,13 @@ export default { ...@@ -133,10 +151,13 @@ export default {
<el-table :data="list"> <el-table :data="list">
<el-table-column label="员工" align="center" prop="userName" /> <el-table-column label="员工" align="center" prop="userName" />
<el-table-column label="跟进记录" align="center" prop="trackContent" /> <el-table-column label="跟进记录" align="center" prop="trackContent" />
<el-table-column prop="trackState" label="跟进状态" align="center"> <el-table-column prop="trackState" label="商机阶段" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-tag v-if="row.trackState" :type="dictTrackState[~~row.trackState + ''].color"> <!-- <el-tag v-if="row.trackState" :type="dictTrackState[~~row.trackState + ''].color">
{{ dictTrackState[~~row.trackState + ''].name }} {{ dictTrackState[~~row.trackState + ''].name }}
</el-tag> -->
<el-tag v-if="row.trackState">
{{ setValue(row.trackState) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
...@@ -152,12 +173,13 @@ export default { ...@@ -152,12 +173,13 @@ export default {
:page-sizes="[10, 20, 50]" :page-sizes="[10, 20, 50]"
:page-size="query.pageSize" :page-size="query.pageSize"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total"></el-pagination> :total="total"
></el-pagination>
</div> </div>
</template> </template>
<div v-else class="timeline-time-wrap"> <div v-else class="timeline-time-wrap">
<ul class="infinite-list" v-infinite-scroll="getList" style="overflow: auto"> <ul class="infinite-list" v-infinite-scroll="getList" style="overflow: auto;">
<!-- --> <!-- -->
<template v-if="list.length"> <template v-if="list.length">
<li v-for="(unit, i) in list" class="infinite-list-item" :key="i"> <li v-for="(unit, i) in list" class="infinite-list-item" :key="i">
...@@ -169,7 +191,8 @@ export default { ...@@ -169,7 +191,8 @@ export default {
class="timeline-box-item" class="timeline-box-item"
:timestamp="item.createTime.slice(10, 16)" :timestamp="item.createTime.slice(10, 16)"
placement="top" placement="top"
type="primary"> type="primary"
>
<p class="timeline-box-item-title">{{ item.title || '无标题' }}</p> <p class="timeline-box-item-title">{{ item.title || '无标题' }}</p>
<p>{{ item.content || '无内容' }}</p> <p>{{ item.content || '无内容' }}</p>
</el-timeline-item> </el-timeline-item>
...@@ -183,23 +206,23 @@ export default { ...@@ -183,23 +206,23 @@ export default {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// .timeline-time-wrap { // .timeline-time-wrap {
// } // }
.infinite-list-item { .infinite-list-item {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
&:last-child { &:last-child {
border: 0; border: 0;
} }
} }
.timeline-time { .timeline-time {
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
line-height: 48px; line-height: 48px;
} }
.el-timeline > .timeline-box-item:first-child ::v-deep .el-timeline-item__node { .el-timeline > .timeline-box-item:first-child ::v-deep .el-timeline-item__node {
border-radius: 0 !important; border-radius: 0 !important;
} }
.timeline-box { .timeline-box {
padding-left: 70px; padding-left: 70px;
&-item { &-item {
::v-deep .el-timeline-item__timestamp { ::v-deep .el-timeline-item__timestamp {
...@@ -214,9 +237,9 @@ export default { ...@@ -214,9 +237,9 @@ export default {
line-height: 25px; line-height: 25px;
} }
} }
} }
::v-deep .el-timeline-item__tail { ::v-deep .el-timeline-item__tail {
border-left-color: var(--color); border-left-color: var(--color);
} }
</style> </style>
...@@ -109,14 +109,15 @@ ...@@ -109,14 +109,15 @@
<el-tag v-for="item in form.sendClientTagList" :key="item.tagId">{{ item.name }}</el-tag> <el-tag v-for="item in form.sendClientTagList" :key="item.tagId">{{ item.name }}</el-tag>
</div> </div>
<div class="item-magin"> <div class="item-magin">
<div class="item-name">跟进状态</div> <div class="item-name">商机阶段</div>
<el-select v-model="form.trackState"> <el-select v-model="form.trackState">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="跟进中" :value="2"></el-option> <el-option
<el-option label="待跟进" :value="1"></el-option> v-for="(item, index) in stageList"
<el-option label="无意向" :value="4"></el-option> :key="index"
<el-option label="已成交" :value="3"></el-option> :label="item.stageKey"
<el-option label="已流失" :value="5"></el-option> :value="item.stageVal"
></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
...@@ -193,7 +194,8 @@ ...@@ -193,7 +194,8 @@
import { add, getCustomerList } from '@/api/groupMessage' import { add, getCustomerList } from '@/api/groupMessage'
import { getMaterialMediaId } from '@/api/material' import { getMaterialMediaId } from '@/api/material'
import PhoneDialog from '@/components/PhoneDialog' import PhoneDialog from '@/components/PhoneDialog'
// import { getList } from '@/api/salesCenter/businessConver.js'
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
import WelcomeDetail from '@/components/WelcomeContent.vue' import WelcomeDetail from '@/components/WelcomeContent.vue'
import SelectCustomerGroup from '@/components/SelectCustomerGroup' import SelectCustomerGroup from '@/components/SelectCustomerGroup'
...@@ -212,6 +214,7 @@ ...@@ -212,6 +214,7 @@
props: {}, props: {},
data() { data() {
return { return {
stageList: [],
currentActive: 1, currentActive: 1,
loading: false, loading: false,
// 表单参数 // 表单参数
...@@ -327,8 +330,15 @@ ...@@ -327,8 +330,15 @@
` `
) )
}, },
mounted() {}, mounted() {
this.getStage()
},
methods: { methods: {
getStage() {
getList().then((res) => {
this.stageList = res.data
})
},
parseTime(time, cFormat) { parseTime(time, cFormat) {
if (arguments.length === 0) { if (arguments.length === 0) {
return null return null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!