Commit 62f1dd4a by 匡雅琴

接口编写

1 parent 9fd26bdb
...@@ -14,13 +14,5 @@ import groupCustomer from './groupCustomer' ...@@ -14,13 +14,5 @@ import groupCustomer from './groupCustomer'
import groupTag from './groupTag' import groupTag from './groupTag'
import entmicroApi from './entmicroApi' import entmicroApi from './entmicroApi'
import detailApi from './detail' import detailApi from './detail'
export {
ssoApi,
groupChat,
wxConfig,
liveBroadcast,
groupCustomer,
groupTag,
entmicroApi,
detailApi
}
\ No newline at end of file \ No newline at end of file
import solicitApi from './solicit'
export { ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi }
const url = '/rop-scrm-marketing/router'
export default {
/**
* 获取跟进结果字典 */
followFindAllDictData(data) {
data.method = 'merchants.api.menu.findAllDictData'
return window.$HTTP({
url: 'rop-merchants/router',
data,
returnAll: true
})
},
// 获取送达、未送达列表
getCustomerList(data) {
data.method = 'marketing.api.solicit.page.customer.condition'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 获取客户详情
getCustomerDetail(data) {
data.method = 'marketing.api.solicit.customer.detail'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 招揽跟进记录保存
sendSolicitRecord(data) {
data.method = 'marketing.api.solicit.record.save'
return window.$HTTP({
url,
data,
returnAll: true
})
}
}
<template> <template>
<div> <div>
<textarea style="display: none" id="text">{{ telNumber }}</textarea>
<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.carNumber }}</div> <div class="customer-carnumber">{{ item.SolicitCarResponse.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.carBrand }}</div> <div class="customer-info-message">{{ item.SolicitCarResponse.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>
<div class="customer-info-message">{{ item.result }}</div> <div class="customer-info-message">{{ item.followResult }}</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.wechatMarketing }}</div> <div class="customer-info-message">{{ item.checkStatus }}</div>
</div> </div>
</div> </div>
<div class="customer-info-right"> <div class="customer-info-right">
<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 customer-info-wechat">@{{ item.joinWechat }}</div> <div v-if="item.wechatnick">
<span class="customer-info-message">{{ item.wechatnick }}</span>
<span class="customer-info-wechat customer-info-message" v-if="item.type == 1">@微信</span>
<span class="customer-info-qiwechat customer-info-message" v-else>@企微</span>
</div>
<div class="customer-info-message" v-else>未添加</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.date }}</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.updateDate }}</div> <div class="customer-info-message">{{ item.updatedTime }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -79,7 +83,7 @@ export default { ...@@ -79,7 +83,7 @@ export default {
userIds: [], userIds: [],
chatId: '' chatId: ''
}, },
telNumber: null phoneNumber: null
} }
}, },
mounted() { mounted() {
...@@ -101,11 +105,11 @@ export default { ...@@ -101,11 +105,11 @@ export default {
// 电话招揽 // 电话招揽
callCustomer(val) { callCustomer(val) {
// console.log(val) // console.log(val)
if (!val.telNumber) { if (!val.phoneNumber) {
Toast('系统尚未查询到该用户的电话号码') Toast('系统尚未查询到该用户的电话号码')
return return
} }
this.telNumber = val.telNumber this.phoneNumber = val.phoneNumber
// 打开电话营销弹窗 // 打开电话营销弹窗
this.show = true this.show = true
}, },
...@@ -115,11 +119,11 @@ export default { ...@@ -115,11 +119,11 @@ export default {
// 呼叫 // 呼叫
if (e.name === '呼叫') { if (e.name === '呼叫') {
// window.location.href = 'tel://' + this.telNumber // window.location.href = 'tel://' + this.telNumber
this.makePhoneCall(this.telNumber) this.makePhoneCall(this.phoneNumber)
return return
} }
// 复制 // 复制
this.setClipboardData(this.telNumber) this.setClipboardData(this.phoneNumber)
}, },
// 电话招揽弹窗关闭 // 电话招揽弹窗关闭
onCancel() { onCancel() {
...@@ -209,4 +213,7 @@ export default { ...@@ -209,4 +213,7 @@ export default {
.customer-info-wechat { .customer-info-wechat {
color: #3975c6; color: #3975c6;
} }
.customer-info-qiwechat {
color: #2cca74;
}
</style> </style>
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
<script> <script>
import { Toast } from 'vant' import { Toast } from 'vant'
import { solicitApi } from '@/api'
export default { export default {
name: 'CustomerFollowPopup', name: 'CustomerFollowPopup',
data() { data() {
...@@ -154,6 +155,16 @@ export default { ...@@ -154,6 +155,16 @@ export default {
// 获取当前时间 // 获取当前时间
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)
})
}, },
// 选择跟进结果 // 选择跟进结果
selectFollow(val) { selectFollow(val) {
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import Empty from '../../components/Empty.vue' 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'
export default { export default {
components: { SelectBar, Empty, ScrollView }, components: { SelectBar, Empty, ScrollView },
data() { data() {
...@@ -35,43 +36,62 @@ export default { ...@@ -35,43 +36,62 @@ export default {
tabIndex: 0, tabIndex: 0,
deliveredNum: 0, deliveredNum: 0,
selectBarList: ['已送达', '已查看', '已领取', '已到店'], selectBarList: ['已送达', '已查看', '已领取', '已到店'],
// 未送达页码
unSendPageParam: {
pagesize: 10,
pageNum: 1
},
// 送达页码
sendPageParam: {
pagesize: 10,
pageNum: 1
},
// 未送达客户列表 // 未送达客户列表
customerInfo1: [ customerInfo1: [
{ {
id: 1, id: 1,
name: '崔美女', name: '崔美女',
carNumber: '粤B 8888', followResult: '未接听',
carBrand: 'BMW X7', 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: '' SolicitCarResponse: {
carSeries: '奔驰 G63',
carNumber: '粤B 6666'
}
}, },
{ {
id: 2, id: 2,
name: '崔美女2', name: '匡先生',
carNumber: '粤B 6666', followResult: '未接听',
carBrand: '奔驰 G63', 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' SolicitCarResponse: {
carSeries: '奔驰 G63',
carNumber: '粤B 6666'
}
}, },
{ {
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' SolicitCarResponse: {
carSeries: '奔驰 G63',
carNumber: '粤B 6666'
}
} }
], ],
// 已送达客户列表 // 已送达客户列表
...@@ -79,43 +99,76 @@ export default { ...@@ -79,43 +99,76 @@ export default {
{ {
id: 1, id: 1,
name: '崔美女', name: '崔美女',
carNumber: '粤B 8888', followResult: '未接听',
carBrand: 'BMW X7', 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: '' SolicitCarResponse: {
carSeries: '奔驰 G63',
carNumber: '粤B 6666'
}
}, },
{ {
id: 2, id: 2,
name: '匡先生', name: '匡先生',
carNumber: '粤B 6666', followResult: '未接听',
carBrand: '奔驰 G63', 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' SolicitCarResponse: {
carSeries: '奔驰 G63',
carNumber: '粤B 6666'
}
}, },
{ {
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: 2,
updateDate: '05-07 15:30', wechatnick: 'BB',
telNumber: '18818188989' SolicitCarResponse: {
carSeries: '奔驰 G63',
carNumber: '粤B 6666'
}
} }
] ]
} }
}, },
mounted() {
// this.getUnSendCustomerList()
// this.getSendCustomerList()
},
methods: { methods: {
// 获取未送达客户信息
getUnSendCustomerList() {
var params = { ...this.unSendPageParam }
// followFlag-跟进状态:0待跟进、1已跟进
params.followFlag = 0
console.log(params)
solicitApi.getCustomerList().then(res => {
console.log(res)
})
},
// 获取送达客户信息
getSendCustomerList() {
var params = { ...this.sendPageParam }
// followFlag-跟进状态:0待跟进、1已跟进
params.followFlag = 1
console.log(params)
solicitApi.getCustomerList().then(res => {
console.log(res)
})
},
// 下拉触底刷新 // 下拉触底刷新
onReachBottom() { onReachBottom() {
console.log('触底') console.log('触底')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!