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 75b7be57
authored
May 20, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户账户交互调整
1 parent
8bcd1f82
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
26 deletions
src/views/baseInfo/components/departmentTree.vue
src/views/baseInfo/components/merchantTree.vue
src/views/baseInfo/components/search.vue
src/views/baseInfo/relevance.vue
src/views/baseInfo/components/departmentTree.vue
View file @
75b7be5
...
@@ -92,7 +92,7 @@ export default {
...
@@ -92,7 +92,7 @@ export default {
},
},
submit
()
{
submit
()
{
console
.
log
(
this
.
checkObj
)
console
.
log
(
this
.
checkObj
)
if
(
!
this
.
checkObj
)
{
if
(
!
this
.
checkObj
.
first
)
{
this
.
$message
({
this
.
$message
({
message
:
'请选择门店'
,
message
:
'请选择门店'
,
type
:
'warning'
type
:
'warning'
...
...
src/views/baseInfo/components/merchantTree.vue
View file @
75b7be5
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
<div>
<div>
<div
class=
"tree-list"
:style=
"
{ height: listHeight + 'px' }">
<div
class=
"tree-list"
:style=
"
{ height: listHeight + 'px' }">
<el-radio-group
v-model=
"checkObj.first"
@
change=
"selectChange"
>
<el-radio-group
v-model=
"checkObj.first"
@
change=
"selectChange"
>
<div
class=
"tree-item"
v-for=
"item in
departmentList"
:key=
"item.departme
ntId"
@
click
.
self=
"toNext(item, $event)"
>
<div
class=
"tree-item"
v-for=
"item in
merchantList"
:key=
"item.mercha
ntId"
@
click
.
self=
"toNext(item, $event)"
>
<el-radio
:label=
"item"
:disabled=
"
!item.relevanceMerchant"
>
{{
item
.
departme
ntName
}}
</el-radio>
<el-radio
:label=
"item"
:disabled=
"
item.hasChildren"
>
{{
item
.
mercha
ntName
}}
</el-radio>
<i
v-show=
"item.
childrenNum
"
class=
"el-icon-arrow-right"
></i>
<i
v-show=
"item.
hasChildren
"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-radio-group>
</el-radio-group>
</div>
</div>
...
@@ -50,8 +50,53 @@ export default {
...
@@ -50,8 +50,53 @@ export default {
visible
:
false
,
visible
:
false
,
dialogTitle
:
'选择商户账户'
,
dialogTitle
:
'选择商户账户'
,
listHeight
:
220
,
listHeight
:
220
,
departmentList
:
[],
merchantList
:
[],
parentMerchantList
:
[],
parentMerchantList
:
[
{
merchantId
:
1
,
merchantName
:
'测试10001'
,
parentMerchantName
:
''
,
hasChildren
:
false
,
level
:
1
,
disabled
:
true
},
{
merchantId
:
2
,
merchantName
:
'嘀加智慧平台-公共商户'
,
parentMerchantName
:
'嘀加公共市代商户'
,
hasChildren
:
true
,
level
:
1
,
disabled
:
true
},
{
merchantId
:
3
,
merchantName
:
'深圳南山崇文园区奥迪4S店'
,
parentMerchantName
:
'嘀加公共市代商户'
,
level
:
1
,
hasChildren
:
false
},
{
merchantId
:
4
,
merchantName
:
'南山智园崇文园区'
,
parentMerchantName
:
'嘀加公共市代商户'
,
level
:
1
,
hasChildren
:
false
},
{
merchantId
:
5
,
merchantName
:
'深圳世界之窗'
,
parentMerchantName
:
'嘀加公共市代商户'
,
level
:
1
,
hasChildren
:
false
},
{
merchantId
:
6
,
merchantName
:
'大众进口商务车中心'
,
parentMerchantName
:
'嘀加公共市代商户'
,
level
:
1
,
hasChildren
:
false
}
],
subSubMerchantList
:
[],
subSubMerchantList
:
[],
checkObj
:
{
checkObj
:
{
first
:
''
first
:
''
...
@@ -68,11 +113,12 @@ export default {
...
@@ -68,11 +113,12 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getDepartmentList
()
// this.getMerchantList()
this
.
merchantList
=
this
.
parentMerchantList
},
},
methods
:
{
methods
:
{
// 获取门店数据
// 获取门店数据
get
Departme
ntList
(
depth
,
id
)
{
get
Mercha
ntList
(
depth
,
id
)
{
var
params
=
{}
var
params
=
{}
depth
?
(
params
.
depth
=
depth
)
:
(
params
.
depth
=
0
)
depth
?
(
params
.
depth
=
depth
)
:
(
params
.
depth
=
0
)
if
(
id
)
{
if
(
id
)
{
...
@@ -80,8 +126,8 @@ export default {
...
@@ -80,8 +126,8 @@ export default {
}
}
this
.
$apis
.
baseInfo
.
getDepartment
(
params
).
then
(
res
=>
{
this
.
$apis
.
baseInfo
.
getDepartment
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
departme
ntList
=
res
this
.
mercha
ntList
=
res
console
.
log
(
this
.
departme
ntList
)
console
.
log
(
this
.
mercha
ntList
)
})
})
},
},
handleClose
()
{
handleClose
()
{
...
@@ -89,14 +135,14 @@ export default {
...
@@ -89,14 +135,14 @@ export default {
},
},
submit
()
{
submit
()
{
console
.
log
(
this
.
checkObj
)
console
.
log
(
this
.
checkObj
)
if
(
!
this
.
checkObj
)
{
if
(
!
this
.
checkObj
.
first
)
{
this
.
$message
({
this
.
$message
({
message
:
'请选择
门店
'
,
message
:
'请选择
商户账户
'
,
type
:
'warning'
type
:
'warning'
})
})
return
return
}
}
this
.
$emit
(
'select'
,
this
.
checkObj
)
this
.
$emit
(
'select
Merchant
'
,
this
.
checkObj
)
this
.
visible
=
false
this
.
visible
=
false
},
},
// 选中时触发
// 选中时触发
...
...
src/views/baseInfo/components/search.vue
View file @
75b7be5
...
@@ -22,26 +22,35 @@
...
@@ -22,26 +22,35 @@
<li>
无数据
</li>
<li>
无数据
</li>
</
template
>
</
template
>
</ul>
</ul>
<el-input
slot=
"reference"
debounce
style=
"width: 320px"
v-model=
"searchKey.departmentName"
:size=
"size"
@
input=
"handleInput"
@
focus=
"handleFocus"
placeholder=
"请输入内容
"
>
<el-input
slot=
"reference"
debounce
style=
"width: 320px"
v-model=
"searchKey.departmentName"
:size=
"size"
@
input=
"handleInput"
@
focus=
"handleFocus"
:placeholder=
"type
"
>
<!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> -->
<!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> -->
<
template
slot=
"append"
>
<
template
slot=
"append"
>
<div
class=
"input_append"
@
click
.
stop=
"arrowClick"
>
<div
class=
"input_append"
@
click
.
stop=
"arrowClick
()
"
>
<img
src=
"@/assets/add_merchant.png"
alt=
""
/>
<img
src=
"@/assets/add_merchant.png"
alt=
""
/>
</div>
</div>
</
template
>
</
template
>
</el-input>
</el-input>
</el-popover>
</el-popover>
<DepartmentTree
ref=
"departmentTree"
@
select=
"select"
></DepartmentTree>
<DepartmentTree
ref=
"departmentTree"
@
select=
"select"
></DepartmentTree>
<MerchantTree
ref=
"merchantTree"
@
selectMerchant=
"selectMerchant"
></MerchantTree>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
utils
}
from
'glsx-common'
import
{
utils
}
from
'glsx-common'
import
DepartmentTree
from
'./departmentTree.vue'
import
DepartmentTree
from
'./departmentTree.vue'
import
MerchantTree
from
'./merchantTree.vue'
export
default
{
export
default
{
name
:
'SearchSelect'
,
name
:
'SearchSelect'
,
components
:
{
components
:
{
DepartmentTree
DepartmentTree
,
MerchantTree
},
props
:
{
name
:
{
type
:
String
,
default
:
''
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -50,7 +59,7 @@ export default {
...
@@ -50,7 +59,7 @@ export default {
id
:
''
,
id
:
''
,
departmentName
:
''
departmentName
:
''
},
// 绑定input的值
},
// 绑定input的值
isOpen
:
false
,
//
isOpen: false,
visible
:
false
,
visible
:
false
,
isCheck
:
false
,
isCheck
:
false
,
departmentList
:
[],
// 接口返回数据
departmentList
:
[],
// 接口返回数据
...
@@ -69,9 +78,15 @@ export default {
...
@@ -69,9 +78,15 @@ export default {
},
},
methods
:
{
methods
:
{
arrowClick
()
{
arrowClick
()
{
console
.
log
(
this
.
name
)
this
.
isOpen
=
true
this
.
isOpen
=
true
this
.
visible
=
false
this
.
visible
=
false
if
(
this
.
isOpen
)
{
if
(
this
.
isOpen
)
{
if
(
this
.
name
===
'merchant'
)
{
this
.
$refs
.
merchantTree
.
visible
=
true
// this.$refs.merchantTree.getMerchantList()
return
}
this
.
$refs
.
departmentTree
.
visible
=
true
this
.
$refs
.
departmentTree
.
visible
=
true
this
.
$refs
.
departmentTree
.
getDepartmentList
()
this
.
$refs
.
departmentTree
.
getDepartmentList
()
}
}
...
@@ -116,6 +131,7 @@ export default {
...
@@ -116,6 +131,7 @@ export default {
this
.
visible
=
false
this
.
visible
=
false
this
.
$emit
(
'getCurDepartment'
,
val
)
this
.
$emit
(
'getCurDepartment'
,
val
)
},
},
// 选择企微门店
select
(
val
)
{
select
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
// this.searchKey = {
// this.searchKey = {
...
@@ -126,6 +142,13 @@ export default {
...
@@ -126,6 +142,13 @@ export default {
this
.
searchKey
.
departmentName
=
val
.
first
.
departmentName
this
.
searchKey
.
departmentName
=
val
.
first
.
departmentName
this
.
$emit
(
'getCurDepartment'
,
val
.
first
)
this
.
$emit
(
'getCurDepartment'
,
val
.
first
)
},
},
// 选择商户账户
selectMerchant
(
val
)
{
console
.
log
(
val
)
this
.
searchKey
.
id
=
val
.
first
.
merchantId
+
''
this
.
searchKey
.
departmentName
=
val
.
first
.
merchantName
this
.
$emit
(
'getCurMerchant'
,
val
.
first
)
},
handleBlur
()
{
handleBlur
()
{
this
.
visible
=
false
this
.
visible
=
false
// this.searchKey = {}
// this.searchKey = {}
...
...
src/views/baseInfo/relevance.vue
View file @
75b7be5
...
@@ -14,13 +14,14 @@
...
@@ -14,13 +14,14 @@
</div>
</div>
<div
class=
"select_wrapper"
>
<div
class=
"select_wrapper"
>
<div
class=
"label"
>
商户账户
</div>
<div
class=
"label"
>
商户账户
</div>
<el-cascader
ref=
"cascaderRef1"
placeholder=
"请选择商户/门店"
@
change=
"getCurMerchant"
:show-all-levels=
"false"
v-model=
"shopName"
:props=
"mypropParam1"
:options=
"shopList"
size=
"small"
style=
"width: 320px"
separator=
" "
filterable
>
<SearchSelect
@
getCurMerchant=
"getCurMerchant"
:name=
"componentsName"
></SearchSelect>
<!--
<el-cascader
ref=
"cascaderRef1"
placeholder=
"请选择商户/门店"
@
change=
"getCurMerchant"
:show-all-levels=
"false"
v-model=
"shopName"
:props=
"mypropParam1"
:options=
"shopList"
size=
"small"
style=
"width: 320px"
separator=
" "
filterable
>
<template
slot-scope=
"
{ data }">
<template
slot-scope=
"
{ data }">
<el-tooltip
popper-class=
"myToolTipClass"
style=
"border: none"
:disabled=
"data.label.length > 12 ? false : true"
class=
"item"
effect=
"light"
:content=
"data.label"
placement=
"top-end"
>
<el-tooltip
popper-class=
"myToolTipClass"
style=
"border: none"
:disabled=
"data.label.length > 12 ? false : true"
class=
"item"
effect=
"light"
:content=
"data.label"
placement=
"top-end"
>
<div
class=
"limitText"
style=
"width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>
{{
data
.
label
}}
</div>
<div
class=
"limitText"
style=
"width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>
{{
data
.
label
}}
</div>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
</el-cascader>
</el-cascader>
-->
</div>
</div>
</div>
</div>
<div
class=
"icon_wrap"
>
<div
class=
"icon_wrap"
>
...
@@ -35,7 +36,7 @@
...
@@ -35,7 +36,7 @@
</div>
</div>
<div
class=
"select_wrapper"
>
<div
class=
"select_wrapper"
>
<div
class=
"label"
>
企业微信
</div>
<div
class=
"label"
>
企业微信
</div>
<SearchSelect
@
getCurDepartment=
"getCurDepartment"
></SearchSelect>
<SearchSelect
@
getCurDepartment=
"getCurDepartment"
:name=
"componentsName1"
></SearchSelect>
<!-- <el-cascader ref="cascaderRef" @change="getCurDepartment" placeholder="请选择企微门店" :show-all-levels="false" v-model="selectedDepartment" :props="mypropsParam" :options="departmentList" size="small" style="width: 320px" separator=" " filterable>
<!-- <el-cascader ref="cascaderRef" @change="getCurDepartment" placeholder="请选择企微门店" :show-all-levels="false" v-model="selectedDepartment" :props="mypropsParam" :options="departmentList" size="small" style="width: 320px" separator=" " filterable>
<template slot-scope="{ data }">
<template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
...
@@ -119,6 +120,8 @@ export default {
...
@@ -119,6 +120,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
componentsName
:
'merchant'
,
componentsName1
:
'department'
,
departmentList
:
[],
departmentList
:
[],
shopList
:
[],
shopList
:
[],
qwShop
:
''
,
qwShop
:
''
,
...
@@ -166,14 +169,19 @@ export default {
...
@@ -166,14 +169,19 @@ export default {
},
},
// 获取当前选择的商户
// 获取当前选择的商户
getCurMerchant
(
val
)
{
getCurMerchant
(
val
)
{
let
id
=
val
[
val
.
length
-
1
]
console
.
log
(
val
,
'---'
)
let
labels
=
this
.
$refs
.
cascaderRef1
.
getCheckedNodes
()[
0
].
pathLabels
let
curLabel
=
labels
[
labels
.
length
-
1
]
this
.
curTempMerchant
=
{
this
.
curTempMerchant
=
{
merchantId
:
i
d
,
merchantId
:
val
.
merchantI
d
,
merchantName
:
curLabel
merchantName
:
val
.
merchantName
}
}
this
.
$refs
.
cascaderRef1
.
dropDownVisible
=
false
// let id = val[val.length - 1]
// let labels = this.$refs.cascaderRef1.getCheckedNodes()[0].pathLabels
// let curLabel = labels[labels.length - 1]
// this.curTempMerchant = {
// merchantId: id,
// merchantName: curLabel
// }
// this.$refs.cascaderRef1.dropDownVisible = false
},
},
// 获取当前选择的部门
// 获取当前选择的部门
getCurDepartment
(
val
)
{
getCurDepartment
(
val
)
{
...
...
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