Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-customer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9fd26bdb
authored
Jun 02, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
触达统计电话营销
1 parent
e9b3db57
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
162 additions
and
155 deletions
src/assets/css/sprite.scss
src/assets/images/sprite.png
src/components/CustomerCard.vue
src/components/CustomerInfoPopup.vue
src/utils/util.js
src/views/customerDetails/add.vue
vue.config.js
src/assets/css/sprite.scss
View file @
9fd26bd
...
...
@@ -9,14 +9,14 @@
.icon-customer-copy
{
width
:
18px
;
height
:
20px
;
background-position
:
-138px
-90px
;}
.icon-customer-phone
{
width
:
20px
;
height
:
20px
;
background-position
:
-102px
-96px
;}
.icon-factory
{
width
:
32px
;
height
:
32px
;
background-position
:
-42px
-54px
;}
.icon-follow
{
width
:
32px
;
height
:
32px
;
background-position
:
-96px
0px
;}
.icon-identifier
{
width
:
20px
;
height
:
20px
;
background-position
:
-138px
0px
;}
.icon-open-arrow
{
width
:
8px
;
height
:
7px
;
background-position
:
-96px
-76px
;}
.icon-fail
{
width
:
24px
;
height
:
24px
;
background-position
:
-96px
-42px
;}
.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-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-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
.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
src/assets/images/sprite.png
View file @
9fd26bd
36.2 KB
|
W:
|
H:
36.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/components/CustomerCard.vue
View file @
9fd26bd
<
template
>
<div>
<textarea
style=
"display: none"
id=
"text"
>
{{
telNumber
}}
</textarea>
<div
class=
"customer-box"
v-for=
"item in customerInfo"
:key=
"item.id"
>
<div
class=
"customer-title"
>
<div
class=
"customer-name"
>
{{
item
.
name
}}
</div>
...
...
@@ -42,6 +43,8 @@
<div
class=
"sprite-icon icon-sendwechat"
@
click=
"sendWechat(item)"
></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>
<!-- 客户信息弹窗 -->
...
...
@@ -67,15 +70,27 @@ export default {
},
data
()
{
return
{
// 电话营销弹窗
show
:
false
,
actions
:
[{
name
:
'呼叫'
},
{
name
:
'复制'
}],
chatParams
:
{
externalUserIds
:
[],
groupName
:
''
,
userIds
:
[],
chatId
:
''
}
},
telNumber
:
null
}
},
mounted
()
{
// this.initWx()
},
methods
:
{
//初始化微信接口
initWx
()
{
window
.
$wx
=
wxConfig
window
.
$wx
.
init
([
'setClipboardData'
,
'makePhoneCall'
]).
then
(()
=>
{})
},
changeTab
(
index
)
{
console
.
log
(
index
)
this
.
isShow
=
false
...
...
@@ -85,12 +100,30 @@ export default {
},
// 电话招揽
callCustomer
(
val
)
{
console
.
log
(
val
)
//
console.log(val)
if
(
!
val
.
telNumber
)
{
Toast
(
'系统尚未查询到该用户的电话号码'
)
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
)
{
...
...
src/components/CustomerInfoPopup.vue
View file @
9fd26bd
...
...
@@ -42,44 +42,50 @@
<!-- 维保记录 -->
<div
class=
"customer-message"
>
<div
class=
"customer-info-title"
>
维保记录
</div>
<div
class=
"stepItem"
v-for=
"(item, index) in maintennceList"
:key=
"index"
>
<div
class=
"sprite-icon icon-maintant"
></div>
<div
class=
"stepBox"
>
<div
class=
"stepBox-left"
>
<div
class=
"stepBox-left-name"
>
{{
item
.
name
}}
</div>
<div
class=
"stepBox-left-title"
>
费用:
<span
class=
"stepBox-left-content"
>
{{
item
.
price
}}
</span>
</div>
<div
class=
"stepBox-left-title"
>
跟进人:
<span
class=
"stepBox-left-content"
>
{{
item
.
followStaff
}}
</span>
<template
v-if=
"maintennceList.length"
>
<div
class=
"stepItem"
v-for=
"(item, index) in maintennceList"
:key=
"index"
>
<div
class=
"sprite-icon icon-maintant"
></div>
<div
class=
"stepBox"
>
<div
class=
"stepBox-left"
>
<div
class=
"stepBox-left-name"
>
{{
item
.
name
}}
</div>
<div
class=
"stepBox-left-title"
>
费用:
<span
class=
"stepBox-left-content"
>
{{
item
.
price
}}
</span>
</div>
<div
class=
"stepBox-left-title"
>
跟进人:
<span
class=
"stepBox-left-content"
>
{{
item
.
followStaff
}}
</span>
</div>
</div>
<div
class=
"stepBox-right"
>
{{
item
.
date
}}
</div>
</div>
<div
class=
"stepBox-right"
>
{{
item
.
date
}}
</div>
</div>
</div>
</
template
>
<div
v-else
class=
"no-data"
>
暂无数据
</div>
</div>
<!-- 跟进记录 -->
<div
class=
"record"
>
<div
class=
"customer-info-title"
>
跟进记录
</div>
<div
class=
"stepItem"
v-for=
"(item, index) in recordList"
:key=
"index"
>
<div
class=
"sprite-icon icon-followRecord"
></div>
<div
class=
"stepBox"
>
<div
class=
"stepBox-left"
>
<div
class=
"stepBox-left-name"
>
{{
item
.
name
}}
</div>
<div
class=
"stepBox-left-title"
>
预约时间:
<span
class=
"stepBox-left-content"
>
{{
item
.
recordDate
?
item
.
recordDate
:
'-'
}}
</span>
</div>
<div
class=
"stepBox-left-title"
>
备注:
<span
class=
"stepBox-left-content"
>
{{
item
.
tips
?
item
.
tips
:
'-'
}}
</span>
<
template
v-if=
"recordList.length"
>
<div
class=
"stepItem"
v-for=
"(item, index) in recordList"
:key=
"index"
>
<div
class=
"sprite-icon icon-followRecord"
></div>
<div
class=
"stepBox"
>
<div
class=
"stepBox-left"
>
<div
class=
"stepBox-left-name"
>
{{
item
.
name
}}
</div>
<div
class=
"stepBox-left-title"
>
预约时间:
<span
class=
"stepBox-left-content"
>
{{
item
.
recordDate
?
item
.
recordDate
:
'-'
}}
</span>
</div>
<div
class=
"stepBox-left-title"
>
备注:
<span
class=
"stepBox-left-content"
>
{{
item
.
tips
?
item
.
tips
:
'-'
}}
</span>
</div>
</div>
<div
class=
"stepBox-right"
>
{{
item
.
date
}}
</div>
</div>
<div
class=
"stepBox-right"
>
{{
item
.
date
}}
</div>
</div>
</div>
</
template
>
<div
v-else
class=
"no-data"
>
暂无数据
</div>
</div>
</div>
</van-action-sheet>
...
...
@@ -135,18 +141,18 @@ export default {
},
// 维保记录表
maintennceList
:
[
{
name
:
'保养项目A'
,
price
:
'240元'
,
followStaff
:
'续梅厄米'
,
date
:
'05-28 16:00'
},
{
name
:
'保养项目B'
,
price
:
'240元'
,
followStaff
:
'续梅厄米'
,
date
:
'05-28 16:00'
}
//
{
//
name: '保养项目A',
//
price: '240元',
//
followStaff: '续梅厄米',
//
date: '05-28 16:00'
//
},
//
{
//
name: '保养项目B',
//
price: '240元',
//
followStaff: '续梅厄米',
//
date: '05-28 16:00'
//
}
],
// 跟进记录表
recordList
:
[
...
...
@@ -276,6 +282,16 @@ export default {
color
:
#999999
;
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
{
max-height
:
100%
;
}
...
...
src/utils/util.js
View file @
9fd26bd
import
Vue
from
'vue'
import
{
Toast
,
Dialog
}
from
'vant'
import
{
Toast
,
Dialog
}
from
'vant'
/**
* 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss')
*/
Date
.
prototype
.
format
=
function
(
fmt
)
{
Date
.
prototype
.
format
=
function
(
fmt
)
{
let
o
=
{
'M+'
:
this
.
getMonth
()
+
1
,
//月份
'd+'
:
this
.
getDate
(),
//日
'h+'
:
this
.
getHours
(),
//小时
'm+'
:
this
.
getMinutes
(),
//分
's+'
:
this
.
getSeconds
(),
//秒
//季度
'M+'
:
this
.
getMonth
()
+
1
,
//月份
'd+'
:
this
.
getDate
(),
//日
'h+'
:
this
.
getHours
(),
//小时
'm+'
:
this
.
getMinutes
(),
//分
's+'
:
this
.
getSeconds
(),
//秒
//季度
'q+'
:
Math
.
floor
((
this
.
getMonth
()
+
3
)
/
3
),
'S'
:
this
.
getMilliseconds
()
//毫秒
}
;
S
:
this
.
getMilliseconds
()
//毫秒
}
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
''
).
substr
(
4
-
RegExp
.
$1
.
length
))
}
for
(
let
k
in
o
)
{
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
}
const
throttle
=
(
fn
,
gapTime
)
=>
{
if
(
gapTime
==
null
||
gapTime
==
undefined
)
{
gapTime
=
1500
}
let
_lastTime
=
null
return
function
()
{
let
_nowTime
=
+
new
Date
()
if
(
_nowTime
-
_lastTime
>
gapTime
||
!
_lastTime
)
{
fn
.
apply
(
this
,
arguments
)
_lastTime
=
_nowTime
}
if
(
gapTime
==
null
||
gapTime
==
undefined
)
{
gapTime
=
1500
}
let
_lastTime
=
null
return
function
()
{
let
_nowTime
=
+
new
Date
()
if
(
_nowTime
-
_lastTime
>
gapTime
||
!
_lastTime
)
{
fn
.
apply
(
this
,
arguments
)
_lastTime
=
_nowTime
}
}
/**防止重复点击 */
}
/**防止重复点击 */
const
showLoading
=
(
title
=
'加载中...'
)
=>
{
Toast
({
type
:
'loading'
,
...
...
@@ -52,27 +49,27 @@ const showLoading = (title = '加载中...') => {
})
}
const
hideLoading
=
()
=>
{
Toast
.
clear
()
}
/**num:要转换的数值,fixed:精确几位小数 */
Toast
.
clear
()
}
/**num:要转换的数值,fixed:精确几位小数 */
const
decimal
=
(
num
,
fixed
)
=>
{
let
pow
=
Math
.
pow
(
10
,
fixed
)
return
Math
.
round
(
num
*
pow
)
/
pow
}
const
showToast
=
(
message
=
''
,
callBack
)
=>
{
let
params
=
{
message
,
forbidClick
:
true
,
duration
:
1500
}
Toast
(
params
)
if
(
callBack
&&
typeof
callBack
==
'function'
)
{
setTimeout
(()
=>
{
callBack
()
},
1500
)
}
let
params
=
{
message
,
forbidClick
:
true
,
duration
:
1500
}
Toast
(
params
)
if
(
callBack
&&
typeof
callBack
==
'function'
)
{
setTimeout
(()
=>
{
callBack
()
},
1500
)
}
/**触摸样式 */
}
/**触摸样式 */
const
touchstart
=
e
=>
{
e
.
target
.
classList
.
add
(
'btn-on-leave'
)
}
...
...
@@ -98,28 +95,28 @@ const removeLocalStorage = key => {
window
.
localStorage
.
removeItem
(
key
)
}
const
dialog
=
(
params
=
{})
=>
{
if
(
!
params
.
confirmButtonColor
)
params
.
confirmButtonColor
=
'#FF7336'
return
Dialog
.
confirm
(
params
)
}
/**拨打电话 */
if
(
!
params
.
confirmButtonColor
)
params
.
confirmButtonColor
=
'#FF7336'
return
Dialog
.
confirm
(
params
)
}
/**拨打电话 */
const
makePhoneCall
=
phoneNumber
=>
{
window
.
location
.
href
=
`tel://
${
phoneNumber
}
`
}
/**是否全面屏 */
const
isFullSucreen
=
()
=>
{
let
result
=
false
;
let
result
=
false
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
return
result
}
const
jumpChildrenPage
=
(
to
,
params
)
=>
{
let
{
name
}
=
window
.
vm
.
_route
window
.
vm
.
$router
.
push
({
name
:
`
${
name
}
.
${
to
}
`
,
params
})
}
/**拷贝 */
let
{
name
}
=
window
.
vm
.
_route
window
.
vm
.
$router
.
push
({
name
:
`
${
name
}
.
${
to
}
`
,
params
})
}
/**拷贝 */
const
setClipboardData
=
data
=>
{
wx
.
setClipboardData
({
data
,
...
...
@@ -127,8 +124,7 @@ const setClipboardData = data => {
console
.
log
(
res
)
Toast
(
'复制成功'
)
},
fail
(
res
){
}
fail
(
res
)
{}
})
}
...
...
@@ -165,7 +161,6 @@ const watchPageBack = () => {
resolve
()
}
})
}
const
utils
=
{
removeLocalStorage
,
...
...
@@ -196,4 +191,4 @@ const utils = {
Object
.
keys
(
utils
).
map
(
key
=>
{
Vue
.
prototype
[
key
]
=
utils
[
key
]
})
export
default
utils
\ No newline at end of file
export
default
utils
src/views/customerDetails/add.vue
View file @
9fd26bd
...
...
@@ -3,30 +3,11 @@
<tip
:title=
"title"
></tip>
<template
v-if=
"customerList.length > 0"
>
<div
class=
"customerList-add"
>
<scroll-view
class=
"content"
@
ReachBottom=
"onReachBottom"
ref=
"scrollView"
>
<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
/>
<scroll-view
class=
"content"
@
ReachBottom=
"onReachBottom"
ref=
"scrollView"
>
<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
:class=
"
{ 'customer-add-info': true, 'customer-add-all-info': tabIndex === 3 }">
<div
class=
"customer-add-info-number"
>
{{
item
.
customerPhone
}}
</div>
...
...
@@ -34,48 +15,30 @@
</div>
<template
v-if=
"item.status == 0"
>
<div
class=
"customer-add-friend flex"
>
<div
class=
"sprite-icon icon-customer-add"
@
click=
"addFriend(item)"
></div>
<div
class=
"sprite-icon icon-customer-add"
@
click=
"addFriend(item)"
></div>
<div
class=
"customer-add-friend-text"
>
加好友
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"customer-add-friend flex"
@
click=
"callPhone(item.customerPhone)"
>
<div
class=
"customer-add-friend flex"
@
click=
"callPhone(item.customerPhone)"
>
<div
class=
"sprite-icon icon-customer-phone"
></div>
<div
class=
"customer-add-friend-text"
>
拨打电话
</div>
</div>
</
template
>
<div
class=
"customer-add-stay"
v-else-if=
"item.status == 1"
>
待通过
</div>
<div
class=
"customer-add-pass"
v-else-if=
"item.status == 2"
>
已通过
</div>
<div
class=
"customer-add-stay"
v-else-if=
"item.status == 1"
>
待通过
</div>
<div
class=
"customer-add-pass"
v-else-if=
"item.status == 2"
>
已通过
</div>
<div
class=
"buttomLine"
></div>
</div>
</scroll-view>
</div>
<
template
v-if=
"tabIndex == 0 && copywriting != ''"
>
<div
class=
"copy-box"
>
<div
class=
"sprite-icon icon-customer-copy"
@
click=
"copy"
></div>
<div
class=
"sprite-icon icon-customer-copy"
@
click=
"copy"
></div>
<div
class=
"title"
>
客户好友申请文案
</div>
<div>
{{
copywriting
}}
</div>
</div>
</
template
>
</template>
<empty
v-else
description=
"暂无数据"
/>
<empty
v-else
description=
"暂无数据"
/>
</div>
</template>
<
script
>
...
...
@@ -266,7 +229,7 @@ export default {
.customer-add-stay
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#3975
C
6
;
color
:
#3975
c
6
;
line-height
:
17px
;
margin-left
:
78px
;
white-space
:
nowrap
;
...
...
@@ -327,4 +290,4 @@ export default {
height
:
calc
(
100vh
-
220px
)
!important
;
}
}
</
style
>
\ No newline at end of file
</
style
>
vue.config.js
View file @
9fd26bd
...
...
@@ -51,7 +51,7 @@ const spritesmithFunction = data => {
return
`
${
shared
}
\n
${
perSprite
}
`
}
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-attachment-customer/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router history模式使用
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment