Commit 78175430 by 王志慧

commit

1 parent 669102f5
......@@ -48,10 +48,6 @@
</div>
<!-- 电话营销弹窗 -->
<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" @changeIndexEvent="changeIndexEvent"></customer-follow-popup>
<!-- 客户信息弹窗 -->
<customer-info-popup ref="customerInfoRef"></customer-info-popup>
</div>
</template>
......@@ -86,6 +82,7 @@ export default {
},
watch: {
customerInfo(n) {
console.log(n, '监听数据')
this.customerData = n
}
},
......@@ -100,7 +97,6 @@ export default {
userIds: [],
chatId: ''
},
followCustomerData: {},
phoneNumber: null,
customerData: this.customerInfo,
customerIndex: 0
......@@ -110,21 +106,6 @@ export default {
this.initWx()
},
methods: {
changeIndexEvent() {
let params = {
customerId: this.followCustomerData.actCutId
}
solicitApi.getCustomerDetail(params).then(({ code, data, message }) => {
if (code == 0) {
data.solicitTime = data.solicitTime ? data.solicitTime.slice(0, 11) : data.solicitTime
data.updatedTime = data.updatedTime ? data.updatedTime.slice(0, 11) : data.updatedTime
this.customerData[this.customerIndex] = data
this.$set(this.customerData, this.customerIndex, data)
} else {
Notify(message)
}
})
},
// 初始化微信接口
initWx() {
window.$wx = wxConfig
......@@ -164,13 +145,11 @@ export default {
},
// 招揽跟进
followCustomer(val, index) {
this.customerIndex = index
this.followCustomerData = val
this.$refs.customerFollowRef.init()
this.$emit('showFollowPop', { customerIndex: index, followCustomerData: val })
},
// 客户详情
sendMessage(val) {
this.$refs.customerInfoRef.getCustomerDetail(val)
this.$emit('showInfoPop', { followCustomerData: val })
},
// 企微沟通
sendWechat(val) {
......
......@@ -111,7 +111,7 @@ export default {
// 默认日期
defaultDate: '',
// 默认时间
defaultTime: ''
defaultTime: '',
}
},
props: {
......@@ -183,7 +183,10 @@ export default {
groupId: this.groupId,
actCutId: this.info.actCutId // 活动客户id
}
if (this.selectFollowForm.followResult == '') {
Toast.fail('请选择跟进结果')
return
}
// 如果选择标签为预约到店,判断日期和时间是否填了
if (this.selectFollowForm.followResult == 1) {
if (!this.selectFollowForm.orderTime) {
......
<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">
<div class="popup-card">
<div class="name-title">
<div class="name-title-text">{{ customerList.customerName }}</div>
......
......@@ -11,9 +11,13 @@
<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"></customer-card>
<customer-card v-if="customerInfo.length > 0" :customerInfo="customerInfo" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop"></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>
</div>
</template>
<script>
......@@ -40,7 +44,9 @@ export default {
{ text: '已跟进', value: 1 },
{ text: '未跟进', value: 2 }
],
resultList: [{ text: '全部结果', value: 0 }]
resultList: [{ text: '全部结果', value: 0 }],
followCustomerData: {},
customerIndex: 0
}
},
computed: {
......@@ -60,6 +66,29 @@ export default {
this.getSendCustomerList()
},
methods: {
showFollowPop(data) {
this.$refs.customerFollowRef.init()
this.customerIndex = data.customerIndex
this.followCustomerData = data.followCustomerData
},
showInfoPop(data) {
this.$refs.customerInfoRef.getCustomerDetail(data.followCustomerData)
},
changeIndexEvent() {
let params = {
customerId: this.followCustomerData.actCutId
}
solicitApi.getCustomerDetail(params).then(({ code, data, message }) => {
if (code == 0) {
data.solicitTime = data.solicitTime ? data.solicitTime.slice(0, 11) : data.solicitTime
data.updatedTime = data.updatedTime ? data.updatedTime.slice(0, 11) : data.updatedTime
this.customerInfo[this.customerIndex] = data
this.$set(this.customerInfo, this.customerIndex, data)
} else {
Notify(message)
}
})
},
// 获取送达客户信息
getSendCustomerList(index) {
this.hideLoading()
......@@ -67,9 +96,7 @@ export default {
keyWord: this.keyWord,
type: this.searchType + 1,
customerGroupType: 2,
// id: 3,
// staffId: 363,
// groupId:527,
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
......@@ -168,7 +195,7 @@ export default {
}
}
.content {
height: calc(100vh - 154px);
height: calc(100vh - 100px);
/deep/ .van-list {
background: #f7f7f7;
}
......
<template>
<div class="result-container">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-if="true">
<template v-if="getCustomerFollow.length>0">
<div class="result-container-content">
<template v-for="(item, i) in getCustomerFollow">
<div :key="i" class="result-container-content-item">
......
......@@ -8,7 +8,7 @@
<div>1. 客户开启消息免打扰,消息发送失败;</div>
<div>2. 群发次数达到上限,上限次数为每个客户每天仅可接收1条群发消息。(系统将连续重试3天)</div>
</div>
<customer-card v-if="customerInfo1.length > 0" :customerInfo.sync="customerInfo1"></customer-card>
<customer-card v-if="customerInfo1.length > 0" :customerInfo="customerInfo1" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop"></customer-card>
<empty v-else></empty>
</scroll-view>
</van-tab>
......@@ -32,10 +32,14 @@
</div>
</div>
<select-bar :index="alreadyIndex" :list="selectBarList" @change="changeSelectTab"></select-bar>
<customer-card v-if="customerInfo2.length > 0" :customerInfo="customerInfo2"></customer-card>
<customer-card v-if="customerInfo2.length > 0" :customerInfo="customerInfo2" @showFollowPop="showFollowPop" @showInfoPop="showInfoPop"></customer-card>
<empty v-else></empty>
</van-tab>
</van-tabs>
<!-- 跟进弹窗 -->
<customer-follow-popup ref="customerFollowRef" :info="followCustomerData" @changeIndexEvent="changeIndexEvent"></customer-follow-popup>
<!-- 客户信息弹窗 -->
<customer-info-popup ref="customerInfoRef"></customer-info-popup>
</div>
</template>
......@@ -72,6 +76,8 @@ export default {
customerInfo1: [],
// 已送达客户列表
customerInfo2: [],
followCustomerData: {},
customerIndex: 0,
// 客户送达分层
deliveredData: {},
// 套餐类型是否不是权益套餐或秒杀活动
......@@ -137,6 +143,30 @@ export default {
this.getSendCustomerList(1) // 已送达
},
methods: {
showFollowPop(data) {
this.$refs.customerFollowRef.init()
this.customerIndex = data.customerIndex
this.followCustomerData = data.followCustomerData
},
showInfoPop(data) {
this.$refs.customerInfoRef.getCustomerDetail(data.followCustomerData)
},
changeIndexEvent() {
let params = {
customerId: this.followCustomerData.actCutId
}
let target = ['customerInfo1', 'customerInfo2']
solicitApi.getCustomerDetail(params).then(({ code, data, message }) => {
if (code == 0) {
data.solicitTime = data.solicitTime ? data.solicitTime.slice(0, 11) : data.solicitTime
data.updatedTime = data.updatedTime ? data.updatedTime.slice(0, 11) : data.updatedTime
this[target[this.tabIndex]][this.customerIndex] = data
this.$set(this[target[this.tabIndex]], this.customerIndex, data)
} else {
Notify(message)
}
})
},
// tab栏切换
tabChange(e) {
this.tabIndex = e
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!