Commit 9fd26bdb by 匡雅琴

触达统计电话营销

1 parent e9b3db57
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
.icon-customer-copy { width: 18px; height: 20px; background-position: -138px -90px;} .icon-customer-copy { width: 18px; height: 20px; background-position: -138px -90px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -102px -96px;} .icon-customer-phone { width: 20px; height: 20px; background-position: -102px -96px;}
.icon-factory { width: 32px; height: 32px; background-position: -42px -54px;} .icon-factory { width: 32px; height: 32px; background-position: -42px -54px;}
.icon-follow { width: 32px; height: 32px; background-position: -96px 0px;} .icon-fail { width: 24px; height: 24px; background-position: -96px -42px;}
.icon-identifier { width: 20px; height: 20px; background-position: -138px 0px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -96px -76px;}
.icon-fllow { width: 18px; height: 18px; background-position: -30px -130px;} .icon-fllow { width: 18px; height: 18px; background-position: -30px -130px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -138px -30px;} .icon-follow { width: 32px; height: 32px; background-position: -96px 0px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -138px 0px;}
.icon-identifier { width: 20px; height: 20px; background-position: -138px -30px;}
.icon-maintant { width: 20px; height: 20px; background-position: -138px -60px;} .icon-maintant { width: 20px; height: 20px; background-position: -138px -60px;}
.icon-message { width: 18px; height: 18px; background-position: -58px -130px;} .icon-message { width: 18px; height: 18px; background-position: -58px -130px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -96px -76px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: 0px -130px;} .icon-sendwechat { width: 20px; height: 18px; background-position: 0px -130px;}
.icon-tel { width: 18px; height: 18px; background-position: -86px -130px;}
.icon-fail { width: 24px; height: 24px; background-position: -96px -42px;}
.icon-succeed { width: 24px; height: 24px; background-position: 0px -96px;}
\ No newline at end of file \ No newline at end of file
.icon-succeed { width: 24px; height: 24px; background-position: 0px -96px;}
.icon-tel { width: 18px; height: 18px; background-position: -86px -130px;}
\ No newline at end of file \ No newline at end of file

36.2 KB | W: | H:

