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){
...
@@ -149,10 +149,18 @@ export function getMyCustomerService(query){
})
})
}
}
//获取会员列表
//获取会员列表
export
function
userMemberUserList
(){
export
function
userMemberUserList
(
params
){
return
request
({
return
request
({
url
:
'
/member/user/member-user-list
'
,
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 @@
...
@@ -282,8 +282,8 @@
>
>
<
template
v-slot =
"{row}"
>
<
template
v-slot =
"{row}"
>
<el-form-item
label=
""
>
<el-form-item
label=
""
>
<el-select
v-model=
"row.userid"
@
change=
"selectBD"
size=
"mini"
filterable
>
<el-select
v-model=
"row.userid"
remote
:remote-method=
"getUserMemberUserFn"
@
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-option
v-for=
"(item,index) in
userMemberUser"
:value=
"item.id"
:key=
"index
"
:label=
"item.nickname + '(' + item.mobile + ')'"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
...
@@ -408,7 +408,7 @@ import {
...
@@ -408,7 +408,7 @@ import {
createCustomer
,
createCustomer
,
getCustomer
,
getCustomer
,
getCustomerList
,
getCustomerList
,
getCustomerPage
,
getCustomerPage
,
memberUserList
,
updateCustomer
,
updateCustomer
,
userMemberUserList
,
userMemberUserList
,
}
from
'
@/api/ecw/customer
'
}
from
'
@/api/ecw/customer
'
...
@@ -440,16 +440,23 @@ export default {
...
@@ -440,16 +440,23 @@ export default {
created
()
{
created
()
{
this
.
getCustomerSelect
()
this
.
getCustomerSelect
()
this
.
reset
()
this
.
reset
()
this
.
getUserMemberUserFn
()
if
(
this
.
customerId
!==
'
0
'
)
{
if
(
this
.
customerId
!==
'
0
'
)
{
// 编辑客户
// 编辑客户
this
.
getCustomer
(
this
.
customerId
).
then
(()
=>
{
this
.
getCustomer
(
this
.
customerId
).
then
(()
=>
{
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
form
.
customerContacts
=
r
.
data
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
=>
{
getCustomerList
({
ids
:
this
.
form
.
promoter
}).
then
(
r
=>
{
console
.
log
(
r
,
'
r
'
);
this
.
recommended
=
r
.
data
;
this
.
recommended
=
r
.
data
;
})
})
}
})
})
})
})
}
else
{
}
else
{
...
@@ -478,10 +485,6 @@ export default {
...
@@ -478,10 +485,6 @@ export default {
getCountryListAll
().
then
(
r
=>
{
getCountryListAll
().
then
(
r
=>
{
this
.
countryList
=
r
.
data
this
.
countryList
=
r
.
data
})
})
userMemberUserList
().
then
(
r
=>
{
this
.
memberList
=
r
.
data
})
this
.
getZhongPao
()
this
.
getZhongPao
()
},
},
data
(){
data
(){
...
@@ -532,10 +535,16 @@ export default {
...
@@ -532,10 +535,16 @@ export default {
zhongLines
:
[],
// 重货线路
zhongLines
:
[],
// 重货线路
paoLines
:
[],
// 泡货线路
paoLines
:
[],
// 泡货线路
memberList
:[],
//会员列表
memberList
:[],
//会员列表
selectMemberList
:[]
//选中会员列表
}
}
},
},
methods
:
{
methods
:
{
getUserMemberUserFn
(
val
){
userMemberUserList
({
pageNo
:
1
,
pageSize
:
100
,
searchKey
:
val
}).
then
(
r
=>
{
this
.
memberList
=
r
.
data
.
list
})
},
remoteMethod
(
val
){
remoteMethod
(
val
){
this
.
getCustomerSelect
(
val
);
this
.
getCustomerSelect
(
val
);
},
},
...
@@ -585,8 +594,12 @@ export default {
...
@@ -585,8 +594,12 @@ export default {
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
}
}
},
},
selectBD
(){
selectBD
(
val
){
this
.
$forceUpdate
();
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
()
{
cancel
()
{
...
@@ -743,6 +756,12 @@ export default {
...
@@ -743,6 +756,12 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
userMemberUser
(){
let
list
=
this
.
memberList
.
filter
(
item
=>
{
return
this
.
selectMemberList
.
findIndex
(
i
=>
i
.
id
===
item
.
id
)
<
0
})
return
[...
this
.
selectMemberList
,...
list
]
},
productListFilter
(){
productListFilter
(){
return
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
this
.
form
.
productType
)
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