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 c4b41bc2
authored
Jan 07, 2022
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.0.2内容调整
1 parent
291cb446
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
998 additions
and
494 deletions
src/api/modules/clientGroupManage.js
src/api/modules/clientManage.js
src/api/modules/tagsManage.js
src/common/util.js
src/components/search-form/index.vue
src/components/tipPanel/index.vue
src/setup/qiankun.js
src/views/clientGroupManage/clientGroupDetail.vue
src/views/clientGroupManage/clientGroupDetailNext.vue → src/views/clientGroupManage/clientGroupDetailold.vue
src/views/clientGroupManage/components/client.vue
src/views/clientGroupManage/components/followEmployee.vue
src/views/clientGroupManage/components/leaveGroupClient.vue
src/views/clientGroupManage/components/potentialClient.vue
src/views/clientGroupManage/index.vue
src/views/clientManage/clientDetail.vue
src/views/clientManage/index.vue
src/views/tagsManage/index.vue
src/api/modules/clientGroupManage.js
View file @
c4b41bc
...
...
@@ -57,3 +57,106 @@
})
}
/*
未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示
*/
export
function
getStatus
(
params
)
{
params
.
method
=
'scrm.api.work.wechat.access.status'
return
http
({
url
:
'/rop-scrm-wechat/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
/*
跟进员工
*/
// POST /router/entmicro.api.customer.base.staff.page/1.0.0
export
function
getDetailStaffTableList
(
params
){
params
.
method
=
'entmicro.api.customer.base.staff.page'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
/*
退群客户
*/
export
function
getDetailQuitTableList
(
params
){
params
.
method
=
'entmicro.api.customer.base.quit.cust.page'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
/*
潜在客户
*/
export
function
getDetailPotentialTableList
(
params
){
params
.
method
=
'entmicro.api.customer.base.potential.cust.page'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//客户群管理(群聊管理)导出
export
function
clientGroupExportApi
(
params
){
params
.
method
=
`entmicro.api.customer.base.list.export`
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
// 全部客户导出
export
function
clientExportApi
(
params
){
params
.
method
=
`entmicro.api.customer.base.cust.export`
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//跟进员工导出
export
function
followEmployeeExportApi
(
params
){
params
.
method
=
`entmicro.api.customer.base.staff.export`
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//退群客户导出
export
function
leaveGroupExportApi
(
params
){
params
.
method
=
`entmicro.api.customer.base.quit.export`
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//潜在客户导出
export
function
potentialClientExportApi
(
params
){
params
.
method
=
`entmicro.api.customer.base.potential.export`
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
\ No newline at end of file
src/api/modules/clientManage.js
View file @
c4b41bc
...
...
@@ -103,3 +103,15 @@
sign
:
true
})
}
// entmicro.api.customer.list.export
//客户信息管理导出
export
function
clientManageExportApi
(
params
){
params
.
method
=
`entmicro.api.customer.list.export`
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
\ No newline at end of file
src/api/modules/tagsManage.js
View file @
c4b41bc
...
...
@@ -32,7 +32,7 @@
})
}
// /router/datahub.api.label.addlabel/1.0.0
export
function
newAddTag
(
params
){
params
.
method
=
'scrm.api.datahub.label.addlabel'
// params.method='scrm.api.datahub.labelgroup.addLabel'
...
...
src/common/util.js
View file @
c4b41bc
...
...
@@ -5,6 +5,42 @@ import Vue from 'vue'
let
loadingInstance
=
''
export
const
Util
=
{
getExplorer
:
function
()
{
var
ua
=
navigator
.
userAgent
.
toLocaleLowerCase
()
var
browserType
=
null
if
(
ua
.
match
(
/msie/
)
!=
null
||
ua
.
match
(
/trident/
)
!=
null
)
{
browserType
=
'IE'
}
else
if
(
ua
.
match
(
/firefox/
)
!=
null
)
{
browserType
=
'火狐'
}
else
if
(
ua
.
match
(
/ubrowser/
)
!=
null
)
{
browserType
=
'UC'
}
else
if
(
ua
.
match
(
/opera/
)
!=
null
)
{
browserType
=
'欧朋'
}
else
if
(
ua
.
match
(
/bidubrowser/
)
!=
null
)
{
browserType
=
'百度'
}
else
if
(
ua
.
match
(
/metasr/
)
!=
null
)
{
browserType
=
'搜狗'
}
else
if
(
ua
.
match
(
/tencenttraveler/
)
!=
null
||
ua
.
match
(
/qqbrowse/
)
!=
null
)
{
browserType
=
'QQ'
}
else
if
(
ua
.
match
(
/maxthon/
)
!=
null
)
{
browserType
=
'遨游'
}
else
{
browserType
=
'谷歌'
}
return
browserType
},
exportFn
:
function
(
url
)
{
let
browserType
=
getExplorer
()
if
(
browserType
==
'QQ'
)
{
window
.
open
(
url
)
return
}
let
iframe
=
document
.
createElement
(
'iframe'
)
iframe
.
style
.
display
=
'none'
iframe
.
src
=
url
document
.
body
.
appendChild
(
iframe
)
},
/**
* 校验手机号码格式
*/
...
...
@@ -122,4 +158,6 @@ export const Util = {
export
const
validationTel
=
Util
.
validationTel
;
export
const
checkPhone
=
Util
.
checkPhone
;
export
const
getExplorer
=
Util
.
getExplorer
;
export
const
exportFn
=
Util
.
exportFn
;
src/components/search-form/index.vue
View file @
c4b41bc
...
...
@@ -18,6 +18,7 @@
</div>
</div>
<div
class=
"firstRowBtn"
v-if=
"!expande && isShowBtns && isNeedThreeBtns"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
size=
"small"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
size=
"small"
>
查询
</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" -->
...
...
@@ -92,6 +93,10 @@ export default {
type
:
Boolean
,
default
:
false
},
isThreeRowShow
:{
type
:
Boolean
,
default
:
false
},
merchantModel
:
{
type
:
Number
,
default
:
1
...
...
@@ -123,8 +128,9 @@ export default {
//调用默认时间(30天)
this
.
getPassMonthFormatDate
()
}
this
.
$nextTick
(()
=>
{
var
sf
=
document
.
getElementById
(
'searchForm'
)
// this.$nextTick(() => {
console
.
log
(
sf
.
clientWidth
,
'555'
)
if
(
sf
.
clientWidth
<
1280
&&
this
.
isHasSyncBtn
)
{
console
.
log
(
sf
.
clientWidth
,
'sf'
)
document
.
querySelector
(
'.itemWidth'
).
style
.
maxWidth
=
700
+
'px'
...
...
@@ -132,16 +138,26 @@ export default {
if
(
sf
.
clientWidth
<
952
&&
this
.
isHasSyncBtn
)
{
this
.
isShowBtns
=
false
}
let
lineHeight
=
75
//75
let
lineHeight
=
75
//75
if
(
document
.
getElementById
(
'searchForm'
).
offsetHeight
>
lineHeight
*
2
)
{
//
console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
console
.
log
(
'第一次searchForm高度'
,
document
.
getElementById
(
'searchForm'
).
offsetHeight
)
this
.
expande
=
false
this
.
needShowExpande
=
true
}
else
{
this
.
needShowExpande
=
false
this
.
expande
=
true
}
if
(
sf
.
clientWidth
<
840
&&
this
.
isThreeRowShow
){
document
.
querySelector
(
'.itemWidth'
).
style
.
minHeight
=
document
.
querySelector
(
'.itemWidth'
).
offsetHeight
+
50
+
'px'
// 客户群里面四个表做特殊处理,当为苹果笔记本电脑尺寸时,不是现实展开收起按钮
this
.
needShowExpande
=
false
this
.
expande
=
true
}
})
//有数据不算表格高度,没数据算高度
// setTimeout(() => {
// this.$emit('setTableHeightEvent')
...
...
@@ -209,12 +225,15 @@ export default {
syncClick
()
{
this
.
$emit
(
'syncClick'
)
},
handleExport
(){
this
.
$emit
(
'handleExport'
)
},
expandeClick
()
{
this
.
expande
=
!
this
.
expande
setTimeout
(()
=>
{
this
.
$emit
(
'setTableHeightEvent'
)
},
200
)
//
setTimeout(() => {
//
this.$emit('setTableHeightEvent')
//
}, 200)
},
//时间选择器显示默认一月的时间
/* 获取过去时间,并传值给现在时间 */
...
...
@@ -257,7 +276,7 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.search-form
{
padding
:
18px
25px
0
0
;
padding
:
18px
0
0
0
;
position
:
relative
;
overflow
:
hidden
;
min-height
:
50px
;
...
...
@@ -271,11 +290,11 @@ export default {
right
:
52px
;
z-index
:
1
;
.el-button
+
.el-button
{
margin-left
:
2
0px
;
margin-left
:
1
0px
;
}
}
.itemWidth
{
max-width
:
10
50
px
;
max-width
:
10
27
px
;
min-width
:
660px
;
}
.expande-button-wrap
{
...
...
@@ -314,6 +333,10 @@ export default {
.el-select
{
width
:
215px
;
}
.el-select
>
.el-input
{
width
:
215px
;
}
.el-form-item__content
{
width
:
100%
;
}
...
...
src/components/tipPanel/index.vue
0 → 100644
View file @
c4b41bc
<
template
>
<div>
<div
class=
"initPanel"
:style=
"
{ width: panelWidth, minHeight: panelMinHeight }">
{{
panelContent
}}
<img
src=
"@/assets/tagsManage/Shape.png"
alt=
""
/>
<i
class=
"el-icon-close"
v-if=
"isShowCloseBtn"
@
click=
"closeInitPanel"
></i>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
panelWidth
:
{
type
:
String
,
default
:
''
},
panelMinHeight
:
{
type
:
String
,
default
:
'20px'
},
panelContent
:
{
type
:
String
,
default
:
'请传入面板内容'
},
isShowCloseBtn
:{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{}
},
methods
:
{
closeInitPanel
()
{
this
.
$emit
(
'closePanel'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.initPanel
{
position
:
relative
;
margin-bottom
:
20px
;
box-sizing
:
border-box
;
background
:
#e6e9ff
;
border
:
1px
solid
#5850ff
;
border-radius
:
4px
;
padding
:
10px
38px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
line-height
:
20px
;
img
{
position
:
absolute
;
left
:
16px
;
top
:
13px
;
}
i
{
position
:
absolute
;
top
:
14px
;
right
:
18px
;
width
:
9px
;
height
:
9px
;
cursor
:
pointer
;
}
}
</
style
>
src/setup/qiankun.js
View file @
c4b41bc
...
...
@@ -19,6 +19,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
"md5"
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
...
...
src/views/clientGroupManage/clientGroupDetail.vue
View file @
c4b41bc
...
...
@@ -43,35 +43,27 @@
</p>
</div>
<div
class=
"rightWrap"
>
<p>
<span>
全部客户
</span>
<span>
{{
clientTableDataNum
||
0
}}
个
</span>
</p>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
class=
"flex-center"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-tooltip>
<div
class=
"choseRow"
>
<div
class=
"choseItem"
:class=
"
{ activeItem: currentIndex == index }" v-for="(item, index) in titles" :key="index" @click="tabClick(index)">
<span>
{{
item
.
name
}}
<template>
(
{{
item
.
personNum
||
0
}}
)个
</
template
>
</span>
</div>
</div>
<
template
v-if=
"currentIndex == 0"
>
<client
ref=
"childComp"
:url=
"url"
@
goDetail=
"goDetail"
></client>
</
template
>
<
template
v-if=
"currentIndex == 1"
>
<follow-employee
ref=
"childComp"
:url=
"url"
></follow-employee>
</
template
>
<
template
v-if=
"currentIndex == 2"
>
<leave-group-client
ref=
"childComp"
:url=
"url"
@
goDetail=
"goDetail"
></leave-group-client>
</
template
>
<
template
v-if=
"currentIndex == 3"
>
<potential-client
ref=
"childComp"
:url=
"url"
></potential-client>
</
template
>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
<basic-dialog
title=
""
width=
"547px"
:isVisible=
"dialogVisible"
btnOkLabel=
"我知道了"
:isHasCancelBtn=
"false"
@
confirmDialog=
"handleConfirm"
@
closeDialog=
"handleClose"
>
<div
class=
"content-body"
>
<p>
该客户暂无员工跟进,无法查看该客户详情,
</p>
...
...
@@ -84,133 +76,53 @@
</template>
<
script
>
import
{
getTableDetail
,
getDetailTableList
,
getClientTableDetail
}
from
'@/api/modules/clientGroupManage'
import
{
getTableDetail
,
getClientTableDetail
}
from
'@/api/modules/clientGroupManage'
import
client
from
'@/views/clientGroupManage/components/client.vue'
import
followEmployee
from
'@/views/clientGroupManage/components/followEmployee.vue'
import
leaveGroupClient
from
'@/views/clientGroupManage/components/leaveGroupClient.vue'
import
potentialClient
from
'@/views/clientGroupManage/components/potentialClient.vue'
import
url
from
'@/assets/clientDataOverview/nodata.png'
export
default
{
name
:
'clientGroupDetail'
,
components
:
{
client
,
followEmployee
,
leaveGroupClient
,
potentialClient
},
data
()
{
return
{
dialogVisible
:
false
,
groupName
:
this
.
$route
.
query
.
groupName
,
url
:
url
,
leftPanelList
:
{},
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
// ['全部客户', '跟进员工', '退群客户', '潜在客户']
titles
:
[
{
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
name
:
'全部客户'
,
personNum
:
0
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
name
:
'跟进员工'
,
personNum
:
0
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
name
:
'退群客户'
,
personNum
:
0
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
name
:
'潜在客户'
,
personNum
:
0
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName
:
'data'
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
,
minWidth
:
100
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
},
getListApi
:
getDetailTableList
,
clientTableDataNum
:
0
,
currentIndex
:
0
,
groupName
:
this
.
$route
.
query
.
groupName
,
url
:
url
,
leftPanelList
:
{},
flushTime
:
false
}
},
created
()
{
this
.
getTableDetail
()
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
mounted
()
{
// this.$nextTick(() => {
// this.searchTable()
// })
},
// watch: {
// 'searchForm.daterange':{
// deep: true,
...
...
@@ -226,55 +138,30 @@ export default {
// },
methods
:
{
// getTotal(num) {
// if (this.currentIndex == 0) {
// this.$set(this.titles[0], 'personNum', num)
// }
// },
tabClick
(
index
)
{
this
.
currentIndex
=
index
},
async
getTableDetail
(
id
=
this
.
$route
.
query
.
id
)
{
const
res
=
await
getTableDetail
({
id
:
id
})
const
res
=
await
getTableDetail
({
id
:
id
,
pageNum
:
1
,
pageSize
:
10
})
console
.
log
(
'获取客户群数据'
,
res
)
if
(
!
res
)
{
return
false
}
this
.
leftPanelList
=
res
this
.
$set
(
this
.
titles
[
0
],
'personNum'
,
res
.
allCount
)
this
.
$set
(
this
.
titles
[
1
],
'personNum'
,
res
.
staffCount
)
this
.
$set
(
this
.
titles
[
2
],
'personNum'
,
res
.
quitCount
)
this
.
$set
(
this
.
titles
[
3
],
'personNum'
,
res
.
potentialCount
)
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
// console.log(this.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(this.searchForm)
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
goBack
()
{
this
.
$router
.
push
({
path
:
'/clientGroupManage/index'
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
handleClose
()
{
this
.
dialogVisible
=
!
this
.
dialogVisible
},
...
...
@@ -390,32 +277,50 @@ export default {
}
}
.rightWrap
{
position
:
relative
;
margin-left
:
20px
;
width
:
calc
(
100%
-
260px
);
box-sizing
:
border-box
;
background-color
:
#fff
;
padding
:
20px
;
>
p
{
height
:
20px
;
line-height
:
20px
;
margin-bottom
:
10px
;
span
{
vertical-align
:
middle
;
}
span
:first-child
{
font-size
:
18px
;
font-weight
:
400
;
color
:
#333333
;
padding-top
:
50px
;
.choseRow
{
position
:
absolute
;
width
:
100%
;
left
:
0
;
top
:
0
;
display
:
flex
;
background-color
:
$
bgColor
;
z-index
:
10
;
.choseItem
{
height
:
40px
;
line-height
:
40px
;
width
:
180px
;
box-sizing
:
border-box
;
background
:
#ffffff
;
text-align
:
center
;
border
:
1px
solid
#eeedff
;
cursor
:
pointer
;
&:first-child
{
border-left
:
0
;
}
span
{
font-weight
:
400
;
font-size
:
14px
;
color
:
#37383a
;
}
}
span
:nth-child
(
2
)
{
margin-left
:
6px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
$
btnBlue
;
height
:
20px
;
line-height
:
20px
;
.activeItem
{
border-radius
:
4px
4px
0
0
;
span
{
color
:
$
btnBlue
;
font-weight
:
600
;
}
box-sizing
:
border-box
;
border-bottom
:
0
!
important
;
}
}
.el-button
+
.el-button
{
margin-left
:
20px
;
}
...
...
@@ -439,7 +344,7 @@ export default {
}
}
}
/
deep
/
.el-dialog__header
{
/
deep
/
.el-dialog__header
{
border
:
0
;
}
/
deep
/
.el-dialog__body
{
...
...
src/views/clientGroupManage/clientGroupDetail
Next
.vue
→
src/views/clientGroupManage/clientGroupDetail
old
.vue
View file @
c4b41bc
...
...
@@ -43,25 +43,36 @@
</p>
</div>
<div
class=
"rightWrap"
>
<div
class=
"choseRow"
>
<div
class=
"choseItem"
:class=
"
{ activeItem: currentIndex == index }" v-for="(item, index) in titles" :key="index" @click="tabClick(index)">
<span>
{{
item
.
name
}}
<template
v-if=
"currentIndex == index"
>
(
{{
item
.
personNum
||
0
}}
)个
</
template
>
</span>
</div>
</div>
<
template
v-if=
"currentIndex == 0"
>
<client
ref=
"childComp"
:url=
"url"
@
goDetail=
"goDetail"
@
getTotal=
"getTotal"
></client>
</
template
>
<
template
v-if=
"currentIndex == 1"
>
<follow-employee
ref=
"childComp"
:url=
"url"
@
getTotal=
"getTotal"
></follow-employee>
</
template
>
<
template
v-if=
"currentIndex == 2"
>
<leave-group-client
ref=
"childComp"
:url=
"url"
@
goDetail=
"goDetail"
></leave-group-client>
</
template
>
<
template
v-if=
"currentIndex == 3"
></
template
>
<p>
<span>
全部客户
</span>
<span>
{{
clientTableDataNum
||
0
}}
个
</span>
</p>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
class=
"flex-center"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-tooltip>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
<basic-dialog
title=
""
width=
"547px"
:isVisible=
"dialogVisible"
btnOkLabel=
"我知道了"
:isHasCancelBtn=
"false"
@
confirmDialog=
"handleConfirm"
@
closeDialog=
"handleClose"
>
<div
class=
"content-body"
>
<p>
该客户暂无员工跟进,无法查看该客户详情,
</p>
...
...
@@ -74,53 +85,133 @@
</template>
<
script
>
import
{
getTableDetail
,
getClientTableDetail
}
from
'@/api/modules/clientGroupManage'
import
client
from
'@/views/clientGroupManage/components/client.vue'
import
followEmployee
from
'@/views/clientGroupManage/components/followEmployee.vue'
import
leaveGroupClient
from
'@/views/clientGroupManage/components/leaveGroupClient.vue'
import
{
getTableDetail
,
getDetailTableList
,
getClientTableDetail
}
from
'@/api/modules/clientGroupManage'
import
url
from
'@/assets/clientDataOverview/nodata.png'
export
default
{
name
:
'clientGroupDetail'
,
components
:
{
client
,
followEmployee
,
leaveGroupClient
},
data
()
{
return
{
dialogVisible
:
false
,
// ['全部客户', '跟进员工', '退群客户', '潜在客户']
titles
:
[
groupName
:
this
.
$route
.
query
.
groupName
,
url
:
url
,
leftPanelList
:
{},
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
{
name
:
'全部客户'
,
personNum
:
0
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
},
{
name
:
'跟进员工'
,
personNum
:
0
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
},
{
name
:
'退群客户'
,
personNum
:
0
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
},
{
name
:
'潜在客户'
,
personNum
:
0
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
],
currentIndex
:
0
,
groupName
:
this
.
$route
.
query
.
groupName
,
url
:
url
,
leftPanelList
:
{},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName
:
'data'
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
,
minWidth
:
100
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
},
getListApi
:
getDetailTableList
,
clientTableDataNum
:
0
,
flushTime
:
false
}
},
created
()
{
this
.
getTableDetail
()
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
mounted
()
{
// this.$nextTick(() => {
// this.searchTable()
// })
},
// watch: {
// 'searchForm.daterange':{
// deep: true,
...
...
@@ -136,14 +227,6 @@ export default {
// },
methods
:
{
getTotal
(
num
)
{
if
(
this
.
currentIndex
==
0
)
{
this
.
$set
(
this
.
titles
[
0
],
'personNum'
,
num
)
}
},
tabClick
(
index
)
{
this
.
currentIndex
=
index
},
async
getTableDetail
(
id
=
this
.
$route
.
query
.
id
)
{
const
res
=
await
getTableDetail
({
id
:
id
})
console
.
log
(
'获取客户群数据'
,
res
)
...
...
@@ -152,11 +235,53 @@ export default {
}
this
.
leftPanelList
=
res
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
// console.log(this.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(this.searchForm)
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
goBack
()
{
this
.
$router
.
push
({
path
:
'/clientGroupManage/index'
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
handleClose
()
{
this
.
dialogVisible
=
!
this
.
dialogVisible
},
handleConfirm
()
{
this
.
handleClose
()
},
goDetail
(
id
)
{
// 接口通过了跳转
getClientTableDetail
({
oneId
:
id
}).
then
(
res
=>
{
...
...
@@ -266,50 +391,32 @@ export default {
}
}
.rightWrap
{
position
:
relative
;
margin-left
:
20px
;
width
:
calc
(
100%
-
260px
);
box-sizing
:
border-box
;
background-color
:
#fff
;
padding
:
20px
;
padding-top
:
50px
;
.choseRow
{
position
:
absolute
;
width
:
100%
;
left
:
0
;
top
:
0
;
display
:
flex
;
background-color
:
$
bgColor
;
z-index
:
10
;
padding
:
2px
0
0
0
;
.choseItem
{
height
:
40px
;
line-height
:
40px
;
width
:
180px
;
//
background
:
#FFFFFF
;
text-align
:
center
;
border
:
1px
solid
#eeedff
;
border-bottom
:
0
;
&:first-child
{
border-left
:
0
;
}
span
{
font-weight
:
400
;
font-size
:
14px
;
color
:
#37383a
;
}
>
p
{
height
:
20px
;
line-height
:
20px
;
margin-bottom
:
10px
;
span
{
vertical-align
:
middle
;
}
.activeItem
{
border-radius
:
4px
4px
0
0
;
background-color
:
#fff
;
span
{
color
:
$
btnBlue
;
font-weight
:
600
;
}
span
:first-child
{
font-size
:
18px
;
font-weight
:
400
;
color
:
#333333
;
}
span
:nth-child
(
2
)
{
margin-left
:
6px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
$
btnBlue
;
height
:
20px
;
line-height
:
20px
;
}
}
.el-button
+
.el-button
{
margin-left
:
20px
;
}
...
...
@@ -333,5 +440,27 @@ export default {
}
}
}
/
deep
/
.el-dialog__header
{
border
:
0
;
}
/
deep
/
.el-dialog__body
{
border-bottom
:
1px
solid
#e6e6e6
;
padding
:
0px
65px
35px
;
min-height
:
0
;
.container
{
font-size
:
18px
;
text-align
:
center
;
font-weight
:
400
;
color
:
#333333
;
.bottomText
{
margin-top
:
10px
;
}
}
}
/
deep
/
.el-dialog__footer
{
text-align
:
center
;
padding-top
:
15px
;
padding-bottom
:
15px
;
}
}
</
style
>
src/views/clientGroupManage/components/client.vue
View file @
c4b41bc
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:is
NeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<search-form
class=
"searchTop border-shadow"
:is
HasSyncBtn=
"true"
:isThreeRowShow=
"true"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
...
...
@@ -29,7 +30,7 @@
</template>
<
script
>
import
{
getDetailTableList
}
from
'@/api/modules/clientGroupManage'
import
{
getDetailTableList
,
clientExportApi
}
from
'@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
...
...
@@ -98,16 +99,19 @@ export default {
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
prop
:
'groupNickName'
,
minWidth
:
120
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
addHtml
:
'customerName'
,
minWidth
:
150
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
prop
:
'customerPhone'
,
minWidth
:
120
},
{
label
:
'性别'
,
...
...
@@ -117,11 +121,13 @@ export default {
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
addHtml
:
'joinScene'
,
minWidth
:
120
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
prop
:
'invitorName'
,
minWidth
:
120
},
{
label
:
'入群时间'
,
...
...
@@ -149,16 +155,31 @@ export default {
}
},
methods
:
{
getParams
(){
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
...
...
@@ -169,13 +190,20 @@ export default {
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
this
.
$emit
(
'getTotal'
,
this
.
clientTableDataNum
)
//
this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//导出
handleExport
(){
var
params
=
this
.
getParams
()
clientExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
...
...
src/views/clientGroupManage/components/followEmployee.vue
View file @
c4b41bc
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:is
NeedThreeBtns=
"fals
e"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<search-form
class=
"searchTop border-shadow"
:is
HasSyncBtn=
"true"
:isThreeRowShow=
"tru
e"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
...
...
@@ -22,7 +23,7 @@
</template>
<
script
>
// import { getDetailTableList
} from '@/api/modules/clientGroupManage'
import
{
getDetailStaffTableList
,
followEmployeeExportApi
}
from
'@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
...
...
@@ -92,16 +93,19 @@ export default {
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
prop
:
'groupNickName'
,
minWidth
:
120
},
{
label
:
'员工名称'
,
prop
:
'customerName'
,
minWidth
:
150
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
prop
:
'customerPhone'
,
minWidth
:
120
},
{
label
:
'性别'
,
...
...
@@ -111,21 +115,23 @@ export default {
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
addHtml
:
'joinScene'
,
minWidth
:
120
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
prop
:
'invitorName'
,
minWidth
:
120
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
9
5
width
:
9
8
}
]
},
getListApi
:
''
,
getListApi
:
getDetailStaffTableList
,
clientTableDataNum
:
0
}
},
...
...
@@ -135,16 +141,31 @@ export default {
}
},
methods
:
{
getParams
(){
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
...
...
@@ -155,13 +176,20 @@ export default {
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
this
.
$emit
(
'getTotal'
,
this
.
clientTableDataNum
)
//
this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//导出
handleExport
(){
var
params
=
this
.
getParams
()
followEmployeeExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
...
...
src/views/clientGroupManage/components/leaveGroupClient.vue
View file @
c4b41bc
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:is
NeedThreeBtns=
"fals
e"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<search-form
class=
"searchTop border-shadow"
:is
HasSyncBtn=
"true"
:isThreeRowShow=
"tru
e"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
...
...
@@ -28,7 +29,7 @@
</template>
<
script
>
// import { getDetailTableList
} from '@/api/modules/clientGroupManage'
import
{
getDetailQuitTableList
,
leaveGroupExportApi
}
from
'@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
...
...
@@ -96,16 +97,19 @@ export default {
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
prop
:
'groupNickName'
,
minWidth
:
120
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
addHtml
:
'customerName'
,
minWidth
:
150
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
prop
:
'customerPhone'
,
minWidth
:
120
},
{
label
:
'性别'
,
...
...
@@ -115,16 +119,18 @@ export default {
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
addHtml
:
'joinScene'
,
minWidth
:
120
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
prop
:
'invitorName'
,
minWidth
:
120
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
9
5
width
:
9
8
}
],
tableOption
:
{
...
...
@@ -137,7 +143,7 @@ export default {
]
}
},
getListApi
:
''
,
getListApi
:
getDetailQuitTableList
,
clientTableDataNum
:
0
}
},
...
...
@@ -147,16 +153,31 @@ export default {
}
},
methods
:
{
getParams
(){
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
...
...
@@ -173,6 +194,13 @@ export default {
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//导出
handleExport
(){
var
params
=
this
.
getParams
()
leaveGroupExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
...
...
src/views/clientGroupManage/components/potentialClient.vue
View file @
c4b41bc
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:is
NeedThreeBtns=
"fals
e"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<search-form
class=
"searchTop border-shadow"
:is
HasSyncBtn=
"true"
:isThreeRowShow=
"tru
e"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
...
...
@@ -29,7 +30,7 @@
</template>
<
script
>
import
{
getDetail
TableList
}
from
'@/api/modules/clientGroupManage'
import
{
getDetail
PotentialTableList
,
potentialClientExportApi
}
from
'@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
...
...
@@ -52,43 +53,36 @@ export default {
}
}
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
},
//
{
//
type: 'select',
//
prop: 'customerSex',
//
label: '性别',
//
placeholder: '请选择性别',
//
options: [
//
{
//
label: '全部',
//
value: null
//
},
//
{
//
label: '男',
//
value: 1
//
},
//
{
//
label: '女',
//
value: 2
//
},
//
{
//
label: '未知',
//
value: 0
//
}
//
]
//
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
...
...
@@ -100,20 +94,15 @@ export default {
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
// {
// label: '手机号码',
// prop: 'customerPhone'
// },
// {
// label: '性别',
// prop: 'customerSex',
// addHtml: 'customerSex'
// },
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
...
...
@@ -126,20 +115,20 @@ export default {
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
9
5
width
:
9
8
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
//
tableOption: {
//
width: 80,
//
btnList: [
//
{
//
name: '详情',
//
pType: 'detail'
//
}
//
]
//
}
},
getListApi
:
getDetailTableList
,
getListApi
:
getDetail
Potential
TableList
,
clientTableDataNum
:
0
}
},
...
...
@@ -149,16 +138,31 @@ export default {
}
},
methods
:
{
getParams
(){
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
...
...
@@ -175,6 +179,13 @@ export default {
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//导出
handleExport
(){
var
params
=
this
.
getParams
()
potentialClientExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
...
...
src/views/clientGroupManage/index.vue
View file @
c4b41bc
...
...
@@ -3,8 +3,9 @@
<div
class=
"scrm-sub-client-container"
>
<!--
<p
class=
"pageTitle"
>
客户群管理
</p>
-->
<div
class=
"pageContent"
>
<search-form
class=
"searchTop border-shadow"
:isHasSyncBtn=
"true"
:showDefaultTime=
"false"
:merchantModel=
"merchantModel"
:accountLevel=
"accountLevel"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<search-form
class=
"searchTop border-shadow"
:isHasSyncBtn=
"true"
:showDefaultTime=
"false"
:merchantModel=
"merchantModel"
:accountLevel=
"accountLevel"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
handleExport=
"handleExport"
@
syncClick=
"syncClick"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
...
...
@@ -29,7 +30,7 @@
</template>
<
script
>
import
{
getTableList
,
syncCustomerBase
}
from
'@/api/modules/clientGroupManage'
import
{
getTableList
,
syncCustomerBase
,
getStatus
,
clientGroupExportApi
}
from
'@/api/modules/clientGroupManage'
import
url
from
'@/assets/clientDataOverview/nodata.png'
export
default
{
name
:
'clientGroupManage'
,
...
...
@@ -56,8 +57,8 @@ export default {
type
:
'input'
,
inputType
:
'text'
,
prop
:
'custGroupName'
,
label
:
'
客户群
名称'
,
placeholder
:
'请输入
客户群
名称'
label
:
'
群聊
名称'
,
placeholder
:
'请输入
群聊
名称'
},
{
type
:
'input'
,
...
...
@@ -72,6 +73,26 @@ export default {
prop
:
'groupAdminName'
,
label
:
'管理员'
,
placeholder
:
'请输入管理员'
},
{
type
:
'select'
,
prop
:
'creationMethod'
,
label
:
'创建方式'
,
placeholder
:
'请选择'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'手动拉群'
,
value
:
1
},
{
label
:
'一客一群'
,
value
:
2
}
]
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
...
...
@@ -80,11 +101,11 @@ export default {
listName
:
'data'
,
tableColumns
:
[
{
label
:
'
客户群
名称'
,
label
:
'
群聊
名称'
,
prop
:
'custGroupName'
,
minWidth
:
160
},
{
{
label
:
'当前成员总数'
,
prop
:
'allMembers'
,
minWidth
:
140
...
...
@@ -110,11 +131,6 @@ export default {
minWidth
:
140
},
{
label
:
'创建方式'
,
prop
:
'creationMethod'
,
minWidth
:
140
},
{
label
:
'群主'
,
prop
:
'groupHostName'
},
...
...
@@ -123,13 +139,18 @@ export default {
prop
:
'groupAdminName'
},
{
label
:
'创建方式'
,
prop
:
'creationMethod'
,
minWidth
:
140
},
{
label
:
'创建时间'
,
prop
:
'addTime'
,
width
:
95
}
],
tableOption
:
{
width
:
170
,
width
:
170
// btnList: [
// {
// name: '详情',
...
...
@@ -145,8 +166,8 @@ export default {
flushTime
:
false
}
},
activated
()
{
this
.
searchTable
()
;
activated
()
{
this
.
searchTable
()
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
...
...
@@ -166,8 +187,38 @@ export default {
// }
// }
// },
mounted
()
{},
beforeDestroy
()
{
this
.
$message
.
closeAll
()
},
mounted
()
{
this
.
wxTips
()
},
methods
:
{
jumpWx
()
{
this
.
$history
.
push
(
'/home/enterpriseWechat/index'
)
},
wxTips
()
{
const
menu
=
JSON
.
parse
(
sessionStorage
[
'SCRM_BASE_MENULIST'
])
menu
.
forEach
(
item
=>
{
if
(
!
item
.
children
)
{
return
}
item
.
children
.
forEach
(
itm
=>
{
if
(
itm
.
path
==
'/enterpriseWechat/index'
)
{
getStatus
({}).
then
(
res
=>
{
if
(
res
.
status
!=
'SUCCESS'
)
{
const
h
=
this
.
$createElement
this
.
$message
({
showClose
:
true
,
duration
:
0
,
message
:
h
(
'p'
,
null
,
[
h
(
'span'
,
null
,
'此功能需完成【企业微信授权】后方可使用! '
),
h
(
'span'
,
{
on
:
{
click
:
this
.
jumpWx
},
style
:
{
marginRight
:
'150px'
,
cursor
:
'pointer'
,
color
:
'#5850ff'
}
},
[
'企业微信授权 '
,
h
(
'i'
,
{
class
:
'el-icon-d-arrow-right'
},
''
)])])
})
}
})
}
})
})
},
syncClick
()
{
let
_this
=
this
_this
.
sloading
=
true
...
...
@@ -182,8 +233,9 @@ export default {
})
.
catch
(
err
=>
{
_this
.
sloading
=
false
}).
finally
(()
=>
{
_this
.
sloading
=
false
;
})
.
finally
(()
=>
{
_this
.
sloading
=
false
})
},
setTableHeightEvent
()
{
...
...
@@ -202,19 +254,41 @@ export default {
// }
this
.
$refs
.
clientGroupManage
.
data
.
length
?
(
this
.
$refs
.
clientGroupManage
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupManage
.
setTableHeightFun
()
},
//导出
handleExport
(){
var
params
=
this
.
getParams
()
clientGroupExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
})
},
searchTable
()
{
this
.
$refs
.
clientGroupManage
.
refreshTable
()
},
getParams
(){
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
...
...
@@ -258,8 +332,20 @@ export default {
//
min-width
:
1300px
;
background-color
:
#fff
;
.el-button
+
.el-button
{
margin-left
:
2
0px
;
margin-left
:
1
0px
;
}
}
.el-message--info
{
height
:
40px
;
background
:
#e6e9ff
;
border
:
1px
solid
#5850ff
;
border-radius
:
4px
;
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
}
.el-message
.el-icon-info
{
color
:
#5850ff
;
font-size
:
16px
;
}
}
</
style
>
src/views/clientManage/clientDetail.vue
View file @
c4b41bc
...
...
@@ -68,7 +68,7 @@
</el-tooltip>
</p>
<p>
<span>
渠道来源
</span>
<span>
所属渠道
</span>
<el-tooltip
effect=
"dark"
:content=
"leftPanelInfo.sourceChannel"
placement=
"top"
>
<span
class=
"ellipsis-1"
>
{{
leftPanelInfo
.
sourceChannel
}}
</span>
</el-tooltip>
...
...
@@ -124,9 +124,11 @@
</GLTable>
</
template
>
<div
v-show=
"currentIndex == 2"
class=
"clientTagsWrap"
>
<div
style=
"height:40px"
></div>
<div
style=
"height: 40px"
></div>
<!-- //提示面板组件 -->
<tip-panel
panelWidth=
"666px"
panelMinHeight=
"45px"
:panelContent=
"panelContent"
></tip-panel>
<!-- v-if="userType == 2" -->
<el-button
type=
"primary"
class=
"addTagBtn"
size=
"small"
@
click=
"btnClick('create')"
v-if=
"userType == 2"
>
添加标签
</el-button>
<el-button
type=
"primary"
class=
"addTagBtn"
size=
"small"
@
click=
"btnClick('create')"
v-if=
"userType == 2"
>
添加标签
</el-button>
<GLTable
ref=
"clientTagsListRef"
:hasNum=
"false"
:noDataImg=
"url"
noDataText=
"客户暂无已添加的标签"
:tableData=
"clientTagsList"
:hasPage=
"false"
:tableParams=
"tagsParams"
:headerStyle=
"{ height: '54px' }"
>
<span
slot=
"labelGroupInfo"
slot-scope=
"scope"
>
<span>
{{ scope.scope.labelGroupInfo.labelGroupName }}
</span>
...
...
@@ -163,15 +165,15 @@
<span
v-for=
"(i, j) in item.labelList"
:key=
"j"
class=
"ellipsis-1"
:class=
"{ activeTag: i.checked }"
:title=
"i.name"
@
click=
"checkNewTag(i.checked, j, item.labelList, i.original)"
>
{{ i.name }}
</span>
</div>
</div>
<
template
v-if=
"merchantModel == 1 && accountLevel == 4"
>
<p
class=
"dialogSubTitle"
>
自店标签
</p>
<div
class=
"ownShopRowData"
v-for=
"(xItem, xIndex) in ownShopTagsList"
:key=
"xIndex"
>
<span
:title=
"xItem.labelGroup.name"
>
{{
xItem
.
labelGroup
.
name
}}
</span>
<div
class=
"tagsBox"
>
<span
v-for=
"(m, n) in xItem.labelList"
:key=
"n"
class=
"ellipsis-1"
:class=
"
{ activeTag: m.checked }" :title="m.name" @click="checkNewTag(m.checked, n, xItem.labelList, m.original)">
{{
m
.
name
}}
</span>
<p
class=
"dialogSubTitle"
>
自店标签
</p>
<div
class=
"ownShopRowData"
v-for=
"(xItem, xIndex) in ownShopTagsList"
:key=
"xIndex"
>
<span
:title=
"xItem.labelGroup.name"
>
{{
xItem
.
labelGroup
.
name
}}
</span>
<div
class=
"tagsBox"
>
<span
v-for=
"(m, n) in xItem.labelList"
:key=
"n"
class=
"ellipsis-1"
:class=
"
{ activeTag: m.checked }" :title="m.name" @click="checkNewTag(m.checked, n, xItem.labelList, m.original)">
{{
m
.
name
}}
</span>
</div>
</div>
</div>
</
template
>
<!-- 这里btn-behind插槽莫名失效了,原因:??? -->
...
...
@@ -183,12 +185,17 @@
<
script
>
import
{
getAllTagTree
,
getSingleClientTag
,
addSingleClientTag
,
getTableDetail
}
from
'@/api/modules/clientManage'
import
url
from
"@/assets/clientDetail/noDataBox.png"
import
tipPanel
from
'@/components/tipPanel/index.vue'
import
url
from
'@/assets/clientDetail/noDataBox.png'
export
default
{
name
:
'clientDetail'
,
components
:
{
tipPanel
},
data
()
{
return
{
url
:
url
,
panelContent
:
'说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签'
,
url
:
url
,
leftPanelInfo
:
{},
labelIdList
:
[],
//存放用户被标记标签的id
tagsList
:
[
...
...
@@ -312,7 +319,7 @@ export default {
listName
:
'customerBases'
,
tableColumns
:
[
{
label
:
'
客户群
名称'
,
label
:
'
群聊
名称'
,
prop
:
'groupName'
,
addHtml
:
'groupName'
},
...
...
@@ -358,6 +365,14 @@ export default {
width
:
'160'
},
{
label
:
'标签组类型'
,
prop
:
'labelGroupInfo'
,
formatter
:
cellValue
=>
{
return
cellValue
.
labelGroupInfo
.
labelGroupType
},
width
:
'160'
},
{
label
:
'已打标签'
,
prop
:
'labelInfoList'
,
addHtml
:
'labelInfoList'
,
...
...
@@ -379,7 +394,8 @@ export default {
merchantModel
:
1
,
//集团:1,门店:2
accountLevel
:
0
,
//1,2,3,4工厂,省代,市代,门店
userType
:
0
,
//1是商户,2是员工
userid
:
0
//小龙需要用户id
userid
:
0
,
//小龙需要用户id
staffId
:
0
}
},
...
...
@@ -398,13 +414,13 @@ export default {
console
.
log
(
this
.
tagsParams
,
'kkkk'
)
},
methods
:
{
tabClick
(
index
)
{
// if (!this.$refs.memberOrderRef.data.length) {
// this.$refs.memberOrderRef.setTableHeightFun()
// }
this
.
currentIndex
=
index
if
(
this
.
currentIndex
==
2
&&
this
.
clientTagsList
.
length
<=
0
)
{
this
.
$refs
.
clientTagsListRef
.
setTableHeightFun
()
closePanel
()
{
this
.
isFirstShow
=
false
},
tabClick
(
index
)
{
this
.
currentIndex
=
index
if
(
this
.
currentIndex
==
2
&&
this
.
clientTagsList
.
length
<=
0
)
{
this
.
$refs
.
clientTagsListRef
.
setTableHeightFun
()
}
},
showTagArray
(
list
)
{
...
...
@@ -484,6 +500,7 @@ export default {
return
false
}
this
.
userid
=
res
.
userid
this
.
staffId
=
res
.
staffId
this
.
leftPanelInfo
=
res
.
info
this
.
vehicleTableData
=
res
.
vehicleInfoList
||
[]
this
.
employTableList
=
res
.
staffFollows
||
[]
...
...
@@ -566,7 +583,9 @@ export default {
'req.labelGroupId'
:
item
.
labelGroup
.
id
,
'req.edition'
:
this
.
merchantModel
,
'req.merchantId'
:
this
.
merchantId
,
'req.staffId'
:
this
.
userid
'req.uuId'
:
this
.
userid
,
'req.staffId'
:
this
.
staffId
// 'req.labelIdList': item.labelList.map(ele => ele.id)
}
var
ids
=
item
.
labelList
.
map
(
ele
=>
ele
.
id
)
...
...
@@ -759,7 +778,7 @@ export default {
}
}
.addTagBtn
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
//
处理客户标签的样式
.clientTagsWrap
{
...
...
src/views/clientManage/index.vue
View file @
c4b41bc
...
...
@@ -3,9 +3,9 @@
<div
class=
"scrm-sub-client-container"
>
<!--
<p
class=
"pageTitle"
>
客户管理
</p>
-->
<div
class=
"pageContent"
>
<search-form
:ploading=
"sloading"
:isHasSyncBtn=
"true"
:showDefaultTime=
"false"
:merchantModel=
"merchantModel"
:accountLevel=
"accountLevel"
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"clientManageFormList"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
syncClick=
"syncClick"
>
<search-form
:ploading=
"sloading"
:isHasSyncBtn=
"true"
:showDefaultTime=
"false"
:merchantModel=
"merchantModel"
:accountLevel=
"accountLevel"
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"clientManageFormList"
@
resetTable=
"resetTable"
@
searchTable=
"searchTable"
@
handleExport=
"handleExport"
@
syncClick=
"syncClick"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
type=
"primary"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" 不做判定了, 允许所有人同步 -->
...
...
@@ -80,7 +80,7 @@
<
/template
>
<
script
>
import
{
getTableList
,
getDictionaryFun
,
syncCustomer
}
from
'@/api/modules/clientManage'
import
{
getTableList
,
getDictionaryFun
,
syncCustomer
,
clientManageExportApi
}
from
'@/api/modules/clientManage'
import
url
from
'@/assets/clientDataOverview/nodata.png'
export
default
{
name
:
'clientManage'
,
...
...
@@ -146,7 +146,7 @@ export default {
{
type
:
'select'
,
prop
:
'addWay'
,
label
:
'来源'
,
label
:
'
添加
来源'
,
placeholder
:
'请选择当前来源'
,
options
:
[]
//this.$Constants.SOURCE_OPTION
}
,
...
...
@@ -216,17 +216,6 @@ export default {
minWidth
:
120
}
,
{
label
:
'来源'
,
prop
:
'addWay'
,
addHtml
:
'addWay'
,
minWidth
:
100
}
,
{
label
:
'渠道来源'
,
prop
:
'sourceChannel'
,
width
:
100
}
,
{
label
:
'是否加企微'
,
//1. 加入,0.未加入
prop
:
'isJoin'
,
addHtml
:
'isJoin'
,
...
...
@@ -239,6 +228,17 @@ export default {
minWidth
:
100
}
,
{
label
:
'所属渠道'
,
prop
:
'sourceChannel'
,
width
:
100
}
,
{
label
:
'添加来源'
,
prop
:
'addWay'
,
addHtml
:
'addWay'
,
minWidth
:
100
}
,
{
label
:
'添加时间'
,
prop
:
'addTime'
,
width
:
98
...
...
@@ -299,17 +299,31 @@ export default {
//
}
this
.
$refs
.
clientManage
.
data
.
length
?
(
this
.
$refs
.
clientManage
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientManage
.
setTableHeightFun
()
}
,
getParams
(){
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
}
,
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
console
.
log
(
this
.
searchFormTable
.
daterange
,
'时间'
)
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
delete
this
.
searchFormTable
.
daterange
// return new Promise((resolve, reject) =>
{
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange)
{
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
//
}
else
{
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
//
}
// resolve()
//
}
)
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
}
)
}
,
...
...
@@ -345,6 +359,13 @@ export default {
return
curElement
.
label
}
,
//导出
handleExport
(){
var
params
=
this
.
getParams
()
clientManageExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
}
)
}
,
//搜索表格
searchTable
()
{
this
.
$refs
.
clientManage
.
refreshTable
()
...
...
@@ -411,7 +432,7 @@ export default {
// min-width: 1300px;
background
-
color
:
#
fff
;
.
el
-
button
+
.
el
-
button
{
margin
-
left
:
2
0
px
;
margin
-
left
:
1
0
px
;
}
.
searchTop
{
// margin-bottom: 20px;
...
...
src/views/tagsManage/index.vue
View file @
c4b41bc
...
...
@@ -16,7 +16,7 @@
<!-- v-if="!(merchantModel == 1 && accountLevel == 4)" -->
<div>
企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;
</div>
<div
v-if=
"!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))"
>
自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;
</div>
<div>
行业
标签为通过大数据算法规则生成的标签
</div>
<div>
系统
标签为通过大数据算法规则生成的标签
</div>
<img
src=
"@/assets/tagsManage/question.png"
slot=
"reference"
alt=
""
/>
</el-popover>
</span>
...
...
@@ -24,7 +24,7 @@
<div
class=
"initPanel"
v-if=
"isFirstShow"
>
<
template
v-if=
"!(merchantModel == 1 && accountLevel == 4)"
>
企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;
</
template
>
<
template
v-if=
"!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))"
>
自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;
</
template
>
行业
标签为通过大数据算法规则生成的标签
系统
标签为通过大数据算法规则生成的标签
<img
src=
"@/assets/tagsManage/Shape.png"
alt=
""
/>
<i
class=
"el-icon-close"
@
click=
"closeInitPanel"
></i>
</div>
...
...
@@ -66,7 +66,7 @@
</span>
<
template
slot=
"xxx"
slot-scope=
"scope"
>
<!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑-->
<span
@
click=
"btnClick('edit', scope.scope)"
class=
"blue-text"
v-if=
"scope.scope.labelType != '
行业
标签' && isShowEditBtn(scope.scope)"
>
编辑标签组
</span>
<span
@
click=
"btnClick('edit', scope.scope)"
class=
"blue-text"
v-if=
"scope.scope.labelType != '
系统
标签' && isShowEditBtn(scope.scope)"
>
编辑标签组
</span>
</
template
>
</GLTable>
</div>
...
...
@@ -208,8 +208,8 @@ export default {
value
:
'自店标签'
},
{
label
:
'
行业
标签'
,
value
:
'
行业
标签'
label
:
'
系统
标签'
,
value
:
'
系统
标签'
}
]
},
...
...
@@ -832,7 +832,7 @@ export default {
margin-top
:
20px
;
background-color
:
#fff
;
.el-button
+
.el-button
{
margin-left
:
2
0px
;
margin-left
:
1
0px
;
}
.allTagsWrap
{
...
...
@@ -854,7 +854,7 @@ export default {
display
:
inline-block
;
margin-right
:
10px
;
//
margin-bottom
:
2
px
;
margin-bottom
:
10
px
;
padding
:
0
10px
;
box-sizing
:
border-box
;
min-width
:
76px
;
...
...
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