Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 73d00a4e
authored
Aug 11, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
二手车线索管理需求开发
1 parent
3a1df6e2
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1960 additions
and
7 deletions
app.json
config.js
packageUsedCar/api.js
packageUsedCar/pages/indexPage/clueManageList/clueManageList.js
packageUsedCar/pages/indexPage/clueManageList/clueManageList.json
packageUsedCar/pages/indexPage/clueManageList/clueManageList.scss
packageUsedCar/pages/indexPage/clueManageList/clueManageList.wxml
packageUsedCar/pages/indexPage/components/TabBar/TabBar.js
packageUsedCar/pages/indexPage/components/TabBar/TabBar.json
packageUsedCar/pages/indexPage/components/TabBar/TabBar.wxml
packageUsedCar/pages/indexPage/components/TabBar/TabBar.wxss
packageUsedCar/pages/indexPage/index/index.js
packageUsedCar/pages/indexPage/index/index.sass
packageUsedCar/pages/indexPage/pursueClue/pursueClue.js
packageUsedCar/pages/indexPage/pursueClue/pursueClue.json
packageUsedCar/pages/indexPage/pursueClue/pursueClue.scss
packageUsedCar/pages/indexPage/pursueClue/pursueClue.wxml
app.json
View file @
73d00a4
...
@@ -255,7 +255,9 @@
...
@@ -255,7 +255,9 @@
"pages/ocrUsedCarModules/ocrUsedCarModules"
,
"pages/ocrUsedCarModules/ocrUsedCarModules"
,
"pages/indexPage/reportManage/reportList/reportList"
,
"pages/indexPage/reportManage/reportList/reportList"
,
"pages/indexPage/reportManage/addReport/addReport"
,
"pages/indexPage/reportManage/addReport/addReport"
,
"pages/indexPage/vehicleList/vehicleList"
"pages/indexPage/vehicleList/vehicleList"
,
"pages/indexPage/clueManageList/clueManageList"
,
"pages/indexPage/pursueClue/pursueClue"
]
]
},
},
{
{
...
@@ -334,4 +336,4 @@
...
@@ -334,4 +336,4 @@
],
],
"lazyCodeLoading"
:
"requiredComponents"
,
"lazyCodeLoading"
:
"requiredComponents"
,
"resizable"
:
true
"resizable"
:
true
}
}
\ No newline at end of file
\ No newline at end of file
config.js
View file @
73d00a4
...
@@ -22,7 +22,7 @@ export const RECRUIT_MENU_ENABLED = false
...
@@ -22,7 +22,7 @@ export const RECRUIT_MENU_ENABLED = false
* 4预发布
* 4预发布
* 5cdptest
* 5cdptest
*/
*/
let
index
=
2
;
let
index
=
1
;
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
systemInfo
=
getSystemInfoSync
();
const
systemInfo
=
getSystemInfoSync
();
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
...
...
packageUsedCar/api.js
View file @
73d00a4
...
@@ -377,5 +377,25 @@ module.exports = {
...
@@ -377,5 +377,25 @@ module.exports = {
// 获取车况信息列表统计数据
// 获取车况信息列表统计数据
getVehicleStatistics
(
data
)
{
getVehicleStatistics
(
data
)
{
return
newApi
.
post
(
'/carCondition/getStatusCount'
,
data
,
{
returnAll
:
true
})
return
newApi
.
post
(
'/carCondition/getStatusCount'
,
data
,
{
returnAll
:
true
})
}
},
// 获取线索管理角标数量
getClueManageStaticsCount
(
data
)
{
return
newApi
.
post
(
'/clues/followTimeStatusCount'
,
data
)
},
// 获取线索管理列表数据
getClueManageListApi
(
data
)
{
return
newApi
.
post
(
'/clues/page'
,
data
)
},
// 获取线索管理tab统计数据
getClueManageStaticsApi
(
data
)
{
return
newApi
.
post
(
'/clues/statusCount'
,
data
)
},
// 跟进线索
pursueClueApi
(
data
)
{
return
newApi
.
post
(
'/clues/followRecord/add'
,
data
,
{
returnAll
:
true
})
},
// 获取线索详情数据
getClueDetailApi
(
data
)
{
return
newApi
.
post
(
'/clues/detail'
,
data
)
}
};
};
packageUsedCar/pages/indexPage/clueManageList/clueManageList.js
0 → 100644
View file @
73d00a4
// packageUsedCar/pages/indexPage/clueManageList/clueManageList.js
const
IMGURL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import
reportPageTrackMixin
from
'~/mixins/reportPageTrackMixin'
import
{
getClueManageListApi
,
getClueManageStaticsApi
}
from
"~/packageUsedCar/api"
Page
({
behaviors
:
[
reportPageTrackMixin
],
/**
* 页面的初始数据
*/
data
:
{
track_event_code
:
'clueListBrowse'
,
IMGURL
,
pageTitle
:
"线索管理"
,
navBarHeight
:
0
,
keyword
:
""
,
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
list
:
[],
loading
:
false
,
nothing
:
false
,
listTrigger
:
false
,
tabIndex
:
0
,
cluesStatus
:
""
,
// 当前 tab 状态
typeList
:
[
{
text
:
"全部"
,
count
:
0
,
key
:
""
,
name
:
"totalCount"
},
{
text
:
"待跟进"
,
count
:
0
,
key
:
"1"
,
name
:
"pendingFollowCount"
},
{
text
:
"跟进中"
,
count
:
0
,
key
:
"2"
,
name
:
"followingCount"
},
{
text
:
"暂败"
,
count
:
0
,
key
:
"3"
,
name
:
"tempLostCount"
},
{
text
:
"成功收车"
,
count
:
0
,
key
:
"4"
,
name
:
"successCount"
}
]
},
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
navBarHeight
})
},
back
()
{
wx
.
$router
.
back
()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
this
.
getConfigData
()
},
async
getConfigData
()
{
const
{
vehicle_webview
}
=
await
wx
.
$util
.
getMockData
()
this
.
setData
({
usedcarWebviewUrl
:
vehicle_webview
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
this
.
loadPageData
()
},
/**
* Tab 切换
*/
tabClick
(
e
)
{
wx
.
$track
.
setTrackData
(
0
,
'clue-list-changeTab'
,
{})
const
{
detail
}
=
e
||
{}
const
item
=
this
.
data
.
typeList
?.
find
(
val
=>
val
.
key
==
detail
)
||
{}
this
.
setData
({
cluesStatus
:
item
.
key
?
Number
(
item
.
key
)
:
""
,
tabIndex
:
detail
||
0
,
currentPage
:
1
,
list
:
[],
nothing
:
false
},
()
=>
{
this
.
loadPageData
()
})
},
/**
* 加载页面数据(不带下拉动画)
*/
loadPageData
()
{
this
.
setData
({
currentPage
:
1
,
list
:
[],
nothing
:
false
},
()
=>
{
this
.
loadList
()
this
.
loadStatistics
()
})
},
/**
* 加载统计
*/
loadStatistics
()
{
const
userInfo
=
wx
.
$util
.
getUserInfo
()
getClueManageStaticsApi
({
sellerMerchantId
:
userInfo
?.
shopMerchantId
,
keyword
:
this
.
data
.
keyword
}).
then
(
res
=>
{
const
{
typeList
}
=
this
.
data
typeList
.
forEach
(
item
=>
{
item
.
count
=
res
[
item
.
name
]
||
0
})
this
.
setData
({
typeList
})
})
},
/**
* 下拉刷新
*/
listRefresh
()
{
this
.
setData
({
currentPage
:
1
,
list
:
[],
nothing
:
false
},
()
=>
{
this
.
loadList
()
this
.
loadStatistics
()
})
},
/**
* 加载更多
*/
loadMore
()
{
const
{
currentPage
,
pageSize
,
total
,
nothing
}
=
this
.
data
if
(
nothing
)
return
if
(
Math
.
ceil
(
total
/
pageSize
)
>
currentPage
)
{
this
.
setData
({
currentPage
:
currentPage
+
1
},
()
=>
this
.
loadList
())
}
else
{
this
.
setData
({
nothing
:
true
})
}
},
/**
* 加载列表
*/
loadList
()
{
const
{
pageSize
,
currentPage
,
cluesStatus
,
nothing
,
keyword
}
=
this
.
data
if
(
nothing
&&
currentPage
>
1
)
return
this
.
setData
({
loading
:
true
})
wx
.
$util
.
showLoading
(
"加载中"
)
const
params
=
{
currentPage
,
pageSize
,
t
:
{
cluesStatus
,
keyword
}
}
getClueManageListApi
(
params
).
then
(
res
=>
{
res
?.
records
?.
forEach
(
val
=>
{
// 品牌车型拼接
val
.
evaluateBrandModel
=
`
${
val
.
carBrand
}
-
${
val
.
carChildsBrandName
}
-
${
val
.
carSeriesName
}
-
${
val
.
carTypeName
}
`
// 线索状态映射
val
.
cluesStatusName
=
this
.
getCluesStatusName
(
val
.
cluesStatus
)
val
.
statusClass
=
this
.
getStatusClass
(
val
.
cluesStatus
)
val
.
canFollow
=
this
.
getCanFollow
(
val
.
cluesStatus
)
// 跟进状态映射
val
.
isExpiring
=
val
.
followTimeStatus
==
1
val
.
isOverdue
=
val
.
followTimeStatus
==
2
// 意向等级映射
val
.
intentionLevel
=
val
.
customerIntentLevel
val
.
intentionLevelClass
=
this
.
getLevelClass
(
val
.
customerIntentLevel
)
})
this
.
setData
({
list
:
currentPage
===
1
?
res
?.
records
||
[]
:
this
.
data
.
list
.
concat
(
res
?.
records
||
[]),
total
:
res
?.
total
,
loading
:
false
,
listTrigger
:
false
})
wx
.
$util
.
hideLoading
()
if
(
res
?.
pages
<=
currentPage
)
{
this
.
setData
({
nothing
:
true
})
}
else
{
this
.
setData
({
nothing
:
false
})
}
})
},
/**
* 获取线索状态名称
*/
getCluesStatusName
(
status
)
{
const
statusMap
=
{
1
:
"待跟进"
,
2
:
"跟进中"
,
3
:
"暂败"
,
4
:
"成功收车"
}
return
statusMap
[
status
]
||
"-"
},
/**
* 获取状态样式类
*/
getStatusClass
(
status
)
{
const
classMap
=
{
1
:
"status-pending"
,
2
:
"status-following"
,
3
:
"status-failed"
,
4
:
"status-success"
}
return
classMap
[
status
]
||
""
},
/**
* 是否可以跟进
*/
getCanFollow
(
status
)
{
// 待跟进(1)和跟进中(2)暂败(3)可以跟进
return
status
===
1
||
status
===
2
||
status
==
3
},
/**
* 获取意向等级样式类
*/
getLevelClass
(
level
)
{
const
classMap
=
{
O
:
"level-o"
,
H
:
"level-h"
,
A
:
"level-a"
,
B
:
"level-b"
,
C
:
"level-c"
,
D
:
"level-d"
}
return
classMap
[
level
]
||
""
},
/**
* 搜索输入
*/
searchInput
(
e
)
{
let
{
value
}
=
e
.
detail
this
.
setData
({
keyword
:
value
})
},
/**
* 搜索确认
*/
searchConfirm
()
{
this
.
search
()
},
/**
* 搜索
*/
search
()
{
// 搜索埋点
let
userInfo
=
wx
.
$util
.
getUserInfo
()
wx
.
$track
.
setTrackData
(
0
,
'clue-list-search'
,
{},
''
,
userInfo
?.
sceneType
)
this
.
setData
({
currentPage
:
1
,
list
:
[],
nothing
:
false
},
()
=>
{
this
.
loadList
()
this
.
loadStatistics
()
})
},
/**
* 搜索清空
*/
handleReset
()
{
this
.
setData
({
keyword
:
""
,
},
()
=>
{
this
.
search
()
})
},
/**
* 拨打电话
*/
callPhone
(
e
)
{
const
{
phone
}
=
e
.
currentTarget
.
dataset
||
{}
if
(
!
phone
)
return
wx
.
makePhoneCall
({
phoneNumber
:
phone
.
replace
(
/
\s
/g
,
''
)
})
},
/**
* 查看详情
*/
viewDetail
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
||
{}
this
.
navigateToClue
(
item
,
'detail'
)
},
/**
* 跟进线索
*/
followClue
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
||
{}
if
(
!
item
.
canFollow
)
return
this
.
navigateToClue
(
item
,
'follow'
)
},
/**
* 跳转到线索页面
*/
navigateToClue
(
item
,
mode
)
{
let
sessionId
=
wx
.
$util
.
getSessionId
()
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
{
usedcarWebviewUrl
}
=
this
.
data
const
queryObj
=
{
source
:
2
,
sessionId
:
sessionId
,
phone
:
userInfo
.
phone
,
operator
:
userInfo
.
name
,
operatorId
:
userInfo
.
uuid
,
conversionUserId
:
userInfo
.
uuid
,
conversionName
:
userInfo
.
name
,
conversionMerchantId
:
userInfo
.
merchantId
,
conversionMerchantName
:
userInfo
.
merchantName
,
merchantId
:
userInfo
.
shopMerchantId
,
merchantName
:
userInfo
.
shopMerchantName
,
cluesId
:
item
.
id
}
const
queryString
=
this
.
buildQuery
(
queryObj
)
const
finalPath
=
`
${
usedcarWebviewUrl
}
/clue-detail?
${
queryString
}
`
wx
.
$track
.
setTrackData
(
0
,
`clue
${
mode
===
'follow'
?
'pursue-clue'
:
'cule-detail'
}
`
,
''
)
if
(
mode
===
'follow'
)
{
return
wx
.
navigateTo
({
url
:
`/packageUsedCar/pages/indexPage/pursueClue/pursueClue?cluesId=
${
item
.
id
}
`
})
}
else
{
return
wx
.
navigateTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
finalPath
)}
`
,
})
}
},
/**
* 新增线索
*/
addClue
()
{
let
sessionId
=
wx
.
$util
.
getSessionId
()
let
userInfo
=
wx
.
$util
.
getUserInfo
()
let
{
usedcarWebviewUrl
}
=
this
.
data
const
queryObj
=
{
source
:
2
,
sessionId
:
sessionId
,
phone
:
userInfo
.
phone
,
operator
:
userInfo
.
name
,
operatorId
:
userInfo
.
uuid
,
conversionUserId
:
userInfo
.
uuid
,
conversionName
:
userInfo
.
name
,
conversionMerchantId
:
userInfo
.
merchantId
,
conversionMerchantName
:
userInfo
.
merchantName
,
merchantId
:
userInfo
.
shopMerchantId
,
merchantName
:
userInfo
.
shopMerchantName
}
const
queryString
=
this
.
buildQuery
(
queryObj
)
const
finalPath
=
`
${
usedcarWebviewUrl
}
/add-clue?
${
queryString
}
`
wx
.
$track
.
setTrackData
(
0
,
'add-clue'
,
''
)
return
wx
.
navigateTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
finalPath
)}
`
,
})
},
buildQuery
(
params
)
{
if
(
!
params
)
return
''
return
Object
.
keys
(
params
)
.
map
(
key
=>
{
return
`
${
encodeURIComponent
(
key
)}
=
${
encodeURIComponent
(
params
[
key
])}
`
;
})
.
join
(
'&'
)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
this
.
onPageHide
()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
this
.
onPageHide
()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
packageUsedCar/pages/indexPage/clueManageList/clueManageList.json
0 → 100644
View file @
73d00a4
{
"usingComponents"
:
{
"tab-bar"
:
"/packageUsedCar/pages/indexPage/components/TabBar/TabBar"
,
"van-icon"
:
"@vant/weapp/icon/index"
},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
\ No newline at end of file
packageUsedCar/pages/indexPage/clueManageList/clueManageList.scss
0 → 100644
View file @
73d00a4
page
{
background
:
#F8F8F8
;
}
.top-content
{
background
:
#FFFFFF
;
padding
:
16rpx
24rpx
;
}
.clue-list
{
height
:
100vh
;
}
.content
{
height
:
100%
;
box-sizing
:
border-box
;
padding-bottom
:
var
(
--
constantSafeAreaInsetBottom
);
padding-bottom
:
var
(
--
envSafeAreaInsetBottom
);
}
.bg
{
width
:
100%
;
height
:
var
(
--
fontSize800
);
background
:
url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/evaluationForm-bg.png')
;
background-size
:
100%
100%
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
-1
;
}
.search-box
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
position
:
sticky
;
top
:
0
;
left
:
0
;
z-index
:
9
;
box-sizing
:
border-box
;
margin-bottom
:
16rpx
;
.search-input
{
background
:
#F8F8F8
;
border-radius
:
32rpx
;
width
:
100%
;
height
:
72rpx
;
display
:
flex
;
align-items
:
center
;
.input
{
font-size
:
28rpx
;
width
:
calc
(
100%
-
140rpx
);
height
:
38rpx
;
line-height
:
38rpx
;
}
.input-placeholder
{
color
:
#BEC1C7
;
}
.search-icon
{
width
:
28rpx
;
height
:
28rpx
;
margin
:
0
10rpx
0
26rpx
;
}
.clearBtn
{
width
:
60rpx
;
height
:
72rpx
;
position
:
relative
;
.search-clear
{
position
:
absolute
;
left
:
20rpx
;
top
:
50%
;
transform
:
translateY
(
-50%
);
width
:
36rpx
;
height
:
36rpx
;
}
}
.search-btn
{
flex-shrink
:
0
;
width
:
88rpx
;
height
:
72rpx
;
position
:
relative
;
position
:
absolute
;
top
:
18rpx
;
right
:
30rpx
;
}
.search-text
{
color
:
#347BFF
;
font-size
:
28rpx
;
position
:
absolute
;
left
:
24rpx
;
top
:
50%
;
transform
:
translateY
(
-50%
);
width
:
70rpx
;
height
:
40rpx
;
}
}
}
.list-content
{
height
:
calc
(
100%
-
158rpx
);
.clue-item
{
margin
:
0
24rpx
28rpx
;
padding
:
24rpx
;
background
:
#fff
;
border-radius
:
24rpx
;
box-shadow
:
0
6rpx
16rpx
0
#8192d6
33
;
}
/* 头部状态 */
.clue-header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
16rpx
;
.flex
{
display
:
flex
;
align-items
:
center
;
}
.owner-name
{
font-size
:
32rpx
;
font-weight
:
500
;
color
:
#242424
;
}
.status-wrap
{
display
:
flex
;
align-items
:
center
;
gap
:
12rpx
;
}
.status-tag
{
padding
:
6rpx
12rpx
;
font-size
:
24rpx
;
line-height
:
34rpx
;
border-radius
:
8rpx
;
}
.status-following
{
background
:
#E8F5E9
;
color
:
#22C55E
;
}
.status-pending
{
background
:
#007AFF
14
;
color
:
#007AFF
;
}
.status-failed
{
background
:
#F24724
1
A
;
color
:
#F24724
;
}
.status-success
{
background
:
#7A66FE
14
;
color
:
#7A66FE
;
}
.expiring-tag
{
display
:
flex
;
align-items
:
center
;
gap
:
4rpx
;
padding
:
4rpx
12rpx
;
color
:
#FF9800
;
font-size
:
24rpx
;
border-radius
:
4rpx
;
image
{
width
:
24rpx
;
height
:
24rpx
;
}
}
.overdue-tag
{
display
:
flex
;
align-items
:
center
;
gap
:
4rpx
;
padding
:
4rpx
12rpx
;
color
:
#EF5350
;
font-size
:
24rpx
;
border-radius
:
4rpx
;
.overdue-icon
{
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
20rpx
;
height
:
20rpx
;
border-radius
:
50%
;
background
:
#EF5350
;
color
:
#fff
;
font-size
:
16rpx
;
}
}
.level-badge
{
width
:
48rpx
;
height
:
48rpx
;
border-radius
:
50%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
28rpx
;
font-weight
:
600
;
color
:
#fff
;
margin-right
:
12rpx
;
}
.level-o
{
background
:
#C04DFF
;
}
.level-h
{
background
:
#F7A900
;
}
.level-a
{
background
:
#55E3A9
;
}
.level-b
{
background
:
#5FBDFF
;
}
.level-c
{
background
:
#54DFFF
;
}
.level-d
{
background
:
#DCDCDC
;
}
}
.owner-phone
{
display
:
flex
;
align-items
:
center
;
gap
:
8rpx
;
font-size
:
28rpx
;
color
:
#347BFF
;
.phone-icon
{
width
:
32rpx
;
height
:
32rpx
;
}
}
/* 线索信息 */
.clue-info
{
margin-bottom
:
24rpx
;
padding
:
16rpx
24rpx
;
background
:
#F8F8F8
;
border-radius
:
16rpx
;
.info-row
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
12rpx
;
font-size
:
26rpx
;
&
:last-child
{
margin-bottom
:
0
;
}
.info-label
{
color
:
#000000
66
;
flex-shrink
:
0
;
width
:
184rpx
;
}
.info-value
{
color
:
#000000
E5
;
}
.text-hide
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
}
/* 失败原因 */
.failure-reason
{
margin-bottom
:
16rpx
;
padding
:
12rpx
16rpx
;
background
:
#FFEBEE
;
border-radius
:
8rpx
;
font-size
:
24rpx
;
line-height
:
34rpx
;
.failure-label
{
color
:
#EF5350
;
}
.failure-text
{
color
:
#1B233D
;
}
}
/* 底部按钮 */
.clue-footer
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
gap
:
16rpx
;
.btn
{
padding
:
6rpx
16rpx
;
font-size
:
28rpx
;
line-height
:
38rpx
;
border-radius
:
12rpx
;
}
.btn-outline
{
color
:
#347BFF
;
border
:
2rpx
solid
#347BFF
;
background
:
#fff
;
}
.btn-primary
{
color
:
#fff
;
background
:
#347BFF
;
padding
:
8rpx
16rpx
;
}
.btn-disabled
{
background
:
#C0C4CC
;
}
}
.empty
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
height
:
70%
;
color
:
#999999
;
font-size
:
26rpx
;
}
.empty
.icon
{
width
:
160rpx
;
height
:
160rpx
;
margin-bottom
:
16rpx
;
}
.end-text
{
width
:
100%
;
text-align
:
center
;
padding
:
24rpx
0
36rpx
;
color
:
#999999
;
font-size
:
24rpx
;
}
}
.fixed-add
{
position
:
fixed
;
right
:
24rpx
;
bottom
:
80rpx
;
line-height
:
96rpx
;
text-align
:
center
;
color
:
#FFFFFF
;
width
:
96rpx
;
height
:
96rpx
;
background
:
#347BFF
;
border-radius
:
50%
;
box-shadow
:
0px
3px
14px
2px
#000000
0
D
;
}
\ No newline at end of file
\ No newline at end of file
packageUsedCar/pages/indexPage/clueManageList/clueManageList.wxml
0 → 100644
View file @
73d00a4
<!--packageUsedCar/pages/indexPage/clueManageList/clueManageList.wxml-->
<view class="clue-list">
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: #FFFFFF;box-shadow:none;' }}" bindback="back">
<view class="title-text">{{pageTitle}}</view>
</navigation-bar>
<view class="content" style="padding-top: {{navBarHeight}}px;">
<view class="top-content">
<view class="search-box">
<view class="search-input">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/images/search.png" class="search-icon" />
<input type="text" placeholder="搜索ID/车主/手机号/车型" class="input" confirm-type="search" value="{{ keyword }}" placeholder-class="input-placeholder" maxlength="17" bindinput="searchInput" bindconfirm="searchConfirm" />
<block wx:if="{{ keyword }}">
<view bindtap="handleReset" class="clearBtn">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/images/clear.png" class="search-clear" />
</view>
</block>
</view>
</view>
<view style="position: relative;">
<tab-bar tabList="{{ typeList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" />
</view>
</view>
<scroll-view class="list-content" scroll-y="true" scroll-top="{{scrollTop}}" lower-threshold="60" refresher-enabled refresher-triggered="{{listTrigger}}" bindrefresherrefresh="listRefresh" bindscrolltolower="loadMore">
<block wx:if="{{list.length}}">
<view style="width: 100%;height: 24rpx;"></view>
<view class="clue-item" wx:for="{{list}}" wx:key="clueId" data-item="{{item}}" bindtap="viewDetail">
<view class="clue-header">
<view class="flex">
<view class="level-badge {{item.intentionLevelClass}}">
{{item.intentionLevel}}
</view>
<view class="owner-name">{{item.carOwnerName || '-'}}</view>
</view>
<view class="status-wrap">
<view wx:if="{{item.isExpiring}}" class="expiring-tag">
<image src="{{IMGURL}}alarm-clock.png" mode=""/>
临期
</view>
<view wx:if="{{item.isOverdue}}" class="overdue-tag">
<van-icon name="warning-o" color="#F24724" />
已超期
</view>
<view class="status-tag {{item.statusClass}}">{{item.cluesStatusName}}</view>
</view>
</view>
<!-- 线索信息 -->
<view class="clue-info">
<view class="info-row">
<text class="info-label">品牌车型</text>
<view class="info-value text-hide">{{item.evaluateBrandModel || '-'}}</view>
</view>
<view class="info-row">
<text class="info-label">线索ID:</text>
<text class="info-value">{{item.cluesNo || '-'}}</text>
</view>
<view class="info-row">
<text class="info-label">创建:</text>
<text class="info-value">{{item.enterTime || '-'}}</text>
</view>
<view class="info-row">
<text class="info-label">最后跟进:</text>
<text class="info-value">{{item.latestFollowTime || '-'}}</text>
</view>
<view class="info-row">
<text class="info-label">下一次跟进:</text>
<text class="info-value {{item.isOverdue || item.isExpiring ? 'warning-text' : ''}}">{{item.nextFollowTime || '—'}}</text>
</view>
</view>
<!-- 失败原因 -->
<view wx:if="{{item.failureReason}}" class="failure-reason">
<text class="failure-label">{{item.cluesStatusName}}:</text>
<text class="failure-text">{{item.failReasonText}}</text>
</view>
<!-- 底部按钮 -->
<view class="clue-footer">
<view class="phone">
<view class="owner-phone" catchtap="callPhone" data-phone="{{item.carOwnerPhone}}">
<image class="phone-icon" src="{{IMGURL}}call-phone.png" mode=""/>
{{item.carOwnerPhone || '-'}}
</view>
</view>
<view style="display: flex; align-items: center;gap: 16rpx;">
<view class="btn btn-outline" catchtap="viewDetail" data-item="{{item}}">查看详情</view>
<view wx:if="{{item.canFollow}}" class="btn btn-primary" catchtap="followClue" data-item="{{item}}">跟进线索</view>
</view>
</view>
</view>
</block>
<block wx:if="{{!list.length && !loading}}">
<view class="empty">
<image class="icon" src="{{IMGURL}}/usedcar-empty-data.png"></image>
暂无数据
</view>
</block>
<view class="end-text" wx:if="{{nothing && list.length}}">~到底了</view>
</scroll-view>
<view class="fixed-add" bindtap="addClue"><van-icon name="plus" color="#FFFFFF" size="20" /></view>
</view>
</view>
packageUsedCar/pages/indexPage/components/TabBar/TabBar.js
0 → 100644
View file @
73d00a4
// components/TabBar/TabBar.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
tabList
:
Array
,
activeIndex
:
{
type
:
Number
,
observer
:
function
(
n
)
{
if
(
this
.
data
.
tabIndex
!=
n
)
{
this
.
setData
({
tabIndex
:
this
.
data
.
activeIndex
})
this
.
setTab
(
this
.
data
.
tabIndex
,
true
)
}
}
},
scroll
:
Boolean
},
/**
* 组件的初始数据
*/
data
:
{
tabIndex
:
0
},
lifetimes
:
{
ready
()
{
this
.
setTab
(
this
.
data
.
tabIndex
,
true
)
let
that
=
this
wx
.
$eventbus
.
on
(
'page_show'
,
n
=>
{
!
that
.
data
.
width
&&
that
.
setTab
(
that
.
data
.
tabIndex
,
true
)
})
}
},
/**
* 组件的方法列表
*/
methods
:
{
change
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
this
.
setTab
(
index
)
},
setTab
(
index
=
0
,
notInitialLoading
=
false
)
{
let
{
tabIndex
,
tabList
}
=
this
.
data
setTimeout
(()
=>
{
this
.
setData
({
tabIndex
:
index
,
to
:
`to-
${
index
}
`
})
if
(
!
notInitialLoading
)
this
.
triggerEvent
(
'click'
,
tabList
[
index
].
key
)
},
100
)
}
}
})
\ No newline at end of file
\ No newline at end of file
packageUsedCar/pages/indexPage/components/TabBar/TabBar.json
0 → 100644
View file @
73d00a4
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageUsedCar/pages/indexPage/components/TabBar/TabBar.wxml
0 → 100644
View file @
73d00a4
<block>
<scroll-view class=" scroll" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}" id="to-{{index}}">
<view id="tab-{{index}}" class="text-item">
<view class="tab-item-text">{{item.text || item }}</view> · <view wx:if="{{item.count >= 0}}" style="font-size: 20rpx;margin-left: 8rpx;">{{item.count}}</view>
</view>
</view>
</block>
</scroll-view>
</block>
\ No newline at end of file
\ No newline at end of file
packageUsedCar/pages/indexPage/components/TabBar/TabBar.wxss
0 → 100644
View file @
73d00a4
/* components/TabBar/TabBar.wxss */
.scroll {
box-sizing: border-box;
color: #5A5E66;
width: 100%;
display: flex;
height: 56rpx;
}
.scroll .tab-item {
margin-right: 12rpx;
}
.scroll .tab-item:last-child {
margin-right: 0;
}
.active {
color: #347BFF;
}
.tab-item .text-item {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.tab-item-text {
margin-right: 8rpx;
}
.scroll .tab-item {
height: 100%;
flex-shrink: 0;
font-size: 28rpx;
padding: 8rpx 24rpx;
background: #F8F8F8;
border-radius: 32rpx;
height: 56rpx;
box-sizing: border-box;
}
.scroll .active {
background: #FFFFFF;
height: 52rpx;
border: 2rpx solid #347BFF
}
\ No newline at end of file
\ No newline at end of file
packageUsedCar/pages/indexPage/index/index.js
View file @
73d00a4
...
@@ -92,6 +92,13 @@ Component({
...
@@ -92,6 +92,13 @@ Component({
icon
:
"usedCar/vehicle-message"
,
icon
:
"usedCar/vehicle-message"
,
path
:
"vehicleList"
,
path
:
"vehicleList"
,
checkReport
:
true
,
checkReport
:
true
,
},
{
menuText
:
"线索管理"
,
icon
:
"usedCar/clue-manage-icon"
,
path
:
"clueManageList"
,
checkReport
:
true
,
tipsNum
:
0
,
trackingCode
:
'clue-manage'
}],
}],
current
:
0
,
current
:
0
,
itemDataList
:
[{
itemDataList
:
[{
...
@@ -158,6 +165,8 @@ Component({
...
@@ -158,6 +165,8 @@ Component({
methods
:
{
methods
:
{
onLoad
()
{
onLoad
()
{
this
.
getStatic
()
this
.
getStatic
()
// 获取线索管理角标数量
this
.
getClueTipsNum
()
},
},
getStatic
()
{
getStatic
()
{
let
{
current
}
=
this
.
data
let
{
current
}
=
this
.
data
...
@@ -172,6 +181,18 @@ Component({
...
@@ -172,6 +181,18 @@ Component({
})
})
})
})
},
},
getClueTipsNum
()
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
newApi
.
getClueManageStaticsCount
({
sellerMerchantId
:
userInfo
.
shopMerchantId
}).
then
(
res
=>
{
let
{
menuList
}
=
this
.
data
menuList
?.
forEach
(
val
=>
{
if
(
val
.
path
==
'clueManageList'
)
{
val
.
tipsNum
=
res
?.
totalCount
>
99
?
'99+'
:
Number
(
res
?.
totalCount
)
||
0
}
})
this
.
setData
({
menuList
})
})
},
changeSwiper
(
e
)
{
changeSwiper
(
e
)
{
let
name
=
let
name
=
e
.
detail
.
current
==
0
?
e
.
detail
.
current
==
0
?
...
@@ -197,6 +218,11 @@ Component({
...
@@ -197,6 +218,11 @@ Component({
navGo
:
throttle
(
async
function
(
e
)
{
navGo
:
throttle
(
async
function
(
e
)
{
let
{
item
,
h5Url
}
=
e
.
currentTarget
.
dataset
let
{
item
,
h5Url
}
=
e
.
currentTarget
.
dataset
const
webviewUrl
=
(
h5Url
&&
String
(
h5Url
).
trim
())
||
item
.
webviewUrl
const
webviewUrl
=
(
h5Url
&&
String
(
h5Url
).
trim
())
||
item
.
webviewUrl
if
(
item
.
trackingCode
)
{
// 埋点
let
userInfo
=
wx
.
$util
.
getUserInfo
()
wx
.
$track
.
setTrackData
(
0
,
item
.
trackingCode
,
{},
''
,
userInfo
?.
sceneType
)
}
if
(
item
.
buttonCode
)
{
// 校验是否有进入权限
if
(
item
.
buttonCode
)
{
// 校验是否有进入权限
wx
.
$util
.
showLoading
(
'加载中'
)
wx
.
$util
.
showLoading
(
'加载中'
)
const
res
=
await
newApi
.
checkPermissionsAPI
({
buttonCode
:
item
.
buttonCode
})
const
res
=
await
newApi
.
checkPermissionsAPI
({
buttonCode
:
item
.
buttonCode
})
...
@@ -212,7 +238,6 @@ Component({
...
@@ -212,7 +238,6 @@ Component({
}
}
if
(
item
.
webviewUrl
)
{
if
(
item
.
webviewUrl
)
{
const
targetUrl
=
`/pages/webView/h5FullNoShare?url=
${
encodeURIComponent
(
webviewUrl
)}
&openType=miniApp`
const
targetUrl
=
`/pages/webView/h5FullNoShare?url=
${
encodeURIComponent
(
webviewUrl
)}
&openType=miniApp`
console
.
log
(
'[navGo] webviewUrl:'
,
webviewUrl
,
'=> navigateTo:'
,
targetUrl
)
wx
.
navigateTo
({
url
:
targetUrl
})
wx
.
navigateTo
({
url
:
targetUrl
})
return
return
}
}
...
...
packageUsedCar/pages/indexPage/index/index.sass
View file @
73d00a4
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
}
}
.hot_icon
{
.hot_icon
{
position
:
absolute
;
position
:
absolute
;
right
:
var
(
--
fontSize
4
6
)
;
right
:
var
(
--
fontSize
3
6
)
;
top
:
0
;
top
:
0
;
min-width
:
var
(
--
fontSize24
)
;
min-width
:
var
(
--
fontSize24
)
;
height
:
var
(
--
fontSize24
)
;
height
:
var
(
--
fontSize24
)
;
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:center
;
align-items
:center
;
padding
:var
(
--fontSize2
);
padding
:var
(
--fontSize2
)
6rpx
;
border
:var
(
--fontSize2
)
solid
#ffffff
;
border
:var
(
--fontSize2
)
solid
#ffffff
;
}
}
.bubble_icon
{
.bubble_icon
{
...
...
packageUsedCar/pages/indexPage/pursueClue/pursueClue.js
0 → 100644
View file @
73d00a4
// packageUsedCar/pages/indexPage/pursueClue/pursueClue.js
import
newApi
from
"~/packageUsedCar/api"
;
const
FOLLOW_WAY_LIST
=
[
{
label
:
"电话"
,
value
:
1
},
{
label
:
"微信"
,
value
:
2
},
{
label
:
"到店"
,
value
:
3
},
{
label
:
"上门"
,
value
:
4
},
{
label
:
"短信"
,
value
:
5
},
{
label
:
"其他"
,
value
:
6
},
];
const
FOLLOW_RESULT_LIST
=
[
{
label
:
"邀约验车"
,
value
:
1
},
{
label
:
"客户考虑中"
,
value
:
2
},
{
label
:
"不卖旧车"
,
value
:
3
},
{
label
:
"还在考虑收购价"
,
value
:
4
},
{
label
:
"还没定新车"
,
value
:
5
},
{
label
:
"成功收车"
,
value
:
6
},
{
label
:
"其他"
,
value
:
7
},
];
const
REPLACE_TYPE_LIST
=
[
{
label
:
"收车置换"
,
value
:
1
},
{
label
:
"不收车置换"
,
value
:
2
},
{
label
:
"未确定"
,
value
:
3
},
];
const
CHECK_WAY_LIST
=
[
{
label
:
"到店"
,
value
:
1
},
{
label
:
"远程"
,
value
:
2
},
{
label
:
"第三方"
,
value
:
3
},
{
label
:
"上门"
,
value
:
4
},
];
const
FAILURE_REASON_LIST
=
[
{
label
:
"客户自行处理"
,
value
:
1
},
{
label
:
"家人不同意"
,
value
:
2
},
{
label
:
"客户决定增购"
,
value
:
3
},
{
label
:
"旧车已处置"
,
value
:
4
},
{
label
:
"其他"
,
value
:
5
},
];
const
LEVEL_LIST
=
[
{
code
:
"O"
,
name
:
"O级"
,
desc
:
"新车已定,旧车已签合同(客情回复,确认交车时间)"
,
followDays
:
1
,
color
:
"#6B5BFF"
},
{
code
:
"H"
,
name
:
"H级"
,
desc
:
"新车已定,旧车已评估报价,客户正在对比价格(1日内跟进)"
,
followDays
:
1
,
color
:
"#FF5A4E"
},
{
code
:
"A"
,
name
:
"A级"
,
desc
:
"客户新车基本看好,一周内会购车,旧车已评估报价(2日内跟进)"
,
followDays
:
2
,
color
:
"#FF9D0A"
},
{
code
:
"B"
,
name
:
"B级"
,
desc
:
"新车车型基本看好,预计一个月内会购车,旧车还未确定是否置换(5天内跟进)"
,
followDays
:
5
,
color
:
"#07C160"
},
{
code
:
"C"
,
name
:
"C级"
,
desc
:
"客户新车还未确定车型,旧车未确定置换(10天内跟进)"
,
followDays
:
10
,
color
:
"#347BFF"
},
{
code
:
"D"
,
name
:
"D级"
,
desc
:
"新车未看具体车型,短期内不打算换车,旧车大概看看(20天跟进)"
,
followDays
:
20
,
color
:
"#969799"
},
];
Page
({
/**
* 页面的初始数据
*/
data
:
{
navBarHeight
:
0
,
cluesId
:
""
,
clueInfo
:
{},
followWayList
:
FOLLOW_WAY_LIST
,
followResultList
:
FOLLOW_RESULT_LIST
,
replaceTypeList
:
REPLACE_TYPE_LIST
,
checkWayList
:
CHECK_WAY_LIST
,
failureReasonList
:
FAILURE_REASON_LIST
,
levelList
:
LEVEL_LIST
,
showLevelPicker
:
false
,
tempLevel
:
"C"
,
submitting
:
false
,
nextFollowTime
:
""
,
followDaysText
:
""
,
selectedLevel
:
{},
remarkLength
:
0
,
form
:
{
followWay
:
null
,
followResult
:
null
,
replaceType
:
null
,
checkWay
:
null
,
failureReason
:
null
,
customerIntentLevel
:
"C"
,
remark
:
""
,
},
},
navbarReady
(
e
)
{
this
.
setData
({
navBarHeight
:
e
.
detail
.
height
||
0
,
});
},
back
()
{
wx
.
navigateBack
();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
const
cluesId
=
options
.
cluesId
||
""
;
this
.
setData
({
cluesId
});
this
.
loadClueDetail
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
async
loadClueDetail
()
{
const
{
cluesId
}
=
this
.
data
;
if
(
!
cluesId
)
{
wx
.
showToast
({
title
:
"缺少线索ID"
,
icon
:
"none"
});
return
;
}
wx
.
showLoading
({
title
:
"加载中"
});
try
{
const
res
=
await
newApi
.
getClueDetailApi
({
id
:
cluesId
});
res
.
evaluateBrandModel
=
`
${
res
.
carBrand
}
-
${
res
.
carChildsBrandName
}
-
${
res
.
carSeriesName
}
-
${
res
.
carTypeName
}
`
const
clueInfo
=
res
||
{};
this
.
setData
({
clueInfo
,
"form.customerIntentLevel"
:
res
?.
customerIntentLevel
,
});
this
.
calcNextFollowTime
(
res
?.
customerIntentLevel
);
}
catch
(
error
)
{
console
.
error
(
"loadClueDetail error"
,
error
);
}
finally
{
wx
.
hideLoading
();
}
},
onTagTap
(
e
)
{
const
{
field
,
value
}
=
e
.
currentTarget
.
dataset
;
this
.
setData
({
[
`form.
${
field
}
`
]:
value
,
});
},
onResultTap
(
e
)
{
const
{
value
}
=
e
.
currentTarget
.
dataset
;
this
.
setData
({
"form.followResult"
:
value
,
"form.replaceType"
:
""
,
"form.checkWay"
:
""
,
"form.failureReason"
:
""
,
});
},
openLevelPicker
()
{
this
.
setData
({
showLevelPicker
:
true
,
tempLevel
:
this
.
data
.
form
.
customerIntentLevel
,
});
},
closeLevelPicker
()
{
this
.
setData
({
showLevelPicker
:
false
});
},
onLevelSelect
(
e
)
{
this
.
setData
({
tempLevel
:
e
.
currentTarget
.
dataset
.
code
});
},
confirmLevel
()
{
const
level
=
this
.
data
.
tempLevel
;
this
.
setData
({
"form.customerIntentLevel"
:
level
,
showLevelPicker
:
false
,
});
this
.
calcNextFollowTime
(
level
);
},
calcNextFollowTime
(
levelCode
)
{
const
item
=
LEVEL_LIST
.
find
((
i
)
=>
i
.
code
===
levelCode
)
||
LEVEL_LIST
[
4
];
const
now
=
new
Date
();
const
target
=
new
Date
(
now
.
getTime
()
+
item
.
followDays
*
24
*
60
*
60
*
1000
);
const
format
=
(
n
)
=>
String
(
n
).
padStart
(
2
,
"0"
);
const
nextFollowTime
=
`
${
target
.
getFullYear
()}
-
${
format
(
target
.
getMonth
()
+
1
)}
-
${
format
(
target
.
getDate
())}
${
format
(
target
.
getHours
())}
:
${
format
(
target
.
getMinutes
())}
:
${
format
(
target
.
getSeconds
())}
`
;
this
.
setData
({
nextFollowTime
,
followDaysText
:
item
.
followDays
===
1
?
"1天后"
:
`
${
item
.
followDays
}
天后`
,
selectedLevel
:
item
,
});
},
onRemarkInput
(
e
)
{
const
remark
=
e
.
detail
.
value
||
""
;
this
.
setData
({
"form.remark"
:
remark
,
remarkLength
:
remark
.
replace
(
/
\s
/g
,
""
).
length
,
});
},
validateForm
()
{
const
{
form
}
=
this
.
data
;
if
(
!
form
.
followWay
)
{
wx
.
showToast
({
title
:
"请选择跟进方式"
,
icon
:
"none"
});
return
false
;
}
if
(
!
form
.
followResult
)
{
wx
.
showToast
({
title
:
"请选择跟进结果"
,
icon
:
"none"
});
return
false
;
}
if
(
form
.
followResult
===
3
&&
!
form
.
failureReason
)
{
wx
.
showToast
({
title
:
"请选择暂败原因"
,
icon
:
"none"
});
return
false
;
}
const
remarkLen
=
this
.
getRemarkLength
();
if
(
form
.
followResult
===
3
&&
form
.
failureReason
===
5
)
{
if
(
remarkLen
<
10
)
{
wx
.
showToast
({
title
:
"请填写暂败原因说明,最少10个字"
,
icon
:
"none"
});
return
false
;
}
}
if
(
remarkLen
>
0
&&
remarkLen
<
10
)
{
wx
.
showToast
({
title
:
"跟进内容不能少于10个字"
,
icon
:
"none"
});
return
false
;
}
if
(
remarkLen
>
200
)
{
wx
.
showToast
({
title
:
"跟进内容最多200个字"
,
icon
:
"none"
});
return
false
;
}
if
(
!
form
.
customerIntentLevel
)
{
wx
.
showToast
({
title
:
"请选择客户意向等级"
,
icon
:
"none"
});
return
false
;
}
return
true
;
},
getRemarkLength
()
{
return
(
this
.
data
.
form
.
remark
||
""
).
replace
(
/
\s
/g
,
""
).
length
;
},
async
onSubmit
()
{
if
(
!
this
.
validateForm
())
return
;
if
(
this
.
data
.
submitting
)
return
;
this
.
setData
({
submitting
:
true
});
try
{
const
{
cluesId
,
form
,
clueInfo
}
=
this
.
data
;
let
clueStatus
=
""
;
if
(
form
.
followResult
===
3
)
{
clueStatus
=
"failed"
;
}
const
levelChangeRecord
=
clueInfo
.
customerIntentLevel
&&
clueInfo
.
customerIntentLevel
!==
form
.
customerIntentLevel
?
`由
${
clueInfo
.
customerIntentLevel
}
级变更为
${
form
.
customerIntentLevel
}
级`
:
""
;
const
params
=
{
cluesId
,
followStyle
:
form
.
followWay
,
followResult
:
form
.
followResult
,
displacementType
:
form
.
replaceType
,
detectionMode
:
form
.
checkWay
,
failReason
:
form
.
failureReason
,
customerIntentLevel
:
form
.
customerIntentLevel
,
followRemark
:
form
.
remark
,
nextFollowTime
:
this
.
data
.
nextFollowTime
,
};
wx
.
$util
.
showLoading
()
await
newApi
.
pursueClueApi
(
params
).
then
(
res
=>
{
if
(
res
.
data
?.
code
==
0
)
{
wx
.
showToast
({
title
:
"保存成功"
,
icon
:
"success"
});
setTimeout
(()
=>
{
wx
.
navigateBack
();
},
1500
);
}
else
{
this
.
setData
({
submitting
:
false
})
wx
.
$util
.
showToast
(
res
.
data
.
msg
)
}
});
}
catch
(
error
)
{
console
.
error
(
"onSubmit error"
,
error
);
}
finally
{
this
.
setData
({
submitting
:
false
});
}
},
});
packageUsedCar/pages/indexPage/pursueClue/pursueClue.json
0 → 100644
View file @
73d00a4
{
"navigationBarTitleText"
:
"跟进线索"
,
"navigationStyle"
:
"custom"
,
"usingComponents"
:
{
"navigation-bar"
:
"/components/navigationBar/navigationBar"
,
"van-popup"
:
"@vant/weapp/popup/index"
,
"van-icon"
:
"@vant/weapp/icon/index"
,
"van-button"
:
"@vant/weapp/button/index"
}
}
packageUsedCar/pages/indexPage/pursueClue/pursueClue.scss
0 → 100644
View file @
73d00a4
/* packageUsedCar/pages/indexPage/pursueClue/pursueClue.scss */
.pursue-clue-layout
{
display
:
flex
;
flex-direction
:
column
;
width
:
100vw
;
height
:
100vh
;
background
:
#f7f8fa
;
}
.navigation-header
{
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
100
;
width
:
100%
;
}
.navigation-title
{
font-size
:
34rpx
;
font-weight
:
600
;
color
:
#323233
;
text-align
:
center
;
}
.scroll-content
{
flex
:
1
;
box-sizing
:
border-box
;
height
:
100vh
;
padding-bottom
:
140rpx
;
overflow-y
:
auto
;
}
.info-card
{
margin
:
24rpx
;
padding
:
24rpx
;
background
:
#fff
;
border-radius
:
16rpx
;
.card-title
{
margin-bottom
:
24rpx
;
font-size
:
32rpx
;
font-weight
:
500
;
color
:
#242424
;
}
}
.info-row
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
12rpx
;
}
.info-row.flex-start
{
align-items
:
flex-start
;
}
.info-row
:last-child
{
border-bottom
:
none
;
}
.info-label
{
width
:
220rpx
;
flex-shrink
:
0
;
font-size
:
26rpx
;
color
:
#000000
66
;
}
.info-value
{
display
:
flex
;
align-items
:
center
;
font-size
:
26rpx
;
color
:
#000000
E5
;
}
.level-O
{
background
:
#C04DFF
;
}
.level-H
{
background
:
#F7A900
;
}
.level-A
{
background
:
#55E3A9
;
}
.level-B
{
background
:
#5FBDFF
;
}
.level-C
{
background
:
#54DFFF
;
}
.level-D
{
background
:
#DCDCDC
;
}
.level-text
{
margin-left
:
8rpx
;
}
.text-level-O
{
background
:
#C04DFF
;
}
.text-level-H
{
color
:
#F7A900
;
}
.text-level-A
{
color
:
#55E3A9
;
}
.text-level-B
{
color
:
#5FBDFF
;
}
.text-level-C
{
color
:
#54DFFF
;
}
.text-level-D
{
color
:
#DCDCDC
;
}
.form-block
{
margin
:
0
24rpx
24rpx
;
padding
:
24rpx
;
background
:
#fff
;
border-radius
:
16rpx
;
color
:
#000000
E5
;
font-size
:
28rpx
;
.entry
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
28rpx
0
;
border-bottom
:
1rpx
solid
#f2f3f5
;
margin-bottom
:
16rpx
;
}
}
.block-title
{
position
:
relative
;
margin-bottom
:
20rpx
;
font-size
:
30rpx
;
font-weight
:
500
;
color
:
#323233
;
}
.
block-title
.
required
:
:
after
{
color
:
#ee3040
;
content
:
"*"
;
margin-left
:
4rpx
;
}
.tag-list
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
16rpx
;
margin-bottom
:
24rpx
;
padding-bottom
:
16rpx
;
border-bottom
:
1rpx
solid
#f2f3f5
;
}
.tag
{
padding
:
8rpx
24rpx
;
font-size
:
26rpx
;
color
:
#242424
;
background
:
#FFFFFF
;
border
:
1rpx
solid
#EEEEEE
;
border-radius
:
32rpx
;
}
.tag.active
{
color
:
#347BFF
;
background
:
#347BFF
1
A
;
border-color
:
#347bff
;
}
/* 意向等级选择器 */
.level-cell
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
28rpx
;
background
:
#fff
;
}
.level-label
{
position
:
relative
;
padding-left
:
20rpx
;
color
:
#323233
;
}
.required-mark
{
color
:
#ee3040
;
margin-left
:
4rpx
;
}
.level-right
{
display
:
flex
;
gap
:
8rpx
;
align-items
:
center
;
color
:
#969799
;
}
.level-badge
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
44rpx
;
height
:
44rpx
;
font-size
:
24rpx
;
font-weight
:
600
;
color
:
#fff
;
border-radius
:
50%
;
}
.level-desc
{
margin
:
24rpx
0
;
padding
:
20rpx
32rpx
;
font-size
:
26rpx
;
border-radius
:
16rpx
;
line-height
:
1
.5
;
color
:
#000000
E5
;
background
:
#F8F8F8
;
}
.level-desc-label
{
font-weight
:
500
;
}
.next-follow
{
display
:
flex
;
align-items
:
flex-start
;
margin
:
24rpx
0
;
padding
:
24rpx
;
background
:
#edf4ff
;
border-radius
:
16rpx
;
}
.clock-icon
{
flex-shrink
:
0
;
margin-top
:
4rpx
;
margin-right
:
16rpx
;
font-size
:
32rpx
;
color
:
#347bff
;
}
.next-follow-content
{
flex
:
1
;
}
.next-follow-title
{
margin-bottom
:
8rpx
;
font-size
:
26rpx
;
color
:
#347bff
;
}
.next-follow-time
{
font-size
:
28rpx
;
color
:
#323233
;
}
.remark-block
{
padding-bottom
:
16rpx
;
}
.remark-textarea
{
width
:
100%
;
min-height
:
200rpx
;
padding
:
16rpx
;
font-size
:
28rpx
;
line-height
:
1
.6
;
color
:
#323233
;
background
:
#FFFFFF
;
border-radius
:
12rpx
;
box-sizing
:
border-box
;
border
:
2rpx
solid
#EEEEEE
;
}
.word-limit
{
margin-top
:
8rpx
;
font-size
:
24rpx
;
color
:
#969799
;
text-align
:
right
;
}
.word-limit.warning
{
color
:
#ee3040
;
}
.safe-bottom
{
height
:
40rpx
;
}
.footer
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
z-index
:
50
;
box-sizing
:
border-box
;
width
:
100%
;
padding
:
20rpx
32rpx
env
(
safe-area-inset-bottom
);
background
:
#fff
;
box-shadow
:
0
-2rpx
16rpx
rgba
(
0
,
0
,
0
,
0
.06
);
}
.save-btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
96rpx
;
font-size
:
32rpx
;
font-weight
:
500
;
color
:
#fff
;
background
:
#347bff
;
border-radius
:
12rpx
;
}
.save-btn.disabled
{
opacity
:
0
.6
;
}
/* 等级选择弹窗 */
.level-picker
{
display
:
flex
;
flex-direction
:
column
;
max-height
:
81vh
;
}
.level-picker__header
{
flex-shrink
:
0
;
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
32rpx
;
}
.level-picker__title
{
font-size
:
32rpx
;
font-weight
:
600
;
color
:
#323233
;
text-align
:
center
;
}
.level-picker__body
{
box-sizing
:
border-box
;
flex
:
1
;
min-height
:
0
;
padding
:
0
32rpx
;
overflow-y
:
auto
;
-webkit-overflow-scrolling
:
touch
;
}
.level-option
{
position
:
relative
;
display
:
flex
;
gap
:
24rpx
;
align-items
:
center
;
padding
:
28rpx
56rpx
28rpx
0
;
border-bottom
:
2rpx
solid
#f2f3f5
;
}
.level-option__check
{
width
:
36rpx
;
height
:
36rpx
;
font-size
:
36rpx
;
color
:
#347bff
;
}
.level-option__badge
{
display
:
flex
;
flex-shrink
:
0
;
align-items
:
center
;
justify-content
:
center
;
width
:
52rpx
;
height
:
52rpx
;
font-size
:
24rpx
;
font-weight
:
600
;
color
:
#fff
;
border-radius
:
50%
;
}
.level-option__content
{
flex
:
1
;
min-width
:
0
;
}
.level-option__name
{
margin-bottom
:
8rpx
;
font-size
:
30rpx
;
font-weight
:
600
;
color
:
#323233
;
}
.level-option__desc
{
font-size
:
26rpx
;
line-height
:
1
.5
;
color
:
#646566
;
}
.level-option__check
{
position
:
absolute
;
top
:
28rpx
;
right
:
0
;
flex-shrink
:
0
;
width
:
36rpx
;
font-size
:
36rpx
;
color
:
#347bff
;
}
.level-picker__footer
{
flex-shrink
:
0
;
padding
:
24rpx
32rpx
0
;
display
:
flex
;
align-items
:
center
;
gap
:
32rpx
;
.btn
{
flex
:
1
;
height
:
80rpx
;
line-height
:
80rpx
;
border-radius
:
12rpx
;
color
:
#FFFFFF
;
text-align
:
center
;
}
.cancel
{
height
:
76rpx
;
line-height
:
76rpx
;
border
:
2rpx
solid
#347BFF
;
color
:
#347BFF
;
}
.confirm
{
background
:
#347BFF
;
}
}
packageUsedCar/pages/indexPage/pursueClue/pursueClue.wxml
0 → 100644
View file @
73d00a4
<!--packageUsedCar/pages/indexPage/pursueClue/pursueClue.wxml-->
<view class="pursue-clue-layout">
<navigation-bar
class="navigation-header"
bindnavbarReady="navbarReady"
showBack="{{ true }}"
bindback="back"
>
<view class="navigation-title">跟进线索</view>
</navigation-bar>
<scroll-view class="scroll-content" scroll-y style="padding-top: {{navBarHeight}}px;">
<!-- 线索信息 -->
<view class="info-card">
<view class="card-title">线索信息</view>
<view class="info-row">
<text class="info-label">线索ID</text>
<text class="info-value">{{clueInfo.cluesNo || '-'}}</text>
</view>
<view class="info-row">
<text class="info-label">车主姓名</text>
<text class="info-value">{{clueInfo.carOwnerName || '-'}}</text>
</view>
<view class="info-row flex-start">
<text class="info-label">品牌车型</text>
<text class="info-value">{{clueInfo.evaluateBrandModel || '-'}}</text>
</view>
<view class="info-row">
<text class="info-label">当前等级</text>
<view class="info-value">
<view class="level-badge level-{{clueInfo.customerIntentLevel}}">{{clueInfo.customerIntentLevel}}</view>
<view class="level-text text-level-{{clueInfo.customerIntentLevel}}">{{clueInfo.customerIntentLevel}}级</view>
</view>
</view>
</view>
<!-- 跟进方式 -->
<view class="form-block">
<view class="entry">
<view>录入时间</view>
<view>{{clueInfo.enterTime}}</view>
</view>
<view class="block-title required">跟进方式</view>
<view class="tag-list">
<view
wx:for="{{followWayList}}"
wx:key="value"
class="tag {{form.followWay === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
data-field="followWay"
bindtap="onTagTap"
>{{item.label}}</view>
</view>
<view class="block-title required">跟进结果</view>
<view class="tag-list">
<view
wx:for="{{followResultList}}"
wx:key="value"
class="tag {{form.followResult === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
data-field="followResult"
bindtap="onResultTap"
>{{item.label}}</view>
</view>
<!-- 邀约验车:置换类型 + 检测方式 -->
<block wx:if="{{form.followResult === 1}}">
<view class="block-title">置换类型</view>
<view class="tag-list">
<view
wx:for="{{replaceTypeList}}"
wx:key="value"
class="tag {{form.replaceType === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
data-field="replaceType"
bindtap="onTagTap"
>{{item.label}}</view>
</view>
<view class="block-title">检测方式</view>
<view class="tag-list">
<view
wx:for="{{checkWayList}}"
wx:key="value"
class="tag {{form.checkWay === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
data-field="checkWay"
bindtap="onTagTap"
>{{item.label}}</view>
</view>
</block>
<!-- 不卖旧车:暂败原因 -->
<block wx:if="{{form.followResult === 3}}">
<view class="block-title required">暂败原因</view>
<view class="tag-list">
<view
wx:for="{{failureReasonList}}"
wx:key="value"
class="tag {{form.failureReason === item.value ? 'active' : ''}}"
data-value="{{item.value}}"
data-field="failureReason"
bindtap="onTagTap"
>{{item.label}}</view>
</view>
</block>
<block wx:if="{{form.followResult != 3 && form.followResult != 6}}">
<!-- 客户意向等级 -->
<view class="level-cell" bindtap="openLevelPicker">
<view class="level-label">
<text>客户意向等级</text>
<text class="required-mark">*</text>
</view>
<view class="level-right">
<view class="level-badge" style="background: {{selectedLevel.color}};">{{form.customerIntentLevel}}</view>
<van-icon name="arrow" />
</view>
</view>
<view wx:if="{{selectedLevel.desc}}" class="level-desc">
<text class="level-desc-label" style="color: {{selectedLevel.color}};">{{selectedLevel.name}}:</text>
<text>{{selectedLevel.desc}}</text>
</view>
<!-- 下次跟进时间 -->
<view class="next-follow">
<van-icon name="clock-o" class="clock-icon" />
<view class="next-follow-content">
<view class="next-follow-title">下一次跟进时间(按等级自动计算)</view>
<view class="next-follow-time">{{form.customerIntentLevel}}级 · {{followDaysText}} · {{nextFollowTime}}</view>
</view>
</view>
</block>
<!-- 跟进内容 -->
<view class="block-title {{form.followResult === 3 && form.failureReason === 5 ? 'required' : ''}}">跟进内容</view>
<textarea
class="remark-textarea"
placeholder="填写跟进内容,最少 10 字,最多 200 字"
maxlength="500"
bindinput="onRemarkInput"
value="{{form.remark}}"
/>
<view class="word-limit {{remarkLength > 0 && remarkLength < 10 ? 'warning' : ''}}">{{remarkLength || 0}}/200</view>
</view>
<view class="safe-bottom"></view>
</scroll-view>
<!-- 底部保存按钮 -->
<view class="footer">
<view class="save-btn {{submitting ? 'disabled' : ''}}" bindtap="onSubmit">保存跟进</view>
</view>
<!-- 意向等级选择弹窗 -->
<van-popup
show="{{showLevelPicker}}"
position="bottom"
round
bind:close="closeLevelPicker"
>
<view class="level-picker">
<view class="level-picker__header">
<text class="level-picker__title">选择意向等级</text>
</view>
<scroll-view class="level-picker__body" scroll-y>
<view
wx:for="{{levelList}}"
wx:key="code"
class="level-option {{tempLevel === item.code ? 'active' : ''}}"
data-code="{{item.code}}"
bindtap="onLevelSelect"
>
<view class="level-option__badge" style="background: {{item.color}};">{{item.code}}</view>
<view class="level-option__content">
<view class="level-option__name" style="color: {{item.color}};">{{item.name}}</view>
<view class="level-option__desc">{{item.desc}}</view>
</view>
<van-icon wx:if="{{tempLevel === item.code}}" name="success" class="level-option__check" />
</view>
</scroll-view>
<view class="level-picker__footer">
<view class="btn cancel" bindtap="closeLevelPicker">取消</view>
<view class="btn confirm" bindtap="confirmLevel">确定</view>
</view>
</view>
</van-popup>
</view>
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