Commit 127af3ad by 匡雅琴

触达统计交互更改

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