Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 9b885edb
authored
May 13, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
搜索门店
1 parent
845947dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
164 additions
and
49 deletions
src/api/modules/expert.js
src/assets/css/public.scss
src/views/expert/detail.vue
src/views/expert/index.vue
src/api/modules/expert.js
0 → 100644
View file @
9b885ed
import
{
http
,
http_brand
}
from
'@/main'
const
getExpertList
=
params
=>
{
params
.
method
=
'entmicro.api.operation.page'
return
http
({
url
:
'rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getMerchantTree
=
params
=>
{
params
.
method
=
'entmicro.api.common.findMerchantTreeByMerchantNo.list'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getExpertList
,
getMerchantTree
}
src/assets/css/public.scss
View file @
9b885ed
...
...
@@ -190,3 +190,7 @@
background
:
#ffffff
;
z-index
:
0
;
}
.expert-cascader
.el-cascader-menu
{
max-height
:
500px
;
}
src/views/expert/detail.vue
View file @
9b885ed
...
...
@@ -6,16 +6,16 @@
</div>
<div
class=
"detail-wrap"
>
<el-form
class=
"form"
ref=
"form"
:model=
"basicForm"
label-width=
"128px"
>
<el-form-item
label=
"客户类型"
>
<el-form-item
label=
"客户类型
:
"
>
<span>
{{
clientType
==
1
?
'升级客户'
:
'战败客户'
}}
</span>
</el-form-item>
<el-form-item
label=
"轻改专家
"
>
<el-form-item
required
label=
"轻改专家:
"
>
<el-button
size=
"small"
icon=
"el-icon-plus"
@
click=
"openMembers"
>
选择成员
</el-button>
<span>
所属商户:xx门店
</span>
</el-form-item>
<el-form-item
label=
"欢迎语"
>
<el-form-item
label=
"欢迎语
:
"
>
<!--
<label
slot=
"label"
class=
"required"
>
群发内容
</label>
-->
<WelcomeWords
ref=
"welcome"
:btnList=
"btnList"
:eventBus=
"eventBus"
></WelcomeWords>
<div
class=
"tips-text"
>
...
...
src/views/expert/index.vue
View file @
9b885ed
...
...
@@ -14,23 +14,35 @@
<span
class=
"btnTip"
>
配置轻改专家,形成业务活码,客户通过「精品升级」订单扫码后添加该员工。
</span>
</div>
<div
class=
"expert-wrap"
>
<glsx-combi-form
ref=
"expertRef"
labelWidth=
"120px"
defaultWidth=
"215px"
:formObj=
"batchListSearch"
:formData=
"expertForm"
>
<glsx-combi-form
ref=
"expertRef"
labelWidth=
"72px"
defaultWidth=
"215px"
:formObj=
"batchListSearch"
:formData=
"expertForm"
>
<div
slot=
"department"
>
<el-cascader
popper-class=
"expert-cascader"
ref=
"cascaderRef1"
placeholder=
"请选择商户/门店"
@
change=
"getCurMerchant"
:show-all-levels=
"false"
v-model=
"batchListSearch.departmentName"
:props=
"mypropParam1"
:options=
"shopList"
size=
"small"
style=
"width: 320px"
separator=
" "
filterable
>
<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"
>
<div
class=
"limitText"
style=
"width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>
{{
data
.
label
}}
</div>
</el-tooltip>
</
template
>
</el-cascader>
</div>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询{{ isNotData }}
</el-button>
<el-button
:size=
"size"
class=
"resetBtn"
@
click=
"handleReset"
>
重置
</el-button>
</span>
</glsx-combi-form>
<GLTable
ref=
"expertTable"
@
hook:mounted=
"setTabelHeight"
:pageConf=
"batchPageConf"
:searchForm=
"batchListSearch"
:tableParams=
"batchTableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"expertTable"
@
hook:mounted=
"setTabelHeight"
:hasNum=
"false"
:pageConf=
"batchPageConf"
:searchForm=
"batchListSearch"
:tableParams=
"batchTableParams"
:getListApi=
"getListApi"
>
<span
slot=
"status"
slot-scope=
"scope"
>
<el-switch
:value=
"scope.scope.status == 0"
active-color=
"#5850ff"
inactive-color=
"#eee"
@
change=
"changStatus(scope.scope.status, scope.scope.id)"
></el-switch>
{{ scope.scope.status == 1 ? '禁用' : '启用' }}
</span>
<div
class=
"table-btns"
slot=
"table-btns"
slot-scope=
"scope"
>
<GLButton
fn=
"编辑"
type=
"text"
@
click=
"addConfig(2)"
>
编辑
</GLButton>
<el-button
type=
"text"
@
click=
"addConfig(3)"
>
{{
scope
.
scope
.
status
==
1
?
'禁用'
:
'启用'
}}
</el-button>
<GLButton
fn=
"编辑"
type=
"text"
@
click=
"addConfig(scope)"
>
编辑
</GLButton>
<GLButton
fn=
"编辑"
type=
"text"
@
click=
"addConfig(2)"
>
删除
</GLButton>
</div>
<div
slot=
"additionalContent"
class=
"default-box"
>
<
!-- <
div slot="additionalContent" class="default-box">
<img class="default-img" :src="imagBaseURL + 'serviceser.png'" alt="" />
<span class="tip">用于「精品升级」客户线上化,配置轻改专家成员,可通过精品升级的质保卡活码拉新。</span>
<GLButton :size="size" fn="新增配置" icon="el-icon-plus" type="primary" @click="addConfig(1)">配置门店轻改专家</GLButton>
</div>
</div>
-->
</GLTable>
</div>
</div>
...
...
@@ -45,30 +57,38 @@ export default {
data
()
{
return
{
imagBaseURL
,
shopName
:
''
,
shopList
:
[],
mypropParam1
:
{
value
:
'id'
,
label
:
'label'
,
children
:
'children'
,
checkStrictly
:
true
},
size
:
'small'
,
getListApi
:
this
.
$apis
.
beforeSale
.
getWriteOff
List
,
getListApi
:
this
.
$apis
.
expert
.
getExpert
List
,
showClientType
:
false
,
batchPageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
total
'
},
batchPageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
count
'
},
batchListSearch
:
{
mercha
ntName
:
''
,
n
ame
:
''
,
t
ype
:
''
departme
ntName
:
''
,
staffN
ame
:
''
,
businessT
ype
:
''
},
expertForm
:
[
{
label
:
'
选择
门店'
,
name
:
'
mobil
e'
,
type
:
'inpu
t'
label
:
'门店'
,
name
:
'
departmentNam
e'
,
addHtml
:
'departmen
t'
},
{
label
:
'员工
姓名
'
,
name
:
'
merchant
Name'
,
label
:
'员工'
,
name
:
'
staff
Name'
,
type
:
'input'
,
maxlength
:
15
},
{
label
:
'
选择
客户类型'
,
name
:
'
member
Type'
,
label
:
'客户类型'
,
name
:
'
business
Type'
,
type
:
'select'
,
optionList
:
[
{
...
...
@@ -90,48 +110,52 @@ export default {
}
],
batchTableParams
:
{
listName
:
'
list
'
,
listName
:
'
data
'
,
tableOption
:
false
,
tableColumns
:
[
{
label
:
'编号'
,
prop
:
'
priceSection
'
,
prop
:
'
stateId
'
,
formatter
:
cellValue
=>
{
return
cellValue
.
priceSection
||
'-
-'
return
cellValue
.
stateId
||
'
-'
}
},
{
label
:
'所属门店/部门'
,
prop
:
'
priceSection
'
,
prop
:
'
departmentName
'
,
formatter
:
cellValue
=>
{
return
cellValue
.
priceSection
||
'-
-'
return
cellValue
.
departmentName
||
'
-'
}
},
{
label
:
'添加成员'
,
prop
:
'priceSection'
,
width
:
200
,
label
:
'成员'
,
prop
:
'staffName'
,
formatter
:
cellValue
=>
{
return
cellValue
.
priceSection
||
'-'
return
cellValue
.
staffName
||
'-'
}
},
{
label
:
'客户类型'
,
prop
:
'
priceSection
'
,
prop
:
'
businessType
'
,
width
:
200
,
formatter
:
cellValue
=>
{
return
cellValue
.
priceSection
||
'-
'
return
cellValue
.
priceSection
==
-
1
?
'战败客户'
:
'升级客户
'
}
},
{
label
:
'欢迎语'
,
prop
:
'
priceSection
'
,
prop
:
'
isWelcomeWord
'
,
width
:
200
,
formatter
:
cellValue
=>
{
return
cellValue
.
priceSection
||
'-
'
return
cellValue
.
isWelcomeWord
==
-
1
?
'否'
:
'是
'
}
},
{
label
:
'状态'
,
prop
:
'status'
,
addHtml
:
'status'
},
{
label
:
'操作'
,
prop
:
''
,
width
:
'100px'
,
...
...
@@ -146,6 +170,9 @@ export default {
glsxCombiForm
},
computed
:
{},
created
()
{
this
.
getMerchantList
()
},
mounted
()
{
document
.
getElementById
(
'app'
).
addEventListener
(
'click'
,
this
.
setClientType
)
},
...
...
@@ -153,9 +180,61 @@ export default {
document
.
getElementById
(
'app'
).
removeEventListener
(
'click'
,
this
.
setClientType
)
},
methods
:
{
// 获取当前选择的商户
getCurMerchant
(
val
)
{
console
.
log
(
val
,
7897
)
let
id
=
val
[
val
.
length
-
1
]
this
.
batchListSearch
.
departmentName
=
id
// 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
},
getMerchantList
()
{
this
.
$apis
.
expert
.
getMerchantTree
({}).
then
(
res
=>
{
this
.
shopList
=
this
.
traverse
(
2
,
res
,
'entmicroName'
,
'merchantAccountLevel'
)
})
},
traverse
(
type
,
arr
,
string1
,
string2
,
arr1
=
[])
{
arr
.
map
(
item
=>
{
// if (item[string1] || (item[string2] != 4 && type == 2)) {
// item.disabled = true
// } else {
// item.disabled = false
// }
if
(
item
.
children
&&
item
.
children
instanceof
Array
)
{
this
.
traverse
(
type
,
item
.
children
,
string1
,
string2
,
(
arr1
=
[]))
}
return
item
})
return
arr
},
setClientType
()
{
if
(
this
.
showClientType
)
this
.
showClientType
=
false
},
changStatus
(
openFlag
,
id
)
{
let
ids
=
[]
ids
.
push
(
id
)
let
target
=
'openConfigs'
if
(
openFlag
==
1
)
{
target
=
'closeConfigs'
}
let
params
=
{
ids
}
this
.
$apis
.
openconfig
[
target
](
params
).
then
(({
code
,
message
})
=>
{
if
(
code
==
0
)
{
this
.
$message
({
message
:
'操作成功!'
,
type
:
'success'
})
this
.
$refs
.
table
.
refreshTable
()
}
else
{
this
.
$message
.
error
(
message
)
}
})
},
addConfig
()
{
this
.
showClientType
=
true
},
...
...
@@ -176,21 +255,17 @@ export default {
const
urlpara
=
JSON
.
stringify
(
paraFormat
)
this
.
$router
.
push
({
path
:
'/expert/detail/'
+
urlpara
})
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
batchListSearch
=
{
...
this
.
setParams
()
}
resolve
()
})
},
setParams
()
{
const
params
=
{}
if
(
Array
.
isArray
(
this
.
batchListSearch
.
activeTime
)
&&
this
.
batchListSearch
.
activeTime
.
length
>
0
)
{
params
.
commitTimeStart
=
util
.
dateFormat
(
this
.
batchListSearch
.
activeTime
[
0
])
+
' 00:00:00'
params
.
commitTimeEnd
=
util
.
dateFormat
(
this
.
batchListSearch
.
activeTime
[
1
])
+
' 23:59:59'
}
params
.
searchText
=
'dasda'
return
params
},
// beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.batchListSearch = { ...this.setParams() }
// resolve()
// })
// },
// setParams() {
// const params = {}
// params.searchText = 'dasda'
// return params
// },
handleSearch
()
{
this
.
$refs
.
expertTable
.
refreshTable
()
},
...
...
@@ -254,6 +329,19 @@ export default {
padding
:
20px
20px
0
;
background-color
:
#fff
;
height
:
calc
(
100vh
-
148px
);
.select_wrapper
{
display
:
flex
;
align-items
:
center
;
.label
{
box-sizing
:
border-box
;
padding-right
:
10px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#333333
;
text-align
:
right
;
white-space
:
nowrap
;
}
}
.default-box
{
width
:
624px
;
position
:
absolute
;
...
...
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