Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
a7bcaf40
Commit
a7bcaf40
authored
Oct 13, 2022
by
dcy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员你列表添加分页,添加回显
parent
0f5df4c2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
16 deletions
+43
-16
customer.js
src/api/ecw/customer.js
+10
-2
edit.vue
src/views/ecw/customer/edit.vue
+33
-14
No files found.
src/api/ecw/customer.js
View file @
a7bcaf40
...
...
@@ -149,10 +149,18 @@ export function getMyCustomerService(query){
})
}
//获取会员列表
export
function
userMemberUserList
(){
export
function
userMemberUserList
(
params
){
return
request
({
url
:
'
/member/user/member-user-list
'
,
method
:
'
get
'
method
:
'
get
'
,
params
})
}
export
function
memberUserList
(
params
){
return
request
({
url
:
'
/member/user/list
'
,
method
:
'
get
'
,
params
})
}
//查看某客户授权的品牌
...
...
src/views/ecw/customer/edit.vue
View file @
a7bcaf40
...
...
@@ -282,8 +282,8 @@
>
<
template
v-slot =
"{row}"
>
<el-form-item
label=
""
>
<el-select
v-model=
"row.userid"
@
change=
"selectBD"
size=
"mini"
filterable
>
<el-option
v-for=
"(item,index) in
memberList"
:value=
"item.id"
:key=
"item.id
"
:label=
"item.nickname + '(' + item.mobile + ')'"
></el-option>
<el-select
v-model=
"row.userid"
remote
:remote-method=
"getUserMemberUserFn"
@
change=
"selectBD"
size=
"mini"
filterable
>
<el-option
v-for=
"(item,index) in
userMemberUser"
:value=
"item.id"
:key=
"index
"
:label=
"item.nickname + '(' + item.mobile + ')'"
></el-option>
</el-select>
</el-form-item>
</
template
>
...
...
@@ -408,7 +408,7 @@ import {
createCustomer
,
getCustomer
,
getCustomerList
,
getCustomerPage
,
getCustomerPage
,
memberUserList
,
updateCustomer
,
userMemberUserList
,
}
from
'
@/api/ecw/customer
'
...
...
@@ -440,16 +440,23 @@ export default {
created
()
{
this
.
getCustomerSelect
()
this
.
reset
()
this
.
getUserMemberUserFn
()
if
(
this
.
customerId
!==
'
0
'
)
{
// 编辑客户
this
.
getCustomer
(
this
.
customerId
).
then
(()
=>
{
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
form
.
customerContacts
=
r
.
data
let
list
=
this
.
form
.
customerContacts
.
map
(
item
=>
item
.
userid
);
if
(
list
.
length
>
0
){
memberUserList
({
ids
:
list
.
join
(
'
,
'
)}).
then
(
r
=>
{
this
.
selectMemberList
=
r
.
data
})
}
if
(
this
.
form
.
promoter
){
getCustomerList
({
ids
:
this
.
form
.
promoter
}).
then
(
r
=>
{
console
.
log
(
r
,
'
r
'
);
this
.
recommended
=
r
.
data
;
})
}
})
})
}
else
{
...
...
@@ -478,10 +485,6 @@ export default {
getCountryListAll
().
then
(
r
=>
{
this
.
countryList
=
r
.
data
})
userMemberUserList
().
then
(
r
=>
{
this
.
memberList
=
r
.
data
})
this
.
getZhongPao
()
},
data
(){
...
...
@@ -532,10 +535,16 @@ export default {
zhongLines
:
[],
// 重货线路
paoLines
:
[],
// 泡货线路
memberList
:[],
//会员列表
selectMemberList
:[]
//选中会员列表
}
},
methods
:
{
getUserMemberUserFn
(
val
){
userMemberUserList
({
pageNo
:
1
,
pageSize
:
100
,
searchKey
:
val
}).
then
(
r
=>
{
this
.
memberList
=
r
.
data
.
list
})
},
remoteMethod
(
val
){
this
.
getCustomerSelect
(
val
);
},
...
...
@@ -585,8 +594,12 @@ export default {
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
}
},
selectBD
(){
this
.
$forceUpdate
();
selectBD
(
val
){
let
i
=
this
.
selectMemberList
.
find
(
item
=>
item
.
id
===
val
);
if
(
i
===
undefined
){
this
.
selectMemberList
.
push
(
this
.
memberList
.
find
(
item
=>
item
.
id
===
val
))
}
this
.
getUserMemberUserFn
()
},
/** 取消按钮 */
cancel
()
{
...
...
@@ -743,6 +756,12 @@ export default {
}
},
computed
:
{
userMemberUser
(){
let
list
=
this
.
memberList
.
filter
(
item
=>
{
return
this
.
selectMemberList
.
findIndex
(
i
=>
i
.
id
===
item
.
id
)
<
0
})
return
[...
this
.
selectMemberList
,...
list
]
},
productListFilter
(){
return
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
this
.
form
.
productType
)
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment