Commit e91e28c1 by 王志慧

commit

1 parent 1e2ccf1e
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
followFindAllDictData(data) { followFindAllDictData(data) {
data.method = 'merchants.api.menu.findAllDictData' data.method = 'merchants.api.menu.findAllDictData'
return window.$HTTP({ return window.$HTTP({
url: 'http://rop-merchant.dev.glsx.com.cn/rop-merchants/router', url:'http://rop-merchant.dev.glsx.com.cn/rop-merchants/router',
data, data,
returnAll: true returnAll: true
}) })
...@@ -21,16 +21,26 @@ export default { ...@@ -21,16 +21,26 @@ export default {
getStaffid(data) { getStaffid(data) {
data.method = 'marketing.api.solicit.staffid.obtain' data.method = 'marketing.api.solicit.staffid.obtain'
return window.$HTTP({ return window.$HTTP({
url:'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data,
returnAll: true
})
},
// 根据任务id查询活动
findActivityIdByUUID(data) {
data.method = 'marketing.api.activity.findActivityIdByUUID'
return window.$HTTP({
url,
data, data,
returnAll: true returnAll: true
}) })
}, },
// 客户招揽-任务总览 // 客户招揽-任务总览
taskOverviewData(data) { taskOverviewData(data) {
data.method = 'marketing.api.solicit.taskOverview' data.method = 'marketing.api.solicit.taskOverview'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.3.226:8593/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
...@@ -39,7 +49,7 @@ export default { ...@@ -39,7 +49,7 @@ export default {
solicitationFollow(data) { solicitationFollow(data) {
data.method = 'marketing.api.solicit.solicitationFollow' data.method = 'marketing.api.solicit.solicitationFollow'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.3.226:8593/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
...@@ -48,7 +58,7 @@ export default { ...@@ -48,7 +58,7 @@ export default {
createdOcmarketing(data) { createdOcmarketing(data) {
data.method = 'marketing.api.solicit.ocmarketing.send' data.method = 'marketing.api.solicit.ocmarketing.send'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data data
}) })
}, },
...@@ -57,7 +67,7 @@ export default { ...@@ -57,7 +67,7 @@ export default {
getocmarketingList(data) { getocmarketingList(data) {
data.method = 'marketing.api.solicit.ocmarketing.echo' data.method = 'marketing.api.solicit.ocmarketing.echo'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
...@@ -67,7 +77,7 @@ export default { ...@@ -67,7 +77,7 @@ export default {
deliveredStatistics(data) { deliveredStatistics(data) {
data.method = 'marketing.api.solicit.customer.delivered.statistics' data.method = 'marketing.api.solicit.customer.delivered.statistics'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
...@@ -77,7 +87,7 @@ export default { ...@@ -77,7 +87,7 @@ export default {
getCustomerList(data) { getCustomerList(data) {
data.method = 'marketing.api.solicit.page.customer.condition' data.method = 'marketing.api.solicit.page.customer.condition'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
...@@ -86,7 +96,7 @@ export default { ...@@ -86,7 +96,7 @@ export default {
getCustomerDetail(data) { getCustomerDetail(data) {
data.method = 'marketing.api.solicit.customer.detail' data.method = 'marketing.api.solicit.customer.detail'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
...@@ -95,7 +105,7 @@ export default { ...@@ -95,7 +105,7 @@ export default {
sendSolicitRecord(data) { sendSolicitRecord(data) {
data.method = 'marketing.api.solicit.record.save' data.method = 'marketing.api.solicit.record.save'
return window.$HTTP({ return window.$HTTP({
url: 'http://192.168.1.170:8065/rop-scrm-marketing/router', url,
data, data,
returnAll: true returnAll: true
}) })
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
</div> </div>
<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.solicitTime ? item.solicitTime.slice(0, 10) : '' }}</div> <div class="customer-info-message">{{ item.solicitTime }}</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>
<div class="customer-info-message">{{ item.updatedTime ? item.updatedTime.slice(0, 10) : '' }}</div> <div class="customer-info-message">{{ item.updatedTime }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
followCustomer(val, index) { followCustomer(val, index) {
this.customerIndex = index this.customerIndex = index
this.followCustomerData = val this.followCustomerData = val
this.$refs.customerFollowRef.init(val) this.$refs.customerFollowRef.init()
}, },
// 客户详情 // 客户详情
sendMessage(val) { sendMessage(val) {
......
...@@ -135,7 +135,6 @@ export default { ...@@ -135,7 +135,6 @@ export default {
}, },
// 时间选择tab切换 // 时间选择tab切换
selectDatetime(item) { selectDatetime(item) {
console.log(item)
this.tabIndex = item.index this.tabIndex = item.index
}, },
// 选择日期 // 选择日期
......
<template> <template>
<div> <div>
<van-action-sheet v-model:show="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="popup-card">
<div class="name-title"> <div class="name-title">
<div class="name-title-text">{{ customerList.customerName }}</div> <div class="name-title-text">{{ customerList.customerName }}</div>
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
</div> </div>
<div class="customer-info-item"> <div class="customer-info-item">
<div class="customer-info-item-title">车系</div> <div class="customer-info-item-title">车系</div>
<div class="customer-info-item-content">{{ customerList.cars.length > 0 && customerList.cars[0].carSeries }}</div> <div class="customer-info-item-content">{{ customerList.cars&&customerList.cars.length > 0 && customerList.cars[0].carSeries }}</div>
</div> </div>
<div class="customer-info-item"> <div class="customer-info-item">
<div class="customer-info-item-title">车牌号码</div> <div class="customer-info-item-title">车牌号码</div>
<div class="customer-info-item-content">{{ customerList.cars.length > 0 && customerList.cars[0].carNumber }}</div> <div class="customer-info-item-content">{{ customerList.cars&&customerList.cars.length > 0 && customerList.cars[0].carNumber }}</div>
</div> </div>
<div class="customer-info-item"> <div class="customer-info-item">
<div class="customer-info-item-title">购车日期</div> <div class="customer-info-item-title">购车日期</div>
<div class="customer-info-item-content">{{ customerList.cars.length > 0 && customerList.cars[0].carBuyDate }}</div> <div class="customer-info-item-content">{{ customerList.cars&&customerList.cars.length > 0 && customerList.cars[0].carBuyDate }}</div>
</div> </div>
<div class="customer-info-item"> <div class="customer-info-item">
<div class="customer-info-item-title">最近保养</div> <div class="customer-info-item-title">最近保养</div>
<div class="customer-info-item-content">{{ maintennceList.length > 0 && maintennceList[0].maDate }}</div> <div class="customer-info-item-content">{{customerList.cars&& maintennceList.length > 0 && maintennceList[0].maDate }}</div>
</div> </div>
<div class="customer-info-item"> <div class="customer-info-item">
<div class="customer-info-item-title">人群分组</div> <div class="customer-info-item-title">人群分组</div>
......
...@@ -18,9 +18,9 @@ export default { ...@@ -18,9 +18,9 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.custom-image { // .custom-image {
// padding-top: 79px; // // padding-top: 79px;
} // }
.custom-image /deep/ .van-empty__image { .custom-image /deep/ .van-empty__image {
width: 88px; width: 88px;
......
<template> <template>
<div class="select-tab flex" v-if="data.length > 0"> <div class="select-tab flex" v-if="data.length > 0">
<template v-for="(i, index) in data"> <template v-for="(i) in data">
<div @click="click(index)" :class="['item', tabIndex == index ? 'active' : '']" :key="index">{{ i }}</div> <div @click="click(i)" :class="['item', tabIndex == i.value ? 'active' : '']" :key="i.value">{{ i.text }}</div>
</template> </template>
</div> </div>
</template> </template>
...@@ -40,9 +40,9 @@ export default { ...@@ -40,9 +40,9 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
click (tabIndex) { click (data) {
this.tabIndex = tabIndex this.tabIndex = data.value
this.$emit('change', tabIndex) this.$emit('change', this.tabIndex)
} }
} }
} }
......
...@@ -127,7 +127,7 @@ const actions = { ...@@ -127,7 +127,7 @@ const actions = {
} }
}, },
navigation({ dispatch }) { navigation({ dispatch }) {
let { sessionId, corpId ,id} = getParams() let { sessionId, corpId, id, activityId } = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId') const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId if (!corpId) corpId = storage_corpId && storage_corpId.corpId
if (corpId && storage_corpId) { if (corpId && storage_corpId) {
...@@ -137,6 +137,7 @@ const actions = { ...@@ -137,6 +137,7 @@ const actions = {
} }
} }
util.setLocalStorage('dj_scrm_corpId', { corpId }) util.setLocalStorage('dj_scrm_corpId', { corpId })
if (activityId) util.setLocalStorage('dj_scrm_activityId', activityId)
if (id) util.setLocalStorage('dj_scrm_id', { id }) if (id) util.setLocalStorage('dj_scrm_id', { id })
const storage_sessionId = util.getSessionId() const storage_sessionId = util.getSessionId()
if (sessionId || storage_sessionId) { if (sessionId || storage_sessionId) {
......
import {solicitApi} from '@/api' import { solicitApi } from '@/api'
import { util } from 'utils' import { util } from 'utils'
import { Notify } from 'vant'
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
currentIndex: 0, currentIndex: 0,
follewIndex: 0, follewIndex: 0,
activityId: util.getLocalStorage('dj_scrm_activityId') ? util.getLocalStorage('dj_scrm_activityId') :3, activityId: util.getLocalStorage('dj_scrm_activityId') ? util.getLocalStorage('dj_scrm_activityId') : '',
staffId: util.getLocalStorage('dj_STAFF_ID') ? util.getLocalStorage('dj_STAFF_ID') :363, staffId: util.getLocalStorage('dj_scrm_staffId') ? util.getLocalStorage('dj_scrm_staffId') : '',
followResultList: util.getLocalStorage('followResultList') ? util.getLocalStorage('followResultList') :[], followResultList: util.getLocalStorage('followResultList') ? JSON.parse(util.getLocalStorage('followResultList')) : [],
customerInfoList: [] customerInfoList: []
}, },
mutations: { mutations: {
...@@ -19,24 +20,26 @@ export default { ...@@ -19,24 +20,26 @@ export default {
}, },
['SET_STAFF_ID'](state, payload) { ['SET_STAFF_ID'](state, payload) {
state.staffId = payload.staffId state.staffId = payload.staffId
util.setLocalStorage('dj_scrm_staffId', payload.staffId)
}, },
['SET_COUSTOMER_LIST'](state, payload) { ['SET_COUSTOMER_LIST'](state, payload) {
state.customerInfoList = payload.customerInfoList state.customerInfoList = payload.customerInfoList
}, },
['SET_FOLLOE_RESULT_LIST'](state,payload){ ['SET_FOLLOE_RESULT_LIST'](state, payload) {
state.followResultList = payload.followResultList state.followResultList = payload.followResultList
sessionStorage.setItem('followResultList', JSON.stringify(payload.followResultList)) util.setLocalStorage('followResultList', JSON.stringify(payload.followResultList))
},
['SET_ACTIVITY_ID'](state, payload) {
state.activityId = payload.activityId
util.setLocalStorage('dj_scrm_activityId', payload.activityId)
} }
}, },
actions: { actions: {
//设置staffId //设置staffId
getStaffId(conText, payload) { getStaffId(conText, payload) {
// conText.commit('SET_STAFF_ID', { staffId: 3 })
solicitApi.getStaffid(payload).then(res => { solicitApi.getStaffid(payload).then(res => {
if (res.code == 0) { if (res.code == 0) {
conText.commit('SET_STAFF_ID', { staffId: res.data }) conText.commit('SET_STAFF_ID', { staffId: res.data })
util.setLocalStorage('dj_STAFF_ID',res.data)
if (payload.success) { if (payload.success) {
payload.success() payload.success()
} }
...@@ -46,7 +49,7 @@ export default { ...@@ -46,7 +49,7 @@ export default {
// 获取跟进结果字典数据 // 获取跟进结果字典数据
getFollowDataList(conText, payload) { getFollowDataList(conText, payload) {
var params = { var params = {
dictType:'follow_result' dictType: 'follow_result'
} }
solicitApi.followFindAllDictData(params).then(res => { solicitApi.followFindAllDictData(params).then(res => {
conText.commit('SET_FOLLOE_RESULT_LIST', { followResultList: res.data }) conText.commit('SET_FOLLOE_RESULT_LIST', { followResultList: res.data })
...@@ -54,7 +57,7 @@ export default { ...@@ -54,7 +57,7 @@ export default {
}, },
// 获取跟进总数和结果总数 // 获取跟进总数和结果总数
getTaskOverviewData(conText, payload) { getTaskOverviewData(conText, payload) {
console.log('------这里', ) console.log('------这里')
let params = { let params = {
activityId: conText.state.activityId, activityId: conText.state.activityId,
staffId: conText.state.staffId staffId: conText.state.staffId
...@@ -69,6 +72,18 @@ export default { ...@@ -69,6 +72,18 @@ export default {
Notify(message) Notify(message)
} }
}) })
},
findActivityIdByUUID(conText, payload) {
solicitApi.findActivityIdByUUID(payload).then(res => {
if (res.code == 0) {
conText.commit('SET_ACTIVITY_ID', { activityId: res.data })
if (payload.success) {
payload.success(res.data)
}
} else {
Notify(res.message)
}
})
} }
} }
} }
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
data() { data() {
return { return {
chart: null, chart: null,
// tickInterval: 5, tickInterval: 5,
chartColor: this.color, chartColor: this.color,
refId: this.id refId: this.id
} }
...@@ -28,6 +28,18 @@ export default { ...@@ -28,6 +28,18 @@ export default {
id: { id: {
type: String, type: String,
default: () => '' default: () => ''
},
lineData: {
type: Array,
default: () => []
}
},
watch: {
lineData: {
handler() {
this.initCanvas()
},
deep: true
} }
}, },
mounted() { mounted() {
...@@ -39,349 +51,8 @@ export default { ...@@ -39,349 +51,8 @@ export default {
// offsetY = document.getElementById(id).height * 0.4 // offsetY = document.getElementById(id).height * 0.4
// await this.dynamicTick() //动态生成各个标度点的间距 // await this.dynamicTick() //动态生成各个标度点的间距
// id = this.refId // id = this.refId
const data = [ console.log(this.lineData, 8)
{ const data = this.lineData
value: 63.4,
city: 'New York',
date: '2011-10-01'
},
{
value: 72.2,
city: 'Austin',
date: '2011-10-01'
},
{
value: 58,
city: 'New York',
date: '2011-10-02'
},
{
value: 67.7,
city: 'Austin',
date: '2011-10-02'
},
{
value: 53.3,
city: 'New York',
date: '2011-10-03'
},
{
value: 69.4,
city: 'Austin',
date: '2011-10-03'
},
{
value: 55.7,
city: 'New York',
date: '2011-10-04'
},
{
value: 68,
city: 'Austin',
date: '2011-10-04'
},
{
value: 64.2,
city: 'New York',
date: '2011-10-05'
},
{
value: 72.4,
city: 'Austin',
date: '2011-10-05'
},
{
value: 58.8,
city: 'New York',
date: '2011-10-06'
},
{
value: 77,
city: 'Austin',
date: '2011-10-06'
},
{
value: 57.9,
city: 'New York',
date: '2011-10-07'
},
{
value: 82.3,
city: 'Austin',
date: '2011-10-07'
},
{
value: 61.8,
city: 'New York',
date: '2011-10-08'
},
{
value: 78.9,
city: 'Austin',
date: '2011-10-08'
},
{
value: 69.3,
city: 'New York',
date: '2011-10-09'
},
{
value: 68.8,
city: 'Austin',
date: '2011-10-09'
},
{
value: 71.2,
city: 'New York',
date: '2011-10-10'
},
{
value: 68.7,
city: 'Austin',
date: '2011-10-10'
},
{
value: 68.7,
city: 'New York',
date: '2011-10-11'
},
{
value: 70.3,
city: 'Austin',
date: '2011-10-11'
},
{
value: 61.8,
city: 'New York',
date: '2011-10-12'
},
{
value: 75.3,
city: 'Austin',
date: '2011-10-12'
},
{
value: 63,
city: 'New York',
date: '2011-10-13'
},
{
value: 76.6,
city: 'Austin',
date: '2011-10-13'
},
{
value: 66.9,
city: 'New York',
date: '2011-10-14'
},
{
value: 66.6,
city: 'Austin',
date: '2011-10-14'
},
{
value: 61.7,
city: 'New York',
date: '2011-10-15'
},
{
value: 68,
city: 'Austin',
date: '2011-10-15'
},
{
value: 61.8,
city: 'New York',
date: '2011-10-16'
},
{
value: 70.6,
city: 'Austin',
date: '2011-10-16'
},
{
value: 62.8,
city: 'New York',
date: '2011-10-17'
},
{
value: 71.1,
city: 'Austin',
date: '2011-10-17'
},
{
value: 60.8,
city: 'New York',
date: '2011-10-18'
},
{
value: 70,
city: 'Austin',
date: '2011-10-18'
},
{
value: 62.1,
city: 'New York',
date: '2011-10-19'
},
{
value: 61.6,
city: 'Austin',
date: '2011-10-19'
},
{
value: 65.1,
city: 'New York',
date: '2011-10-20'
},
{
value: 57.4,
city: 'Austin',
date: '2011-10-20'
},
{
value: 55.6,
city: 'New York',
date: '2011-10-21'
},
{
value: 64.3,
city: 'Austin',
date: '2011-10-21'
},
{
value: 54.4,
city: 'New York',
date: '2011-10-22'
},
{
value: 72.4,
city: 'Austin',
date: '2011-10-22'
},
{
value: 54.4,
city: 'New York',
date: '2011-10-23'
},
{
value: 72.4,
city: 'Austin',
date: '2011-10-23'
},
{
value: 54.8,
city: 'New York',
date: '2011-10-24'
},
{
value: 72.5,
city: 'Austin',
date: '2011-10-24'
},
{
value: 57.9,
city: 'New York',
date: '2011-10-25'
},
{
value: 72.7,
city: 'Austin',
date: '2011-10-25'
},
{
value: 54.6,
city: 'New York',
date: '2011-10-26'
},
{
value: 73.4,
city: 'Austin',
date: '2011-10-26'
},
{
value: 54.4,
city: 'New York',
date: '2011-10-27'
},
{
value: 70.7,
city: 'Austin',
date: '2011-10-27'
},
{
value: 42.5,
city: 'New York',
date: '2011-10-28'
},
{
value: 56.8,
city: 'Austin',
date: '2011-10-28'
},
{
value: 40.9,
city: 'New York',
date: '2011-10-29'
},
{
value: 51,
city: 'Austin',
date: '2011-10-29'
},
{
value: 38.6,
city: 'New York',
date: '2011-10-30'
},
{
value: 54.9,
city: 'Austin',
date: '2011-10-30'
},
{
value: 44.2,
city: 'New York',
date: '2011-10-31'
},
{
value: 58.8,
city: 'Austin',
date: '2011-10-31'
},
{
value: 49.6,
city: 'New York',
date: '2011-11-01'
},
{
value: 62.6,
city: 'Austin',
date: '2011-11-01'
},
{
value: 47.2,
city: 'New York',
date: '2011-11-02'
},
{
value: 71,
city: 'Austin',
date: '2011-11-02'
}
]
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({
...@@ -398,8 +69,8 @@ export default { ...@@ -398,8 +69,8 @@ export default {
}, },
value: { value: {
type: 'linear', type: 'linear',
nice: true nice: true,
// tickInterval: this.tickInterval tickInterval: this.tickInterval
} }
}) })
this.chart.axis('date', { this.chart.axis('date', {
...@@ -424,8 +95,8 @@ export default { ...@@ -424,8 +95,8 @@ export default {
// let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/ // let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/
// const time = currentData.origin.date.replace(reg, '$1年$2月$3日') // const time = currentData.origin.date.replace(reg, '$1年$2月$3日')
tooltipEl.innerHTML = `<div class="time">${currentData.origin.date}</div> tooltipEl.innerHTML = `<div class="time">${currentData.origin.date}</div>
<div class="item flex"><span class="arc" style="color:#3975C6;">●</span>新增企微客户:${ev.items[0].value}</div> <div class="item flex"><span class="arc" style="color:#3975C6;">●</span>预约到店:${ev.items[0].value}</div>
<div class="item flex"><span class="arc" style="color:#FA7C0B;">●</span>新增客户:${ev.items[1].value}</div>` <div class="item flex"><span class="arc" style="color:#FA7C0B;">●</span>实际到店:${ev.items[1].value}</div>`
tooltipEl.style.opacity = 1 tooltipEl.style.opacity = 1
tooltipEl.style.left = currentData.x - 140 / 2 + 'px' tooltipEl.style.left = currentData.x - 140 / 2 + 'px'
tooltipEl.style.top = currentData.y - 45 - 15 + 'px' tooltipEl.style.top = currentData.y - 45 - 15 + 'px'
...@@ -434,7 +105,7 @@ export default { ...@@ -434,7 +105,7 @@ export default {
tooltipEl.style.opacity = 0 tooltipEl.style.opacity = 0
} }
}) })
this.chart.line().position('date*value').shape('smooth').color('city', ['#3975C6', '#FA7C0B']) this.chart.line().position('date*value').shape('smooth').color('type', ['#3975C6', '#FA7C0B'])
this.chart.legend(false) this.chart.legend(false)
this.chart.render() this.chart.render()
}, },
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
import { mapState, mapMutations, mapActions } from 'vuex' import { mapState, mapMutations, mapActions } from 'vuex'
import { solicitApi } from '@/api' import { solicitApi } from '@/api'
import { Toast } from 'vant' import { Toast } from 'vant'
import { Notify } from 'vant'
export default { export default {
data() { data() {
return { return {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { solicitApi } from '@/api' import { solicitApi } from '@/api'
import { Notify } from 'vant'
export default { export default {
data() { data() {
return { return {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</template> </template>
<script> <script>
import { solicitApi } from '@/api' import { solicitApi } from '@/api'
import { Toast } from 'vant' import { Toast,Notify} from 'vant'
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
export default { export default {
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<div class="title-info">客户招揽概况</div> <div class="title-info">客户招揽概况</div>
<div class="overview-content"> <div class="overview-content">
<template v-if="chart.pieData.length > 0"> <template v-if="chart.pieData.length > 0">
<pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData"> <pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData"></pieChart>
</pieChart>
</template> </template>
<template v-else> <template v-else>
<empty></empty> <empty></empty>
...@@ -49,6 +48,7 @@ import pieChart from '../solicit/components/pie.vue' ...@@ -49,6 +48,7 @@ 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' import { solicitApi } from '@/api'
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
import { Notify } from 'vant'
export default { export default {
components: { components: {
pieChart, pieChart,
...@@ -58,6 +58,7 @@ export default { ...@@ -58,6 +58,7 @@ export default {
return { return {
flag: true, flag: true,
bulletinList: [], bulletinList: [],
activityId: '',
chart: { chart: {
pieColor: ['#3975C6', '#E6E7EB'], pieColor: ['#3975C6', '#E6E7EB'],
pieData: [], pieData: [],
...@@ -102,14 +103,18 @@ export default { ...@@ -102,14 +103,18 @@ export default {
} }
} }
}, },
computed: {
...mapState({
activityId: state => state.solicit.activityId,
staffId: state => state.solicit.staffId
})
},
created() { created() {
this.bulletinList = this.$constants.BULLETINLIST this.bulletinList = this.$constants.BULLETINLIST
let { taskId } = this.getQuery()
if (taskId) {
this.findActivityIdByUUID({
uuid: taskId,
success: res => {
this.activityId = res
}
})
}
if (!taskId) this.activityId = window.localStorage.getItem('dj_scrm_activityId') ? window.localStorage.getItem('dj_scrm_activityId') : ''
this.getStaffId({ this.getStaffId({
success: res => { success: res => {
this.getTaskOverviewData() this.getTaskOverviewData()
...@@ -118,20 +123,18 @@ export default { ...@@ -118,20 +123,18 @@ export default {
}, },
computed: { computed: {
...mapState({ ...mapState({
activityId: state => state.solicit.activityId,
staffId: state => state.solicit.staffId staffId: state => state.solicit.staffId
}) })
}, },
methods: { methods: {
...mapActions({ ...mapActions({
getStaffId: 'solicit/getStaffId' getStaffId: 'solicit/getStaffId',
findActivityIdByUUID: 'solicit/findActivityIdByUUID'
}), }),
getTaskOverviewData() { getTaskOverviewData() {
let params = { let params = {
// activityId: this.activityId, activityId: this.activityId,
activityId: 1, staffId: this.staffId
// staffId: this.staffId
staffId: 334
} }
this.showLoading() this.showLoading()
solicitApi.taskOverviewData(params).then(({ code, data, message }) => { solicitApi.taskOverviewData(params).then(({ code, data, message }) => {
...@@ -197,7 +200,7 @@ export default { ...@@ -197,7 +200,7 @@ export default {
.bulletin { .bulletin {
height: 236px; height: 236px;
padding: 8px 0 16px 0; padding: 16px 0;
box-sizing: border-box; box-sizing: border-box;
flex-wrap: wrap; flex-wrap: wrap;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<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">{{ status.value(deliveredData) }}</span> <span class="font-16 color-3 m-l-8 bold">{{ status.value(deliveredData) }}</span>
<span class="font-10 color39 m-l-4 fw5">({{ parseInt((Number(status.value(deliveredData)) / Number(status.proportion(deliveredData))) * 100) }}%)</span> <span class="font-10 color39 m-l-4 fw5">({{ Number(status.proportion(deliveredData)) == 0 ? '0' : parseInt((Number(status.value(deliveredData)) / Number(status.proportion(deliveredData))) * 100) }}%)</span>
</div> </div>
</template> </template>
</div> </div>
...@@ -51,7 +51,21 @@ export default { ...@@ -51,7 +51,21 @@ export default {
tabIndex: 0, tabIndex: 0,
alreadyIndex: 0, alreadyIndex: 0,
deliveredNum: 0, deliveredNum: 0,
selectBarList: ['已送达', '已查看', '已领取', '已到店'], selectBarList: [
{
text: '已送达',
value: 0
},
{ text: '已查看', value: 1 },
{
text: '已领取',
value: 2
},
{
text: '已到店',
value: 3
}
],
// 未送达客户列表 // 未送达客户列表
customerInfo1: [], customerInfo1: [],
// 已送达客户列表 // 已送达客户列表
...@@ -152,6 +166,10 @@ export default { ...@@ -152,6 +166,10 @@ export default {
} }
solicitApi.getCustomerList(params).then(({ code, data, message }) => { solicitApi.getCustomerList(params).then(({ code, data, message }) => {
if (code == 0) { if (code == 0) {
data.map(item => {
item.solicitTime = item.solicitTime ? item.solicitTime.slice(0, 10) : item.solicitTime
item.updatedTime = item.updatedTime ? item.updatedTime.slice(0, 10) : item.updatedTime
})
this[target[index]] = data this[target[index]] = data
} else { } else {
Notify(message) Notify(message)
......
...@@ -143,20 +143,20 @@ export default { ...@@ -143,20 +143,20 @@ export default {
return { return {
date: item.dailyDate, date: item.dailyDate,
value: item.times, value: item.times,
city: '1' type: '预约到店'
} }
}) })
const successDaily = successDailyCharts.map((item, index) => { const successDaily = successDailyCharts.map((item, index) => {
return { return {
date: item.dailyDate, date: item.dailyDate,
value: item.times, value: item.times,
city: '2' type: '实际到店'
} }
}) })
this.lineData = [...appointmentDaily, ...successDaily] this.lineData = [...appointmentDaily, ...successDaily]
} }
if (followResultsAnalyzeVos) { if (followResultsAnalyzeVos) {
const followResultList = JSON.parse(sessionStorage.getItem('followResultList')) const followResultList = window.localStorage.getItem('followResultList')?JSON.parse(window.localStorage.getItem('followResultList')):[]
this.reasonBar = followResultsAnalyzeVos.map(item => { this.reasonBar = followResultsAnalyzeVos.map(item => {
return { value: item.times, text: followResultList.find(follow => follow.dictValue == item.followResult).dictLabel } return { value: item.times, text: followResultList.find(follow => follow.dictValue == item.followResult).dictLabel }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!