Commit 127af3ad by 匡雅琴

触达统计交互更改

1 parent acb342a2
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<script> <script>
import { Toast } from 'vant' import { Toast } from 'vant'
import { wxConfig } from '@/api'
import CustomerInfoPopup from './CustomerInfoPopup.vue' import CustomerInfoPopup from './CustomerInfoPopup.vue'
import CustomerFollowPopup from './CustomerFollowPopup.vue' import CustomerFollowPopup from './CustomerFollowPopup.vue'
export default { export default {
...@@ -65,7 +66,14 @@ export default { ...@@ -65,7 +66,14 @@ export default {
} }
}, },
data() { data() {
return {} return {
chatParams: {
externalUserIds: [],
groupName: '',
userIds: [],
chatId: ''
}
}
}, },
methods: { methods: {
changeTab(index) { changeTab(index) {
...@@ -80,7 +88,9 @@ export default { ...@@ -80,7 +88,9 @@ export default {
console.log(val) console.log(val)
if (!val.telNumber) { if (!val.telNumber) {
Toast('系统尚未查询到该用户的电话号码') Toast('系统尚未查询到该用户的电话号码')
return
} }
window.location.href = 'tel://' + val.telNumber
}, },
// 招揽跟进 // 招揽跟进
followCustomer(val) { followCustomer(val) {
...@@ -95,6 +105,9 @@ export default { ...@@ -95,6 +105,9 @@ export default {
// 企微沟通 // 企微沟通
sendWechat(val) { sendWechat(val) {
console.log(val) console.log(val)
wxConfig.openEnterpriseChat().then(res => {
console.log(res)
})
} }
} }
} }
......
<template> <template>
<div> <div>
<van-popup v-model:show="show" round position="bottom"> <van-action-sheet v-model:show="show">
<div class="name-title"> <van-sticky class="name-title">
<div class="name-title-text">{{ selectFollowForm.name }}</div> <div class="name-title-text">{{ selectFollowForm.name || 'xumeum' }}</div>
</div> </van-sticky>
<van-form class="dialog-follow"> <div class="follow-content">
<van-cell-group inset> <!-- <div class="name-title">
<van-field name="跟进结果" label="跟进结果" class="field-bottom"> <div class="name-title-text">{{ selectFollowForm.name || 'xumeum' }}</div>
<template #input> </div> -->
<div class="follow-list"> <van-form class="dialog-follow">
<div class="follow-list-item" v-for="item in followResultList" :key="item.id" @click="selectFollow(item)"> <van-cell-group inset>
<div :class="item.id == selectFollowForm.followResultId ? 'follow-list-item-select' : ''">{{ item.title }}</div> <van-field name="跟进结果" label="跟进结果" class="field-bottom">
<template #input>
<div class="follow-list">
<div class="follow-list-item" v-for="item in followResultList" :key="item.id" @click="selectFollow(item)">
<div :class="item.id == selectFollowForm.followResultId ? 'follow-list-item-select' : ''">{{ item.title }}</div>
</div>
</div> </div>
</div> </template>
</template> </van-field>
</van-field> <van-field
<van-field name="跟进备注" rows="1" type="textarea" autosize class="field-bottom" label="跟进备注" v-model="selectFollowForm.followTips" placeholder="输入备注" maxlength="200" /> name="跟进备注"
<van-field name="switch" label="继续跟进"> v-model="selectFollowForm.followTips"
<template #input> rows="1"
<van-switch v-model="checked" size="24px" /> type="textarea"
</template> autosize
</van-field> class="field-bottom"
<div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「待跟进」迁移至「已跟进」列表。</div> label="跟进备注"
<van-field placeholder="输入备注"
v-show="selectFollowForm.followResultId == 1" maxlength="200"
v-model="selectFollowForm.appointmentTime" @input="getTips"
is-link />
readonly <van-field name="switch" label="继续跟进">
name="datetimePicker" <template #right-icon>
label="预约到店" <van-switch v-model="selectFollowForm.checked" active-color="#3975C6" @change="switchChange" size="24px" />
placeholder="请选择到店时间" </template>
@click="showDate" </van-field>
/> <div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「待跟进」迁移至「已跟进」列表。</div>
<div v-show="showPicker && selectFollowForm.followResultId == 1"> <van-field
<div class="datetime-box"> v-show="selectFollowForm.followResultId == 1"
<div class="datetime-picker"> v-model="selectFollowForm.appointmentTime"
<div v-for="item in datePickList" :key="item.index" :class="['item', tabIndex == item.index ? 'active' : '']"> is-link
<div @click="selectDatetime(item)">{{ item.date }}</div> readonly
name="datetimePicker"
label="预约到店"
placeholder="请选择到店时间"
@click="showDate"
/>
<div v-show="showPicker && selectFollowForm.followResultId == 1">
<div class="datetime-box">
<div class="datetime-picker">
<div v-for="item in datePickList" :key="item.index" :class="['item', tabIndex == item.index ? 'active' : '']">
<div @click="selectDatetime(item)">{{ item.date }}</div>
</div>
</div> </div>
<div @click="confirmAppointmentTime">确定</div>
</div> </div>
<div @click="confirmAppointmentTime">确定</div> <van-calendar v-show="!tabIndex" color="#3975C6" :show-title="false" :show-mark="false" :poppable="false" :show-confirm="false" :style="{ height: '500px' }" @select="selectDate" />
<van-datetime-picker v-show="tabIndex" type="time" @confirm="confirmTime" :min-hour="minHour" />
</div> </div>
<van-calendar v-show="!tabIndex" color="#3975C6" :show-title="false" :show-mark="false" :poppable="false" :show-confirm="false" :style="{ height: '500px' }" @select="selectDate" /> </van-cell-group>
<van-datetime-picker v-show="tabIndex" type="time" @confirm="confirmTime" :min-hour="minHour" /> </van-form>
</div> </div>
</van-cell-group> <div class="van-sheet-gap"></div>
</van-form>
<div class="btn-group"> <div class="btn-group">
<van-button block native-type="cancel" @click="cancel">取消</van-button> <van-button block native-type="cancel" @click="cancel">取消</van-button>
<van-button block type="primary">提交</van-button> <van-button block type="primary" @click="submit">提交</van-button>
</div> </div>
</van-popup> </van-action-sheet>
</div> </div>
</template> </template>
...@@ -116,12 +133,13 @@ export default { ...@@ -116,12 +133,13 @@ export default {
name: '', name: '',
followResultId: '', followResultId: '',
followTips: '', followTips: '',
appointmentTime: '' appointmentTime: '',
// 继续跟进按钮
checked: true
}, },
followTips: '',
// 展示预约到店时间 // 展示预约到店时间
showPicker: false, showPicker: false,
// 继续跟进按钮
checked: true,
// 当前日期 // 当前日期
dayNow: '', dayNow: '',
// 当前时间 // 当前时间
...@@ -142,6 +160,15 @@ export default { ...@@ -142,6 +160,15 @@ export default {
console.log(val) console.log(val)
this.selectFollowForm.followResultId = val.id this.selectFollowForm.followResultId = val.id
}, },
// 获取跟进备注
getTips(e) {
console.log(e)
this.selectFollowForm.followTips = e
},
// 继续跟进按钮切换
switchChange() {
this.selectFollowForm.checked = !this.selectFollowForm.checked
},
// 展示日历表 // 展示日历表
showDate() { showDate() {
this.showPicker = !this.showPicker this.showPicker = !this.showPicker
...@@ -168,7 +195,11 @@ export default { ...@@ -168,7 +195,11 @@ export default {
this.show = false this.show = false
}, },
// 提交按钮 // 提交按钮
primary() { submit() {
console.log(111)
console.log(this.followTips)
let params = { ...this.selectFollowForm }
console.log(params)
// 如果选择标签为预约到店,判断日期和时间是否填了 // 如果选择标签为预约到店,判断日期和时间是否填了
if (this.selectFollowForm.followResultId == 1) { if (this.selectFollowForm.followResultId == 1) {
if (!this.selectFollowForm.appointmentTime) { if (!this.selectFollowForm.appointmentTime) {
...@@ -205,8 +236,16 @@ export default { ...@@ -205,8 +236,16 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.follow-content {
flex: 1 auto;
overflow-y: auto;
}
.name-title { .name-title {
width: 100%;
height: 48px; height: 48px;
background-color: #fff;
position: sticky;
top: 0;
&-text { &-text {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
...@@ -250,10 +289,10 @@ export default { ...@@ -250,10 +289,10 @@ export default {
} }
.active { .active {
background: #ffffff; background: #ffffff;
font-weight: 500;
box-shadow: 0px 1px 2px 0px rgba(94, 97, 102, 0.2); box-shadow: 0px 1px 2px 0px rgba(94, 97, 102, 0.2);
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.04); border: 1px solid rgba(0, 0, 0, 0.04);
color: #3975c6;
} }
.van-button { .van-button {
display: inline-block; display: inline-block;
...@@ -286,6 +325,10 @@ export default { ...@@ -286,6 +325,10 @@ export default {
.dialog-follow { .dialog-follow {
padding: 0 16px; padding: 0 16px;
} }
.van-sheet-gap {
height: 8px;
background-color: #f7f8fa;
}
.btn-group { .btn-group {
} }
.dialog-follow /deep/ .van-field__label { .dialog-follow /deep/ .van-field__label {
...@@ -314,7 +357,7 @@ export default { ...@@ -314,7 +357,7 @@ export default {
border-radius: 6px; border-radius: 6px;
margin: 0; margin: 0;
} }
/deep/ .van-field__control--custom { /deep/ .van-action-sheet {
justify-content: flex-end; max-height: 100%;
} }
</style> </style>
...@@ -179,16 +179,20 @@ export default { ...@@ -179,16 +179,20 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.popup-card { .popup-card {
padding: 16px; padding: 0 16px 16px 16px;
} }
.name-title { .name-title {
padding-bottom: 12px; width: 100%;
height: 48px;
background-color: #fff;
position: sticky;
top: 0;
&-text { &-text {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 24px; line-height: 48px;
} }
} }
.customer-message { .customer-message {
......
...@@ -51,7 +51,8 @@ import { ...@@ -51,7 +51,8 @@ import {
DatetimePicker, DatetimePicker,
Toast, Toast,
Switch, Switch,
Form Form,
Sticky
} from 'vant' } from 'vant'
export const components = [ export const components = [
Button, Button,
...@@ -97,5 +98,6 @@ export const components = [ ...@@ -97,5 +98,6 @@ export const components = [
DatetimePicker, DatetimePicker,
Toast, Toast,
Switch, Switch,
Form Form,
Sticky
] ]
...@@ -30,9 +30,9 @@ export default { ...@@ -30,9 +30,9 @@ export default {
customerInfo: [ customerInfo: [
{ {
id: 1, id: 1,
name: '林先生', name: '崔美女',
carNumber: '月A8888', carNumber: '粤B 8888',
carBrand: 'BMW', carBrand: 'BMW X7',
result: '未接听', result: '未接听',
wechatMarketing: '一查看', wechatMarketing: '一查看',
joinWechat: '美女', joinWechat: '美女',
...@@ -42,9 +42,9 @@ export default { ...@@ -42,9 +42,9 @@ export default {
}, },
{ {
id: 2, id: 2,
name: 'kuang先生', name: '崔美女2',
carNumber: '', carNumber: '粤B 6666',
carBrand: 'BMW', carBrand: '奔驰 G63',
result: '未接听', result: '未接听',
wechatMarketing: '一查看', wechatMarketing: '一查看',
joinWechat: '美女', joinWechat: '美女',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!