Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
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 b21d8eff
authored
Jun 02, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第三轮bug修复
1 parent
6b939d55
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
src/views/baseInfo/components/search.vue
src/views/baseInfo/relevance.vue
src/views/baseInfo/components/search.vue
View file @
b21d8ef
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<ul
v-if=
"name == 'merchant'"
class=
"el-scrollbar__view el-cascader__suggestion-list"
v-infinite-scroll=
"load"
style=
"overflow: auto"
>
<ul
v-if=
"name == 'merchant'"
class=
"el-scrollbar__view el-cascader__suggestion-list"
v-infinite-scroll=
"load"
style=
"overflow: auto"
>
<template
v-if=
"searchList.length"
>
<template
v-if=
"searchList.length"
>
<template
v-for=
"item in searchList"
>
<template
v-for=
"item in searchList"
>
<li
:key=
"item.id"
class=
"el-cascader__suggestion-item"
:class=
"item.departmentName == searchKey.departmentName"
v-if=
"!item.childrenNums
"
@
click=
"selectMerchantItem(item)"
>
<li
:key=
"item.id"
v-if=
"!item.childrenNums"
class=
"el-cascader__suggestion-item"
:class=
"item.departmentName == searchKey.departmentName
"
@
click=
"selectMerchantItem(item)"
>
<div>
{{
item
.
merchantName
}}
</div>
<div>
{{
item
.
merchantName
}}
</div>
<div
class=
"parent-merchant"
>
{{
item
.
parentMerchantName
}}
</div>
<div
class=
"parent-merchant"
>
{{
item
.
parentMerchantName
}}
</div>
</li>
</li>
...
@@ -99,6 +99,7 @@ export default {
...
@@ -99,6 +99,7 @@ export default {
},
},
// 获取搜索框输入值
// 获取搜索框输入值
handleInput
:
utils
.
debounce
(
function
(
val
)
{
handleInput
:
utils
.
debounce
(
function
(
val
)
{
console
.
log
(
333
)
this
.
searchValue
=
val
this
.
searchValue
=
val
this
.
pageParams
.
pageNum
=
1
this
.
pageParams
.
pageNum
=
1
// 判断是商户账户调用还是企业微信调用
// 判断是商户账户调用还是企业微信调用
...
@@ -110,8 +111,10 @@ export default {
...
@@ -110,8 +111,10 @@ export default {
},
300
),
},
300
),
// 根据输入内容搜索企微门店数据
// 根据输入内容搜索企微门店数据
getSearchList
(
val
)
{
getSearchList
(
val
)
{
// this.searchList = []
if
(
!
val
)
{
if
(
!
val
)
{
this
.
visible
=
false
this
.
visible
=
false
this
.
$emit
(
'getCurDepartment'
)
return
return
}
}
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
pageParams
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
pageParams
))
...
@@ -133,6 +136,7 @@ export default {
...
@@ -133,6 +136,7 @@ export default {
getMerchantSearchList
(
val
)
{
getMerchantSearchList
(
val
)
{
if
(
!
val
)
{
if
(
!
val
)
{
this
.
visible
=
false
this
.
visible
=
false
this
.
$emit
(
'getCurMerchant'
)
return
return
}
}
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
pageParams
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
pageParams
))
...
@@ -153,6 +157,7 @@ export default {
...
@@ -153,6 +157,7 @@ export default {
},
},
// 下拉选择商户账户
// 下拉选择商户账户
selectMerchantItem
(
val
)
{
selectMerchantItem
(
val
)
{
// this.searchList = []
this
.
searchKey
.
id
=
val
.
merchantNo
this
.
searchKey
.
id
=
val
.
merchantNo
this
.
searchKey
.
departmentName
=
val
.
merchantName
this
.
searchKey
.
departmentName
=
val
.
merchantName
this
.
visible
=
false
this
.
visible
=
false
...
@@ -160,9 +165,11 @@ export default {
...
@@ -160,9 +165,11 @@ export default {
},
},
// 下拉选择门店
// 下拉选择门店
selectItem
(
val
)
{
selectItem
(
val
)
{
// this.searchList = []
this
.
searchKey
=
val
this
.
searchKey
=
val
this
.
visible
=
false
this
.
$emit
(
'getCurDepartment'
,
val
)
this
.
$emit
(
'getCurDepartment'
,
val
)
this
.
visible
=
false
console
.
log
(
this
.
visible
)
},
},
// 选择企微门店
// 选择企微门店
select
(
val
)
{
select
(
val
)
{
...
@@ -178,11 +185,13 @@ export default {
...
@@ -178,11 +185,13 @@ export default {
},
},
// 输入框失去焦点调用
// 输入框失去焦点调用
handleBlur
()
{
handleBlur
()
{
console
.
log
(
111
)
this
.
visible
=
false
this
.
visible
=
false
this
.
searchList
=
[]
//
this.searchList = []
},
},
// 输入框获取焦点
// 输入框获取焦点
handleFocus
()
{
handleFocus
()
{
console
.
log
(
222
)
this
.
pageParams
=
{
this
.
pageParams
=
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
...
@@ -199,7 +208,10 @@ export default {
...
@@ -199,7 +208,10 @@ export default {
// 下拉框触底获取下一页数据
// 下拉框触底获取下一页数据
load
()
{
load
()
{
this
.
pageParams
.
pageNum
++
this
.
pageParams
.
pageNum
++
console
.
log
(
this
.
count
)
console
.
log
(
this
.
searchList
.
length
)
if
(
this
.
searchList
.
length
<
this
.
count
)
{
if
(
this
.
searchList
.
length
<
this
.
count
)
{
console
.
log
(
555
)
if
(
this
.
name
===
'merchant'
)
{
if
(
this
.
name
===
'merchant'
)
{
this
.
getMerchantSearchList
()
this
.
getMerchantSearchList
()
return
return
...
...
src/views/baseInfo/relevance.vue
View file @
b21d8ef
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</div>
</div>
<div
class=
"select_wrapper"
>
<div
class=
"select_wrapper"
>
<div
class=
"label"
>
商户账户
</div>
<div
class=
"label"
>
商户账户
</div>
<SearchSelect
@
getCurMerchant=
"getCurMerchant"
@
getCurMerchantData=
"getCurMerchantData"
:name=
"componentsName"
></SearchSelect>
<SearchSelect
@
getCurMerchant=
"getCurMerchant"
:name=
"componentsName"
></SearchSelect>
</div>
</div>
</div>
</div>
<div
class=
"icon_wrap"
>
<div
class=
"icon_wrap"
>
...
@@ -116,6 +116,10 @@ export default {
...
@@ -116,6 +116,10 @@ export default {
},
},
// 获取当前选择的商户
// 获取当前选择的商户
getCurMerchant
(
val
)
{
getCurMerchant
(
val
)
{
if
(
!
val
)
{
this
.
curTempMerchant
=
{}
return
}
this
.
curTempMerchant
=
{
this
.
curTempMerchant
=
{
merchantId
:
val
.
merchantNo
,
merchantId
:
val
.
merchantNo
,
merchantName
:
val
.
merchantName
merchantName
:
val
.
merchantName
...
@@ -123,6 +127,10 @@ export default {
...
@@ -123,6 +127,10 @@ export default {
},
},
// 获取当前选择的部门
// 获取当前选择的部门
getCurDepartment
(
val
)
{
getCurDepartment
(
val
)
{
if
(
!
val
)
{
this
.
tempDepart
=
{}
return
}
this
.
tempDepart
=
{
this
.
tempDepart
=
{
departmentId
:
val
.
id
,
departmentId
:
val
.
id
,
departmentName
:
val
.
departmentName
departmentName
:
val
.
departmentName
...
@@ -130,14 +138,14 @@ export default {
...
@@ -130,14 +138,14 @@ export default {
},
},
// 关联当前选择的
// 关联当前选择的
handlerGL
()
{
handlerGL
()
{
if
(
!
this
.
curTempMerchant
)
{
if
(
!
this
.
curTempMerchant
.
merchantId
)
{
this
.
$message
({
this
.
$message
({
message
:
'请选择门店/商户'
,
message
:
'请选择门店/商户'
,
type
:
'warning'
type
:
'warning'
})
})
return
return
}
}
if
(
!
this
.
tempDepart
)
{
if
(
!
this
.
tempDepart
.
departmentId
)
{
this
.
$message
({
this
.
$message
({
message
:
'请选择企微门店'
,
message
:
'请选择企微门店'
,
type
:
'warning'
type
:
'warning'
...
...
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