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 2482cf00
authored
Jan 16, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 样式
1 parent
f632ec50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
364 additions
and
531 deletions
src/views/clientManage/index.vue
src/views/clientManage/index.vue
View file @
2482cf0
<
template
><div><div
class=
"scrm-sub-client-container"
>
<
!--
<p
class=
"pageTitle"
>
客户管理
</p>
-->
<
!-- :style="{ 'min-height': heightBox + 'px' }"-->
<div
class=
"pageContent"
><GLCombiForm
ref=
"combiForm"
:formObj=
"searchForm"
:formData=
"clientManageFormList"
@
handleOk=
"searchTable"
@
handleRest=
"resetTable"
></GLCombiForm><div
class=
"leadList"
><div><span></span></div><GLButton
size=
"small"
@
click=
"handleExport"
fn=
"导出"
>
导出
</GLButton></div><GLTable
@
setTableFinishFun=
"setTableFinishFun"
v-if=
"isReload"
ref=
"clientManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:noDataImg=
"url"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
><span
slot=
"customerName"
slot-scope=
"scope"
><GLFull
:labelWidth=
"70"
:identification=
"`node_$
{scope.scope.id}`"> {
{
scope.scope.customerName ? scope.scope.customerName: '--'
}
}
</GLFull></span>
<
!--
<span
slot=
"customerSex"
slot-scope=
"scope"
>
-->
<span
slot=
"customerSex"
slot-scope=
"scope"
><span>
{
{
scope.scope.customerSex==0 ? '未知': scope.scope.customerSex==1 ? '男': scope.scope.customerSex==2 ? '女': ''
}
}
</span></span>
<
!-- 企微名称 -->
<div
slot=
"nickNameList"
slot-scope=
"scope"
class=
"expandImg"
><div
v-if=
"!scope.scope.nickNameList.length"
>
--
</div><div
v-for=
"(list, idx) in scope.scope.nickNameList"
:key=
"idx"
><div
v-if=
"idx == 0"
><span>
{
{
list.nickName
}
}
</span><span
class=
"smallFontSize"
:class=
"[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']"
>
@
{{
list
.
corpName
}
}
<
/span></
div
><
span
v
-
if
=
"idx == 1"
><
el
-
popover
placement
=
"right-start"
trigger
=
"hover"
content
=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
><
div
v
-
for
=
"(i, index) in scope.scope.nickNameList"
:
key
=
"index"
style
=
"padding-bottom: 3px !important"
><
span
>
{
{
i
.
nickName
}
}
<
/span><span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px" :class="
[
i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : ''
]
">@{{ i.corpName
}
}
<
/span></
div
><
img
class
=
"imgEll"
src
=
"@/assets/tagsManage/ellipsis.png"
alt
=
""
slot
=
"reference"
/><
/el-popover></
span
><
/div></
div
><
span
slot
=
"customerPhone"
slot
-
scope
=
"scope"
><
span
>
{
{
scope
.
scope
.
customerPhone
==
null
?
'--'
:
scope
.
scope
.
customerPhone
}
}
<
/span></
span
><
span
slot
=
"addWay"
slot
-
scope
=
"scope"
><
el
-
tooltip
effect
=
"dark"
:
content
=
"toLabel(scope.scope.addWay)"
placement
=
"top"
><
span
style
=
"display: inline-block; max-width: 120px; text-align: left"
>
{
{
toLabel
(
scope
.
scope
.
addWay
)
}
}
<
/span></
el
-
tooltip
><
/span>< !-- subscribe --><span slot="subscribe"slot-scope="scope"><span> {
{
scope
.
scope
.
subscribe
==
'1'
?
'是'
:
'否'
}
}
<
/span></
span
><
span
slot
=
"isLoginApplet"
slot
-
scope
=
"scope"
><
span
>
{
{
scope
.
scope
.
isLoginApplet
==
'1'
?
'是'
:
'否'
}
}
<
/span></
span
><
span
slot
=
"isJoin"
slot
-
scope
=
"scope"
><
span
>
{
{
scope
.
scope
.
isJoin
?
'是'
:
'否'
}
}
<
/span></
span
><
span
slot
=
"status"
slot
-
scope
=
"scope"
><
span
class
=
"statusText"
><
span
:
class
=
"
{
circleStatusGray
:
scope
.
scope
.
status
===
-
1
,
circleStatusGreen
:
scope
.
scope
.
status
==
0
}"
><
/span><span> {
{
statusText
(
scope
.
scope
.
status
)
}
}
<
/span></
span
><
/span><div class="table-btns"slot="optionBtns"slot-scope="scope"><el-button type="text"@click="goDetail
(
scope.scope.oneId
)
">详情</
el
-
button
><
!--
<
GLButton
@
click
=
"goDetail(scope.scope.oneId)"
fn
=
"客户详情"
type
=
"text"
>
详情
<
/GLButton>--></
div
><
/GLTable></
div
><
/div></
div
><
/template><script>import {
getTableList
,
getDictionaryFun
,
getStaffList
,
syncCustomer
,
clientManageExportApi
}
from
'@/api/modules/clientManage'
<
template
>
<div>
<div
class=
"scrm-sub-client-container"
>
<!--
<p
class=
"pageTitle"
>
客户管理
</p>
-->
<!-- :style="
{ 'min-height': heightBox + 'px' }" -->
<div
class=
"pageContent"
>
<GLCombiForm
ref=
"combiForm"
:formObj=
"searchForm"
:formData=
"clientManageFormList"
@
handleOk=
"searchTable"
@
handleRest=
"resetTable"
></GLCombiForm>
<div
class=
"leadList"
>
<div>
<span></span>
</div>
<GLButton
size=
"small"
@
click=
"handleExport"
fn=
"导出"
>
导出
</GLButton>
</div>
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
v-if=
"isReload"
ref=
"clientManage"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:noDataImg=
"url"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
>
<span
slot=
"customerName"
slot-scope=
"scope"
>
<GLFull
:labelWidth=
"70"
:identification=
"`node_$
{scope.scope.id}`">
{{
scope
.
scope
.
customerName
?
scope
.
scope
.
customerName
:
'--'
}}
</GLFull>
</span>
<!--
<span
slot=
"customerSex"
slot-scope=
"scope"
>
-->
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
0
?
'未知'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
scope
.
scope
.
customerSex
==
2
?
'女'
:
''
}}
</span>
</span>
<!-- 企微名称 -->
<div
slot=
"nickNameList"
slot-scope=
"scope"
class=
"expandImg"
>
<div
v-if=
"!scope.scope.nickNameList.length"
>
--
</div>
<div
v-for=
"(list, idx) in scope.scope.nickNameList"
:key=
"idx"
>
<div
v-if=
"idx == 0"
>
<span>
{{
list
.
nickName
}}
</span>
<span
class=
"smallFontSize"
:class=
"[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']"
>
@
{{
list
.
corpName
}}
</span>
</div>
<span
v-if=
"idx == 1"
>
<el-popover
placement=
"right-start"
trigger=
"hover"
content=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<div
v-for=
"(i, index) in scope.scope.nickNameList"
:key=
"index"
style=
"padding-bottom: 3px !important"
>
<span>
{{
i
.
nickName
}}
</span>
<span
style=
"height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px"
:class=
"[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']"
>
@
{{
i
.
corpName
}}
</span>
</div>
<img
class=
"imgEll"
src=
"@/assets/tagsManage/ellipsis.png"
alt=
""
slot=
"reference"
/>
</el-popover>
</span>
</div>
</div>
<span
slot=
"customerPhone"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerPhone
==
null
?
'--'
:
scope
.
scope
.
customerPhone
}}
</span>
</span>
<span
slot=
"addWay"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"toLabel(scope.scope.addWay)"
placement=
"top"
>
<span
style=
"display: inline-block; max-width: 120px; text-align: left"
>
{{
toLabel
(
scope
.
scope
.
addWay
)
}}
</span>
</el-tooltip>
</span>
<!-- subscribe -->
<span
slot=
"subscribe"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
subscribe
==
'1'
?
'是'
:
'否'
}}
</span>
</span>
<span
slot=
"isLoginApplet"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
isLoginApplet
==
'1'
?
'是'
:
'否'
}}
</span>
</span>
<span
slot=
"isJoin"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
isJoin
?
'是'
:
'否'
}}
</span>
</span>
<span
slot=
"status"
slot-scope=
"scope"
>
<span
class=
"statusText"
>
<span
:class=
"
{ circleStatusGray: scope.scope.status === -1, circleStatusGreen: scope.scope.status == 0 }">
</span>
<span>
{{
statusText
(
scope
.
scope
.
status
)
}}
</span>
</span>
</span>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"goDetail(scope.scope.oneId)"
>
详情
</el-button>
<!--
<GLButton
@
click=
"goDetail(scope.scope.oneId)"
fn=
"客户详情"
type=
"text"
>
详情
</GLButton>
-->
</div>
</GLTable>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getTableList
,
getDictionaryFun
,
getStaffList
,
syncCustomer
,
clientManageExportApi
}
from
'@/api/modules/clientManage'
import
url
from
'@/assets/clientDataOverview/nodata.png'
export
default
{
name
:
'clientManage'
,
data
()
{
return
{
isReload
:
true
,
url
:
url
,
sloading
:
false
,
CLIENTSTATUS
:
this
.
$Constants
.
CLIENT_STATUS
,
searchForm
:
{
addWay
:
''
,
isJoin
:
1
}
,
searchFormTable
:
{
}
,
clientManageFormList
:
[
{
type
:
'input'
,
isJoin
:
1
},
searchFormTable
:
{},
clientManageFormList
:
[
{
type
:
'input'
,
inputType
:
'text'
,
// prop: 'customerPhone',
name
:
'customerPhone'
,
label
:
'联系电话'
,
placeholder
:
'联系电话'
}
,
},
{
type
:
'select'
,
type
:
'select'
,
name
:
'followStaff'
,
// prop: 'followStaff',
noFilter
:
false
,
...
...
@@ -114,107 +108,84 @@ export default {
label
:
'跟进员工'
,
placeholder
:
'请输入跟进员工'
,
optionList
:
[]
}
,
},
{
type
:
'input'
,
type
:
'input'
,
inputType
:
'text'
,
// prop: 'customerName',
name
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
,
},
{
type
:
'input'
,
type
:
'input'
,
inputType
:
'text'
,
// prop: 'nickName',
name
:
'nickName'
,
label
:
'企微名称'
,
placeholder
:
'请输入企微名称'
}
,
},
{
type
:
'select'
,
// prop: 'isJoin',
name
:
'isJoin'
,
label
:
'是否已加企微'
,
placeholder
:
'请选择'
,
optionLabel
:
'label'
,
optionId
:
'value'
,
optionList
:
[
{
label
:
'全部'
,
value
:
null
}
,
{
label
:
'是'
,
value
:
1
}
,
{
label
:
'否'
,
value
:
0
}
]
}
,
type
:
'select'
,
// prop: 'isJoin',
name
:
'isJoin'
,
label
:
'是否已加企微'
,
placeholder
:
'请选择'
,
optionLabel
:
'label'
,
optionId
:
'value'
,
optionList
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'是'
,
value
:
1
},
{
label
:
'否'
,
value
:
0
}
]
},
{
type
:
'select'
,
// prop: 'status',
name
:
'status'
,
label
:
'当前状态'
,
placeholder
:
'请选择当前状态'
,
optionLabel
:
'optionLabel'
,
optionId
:
'optionId'
,
optionList
:
[
{
optionLabel
:
'全部'
,
optionId
:
null
}
,
{
optionLabel
:
'正常'
,
optionId
:
0
}
,
{
optionLabel
:
'删除好友'
,
optionId
:
-
1
}
]
}
,
type
:
'select'
,
// prop: 'status',
name
:
'status'
,
label
:
'当前状态'
,
placeholder
:
'请选择当前状态'
,
optionLabel
:
'optionLabel'
,
optionId
:
'optionId'
,
optionList
:
[
{
optionLabel
:
'全部'
,
optionId
:
null
},
{
optionLabel
:
'正常'
,
optionId
:
0
},
{
optionLabel
:
'删除好友'
,
optionId
:
-
1
}
]
},
{
type
:
'datePicker
'
,
// prop
: 'daterange',
name
:
'daterange
'
,
label
:
'添加时间
'
,
valueFormat
:
'yyyy-MM-dd'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
type
:
'datePicker'
,
// prop: 'daterange
',
name
:
'daterange'
,
label
:
'添加时间
'
,
valueFormat
:
'yyyy-MM-dd
'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
}
}
,
},
{
type
:
'select'
,
type
:
'select'
,
// prop: 'addWay',
name
:
'addWay'
,
label
:
'添加来源'
,
...
...
@@ -222,11 +193,9 @@ export default {
optionId
:
'value'
,
placeholder
:
'请选择当前来源'
,
optionList
:
[]
//this.$Constants.SOURCE_OPTION
}
,
},
{
type
:
'select'
,
type
:
'select'
,
// prop: 'customerSex',
name
:
'customerSex'
,
label
:
'性别'
,
...
...
@@ -234,292 +203,228 @@ export default {
optionId
:
'value'
,
placeholder
:
'请选择性别'
,
optionList
:
this
.
$Constants
.
GENDER_OPTION
}
,
},
{
type
:
'datePicke
r'
,
name
:
'purchaseCar
'
,
label
:
'购车时间
'
,
valueFormat
:
'yyyy-MM-dd'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
type
:
'datePicker'
,
name
:
'purchaseCa
r'
,
label
:
'购车时间
'
,
valueFormat
:
'yyyy-MM-dd
'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
}
}
,
},
{
type
:
'input'
,
type
:
'input'
,
inputType
:
'text'
,
name
:
'carVin'
,
label
:
'车架号'
}
,
},
{
type
:
'input'
,
type
:
'input'
,
inputType
:
'text'
,
name
:
'carNumber'
,
label
:
'车牌号'
}
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
}
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
listName
:
'data'
,
tableOption
:
false
,
// mutiSelectName: 'employeeList',
// mutiSelectUniqueKey: 'id',
tableColumns
:
[
//
{
// label: '客户ID',
// prop: 'oneId',
// width: 290,
// line: 1
//
}
,
tableColumns
:
[
// {
// label: '客户ID',
// prop: 'oneId',
// width: 290,
// line: 1
// },
{
label
:
'客户名称'
,
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
,
width
:
170
,
line
:
1
}
,
},
{
label
:
'企微名称'
,
label
:
'企微名称'
,
prop
:
'nickNameList'
,
addHtml
:
'nickNameList'
,
width
:
190
}
,
},
{
label
:
'联系电话'
,
label
:
'联系电话'
,
prop
:
'customerPhone'
,
addHtml
:
'customerPhone'
,
width
:
130
}
,
},
{
label
:
'性别'
,
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
}
,
},
{
label
:
'跟进员工'
,
label
:
'跟进员工'
,
prop
:
'followStaff'
,
// addHtml: 'followStaff',
width
:
320
}
,
},
{
label
:
'是否加企微'
,
//1. 加入,0.未加入
label
:
'是否加企微'
,
//1. 加入,0.未加入
prop
:
'isJoin'
,
addHtml
:
'isJoin'
,
width
:
120
}
,
},
{
label
:
'当前状态'
,
label
:
'当前状态'
,
prop
:
'status'
,
addHtml
:
'status'
,
width
:
120
}
,
},
{
label
:
'所属渠道'
,
label
:
'所属渠道'
,
prop
:
'sourceChannel'
,
width
:
160
,
line
:
1
}
,
},
{
label
:
'添加来源'
,
label
:
'添加来源'
,
prop
:
'addWayName'
,
width
:
120
}
,
},
{
label
:
'添加时间'
,
label
:
'添加时间'
,
prop
:
'addTime'
,
width
:
170
}
,
},
{
label
:
'车系'
,
label
:
'车系'
,
prop
:
'audi'
,
width
:
250
,
line
:
1
}
,
},
{
label
:
'车架号'
,
label
:
'车架号'
,
prop
:
'carVin'
,
width
:
270
,
line
:
1
}
,
},
{
label
:
'车牌号'
,
label
:
'车牌号'
,
prop
:
'carNumber'
,
width
:
170
,
line
:
1
}
,
},
{
label
:
'购车时间'
,
label
:
'购车时间'
,
prop
:
'buyDate'
,
width
:
250
,
line
:
1
}
,
},
{
label
:
'小区信息'
,
label
:
'小区信息'
,
prop
:
'communityInfo'
,
width
:
250
,
line
:
1
}
,
},
{
label
:
'操作'
,
label
:
'操作'
,
prop
:
'optionBtns'
,
width
:
'66px'
,
addHtml
:
'optionBtns'
,
fixed
:
'right'
}
}
]
}
,
},
getListApi
:
getTableList
,
merchantModel
:
1
,
sourceList
:
[],
followstaffList
:
[],
queryFlag
:
0
,
accountLevel
:
0
,
//1,2,3,4工厂,省代,市代,门店
accountLevel
:
0
,
//1,2,3,4工厂,省代,市代,门店
flushTime
:
false
}
}
,
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
}
if
(
location
.
host
.
includes
(
'cgacar'
))
{
// cgacar
this
.
clientManageFormList
.
push
(
{
this
.
clientManageFormList
.
push
(
{
type
:
'select'
,
name
:
'subscribe'
,
label
:
'关注公众号'
,
placeholder
:
'请选择'
,
optionLabel
:
'label'
,
optionId
:
'value'
,
optionList
:
[
{
label
:
'全部'
,
value
:
null
}
,
optionList
:
[
{
label
:
'是'
,
value
:
1
}
,
label
:
'全部'
,
value
:
null
},
{
label
:
'否'
,
value
:
0
}
label
:
'是'
,
value
:
1
},
{
label
:
'否'
,
value
:
0
}
]
}
,
{
},
{
type
:
'select'
,
name
:
'isLoginApplet'
,
label
:
'登录小程序'
,
placeholder
:
'请选择'
,
optionLabel
:
'label'
,
optionId
:
'value'
,
optionList
:
[
{
label
:
'全部'
,
value
:
null
}
,
optionList
:
[
{
label
:
'是'
,
value
:
1
}
,
label
:
'全部'
,
value
:
null
},
{
label
:
'否'
,
value
:
0
}
label
:
'是'
,
value
:
1
},
{
label
:
'否'
,
value
:
0
}
]
}
)
this
.
tableParams
.
tableColumns
.
splice
(
6
,
)
this
.
tableParams
.
tableColumns
.
splice
(
6
,
0
,
{
{
label
:
'关注公众号'
,
prop
:
'subscribe'
,
width
:
140
,
line
:
1
,
addHtml
:
'subscribe'
}
,
{
},
{
label
:
'登录小程序'
,
prop
:
'isLoginApplet'
,
width
:
140
,
line
:
1
,
addHtml
:
'isLoginApplet'
}
)
}
this
.
getDictionaryFun
()
this
.
getStaffList
()
}
,
this
.
getDictionaryFun
()
this
.
getStaffList
()
},
// filters:{
// // 截取@后面的文字
// cutText(str){
...
...
@@ -531,231 +436,175 @@ export default {
// },
methods
:
{
followList
(
str
)
{
if
(
!
str
)
{
if
(
!
str
)
{
return
[]
}
return
str
.
split
(
','
)
}
,
},
statusText
(
text
)
{
return
text
===-
1
?
'删除好友'
:
text
===
0
?
'正常'
:
''
}
,
return
text
===
-
1
?
'删除好友'
:
text
===
0
?
'正常'
:
''
},
setTableHeightEvent
()
{
this
.
$refs
.
clientManage
.
setTableHeightFun
()
}
,
},
setTableFinishFun
()
{
this
.
$refs
.
clientManage
.
data
.
length
?
(
this
.
$refs
.
clientManage
.
tableHeightValues
=
''
):
this
.
$refs
.
clientManage
.
setTableHeightFun
()
}
,
this
.
$refs
.
clientManage
.
data
.
length
?
(
this
.
$refs
.
clientManage
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientManage
.
setTableHeightFun
()
},
getParams
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
let
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
}
if
(
params
.
purchaseCar
)
{
params
.
beginCarBuyDate
=
this
.
searchForm
.
purchaseCar
[
0
]
params
.
endCarBuyDate
=
this
.
searchForm
.
purchaseCar
[
1
]
}
else
{
params
.
beginCarBuyDate
=
this
.
searchForm
.
purchaseCar
[
0
]
params
.
endCarBuyDate
=
this
.
searchForm
.
purchaseCar
[
1
]
}
else
{
if
(
params
.
beginCarBuyDate
)
delete
params
.
beginCarBuyDate
&&
delete
params
.
endCarBuyDate
}
delete
params
.
daterange
delete
params
.
purchaseCar
return
params
}
,
delete
params
.
daterange
delete
params
.
purchaseCar
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
async
resolve
=>
{
if
(
Object
.
keys
(
this
.
$route
.
query
).
length
&&
this
.
queryFlag
==
0
)
{
const
res
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'sourceList'
))
let
add_way
=
this
.
$route
.
query
.
addWay
||
''
let
isJoinVal
=
this
.
$route
.
query
.
isJoin
||
null
let
addWayObj
=
res
.
find
(
i
=>
i
.
label
===
add_way
)
this
.
searchForm
.
addWay
=
addWayObj
.
value
this
.
searchForm
.
isJoin
=
isJoinVal
===
null
?
null
:
Number
(
isJoinVal
)
setTimeout
(()
=>
{
this
.
$refs
.
combiForm
.
expandFn
(
)
}
,
100
)
// document.querySelector('.operate').lastElementChild.click()
this
.
queryFlag
=
1
}
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
}
)
}
,
return
new
Promise
(
async
resolve
=>
{
if
(
Object
.
keys
(
this
.
$route
.
query
).
length
&&
this
.
queryFlag
==
0
)
{
const
res
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'sourceList'
))
let
add_way
=
this
.
$route
.
query
.
addWay
||
''
let
isJoinVal
=
this
.
$route
.
query
.
isJoin
||
null
let
addWayObj
=
res
.
find
(
i
=>
i
.
label
===
add_way
)
this
.
searchForm
.
addWay
=
addWayObj
.
value
this
.
searchForm
.
isJoin
=
isJoinVal
===
null
?
null
:
Number
(
isJoinVal
)
setTimeout
(()
=>
{
this
.
$refs
.
combiForm
.
expandFn
()
}
,
100
)
// document.querySelector('.operate').lastElementChild.click()
this
.
queryFlag
=
1
}
this
.
searchFormTable
=
this
.
getParams
(
)
resolve
()
})
}
,
getDictionaryFun
()
{
getDictionaryFun
(
{
dictType
:
'add_way'
}
).
then
(
res
=>
{
if
(
!
res
)
{
return
getDictionaryFun
({
dictType
:
'add_way'
}).
then
(
res
=>
{
if
(
!
res
)
{
return
}
// addWaySource
const
id
=
this
.
clientManageFormList
.
findIndex
(
item
=>
{
return
item
.
name
==
'addWay'
})
let
data
=
res
.
map
(
item
=>
{
return
{
// ...item,
label
:
item
.
dictLabel
,
value
:
item
.
dictValue
}
// addWaySource
const
id
=
this
.
clientManageFormList
.
findIndex
(
item
=>
{
return
item
.
name
==
'addWay'
}
)
let
data
=
res
.
map
(
item
=>
{
return
{
// ...item,
label
:
item
.
dictLabel
,
value
:
item
.
dictValue
}
}
)
data
.
unshift
(
{
label
:
'全部'
,
value
:
''
}
)
this
.
sourceList
=
data
||
[]
if
(
data
&&
data
.
length
>
0
)
{
window
.
localStorage
.
setItem
(
'sourceList'
,
JSON
.
stringify
(
data
))
}
this
.
$set
(
this
.
clientManageFormList
[
id
],
'optionList'
,
data
)
}
)
}
,
})
data
.
unshift
({
label
:
'全部'
,
value
:
''
})
this
.
sourceList
=
data
||
[]
if
(
data
&&
data
.
length
>
0
)
{
window
.
localStorage
.
setItem
(
'sourceList'
,
JSON
.
stringify
(
data
))
}
this
.
$set
(
this
.
clientManageFormList
[
id
],
'optionList'
,
data
)
})
},
getStaffList
(
val
)
{
const
params
=
{
staffName
:
val
?
val
.
trim
():
''
const
params
=
{
staffName
:
val
?
val
.
trim
()
:
''
}
getStaffList
(
params
).
then
(
res
=>
{
if
(
res
.
length
==
0
)
{
return
''
getStaffList
(
params
).
then
(
res
=>
{
if
(
res
.
length
==
0
)
{
return
''
}
const
id
=
this
.
clientManageFormList
.
findIndex
(
item
=>
{
return
item
.
name
==
'followStaff'
})
const
staff
=
res
.
map
(
item
=>
{
return
{
label
:
item
.
staffName
,
value
:
item
.
staffName
}
const
id
=
this
.
clientManageFormList
.
findIndex
(
item
=>
{
return
item
.
name
==
'followStaff'
}
)
const
staff
=
res
.
map
(
item
=>
{
return
{
label
:
item
.
staffName
,
value
:
item
.
staffName
}
}
)
staff
.
unshift
(
{
label
:
'全部'
,
value
:
''
}
)
this
.
followstaffList
=
staff
this
.
$nextTick
(()
=>
{
this
.
clientManageFormList
[
id
].
optionList
=
staff
}
)
}
)
}
,
})
staff
.
unshift
({
label
:
'全部'
,
value
:
''
})
this
.
followstaffList
=
staff
this
.
$nextTick
(()
=>
{
this
.
clientManageFormList
[
id
].
optionList
=
staff
})
})
},
//来源 value值转为对应label
toLabel
(
value
)
{
if
(
value
!==
0
&&
!
value
)
{
if
(
value
!==
0
&&
!
value
)
{
return
}
let
curElement
=
this
.
sourceList
.
find
(
item
=>
{
return
item
.
value
===
value
})
let
curElement
=
this
.
sourceList
.
find
(
item
=>
{
return
item
.
value
===
value
}
)
return
curElement
.
label
}
,
return
curElement
.
label
},
//导出
handleExport
()
{
let
params
=
this
.
getParams
()
clientManageExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
}
)
}
,
let
params
=
this
.
getParams
()
clientManageExportApi
(
params
).
then
(
res
=>
{
this
.
$Utils
.
exportFn
(
res
)
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientManage
.
refreshTable
()
}
,
},
syncClick
()
{
let
_this
=
this
_this
.
sloading
=
true
syncCustomer
(
{
}
)
.
then
(
res
=>
{
if
(
!
res
)
{
let
_this
=
this
_this
.
sloading
=
true
syncCustomer
({})
.
then
(
res
=>
{
if
(
!
res
)
{
return
false
}
_this
.
sloading
=
false
_this
.
$message
.
success
(
'已同步客户'
)
_this
.
$refs
.
clientManage
.
refreshTable
()
}
)
.
catch
(
err
=>
{
_this
.
sloading
=
false
}
)
}
,
_this
.
sloading
=
false
_this
.
$message
.
success
(
'已同步客户'
)
_this
.
$refs
.
clientManage
.
refreshTable
()
})
.
catch
(
err
=>
{
_this
.
sloading
=
false
})
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
}
this
.
$refs
.
clientManage
.
refreshTable
()
// 点击之后强制页面刷新
this
.
searchForm
=
{}
this
.
$refs
.
clientManage
.
refreshTable
()
// 点击之后强制页面刷新
// this.reload()
// this.$forceUpdate() // 没用
// this.$router.go(0)//没有预期效果,会出现一段空白页,用户体验不好
// location.reload() //没有预期效果,会出现一段空白页,用户体验不好
}
,
},
goDetail
(
id
)
{
this
.
$router
.
push
(
{
path
:
'/clientManage/clientDetail'
,
query
:
{
id
:
id
}
this
.
$router
.
push
({
path
:
'/clientManage/clientDetail'
,
query
:
{
id
:
id
}
)
})
}
}
,
},
mounted
()
{}
}
</
script
>
<
/script><style lang="scss"scoped>@import '@/
styles
/
variables
.
scss
';
<
style
lang=
"scss"
scoped
>
@import
'@/styles/variables.scss'
;
@import
'@/styles/resetelement.scss'
;
//
/
deep
/
.el-table
.el-table__header
tr
th
{
//
line-height
:
30px
;
//
}
.expandImg
{
display
:
flex
;
//
justify-content
:
center
;
.smallFontSize
{
margin-left
:
2px
;
...
...
@@ -765,22 +614,18 @@ export default {
line-height
:
20px
;
font-weight
:
400
;
}
.imgEll
{
margin-left
:
6.5px
;
cursor
:
pointer
;
//
margin-bottom
:
3px
;
}
}
.pure-green-text
{
color
:
#61cc43
;
}
.pure-yello-text
{
color
:
#fb8f28
;
}
.scrm-sub-client-container
{
.pageTitle
{
margin-bottom
:
20px
;
...
...
@@ -792,42 +637,33 @@ export default {
line-height
:
20px
;
letter-spacing
:
1px
;
}
.pageContent
{
.leadList
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
8px
;
div
{
text-align
:
center
;
span
:
nth-child
(
1
)
{
font-weight
:
600
;
font-size
:
16px
;
}
}
/
deep
/
.el-button
{
color
:
$themeColor
;
border
:
1
px
solid
$themeColor
;
color
:
#08c489
;
border
:
1px
solid
#08c489
;
}
}
padding
:
20px
20px
30px
;
background-color
:
#fff
;
.
el
-
button
+
.
el
-
button
{
.el-button
+
.el-button
{
margin-left
:
10px
;
}
.searchTop
{
//
margin-bottom
:
20px
;
}
.glsx-table
{
//
/deep/
.el-table__fixed
{
//
height
:
100%
!important
;
//设置高优先,以覆盖内联样式
//
}
...
...
@@ -839,13 +675,11 @@ export default {
.entmicro
{
display
:
flex
;
i
{
color
:
#75acff
;
margin-right
:
3px
;
font-size
:
14px
;
}
//
}
}
...
...
@@ -857,5 +691,4 @@ export default {
}
}
}
<
/style>
\ No newline at end of file
</
style
>
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