36.1 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<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>
...@@ -42,6 +43,8 @@ ...@@ -42,6 +43,8 @@
<div class="sprite-icon icon-sendwechat" @click="sendWechat(item)"></div> <div class="sprite-icon icon-sendwechat" @click="sendWechat(item)"></div>
</div> </div>
</div> </div>
<!-- 电话营销弹窗 -->
<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"></customer-follow-popup>
<!-- 客户信息弹窗 --> <!-- 客户信息弹窗 -->
...@@ -67,15 +70,27 @@ export default { ...@@ -67,15 +70,27 @@ export default {
}, },
data() { data() {
return { return {
// 电话营销弹窗
show: false,
actions: [{ name: '呼叫' }, { name: '复制' }],
chatParams: { chatParams: {
externalUserIds: [], externalUserIds: [],
groupName: '', groupName: '',
userIds: [], userIds: [],
chatId: '' chatId: ''
} },
telNumber: null
} }
}, },
mounted() {
// this.initWx()
},
methods: { methods: {
//初始化微信接口
initWx() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData', 'makePhoneCall']).then(() => {})
},
changeTab(index) { changeTab(index) {
console.log(index) console.log(index)
this.isShow = false this.isShow = false
...@@ -85,12 +100,30 @@ export default { ...@@ -85,12 +100,30 @@ export default {
}, },
// 电话招揽 // 电话招揽
callCustomer(val) { callCustomer(val) {
console.log(val) // console.log(val)
if (!val.telNumber) { if (!val.telNumber) {
Toast('系统尚未查询到该用户的电话号码') Toast('系统尚未查询到该用户的电话号码')
return return
} }
window.location.href = 'tel://' + val.telNumber this.telNumber = val.telNumber
// 打开电话营销弹窗
this.show = true
},
// 选择电话营销方式
onSelect(e) {
console.log(e)
// 呼叫
if (e.name === '呼叫') {
// window.location.href = 'tel://' + this.telNumber
this.makePhoneCall(this.telNumber)
return
}
// 复制
this.setClipboardData(this.telNumber)
},
// 电话招揽弹窗关闭
onCancel() {
this.show = false
}, },
// 招揽跟进 // 招揽跟进
followCustomer(val) { followCustomer(val) {
......
...@@ -42,44 +42,50 @@ ...@@ -42,44 +42,50 @@
<!-- 维保记录 --> <!-- 维保记录 -->
<div class="customer-message"> <div class="customer-message">
<div class="customer-info-title">维保记录</div> <div class="customer-info-title">维保记录</div>
<div class="stepItem" v-for="(item, index) in maintennceList" :key="index"> <template v-if="maintennceList.length">
<div class="sprite-icon icon-maintant"></div> <div class="stepItem" v-for="(item, index) in maintennceList" :key="index">
<div class="stepBox"> <div class="sprite-icon icon-maintant"></div>
<div class="stepBox-left"> <div class="stepBox">
<div class="stepBox-left-name">{{ item.name }}</div> <div class="stepBox-left">
<div class="stepBox-left-title"> <div class="stepBox-left-name">{{ item.name }}</div>
费用: <div class="stepBox-left-title">
<span class="stepBox-left-content">{{ item.price }}</span> 费用:
</div> <span class="stepBox-left-content">{{ item.price }}</span>
<div class="stepBox-left-title"> </div>
跟进人: <div class="stepBox-left-title">
<span class="stepBox-left-content">{{ item.followStaff }}</span> 跟进人:
<span class="stepBox-left-content">{{ item.followStaff }}</span>
</div>
</div> </div>
<div class="stepBox-right">{{ item.date }}</div>
</div> </div>
<div class="stepBox-right">{{ item.date }}</div>
</div> </div>
</div> </template>
<div v-else class="no-data">暂无数据</div>
</div> </div>
<!-- 跟进记录 --> <!-- 跟进记录 -->
<div class="record"> <div class="record">
<div class="customer-info-title">跟进记录</div> <div class="customer-info-title">跟进记录</div>
<div class="stepItem" v-for="(item, index) in recordList" :key="index"> <template v-if="recordList.length">
<div class="sprite-icon icon-followRecord"></div> <div class="stepItem" v-for="(item, index) in recordList" :key="index">
<div class="stepBox"> <div class="sprite-icon icon-followRecord"></div>
<div class="stepBox-left"> <div class="stepBox">
<div class="stepBox-left-name">{{ item.name }}</div> <div class="stepBox-left">
<div class="stepBox-left-title"> <div class="stepBox-left-name">{{ item.name }}</div>
预约时间: <div class="stepBox-left-title">
<span class="stepBox-left-content">{{ item.recordDate ? item.recordDate : '-' }}</span> 预约时间:
</div> <span class="stepBox-left-content">{{ item.recordDate ? item.recordDate : '-' }}</span>
<div class="stepBox-left-title"> </div>
备注: <div class="stepBox-left-title">
<span class="stepBox-left-content">{{ item.tips ? item.tips : '-' }}</span> 备注:
<span class="stepBox-left-content">{{ item.tips ? item.tips : '-' }}</span>
</div>
</div> </div>
<div class="stepBox-right">{{ item.date }}</div>
</div> </div>
<div class="stepBox-right">{{ item.date }}</div>
</div> </div>
</div> </template>
<div v-else class="no-data">暂无数据</div>
</div> </div>
</div> </div>
</van-action-sheet> </van-action-sheet>
...@@ -135,18 +141,18 @@ export default { ...@@ -135,18 +141,18 @@ export default {
}, },
// 维保记录表 // 维保记录表
maintennceList: [ maintennceList: [
{ // {
name: '保养项目A', // name: '保养项目A',
price: '240元', // price: '240元',
followStaff: '续梅厄米', // followStaff: '续梅厄米',
date: '05-28 16:00' // date: '05-28 16:00'
}, // },
{ // {
name: '保养项目B', // name: '保养项目B',
price: '240元', // price: '240元',
followStaff: '续梅厄米', // followStaff: '续梅厄米',
date: '05-28 16:00' // date: '05-28 16:00'
} // }
], ],
// 跟进记录表 // 跟进记录表
recordList: [ recordList: [
...@@ -276,6 +282,16 @@ export default { ...@@ -276,6 +282,16 @@ export default {
color: #999999; color: #999999;
line-height: 18px; line-height: 18px;
} }
.no-data {
height: 50px;
width: 100%;
text-align: center;
line-height: 50px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
/deep/ .van-action-sheet { /deep/ .van-action-sheet {
max-height: 100%; max-height: 100%;
} }
......
import Vue from 'vue' import Vue from 'vue'
import { import { Toast, Dialog } from 'vant'
Toast,
Dialog
} from 'vant'
/** /**
* 日期格式化 * 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss') * let time = new Date().format('yyyy-MM-dd hh:mm:ss')
*/ */
Date.prototype.format = function(fmt) { Date.prototype.format = function (fmt) {
let o = { let o = {
'M+': this.getMonth() + 1, //月份 'M+': this.getMonth() + 1, //月份
'd+': this.getDate(), //日 'd+': this.getDate(), //日
'h+': this.getHours(), //小时 'h+': this.getHours(), //小时
'm+': this.getMinutes(), //分 'm+': this.getMinutes(), //分
's+': this.getSeconds(), //秒 's+': this.getSeconds(), //秒
//季度 //季度
'q+': Math.floor((this.getMonth() + 3) / 3), 'q+': Math.floor((this.getMonth() + 3) / 3),
'S': this.getMilliseconds() //毫秒 S: this.getMilliseconds() //毫秒
}; }
if (/(y+)/.test(fmt)) { if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
} }
for (let k in o) { for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) { if (new RegExp(`(${k})`).test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
} }
} }
return fmt return fmt
} }
const throttle = (fn, gapTime) => { const throttle = (fn, gapTime) => {
if (gapTime == null || gapTime == undefined) { if (gapTime == null || gapTime == undefined) {
gapTime = 1500 gapTime = 1500
} }
let _lastTime = null let _lastTime = null
return function() { return function () {
let _nowTime = +new Date() let _nowTime = +new Date()
if (_nowTime - _lastTime > gapTime || !_lastTime) { if (_nowTime - _lastTime > gapTime || !_lastTime) {
fn.apply(this, arguments) fn.apply(this, arguments)
_lastTime = _nowTime _lastTime = _nowTime
}
} }
} }
/**防止重复点击 */ }
/**防止重复点击 */
const showLoading = (title = '加载中...') => { const showLoading = (title = '加载中...') => {
Toast({ Toast({
type: 'loading', type: 'loading',
...@@ -52,27 +49,27 @@ const showLoading = (title = '加载中...') => { ...@@ -52,27 +49,27 @@ const showLoading = (title = '加载中...') => {
}) })
} }
const hideLoading = () => { const hideLoading = () => {
Toast.clear() Toast.clear()
} }
/**num:要转换的数值,fixed:精确几位小数 */ /**num:要转换的数值,fixed:精确几位小数 */
const decimal = (num, fixed) => { const decimal = (num, fixed) => {
let pow = Math.pow(10, fixed) let pow = Math.pow(10, fixed)
return Math.round(num * pow) / pow return Math.round(num * pow) / pow
} }
const showToast = (message = '', callBack) => { const showToast = (message = '', callBack) => {
let params = { let params = {
message, message,
forbidClick: true, forbidClick: true,
duration: 1500 duration: 1500
} }
Toast(params) Toast(params)
if (callBack && typeof callBack == 'function') { if (callBack && typeof callBack == 'function') {
setTimeout(() => { setTimeout(() => {
callBack() callBack()
}, 1500) }, 1500)
}
} }
/**触摸样式 */ }
/**触摸样式 */
const touchstart = e => { const touchstart = e => {
e.target.classList.add('btn-on-leave') e.target.classList.add('btn-on-leave')
} }
...@@ -98,28 +95,28 @@ const removeLocalStorage = key => { ...@@ -98,28 +95,28 @@ const removeLocalStorage = key => {
window.localStorage.removeItem(key) window.localStorage.removeItem(key)
} }
const dialog = (params = {}) => { const dialog = (params = {}) => {
if (!params.confirmButtonColor) params.confirmButtonColor = '#FF7336' if (!params.confirmButtonColor) params.confirmButtonColor = '#FF7336'
return Dialog.confirm(params) return Dialog.confirm(params)
} }
/**拨打电话 */ /**拨打电话 */
const makePhoneCall = phoneNumber => { const makePhoneCall = phoneNumber => {
window.location.href = `tel://${phoneNumber}` window.location.href = `tel://${phoneNumber}`
} }
/**是否全面屏 */ /**是否全面屏 */
const isFullSucreen = () => { const isFullSucreen = () => {
let result = false; let result = false
const rate = window.screen.height / window.screen.width const rate = window.screen.height / window.screen.width
let limit = window.screen.height == window.screen.availHeight ? 1.8 : 1.65 // 临界判断值 let limit = window.screen.height == window.screen.availHeight ? 1.8 : 1.65 // 临界判断值
result = rate > limit result = rate > limit
return result return result
} }
const jumpChildrenPage = (to, params) => { const jumpChildrenPage = (to, params) => {
let { name } = window.vm._route let { name } = window.vm._route
window.vm.$router.push({ name: `${name}.${to}`, params }) window.vm.$router.push({ name: `${name}.${to}`, params })
} }
/**拷贝 */ /**拷贝 */
const setClipboardData = data => { const setClipboardData = data => {
wx.setClipboardData({ wx.setClipboardData({
data, data,
...@@ -127,8 +124,7 @@ const setClipboardData = data => { ...@@ -127,8 +124,7 @@ const setClipboardData = data => {
console.log(res) console.log(res)
Toast('复制成功') Toast('复制成功')
}, },
fail(res){ fail(res) {}
}
}) })
} }
...@@ -165,7 +161,6 @@ const watchPageBack = () => { ...@@ -165,7 +161,6 @@ const watchPageBack = () => {
resolve() resolve()
} }
}) })
} }
const utils = { const utils = {
removeLocalStorage, removeLocalStorage,
...@@ -196,4 +191,4 @@ const utils = { ...@@ -196,4 +191,4 @@ const utils = {
Object.keys(utils).map(key => { Object.keys(utils).map(key => {
Vue.prototype[key] = utils[key] Vue.prototype[key] = utils[key]
}) })
export default utils
\ No newline at end of file \ No newline at end of file
export default utils
...@@ -3,30 +3,11 @@ ...@@ -3,30 +3,11 @@
<tip :title="title"></tip> <tip :title="title"></tip>
<template v-if="customerList.length > 0"> <template v-if="customerList.length > 0">
<div class="customerList-add"> <div class="customerList-add">
<scroll-view <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
class="content" <div class="customer-add" v-for="(item, index) in customerList" :key="index">
@ReachBottom="onReachBottom" <div class="customer-add-portrait" v-if="tabIndex == 3">
ref="scrollView" <img :src="item.avatar" alt="" v-if="item.avatar" />
> <img src="../../assets/images/user.png" alt="" v-else />
<div
class="customer-add"
v-for="(item, index) in customerList"
:key="index"
>
<div
class="customer-add-portrait"
v-if="tabIndex == 3"
>
<img
:src="item.avatar"
alt=""
v-if="item.avatar"
/>
<img
src="../../assets/images/user.png"
alt=""
v-else
/>
</div> </div>
<div :class="{ 'customer-add-info': true, 'customer-add-all-info': tabIndex === 3 }"> <div :class="{ 'customer-add-info': true, 'customer-add-all-info': tabIndex === 3 }">
<div class="customer-add-info-number">{{ item.customerPhone }}</div> <div class="customer-add-info-number">{{ item.customerPhone }}</div>
...@@ -34,48 +15,30 @@ ...@@ -34,48 +15,30 @@
</div> </div>
<template v-if="item.status == 0"> <template v-if="item.status == 0">
<div class="customer-add-friend flex"> <div class="customer-add-friend flex">
<div <div class="sprite-icon icon-customer-add" @click="addFriend(item)"></div>
class="sprite-icon icon-customer-add"
@click="addFriend(item)"
></div>
<div class="customer-add-friend-text">加好友</div> <div class="customer-add-friend-text">加好友</div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div <div class="customer-add-friend flex" @click="callPhone(item.customerPhone)">
class="customer-add-friend flex"
@click="callPhone(item.customerPhone)"
>
<div class="sprite-icon icon-customer-phone"></div> <div class="sprite-icon icon-customer-phone"></div>
<div class="customer-add-friend-text">拨打电话</div> <div class="customer-add-friend-text">拨打电话</div>
</div> </div>
</template> </template>
<div <div class="customer-add-stay" v-else-if="item.status == 1">待通过</div>
class="customer-add-stay" <div class="customer-add-pass" v-else-if="item.status == 2">已通过</div>
v-else-if="item.status == 1"
>待通过</div>
<div
class="customer-add-pass"
v-else-if="item.status == 2"
>已通过</div>
<div class="buttomLine"></div> <div class="buttomLine"></div>
</div> </div>
</scroll-view> </scroll-view>
</div> </div>
<template v-if="tabIndex == 0 && copywriting != ''"> <template v-if="tabIndex == 0 && copywriting != ''">
<div class="copy-box"> <div class="copy-box">
<div <div class="sprite-icon icon-customer-copy" @click="copy"></div>
class="sprite-icon icon-customer-copy"
@click="copy"
></div>
<div class="title">客户好友申请文案</div> <div class="title">客户好友申请文案</div>
<div>{{ copywriting }}</div> <div>{{ copywriting }}</div>
</div> </div>
</template> </template>
</template> </template>
<empty <empty v-else description="暂无数据" />
v-else
description="暂无数据"
/>
</div> </div>
</template> </template>
<script> <script>
...@@ -266,7 +229,7 @@ export default { ...@@ -266,7 +229,7 @@ export default {
.customer-add-stay { .customer-add-stay {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #3975C6; color: #3975c6;
line-height: 17px; line-height: 17px;
margin-left: 78px; margin-left: 78px;
white-space: nowrap; white-space: nowrap;
...@@ -327,4 +290,4 @@ export default { ...@@ -327,4 +290,4 @@ export default {
height: calc(100vh - 220px) !important; height: calc(100vh - 220px) !important;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -51,7 +51,7 @@ const spritesmithFunction = data => { ...@@ -51,7 +51,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}` return `${shared}\n${perSprite}`
} }
module.exports = { module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-test/', // 署应用包时的基本 URL。 vue-router hash 模式使用 publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-kuangyq/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router hash 模式使用 // publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router hash 模式使用 // publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router history模式使用 // publicPath: '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router history模式使用
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!