Commit 2f2afec7 by 匡雅琴

触达统计接口字段对接

1 parent 926aec14
......@@ -2,14 +2,14 @@
<div>
<div class="customer-box" v-for="item in customerInfo" :key="item.id">
<div class="customer-title">
<div class="customer-name">{{ item.name }}</div>
<div class="customer-carnumber">{{ item.cars.length>0&&item.cars[0].carNumber }}</div>
<div class="customer-name">{{ item.customerName }}</div>
<div class="customer-carnumber">{{ item.cars.length > 0 && item.cars[0].carNumber }}</div>
</div>
<div class="customer-info">
<div class="customer-info-left">
<div class="customer-info-label">
<div class="customer-info-name">车系:</div>
<div class="customer-info-message">{{ item.cars.length>0&&item.cars[0].carSeries }}</div>
<div class="customer-info-message">{{ item.cars.length > 0 && item.cars[0].carSeries }}</div>
</div>
<div class="customer-info-label">
<div class="customer-info-name">招揽结果:</div>
......@@ -17,7 +17,7 @@
</div>
<div class="customer-info-label">
<div class="customer-info-name">企微营销:</div>
<div class="customer-info-message">{{ item.checkStatus }}</div>
<div class="customer-info-message">{{ item.checkStatus == 0 ? '未查看' : '已查看' }}</div>
</div>
</div>
<div class="customer-info-right">
......@@ -50,7 +50,7 @@
<!-- 电话营销弹窗 -->
<van-action-sheet v-model:show="show" :actions="actions" @select="onSelect" cancel-text="取消" close-on-click-action @cancel="onCancel" />
<!-- 跟进弹窗 -->
<customer-follow-popup ref="customerFollowRef" :info="followCustomerData" ></customer-follow-popup>
<customer-follow-popup ref="customerFollowRef" :info="followCustomerData"></customer-follow-popup>
<!-- 客户信息弹窗 -->
<customer-info-popup ref="customerInfoRef"></customer-info-popup>
</div>
......@@ -70,6 +70,18 @@ export default {
default: () => {
return []
}
},
groupId: {
type: Number,
default: () => {
return null
}
},
groupName: {
type: String,
default: () => {
return ''
}
}
},
data() {
......@@ -83,7 +95,7 @@ export default {
userIds: [],
chatId: ''
},
followCustomerData:{},
followCustomerData: {},
phoneNumber: null
}
},
......@@ -91,7 +103,7 @@ export default {
// this.initWx()
},
methods: {
//初始化微信接口
// 初始化微信接口
initWx() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData', 'makePhoneCall']).then(() => {})
......@@ -139,7 +151,7 @@ export default {
// 客户详情
sendMessage(val) {
console.log(val)
this.$refs.customerInfoRef.init()
this.$refs.customerInfoRef.init(val)
},
// 企微沟通
sendWechat(val) {
......
......@@ -119,6 +119,8 @@ export default {
},
methods: {
init() {
console.log(this.followResultList)
console.log(this.activityId)
this.show = true
// 获取当前时间
const date = new Date(new Date().getTime() + (parseInt(new Date().getTimezoneOffset() / 60) + 8) * 3600 * 1000)
......@@ -128,14 +130,14 @@ export default {
selectFollow(val) {
this.selectFollowForm.followResult = val.dictValue
},
// // 获取跟进备注
// getTips(e) {
// console.log(e)
// this.selectFollowForm.followTips = e
// },
// 获取跟进备注
getTips(e) {
console.log(e)
this.selectFollowForm.followTips = e
},
// 继续跟进按钮切换
switchChange() {
// this.selectFollowForm.checked = !this.selectFollowForm.checked
this.selectFollowForm.checked = !this.selectFollowForm.checked
console.log(this.selectFollowForm.checked)
},
// 展示日历表
......
......@@ -3,7 +3,7 @@
<van-action-sheet v-model:show="showCustomerDetail" cancel-text="关闭详情" close-on-click-action @cancel="onCancel">
<div class="popup-card">
<div class="name-title">
<div class="name-title-text">{{ customerList.name }}</div>
<div class="name-title-text">{{ customerList.customerName }}</div>
</div>
<!-- 客户信息 -->
<div class="customer-message">
......@@ -15,19 +15,19 @@
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">车系</div>
<div class="customer-info-item-content">{{ customerList.carBrand }}</div>
<div class="customer-info-item-content">{{ customerList.cars.length > 0 && customerList.cars[0].carSeries }}</div>
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">车牌号码</div>
<div class="customer-info-item-content">{{ customerList.carNumber }}</div>
<div class="customer-info-item-content">{{ customerList.cars.length > 0 && customerList.cars[0].carNumber }}</div>
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">购车日期</div>
<div class="customer-info-item-content">{{ customerList.buyCarDate }}</div>
<div class="customer-info-item-content">{{ customerList.cars.length > 0 && customerList.cars[0].carBuyDate }}</div>
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">最近保养</div>
<div class="customer-info-item-content">{{ customerList.recentCare }}</div>
<div class="customer-info-item-content">{{ customerList.length > 0 && customerList.maListcars[0].maDate }}</div>
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">人群分组</div>
......@@ -35,7 +35,12 @@
</div>
<div class="customer-info-item">
<div class="customer-info-item-title">企微账号</div>
<div class="customer-info-item-content">{{ customerList.wechatNumber }}</div>
<div v-if="customerList.wechatnick">
<span class="customer-info-item-content">{{ customerList.wechatnick }}</span>
<span class="customer-info-wechat customer-info-message" v-if="customerList.type == 1">@微信</span>
<span class="customer-info-qiwechat customer-info-message" v-else>@企微</span>
</div>
<div class="customer-info-message" v-else>未添加</div>
</div>
</div>
</div>
......@@ -47,17 +52,17 @@
<div class="sprite-icon icon-maintant"></div>
<div class="stepBox">
<div class="stepBox-left">
<div class="stepBox-left-name">{{ item.name }}</div>
<div class="stepBox-left-name">{{ item.repairItems }}</div>
<div class="stepBox-left-title">
费用:
<span class="stepBox-left-content">{{ item.price }}</span>
</div>
<div class="stepBox-left-title">
跟进人:
<span class="stepBox-left-content">{{ item.followStaff }}</span>
<span class="stepBox-left-content">{{ item.follower }}</span>
</div>
</div>
<div class="stepBox-right">{{ item.date }}</div>
<div class="stepBox-right">{{ item.maDate }}</div>
</div>
</div>
</template>
......@@ -66,22 +71,22 @@
<!-- 跟进记录 -->
<div class="record">
<div class="customer-info-title">跟进记录</div>
<template v-if="recordList.length">
<div class="stepItem" v-for="(item, index) in recordList" :key="index">
<template v-if="customerList.followRecordList.length">
<div class="stepItem" v-for="(item, index) in customerList.followRecordList" :key="index">
<div class="sprite-icon icon-followRecord"></div>
<div class="stepBox">
<div class="stepBox-left">
<div class="stepBox-left-name">{{ item.name }}</div>
<div class="stepBox-left-name">{{ item.followResult }}</div>
<div class="stepBox-left-title">
预约时间:
<span class="stepBox-left-content">{{ item.recordDate ? item.recordDate : '-' }}</span>
<span class="stepBox-left-content">{{ item.orderTime ? item.orderTime : '-' }}</span>
</div>
<div class="stepBox-left-title">
备注:
<span class="stepBox-left-content">{{ item.tips ? item.tips : '-' }}</span>
<span class="stepBox-left-content">{{ item.followMark ? item.followMark : '-' }}</span>
</div>
</div>
<div class="stepBox-right">{{ item.date }}</div>
<div class="stepBox-right">{{ item.createdTime }}</div>
</div>
</div>
</template>
......@@ -93,6 +98,8 @@
</template>
<script>
import { solicitApi } from '@/api'
import { Notify } from 'vant'
export default {
name: 'CustomerInfoPopup',
data() {
......@@ -102,78 +109,87 @@ export default {
// 客户信息表
customerList: {
id: 1,
name: '徐妹妹',
customerName: '徐妹妹',
vinCode: 'LFMAYACC5M029512',
carBrand: '兰博基尼',
carNumber: '粤B 88888',
buyCarDate: '2021-04-20',
recentCare: '2022-05-16',
customerGroup: '定保招揽 N-6',
wechatNumber: '未添加',
careRecord: [
cars: [
{
customerId: 0,
carSeries: '奔驰 G63',
carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
}
],
maList: [
{
type: '保养项目保养项目AAA',
cost: '240元',
followStaff: 'kuangge',
date: '05-28 16:00'
repairItems: '保养项目保养项目AAA',
price: '240元',
follower: 'kuangge',
maDate: '05-28 16:00'
},
{
type: '保养项目保养项目保养项目BB',
cost: '240元',
followStaff: 'kuangge',
date: '05-28 16:00'
repairItems: '保养项目保养项目保养项目BB',
price: '240元',
follower: 'kuangge',
maDate: '05-28 16:00'
}
],
followRecord: [
followRecordList: [
{
type: '预约到店',
oppointmentTime: '2022-05-21',
tips: '',
date: '05-28 16:00'
followResult: '预约到店',
orderTime: '2022-05-21',
followMark: '',
createdTime: '05-28 16:00'
},
{
type: '未接听',
oppointmentTime: '',
tips: '',
date: '05-28 16:00'
followResult: '未接听',
orderTime: '',
followMark: '',
createdTime: '05-28 16:00'
}
]
},
// 维保记录表
maintennceList: [
// {
// name: '保养项目A',
// price: '240元',
// followStaff: '续梅厄米',
// date: '05-28 16:00'
// },
// {
// name: '保养项目B',
// price: '240元',
// followStaff: '续梅厄米',
// date: '05-28 16:00'
// }
],
// 跟进记录表
recordList: [
{
name: '预约到店',
recordDate: '2022-05-21',
tips: '续梅厄米',
date: '05-28 16:00'
repairItems: '保养项目保养项目AAA',
price: '240元',
follower: 'kuangge',
maDate: '05-28 16:00'
},
{
name: '未接听',
recordDate: '',
tips: '续梅厄米',
date: '05-28 16:00'
repairItems: '保养项目保养项目保养项目BB',
price: '240元',
follower: 'kuangge',
maDate: '05-28 16:00'
}
]
}
},
methods: {
init() {
init(val) {
console.log(val)
this.showCustomerDetail = true
this.getCustomerDetail(val)
},
// 获取客户详情
getCustomerDetail(val) {
var params = {
// customerId:
groupId: val.groupId,
id: val.id,
staffId: val.staffId
}
console.log(params)
// solicitApi.getCustomerDetail().then(({ code, data, message }) => {
// if (code === 0) {
// this.customerList = data
// } else {
// Notify(message)
// }
// })
},
// 关闭弹窗
onCancel() {
......@@ -226,6 +242,18 @@ export default {
&-content {
color: #333333;
}
&-message {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 18px;
}
&-wechat {
color: #3975c6;
}
&-qiwei {
color: #2cca74;
}
}
.record {
margin-top: 16px;
......
......@@ -8,7 +8,7 @@
<div>1. 客户开启消息免打扰,消息发送失败;</div>
<div>2. 群发次数达到上限,上限次数为每个客户每天仅可接收1条群发消息。(系统将连续重试3天)</div>
</div>
<customer-card v-if="customerInfo1.length" :customerInfo="customerInfo1" :groupId="groupId"></customer-card>
<customer-card v-if="customerInfo1.length" :customerInfo="customerInfo1" :groupId="groupId" :groupName="groupName"></customer-card>
<empty v-else></empty>
</scroll-view>
</van-tab>
......@@ -29,7 +29,8 @@
</div>
</div>
<select-bar :index="alreadyIndex" :list="selectBarList" @change="changeSelectTab"></select-bar>
<customer-card :customerInfo="customerInfo2"></customer-card>
<customer-card v-if="customerInfo1.length" :customerInfo="customerInfo2" :groupId="groupId" :groupName="groupName"></customer-card>
<empty v-else></empty>
</van-tab>
</van-tabs>
</div>
......@@ -41,6 +42,7 @@ import ScrollView from '../../components/ScrollView.vue'
import SelectBar from '../../components/SelectBar.vue'
import { solicitApi } from '@/api'
import { mapState } from 'vuex'
import { Notify } from 'vant'
export default {
components: { SelectBar, Empty, ScrollView },
data() {
......@@ -67,7 +69,7 @@ export default {
customerInfo1: [
{
id: 1,
name: '崔美女',
customerName: '崔美女',
followResult: '未接听',
checkStatus: '一查看',
solicitTime: '05-07 15:30',
......@@ -86,7 +88,7 @@ export default {
},
{
id: 2,
name: '匡先生',
customerName: '匡先生',
followResult: '未接听',
checkStatus: '一查看',
solicitTime: '05-07 15:30',
......@@ -105,7 +107,7 @@ export default {
},
{
id: 3,
name: 'xu先生',
customerName: 'xu先生',
followResult: '未接听',
checkStatus: '一查看',
solicitTime: '05-07 15:30',
......@@ -127,9 +129,9 @@ export default {
customerInfo2: [
{
id: 1,
name: '崔美女',
customerName: '崔美女',
followResult: '未接听',
checkStatus: '一查看',
checkStatus: '1',
solicitTime: '05-07 15:30',
updatedTime: '05-07 15:30',
phoneNumber: '',
......@@ -146,9 +148,9 @@ export default {
},
{
id: 2,
name: '匡先生',
customerName: '匡先生',
followResult: '未接听',
checkStatus: '一查看',
checkStatus: '0',
solicitTime: '05-07 15:30',
updatedTime: '05-07 15:30',
phoneNumber: '18818188989',
......@@ -165,9 +167,9 @@ export default {
},
{
id: 3,
name: 'xu先生',
customerName: 'xu先生',
followResult: '未接听',
checkStatus: '一查看',
checkStatus: '1',
solicitTime: '05-07 15:30',
updatedTime: '05-07 15:30',
phoneNumber: '18818188989',
......@@ -241,11 +243,14 @@ export default {
},
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
this.groupName = this.getQuery().groupName ? this.getQuery().groupName : ''
},
mounted() {
this.showLoading()
this.getSendCustomerList(0) //未送达
this.getSendCustomerList(1) //已送达
// 未送达
this.getSendCustomerList(0)
// 已送达
this.getSendCustomerList(1)
},
methods: {
// tab栏切换
......@@ -256,47 +261,37 @@ export default {
// this.deliveredStatistics()
}
},
//已送达Tab四种状态
// 已送达Tab四种状态
changeSelectTab(e) {
console.log(e)
this.alreadyIndex = e
this.getSendCustomerList(1)
},
// // 获取未送达客户信息
// getUnSendCustomerList(index) {
// let target = ['customerInfo1', 'customerInfo2']
// // var params = { ...this.unSendPageParam }
// params.followFlag = 0
// // params.groupId =
// // params.id =
// // params.staffId =
// console.log(params)
// solicitApi.getCustomerList().then(res => {
// console.log(res)
// })
// },
// 获取送达客户信息
// 获取送达/未送达客户信息
getSendCustomerList(index) {
console.log(index)
this.hideLoading()
let target = ['customerInfo1', 'customerInfo2']
let { alreadyIndex } = this
let params = {
customerGroupType:2,
customerGroupType: 2,
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
sendStatus: index //发送状态 0-未发送 1-已发送
// 发送状态 0-未发送 1-已发送
sendStatus: index
}
if (index == 1) {
if (alreadyIndex == 1) params.checkStatus = 1 //0-未查看 1-已查看
if (alreadyIndex == 2) params.receiveStatus = 1 //0-未领取 1-已领取
if (alreadyIndex == 3) params.retFacFlag = 1 //0.未到店 1.已到店
if (index === 1) {
// 0-未查看 1-已查看
if (alreadyIndex === 1) params.checkStatus = 1
// 0-未领取 1-已领取
if (alreadyIndex === 2) params.receiveStatus = 1
// 0.未到店 1.已到店
if (alreadyIndex === 3) params.retFacFlag = 1
}
console.log(params)
// solicitApi.getCustomerList().then(({ code, data, message }) => {
// if (code == 0) {
// if (code === 0) {
// this.target[index] = data
// } else {
// Notify(message)
......@@ -311,7 +306,7 @@ export default {
groupId: this.groupId
}
solicitApi.deliveredStatistics({ params }).then(({ code, data, message }) => {
if (code == 0) {
if (code === 0) {
this.deliveredData = data
}
})
......@@ -322,7 +317,7 @@ export default {
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
// 未送达页面
if (this.tabIndex == 0) {
if (this.tabIndex === 0) {
this.unSendPageParam.pageNum++
return
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!