Commit 23d79fdf by xinla

客户画像等问题

1 parent 2e4b1701
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
ENV = 'development' ENV = 'development'
# 基础api(根据实际情况,自行配置,下为示例) # 基础api(根据实际情况,自行配置,下为示例)
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/dev-api' VUE_APP_BASE_API = 'http://demo.linkwechat.cn/prod-api'
VUE_APP_BASE_API = 'http://ecbf-82-156-106-202.ngrok.io'
# 路由基础路径 # 路由基础路径
VUE_APP_BASE_URL = '/' VUE_APP_BASE_URL = '/'
\ No newline at end of file \ No newline at end of file
...@@ -85,7 +85,7 @@ export function findAddGroupNum(params) { ...@@ -85,7 +85,7 @@ export function findAddGroupNum(params) {
{ {
pageNum: pageNum:
pageSize: pageSize:
trajectoryType: 轨迹类型(1:信息动态;2:社交动态;3:活动规则;4:待办动态) trajectoryType: 轨迹类型(1:客户动态;2:员工动态;3:跟进动态;4:互动动态)
userId: 员工的id userId: 员工的id
externalUserid: 客户id externalUserid: 客户id
} }
...@@ -97,7 +97,19 @@ export function findTrajectory(params) { ...@@ -97,7 +97,19 @@ export function findTrajectory(params) {
params params
}) })
} }
// 添加或编辑轨迹
/**
* 编辑跟进动态
* @param {*} data
* {
"externalUserid":"客户id",
"trackState":1,//1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
"content":"根据内容",
"userId":"员工id"
}
* @returns
*/
export function addOrEditWaitHandle(data) { export function addOrEditWaitHandle(data) {
return request({ return request({
url: service + '/addOrEditWaitHandle', url: service + '/addOrEditWaitHandle',
...@@ -153,3 +165,15 @@ export function deletePersonTag(ids) { ...@@ -153,3 +165,15 @@ export function deletePersonTag(ids) {
method: 'delete' method: 'delete'
}) })
} }
/**
* 同步轨迹动态
* @param {*} userId
* @returns
*/
export function sync(userId) {
return request({
url: service + '/synchMomentsInteracte/' + userId,
method: 'get'
})
}
...@@ -18,7 +18,7 @@ import router from './router' ...@@ -18,7 +18,7 @@ import router from './router'
import store from './store' import store from './store'
import VConsole from 'vconsole' import VConsole from 'vconsole'
process.env.NODE_ENV === 'test' && new VConsole() process.env.NODE_ENV === 'production' && new VConsole()
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -38,7 +38,8 @@ const routes = [ ...@@ -38,7 +38,8 @@ const routes = [
component: () => import('../views/portrait/customerDetail.vue'), component: () => import('../views/portrait/customerDetail.vue'),
hidden: true, hidden: true,
meta: { meta: {
title: '' title: '',
noAuth: true
} }
}, },
// 社群关系 // 社群关系
......
...@@ -3,12 +3,7 @@ ...@@ -3,12 +3,7 @@
<!-- 头部 --> <!-- 头部 -->
<div class="header"> <div class="header">
<span class="title"> 社群关系 </span> <span class="title"> 社群关系 </span>
<van-icon <van-icon name="cross" color="#9c9c9c" size="16" @click="$router.back()" />
name="cross"
color="#9c9c9c"
size="16"
@click="$router.back()"
/>
</div> </div>
<van-divider /> <van-divider />
<!-- 标签页 --> <!-- 标签页 -->
...@@ -22,58 +17,69 @@ ...@@ -22,58 +17,69 @@
> >
<van-tab :title="'添加的员工(' + staff.length + ')'"> <van-tab :title="'添加的员工(' + staff.length + ')'">
<van-list v-model="loading" :finished="finished" @load="onLoad"> <van-list v-model="loading" :finished="finished" @load="onLoad">
<van-cell v-for="(item, index) in staff" :key="index"> <template v-if="staff.length">
<div class="details"> <van-cell v-for="(item, index) in staff" :key="index">
<div class="detail"> <div class="details">
<div class="left"> <div class="detail">
<div class="img"> <div class="left">
<img :src="item.headImageUrl" alt="" /> <div class="img">
</div> <img :src="item.headImageUrl" alt="" />
<div class="right">
<div>
<span>{{ item.userName }} &nbsp; &nbsp;</span>
</div> </div>
<div class="c9"> <div class="right">
<span>添加时间:</span> <div>
<span>{{ getTime(item.createTime) }}</span> <span>{{ item.userName }} &nbsp; &nbsp;</span>
</div>
<div class="c9">
<span>添加时间:</span>
<span>{{ getTime(item.createTime) }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </van-cell>
</van-cell> </template>
<van-empty v-else image-size="50" description="暂无数据" />
</van-list> </van-list>
</van-tab> </van-tab>
<van-tab :title="'添加的群聊(' + groupChat.length + ')'"> <van-tab :title="'添加的群聊(' + groupChat.length + ')'">
<div class="groupchat1" @click="conGroup">只看与我共同的群聊</div>
<van-list v-model="loading" :finished="finished" @load="onLoad"> <van-list v-model="loading" :finished="finished" @load="onLoad">
<van-cell v-for="(item, index) in groupChat" :key="index"> <template v-if="groupChat.length">
<div class="details"> <van-button
<div class="detail"> size="mini"
<div class="left"> :type="commonActive ? 'info' : 'default'"
<div class="img"> class="ml20 mt10"
<img src="@/assets/avatar.jpg" alt="" /> @click="conGroup"
</div> >只看与我共同的群聊</van-button
<div class="right"> >
<div> <van-cell v-for="(item, index) in groupChat" :key="index">
{{ item.groupName + '(' + item.groupMemberNum + ')' }} <div class="details">
</div> <div class="detail">
<div> <div class="left">
<span class="c9">群主:</span> <div class="img">
<span class="c9">{{ item.ownerName }}</span> <img src="@/assets/avatar.jpg" alt="" />
</div> </div>
<div class="c9"> <div class="right">
<span>入群时间:</span <div>
><span>{{ getTime(item.joinTime) }}</span> {{ item.groupName + '(' + item.groupMemberNum + ')' }}
</div>
<div>
<span class="c9">群主:</span>
<span class="c9">{{ item.ownerName }}</span>
</div>
<div class="c9">
<span>入群时间:</span><span>{{ getTime(item.joinTime) }}</span>
</div>
</div> </div>
</div> </div>
</div> <div class="groupchat2" v-if="!item.commonGroup">
<div class="groupchat2" v-if="!item.commonGroup"> 共同群聊
共同群聊 </div>
</div> </div>
</div> </div>
</div> </van-cell>
</van-cell> </template>
<van-empty v-else image-size="50" description="暂无数据" />
</van-list> </van-list>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
...@@ -92,8 +98,10 @@ export default { ...@@ -92,8 +98,10 @@ export default {
loading: false, loading: false,
finished: false, finished: false,
staff: [], // 添加的员工 staff: [], // 添加的员工
allGroup: [], // 添加的群聊
groupChat: [], // 添加的群聊 groupChat: [], // 添加的群聊
commonGroup: [], // 共同的群聊 commonGroup: [], // 共同的群聊
commonActive: false,
// externalUserid: "wmiGuBCgAAIH-T9ekaE-Q52N2lKWeInw", // externalUserid: "wmiGuBCgAAIH-T9ekaE-Q52N2lKWeInw",
externalUserid: '' externalUserid: ''
} }
...@@ -110,7 +118,8 @@ export default { ...@@ -110,7 +118,8 @@ export default {
}, },
methods: { methods: {
conGroup() { conGroup() {
this.groupChat = this.commonGroup this.commonActive = !this.commonActive
this.groupChat = this.commonActive ? this.commonGroup : this.allGroup
// console.log(123); // console.log(123);
}, },
onLoad() { onLoad() {
...@@ -146,8 +155,8 @@ export default { ...@@ -146,8 +155,8 @@ export default {
.then(({ data }) => { .then(({ data }) => {
// console.log(data); // console.log(data);
// debugger // debugger
this.groupChat = data this.groupChat = this.allGroup = data
this.commonGroup = this.groupChat.filter((ele) => { this.commonGroup = data.filter((ele) => {
// debugger // debugger
return ele.groupMemberNum == 1 return ele.groupMemberNum == 1
}) })
...@@ -161,16 +170,10 @@ export default { ...@@ -161,16 +170,10 @@ export default {
const date = new Date(data) const date = new Date(data)
// console.log(timer.getFullYear()); // console.log(timer.getFullYear());
var Y = date.getFullYear() + '-' var Y = date.getFullYear() + '-'
var M = var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
(date.getMonth() + 1 < 10 var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + ' '
? '0' + (date.getMonth() + 1) var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
: date.getMonth() + 1) + '-' var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var D =
date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + ' '
var h =
(date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
var m =
date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
return Y + M + D + h + m return Y + M + D + h + m
} }
} }
...@@ -185,7 +188,7 @@ export default { ...@@ -185,7 +188,7 @@ export default {
.labelPge { .labelPge {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #f2f2f2; // background-color: #f2f2f2;
} }
.header { .header {
margin: 20px 20px 10px; margin: 20px 20px 10px;
...@@ -229,21 +232,12 @@ export default { ...@@ -229,21 +232,12 @@ export default {
} }
} }
// 添加的群聊 // 添加的群聊
.groupchat1 {
width: 120px;
height: 20px;
font-size: 12px;
background-color: #fff;
border-radius: 20px;
text-align: center;
line-height: 20px;
margin: 10px 20px;
}
.groupchat2 { .groupchat2 {
width: 60px; width: 60px;
height: 20px; height: 20px;
font-size: 12px; font-size: 12px;
background-color: #fff; background-color: #9fc9f7;
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
line-height: 20px; line-height: 20px;
......
...@@ -2,13 +2,10 @@ ...@@ -2,13 +2,10 @@
<div> <div>
<!-- 头部 --> <!-- 头部 -->
<div class="header"> <div class="header">
<van-icon <div style="display:inline-flex;align-items: center;">
name="arrow-left" <van-icon name="arrow-left" color="#9c9c9c" size="16" @click="$router.back()" />
color="#9c9c9c" <span class="title ml5">客户资料</span>
size="16" </div>
@click="$router.back()"
/>
<span class="title"> 客户资料 </span>
<div class="data" v-if="flage" @click="edit">编辑</div> <div class="data" v-if="flage" @click="edit">编辑</div>
<div class="data" v-else @click="saveUserInformation">保存</div> <div class="data" v-else @click="saveUserInformation">保存</div>
</div> </div>
...@@ -21,19 +18,11 @@ ...@@ -21,19 +18,11 @@
<div class="img"><img :src="form.avatar" alt="" /></div> <div class="img"><img :src="form.avatar" alt="" /></div>
<div class="right"> <div class="right">
<div> <div>
<span <span>
>{{ {{ (user.name || '') + (user.remarkCorpName ? '-' + user.remarkCorpName : '') }}
user.remark
? user.remark
: (user.name || '') + '-' + (user.remarkCorpName || '')
}}
</span>
<span class="icon iconfont icon-man" v-if="user.gender == 1">
</span> </span>
<span <span class="icon iconfont icon-man" v-if="user.gender == 1"> </span>
class="icon iconfont icon-xingbie" <span class="icon iconfont icon-xingbie" v-else-if="user.gender == 2"></span>
v-else-if="user.gender == 2"
></span>
<van-icon name="manager" color="#9c9c9c" v-else /> <van-icon name="manager" color="#9c9c9c" v-else />
</div> </div>
<div class="c9"> <div class="c9">
...@@ -67,12 +56,7 @@ ...@@ -67,12 +56,7 @@
input-align="right" input-align="right"
@click="!flage ? (show = true) : ''" @click="!flage ? (show = true) : ''"
/> />
<van-popup <van-popup v-model="show" position="bottom" round :style="{ height: '60%' }">
v-model="show"
position="bottom"
round
:style="{ height: '60%' }"
>
<van-datetime-picker <van-datetime-picker
v-model="currentDate" v-model="currentDate"
type="date" type="date"
...@@ -97,13 +81,7 @@ ...@@ -97,13 +81,7 @@
placeholder="地址" placeholder="地址"
input-align="right" input-align="right"
/> />
<van-field <van-field v-model="form.qq" name="QQ" label="QQ" placeholder="QQ" input-align="right" />
v-model="form.qq"
name="QQ"
label="QQ"
placeholder="QQ"
input-align="right"
/>
<van-field <van-field
v-model="form.position" v-model="form.position"
name="职业" name="职业"
...@@ -198,12 +176,8 @@ export default { ...@@ -198,12 +176,8 @@ export default {
const date = new Date(data) const date = new Date(data)
// console.log(timer.getFullYear()); // console.log(timer.getFullYear());
var Y = date.getFullYear() + '-' var Y = date.getFullYear() + '-'
var M = var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
(date.getMonth() + 1 < 10 var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + ' '
? '0' + (date.getMonth() + 1)
: date.getMonth() + 1) + '-'
var D =
date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + ' '
// var h = // var h =
// (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':' // (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
// var m = // var m =
...@@ -251,6 +225,7 @@ export default { ...@@ -251,6 +225,7 @@ export default {
.title { .title {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
vertical-align: middle;
} }
// 详细资料 // 详细资料
.details { .details {
......
...@@ -13,33 +13,31 @@ ...@@ -13,33 +13,31 @@
<van-divider /> --> <van-divider /> -->
<!-- 详细资料 --> <!-- 详细资料 -->
<div class="details"> <div class="details">
<div class="detail"> <div class="detail mb20">
<div class="left"> <div class="left">
<div class="img"><img :src="form.avatar" alt="" /></div> <div class="img"><img :src="form.avatar" alt="" /></div>
<div class="right"> <div class="right">
<div> <div>
<span> <div>
{{ {{ (form.name || '') + (form.remarkCorpName ? '-' + form.remarkCorpName : '') }}
form.remark </div>
? form.remark <van-icon
: (form.name || '') + (form.remarkCorpName ? '-' + form.remarkCorpName : '') name="manager"
}} :class="['gender', { 1: 'man', 2: 'woman' }[form.gender]]"
></van-icon>
<span :style="{ color: form.customerType === 1 ? '#4bde03' : '#f9a90b' }">
{{ { 1: '@微信', 2: '@企业微信' }[form.customerType] }}
</span> </span>
<span class="icon iconfont icon-man" v-if="form.gender == 1"></span>
<span class="icon iconfont icon-xingbie" v-else-if="form.gender == 2"></span>
<van-icon name="manager" color="#9c9c9c" v-else />
</div>
<div class="c9">
<span>昵称:</span><span>{{ form.name }}</span>
</div> </div>
</div> </div>
</div> </div>
<van-button <van-button
v-if="dictTrackState[form.trackState || 1]" v-if="dictTrackState[form.trackState]"
:type="dictTrackState[form.trackState || 1].color" :type="dictTrackState[form.trackState].color"
size="small" size="mini"
plain
@click="usershow = true" @click="usershow = true"
>{{ dictTrackState[form.trackState || 1].name }}</van-button >{{ dictTrackState[form.trackState].name }}&gt;</van-button
> >
</div> </div>
<div class="detail"> <div class="detail">
...@@ -89,7 +87,7 @@ ...@@ -89,7 +87,7 @@
<div>个人标签</div> <div>个人标签</div>
<div class="data" is-link @click="labelEdit('person')">编辑</div> <div class="data" is-link @click="labelEdit('person')">编辑</div>
</div> </div>
<div v-if="form.tags" class="labelstyle mt10"> <div v-if="form.personTags" class="labelstyle mt10">
<div class="label" v-for="(unit, unique) in form.personTags" :key="unique"> <div class="label" v-for="(unit, unique) in form.personTags" :key="unique">
{{ unit.name }} {{ unit.name }}
</div> </div>
...@@ -124,14 +122,14 @@ ...@@ -124,14 +122,14 @@
<div class="addwaiting"> <div class="addwaiting">
<div class="detail"> <div class="detail">
<div>客户轨迹</div> <div>客户轨迹</div>
<div class="data" is-link @click="usershow = true">同步</div> <div class="data" is-link @click="sync">同步</div>
</div> </div>
<van-tabs v-model="query.trajectoryType" @change="changeInfo"> <van-tabs v-model="query.trajectoryType" @change="changeInfo">
<van-tab :name="1" title="信息动态"></van-tab> <van-tab :name="1" title="客户动态"></van-tab>
<van-tab :name="2" title="社交动态"></van-tab> <van-tab :name="2" title="员工动态"></van-tab>
<van-tab :name="3" title="活动动态"></van-tab> <van-tab :name="3" title="跟进动态"></van-tab>
<van-tab :name="4" title="待办动态"></van-tab> <van-tab :name="4" title="互动动态"></van-tab>
</van-tabs> </van-tabs>
<!-- 步骤条 --> <!-- 步骤条 -->
...@@ -180,9 +178,11 @@ ...@@ -180,9 +178,11 @@
</div> </div>
</div> </div>
</template> </template>
<van-empty v-if="!alllabel || !alllabel.length" image-size="50" description="暂无数据" />
</div> </div>
<div class="saveinfo"> <div class="saveinfo">
<van-button type="info" class="mt10 mb15" size="small" block round @click="saveCustomerTag"> <van-button type="info" size="small" block round @click="saveCustomerTag">
保存 保存
</van-button> </van-button>
</div> </div>
...@@ -204,34 +204,39 @@ ...@@ -204,34 +204,39 @@
</van-dialog> </van-dialog>
<!-- 点击客户标签里的编辑触发弹出框结束 --> <!-- 点击客户标签里的编辑触发弹出框结束 -->
<!-- 点击添加待办触发弹出框开始 --> <!-- 点击跟进状态触发弹出框开始 -->
<van-action-sheet v-model="usershow"> <van-action-sheet v-model="usershow">
<van-nav-bar title="跟进记录" right-text="X" @click-right="usershow = false"> <van-nav-bar title="跟进记录" @click-right="usershow = false">
<!-- <template #right> <template #right>
<van-icon name="cross" size="18" /> <van-icon name="cross" size="18" />
</template> --> </template>
</van-nav-bar> </van-nav-bar>
<!-- 表单 --> <!-- 表单 -->
<van-form @submit="onSubmit"> <van-form @submit="onSubmit">
<van-field name="radio" label="单选框"> <van-field
name="radio"
label="跟进状态"
required
:rules="[{ required: true, message: '必填项' }]"
>
<template #input> <template #input>
<van-radio-group v-model="radio" direction="horizontal"> <van-radio-group v-model="trackState" direction="horizontal">
<van-radio name="1">跟进中</van-radio> <van-radio name="2">跟进中</van-radio>
<van-radio name="2">已成交</van-radio> <van-radio name="3">已成交</van-radio>
<van-radio name="3">无意向</van-radio> <van-radio name="4">无意向</van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<!-- 待办内容 --> <!-- 跟进内容 -->
<van-field <van-field
v-model="conagency" v-model="conagency"
name="待办内容" name="跟进内容"
label="待办内容" label="跟进内容"
placeholder="请输入待办内容" placeholder="请输入跟进内容"
type="textarea" type="textarea"
required required
:rules="[{ required: true, message: '请输入待办内容' }]" :rules="[{ required: true, message: '必填项' }]"
class="conagency" class="conagency"
/> />
...@@ -286,12 +291,12 @@ ...@@ -286,12 +291,12 @@
/> />
</van-action-sheet> --> </van-action-sheet> -->
<!-- 保存 --> <!-- 保存 -->
<div style="margin: 30px"> <div style="width: 90%;margin: 20px auto 40px">
<van-button round block type="info" native-type="submit">保存</van-button> <van-button round block size="small" type="info" native-type="submit">保存</van-button>
</div> </div>
</van-form> </van-form>
</van-action-sheet> </van-action-sheet>
<!-- 点击添加待办触发弹出框结束 --> <!-- 点击跟进状态触发弹出框结束 -->
<!-- <div class="divider"></div> --> <!-- <div class="divider"></div> -->
</div> </div>
</template> </template>
...@@ -305,7 +310,8 @@ import { ...@@ -305,7 +310,8 @@ import {
findAddGroupNum, findAddGroupNum,
findTrajectory, findTrajectory,
addOrEditWaitHandle, addOrEditWaitHandle,
addOrUpdatePersonTags addOrUpdatePersonTags,
sync
} from '@/api/portrait' } from '@/api/portrait'
// import { getUserInfo } from "@/api/common"; // import { getUserInfo } from "@/api/common";
import StepList from '@/components/StepList.vue' import StepList from '@/components/StepList.vue'
...@@ -318,22 +324,23 @@ export default { ...@@ -318,22 +324,23 @@ export default {
return { return {
// 客户标签弹出框 // 客户标签弹出框
show: false, show: false,
// 客户待办的弹出框开始 // 跟进状态的弹出框开始
usershow: false, usershow: false,
conagency: '', // 待办内容 trackState: '', // 跟进状态
conagency: '', // 跟进内容
// 待办日期 // 待办日期
dateagency: '', // dateagency: '',
dateshow: false, // dateshow: false,
minDate: new Date(), // minDate: new Date(),
maxDate: new Date(2030, 12, 31), // maxDate: new Date(2030, 12, 31),
// 待办时间 // 待办时间
timeagency: '', // timeagency: '',
starttimeshow: false, // starttimeshow: false,
endtimeshow: false, // endtimeshow: false,
currentTime: '12:00', // currentTime: '12:00',
startTime: '', // startTime: '',
endTime: '', // endTime: '',
// 客户待办的弹出框结束 // 客户待办的弹出框结束
actions: [{ name: '选项一' }, { name: '选项二' }, { name: '选项三' }], actions: [{ name: '选项一' }, { name: '选项二' }, { name: '选项三' }],
...@@ -343,7 +350,7 @@ export default { ...@@ -343,7 +350,7 @@ export default {
todonewsshow: false, todonewsshow: false,
// 接口开始 // 接口开始
externalUserid: externalUserid:
process.env.NODE_ENV === 'production' ? '' : 'wmiGuBCgAA617zOzAIg-0sZG3Vok7BUA', process.env.NODE_ENV !== 'development' ? '' : 'wmbhUTLgAA6ByLnY45U-uiC4ccoMvwng',
// externalUserid: 'wmiGuBCgAAoCBD1frD3hRplbsXoBLx6g', // 客户IdwmiGuBCgAAoCBD1frD3hRplbsXoBLx6g // externalUserid: 'wmiGuBCgAAoCBD1frD3hRplbsXoBLx6g', // 客户IdwmiGuBCgAAoCBD1frD3hRplbsXoBLx6g
// externalUserid: 'wmiGuBCgAA617zOzAIg-0sZG3Vok7BUA', // externalUserid: 'wmiGuBCgAA617zOzAIg-0sZG3Vok7BUA',
form: { form: {
...@@ -405,7 +412,7 @@ export default { ...@@ -405,7 +412,7 @@ export default {
}, },
computed: { computed: {
userId() { userId() {
return process.env.NODE_ENV === 'production' ? this.$store.state.userId : 'FengJuZhuDeJieDao' return process.env.NODE_ENV !== 'development' ? this.$store.state.userId : 'XuXueJun'
} }
// activeLabel : () => { // activeLabel : () => {
// this.addTag.forEach((value) => { // this.addTag.forEach((value) => {
...@@ -435,7 +442,7 @@ export default { ...@@ -435,7 +442,7 @@ export default {
this.findAddGroupNum() this.findAddGroupNum()
this.getCustomerInfo() this.getCustomerInfo()
this.findTrajectory() this.findTrajectory()
this.getAllTags() // this.getAllTags()
} }
}, },
...@@ -503,6 +510,11 @@ export default { ...@@ -503,6 +510,11 @@ export default {
}) })
}, },
getAllTags(type) { getAllTags(type) {
this.$toast.loading({
message: 'loading...',
duration: 0,
forbidClick: true
})
let params = { let params = {
groupTagType: 1 groupTagType: 1
} }
...@@ -512,7 +524,7 @@ export default { ...@@ -512,7 +524,7 @@ export default {
userId: this.userId userId: this.userId
} }
} }
getAllTags(params) return getAllTags(params)
.then(({ data }) => { .then(({ data }) => {
this.alllabel = this.listTagOneArray = data this.alllabel = this.listTagOneArray = data
...@@ -524,23 +536,7 @@ export default { ...@@ -524,23 +536,7 @@ export default {
}) })
}) })
} }
}) this.$toast.clear()
.catch((err) => {
console.log(err)
})
},
// 添加或编辑轨迹
addOrEditWaitHandle(form) {
addOrEditWaitHandle(form)
.then((data) => {
// 重新获取列表
this.findAddaddEmployes()
this.findTrajectory()
if (data.code == 200) {
this.$toast.success('保存成功')
this.usershow = false
}
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err)
...@@ -571,63 +567,71 @@ export default { ...@@ -571,63 +567,71 @@ export default {
changeInfo() { changeInfo() {
this.findTrajectory() this.findTrajectory()
}, },
// 添加代办
// 客户待办点击保存事件 // 编辑跟进动态
onSubmit() { onSubmit() {
let form = { let form = {
trajectoryType: 4,
userId: this.userId, userId: this.userId,
externalUserid: this.externalUserid, externalUserid: this.externalUserid,
content: this.conagency, content: this.conagency,
createDate: this.dateagency, trackState: this.trackState //1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
startTime: `${this.dateagency} ${this.startTime}:00`,
endTime: `${this.dateagency} ${this.endTime}:00`,
status: 1,
agentId: this.agentId
} }
this.addOrEditWaitHandle(form) addOrEditWaitHandle(form)
.then((data) => {
this.getCustomerInfo()
this.findTrajectory()
if (data.code == 200) {
this.$toast.success('保存成功')
this.usershow = false
this.conagency = ''
this.trackState = ''
}
})
.catch((err) => {
console.log(err)
})
// 表单重置 // 表单重置
this.conagency = '' // this.dateagency = ''
this.dateagency = '' // this.startTime = ''
this.startTime = '' // this.endTime = ''
this.endTime = ''
}, },
// 待办日期 // 待办日期
formatDate(dateagency) { // formatDate(dateagency) {
return `${dateagency.getFullYear()}-${dateagency.getMonth() + 1}-${dateagency.getDate()}` // return `${dateagency.getFullYear()}-${dateagency.getMonth() + 1}-${dateagency.getDate()}`
}, // },
onConfirm(dateagency) { // onConfirm(dateagency) {
this.dateshow = false // this.dateshow = false
this.dateagency = this.formatDate(dateagency) // this.dateagency = this.formatDate(dateagency)
}, // },
// 待办时间 // 待办时间
timecancel() { // timecancel() {
this.starttimeshow = false // this.starttimeshow = false
}, // },
starttimeconfirm(value) { // starttimeconfirm(value) {
this.startTime = value // this.startTime = value
this.starttimeshow = false // this.starttimeshow = false
this.endtimeshow = true // this.endtimeshow = true
}, // },
endtimeconfirm(value) { // endtimeconfirm(value) {
this.endTime = value // this.endTime = value
this.endtimeshow = false // this.endtimeshow = false
let time = '' // let time = ''
if (this.startTime > this.endTime) { // if (this.startTime > this.endTime) {
time = this.startTime // time = this.startTime
this.startTime = this.endTime // this.startTime = this.endTime
this.endTime = time // this.endTime = time
} // }
// console.log(this.startTime, this.endTime); // // console.log(this.startTime, this.endTime);
this.endtimeshow = false // this.endtimeshow = false
this.timeagency = this.formatTime() // this.timeagency = this.formatTime()
}, // },
formatTime() { // formatTime() {
return `${this.startTime}-${this.endTime}` // return `${this.startTime}-${this.endTime}`
}, // },
// 待办动态 // 待办动态
// 点击删除按钮
deltodoshow() {},
goRoute(path) { goRoute(path) {
this.$router.push({ this.$router.push({
...@@ -646,18 +650,18 @@ export default { ...@@ -646,18 +650,18 @@ export default {
let tags = this.form[type === 'person' ? 'personTags' : 'tags'] let tags = this.form[type === 'person' ? 'personTags' : 'tags']
let hasErrorTag = [] // 异常活已经删除的标签 let hasErrorTag = [] // 异常活已经删除的标签
let repeat = [] // 重复的标签 // let repeat = [] // 重复的标签
tags && tags &&
tags.forEach((unit) => { tags.forEach((unit) => {
// 判断是否有重复标签 // 判断是否有重复标签
let isRepeat = this.listTagOneArray.some((d) => { // let isRepeat = this.listTagOneArray.some((d) => {
return d.tagId === unit.tagId // return d.tagId === unit.tagId
}) // })
// 去重 // // 去重
if (isRepeat) { // if (isRepeat) {
repeat.push(unit.name) // repeat.push(unit.name)
return // return
} // }
let filter = this.listTagOneArray.find((d) => { let filter = this.listTagOneArray.find((d) => {
return d.tagId === unit.tagId return d.tagId === unit.tagId
}) })
...@@ -759,6 +763,18 @@ export default { ...@@ -759,6 +763,18 @@ export default {
.catch((err) => { .catch((err) => {
console.log(err) console.log(err)
}) })
},
sync() {
this.$toast.loading({
message: 'loading...',
duration: 0,
forbidClick: true
})
sync(this.userId).then((res) => {
this.$toast.success('同步成功')
this.findTrajectory()
this.$toast.clear()
})
} }
} }
} }
...@@ -794,7 +810,7 @@ export default { ...@@ -794,7 +810,7 @@ export default {
} }
.left { .left {
display: flex; display: flex;
margin-bottom: 20px; align-items: center;
.img { .img {
width: 40px; width: 40px;
height: 40px; height: 40px;
...@@ -819,7 +835,7 @@ export default { ...@@ -819,7 +835,7 @@ export default {
.content { .content {
max-height: 60vh; max-height: 60vh;
position: relative; position: relative;
margin: 16px 0 60px; margin: 16px 0 20px;
padding: 0 16px; padding: 0 16px;
overflow: auto; overflow: auto;
} }
...@@ -852,11 +868,8 @@ export default { ...@@ -852,11 +868,8 @@ export default {
position: relative; position: relative;
} }
.saveinfo { .saveinfo {
position: absolute;
width: 90%; width: 90%;
left: 50%; margin: 20px auto 40px;
bottom: 0;
transform: translate(-50%, 0%);
} }
// 社交关系 // 社交关系
...@@ -941,10 +954,13 @@ export default { ...@@ -941,10 +954,13 @@ export default {
} }
} }
.iconfont { .gender {
color: #9c9c9c;
}
.man {
color: #2c8cf0; color: #2c8cf0;
} }
.icon-xingbie { .woman {
color: pink; color: pink;
} }
......
...@@ -423,7 +423,7 @@ export default { ...@@ -423,7 +423,7 @@ export default {
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="edit-model"> <!-- <div class="edit-model">
<h4 class="title">新客欢迎语</h4> <h4 class="title">新客欢迎语</h4>
<el-form <el-form
:model="groupForm" :model="groupForm"
...@@ -441,7 +441,7 @@ export default { ...@@ -441,7 +441,7 @@ export default {
</div> </div>
</div> </div>
</el-form> </el-form>
</div> </div> -->
<el-button type="primary" @click="submitForm()">{{ <el-button type="primary" @click="submitForm()">{{
pageType == 'edit' ? '立即修改' : '立即创建' pageType == 'edit' ? '立即修改' : '立即创建'
}}</el-button> }}</el-button>
......
...@@ -416,7 +416,7 @@ export default { ...@@ -416,7 +416,7 @@ export default {
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="edit-model"> <!-- <div class="edit-model">
<h4 class="title">新客欢迎语</h4> <h4 class="title">新客欢迎语</h4>
<el-form :model="groupForm" ref="welcomeTips" label-width="150px" class="top-search"> <el-form :model="groupForm" ref="welcomeTips" label-width="150px" class="top-search">
<div class="welcomeBox"> <div class="welcomeBox">
...@@ -428,7 +428,7 @@ export default { ...@@ -428,7 +428,7 @@ export default {
</div> </div>
</div> </div>
</el-form> </el-form>
</div> </div> -->
<el-button type="primary" @click="submitForm()">{{ <el-button type="primary" @click="submitForm()">{{
pageType == 'edit' ? '立即修改' : '立即创建' pageType == 'edit' ? '立即修改' : '立即创建'
}}</el-button> }}</el-button>
......
...@@ -23,8 +23,8 @@ export default { ...@@ -23,8 +23,8 @@ export default {
portrayalSum: { companyTags: [], personTags: [], trackStates: [], trackUsers: [] }, // 客户画像汇总 portrayalSum: { companyTags: [], personTags: [], trackStates: [], trackUsers: [] }, // 客户画像汇总
trajectoryType: { trajectoryType: {
0: '全部', 0: '全部',
1: '信息动态', 1: '客户动态',
2: '社交动态', 2: '员工动态',
3: '跟进动态', 3: '跟进动态',
4: '互动动态' 4: '互动动态'
}, },
......
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
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
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
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,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!