Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
c804ec5e
authored
Feb 18, 2024
by
芋道源码
Committed by
Gitee
Feb 18, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!387 feat: CRM/backlog 提醒数量
Merge pull request !387 from dhb52/crm-msg
parents
f01bb2dc
e067d507
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
104 deletions
+75
-104
src/api/crm/backlog/index.ts
+34
-10
src/views/crm/backlog/index.vue
+37
-26
src/views/crm/backlog/tables/RemindReceivables.vue
+0
-65
src/views/crm/backlog/tables/TodayCustomer.vue
+4
-3
No files found.
src/api/crm/backlog/index.ts
View file @
c804ec5e
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
type
CustomerVO
}
from
'../customer'
// 1. 获得今日需联系客户数量
import
{
type
ClueVO
}
from
'../clue'
export
const
getTodayCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/today-customer-count'
})
}
// 2. 获得分配给我的线索数量
export
const
getFollowLeadsCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/clue/follow-leads-count'
})
}
// 3. 获得分配给我的客户数量
export
const
getFollowCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/follow-customer-count'
})
}
// 查询客户列表
// 4. 获得待进入公海的客户数量
// TODO @芋艿:看看是不是后续融合到 getCustomerPage 里;
export
const
getPutInPoolCustomerRemindCount
=
async
()
=>
{
export
const
getTodayCustomerPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/put-in-pool-remind-count'
})
return
await
request
.
get
({
url
:
`/crm/backlog/today-customer-page`
,
params
})
}
}
//
查询线索列表
//
5. 获得待审核合同数量
export
const
get
FollowLeadsPage
=
async
(
params
)
=>
{
export
const
get
CheckContractCount
=
async
(
)
=>
{
return
await
request
.
get
({
url
:
`/crm/backlog/page`
,
params
})
return
await
request
.
get
({
url
:
'/crm/contract/check-contract-count'
})
}
}
export
{
type
CustomerVO
,
type
ClueVO
}
// 6. 获得待审核回款数量
export
const
getCheckReceivablesCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/receivable/check-receivables-count'
})
}
// 7. 获得待回款提醒数量
export
const
getRemindReceivablePlanCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/receivable-plan/remind-receivable-plan-count'
})
}
// 8. 获得即将到期的合同数量
export
const
getEndContractCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/contract/end-contract-count'
})
}
src/views/crm/backlog/index.vue
View file @
c804ec5e
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
*
as
BacklogApi
from
'@/api/crm/backlog'
import
CheckContract
from
'./tables/CheckContract.vue'
import
CheckContract
from
'./tables/CheckContract.vue'
import
CheckReceivables
from
'./tables/CheckReceivables.vue'
import
CheckReceivables
from
'./tables/CheckReceivables.vue'
import
EndContract
from
'./tables/EndContract.vue'
import
EndContract
from
'./tables/EndContract.vue'
...
@@ -38,54 +39,56 @@ import RemindReceivables from './tables/RemindReceivables.vue'
...
@@ -38,54 +39,56 @@ import RemindReceivables from './tables/RemindReceivables.vue'
import
TodayCustomer
from
'./tables/TodayCustomer.vue'
import
TodayCustomer
from
'./tables/TodayCustomer.vue'
const
leftType
=
ref
(
'todayCustomer'
)
const
leftType
=
ref
(
'todayCustomer'
)
const
todayCustomerCountRef
=
ref
(
0
)
const
followLeadsCountRef
=
ref
(
0
)
const
followCustomerCountRef
=
ref
(
0
)
const
putInPoolCustomerRemindCountRef
=
ref
(
0
)
const
checkContractCountRef
=
ref
(
0
)
const
checkReceivablesCountRef
=
ref
(
0
)
const
remindReceivablesCountRef
=
ref
(
0
)
const
endContractCountRef
=
ref
(
0
)
const
leftSides
=
ref
([
const
leftSides
=
ref
([
{
{
name
:
'今日需联系客户'
,
name
:
'今日需联系客户'
,
infoType
:
'todayCustomer'
,
infoType
:
'todayCustomer'
,
msgCount
:
1
,
msgCount
:
todayCustomerCountRef
tips
:
'下次跟进时间为今日的客户'
},
},
{
{
name
:
'分配给我的线索'
,
name
:
'分配给我的线索'
,
infoType
:
'followLeads'
,
infoType
:
'followLeads'
,
msgCount
:
0
,
msgCount
:
followLeadsCountRef
tips
:
'转移之后未跟进的线索'
},
},
{
{
name
:
'分配给我的客户'
,
name
:
'分配给我的客户'
,
infoType
:
'followCustomer'
,
infoType
:
'followCustomer'
,
msgCount
:
0
,
msgCount
:
followCustomerCountRef
tips
:
'转移、领取、分配之后未跟进的客户,默认显示自己负责的客户'
},
},
{
{
name
:
'待进入公海的客户'
,
name
:
'待进入公海的客户'
,
infoType
:
'putInPoolRemind'
,
infoType
:
'putInPoolRemind'
,
msgCount
:
0
,
msgCount
:
putInPoolCustomerRemindCountRef
tips
:
''
},
},
{
{
name
:
'待审核合同'
,
name
:
'待审核合同'
,
infoType
:
'checkContract'
,
infoType
:
'checkContract'
,
msgCount
:
0
,
msgCount
:
checkContractCountRef
tips
:
''
},
},
{
{
name
:
'待审核回款'
,
name
:
'待审核回款'
,
infoType
:
'checkReceivables'
,
infoType
:
'checkReceivables'
,
msgCount
:
0
,
msgCount
:
checkReceivablesCountRef
tips
:
''
},
},
{
{
name
:
'待回款提醒'
,
name
:
'待回款提醒'
,
infoType
:
'remindReceivables'
,
infoType
:
'remindReceivables'
,
msgCount
:
4
,
msgCount
:
remindReceivablesCountRef
tips
:
''
},
},
{
{
name
:
'即将到期的合同'
,
name
:
'即将到期的合同'
,
infoType
:
'endContract'
,
infoType
:
'endContract'
,
msgCount
:
20
,
msgCount
:
endContractCountRef
tips
:
'根据“合同到期时间”及设置的“提前提醒天数”提醒'
}
}
])
])
...
@@ -93,8 +96,20 @@ const leftSides = ref([
...
@@ -93,8 +96,20 @@ const leftSides = ref([
const
sideClick
=
(
item
:
any
)
=>
{
const
sideClick
=
(
item
:
any
)
=>
{
leftType
.
value
=
item
.
infoType
leftType
.
value
=
item
.
infoType
}
}
// TODO @dhb52: 侧边栏样式,在黑暗模式下,颜色会不对。是不是可以读取主题色哈;
/** 加载时读取待办数量 */
onMounted
(
async
()
=>
{
BacklogApi
.
getTodayCustomerCount
().
then
(
count
=>
todayCustomerCountRef
.
value
=
count
)
BacklogApi
.
getFollowLeadsCount
().
then
(
count
=>
followLeadsCountRef
.
value
=
count
)
BacklogApi
.
getFollowCustomerCount
().
then
(
count
=>
followCustomerCountRef
.
value
=
count
)
BacklogApi
.
getPutInPoolCustomerRemindCount
().
then
(
count
=>
putInPoolCustomerRemindCountRef
.
value
=
count
)
BacklogApi
.
getCheckContractCount
().
then
(
count
=>
checkContractCountRef
.
value
=
count
)
BacklogApi
.
getCheckReceivablesCount
().
then
(
count
=>
checkReceivablesCountRef
.
value
=
count
)
BacklogApi
.
getRemindReceivablePlanCount
().
then
(
count
=>
remindReceivablesCountRef
.
value
=
count
)
BacklogApi
.
getEndContractCount
().
then
(
count
=>
endContractCountRef
.
value
=
count
)
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.side-item-list
{
.side-item-list
{
top
:
0
;
top
:
0
;
...
@@ -102,8 +117,8 @@ const sideClick = (item: any) => {
...
@@ -102,8 +117,8 @@ const sideClick = (item: any) => {
left
:
0
;
left
:
0
;
z-index
:
1
;
z-index
:
1
;
font-size
:
14px
;
font-size
:
14px
;
background-color
:
white
;
background-color
:
var
(
--el-bg-color
)
;
border
:
1px
solid
#e6e6e6
;
border
:
1px
solid
var
(
--el-border-color
)
;
border-radius
:
5px
;
border-radius
:
5px
;
.side-item
{
.side-item
{
...
@@ -112,21 +127,17 @@ const sideClick = (item: any) => {
...
@@ -112,21 +127,17 @@ const sideClick = (item: any) => {
padding
:
0
20px
;
padding
:
0
20px
;
line-height
:
50px
;
line-height
:
50px
;
cursor
:
pointer
;
cursor
:
pointer
;
i
{
color
:
#999
;
}
}
}
}
}
.side-item-default
{
.side-item-default
{
color
:
#333
;
color
:
var
(
--el-text-color-primary
)
;
border-right
:
2px
solid
transparent
;
border-right
:
2px
solid
transparent
;
}
}
.side-item-select
{
.side-item-select
{
color
:
#409eff
;
color
:
var
(
--el-color-primary
)
;
background-color
:
#ecf5ff
;
background-color
:
var
(
--el-color-primary-light-9
)
;
border-right
:
2px
solid
var
(
--el-color-primary
);
border-right
:
2px
solid
var
(
--el-color-primary
);
}
}
...
...
src/views/crm/backlog/tables/RemindReceivables.vue
View file @
c804ec5e
...
@@ -68,26 +68,6 @@
...
@@ -68,26 +68,6 @@
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"130px"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
@
click=
"openForm('update', scope.row.id)"
v-hasPermi=
"['crm:receivable-plan:update']"
>
编辑
</el-button>
<el-button
link
type=
"danger"
@
click=
"handleDelete(scope.row.id)"
v-hasPermi=
"['crm:receivable-plan:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
...
@@ -102,16 +82,12 @@
...
@@ -102,16 +82,12 @@
<
script
setup
lang=
"ts"
name=
"RemindReceivables"
>
<
script
setup
lang=
"ts"
name=
"RemindReceivables"
>
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
,
dateFormatter2
}
from
'@/utils/formatTime'
import
{
dateFormatter
,
dateFormatter2
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
*
as
ReceivablePlanApi
from
'@/api/crm/receivable/plan'
import
*
as
ReceivablePlanApi
from
'@/api/crm/receivable/plan'
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
UserApi
from
'@/api/system/user'
import
{
RECEIVABLE_REMIND_TYPE
}
from
'./common'
import
{
RECEIVABLE_REMIND_TYPE
}
from
'./common'
defineOptions
({
name
:
'ReceivablePlan'
})
defineOptions
({
name
:
'ReceivablePlan'
})
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
const
list
=
ref
([])
// 列表的数据
const
list
=
ref
([])
// 列表的数据
...
@@ -122,7 +98,6 @@ const queryParams = reactive({
...
@@ -122,7 +98,6 @@ const queryParams = reactive({
remindType
:
1
remindType
:
1
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
/** 查询列表 */
/** 查询列表 */
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
...
@@ -142,46 +117,6 @@ const handleQuery = () => {
...
@@ -142,46 +117,6 @@ const handleQuery = () => {
getList
()
getList
()
}
}
/** 重置按钮操作 */
const
resetQuery
=
()
=>
{
queryFormRef
.
value
.
resetFields
()
handleQuery
()
}
/** 添加/修改操作 */
const
formRef
=
ref
()
const
openForm
=
(
type
:
string
,
id
?:
number
)
=>
{
formRef
.
value
.
open
(
type
,
id
)
}
/** 删除按钮操作 */
const
handleDelete
=
async
(
id
:
number
)
=>
{
try
{
// 删除的二次确认
await
message
.
delConfirm
()
// 发起删除
await
ReceivablePlanApi
.
deleteReceivablePlan
(
id
)
message
.
success
(
t
(
'common.delSuccess'
))
// 刷新列表
await
getList
()
}
catch
{}
}
/** 导出按钮操作 */
const
handleExport
=
async
()
=>
{
try
{
// 导出的二次确认
await
message
.
exportConfirm
()
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
ReceivablePlanApi
.
exportReceivablePlan
(
queryParams
)
download
.
excel
(
data
,
'回款计划.xls'
)
}
catch
{
}
finally
{
exportLoading
.
value
=
false
}
}
/** 初始化 **/
/** 初始化 **/
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
await
getList
()
await
getList
()
...
...
src/views/crm/backlog/tables/TodayCustomer.vue
View file @
c804ec5e
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
</template>
</template>
<
script
lang=
"ts"
setup
name=
"TodayCustomer"
>
<
script
lang=
"ts"
setup
name=
"TodayCustomer"
>
import
*
as
BacklogApi
from
'@/api/crm/backlog
'
import
*
as
CustomerApi
from
'@/api/crm/customer
'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
CONTACT_STATUS
,
SCENE_TYPES
}
from
'./common'
import
{
CONTACT_STATUS
,
SCENE_TYPES
}
from
'./common'
...
@@ -135,7 +135,8 @@ const queryParams = ref({
...
@@ -135,7 +135,8 @@ const queryParams = ref({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
contactStatus
:
1
,
contactStatus
:
1
,
sceneType
:
1
sceneType
:
1
,
pool
:
null
// 是否公海数据
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
...
@@ -143,7 +144,7 @@ const queryFormRef = ref() // 搜索的表单
...
@@ -143,7 +144,7 @@ const queryFormRef = ref() // 搜索的表单
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
BacklogApi
.
getToday
CustomerPage
(
queryParams
.
value
)
const
data
=
await
CustomerApi
.
get
CustomerPage
(
queryParams
.
value
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment