Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 97e4bb72
authored
Sep 06, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群发客户列表分页
1 parent
58d4243e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
8 deletions
src/api/modules/customerTransform.js
src/views/customerTransform/detailCustomer.vue
src/api/modules/customerTransform.js
View file @
97e4bb7
...
@@ -137,7 +137,7 @@ const staffList = params => {
...
@@ -137,7 +137,7 @@ const staffList = params => {
}
}
// 客户群发客户列表
// 客户群发客户列表
const
customerDetailList
=
params
=>
{
const
customerDetailList
=
params
=>
{
params
.
method
=
`
${
path
}
customer.list`
params
.
method
=
`
${
path
}
customer.list
.page
`
return
http
({
return
http
({
url
:
URL
,
url
:
URL
,
method
:
'GET'
,
method
:
'GET'
,
...
...
src/views/customerTransform/detailCustomer.vue
View file @
97e4bb7
...
@@ -48,14 +48,14 @@
...
@@ -48,14 +48,14 @@
<div
class=
"detail-modular"
>
<div
class=
"detail-modular"
>
<div
class=
"title"
>
客户详情
</div>
<div
class=
"title"
>
客户详情
</div>
<div
class=
"detail-info"
>
<div
class=
"detail-info"
>
<el-menu
:default-active=
"customIndex"
class=
"el-menu-demo"
mode=
"horizontal"
@
select=
"handleCustomSelect"
>
<el-menu
:default-active=
"customIndex"
class=
"el-menu-demo"
mode=
"horizontal"
@
select=
"handleCustomSelect"
infinite-scroll-distance=
"10"
>
<el-menu-item
index
>
全部
</el-menu-item>
<el-menu-item
index
>
全部
</el-menu-item>
<el-menu-item
index=
"1"
>
已送达客户
</el-menu-item>
<el-menu-item
index=
"1"
>
已送达客户
</el-menu-item>
<el-menu-item
index=
"0"
>
未送达客户
</el-menu-item>
<el-menu-item
index=
"0"
>
未送达客户
</el-menu-item>
<el-menu-item
index=
"2"
>
客户送达失败
</el-menu-item>
<el-menu-item
index=
"2"
>
客户送达失败
</el-menu-item>
</el-menu>
</el-menu>
<div
class=
"detail-total"
>
共
{{
customer
list
.
length
||
0
}}
人
</div>
<div
class=
"detail-total"
>
共
{{
customer
Count
||
0
}}
人
</div>
<div
v-if=
"customer
list.length != 0"
class=
"info-list
"
>
<div
v-if=
"customer
Count != 0"
class=
"info-list"
v-infinite-scroll=
"customerDetailLoad"
immediate-check=
"false
"
>
<div
class=
"info-item"
v-for=
"item in customerlist"
:key=
"item.id"
>
<div
class=
"info-item"
v-for=
"item in customerlist"
:key=
"item.id"
>
<img
class=
"info-avatar"
:src=
"item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')"
alt
/>
<img
class=
"info-avatar"
:src=
"item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')"
alt
/>
<div
class=
"info-content info-custom"
>
<div
class=
"info-content info-custom"
>
...
@@ -108,7 +108,14 @@ export default {
...
@@ -108,7 +108,14 @@ export default {
eventBus
:
new
Vue
(),
eventBus
:
new
Vue
(),
isDisabled
:
false
,
isDisabled
:
false
,
footerLeft
:
0
,
footerLeft
:
0
,
footerWidth
:
0
footerWidth
:
0
,
// 客户详情分页
customerPage
:
{
pageSize
:
10
,
pageNum
:
1
},
// 客户详情总数
customerCount
:
0
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -126,8 +133,19 @@ export default {
...
@@ -126,8 +133,19 @@ export default {
this
.
activeIndex
=
val
this
.
activeIndex
=
val
this
.
getStaffList
(
val
)
this
.
getStaffList
(
val
)
},
},
// 客户详情选择切换
handleCustomSelect
(
val
)
{
handleCustomSelect
(
val
)
{
this
.
customIndex
=
val
this
.
customIndex
=
val
this
.
customerlist
=
[]
// 获取滑动高度清0,防止tab切换时记录滚动条位置问题
var
scrolltopList
=
document
.
querySelectorAll
(
'.info-list'
)
if
(
scrolltopList
)
{
scrolltopList
[
1
]
?
(
scrolltopList
[
1
].
scrollTop
=
0
)
:
''
}
this
.
customerPage
=
{
pageSize
:
10
,
pageNum
:
1
}
this
.
getCustomerList
(
val
)
this
.
getCustomerList
(
val
)
},
},
remind
(
data
,
index
)
{
remind
(
data
,
index
)
{
...
@@ -163,10 +181,28 @@ export default {
...
@@ -163,10 +181,28 @@ export default {
this
.
employeelist
=
res
?
res
:
[]
this
.
employeelist
=
res
?
res
:
[]
})
})
},
},
// 客户详情下拉加载
customerDetailLoad
()
{
// 详情列表有数据时才触发
if
(
this
.
customerlist
.
length
>
0
)
{
this
.
customerPage
.
pageNum
++
// 详情数组数量小于总数才触发,带上切换的tab值
if
(
this
.
customerlist
.
length
<
this
.
customerCount
)
this
.
getCustomerList
(
this
.
customIndex
)
}
},
// 获取客户详情列表
getCustomerList
(
status
=
null
)
{
getCustomerList
(
status
=
null
)
{
const
id
=
this
.
$route
.
params
.
id
const
id
=
this
.
$route
.
params
.
id
this
.
$apis
.
customerTransform
.
customerDetailList
({
id
,
status
}).
then
(
res
=>
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customerPage
))
this
.
customerlist
=
res
?
res
:
[]
params
.
status
=
status
params
.
id
=
id
this
.
$apis
.
customerTransform
.
customerDetailList
(
params
).
then
(
res
=>
{
this
.
customerCount
=
res
.
count
if
(
!
res
.
data
.
length
)
{
this
.
customerlist
=
[]
return
}
this
.
customerlist
.
push
(...
res
.
data
)
})
})
},
},
remindUserGroup
()
{
remindUserGroup
()
{
...
@@ -276,7 +312,7 @@ export default {
...
@@ -276,7 +312,7 @@ export default {
margin-top
:
0
;
margin-top
:
0
;
margin-left
:
10px
;
margin-left
:
10px
;
&.send
{
&.send
{
width
:
7
0px
;
width
:
8
0px
;
}
}
span
{
span
{
vertical-align
:
middle
;
vertical-align
:
middle
;
...
...
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