Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 4a7b173d
authored
Apr 13, 2022
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
c3848470
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
118 additions
and
95 deletions
src/App.vue
src/api/modules/clientManage.js
src/main.js
src/mixins/tag.js
src/styles/index.scss
src/utils/filters.js
src/views/clientDataOverview/group.vue
src/views/clientManage/clientDetail.vue
src/views/tagsManage/components/tagGroup.vue
src/views/tagsManage/index.vue
src/App.vue
View file @
4a7b173
...
...
@@ -57,5 +57,16 @@ export default {
padding
:
20px
0
;
line-height
:
36px
;
}
#app
{
background
:
#f4f5fa
;
padding
:
0px
20px
20px
20px
;
position
:
absolute
;
box-sizing
:
border-box
;
width
:
100%
;
top
:
0px
;
left
:
0px
;
overflow-y
:
auto
;
height
:
100%
;
}
</
style
>
>
src/api/modules/clientManage.js
View file @
4a7b173
...
...
@@ -121,3 +121,14 @@ export function clientManageExportApi(params) {
sign
:
true
})
}
//根据userId完善客户手机号
export
function
perfectCustomerPhone
(
params
)
{
params
.
method
=
`entmicro.api.customer.perfectCustomerPhone`
return
http3
({
url
:
'http://192.168.3.193:8395/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
src/main.js
View file @
4a7b173
...
...
@@ -15,7 +15,7 @@ import '@/assets/css/public.scss'
// import 'glsx-components/dist/glsx-components.css'
import
'./styles/index.scss'
import
{
start
}
from
'@/setup'
import
glsxTable
from
'glsx-table'
;
import
glsxTable
from
'glsx-table'
import
{
message
}
from
'./plugins/element.js'
import
filters
from
'@/utils/filters'
import
*
as
echarts
from
'echarts'
...
...
@@ -27,7 +27,7 @@ Vue.use(VueAnimateNumber)
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$apis
=
apis
Vue
.
use
(
glsxTable
)
;
Vue
.
use
(
glsxTable
)
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
size
=
'small'
// Vue.prototype.btn_size = 'mini'
...
...
@@ -39,7 +39,6 @@ Vue.prototype.$echarts = echarts
Object
.
keys
(
filters
).
forEach
(
key
=>
{
Vue
.
filter
(
key
,
filters
[
key
])
})
start
()
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http2
=
params
=>
Vue
.
prototype
.
$http2
(
params
)
...
...
src/mixins/tag.js
View file @
4a7b173
...
...
@@ -144,14 +144,18 @@ export default {
pageSize
:
this
.
$refs
.
viewCustomers
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
viewCustomers
.
page
.
pageNum
}
getCustomersList
(
params
).
then
(
res
=>
{
this
.
userLoading
=
false
this
.
tableData
=
res
.
data
this
.
tableTotal
=
res
.
count
if
(
this
.
tableTotal
==
0
)
{
this
.
$refs
.
viewCustomers
.
setTableHeightFun
()
}
})
getCustomersList
(
params
)
.
then
(
res
=>
{
this
.
userLoading
=
false
this
.
tableData
=
res
.
data
this
.
tableTotal
=
res
.
count
if
(
this
.
tableTotal
==
0
)
{
this
.
$refs
.
viewCustomers
.
setTableHeightFun
()
}
})
.
catch
(
err
=>
{
this
.
userLoading
=
false
})
},
//创建人群
groupConfirmDialog
()
{
...
...
src/styles/index.scss
View file @
4a7b173
@import
'./variables.scss'
;
@import
'./common.scss'
;
@import
'./resetelement.scss'
;
@import
"./variables.scss"
;
@import
"./common.scss"
;
@import
"./resetelement.scss"
;
body
,
html
{
width
:
100%
;
...
...
@@ -34,10 +34,10 @@ button {
// 子系统不设外边距
.scrm-sub-client-container
{
padding
:
0
20px
20px
40px
;
//
padding: 0 20px 20px 40px;
box-sizing
:
border-box
;
}
.el-table
.cell
{
// line-height: 20px!important;
}
\ No newline at end of file
}
src/utils/filters.js
View file @
4a7b173
//过滤器
/* eslint-disable */
const
overThousandFilter
=
(
val
)
=>
{
if
(
typeof
(
val
)
!=
'number'
){
return
false
;
}
if
(
val
<
1000
)
return
val
;
let
a
=
val
+
""
;
let
b
=
a
.
split
(
""
);
b
.
splice
(
-
3
,
0
,
","
);
return
b
.
join
(
""
);
};
//来源 value值转为对应label(来源)
const
toLabel
=
(
value
)
=>
{
if
(
value
!==
0
&&
!
value
)
{
return
}
let
sourceList
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'sourceList'
));
let
curElement
=
sourceList
.
find
(
item
=>
{
return
item
.
value
===
value
})
return
curElement
.
label
}
import
Vue
from
'vue'
const
overThousandFilter
=
val
=>
{
if
(
typeof
val
!=
'number'
)
{
return
false
}
if
(
val
<
1000
)
return
val
let
a
=
val
+
''
let
b
=
a
.
split
(
''
)
b
.
splice
(
-
3
,
0
,
','
)
return
b
.
join
(
''
)
}
//来源 value值转为对应label(来源)
const
toLabel
=
value
=>
{
if
(
value
!==
0
&&
!
value
)
{
return
}
let
sourceList
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'sourceList'
))
let
curElement
=
sourceList
.
find
(
item
=>
{
return
item
.
value
===
value
})
return
curElement
.
label
}
const
tagType
=
value
=>
{
let
type
=
''
if
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'SCRM_BASE_SESSION'
)).
merchantModel
==
1
)
{
type
=
'集团'
}
else
{
type
=
'企业'
}
return
type
}
export
default
{
overThousandFilter
,
toLabel
};
overThousandFilter
,
toLabel
,
tagType
}
src/views/clientDataOverview/group.vue
View file @
4a7b173
...
...
@@ -76,16 +76,6 @@ export default {
},
tagsPartFormList
:
[
{
type
:
'input'
,
name
:
'carNumber'
,
label
:
'车牌号'
},
{
type
:
'input'
,
name
:
'audi'
,
label
:
'车系'
},
{
type
:
'select'
,
name
:
'followStaff'
,
optionId
:
'value'
,
...
...
@@ -125,12 +115,6 @@ export default {
label
:
'否'
}
]
},
{
type
:
'datePicker'
,
name
:
'createTime'
,
label
:
'购车时间'
,
isClear
:
true
}
],
crowdForm
:
{},
...
...
src/views/clientManage/clientDetail.vue
View file @
4a7b173
<
template
>
<div
class=
"scrm-sub-client-container"
>
<div
class=
"container"
>
<div
class=
"container"
v-loading=
"loading"
>
<div
class=
"leftWrap"
>
<div
class=
"avatorStyle"
>
<div
class=
"avator"
>
...
...
@@ -279,7 +279,7 @@
</template>
<
script
>
import
{
getAllTagTree
,
getSingleClientTag
,
addSingleClientTag
,
getTableDetail
}
from
'@/api/modules/clientManage'
import
{
getAllTagTree
,
getSingleClientTag
,
addSingleClientTag
,
getTableDetail
,
perfectCustomerPhone
}
from
'@/api/modules/clientManage'
import
tipPanel
from
'@/components/tipPanel/index.vue'
import
url
from
'@/assets/clientDetail/noDataBox.png'
export
default
{
...
...
@@ -294,6 +294,7 @@ export default {
isShowTooltip
:
false
,
remark
:
''
,
sloading
:
false
,
loading
:
false
,
expande
:
false
,
//车辆
deviceExpande
:
false
,
//设备
guaranteeExpande
:
false
,
//保单
...
...
@@ -699,8 +700,9 @@ export default {
})
},
async
getPageDetail
(
id
=
this
.
$route
.
query
.
id
)
{
this
.
loading
=
true
const
res
=
await
getTableDetail
({
oneId
:
id
})
this
.
loading
=
false
if
(
!
res
)
{
return
false
}
...
...
@@ -799,9 +801,21 @@ export default {
return
}
if
(
!
/^1
[
3456789
]\d{9}
$/
.
test
(
this
.
contactPhone
))
{
this
.
$message
.
error
(
'联系
号码格式错误
'
)
this
.
$message
.
error
(
'联系
电话不符合要求
'
)
return
}
let
param
=
{
pageSize
:
1
,
pageNum
:
1
,
customerPhone
:
this
.
contactPhone
,
userId
:
this
.
nickNameList
[
0
].
userId
}
perfectCustomerPhone
(
param
).
then
(
res
=>
{
if
(
res
)
{
this
.
getPageDetail
()
this
.
$message
.
success
(
'设置成功'
)
}
})
this
.
phoneVisible
=
false
},
handleConfirm
()
{
...
...
src/views/tagsManage/components/tagGroup.vue
View file @
4a7b173
...
...
@@ -5,10 +5,10 @@
<span
@
click=
"resetTree"
>
重置
</span>
</div>
<el-tree
@
check=
"checkChange"
class=
"tag-tree"
ref=
"tagTree"
:data=
"labelTree"
:props=
"defaultProps"
show-checkbox
node-key=
"id"
default-expand-all
:expand-on-click-node=
"false"
:filter-node-method=
"filterNode"
>
<el-tree
@
check=
"checkChange"
class=
"tag-tree"
ref=
"tagTree"
:data=
"labelTree"
:props=
"defaultProps"
@
node-click=
"nodeClick"
show-checkbox
node-key=
"id"
default-expand-all
:expand-on-click-node=
"false"
:filter-node-method=
"filterNode"
>
<div
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span
:class=
"['tree-node', `node_$
{data.id}`]">
{{
node
.
label
}}
</span>
<span
v-if=
"data.labelType && data.labelType != '系统标签' && isShowEditBtn(data.labelDTO)"
@
click=
"editTree(data)"
>
<span
v-if=
"data.labelType && data.labelType != '系统标签' && isShowEditBtn(data.labelDTO)"
@
click
.
stop
=
"editTree(data)"
>
<i
class=
"el-icon-edit-outline"
></i>
</span>
</div>
...
...
@@ -55,7 +55,7 @@ export default {
}
if
(
accountLevel
!==
1
)
{
//如果是企业标签不显示
if
(
row
.
labelType
==
'企业标签'
)
{
if
(
row
.
labelType
==
'企业标签'
||
row
.
labelType
==
'集团标签'
)
{
return
false
}
return
true
...
...
@@ -63,6 +63,9 @@ export default {
}
return
true
//门店版都显示编辑按钮
},
nodeClick
(
data
)
{
!
data
.
sort
&&
document
.
querySelector
(
`.node_
${
data
.
id
}
`
).
parentElement
.
previousElementSibling
.
click
()
},
handleScroll
(
height
)
{
document
.
querySelector
(
'.tag-tree'
).
scrollTop
=
height
},
...
...
@@ -115,18 +118,19 @@ export default {
id
:
item
.
labelGroup
.
id
,
name
:
item
.
labelGroup
.
name
,
children
:
item
.
labelList
,
labelType
:
item
.
labelType
,
labelType
:
item
.
labelType
==
'企业标签'
&&
this
.
$globalState
.
session
.
merchantModel
==
1
?
'集团标签'
:
item
.
labelType
,
labelDTO
:
item
}
})
const
labelType
=
this
.
$globalState
.
session
.
merchantModel
==
1
?
'集团标签'
:
'企业标签'
labelTreeRets
.
forEach
(
item
=>
{
const
index
=
this
.
labelTree
.
findIndex
(
ret
=>
ret
.
name
==
item
.
labelType
)
if
(
index
==
-
1
)
{
this
.
labelTree
.
push
({
id
:
item
.
labelType
==
'系统标签'
?
1
:
item
.
labelType
==
'企业标签'
?
2
:
3
,
id
:
item
.
labelType
==
'系统标签'
?
1
:
item
.
labelType
==
labelType
?
2
:
3
,
name
:
item
.
labelType
,
children
:
[
item
],
sort
:
item
.
labelType
==
'系统标签'
?
1
:
item
.
labelType
==
'企业标签'
?
2
:
3
sort
:
item
.
labelType
==
'系统标签'
?
1
:
item
.
labelType
==
labelType
?
2
:
3
})
}
else
{
this
.
labelTree
[
index
].
children
.
push
(
item
)
...
...
@@ -136,7 +140,6 @@ export default {
this
.
$nextTick
(()
=>
{
status
&&
this
.
updateTreeNode
()
})
this
.
loading
=
false
})
}
...
...
src/views/tagsManage/index.vue
View file @
4a7b173
...
...
@@ -8,13 +8,14 @@
<span>
共有
{{
numberObj
.
groupCount
||
0
}}
个标签组
<!-- v-if="!(merchantModel == 1 && accountLevel == 4)" -->
<template>
,
{{
numberObj
.
bizLabelCount
||
0
}}
个
企业
标签
</
template
>
<template>
,
{{
numberObj
.
bizLabelCount
||
0
}}
个
{{
'企业'
|
tagType
}}
标签
</
template
>
<
template
v-if=
"!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))"
>
,
{{
numberObj
.
rcLabelCount
||
0
}}
个自店标签
</
template
>
<
template
>
,
{{
numberObj
.
traLabelCount
||
0
}}
个系统标签
</
template
>
</span>
<span
class=
"iconPanelWrap"
v-if=
"!isFirstShow"
>
<el-popover
placement=
"top"
width=
"666"
trigger=
"hover"
>
<!-- v-if="!(merchantModel == 1 && accountLevel == 4)" -->
<div>
企业
标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;
</div>
<div>
{{ '企业' | tagType }}
标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;
</div>
<div
v-if=
"!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))"
>
自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;
</div>
<div>
系统标签为通过大数据算法规则生成的标签
</div>
<img
src=
"@/assets/tagsManage/question.png"
slot=
"reference"
alt=
""
/>
...
...
@@ -22,7 +23,7 @@
</span>
</span>
<div
class=
"initPanel"
v-if=
"isFirstShow"
>
<
template
>
企业
标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;
</
template
>
<
template
>
{{
'企业'
|
tagType
}}
标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;
</
template
>
<
template
v-if=
"!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))"
>
自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;
</
template
>
系统标签为通过大数据算法规则生成的标签
<img
src=
"@/assets/tagsManage/Shape.png"
alt=
""
/>
...
...
@@ -84,6 +85,7 @@
<el-button
plain
size=
"small"
:disabled=
"tagCheckItem.length == 0"
@
click=
"
groupVisible = true
crowdForm = {
...
...
@@ -165,7 +167,7 @@
</el-select>
<!-- id="tagTipMsgRef" -->
<span
class=
"tagTipMsg"
v-if=
"tagDialogTitle == '添加标签组' && !tagForm.initTagsGroup"
>
<
template
v-if=
"!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))"
>
企业
标签
</
template
>
<
template
v-if=
"!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))"
>
{{
'企业'
|
tagType
}}
标签
</
template
>
<
template
v-if=
"!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))"
>
<template
v-if=
"!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))"
>
和
</
template
>
自店标签分别
...
...
@@ -173,7 +175,7 @@
最多3000个
</span>
<span
class=
"tagTipMsg"
v-if=
"tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 1"
>
企业
标签已创建
{{ '企业' | tagType }}
标签已创建
<span
class=
"pure-blue-text"
>
{{ numberObj.bizLabelCount }}
</span>
个
</span>
...
...
@@ -184,7 +186,7 @@
</span>
<span
class=
"tagTipMsg"
v-if=
"tagDialogTitle == '编辑标签组'"
>
{{ tagForm.initTagsGroup == 1 ?
'企业标签'
: '自店标签' }}最多3000个,已创建
{{ tagForm.initTagsGroup == 1 ?
(this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签')
: '自店标签' }}最多3000个,已创建
<span
class=
"pure-blue-text"
>
{{ tagForm.initTagsGroup == 1 ? numberObj.bizLabelCount : numberObj.rcLabelCount }}
</span>
个
</span>
...
...
@@ -326,16 +328,6 @@ export default {
},
tagsPartFormList
:
[
{
type
:
'input'
,
name
:
'carNumber'
,
label
:
'车牌号'
},
{
type
:
'input'
,
name
:
'audi'
,
label
:
'车系'
},
{
type
:
'select'
,
name
:
'followStaff'
,
optionId
:
'value'
,
...
...
@@ -375,12 +367,6 @@ export default {
label
:
'否'
}
]
},
{
type
:
'datePicker'
,
name
:
'createTime'
,
label
:
'购车时间'
,
isClear
:
true
}
],
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
...
...
@@ -505,7 +491,7 @@ export default {
// tagsList: [{ required: true }]
},
tagsGroupList
:
[
{
id
:
1
,
name
:
'企业标签'
},
{
id
:
1
,
name
:
this
.
$globalState
.
session
.
merchantModel
==
1
?
'集团标签'
:
'企业标签'
},
{
id
:
2
,
name
:
'自店标签'
}
],
modeList
:
[{
id
:
1
,
name
:
'人工'
}],
...
...
@@ -624,7 +610,7 @@ export default {
}
if
(
this
.
accountLevel
!==
1
)
{
//如果是企业标签不显示
if
(
row
.
labelType
==
'企业标签'
)
{
if
(
row
.
labelType
==
'企业标签'
||
row
.
labelType
==
'集团标签'
)
{
return
false
}
return
true
...
...
@@ -714,7 +700,7 @@ export default {
this
.
tagGroupId
=
rowData
.
labelGroup
.
id
//标签组id
this
.
tagForm
.
tagsName
=
rowData
.
labelGroup
.
name
//标签组名
this
.
tagForm
.
initTagsGroup
=
rowData
.
labelType
==
'企业标签'
?
1
:
rowData
.
labelType
==
'自店标签'
?
2
:
''
//标签组类型
this
.
tagForm
.
initTagsGroup
=
rowData
.
labelType
==
'企业标签'
||
rowData
.
labelType
==
'集团标签'
?
1
:
rowData
.
labelType
==
'自店标签'
?
2
:
''
//标签组类型
},
handleConfirm
()
{
this
.
$refs
.
tagForm
.
$children
[
0
].
validate
(
valid
=>
{
...
...
@@ -811,7 +797,7 @@ export default {
// params.staffId = '员工A'
params
[
'labelDTO.labelGroup.name'
]
=
this
.
tagForm
.
tagsName
params
[
'labelDTO.labelType'
]
=
this
.
tagForm
.
initTagsGroup
==
1
?
'企业标签'
:
'自店标签'
params
[
'labelDTO.labelType'
]
=
this
.
tagForm
.
initTagsGroup
==
1
?
(
this
.
$globalState
.
session
.
merchantModel
==
1
?
'集团标签'
:
'企业标签'
)
:
'自店标签'
params
[
'labelDTO.labelList'
]
=
this
.
tagForm
.
tagsList
params
[
'labelDTO.isAddLabelGroupEnter'
]
=
this
.
tagDialogTitle
==
'添加标签组'
?
true
:
false
...
...
@@ -852,7 +838,7 @@ export default {
param
[
'labelDTO.labelGroup.id'
]
=
this
.
tagGroupId
param
[
'labelDTO.labelGroup.name'
]
=
this
.
tagForm
.
tagsName
param
[
'labelDTO.labelType'
]
=
this
.
tagForm
.
initTagsGroup
==
1
?
'企业标签'
:
'自店标签'
param
[
'labelDTO.labelType'
]
=
this
.
tagForm
.
initTagsGroup
==
1
?
(
this
.
$globalState
.
session
.
merchantModel
==
1
?
'集团标签'
:
'企业标签'
)
:
'自店标签'
param
[
'labelDTO.shopId'
]
=
this
.
merchantId
let
editTagList
=
this
.
editTagList
.
map
(
item
=>
{
return
{
...
...
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