Commit 361beb90 by 王志慧

commit:招揽页面修改

1 parent ae6fd5ab
...@@ -10,6 +10,62 @@ export default { ...@@ -10,6 +10,62 @@ export default {
returnAll: true returnAll: true
}) })
}, },
// 员工id获取
getStaffid(data) {
data.method = 'marketing.api.solicit.staffid.obtain'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 客户招揽-任务总览
taskOverviewData(data) {
data.method = 'marketing.api.solicit.taskOverview'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 客户招揽-招揽跟进
solicitationFollow(data) {
data.method = 'marketing.api.solicit.solicitationFollow'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 一键营销
createdOcmarketing(data) {
data.method = 'marketing.api.solicit.ocmarketing.send'
return window.$HTTP({
url,
data
})
},
//一键营销内容回显
getocmarketingList(data) {
data.method = 'marketing.api.solicit.ocmarketing.echo'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 触达统计-客户送达分层
deliveredStatistics(data) {
data.method = 'marketing.api.solicit.customer.delivered.statistics'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 获取送达、未送达列表 // 获取送达、未送达列表
getCustomerList(data) { getCustomerList(data) {
data.method = 'marketing.api.solicit.page.customer.condition' data.method = 'marketing.api.solicit.page.customer.condition'
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="customer-box" v-for="item in customerInfo" :key="item.id"> <div class="customer-box" v-for="item in customerInfo" :key="item.id">
<div class="customer-title"> <div class="customer-title">
<div class="customer-name">{{ item.name }}</div> <div class="customer-name">{{ item.name }}</div>
<div class="customer-carnumber">{{ item.SolicitCarResponse.carNumber }}</div> <div class="customer-carnumber">{{ item.cars.length>0&&item.cars[0].carNumber }}</div>
</div> </div>
<div class="customer-info"> <div class="customer-info">
<div class="customer-info-left"> <div class="customer-info-left">
<div class="customer-info-label"> <div class="customer-info-label">
<div class="customer-info-name">车系:</div> <div class="customer-info-name">车系:</div>
<div class="customer-info-message">{{ item.SolicitCarResponse.carSeries }}</div> <div class="customer-info-message">{{ item.cars.length>0&&item.cars[0].carSeries }}</div>
</div> </div>
<div class="customer-info-label"> <div class="customer-info-label">
<div class="customer-info-name">招揽结果:</div> <div class="customer-info-name">招揽结果:</div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<!-- 电话营销弹窗 --> <!-- 电话营销弹窗 -->
<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" />
<!-- 跟进弹窗 --> <!-- 跟进弹窗 -->
<customer-follow-popup ref="customerFollowRef"></customer-follow-popup> <customer-follow-popup ref="customerFollowRef" :info="followCustomerData" ></customer-follow-popup>
<!-- 客户信息弹窗 --> <!-- 客户信息弹窗 -->
<customer-info-popup ref="customerInfoRef"></customer-info-popup> <customer-info-popup ref="customerInfoRef"></customer-info-popup>
</div> </div>
...@@ -83,6 +83,7 @@ export default { ...@@ -83,6 +83,7 @@ export default {
userIds: [], userIds: [],
chatId: '' chatId: ''
}, },
followCustomerData:{},
phoneNumber: null phoneNumber: null
} }
}, },
...@@ -132,6 +133,7 @@ export default { ...@@ -132,6 +133,7 @@ export default {
// 招揽跟进 // 招揽跟进
followCustomer(val) { followCustomer(val) {
console.log(val) console.log(val)
this.followCustomerData = val
this.$refs.customerFollowRef.init() this.$refs.customerFollowRef.init()
}, },
// 客户详情 // 客户详情
......
<template> <template>
<div> <div>
<van-action-sheet v-model:show="show"> <van-action-sheet v-model="show">
<van-sticky class="name-title"> <van-sticky class="name-title">
<div class="name-title-text">{{ selectFollowForm.name || 'xumeum' }}</div> <div class="name-title-text">{{ info.name }}</div>
</van-sticky> </van-sticky>
<div class="follow-content"> <div class="follow-content">
<!-- <div class="name-title"> <!-- <div class="name-title">
...@@ -14,23 +14,12 @@ ...@@ -14,23 +14,12 @@
<template #input> <template #input>
<div class="follow-list"> <div class="follow-list">
<div class="follow-list-item" v-for="item in followResultList" :key="item.dictValue" @click="selectFollow(item)"> <div class="follow-list-item" v-for="item in followResultList" :key="item.dictValue" @click="selectFollow(item)">
<div :class="item.id == selectFollowForm.followResultId ? 'follow-list-item-select' : ''">{{ item.dictLabel }}</div> <div :class="item.dictValue == selectFollowForm.followResult ? 'follow-list-item-select' : ''">{{ item.dictLabel }}</div>
</div> </div>
</div> </div>
</template> </template>
</van-field> </van-field>
<van-field <van-field name="跟进备注" v-model="selectFollowForm.followMark" rows="1" type="textarea" autosize class="field-bottom" label="跟进备注" placeholder="输入备注" maxlength="200" />
name="跟进备注"
v-model="selectFollowForm.followTips"
rows="1"
type="textarea"
autosize
class="field-bottom"
label="跟进备注"
placeholder="输入备注"
maxlength="200"
@input="getTips"
/>
<van-field name="switch" label="继续跟进"> <van-field name="switch" label="继续跟进">
<template #right-icon> <template #right-icon>
<van-switch v-model="selectFollowForm.checked" active-color="#3975C6" @change="switchChange" size="24px" /> <van-switch v-model="selectFollowForm.checked" active-color="#3975C6" @change="switchChange" size="24px" />
...@@ -38,8 +27,8 @@ ...@@ -38,8 +27,8 @@
</van-field> </van-field>
<div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「待跟进」迁移至「已跟进」列表。</div> <div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「待跟进」迁移至「已跟进」列表。</div>
<van-field <van-field
v-show="selectFollowForm.followResultId == 1" v-show="selectFollowForm.followResult == 1"
v-model="selectFollowForm.appointmentTime" v-model="selectFollowForm.orderTime"
is-link is-link
readonly readonly
name="datetimePicker" name="datetimePicker"
...@@ -47,7 +36,7 @@ ...@@ -47,7 +36,7 @@
placeholder="请选择到店时间" placeholder="请选择到店时间"
@click="showDate" @click="showDate"
/> />
<div v-show="showPicker && selectFollowForm.followResultId == 1"> <div v-if="showPicker && selectFollowForm.followResult == 1">
<div class="datetime-box"> <div class="datetime-box">
<div class="datetime-picker"> <div class="datetime-picker">
<div v-for="item in datePickList" :key="item.index" :class="['item', tabIndex == item.index ? 'active' : '']"> <div v-for="item in datePickList" :key="item.index" :class="['item', tabIndex == item.index ? 'active' : '']">
...@@ -57,7 +46,7 @@ ...@@ -57,7 +46,7 @@
<div @click="confirmAppointmentTime">确定</div> <div @click="confirmAppointmentTime">确定</div>
</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-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" /> <van-datetime-picker v-show="tabIndex" type="time" @change="confirmTime" :min-hour="minHour" :show-toolbar="false" />
</div> </div>
</van-cell-group> </van-cell-group>
</van-form> </van-form>
...@@ -65,7 +54,7 @@ ...@@ -65,7 +54,7 @@
<div class="van-sheet-gap"></div> <div class="van-sheet-gap"></div>
<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" @click="submit">提交</van-button> <van-button block color="#3975C6" @click="submit">提交</van-button>
</div> </div>
</van-action-sheet> </van-action-sheet>
</div> </div>
...@@ -73,6 +62,7 @@ ...@@ -73,6 +62,7 @@
<script> <script>
import { Toast } from 'vant' import { Toast } from 'vant'
import { mapState } from 'vuex'
import { solicitApi } from '@/api' import { solicitApi } from '@/api'
export default { export default {
name: 'CustomerFollowPopup', name: 'CustomerFollowPopup',
...@@ -82,7 +72,6 @@ export default { ...@@ -82,7 +72,6 @@ export default {
isShow: false, isShow: false,
show: false, show: false,
tabIndex: 0, tabIndex: 0,
followResultList: [],
datePickList: [ datePickList: [
{ {
index: 0, index: 0,
...@@ -94,10 +83,9 @@ export default { ...@@ -94,10 +83,9 @@ export default {
} }
], ],
selectFollowForm: { selectFollowForm: {
name: '', followResult: '',
followResultId: '', followMark: '',
followTips: '', orderTime: '',
appointmentTime: '',
// 继续跟进按钮 // 继续跟进按钮
checked: true checked: true
}, },
...@@ -112,44 +100,52 @@ export default { ...@@ -112,44 +100,52 @@ export default {
minHour: '' minHour: ''
} }
}, },
props: {
info: {
type: Object,
default: () => {}
},
groupId: {
type: String,
default: ''
}
},
computed: {
...mapState({
followResultList: state => state.solicit.followResultList,
activityId: state => state.solicit.activityId,
staffId: state => state.solicit.staffId
})
},
methods: { methods: {
init() { init() {
this.show = true this.show = true
// 获取当前时间 // 获取当前时间
const date = new Date(new Date().getTime() + (parseInt(new Date().getTimezoneOffset() / 60) + 8) * 3600 * 1000) const date = new Date(new Date().getTime() + (parseInt(new Date().getTimezoneOffset() / 60) + 8) * 3600 * 1000)
this.formatterDate(date) this.formatterDate(date)
this.getFollowDataList('follow_result')
},
// 获取跟进结果字典数据
getFollowDataList(dictType) {
var params = {
dictType
}
solicitApi.followFindAllDictData(params).then(res => {
console.log(res)
this.followResultList = res.data
})
}, },
// 选择跟进结果 // 选择跟进结果
selectFollow(val) { selectFollow(val) {
console.log(val) this.selectFollowForm.followResult = val.dictValue
this.selectFollowForm.followResultId = val.dictValue
},
// 获取跟进备注
getTips(e) {
console.log(e)
this.selectFollowForm.followTips = e
}, },
// // 获取跟进备注
// getTips(e) {
// console.log(e)
// this.selectFollowForm.followTips = e
// },
// 继续跟进按钮切换 // 继续跟进按钮切换
switchChange() { switchChange() {
this.selectFollowForm.checked = !this.selectFollowForm.checked // this.selectFollowForm.checked = !this.selectFollowForm.checked
console.log(this.selectFollowForm.checked)
}, },
// 展示日历表 // 展示日历表
showDate() { showDate() {
this.showPicker = !this.showPicker this.showPicker = !this.showPicker
this.tabIndex = 0
}, },
// 时间选择tab切换 // 时间选择tab切换
selectDatetime(item) { selectDatetime(item) {
console.log(item)
this.tabIndex = item.index this.tabIndex = item.index
}, },
// 选择日期 // 选择日期
...@@ -158,29 +154,63 @@ export default { ...@@ -158,29 +154,63 @@ export default {
}, },
// 选择时间 // 选择时间
confirmTime(val) { confirmTime(val) {
this.datePickList[1].date = val let times = val.getValues()
this.datePickList[1].date = times[0] + ':' + times[1]
}, },
// 确定选择的日期和时间 // 确定选择的日期和时间
confirmAppointmentTime() { confirmAppointmentTime() {
this.selectFollowForm.appointmentTime = this.datePickList[0].date + ' ' + this.datePickList[1].date this.selectFollowForm.orderTime = this.datePickList[0].date + ' ' + this.datePickList[1].date
console.log(this.selectFollowForm.appointmentTime) console.log(this.selectFollowForm.orderTime)
this.showPicker = !this.showPicker
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.show = false this.initFormData()
}, },
// 提交按钮 // 提交按钮
submit() { submit() {
console.log(111) console.log(111)
console.log(this.followTips) console.log(this.followTips)
let params = { ...this.selectFollowForm } let params = {
console.log(params) followResult: this.selectFollowForm.followResult,
followMark: this.selectFollowForm.followMark,
followFlag: this.selectFollowForm.checked ? 1 : 0,
activityId: this.activityId,
staffId: this.staffId,
groupId: this.groupId
}
// 如果选择标签为预约到店,判断日期和时间是否填了 // 如果选择标签为预约到店,判断日期和时间是否填了
if (this.selectFollowForm.followResultId == 1) { if (this.selectFollowForm.followResult == 1) {
if (!this.selectFollowForm.appointmentTime) { if (!this.selectFollowForm.orderTime) {
Toast.fail('请选择预约时间') Toast.fail('请选择预约时间')
return
}
}
if (this.selectFollowForm.followResult == 1) params.orderTime = this.selectFollowForm.orderTime
console.log(params)
solicitApi.sendSolicitRecord().then(({ code, data, message }) => {
if (code == 0) {
Toast('提交成功')
this.initFormData()
} else {
Notify(message)
} }
})
},
//数据清空
initFormData() {
this.selectFollowForm = {
followResult: '',
followMark: '',
orderTime: '',
// 继续跟进按钮
checked: true
} }
this.isShow = false
this.show = false
this.tabIndex = 0
this.formatterDate()
}, },
// 日期格式转化 // 日期格式转化
formatterDate(val, type) { formatterDate(val, type) {
...@@ -214,6 +244,9 @@ export default { ...@@ -214,6 +244,9 @@ export default {
.follow-content { .follow-content {
flex: 1 auto; flex: 1 auto;
overflow-y: auto; overflow-y: auto;
/deep/ .van-picker {
box-shadow: 0 0.533vw 2.667vw rgba(125, 126, 128, 0.16);
}
} }
.name-title { .name-title {
width: 100%; width: 100%;
...@@ -275,6 +308,7 @@ export default { ...@@ -275,6 +308,7 @@ export default {
.datetime-box { .datetime-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-bottom: 10px;
} }
.datetime-picker { .datetime-picker {
height: 28px; height: 28px;
......
...@@ -13,7 +13,18 @@ export default { ...@@ -13,7 +13,18 @@ export default {
option2: this.selectOption2, option2: this.selectOption2,
value1: this.currentValue1, value1: this.currentValue1,
value2: this.currentValue2, value2: this.currentValue2,
disabled: true disabled: false
}
},
watch: {
currentValue1(n) {
this.value1 = n
},
currentValue2(n) {
this.value2 = n
},
selectOption2(n) {
this.option2 = n
} }
}, },
props: { props: {
...@@ -41,6 +52,7 @@ export default { ...@@ -41,6 +52,7 @@ export default {
methods: { methods: {
selectChange(value) { selectChange(value) {
this.disabled = false this.disabled = false
if (value == 2) this.disabled = true
this.value1 = value this.value1 = value
this.$emit('changeFirst', value) this.$emit('changeFirst', value)
}, },
......
import Vue from 'vue' import {solicitApi} from '@/api'
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
currentIndex: 0, currentIndex: 0,
follewIndex: 0, follewIndex: 0,
activityId: window.localStorage.getItem('dj_scrm_activityId') ? window.localStorage.getItem('dj_scrm_activityId') : '',
staffId: '',
followResultList:[],
customerInfoList: [
{
id: 508394,
userid: 'wo-ZewEAAAmdHxcO6yFxoZjdgZOmeYDA',
customerName: '陆汉林',
avatar: 'https://wework.qpic.cn/wwpic/678993_zS_HywcbTh2vXf-_1649154088/0',
type: 2,
createdTime: '2021-11-29 11:28:57',
staffId: '26730'
},
{
id: 565172,
userid: 'wo-ZewEAAAFPUvM_QovtKXNio8BlHPqQ',
customerName: '胡庚美',
avatar: 'http://wx.qlogo.cn/mmhead/kqodNCVWpEtl7yNaB5VtTKCNyic6VdgaIOgElorcd0fUpyY5f7FJlTQ/0',
type: 2,
createdTime: '2021-11-05 10:13:23',
staffId: '26730'
},
{
id: 575431,
userid: 'wo-ZewEAAAG0cxJbDtkMUDatSXxUufPA',
customerName: '康威',
avatar: 'http://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ericMPp2Cq4owrD3oDD2ia2dS6jLKEX3wDd8Z2z4md535fUUmDOkXLn0u8OjnjbtwexZqy6Mwqx5CSg/0',
type: 2,
createdTime: '2021-12-29 10:44:13',
staffId: '26730'
},
{
id: 508390,
userid: 'wo-ZewEAAA-1QPpYWZ0ttq_JUxCUDg_A',
customerName: '陆汉林',
avatar: 'http://wework.qpic.cn/bizmail/Oj7RrmLaSxvPa458Vl2FIC49SBdnVoh7WDogXgDia26gXMx8uiclJEEw/0',
type: 2,
createdTime: '2021-12-03 15:21:50',
staffId: '26730'
},
{
id: 576380,
userid: 'wo-ZewEAAAtzOb8io1Z2Q29tCAaL1OuA',
customerName: '梁懿',
avatar: 'https://thirdwx.qlogo.cn/mmopen/vi_32/ShrbibCJVEm153ib80j4VlibVMDRgQgE4QZQUuiabM91mqO6AkoR1EBgaUNde9gxpOTXUAxPUJa5GOVMqBWkCOoz5A/0',
type: 2,
createdTime: '2022-01-15 19:52:01',
staffId: '26730'
},
{
id: 508437,
userid: 'wm-ZewEAAALezLnqhZLNLvXgwqvx6BOw',
customerName: '加盐',
avatar: 'http://wx.qlogo.cn/mmhead/zZSYtpeVianTywwVnbJvF0wg4842KoWKJHFkUDUS93oTp2IaokbJkmg/0',
type: 1,
createdTime: '2021-11-17 17:54:26',
staffId: '26730'
},
{
id: 600062,
userid: 'wo-ZewEAAA1Wfb_ibFbyrkbEHlZoWHeQ',
customerName: '麦舒琪',
avatar: 'http://wework.qpic.cn/bizmail/PhLunRaicRw2wAFxnZcnKYy0DO6GsPyPatsnUAIukg6ztxwgGYN8hhQ/0',
type: 2,
createdTime: '2022-02-13 16:26:01',
staffId: '26730'
},
{
id: 657723,
userid: 'wo-ZewEAAA7X3EZmkUxPOYV3Q6cGPMWA',
customerName: '杨明',
avatar: 'https://wx.qlogo.cn/mmhead/X6Ucic5kYIBM88JVZVQWFfqictIfD51ea56A3PmvibpiasGuAzjN3mpVJQ/0',
type: 2,
createdTime: '2022-03-01 01:50:45',
staffId: '26730'
},
{
id: 508395,
userid: 'wo-ZewEAAAuSK_LzmBOgQvQn2aYuGDew',
customerName: '叶立庆',
avatar: 'https://wework.qpic.cn/bizmail/OYVAUhFcjLPm8NrR6ZxYTxdWk1CUfr2H3ibsLhlr9icS6evfG31WIRYw/0',
type: 2,
createdTime: '2022-03-02 18:21:41',
staffId: '26730'
},
{
id: 676385,
userid: 'wo-ZewEAAAwytSKByD758UijrZxPTx8Q',
customerName: '杨明',
avatar: 'https://wx.qlogo.cn/mmhead/X6Ucic5kYIBM88JVZVQWFfqictIfD51ea56A3PmvibpiasGuAzjN3mpVJQ/0',
type: 2,
createdTime: '2022-04-22 17:01:43',
staffId: '26730'
},
{
id: 676889,
userid: 'wo-ZewEAAA-pSr08dBWeyeE3_XvxMarg',
customerName: '徐忆琳',
avatar: 'https://wx.qlogo.cn/mmhead/IbQhd2Y9oKdYbA09yvBOPP5icMicNHPc392y4xvLWibS2XINicj0ibD2Iog/0',
type: 2,
createdTime: '2022-04-25 16:35:27',
staffId: '26730'
},
{
id: 678690,
userid: 'wo-ZewEAAArWK-u6O7qrgGOaHloP0MGQ',
customerName: '陆汉林',
avatar: 'https://wework.qpic.cn/bizmail/Oj7RrmLaSxvPa458Vl2FIC49SBdnVoh7RXrNweIJ7fYPicLaiaIClUCA/0',
type: 2,
createdTime: '2022-05-05 22:55:29',
staffId: '26730'
}
]
}, },
mutations: { mutations: {
['SET_TAB_INDEX'](state, payload) { ['SET_TAB_INDEX'](state, payload) {
...@@ -11,22 +125,39 @@ export default { ...@@ -11,22 +125,39 @@ export default {
}, },
['SET_FOLLOW_INDEX'](state, payload) { ['SET_FOLLOW_INDEX'](state, payload) {
state.follewIndex = payload.follewIndex state.follewIndex = payload.follewIndex
},
['SET_STAFF_ID'](state, payload) {
state.staffId = payload.staffId
},
['SET_COUSTOMER_LIST'](state, payload) {
state.customerInfoList = payload.customerInfoList
},
['SET_FOLLOE_RESULT_LIST'](state,payload){
state.followResultList = payload.followResultList
} }
}, },
actions: { actions: {
// getReport(conText, payload) { //设置staffId
// getReportData(payload).then(res => { getStaffId(conText, payload) {
console.log(22222222)
conText.commit('SET_STAFF_ID', { staffId: 3 })
// solicitApi.getStaffid(payload).then(res => {
// if (res.code == 0) { // if (res.code == 0) {
// conText.commit('SET_REPORT', { reportData: res.data }) // conText.commit('SET_STAFF_ID', { staffId: res.data })
// if (payload.success) { // if (payload.success) {
// payload.success() // payload.success()
// } // }
// } else {
// if (payload.fail) {
// payload.fail()
// }
// } // }
// }) // })
// } },
// 获取跟进结果字典数据
getFollowDataList(conText, payload) {
var params = {
dictType:'follow_result'
}
solicitApi.followFindAllDictData(params).then(res => {
conText.commit('SET_FOLLOE_RESULT_LIST', { followResultList: res.data })
})
},
} }
} }
...@@ -11,44 +11,44 @@ export const BULLETINLIST = [ ...@@ -11,44 +11,44 @@ export const BULLETINLIST = [
{ {
todayText: '今日跟进 (人)', todayText: '今日跟进 (人)',
todayValue: obj => { todayValue: obj => {
return obj.addWayName return obj.workBriefingFollowUpTodayCount
}, },
currentMonth: '本月跟进 ', currentMonth: '本月跟进 ',
currentValue: obj => { currentValue: obj => {
return obj.addWayName return obj.workBriefingFollowUpMonthCount
}, },
icon: 'icon-follow' icon: 'icon-follow'
}, },
{ {
todayText: '今日添加 (人)', todayText: '今日添加 (人)',
todayValue: obj => { todayValue: obj => {
return obj.addWayName return obj.workBriefingAddedTodayCount
}, },
currentMonth: '本月添加 ', currentMonth: '本月添加 ',
currentValue: obj => { currentValue: obj => {
return obj.addWayName return obj.workBriefingAddedMonthCount
}, },
icon: 'icon-append' icon: 'icon-append'
}, },
{ {
todayText: '今日预约 (人)', todayText: '今日预约 (人)',
todayValue: obj => { todayValue: obj => {
return obj.addWayName return obj.workBriefingAppointmentTodayCount
}, },
currentMonth: '本月预约 ', currentMonth: '本月预约 ',
currentValue: obj => { currentValue: obj => {
return obj.addWayName return obj.workBriefingAppointmentMonthCount
}, },
icon: 'icon-appoint' icon: 'icon-appoint'
}, },
{ {
todayText: '今日返厂 (人)', todayText: '今日到店 (人)',
todayValue: obj => { todayValue: obj => {
return obj.addWayName return obj.workBriefingReturnFactoryTodayCount
}, },
currentMonth: '本月返厂 ', currentMonth: '本月到店 ',
currentValue: obj => { currentValue: obj => {
return obj.addWayName return obj.workBriefingReturnFactoryMonthCount
}, },
icon: 'icon-factory' icon: 'icon-factory'
} }
...@@ -58,19 +58,19 @@ export const STATICLIST = [ ...@@ -58,19 +58,19 @@ export const STATICLIST = [
{ {
text: '总招揽数', text: '总招揽数',
value: obj => { value: obj => {
return obj.addWayName return obj.solicitationTotal
} }
}, },
{ {
text: '企微客户', text: '企微客户',
value: obj => { value: obj => {
return obj.addWayName return obj.solicitationWeComCustomerCount
} }
}, },
{ {
text: '未加企微', text: '未加企微',
value: obj => { value: obj => {
return obj.addWayName return obj.solicitationNotWeComCustomerCount
} }
} }
] ]
......
...@@ -12,13 +12,14 @@ export default { ...@@ -12,13 +12,14 @@ export default {
return { return {
chart: null, chart: null,
chartColor: this.color, chartColor: this.color,
refId: this.id refId: this.id,
barList: this.list
} }
}, },
props: { props: {
color: { color: {
type: Array, type: String,
default: () => [] default: ''
}, },
list: { list: {
type: Array, type: Array,
...@@ -32,44 +33,24 @@ export default { ...@@ -32,44 +33,24 @@ export default {
mounted() { mounted() {
this.initCanvas() this.initCanvas()
}, },
watch: {
list() {
this.initCanvas()
}
},
methods: { methods: {
initCanvas() { initCanvas() {
let id = this.refId let id = this.refId
const data = [ let { barList, color } = this
{
year: '1951 年',
sales: 0
},
{
year: '1952 年',
sales: 0
},
{
year: '1956 年',
sales: 0
},
{
year: '1957 年',
sales: 0
},
{
year: '1958 年',
sales: 0
},
{
year: '1959 年',
sales: 0
}
]
this.chart && this.chart.clear() this.chart && this.chart.clear()
this.chart = null this.chart = null
this.chart = new F2.Chart({ this.chart = new F2.Chart({
id, id,
pixelRatio: window.devicePixelRatio, pixelRatio: window.devicePixelRatio,
padding: [16, 24, 24, 120], padding: [16, 24, 24, 120],
height: data.length * 45 height: barList.length * 45
}) })
this.chart.source(data, { this.chart.source(barList, {
sales: { sales: {
tickCount: 7 tickCount: 7
} }
...@@ -77,26 +58,26 @@ export default { ...@@ -77,26 +58,26 @@ export default {
this.chart.coord({ this.chart.coord({
transposed: true transposed: true
}) })
this.chart.interval().position('year*sales') this.chart.interval().position('text*value').color(color)
this.chart.render() this.chart.render()
// 绘制柱状图文本 // 绘制柱状图文本
const offset = -6 const offset = -6
const canvas = this.chart.get('canvas') const canvas = this.chart.get('canvas')
const group = canvas.addGroup() const group = canvas.addGroup()
const shapes = {} const shapes = {}
data.forEach(obj => { barList.forEach(obj => {
const point = this.chart.getPosition(obj) const point = this.chart.getPosition(obj)
const text = group.addShape('text', { const text = group.addShape('text', {
attrs: { attrs: {
x: 134, x: 134,
y: point.y - offset, y: point.y - offset,
text: obj.sales, text: obj.value,
fill: '#ffffff', fill: '#ffffff',
fontSize: 10 fontSize: 10
} }
}) })
shapes[obj.year] = text // 缓存该 shape, 便于后续查找 shapes[obj.text] = text // 缓存该 shape, 便于后续查找
}) })
} }
} }
......
...@@ -2,20 +2,23 @@ ...@@ -2,20 +2,23 @@
<div class="pie-container flex"> <div class="pie-container flex">
<canvas class="canvas" :id="refId"></canvas> <canvas class="canvas" :id="refId"></canvas>
<div class="list-info"> <div class="list-info">
<div class="list-info-item"> <template v-for="(legend, index) in chartData">
<div class="list-info-item" :key="index">
<div class="font-12 color-2f line-18 flex"> <div class="font-12 color-2f line-18 flex">
<div class="circle"></div> <div class="circle" :style="{ background: color[index] }"></div>
已跟进 (人) {{ legend.text }}
</div> </div>
<div class="font-16 color-3 line-24 bold m-l-14">396</div> <div class="font-16 color-3 line-24 bold m-l-14">{{ legend.value }}</div>
</div> </div>
<div class="list-info-item"> </template>
<!-- <div class="list-info-item">
<div class="font-12 color-2f line-18 flex"> <div class="font-12 color-2f line-18 flex">
<div class="circle"></div> <div class="circle"></div>
已跟进 (人) 已跟进 (人)
</div> </div>
<div class="font-16 color-3 line-24 bold m-l-14">396</div> <div class="font-16 color-3 line-24 bold m-l-14">396</div>
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -23,12 +26,13 @@ ...@@ -23,12 +26,13 @@
import F2 from '@antv/f2/lib/index-all' import F2 from '@antv/f2/lib/index-all'
export default { export default {
name:'pieChart', name: 'pieChart',
data() { data() {
return { return {
chart: null, chart: null,
chartColor: this.color, chartColor: this.color,
refId: this.id refId: this.id,
chartData: this.list
} }
}, },
props: { props: {
...@@ -42,31 +46,26 @@ export default { ...@@ -42,31 +46,26 @@ export default {
}, },
id: { id: {
type: String, type: String,
default: () => '' default: ''
},
centerData: {
type: Object,
default: () => {}
}
},
watch: {
list() {
this.initCanvas()
} }
}, },
mounted() { mounted() {
console.log(this.list)
this.initCanvas() this.initCanvas()
}, },
methods: { methods: {
initCanvas() { initCanvas() {
let id = this.refId let id = this.refId
// let { productionValueReportList, orderSource } = this let { chartData, chartColor, centerData } = this
// productionValueReportList.map(e => {
// e.count = 'count'
// })
const data = [
{
const: 'const',
type: '交通出行',
money:20
},
{
const: 'const',
type: '饮食',
money: 0
}
]
this.chart && this.chart.clear() this.chart && this.chart.clear()
this.chart = null this.chart = null
this.chart = new F2.Chart({ this.chart = new F2.Chart({
...@@ -74,7 +73,7 @@ export default { ...@@ -74,7 +73,7 @@ export default {
pixelRatio: window.devicePixelRatio, pixelRatio: window.devicePixelRatio,
padding: [20, 20, 20, 20] padding: [20, 20, 20, 20]
}) })
this.chart.source(data) this.chart.source(chartData)
this.chart.coord('polar', { this.chart.coord('polar', {
transposed: true, transposed: true,
radius: 0.9, radius: 0.9,
...@@ -84,26 +83,30 @@ export default { ...@@ -84,26 +83,30 @@ export default {
this.chart.legend(false) this.chart.legend(false)
this.chart.tooltip(false) this.chart.tooltip(false)
this.chart.guide().html({ this.chart.guide().html({
position: ['50%', '55%'], position: ['50%', '53%'],
html: '<div style="text-align: center;width:150px;height: 50px;">\n <p style="font-size: 10px;color: #999;margin: 0" id="title"></p>\n <p style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;" id="money"></p>\n </div>' html: `<div style="width: 250px;height: 40px;text-align: center;">
}) <div style="font-size: 12px;color: rgba(47, 64, 86, 0.7);">${centerData.text}</div>
this.chart.interval().position('const*money').adjust('stack').color('type', this.chartColor) <div style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;line-height: 24px;">${centerData.rate}</div>
this.chart.pieLabel({ </div>`
activeShape: false, // html: '<div style="text-align: center;width:150px;height: 50px;">\n <p style="font-size: 10px;color: #999;margin: 0" id="title"></p>\n <p style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;" id="value"></p>\n </div>'
lineStyle: {
stroke: '#fff' // 线的颜色
},
anchorStyle: {
fill: '#fff'
},
onClick(ev) {
const data = ev.data
if (data) {
document.getElementById('title').innerText = data.type
document.getElementById('money').innerText = data.money
}
}
}) })
this.chart.interval().position('const*value').adjust('stack').color('text', chartColor)
// this.chart.pieLabel({
// activeShape: false,
// lineStyle: {
// stroke: '#fff' // 线的颜色
// },
// anchorStyle: {
// fill: '#fff'
// },
// onClick(ev) {
// const data = ev.data
// if (data) {
// document.getElementById('title').innerText = data.text
// document.getElementById('value').innerText = data.value
// }
// }
// })
this.chart.render() this.chart.render()
} }
} }
......
<template> <template>
<div class="follow-container"> <div class="follow-container" v-if="flag">
<div class="follow-statistics flex m-b-16"> <div class="follow-statistics flex m-b-16">
<template v-for="(s, i) in statisticList"> <template v-for="(s, i) in statisticList">
<div class="follow-statistics-single" :key="i"> <div class="follow-statistics-single" :key="i">
<div class="font-24 color-3 fw7 line-36">875</div> <div class="font-24 color-3 fw7 line-36">{{ s.value(solicitationFollowData) }}</div>
<div class="font-12 color-2f m-t-4">{{ s.text }}</div> <div class="font-12 color-2f m-t-4">{{ s.text }}</div>
</div> </div>
</template> </template>
</div> </div>
<tab-customer :list="['企微营销', '电话招揽']" @change="changeFollow" :index="follewIndex"> <tab-customer :list="['企微营销', '电话招揽']" @change="changeFollow" :index="follewIndex">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView"> <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-if="true"> <template v-if="solicitationFollowData.weComMarketingList && solicitationFollowData.weComMarketingList.length > 0">
<div class="follow-content"> <div class="follow-content">
<div class="follow-content-item m-b-12" v-for="i in 10" :key="i"> <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="follow-content-item-top">
<div class="font-16 color-3 fw5 text-hide">定保招揽定保招揽定保招揽 N-3定保招揽定保招揽定保招揽 N-3</div> <div class="font-16 color-3 fw5 text-hide">{{ item.groupName }}</div>
<div class="m-t-8 flex-between fw7"> <div class="m-t-8 flex-between fw7">
<div class="font-24 line-36 color-3"> <div class="font-24 line-36 color-3">
265 {{ item.groupWeComCustomerCount }}
<span class="font-12 color-2f m-l-8">个企微客户</span> <span class="font-12 color-2f m-l-8">个企微客户</span>
</div> </div>
<div class="font-12 color-2f">招揽月份:5月</div> <div class="font-12 color-2f">招揽月份:{{ item.solicitationMonth }}月</div>
</div> </div>
</div> </div>
<template v-if="follewIndex == 0"> <template v-if="follewIndex == 0">
<div class="flex-around follow-btn"> <div class="flex-around follow-btn">
<div class="color39 font-14" @click="goTo('solicit.marketing')">一键营销</div> <div class="color39 font-14" @click="goTo('solicit.marketing', item)">一键营销</div>
<div class="colord8">|</div> <div class="colord8">|</div>
<div class="color39 font-14" @click="goTo('solicit.statistic')">触达统计</div> <div class="color39 font-14" @click="goTo('solicit.statistic', item)">触达统计</div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="follow-btn"> <div class="follow-btn">
<div class="color39 font-14" @click="goTo('solicit.lookCustomer')">查看客户</div> <div class="color39 font-14" @click="goTo('solicit.lookCustomer', item)">查看客户</div>
</div> </div>
</template> </template>
</div> </div>
...@@ -46,10 +46,68 @@ ...@@ -46,10 +46,68 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations,mapActions } from 'vuex'
import { solicitApi } from '@/api'
import { Toast } from 'vant'
export default { export default {
data() { data() {
return { return {
flag: true,
solicitationFollowData: {
solicitationTotal: 20,
solicitationWeComCustomerCount: 30,
solicitationNotWeComCustomerCount: 20,
weComMarketingList: [
{
activityId: 1,
groupId: 2,
staffId: 3,
groupName: '定保招揽定保招揽定保招揽 N-3',
groupWeComCustomerCount: 265,
solicitationMonth: 5
},
{
activityId: 0,
groupId: 0,
staffId: 0,
groupName: '定保招揽定保招揽定保招揽 N-3',
groupWeComCustomerCount: 265,
solicitationMonth: 5
},
{
activityId: 0,
groupId: 0,
staffId: 0,
groupName: '定保招揽定保招揽定保招揽 N-3',
groupWeComCustomerCount: 265,
solicitationMonth: 5
},
{
activityId: 0,
groupId: 0,
staffId: 0,
groupName: '定保招揽定保招揽定保招揽 N-3',
groupWeComCustomerCount: 265,
solicitationMonth: 5
},
{
activityId: 0,
groupId: 0,
staffId: 0,
groupName: '定保招揽定保招揽定保招揽 N-3',
groupWeComCustomerCount: 265,
solicitationMonth: 5
},
{
activityId: 0,
groupId: 0,
staffId: 0,
groupName: '定保招揽定保招揽定保招揽 N-3',
groupWeComCustomerCount: 265,
solicitationMonth: 5
}
]
},
statisticList: [] statisticList: []
} }
}, },
...@@ -60,13 +118,42 @@ export default { ...@@ -60,13 +118,42 @@ export default {
}, },
created() { created() {
this.statisticList = this.$constants.STATICLIST this.statisticList = this.$constants.STATICLIST
this.getFollowDataList()
// this.solicitationFollow()
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
SET_FOLLOW_INDEX: 'solicit/SET_FOLLOW_INDEX' SET_FOLLOW_INDEX: 'solicit/SET_FOLLOW_INDEX'
}), }),
goTo(name) { ...mapActions({
this.$router.push({ name }) getFollowDataList: 'solicit/getFollowDataList',
}),
solicitationFollow() {
let params = {
activityId: this.activityId,
staffId: this.staffId
}
this.showLoading()
solicitApi.solicitationFollow(params).then(({ code, data, message }) => {
this.hideLoading()
if (code == '0') {
this.solicitationFollowData = data
} else {
Notify(message)
}
this.flag = true
})
},
goTo(name, item) {
let { activityId, groupId, staffId } = item
this.$router.push({
name,
query: {
groupId
}
})
}, },
changeFollow(index) { changeFollow(index) {
this.SET_FOLLOW_INDEX({ follewIndex: index }) this.SET_FOLLOW_INDEX({ follewIndex: index })
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
import overview from './overview.vue' import overview from './overview.vue'
import follow from './follow.vue' import follow from './follow.vue'
import result from './result.vue' import result from './result.vue'
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations, mapActions } from 'vuex'
export default { export default {
name: 'index', name: 'index',
data() { data() {
...@@ -28,10 +28,18 @@ export default { ...@@ -28,10 +28,18 @@ export default {
currentIndex: state => state.solicit.currentIndex currentIndex: state => state.solicit.currentIndex
}) })
}, },
created() {
this.getStaffId({
staffuuid: this.getLocalStorage('dj_scrm_userInfo').uuid ? this.getLocalStorage('dj_scrm_userInfo').uuid : ''
})
},
methods: { methods: {
...mapMutations({ ...mapMutations({
SET_TAB_INDEX: 'solicit/SET_TAB_INDEX' SET_TAB_INDEX: 'solicit/SET_TAB_INDEX'
}), }),
...mapActions({
getStaffId: 'solicit/getStaffId'
}),
changeIndex(index) { changeIndex(index) {
this.SET_TAB_INDEX({ currentIndex: index }) this.SET_TAB_INDEX({ currentIndex: index })
} }
......
...@@ -4,20 +4,11 @@ ...@@ -4,20 +4,11 @@
<div class="font-16 color54 line-24 title">定保N-5</div> <div class="font-16 color54 line-24 title">定保N-5</div>
<div class="search-head flex"> <div class="search-head flex">
<van-dropdown-menu active-color="#3369B1"> <van-dropdown-menu active-color="#3369B1">
<van-dropdown-item v-model="searchType" :options="seachArray" /> <van-dropdown-item v-model="searchType" :options="seachArray" @change="selectType" />
</van-dropdown-menu> </van-dropdown-menu>
<search :keyword="keyWord" placeholder="请输入关键字" @search="searchkeyWord"></search> <search :keyword="keyWord" placeholder="请输入关键字" @search="searchkeyWord"></search>
</div> </div>
<drop-down :selectOption1="statusList" :selectOption2="resultList" :currentValue1="status" :currentValue2="result" @changeFirst="changeFirst" @changeSecond="selectSecondChange"></drop-down>
<!-- <select-bar :list="['全部', '未跟进', '未接听']" :index="currentIndex" @change="changeCurrent"></select-bar> -->
<drop-down
:selectOption1="statusList"
:selectOption2="resultList"
:currentValue1="status"
:currentValue2="result"
@changeFirst="changeFirst"
@selectSecondChange="selectSecondChange"
></drop-down>
</div> </div>
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView"> <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<customer-card :customerInfo="customerInfo"></customer-card> <customer-card :customerInfo="customerInfo"></customer-card>
...@@ -25,11 +16,11 @@ ...@@ -25,11 +16,11 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
data() { data() {
return { return {
keyWord: '', keyWord: '',
currentIndex: 0,
status: 0, status: 0,
result: 0, result: 0,
searchType: 0, searchType: 0,
...@@ -42,75 +33,60 @@ export default { ...@@ -42,75 +33,60 @@ export default {
customerInfo: [ customerInfo: [
{ {
id: 1, id: 1,
name: '林先生', name: '崔美女',
carNumber: '月A8888', followResult: '未接听',
carBrand: 'BMW', checkStatus: '一查看',
result: '未接听', solicitTime: '05-07 15:30',
wechatMarketing: '一查看', updatedTime: '05-07 15:30',
joinWechat: '美女', phoneNumber: '',
date: '05-07 15:30', type: 1,
updateDate: '05-07 15:30', wechatnick: '',
telNumber: '' cars: [
{
customerId: 0,
carSeries: '奔驰 G63',
carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
}
]
}, },
{ {
id: 2, id: 2,
name: 'kuang先生', name: '匡先生',
carNumber: '', followResult: '未接听',
carBrand: 'BMW', checkStatus: '一查看',
result: '未接听', solicitTime: '05-07 15:30',
wechatMarketing: '一查看', updatedTime: '05-07 15:30',
joinWechat: '美女', phoneNumber: '18818188989',
date: '05-07 15:30', type: 2,
updateDate: '05-07 15:30', wechatnick: '横穿',
telNumber: '18818188989' cars: [
{
customerId: 0,
carSeries: '奔驰 G63',
carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
}
]
}, },
{ {
id: 3, id: 3,
name: 'xu先生', name: 'xu先生',
carNumber: '粤B 8888', followResult: '未接听',
carBrand: '兰博基尼', checkStatus: '一查看',
result: '未接听', solicitTime: '05-07 15:30',
wechatMarketing: '一查看', updatedTime: '05-07 15:30',
joinWechat: '美女', phoneNumber: '18818188989',
date: '05-07 15:30', type: 1,
updateDate: '05-07 15:30', wechatnick: 'BB',
telNumber: '18818188989' cars: [
},
{
id: 4,
name: '林先生',
carNumber: '月A8888',
carBrand: 'BMW',
result: '未接听',
wechatMarketing: '一查看',
joinWechat: '美女',
date: '05-07 15:30',
updateDate: '05-07 15:30',
telNumber: ''
},
{
id: 5,
name: 'kuang先生',
carNumber: '',
carBrand: 'BMW',
result: '未接听',
wechatMarketing: '一查看',
joinWechat: '美女',
date: '05-07 15:30',
updateDate: '05-07 15:30',
telNumber: '18818188989'
},
{ {
id: 6, customerId: 0,
name: 'xu先生', carSeries: '奔驰 G63',
carNumber: '粤B 8888', carNumber: '粤B 6666',
carBrand: '兰博基尼', carBuyDate: '2022-06-04T06:36:16.314Z'
result: '未接听', }
wechatMarketing: '一查看', ]
joinWechat: '美女',
date: '05-07 15:30',
updateDate: '05-07 15:30',
telNumber: '18818188989'
} }
], ],
statusList: [ statusList: [
...@@ -118,33 +94,73 @@ export default { ...@@ -118,33 +94,73 @@ export default {
{ text: '已跟进', value: 1 }, { text: '已跟进', value: 1 },
{ text: '未跟进', value: 2 } { text: '未跟进', value: 2 }
], ],
resultList: [ resultList: [{ text: '全部结果', value: 0 }]
{ text: '全部结果', value: 0 },
{ text: '预约到店', value: 1 },
{ text: '价格高', value: 2 },
{ text: '已保养', value: 3 },
{ text: '未接听', value: 4 },
{ text: '不感兴趣', value: 5 },
{ text: '空号', value: 6 },
{ text: '距离远', value: 7 },
{ text: '非本人', value: 8 },
{ text: '其他', value: 9 }
]
} }
}, },
computed: {
...mapState({
followResultList: state => state.solicit.followResultList
})
},
mounted() {
this.initOption()
this.showLoading()
this.getSendCustomerList()
},
methods: { methods: {
// 获取送达客户信息
getSendCustomerList(index) {
console.log(index)
this.hideLoading()
let params = {
keyWord: this.keyWord,
type: this.searchType + 1,
customerGroupType: 2,
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
followFlag: this.status != 0 ? this.status : ''
}
if (this.status != 2) {
params.followResult = this.result != 0 ? this.result : ''
}
console.log(params)
// solicitApi.getCustomerList().then(({ code, data, message }) => {
// if (code == 0) {
// this.customerInfo = data
// } else {
// Notify(message)
// }
// })
},
onReachBottom() { onReachBottom() {
this.$refs.scrollView.loading = false this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true this.$refs.scrollView.finished = true
}, },
searchkeyWord(e) { searchkeyWord(e) {
this.keyWord = e this.keyWord = e
this.getSendCustomerList()
},
selectType() {
this.keyWord = ''
}, },
changeFirst(index) { changeFirst(index) {
this.status = index this.status = index
console.log(index)
this.result = 0
this.getSendCustomerList()
}, },
selectSecondChange(index) { selectSecondChange(index) {
this.result = index this.result = index
this.getSendCustomerList()
},
initOption() {
this.followResultList.forEach(item => {
this.resultList.push({
text: item.dictLabel,
value: item.dictValue
})
})
} }
} }
} }
......
...@@ -2,8 +2,18 @@ ...@@ -2,8 +2,18 @@
<div class="marking-container"> <div class="marking-container">
<div class="marking-container-content m-b-16"> <div class="marking-container-content m-b-16">
<div class="font-16 color-3 fw5 m-b-12 line-24">发送内容</div> <div class="font-16 color-3 fw5 m-b-12 line-24">发送内容</div>
<template v-if="isEmpty"> <template v-if="marketingDetails.attachmentList.length > 0">
<div class="font-14 color-3">尊敬的客户,您好!我店本月推出自费喷漆特惠活动,折扣后单面喷漆低至200元,点击下方链接享受优惠:</div> <div v-for="(item, index) in marketingDetails.attachmentList" :key="index">
<template v-if="item.attType == 1">
<div class="font-14 color-3" v-html="item.attContent"></div>
</template>
<template v-else-if="item.attType == 2">
<div class="marking-image">
<img :src="item.attContent" />
</div>
</template>
</div>
<!-- <div class="font-14 color-3">尊敬的客户,您好!我店本月推出自费喷漆特惠活动,折扣后单面喷漆低至200元,点击下方链接享受优惠:</div> -->
</template> </template>
<template v-else> <template v-else>
<empty class="marking-empty" description="门店尚未针对该人群设置营销物料"></empty> <empty class="marking-empty" description="门店尚未针对该人群设置营销物料"></empty>
...@@ -12,20 +22,111 @@ ...@@ -12,20 +22,111 @@
<div class="marking-container-customer flex-between"> <div class="marking-container-customer flex-between">
<div class="font-16 color-3 fw5">发送客户</div> <div class="font-16 color-3 fw5">发送客户</div>
<div class="color-2f font-14 flex" @click="goTo('solicit.customer')"> <div class="color-2f font-14 flex" @click="goTo('solicit.customer')">
共200人 共{{ marketingDetails.customerInfoList.length }}人
<div class="sprite-icon icon-arrow m-l-8"></div> <div class="sprite-icon icon-arrow m-l-8"></div>
</div> </div>
</div> </div>
<div class="footer">
<div :class="{ 'marking-button': true, disabled: marketingDetails.customerInfoList.length == 0 }" @click="sendHandle">一键发送</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { solicitApi } from '@/api'
import { Toast } from 'vant'
import { mapState, mapMutations } from 'vuex'
export default { export default {
data() { data() {
return { return {
isEmpty: false isEmpty: true,
marketingDetails: {
customerInfoList: [],
attachmentList: [
{
id: 0,
businessUuid: 'string',
businessDesc: 'string',
attContent:
' 把v下吧教科书空间上传开始接触烧烤聚会恐惧好快就好v了;是dhvs;绿茶会计核算的;健康v还都是恐惧和大家客户啊是看不见彼此间莫桑比克吃的空间舒适的空间回复出可视电话v 开始v看回放v空间发挥恐惧和抗拒款双肩包女教师的女,马摘星不你就看是的不吃vkjdsbvksjbvkjs。 的vsdvasdhlvjsh看女款和v看就dshvksjhvsdhvs;开局后大家看和vkjdhvkdjhvkjdshv看电视剧 把v下吧教科书空间上传开始接触烧烤聚会恐惧好快就好v了;是dhvs;绿茶会计核算的;健康v还都是恐惧和大家客户啊是看不见彼此间莫桑比克吃的空间舒适的空间回复出可视电话v 开始v看回放v空间发挥恐惧和抗拒款双肩包女教师的女,马摘星不你就看是的不吃vkjdsbvksjbvkjs。 的vsdvasdhlvjsh看女款和v看就dshvksjhvsdhvs;开局后大家看和vkjdhvkdjhvkjdshv看电视剧 ',
attType: 1,
attNum: 0,
mediaId: 'string',
mediaDate: '2022-06-03T03:04:56.484Z',
merchantId: 0,
createdBy: 0,
createdTime: '2022-06-03T03:04:56.484Z',
updatedBy: 0,
updatedTime: '2022-06-03T03:04:56.484Z',
delFlag: 'string'
},
{
attType: 2,
attContent: 'https://wx.glsx.com.cn/upload/biz/093cad67-c5b4-467f-8954-54061433027c.jpg'
},
{
attType: 7,
attContent: '{"marketingId":1,"marketingType":"3","marketingName":"招商银行信用卡"}'
}
]
}
} }
}, },
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
},
computed: {
...mapState({
activityId: state => state.solicit.activityId,
staffId: state => state.solicit.staffId
})
},
methods: { methods: {
...mapMutations({
SET_COUSTOMER_LIST: 'solicit/SET_COUSTOMER_LIST'
}),
//一键营销内容回显
getocmarketingList() {
let params = {
activityId: this.activityId,
staffId: this.staffId,
groupId: this.groupId
}
this.showLoading()
solicitApi.getocmarketingList(params).then(({ code, data, message }) => {
this.hideLoading()
if (code == '0') {
this.marketingDetails = data
this.SET_COUSTOMER_LIST({ customerInfoList: data.customerInfoList })
} else {
Notify(message)
}
this.flag = true
})
},
// 一键营销
sendHandle() {
if (this.marketingDetails.massId) {
Toast('您已进行企微营销,请查看营销统计')
return
}
if (this.marketingDetails.customerInfoList.length > 0) {
let params = {
groupId: this.groupId,
id: this.activityId,
businessUuid: this.marketingDetails.businessUuid,
configId: this.marketingDetails.configId,
staffId: this.staffId
}
solicitApi.createdOcmarketing(params).then(res => {
if (res) {
Toast('营销活动已创建,请及时在「企业微信-群发助手」中确认发送')
this.$router.go(-1)
} else {
Notify('营销活动创建失败')
}
})
}
},
goTo(name) { goTo(name) {
this.$router.push({ name }) this.$router.push({ name })
} }
...@@ -38,6 +139,15 @@ export default { ...@@ -38,6 +139,15 @@ export default {
&-content { &-content {
background: #fff; background: #fff;
padding: 16px; padding: 16px;
.marking-image {
width: 248px;
height: 198px;
margin: 12px 32px 16px 32px;
img {
width: 100%;
height: 100%;
}
}
.marking-empty { .marking-empty {
padding: 39px 0 24px 0 !important; padding: 39px 0 24px 0 !important;
/deep/ .van-empty__description { /deep/ .van-empty__description {
...@@ -51,6 +161,30 @@ export default { ...@@ -51,6 +161,30 @@ export default {
box-shadow: 0px 3px 10px 0px rgba(223, 228, 234, 0.81); box-shadow: 0px 3px 10px 0px rgba(223, 228, 234, 0.81);
border-radius: 4px; border-radius: 4px;
padding: 0 16px; padding: 0 16px;
margin-bottom: 50px;
}
.footer {
width: 343px;
height: 58px;
background: #f7f7f7;
z-index: 100;
position: fixed;
bottom: 0;
}
.marking-button {
width: 343px;
height: 42px;
background: #3975c6;
border-radius: 21px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 42px;
text-align: center;
margin-bottom: 16px;;
}
.disabled {
background: #d5d8db !important;
} }
} }
</style> </style>
<template> <template>
<div class="overview-container"> <div class="overview-container" v-if="flag">
<div class="overview-wrap m-b-16"> <div class="overview-wrap m-b-16">
<div class="title-info">客户招揽概况</div> <div class="title-info">客户招揽概况</div>
<div class="overview-content"> <div class="overview-content">
<template> <template v-if="chart.pieData.length > 0">
<pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData"></pieChart>
</template>
<template v-else>
<empty></empty> <empty></empty>
</template> </template>
<!-- <pieChart :color="styleColor" id="overviewRef"></pieChart> -->
</div> </div>
</div> </div>
<div class="overview-wrap m-b-16"> <div class="overview-wrap m-b-16">
<div class="title-info">客户分群</div> <div class="title-info">客户分群</div>
<div class="overview-group"> <div class="overview-group">
<!-- <template> <template v-if="chart.barData.length > 0">
<barChart :color="chart.barColor" id="groupingRef" :list="chart.barData"></barChart>
</template>
<template v-else>
<empty></empty> <empty></empty>
</template> --> </template>
<barChart :color="styleColor" id="groupingRef"></barChart>
</div> </div>
</div> </div>
<div class="overview-wrap m-b-16"> <div class="overview-wrap m-b-16">
<div class="title-info">工作简报</div> <div class="title-info">工作简报</div>
<div class="bulletin flex"> <div class="bulletin flex">
<template v-for="(item,index) in bulletinList"> <template v-for="(item, index) in bulletinList">
<div class="bulletin-single flex-top m-b-16" :key="index"> <div class="bulletin-single flex-top m-b-16" :key="index">
<div :class="['logo' ,'sprite-icon', item.icon]"></div> <div :class="['logo', 'sprite-icon', item.icon]"></div>
<div class="bulletin-info"> <div class="bulletin-info">
<div class="color-2f font-12">{{item.todayText}}</div> <div class="color-2f font-12">{{ item.todayText }}</div>
<div class="number color-3 font-24 fw7">3</div> <div class="number color-3 font-24 fw7">{{ item.todayValue(overviewInfo) }}</div>
<div class="color-2f font-12 m-t-8"> <div class="color-2f font-12 m-t-8">
{{item.currentMonth}} {{ item.currentMonth }}
<span class="font-14 color-3 fw5">240</span> <span class="font-14 color-3 fw5">{{ item.currentValue(overviewInfo) }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -42,6 +46,8 @@ ...@@ -42,6 +46,8 @@
<script> <script>
import pieChart from '../solicit/components/pie.vue' import pieChart from '../solicit/components/pie.vue'
import barChart from '../solicit/components/bar.vue' import barChart from '../solicit/components/bar.vue'
import { solicitApi } from '@/api'
export default { export default {
components: { components: {
pieChart, pieChart,
...@@ -49,12 +55,104 @@ export default { ...@@ -49,12 +55,104 @@ export default {
}, },
data() { data() {
return { return {
styleColor: ['#3975C6', '#E6E7EB'], flag: true,
bulletinList: [] bulletinList: [],
chart: {
pieColor: ['#3975C6', '#E6E7EB'],
pieData: [],
centerData: {},
barData: [],
barColor: '#3975C6'
},
overviewInfo: {
followedUpCount: 10,
notFollowedUpCount: 4,
followedUpPercent: '20%',
customerGroupList: [
{
groupName: '名称展示上限为十个字',
groupCount: 5
},
{
groupName: 'N-4',
groupCount: 6
},
{
groupName: 'N-3',
groupCount: 3
},
{
groupName: 'N-2',
groupCount: 8
},
{
groupName: '名称测试展示上限为十个字',
groupCount: 1
}
],
workBriefingFollowUpTodayCount: 6,
workBriefingFollowUpMonthCount: 0,
workBriefingAddedTodayCount: 3,
workBriefingAddedMonthCount: 0,
workBriefingAppointmentTodayCount: 0,
workBriefingAppointmentMonthCount: 4,
workBriefingReturnFactoryTodayCount: 0,
workBriefingReturnFactoryMonthCount: 2
}
} }
}, },
created(){ created() {
this.bulletinList = this.$constants.BULLETINLIST this.bulletinList = this.$constants.BULLETINLIST
// this.getTaskOverviewData()
this.initChartData()
},
methods: {
getTaskOverviewData() {
let params = {
activityId: this.activityId,
staffId: this.staffId
}
this.showLoading()
solicitApi.taskOverviewData(params).then(({ code, data, message }) => {
this.hideLoading()
if (code == '0') {
this.overviewInfo = data
this.initChartData()
} else {
Notify(message)
}
this.flag = true
})
},
initChartData() {
let { overviewInfo } = this
// legendData
if (overviewInfo.followedUpCount != 0 || overviewInfo.notFollowedUpCount != 0) {
this.chart.pieData = [
{
const: 'const',
text: ' 已跟进 (人)',
value: overviewInfo.followedUpCount
},
{
const: 'const',
text: '本月指标 (人)',
value: overviewInfo.notFollowedUpCount + overviewInfo.followedUpCount
}
]
this.chart.centerData = {
text: '达成率',
rate: overviewInfo.followedUpPercent
}
overviewInfo.customerGroupList.length > 0 &&
overviewInfo.customerGroupList.forEach(item => {
this.chart.barData.push({
text: item.groupName.slice(0, 10),
value: item.groupCount
})
})
}
}
} }
} }
</script> </script>
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<div>1. 客户开启消息免打扰,消息发送失败;</div> <div>1. 客户开启消息免打扰,消息发送失败;</div>
<div>2. 群发次数达到上限,上限次数为每个客户每天仅可接收1条群发消息。(系统将连续重试3天)</div> <div>2. 群发次数达到上限,上限次数为每个客户每天仅可接收1条群发消息。(系统将连续重试3天)</div>
</div> </div>
<customer-card v-if="customerInfo1.length" :customerInfo="customerInfo1"></customer-card> <customer-card v-if="customerInfo1.length" :customerInfo="customerInfo1" :groupId="groupId"></customer-card>
<empty v-else></empty> <empty v-else></empty>
</scroll-view> </scroll-view>
</van-tab> </van-tab>
<van-tab :title="'已送达(' + deliveredNum + ')'"> <van-tab :title="'已送达(' + deliveredData.delivered + ')'">
<div class="statistic-pic flex"> <div class="statistic-pic flex">
<div class="funnel-logo"> <div class="funnel-logo">
<img src="@/assets/images/funnel.png" alt="" /> <img src="@/assets/images/funnel.png" alt="" />
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<div class="font-12 color-2f flex m-b-14" :key="index"> <div class="font-12 color-2f flex m-b-14" :key="index">
<div class="circle" :style="{ background: status.color }"></div> <div class="circle" :style="{ background: status.color }"></div>
{{ status.text }} {{ status.text }}
<span class="font-16 color-3 m-l-8 bold">2,000</span> <span class="font-16 color-3 m-l-8 bold">{{ status.value(deliveredData) }}</span>
<span class="font-10 color39 m-l-4 fw5">(100%)</span> <span class="font-10 color39 m-l-4 fw5">({{ (Number(status.value(deliveredData)) / Number(status.proportion(deliveredData))) * 100 }}%)</span>
</div> </div>
</template> </template>
</div> </div>
</div> </div>
<select-bar :index="3" :list="selectBarList"></select-bar> <select-bar :index="alreadyIndex" :list="selectBarList" @change="changeSelectTab"></select-bar>
<customer-card :customerInfo="customerInfo2"></customer-card> <customer-card :customerInfo="customerInfo2"></customer-card>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
...@@ -40,11 +40,13 @@ import Empty from '../../components/Empty.vue' ...@@ -40,11 +40,13 @@ import Empty from '../../components/Empty.vue'
import ScrollView from '../../components/ScrollView.vue' import ScrollView from '../../components/ScrollView.vue'
import SelectBar from '../../components/SelectBar.vue' import SelectBar from '../../components/SelectBar.vue'
import { solicitApi } from '@/api' import { solicitApi } from '@/api'
import { mapState } from 'vuex'
export default { export default {
components: { SelectBar, Empty, ScrollView }, components: { SelectBar, Empty, ScrollView },
data() { data() {
return { return {
tabIndex: 0, tabIndex: 0,
alreadyIndex: 0,
deliveredNum: 0, deliveredNum: 0,
selectBarList: ['已送达', '已查看', '已领取', '已到店'], selectBarList: ['已送达', '已查看', '已领取', '已到店'],
// 未送达页码 // 未送达页码
...@@ -73,10 +75,14 @@ export default { ...@@ -73,10 +75,14 @@ export default {
phoneNumber: '', phoneNumber: '',
type: 1, type: 1,
wechatnick: '', wechatnick: '',
SolicitCarResponse: { cars: [
{
customerId: 0,
carSeries: '奔驰 G63', carSeries: '奔驰 G63',
carNumber: '粤B 6666' carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
} }
]
}, },
{ {
id: 2, id: 2,
...@@ -88,10 +94,14 @@ export default { ...@@ -88,10 +94,14 @@ export default {
phoneNumber: '18818188989', phoneNumber: '18818188989',
type: 2, type: 2,
wechatnick: '横穿', wechatnick: '横穿',
SolicitCarResponse: { cars: [
{
customerId: 0,
carSeries: '奔驰 G63', carSeries: '奔驰 G63',
carNumber: '粤B 6666' carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
} }
]
}, },
{ {
id: 3, id: 3,
...@@ -103,10 +113,14 @@ export default { ...@@ -103,10 +113,14 @@ export default {
phoneNumber: '18818188989', phoneNumber: '18818188989',
type: 1, type: 1,
wechatnick: 'BB', wechatnick: 'BB',
SolicitCarResponse: { cars: [
{
customerId: 0,
carSeries: '奔驰 G63', carSeries: '奔驰 G63',
carNumber: '粤B 6666' carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
} }
]
} }
], ],
// 已送达客户列表 // 已送达客户列表
...@@ -121,10 +135,14 @@ export default { ...@@ -121,10 +135,14 @@ export default {
phoneNumber: '', phoneNumber: '',
type: 1, type: 1,
wechatnick: '', wechatnick: '',
SolicitCarResponse: { cars: [
{
customerId: 0,
carSeries: '奔驰 G63', carSeries: '奔驰 G63',
carNumber: '粤B 6666' carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
} }
]
}, },
{ {
id: 2, id: 2,
...@@ -136,10 +154,14 @@ export default { ...@@ -136,10 +154,14 @@ export default {
phoneNumber: '18818188989', phoneNumber: '18818188989',
type: 2, type: 2,
wechatnick: '横穿', wechatnick: '横穿',
SolicitCarResponse: { cars: [
{
customerId: 0,
carSeries: '奔驰 G63', carSeries: '奔驰 G63',
carNumber: '粤B 6666' carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
} }
]
}, },
{ {
id: 3, id: 3,
...@@ -151,90 +173,147 @@ export default { ...@@ -151,90 +173,147 @@ export default {
phoneNumber: '18818188989', phoneNumber: '18818188989',
type: 2, type: 2,
wechatnick: 'BB', wechatnick: 'BB',
SolicitCarResponse: { cars: [
{
customerId: 0,
carSeries: '奔驰 G63', carSeries: '奔驰 G63',
carNumber: '粤B 6666' carNumber: '粤B 6666',
carBuyDate: '2022-06-04T06:36:16.314Z'
} }
]
} }
], ],
deliveredData: {
delivered: '2000',
viewed: '1600',
received: '800',
arrived: '400'
},
reachStatus: [ reachStatus: [
{ {
text: '已送达', text: '已送达',
value: obj => { value: obj => {
return obj.addWayName return obj.delivered
}, },
proportion: obj => { proportion: obj => {
return obj.addWayName return obj.delivered
}, },
color: '#3975C6' color: '#3975C6'
}, },
{ {
text: '已查看', text: '已查看',
value: obj => { value: obj => {
return obj.addWayName return obj.viewed
}, },
proportion: obj => { proportion: obj => {
return obj.addWayName return obj.delivered
}, },
color: '#59BCFF' color: '#59BCFF'
}, },
{ {
text: '已领取', text: '已领取',
value: obj => { value: obj => {
return obj.addWayName return obj.received
}, },
proportion: obj => { proportion: obj => {
return obj.addWayName return obj.delivered
}, },
color: '#33C1B9' color: '#33C1B9'
}, },
{ {
text: '已到店', text: '已到店',
value: obj => { value: obj => {
return obj.addWayName return obj.arrived
}, },
proportion: obj => { proportion: obj => {
return obj.addWayName return obj.delivered
}, },
color: '#82D876' color: '#82D876'
} }
] ]
} }
}, },
computed: {
...mapState({
activityId: state => state.solicit.activityId,
staffId: state => state.solicit.staffId
})
},
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
},
mounted() { mounted() {
// this.getUnSendCustomerList() this.showLoading()
// this.getSendCustomerList() this.getSendCustomerList(0) //未送达
this.getSendCustomerList(1) //已送达
}, },
methods: { methods: {
// tab栏切换 // tab栏切换
tabChange(e) { tabChange(e) {
console.log(e)
this.tabIndex = e this.tabIndex = e
if (e == 1) {
// 触达统计-客户送达分层
// this.deliveredStatistics()
}
}, },
// 获取未送达客户信息 //已送达Tab四种状态
getUnSendCustomerList() { changeSelectTab(e) {
var params = { ...this.unSendPageParam } console.log(e)
// followFlag-跟进状态:0待跟进、1已跟进 this.alreadyIndex = e
params.followFlag = 0 this.getSendCustomerList(1)
// params.groupId =
// params.id =
// params.staffId =
console.log(params)
solicitApi.getCustomerList().then(res => {
console.log(res)
})
}, },
// // 获取未送达客户信息
// 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() { getSendCustomerList(index) {
var params = { ...this.sendPageParam } console.log(index)
// followFlag-跟进状态:0待跟进、1已跟进 this.hideLoading()
params.followFlag = 1 let target = ['customerInfo1', 'customerInfo2']
// params.groupId = let { alreadyIndex } = this
// params.id = let params = {
// params.staffId = customerGroupType:2,
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
sendStatus: index //发送状态 0-未发送 1-已发送
}
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.已到店
}
console.log(params) console.log(params)
solicitApi.getCustomerList().then(res => { // solicitApi.getCustomerList().then(({ code, data, message }) => {
console.log(res) // if (code == 0) {
// this.target[index] = data
// } else {
// Notify(message)
// }
// })
},
// 客户送达分层
deliveredStatistics() {
let params = {
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId
}
solicitApi.deliveredStatistics({ params }).then(({ code, data, message }) => {
if (code == 0) {
this.deliveredData = data
}
}) })
}, },
// 下拉触底刷新 // 下拉触底刷新
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!