Commit 14ac09f6 by 前端

Merge branch 'v2.3.3' into 'master'

V2.3.3

See merge request !70
2 parents ebb8c283 6a73618d
......@@ -9,11 +9,11 @@ const url = '/rop-scrm-marketing/router'
export default {
/**
* 获取跟进结果字典 */
followFindAllDictData(data) {
data.method = 'merchants.api.menu.findAllDictData'
return window.$HTTP({
url:window.$fetchConfig.dict,
url: window.$fetchConfig.dict,
data,
returnAll: true
})
......@@ -36,7 +36,7 @@ export default {
returnAll: true
})
},
// 客户招揽-任务总览
taskOverviewData(data) {
data.method = 'marketing.api.solicit.taskOverview'
......@@ -83,6 +83,15 @@ export default {
returnAll: true
})
},
// 一键营销-员工发送状态判断
staffSendStatus(data) {
data.method = 'marketing.api.solicit.ocmarketing.staff.sendStatus'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 获取送达、未送达列表
getCustomerList(data) {
......@@ -111,22 +120,22 @@ export default {
returnAll: true
})
},
// 跟进结果-成功到店与战败分析
getFollowResult(data) {
data.method = 'marketing.api.solicit.staffid.getFollowResult'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 跟进结果-成功到店与战败分析
getCustomerFollowTotal(data) {
data.method = 'marketing.api.solicit.staffid.getCustomerFollowTotal'
return window.$HTTP({
url,
data,
returnAll: true
})
}
// 跟进结果-成功到店与战败分析
getFollowResult(data) {
data.method = 'marketing.api.solicit.staffid.getFollowResult'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 跟进结果-成功到店与战败分析
getCustomerFollowTotal(data) {
data.method = 'marketing.api.solicit.staffid.getCustomerFollowTotal'
return window.$HTTP({
url,
data,
returnAll: true
})
}
}
......@@ -49,7 +49,9 @@ img {
overflow: hidden;
text-overflow: ellipsis;
}
.nowrap{
white-space: nowrap;
}
.text-two-line {
overflow: hidden;
text-overflow: ellipsis;
......@@ -122,6 +124,9 @@ img {
.font-16 {
font-size: 16px;
}
.line-22{
line-height: 22px;
}
.line-24 {
line-height: 24px;
}
......@@ -232,4 +237,7 @@ img {
.emo_img {
width: 20px;
height: 20px;
}
.p52{
padding:11px 52px;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div>
<div class="customer-box" v-for="(item, index) in customerData" :key="index">
<div class="customer-title">
<div class="customer-name">{{ item.customerName }}</div>
<div class="customer-name text-hide">{{ item.customerName }}</div>
<div class="customer-carnumber">{{ item.cars && item.cars.length > 0 && item.cars[0].carNumber }}</div>
</div>
<div class="customer-info">
......@@ -17,13 +17,15 @@
</div>
<div class="customer-info-label">
<div class="customer-info-name">企微营销:</div>
<div class="customer-info-message">{{ item.checkStatus == 0 ? '未查看' : item.checkStatus == 1 ? '已查看' : '' }}</div>
<div class="customer-info-message">
{{ item.receiveStatus == 1 ? '已领取' : item.checkStatus == 1 ? '已查看' : item.sendStatus == 1 ? '已送达' : item.sendStatus == 0 ? '未送达' : '' }}
</div>
</div>
</div>
<div class="customer-info-right">
<div class="customer-info-label">
<div class="customer-info-name">企微账号:</div>
<div v-if="item.nickName">
<div v-if="item.type">
<span class="customer-info-message customer-info-wechatnick text-hide">{{ item.nickName }}</span>
<span class="customer-info-message" :class="[item.type == 1 ? 'customer-info-wechat' : 'customer-info-qiwechat']">{{ item.type == 1 ? '@微信' : item.type == 2 ? '@企微' : '' }}</span>
</div>
......@@ -31,11 +33,11 @@
</div>
<div class="customer-info-label">
<div class="customer-info-name">招揽日期:</div>
<div class="customer-info-message">{{ item.solicitTime }}</div>
<div class="customer-info-message text-hide">{{ item.solicitTime }}</div>
</div>
<div class="customer-info-label">
<div class="customer-info-name">更新日期:</div>
<div class="customer-info-message">{{ item.updatedTime }}</div>
<div class="customer-info-message text-hide">{{ item.updatedTime }}</div>
</div>
</div>
</div>
......@@ -47,7 +49,7 @@
</div>
</div>
<!-- 电话营销弹窗 -->
<van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" cancel-text="取消" close-on-click-action @cancel="onCancel" />
<!-- <van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" cancel-text="取消" close-on-click-action @cancel="onCancel" /> -->
</div>
</template>
......@@ -56,7 +58,7 @@ import { Toast } from 'vant'
import { wxConfig } from '@/api'
import CustomerInfoPopup from './CustomerInfoPopup.vue'
import CustomerFollowPopup from './CustomerFollowPopup.vue'
import { solicitApi } from '@/api'
import { ssoApi } from '@/api'
export default {
components: { CustomerInfoPopup, CustomerFollowPopup },
name: 'CustomerCard',
......@@ -82,7 +84,6 @@ export default {
},
watch: {
customerInfo(n) {
console.log(n, '监听数据')
this.customerData = n
}
},
......@@ -99,17 +100,24 @@ export default {
},
phoneNumber: null,
customerData: this.customerInfo,
customerIndex: 0
customerIndex: 0,
workUserId: ''
}
},
mounted() {
this.initWx()
this.getuserInfo()
},
methods: {
// 初始化微信接口
initWx() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData', 'navigateToAddCustomer', 'makePhoneCall']).then(() => {})
window.$wx.init(['setClipboardData', 'navigateToAddCustomer', 'openEnterpriseChat', 'makePhoneCall']).then(() => {})
},
getuserInfo() {
ssoApi.getuserInfo().then(res => {
this.workUserId = res.data.workUserId
})
},
changeTab(index) {
this.isShow = false
......@@ -119,14 +127,15 @@ export default {
},
// 电话招揽
callCustomer(val) {
// console.log(val)
console.log(val)
if (!val.phoneNumber) {
Toast('系统尚未查询到该用户的电话号码')
return
}
this.phoneNumber = val.phoneNumber
// 打开电话营销弹窗
this.show = true
// this.show = true
this.$emit('showAction', { phoneNumber: this.phoneNumber })
},
// 选择电话营销方式
onSelect(e) {
......@@ -156,8 +165,13 @@ export default {
// 如果未添加企微客户
if (!val.userId) {
if (val.phoneNumber) {
this.setClipboardData(val.phoneNumber)
Toast('已复制手机号,请尝试通过用户手机号来添加好友')
wx.setClipboardData({
data: val.phoneNumber,
success(res) {
Toast('已复制手机号,请尝试通过用户手机号来添加好友')
},
fail(res) {}
})
} else {
Toast('尚未添加好友,请尝试添加客户为好友')
}
......@@ -176,7 +190,7 @@ export default {
groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
chatId: ''
}
console.log(seach, 'seach')
// console.log(seach, 'seach')
wxConfig.openEnterpriseChat(seach).then(res => {
// console.log(res)
})
......@@ -197,15 +211,17 @@ export default {
.customer-title {
display: flex;
justify-content: space-between;
padding: 10px 12px;
height: 39px;
}
.customer-name {
width: calc(100% - 120px);
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #282829;
line-height: 20px;
line-height: 39px;
padding-left: 12px;
}
.customer-carnumber {
......@@ -213,14 +229,16 @@ export default {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 16px;
line-height: 39px;
white-space: nowrap;
padding-right: 12px;
}
.customer-info {
display: flex;
padding: 12px;
border-top: 1px solid #c3c3c3;
border-bottom: 1px solid #c3c3c3;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
border-top: 1px solid rgba(195, 195, 195, 0.3);
&-left,
&-right {
width: 50%;
......@@ -252,11 +270,11 @@ export default {
}
&-wechat {
vertical-align: bottom;
color: #3975c6;
color: #2cca74;
}
&-qiwechat {
vertical-align: bottom;
color: #2cca74;
color: #3975c6;
}
}
......@@ -268,6 +286,6 @@ export default {
.customer-info-qiwechat {
vertical-align: bottom;
color: #2cca74;
// color: #2cca74;
}
</style>
<template>
<div>
<van-action-sheet v-model="show">
<van-action-sheet v-model="show" @click-overlay="clickOverlay">
<van-sticky class="name-title">
<div class="name-title-text">{{ info.customerName }}</div>
<div class="name-title-text text-hide">{{ info.customerName }}</div>
</van-sticky>
<div class="follow-content">
<!-- <div class="name-title">
......@@ -25,7 +25,7 @@
<van-switch v-model="selectFollowForm.checked" active-color="#3975C6" size="24px" />
</template>
</van-field>
<div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「待跟进」迁移至「已跟进」列表。</div>
<div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「跟进」迁移至「结果」列表。</div>
<van-field
v-show="selectFollowForm.followResult == 1"
v-model="selectFollowForm.orderTime"
......@@ -56,7 +56,16 @@
:style="{ height: '500px' }"
@select="selectDate"
/>
<van-datetime-picker type="time" :default-time="defaultTime" v-model="defaultTime" v-show="tabIndex" @change="confirmTime" :min-hour="minHour" :show-toolbar="false" />
<van-datetime-picker
type="time"
:default-time="defaultTime"
v-model="defaultTime"
v-show="tabIndex"
@change="confirmTime"
:min-hour="minHour"
:min-minute="minMinute"
:show-toolbar="false"
/>
</div>
</van-cell-group>
</van-form>
......@@ -108,10 +117,11 @@ export default {
timeNow: '',
// 时间标签可选最小时间
minHour: '',
minMinute: '',
// 默认日期
defaultDate: '',
// 默认时间
defaultTime: '',
defaultTime: ''
}
},
props: {
......@@ -172,12 +182,15 @@ export default {
cancel() {
this.initFormData()
},
clickOverlay() {
this.initFormData()
},
// 提交按钮
submit() {
let params = {
followResult: this.selectFollowForm.followResult,
followMark: this.selectFollowForm.followMark,
followFlag: this.selectFollowForm.checked ? 1 : 0,
followFlag: this.selectFollowForm.checked ? 1 : 2,
activityId: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
......@@ -221,6 +234,7 @@ export default {
},
// 日期格式转化
formatterDate(val, type) {
const dateNow = new Date(new Date().getTime() + (parseInt(new Date().getTimezoneOffset() / 60) + 8) * 3600 * 1000)
let date = new Date(val)
let y = date.getFullYear()
let m = date.getMonth() + 1
......@@ -228,19 +242,23 @@ export default {
let h = date.getHours()
let h1 = h < 10 ? '0' + h : h
let d = date.getDate()
let s = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
d = d < 10 ? '0' + d : d
const time = y + '-' + m + '-' + d
this.datePickList[0].date = time
//初始化当天的最小时分
if (!type) {
this.dayNow = time
this.timeNow = h1 + 1
this.timeNow = h1
}
if (this.dayNow == time) {
this.datePickList[1].date = this.timeNow + ':00'
this.minMinute = dateNow.getMinutes() < 10 ? '0' + dateNow.getMinutes() : dateNow.getMinutes()
this.datePickList[1].date = this.timeNow + ':' + this.minMinute
this.minHour = this.timeNow
return
}
this.minHour = ''
this.minMinute = ''
}
}
}
......@@ -346,7 +364,7 @@ export default {
.van-sheet-gap {
height: 8px;
background-color: #f7f8fa;
margin-bottom: 40px;
margin-bottom: 44px;
}
.btn-group {
position: fixed;
......@@ -365,7 +383,7 @@ export default {
margin: 0;
}
.dialog-follow /deep/ .van-cell {
padding: 16px 0;
padding: 16px 0 13px 0;
}
.dialog-follow /deep/ .van-cell::after {
border-bottom: none;
......
<template>
<div>
<van-action-sheet v-model="showCustomerDetail" cancel-text="关闭详情" close-on-click-action @cancel="onCancel">
<van-action-sheet v-model="showCustomerDetail" cancel-text="关闭详情" close-on-click-action @cancel="onCancel" @click-overlay="clickOverlay">
<div class="popup-card">
<div class="name-title">
<div class="name-title-text">{{ customerList.customerName }}</div>
<div class="name-title-text text-hide">{{ customerList.customerName }}</div>
</div>
<!-- 客户信息 -->
<div class="customer-message">
......@@ -31,7 +31,7 @@
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">人群分组</div>
<div class="customer-info-item-content">{{ groupName }}</div>
<div class="customer-info-item-content text-hide">{{ groupName }}</div>
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">企微账号</div>
......@@ -131,20 +131,20 @@ export default {
if (data.cars && data.cars.length) {
this.carInfoList = data.cars
this.carInfoList.map(item => {
item.carBuyDate = this.timeTransfer(item.carBuyDate)
item.carBuyDate = item.carBuyDate && this.timeTransfer(item.carBuyDate)
})
}
if (data.maList && data.maList.length) {
this.maintennceList = data.maList.slice(0, 2)
this.maintennceList = data.maList
this.maintennceList.map(item => {
item.maDate = this.timeTransfer(item.maDate)
item.maDate = item.maDate && this.timeTransfer(item.maDate)
})
}
if (data.followRecordList && data.followRecordList.length) {
this.followRecordList = data.followRecordList
this.followRecordList.map(item => {
item.orderTime = item.orderTime && this.timeTransfer(item.orderTime)
item.createdTime = this.timeTransfer(item.createdTime)
item.createdTime = item.createdTime && this.timeTransfer(item.createdTime)
})
}
}
......@@ -172,6 +172,13 @@ export default {
this.carInfoList = []
this.maintennceList = []
this.followRecordList = []
},
clickOverlay() {
this.showCustomerDetail = false
this.customerList = {}
this.carInfoList = []
this.maintennceList = []
this.followRecordList = []
}
}
}
......@@ -179,12 +186,15 @@ export default {
<style lang="scss" scoped>
.popup-card {
padding: 0 16px 16px 16px;
padding: 0 0 16px 0;
}
.name-title {
box-sizing: border-box;
padding: 0 16px;
width: 100%;
height: 48px;
background-color: #fff;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
position: sticky;
top: 0;
z-index: 999;
......@@ -197,8 +207,10 @@ export default {
}
}
.customer-message {
box-sizing: border-box;
padding: 16px 0;
border-bottom: 1px solid #c3c3c3;
margin: 0 16px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
}
.customer-info-title {
font-size: 16px;
......@@ -221,6 +233,7 @@ export default {
}
&-content {
color: #333333;
max-width: 200px;
}
&-message {
font-size: 12px;
......@@ -229,14 +242,14 @@ export default {
line-height: 18px;
}
&-wechat {
color: #3975c6;
color: #2cca74;
}
&-qiwei {
color: #2cca74;
color: #3975c6;
}
}
.record {
margin-top: 16px;
margin: 16px 16px 0 16px;
}
.stepItem {
display: flex;
......
......@@ -64,8 +64,9 @@ export default {
}
</script>
<style lang="scss" scoped>
.qw-drop-down /deep/ .van-ellipsis {
font-size: 14px;
font-weight: 400;
.qw-drop-down /deep/ .van-dropdown-menu__title {
font-size: 14px !important;
font-weight: 400 !important;
color: #333333 !important;
}
</style>
......@@ -70,7 +70,7 @@ export default {
width: 100%;
height: 50px;
box-sizing: border-box;
background-color: #dfe7f1;
background-color: #EBEFF5;
.item {
width: 50%;
// transition: all 0.5s;
......
......@@ -37,7 +37,7 @@ router.beforeEach((to, from, next) => {
if (to.meta.title) {
store.dispatch('setPageMeta', to.meta)
} else {
store.dispatch('setPageMeta', { title: '客户跟进' })
store.dispatch('setPageMeta', { title: '' })
}
store.commit('SET_LAST_PATH', to.name)
/* 路由发生变化修改页面背景色 */
......
......@@ -75,6 +75,15 @@ const pages = {
}
}
],
friends: [
{
name: 'index',
meta: {
title: '发布朋友圈任务',
backgroundColor: '#F7F7F7'
}
}
],
customerDetails: [
{
name: 'index',
......
......@@ -38,7 +38,7 @@ export default {
util.setLocalStorage('dj_scrm_activityId', payload.activityId)
},
['SET_OVERVIEW_COUNT_INFO'](state, payload) {
state.overviewCountInfo = payload.overviewCountInfo
state.overviewCountInfo = payload.overviewCountInfo
}
},
actions: {
......@@ -50,6 +50,10 @@ export default {
if (payload.success) {
payload.success()
}
} else if (res.code == 21) {
if (payload.fail) {
payload.fail()
}
}
})
},
......@@ -89,6 +93,10 @@ export default {
if (payload.success) {
payload.success(res.data)
}
} else if (res.code == 21) {
if (payload.fail) {
payload.fail()
}
} else {
Notify(res.message)
}
......
......@@ -78,10 +78,12 @@ export default {
this.chart.coord({
transposed: true
})
this.chart.interval().position('text*value').color(color)
this.chart.interval().position('text*value').color(color).style({
height: 16,
})
this.chart.render()
// 绘制柱状图文本
const offset = -6
const offset = -5
const canvas = this.chart.get('canvas')
const group = canvas.addGroup()
const shapes = {}
......
......@@ -105,8 +105,8 @@ export default {
// let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/
// const time = currentData.origin.date.replace(reg, '$1年$2月$3日')
tooltipEl.innerHTML = `<div class="time">${currentData.origin.date}</div>
<div class="item flex"><span class="arc" style="color:#3975C6;">●</span>预约到店:${ev.items[0].value}</div>
<div class="item flex"><span class="arc" style="color:#FA7C0B;">●</span>实际到店:${ev.items[1].value}</div>`
<div class="item flex"><span class="arc" style="color:#FA7C0B;">●</span>预约到店:${ev.items[0].value}</div>
<div class="item flex"><span class="arc" style="color:#3975C6;">●</span>实际到店:${ev.items[1].value}</div>`
tooltipEl.style.opacity = 1
tooltipEl.style.left = currentData.x - 140 / 2 + 'px'
tooltipEl.style.top = currentData.y - 45 - 15 + 'px'
......@@ -115,7 +115,7 @@ export default {
tooltipEl.style.opacity = 0
}
})
this.chart.line().position('date*value').shape('smooth').color('type', ['#3975C6', '#FA7C0B'])
this.chart.line().position('date*value').shape('smooth').color('type', [ '#FA7C0B','#3975C6'])
this.chart.legend(false)
this.chart.render()
},
......
......@@ -77,7 +77,7 @@ export default {
this.chart.coord('polar', {
transposed: true,
radius: 0.9,
innerRadius: 0.6
innerRadius: 0.74
})
this.chart.axis(false)
this.chart.legend(false)
......
......@@ -10,26 +10,24 @@
</div>
<tab-customer :list="['企微营销', '电话招揽']" @change="changeFollow" :index="follewIndex">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template
v-if="solicitationFollowData.weComMarketingList && solicitationFollowData.weComMarketingList.length > 0">
<template v-if="solicitationFollowData.weComMarketingList && solicitationFollowData.weComMarketingList.length > 0">
<div class="follow-content">
<div class="follow-content-item m-b-12" v-for="(item, index) in solicitationFollowData.weComMarketingList"
:key="index">
<div class="follow-content-item m-b-12" v-for="(item, index) in solicitationFollowData.weComMarketingList" :key="index">
<div class="follow-content-item-top">
<div class="font-16 color-3 fw5 text-hide">{{ item.groupName }}</div>
<div class="m-t-8 flex-between fw7">
<div class="font-24 line-36 color-3">
{{ item.groupWeComCustomerCount }}
<span class="font-12 color-2f m-l-8">个企微客户</span>
<span class="font-12 color-2f m-l-8 fw4">个企微客户</span>
</div>
<div class="font-12 color-2f">招揽月份:{{ item.solicitationMonth }}月</div>
<div class="font-12 color-2f fw4">招揽月份:{{ item.solicitationMonth }}月</div>
</div>
</div>
<template v-if="follewIndex == 0">
<div class="flex-around follow-btn">
<div class="color39 font-14" @click="goTo('solicit.marketing', item)">一键营销</div>
<div class="flex">
<div class="color39 font-14 p52 nowrap" @click="goTo('solicit.marketing', item)">一键营销</div>
<div class="colord8">|</div>
<div class="color39 font-14" @click="goTo('solicit.statistic', item)">触达统计</div>
<div class="color39 font-14 p52 nowrap" @click="goTo('solicit.statistic', item)">触达统计</div>
</div>
</template>
<template v-else>
......@@ -127,7 +125,8 @@ export default {
.follow-statistics {
background: #fff;
height: 82px;
box-shadow: 0px 3px 10px 0px rgba(223, 228, 234, 0.81);
border-radius: 4px;
&-single {
padding: 12px 0;
width: 33.3%;
......
<template>
<div class="customer-container" v-if="flag">
<div class="customer-container-head">
<div class="font-16 color54 line-24 title">{{ groupName }}</div>
<div class="font-16 color54 line-24 title text-hide">{{ groupName }}</div>
<div class="search-head flex">
<van-dropdown-menu active-color="#3369B1">
<van-dropdown-item v-model="searchType" :options="seachArray" @change="selectType" />
......@@ -11,13 +11,14 @@
<drop-down :selectOption1="statusList" :selectOption2="resultList" :currentValue1="status" :currentValue2="result" @changeFirst="changeFirst" @changeSecond="selectSecondChange"></drop-down>
</div>
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<customer-card v-if="customerInfo.length > 0" :customerInfo="customerInfo" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop"></customer-card>
<customer-card v-if="customerInfo.length > 0" :customerInfo="customerInfo" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop" @showAction="showAction"></customer-card>
<empty v-else></empty>
</scroll-view>
<!-- 跟进弹窗 -->
<customer-follow-popup ref="customerFollowRef" :info="followCustomerData" @changeIndexEvent="changeIndexEvent"></customer-follow-popup>
<!-- 客户信息弹窗 -->
<customer-info-popup ref="customerInfoRef"></customer-info-popup>
<van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" cancel-text="取消" close-on-click-action @cancel="onCancel" />
</div>
</template>
<script>
......@@ -27,6 +28,10 @@ import { Notify } from 'vant'
export default {
data() {
return {
// 电话营销弹窗
show: false,
actions: [{ name: '呼叫' }, { name: '复制' }],
phoneNumber: '',
flag: false,
keyWord: '',
status: 0,
......@@ -66,6 +71,26 @@ export default {
this.getSendCustomerList()
},
methods: {
// 初始化微信接口
initWx() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData', 'navigateToAddCustomer', 'openEnterpriseChat', 'makePhoneCall']).then(() => {})
},
// 电话招揽弹窗关闭
onCancel() {
this.show = false
},
// 选择电话营销方式
onSelect(e) {
// 呼叫
if (e.name === '呼叫') {
// window.location.href = 'tel://' + this.telNumber
this.makePhoneCall(this.phoneNumber)
return
}
// 复制
this.setClipboardData(this.phoneNumber)
},
showFollowPop(data) {
this.$refs.customerFollowRef.init()
this.customerIndex = data.customerIndex
......@@ -74,6 +99,10 @@ export default {
showInfoPop(data) {
this.$refs.customerInfoRef.getCustomerDetail(data.followCustomerData)
},
showAction(data) {
this.show = true
this.phoneNumber = data.phoneNumber
},
changeIndexEvent() {
let params = {
customerId: this.followCustomerData.actCutId
......@@ -96,11 +125,10 @@ export default {
keyWord: this.keyWord,
type: this.searchType + 1,
customerGroupType: 2,
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
followFlag: this.status != 0 ? this.status : ''
followFlag: this.status == 0 ? '' : this.status == 2 ? 0 : this.status //0未跟进、1已跟进
}
if (this.status != 2) {
params.followResult = this.result != 0 ? this.result : ''
......@@ -125,7 +153,7 @@ export default {
},
searchkeyWord(e) {
this.keyWord = e
if (this.searchType != 0 && this.keyWord.length <= 2) {
if (this.searchType != 0 && this.keyWord.length <= 2 && this.keyWord != '') {
return
}
......@@ -167,11 +195,13 @@ export default {
border-bottom: 1px solid rgba(216, 216, 216, 0.3);
/deep/.van-dropdown-menu__bar {
box-shadow: 0 0 0 #fff;
font-size: 14px;
font-weight: 400;
color: #333333;
margin-right: 13px;
}
/deep/ .van-dropdown-menu__title {
font-size: 14px !important;
color: #333333 !important;
}
/deep/ .van-search {
width: 250px;
padding: 0;
......
......@@ -15,7 +15,7 @@
<template v-else-if="item.attType == 7">
<div class="preview-activity">
<img class="applet-logo" src="@/assets/images/solicit/icon-applet.png" alt />
<span style="color: #999">小程序</span>
<span style="color: #999; line-height:18px">小程序</span>
<div class="activity-name">{{ activityContent[item.attContent.marketingType] }}</div>
<img v-if="item.attContent.marketingType == 1 || item.attContent.marketingType == 2" class="activity-logo" src="@/assets/images/solicit/activity-logo.png" alt />
<img v-if="item.attContent.marketingType == 3 || item.attContent.marketingType == 4" class="activity-logo" src="@/assets/images/solicit/activity-equity.png" alt />
......
......@@ -48,6 +48,7 @@ import pieChart from '../solicit/components/pie.vue'
import barChart from '../solicit/components/bar.vue'
import { solicitApi } from '@/api'
import { mapState, mapActions } from 'vuex'
import { util } from '../../utils'
import { Notify } from 'vant'
export default {
components: {
......@@ -95,6 +96,10 @@ export default {
this.getTaskOverviewData()
}
})
},
fail: () => {
this.hideLoading()
this.reLogin()
}
})
} else {
......@@ -114,8 +119,15 @@ export default {
methods: {
...mapActions({
getStaffId: 'solicit/getStaffId',
findActivityIdByUUID: 'solicit/findActivityIdByUUID'
findActivityIdByUUID: 'solicit/findActivityIdByUUID',
navigation: 'navigation'
}),
//重新登录
reLogin() {
/**登录过期 重新登录 */
util.clearSessionId()
this.navigation()
},
getTaskOverviewData() {
let params = {
activityId: this.activityId,
......@@ -150,12 +162,12 @@ export default {
{
const: 'const',
text: '本月指标 (人)',
value: overviewInfo.notFollowedUpCount + overviewInfo.followedUpCount
value: overviewInfo.notFollowedUpCount
}
]
this.chart.centerData = {
text: '达成率',
rate: overviewInfo.followedUpPercent
rate: overviewInfo.followedUpPercent ? parseInt(overviewInfo.followedUpPercent * 100) + '%' : 0
}
overviewInfo.customerGroupList.length > 0 &&
overviewInfo.customerGroupList.forEach(item => {
......@@ -173,7 +185,8 @@ export default {
.overview-container {
.overview-wrap {
background: #fff;
box-shadow: 0px 3px 10px 0px rgba(223, 228, 234, 0.81);
border-radius: 4px;
.overview-content {
height: 160px;
box-sizing: border-box;
......
......@@ -5,19 +5,19 @@
<div class="result-container-content">
<template v-for="(item, i) in getCustomerFollow">
<div :key="i" class="result-container-content-item">
<div class="title-info">{{ item.groupName }}</div>
<div class="title-info text-hide">{{ item.groupName }}</div>
<div class="result-content flex-between">
<div class="result-content-list flex-top" @click="goto('solicit.succeed', 1, item.groupId, item.groupName)">
<div class="result-content-list flex-top" @click="goto('solicit.succeed', 2, item.groupId, item.groupName)">
<div class="sprite-icon icon-succeed"></div>
<div class="m-l-8">
<div class="font-14 color-3 fw5">成功到店</div>
<div class="font-14 color-3 fw5 line-22">成功到店</div>
<div class="font-12 color-2f m-t-4">客户:{{ item.successCustomerNums }}人</div>
</div>
</div>
<div class="result-content-list flex-top" @click="goto('solicit.succeed', 2, item.groupId, item.groupName)">
<div class="result-content-list flex-top" @click="goto('solicit.succeed', 1, item.groupId, item.groupName)">
<div class="sprite-icon icon-fail"></div>
<div class="m-l-8">
<div class="font-14 color-3 fw5">战败分析</div>
<div class="font-14 color-3 fw5 line-22">战败分析</div>
<div class="font-12 color-2f m-t-4">客户:{{ item.defeatCustomerNums }}人</div>
</div>
</div>
......@@ -44,13 +44,11 @@ export default {
this.getCustomerFollowTotal()
},
methods: {
// 获取跟进结果字典数据
// 跟进结果-成功到店与战败分析
getCustomerFollowTotal() {
const { activityId, staffId } = this.$store.state.solicit
var params = {
activityId,
followFlag: 0,
retFacFlag: 0,
staffId
}
solicitApi.getCustomerFollowTotal(params).then(res => {
......
......@@ -8,7 +8,7 @@
<div>1. 客户开启消息免打扰,消息发送失败;</div>
<div>2. 群发次数达到上限,上限次数为每个客户每天仅可接收1条群发消息。(系统将连续重试3天)</div>
</div>
<customer-card v-if="customerInfo1.length > 0" :customerInfo="customerInfo1" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop"></customer-card>
<customer-card v-if="customerInfo1.length > 0" :customerInfo="customerInfo1" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop" @showAction="showAction"></customer-card>
<empty v-else></empty>
</scroll-view>
</van-tab>
......@@ -32,7 +32,7 @@
</div>
</div>
<select-bar :index="alreadyIndex" :list="selectBarList" @change="changeSelectTab"></select-bar>
<customer-card v-if="customerInfo2.length > 0" :customerInfo="customerInfo2" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop"></customer-card>
<customer-card v-if="customerInfo2.length > 0" :customerInfo="customerInfo2" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop" @showAction="showAction"></customer-card>
<empty v-else></empty>
</van-tab>
</van-tabs>
......@@ -40,6 +40,7 @@
<customer-follow-popup ref="customerFollowRef" :info="followCustomerData" @changeIndexEvent="changeIndexEvent"></customer-follow-popup>
<!-- 客户信息弹窗 -->
<customer-info-popup ref="customerInfoRef"></customer-info-popup>
<van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" cancel-text="取消" close-on-click-action @cancel="onCancel" />
</div>
</template>
......@@ -54,6 +55,10 @@ export default {
components: { SelectBar, Empty, ScrollView },
data() {
return {
// 电话营销弹窗
show: false,
actions: [{ name: '呼叫' }, { name: '复制' }],
phoneNumber: '',
tabIndex: 0,
alreadyIndex: 0,
deliveredNum: 0,
......@@ -137,12 +142,59 @@ export default {
},
mounted() {
this.showLoading()
//员工发送状态判断
this.staffSendStatus()
// 触达统计-客户送达分层
this.deliveredStatistics()
this.getSendCustomerList(0) // 未送达
this.getSendCustomerList(1) // 已送达
},
methods: {
// 初始化微信接口
initWx() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData', 'navigateToAddCustomer', 'openEnterpriseChat', 'makePhoneCall']).then(() => {})
},
// 电话招揽弹窗关闭
onCancel() {
this.show = false
},
// 选择电话营销方式
onSelect(e) {
// 呼叫
if (e.name === '呼叫') {
// window.location.href = 'tel://' + this.telNumber
this.makePhoneCall(this.phoneNumber)
return
}
// 复制
this.setClipboardData(this.phoneNumber)
},
showAction(data) {
this.show = true
this.phoneNumber = data.phoneNumber
},
staffSendStatus() {
let params = {
// id: 65,
// staffId: 67,
// groupId: 26816
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId
}
solicitApi.staffSendStatus(params).then(({ code, data, message }) => {
if (code == 0) {
if (data.createFlag == 0) {
Notify('营销活动尚未创建,请创建一键营销后重试')
}
if (data.massStatus == 1 && data.createFlag == 1 && data.status == 0) {
Notify('请前往“群发助手”确认群发消息')
}
}
})
},
showFollowPop(data) {
this.$refs.customerFollowRef.init()
this.customerIndex = data.customerIndex
......@@ -268,7 +320,7 @@ export default {
}
.statistic-list {
white-space: nowrap;
width: calc(100% - 190px);
// width: calc(100% - 190px);
.circle {
width: 8px;
height: 8px;
......
<template>
<div class="succeed-container">
<div class="succeed-title font-20 color-3 fw5">
{{ groupName }}
<span class="color39 font-16 m-l-8">- {{ customeStatus == 1 ? '成功到店' : '战败分析' }}</span>
<div class="succeed-title flex font-20 color-3 fw5">
<span class="groupName text-hide">{{ groupName }}</span>
<span class="color39 font-16 m-l-8">- {{ customeStatus == 2 ? '成功到店' : '战败分析' }}</span>
</div>
<div class="succeed-content">
<div class="succeed-wrap m-b-16">
......@@ -20,20 +20,20 @@
<div class="title-info">跟进频次</div>
<div class="succeed-wrap-frequency flex-between">
<div class="succeed-wrap-frequency-single">
<div class="font-16 color-3 bold line-24">{{ getFollowResultDetail.averageFollows }}次/人</div>
<div class="font-12 color-2f m-t-6">平均跟进</div>
<div class="font-16 color-3 bold line-24">{{ getFollowResultDetail.averageFollows ? getFollowResultDetail.averageFollows : 0 }}次/人</div>
<div class="font-12 color-2f m-t-6 line-18">平均跟进</div>
</div>
<div class="succeed-wrap-frequency-single">
<div class="font-16 color-3 bold line-24">{{ getFollowResultDetail.mostFollows }}次</div>
<div class="font-12 color-2f m-t-6">最多跟进</div>
<div class="font-16 color-3 bold line-24">{{ getFollowResultDetail.mostFollows ? getFollowResultDetail.mostFollows : 0 }}次</div>
<div class="font-12 color-2f m-t-6 line-18">最多跟进</div>
</div>
<div class="succeed-wrap-frequency-single">
<div class="font-16 color-3 bold line-24">{{ getFollowResultDetail.leastFollows }}次</div>
<div class="font-16 color-3 bold line-24">{{ getFollowResultDetail.leastFollows ? getFollowResultDetail.leastFollows : 0 }}次</div>
<div class="font-12 color-2f m-t-6">最少跟进</div>
</div>
</div>
</div>
<div class="succeed-wrap m-b-16" v-if="customeStatus == 1">
<div class="succeed-wrap m-b-16" v-if="customeStatus == 2">
<div class="title-info">
预约与到店
<div class="flex fact-wrap">
......@@ -48,7 +48,7 @@
</div>
</div>
<div class="succeed-wrap-order-info">
<template v-if="appointmentDailyCharts">
<template v-if="getFollowResultDetail.appointmentDailyCharts&&getFollowResultDetail.appointmentDailyCharts.length>0">
<lineChart id="orderRef" :lineData="lineData"></lineChart>
</template>
<template v-else>
......@@ -56,7 +56,7 @@
</template>
</div>
</div>
<div class="succeed-wrap m-b-16" v-if="customeStatus == 2 && reasonBar.length">
<div class="succeed-wrap m-b-16" v-if="customeStatus == 1 && reasonBar.length">
<div class="title-info">原因统计</div>
<barChart color="#3975C6" id="reasonRef" :list="reasonBar"></barChart>
</div>
......@@ -81,7 +81,7 @@ export default {
data() {
return {
styleColor: ['#3975C6', '#FDB757'],
appointmentDailyCharts:'',
appointmentDailyCharts: '',
pieData: [],
centerData: {},
followList: [],
......@@ -97,7 +97,7 @@ export default {
created() {
this.followList = this.$constants.FOLLOWLIST
this.customeStatus = this.$route.query.status
this.groupId = this.$route.query.status
this.groupId = this.$route.query.groupId
this.groupName = this.$route.query.groupName
this.getFollowResult()
this.deliveredStatistics()
......@@ -121,20 +121,20 @@ export default {
]
})
},
// 获取跟进结果字典数据
// 跟进结果-成功到店与战败分析
getFollowResult() {
const { activityId, staffId } = this.$store.state.solicit
var params = {
activityId,
customerFollowStatus: this.customeStatus == 1 ? 1 : 0,
// followFlag: this.customeStatus == 1 ? '' : 0,
// retFacFlag: this.customeStatus == 1 ? 1 : 0,
groupId: this.groupId,
customerFollowStatus: this.customeStatus == 2 ? 1 : 0,
staffId
}
solicitApi.getFollowResult(params).then(res => {
this.getFollowResultDetail = res.data
const { joinEntmicroCustomerNums, notYetJoinEntmicroCustomerNums, followResultsAnalyzeVos, appointmentDailyCharts, successDailyCharts } = this.getFollowResultDetail
if (joinEntmicroCustomerNums || notYetJoinEntmicroCustomerNums) {
if (joinEntmicroCustomerNums || notYetJoinEntmicroCustomerNums) {
this.pieData = [
{
const: 'const',
......@@ -152,7 +152,7 @@ export default {
rate: parseInt((joinEntmicroCustomerNums / (joinEntmicroCustomerNums + notYetJoinEntmicroCustomerNums)) * 100) + '%'
}
}
if (appointmentDailyCharts) {
const appointmentDaily = appointmentDailyCharts.map((item, index) => {
return {
......@@ -189,11 +189,17 @@ export default {
box-shadow: 0px 1px 0px 0px #e9e9e9;
padding: 11px 16px;
box-sizing: border-box;
.groupName{
max-width: 200px;
display: inline-block;
}
}
.succeed-content {
padding: 12px;
.succeed-wrap {
background: #fff;
box-shadow: 0px 3px 10px 0px rgba(223, 228, 234, 0.81);
border-radius: 4px;
.title-info {
position: relative;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!