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
Commit
a401fff7
authored
Feb 20, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
CRM:完成客户的分配接入
parent
4362251b
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
224 additions
and
95 deletions
+224
-95
src/api/crm/backlog/index.ts
+0
-10
src/api/crm/customer/index.ts
+30
-7
src/views/crm/backlog/components/CustomerFollowList.vue
+24
-16
src/views/crm/backlog/components/CustomerPutPoolRemindList.vue
+9
-3
src/views/crm/backlog/components/CustomerTodayContactList.vue
+22
-14
src/views/crm/backlog/index.vue
+36
-36
src/views/crm/contact/ContactForm.vue
+1
-1
src/views/crm/contact/index.vue
+1
-1
src/views/crm/contract/ContractForm.vue
+1
-1
src/views/crm/contract/oa/ContractDetail/index.vue
+1
-1
src/views/crm/customer/detail/index.vue
+13
-4
src/views/crm/customer/pool/CustomerDistributeForm.vue
+85
-0
src/views/crm/customer/pool/index.vue
+1
-1
No files found.
src/api/crm/backlog/index.ts
View file @
a401fff7
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
// TODO 芋艿:融合下
// TODO 芋艿:融合下
// 1. 获得今日需联系客户数量
export
const
getTodayCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/today-customer-count'
})
}
// 3. 获得分配给我的客户数量
// 3. 获得分配给我的客户数量
export
const
getFollowCustomerCount
=
async
()
=>
{
export
const
getFollowCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/follow-customer-count'
})
return
await
request
.
get
({
url
:
'/crm/customer/follow-customer-count'
})
}
}
// 4. 获得待进入公海的客户数量
export
const
getPutInPoolCustomerRemindCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/put-in-pool-remind-count'
})
}
// 5. 获得待审核合同数量
// 5. 获得待审核合同数量
export
const
getCheckContractCount
=
async
()
=>
{
export
const
getCheckContractCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
'/crm/contract/check-contract-count'
})
return
await
request
.
get
({
url
:
'/crm/contract/check-contract-count'
})
...
...
src/api/crm/customer/index.ts
View file @
a401fff7
...
@@ -35,6 +35,26 @@ export const getCustomerPage = async (params) => {
...
@@ -35,6 +35,26 @@ export const getCustomerPage = async (params) => {
return
await
request
.
get
({
url
:
`/crm/customer/page`
,
params
})
return
await
request
.
get
({
url
:
`/crm/customer/page`
,
params
})
}
}
// 进入公海客户提醒的客户列表
export
const
getPutPoolRemindCustomerPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/put-pool-remind-page`
,
params
})
}
// 获得待进入公海客户数量
export
const
getPutPoolRemindCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/put-pool-remind-count`
})
}
// 获得今日需联系客户数量
export
const
getTodayContactCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/today-contact-count`
})
}
// 获得分配给我、待跟进的线索数量的客户数量
export
const
getFollowCustomerCount
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/follow-count`
})
}
// 查询客户详情
// 查询客户详情
export
const
getCustomer
=
async
(
id
:
number
)
=>
{
export
const
getCustomer
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/get?id=`
+
id
})
return
await
request
.
get
({
url
:
`/crm/customer/get?id=`
+
id
})
...
@@ -71,8 +91,8 @@ export const importCustomerTemplate = () => {
...
@@ -71,8 +91,8 @@ export const importCustomerTemplate = () => {
}
}
// 客户列表
// 客户列表
export
const
get
SimpleCustomer
List
=
async
()
=>
{
export
const
get
CustomerSimple
List
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/
list-all-simple
`
})
return
await
request
.
get
({
url
:
`/crm/customer/
simple-list
`
})
}
}
// ======================= 业务操作 =======================
// ======================= 业务操作 =======================
...
@@ -98,12 +118,15 @@ export const receiveCustomer = async (ids: any[]) => {
...
@@ -98,12 +118,15 @@ export const receiveCustomer = async (ids: any[]) => {
return
await
request
.
put
({
url
:
'/crm/customer/receive'
,
params
:
{
ids
:
ids
.
join
(
','
)
}
})
return
await
request
.
put
({
url
:
'/crm/customer/receive'
,
params
:
{
ids
:
ids
.
join
(
','
)
}
})
}
}
// 分配公海给对应负责人
export
const
distributeCustomer
=
async
(
ids
:
any
[],
ownerUserId
:
number
)
=>
{
return
await
request
.
put
({
url
:
'/crm/customer/distribute'
,
data
:
{
ids
:
ids
,
ownerUserId
}
})
}
// 客户放入公海
// 客户放入公海
export
const
putCustomerPool
=
async
(
id
:
number
)
=>
{
export
const
putCustomerPool
=
async
(
id
:
number
)
=>
{
return
await
request
.
put
({
url
:
`/crm/customer/put-pool?id=
${
id
}
`
})
return
await
request
.
put
({
url
:
`/crm/customer/put-pool?id=
${
id
}
`
})
}
}
// 进入公海客户提醒
export
const
getPutInPoolRemindCustomerPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/put-in-pool-remind-page`
,
params
})
}
src/views/crm/backlog/
tables/FollowCustomer
.vue
→
src/views/crm/backlog/
components/CustomerFollowList
.vue
View file @
a401fff7
...
@@ -31,32 +31,31 @@
...
@@ -31,32 +31,31 @@
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
<el-table-column
align=
"center"
label=
"编号"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"客户名称"
fixed=
"left"
prop=
"name"
width=
"160"
>
<el-table-column
align=
"center"
label=
"客户名称"
prop=
"name"
width=
"160"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-link
:underline=
"false"
type=
"primary"
@
click=
"openDetail(scope.row.id)"
>
<el-link
:underline=
"false"
type=
"primary"
@
click=
"openDetail(scope.row.id)"
>
{{
scope
.
row
.
name
}}
{{
scope
.
row
.
name
}}
</el-link>
</el-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"手机"
prop=
"mobile"
width=
"120"
/>
<el-table-column
align=
"center"
label=
"电话"
prop=
"telephone"
width=
"120"
/>
<el-table-column
align=
"center"
label=
"客户来源"
prop=
"source"
width=
"100"
>
<el-table-column
align=
"center"
label=
"客户来源"
prop=
"source"
width=
"100"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_SOURCE"
:value=
"scope.row.source"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_SOURCE"
:value=
"scope.row.source"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"所属行业"
prop=
"industryId"
width=
"120"
>
<el-table-column
label=
"手机"
align=
"center"
prop=
"mobile"
width=
"120"
/>
<el-table-column
label=
"电话"
align=
"center"
prop=
"telephone"
width=
"130"
/>
<el-table-column
label=
"邮箱"
align=
"center"
prop=
"email"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"客户级别"
prop=
"level"
width=
"135"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
INDUSTRY"
:value=
"scope.row.industryId
"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
LEVEL"
:value=
"scope.row.level
"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"客户
级别"
prop=
"level"
width=
"12
0"
>
<el-table-column
align=
"center"
label=
"客户
行业"
prop=
"industryId"
width=
"10
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
LEVEL"
:value=
"scope.row.level
"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
INDUSTRY"
:value=
"scope.row.industryId
"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"网址"
prop=
"website"
width=
"200"
/>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
...
@@ -65,14 +64,16 @@
...
@@ -65,14 +64,16 @@
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
align=
"center"
label=
"备注"
prop=
"remark"
width=
"200"
/>
<el-table-column
align=
"center"
label=
"备注"
prop=
"remark"
width=
"200"
/>
<el-table-column
align=
"center"
label=
"锁定状态"
prop=
"lockStatus"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.lockStatus"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"成交状态"
prop=
"dealStatus"
>
<el-table-column
align=
"center"
label=
"成交状态"
prop=
"dealStatus"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.dealStatus"
/>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.dealStatus"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"距离进入公海"
prop=
"poolDay"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
poolDay
}}
天
</
template
>
</el-table-column>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
...
@@ -80,10 +81,17 @@
...
@@ -80,10 +81,17 @@
prop=
"contactLastTime"
prop=
"contactLastTime"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
align=
"center"
label=
"最后跟进记录"
prop=
"contactLastContent"
width=
"200"
/>
<el-table-column
label=
"地址"
align=
"center"
prop=
"detailAddress"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"距离进入公海天数"
prop=
"poolDay"
width=
"140"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
poolDay
}}
天
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"负责人"
prop=
"ownerUserName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"所属部门"
prop=
"ownerUserDeptName"
width=
"100px"
/>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
label=
"
创建
时间"
label=
"
更新
时间"
prop=
"updateTime"
prop=
"updateTime"
width=
"180px"
width=
"180px"
/>
/>
...
@@ -94,8 +102,6 @@
...
@@ -94,8 +102,6 @@
prop=
"createTime"
prop=
"createTime"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
align=
"center"
label=
"负责人"
prop=
"ownerUserName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"所属部门"
prop=
"ownerUserDeptName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"创建人"
prop=
"creatorName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"创建人"
prop=
"creatorName"
width=
"100px"
/>
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
...
@@ -108,12 +114,14 @@
...
@@ -108,12 +114,14 @@
</ContentWrap>
</ContentWrap>
</template>
</template>
<
script
setup
lang=
"ts"
name=
"FollowCustomer"
>
<
script
setup
lang=
"ts"
>
import
*
as
CustomerApi
from
'@/api/crm/customer'
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
{
FOLLOWUP_STATUS
}
from
'./common'
import
{
FOLLOWUP_STATUS
}
from
'./common'
defineOptions
({
name
:
'CrmCustomerFollowList'
})
const
{
push
}
=
useRouter
()
const
{
push
}
=
useRouter
()
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
...
...
src/views/crm/backlog/
tables/PutInPoolRemind
.vue
→
src/views/crm/backlog/
components/CustomerPutPoolRemindList
.vue
View file @
a401fff7
...
@@ -104,13 +104,13 @@
...
@@ -104,13 +104,13 @@
</ContentWrap>
</ContentWrap>
</template>
</template>
<
script
lang=
"ts"
setup
name=
"PutInPoolRemind"
>
<
script
lang=
"ts"
setup
>
import
*
as
CustomerApi
from
'@/api/crm/customer'
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
{
SCENE_TYPES
}
from
'./common'
import
{
SCENE_TYPES
}
from
'./common'
const
{
push
}
=
useRouter
(
)
defineOptions
({
name
:
'CrmCustomerPutPoolRemindList'
}
)
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
...
@@ -127,7 +127,7 @@ const queryFormRef = ref() // 搜索的表单
...
@@ -127,7 +127,7 @@ const queryFormRef = ref() // 搜索的表单
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
CustomerApi
.
getPut
In
PoolRemindCustomerPage
(
queryParams
.
value
)
const
data
=
await
CustomerApi
.
getPutPoolRemindCustomerPage
(
queryParams
.
value
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
@@ -142,10 +142,16 @@ const handleQuery = () => {
...
@@ -142,10 +142,16 @@ const handleQuery = () => {
}
}
/** 打开客户详情 */
/** 打开客户详情 */
const
{
push
}
=
useRouter
()
const
openDetail
=
(
id
:
number
)
=>
{
const
openDetail
=
(
id
:
number
)
=>
{
push
({
name
:
'CrmCustomerDetail'
,
params
:
{
id
}
})
push
({
name
:
'CrmCustomerDetail'
,
params
:
{
id
}
})
}
}
/** 激活时 */
onActivated
(
async
()
=>
{
await
getList
()
})
/** 初始化 **/
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
...
...
src/views/crm/backlog/
tables/TodayCustomer
.vue
→
src/views/crm/backlog/
components/CustomerTodayContactList
.vue
View file @
a401fff7
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
</ContentWrap>
</ContentWrap>
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
<el-table-column
align=
"center"
label=
"编号"
fixed=
"left"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"客户名称"
fixed=
"left"
prop=
"name"
width=
"160"
>
<el-table-column
align=
"center"
label=
"客户名称"
fixed=
"left"
prop=
"name"
width=
"160"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-link
:underline=
"false"
type=
"primary"
@
click=
"openDetail(scope.row.id)"
>
<el-link
:underline=
"false"
type=
"primary"
@
click=
"openDetail(scope.row.id)"
>
...
@@ -51,24 +50,24 @@
...
@@ -51,24 +50,24 @@
</el-link>
</el-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"手机"
prop=
"mobile"
width=
"120"
/>
<el-table-column
align=
"center"
label=
"电话"
prop=
"telephone"
width=
"120"
/>
<el-table-column
align=
"center"
label=
"客户来源"
prop=
"source"
width=
"100"
>
<el-table-column
align=
"center"
label=
"客户来源"
prop=
"source"
width=
"100"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_SOURCE"
:value=
"scope.row.source"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_SOURCE"
:value=
"scope.row.source"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"所属行业"
prop=
"industryId"
width=
"120"
>
<el-table-column
label=
"手机"
align=
"center"
prop=
"mobile"
width=
"120"
/>
<el-table-column
label=
"电话"
align=
"center"
prop=
"telephone"
width=
"130"
/>
<el-table-column
label=
"邮箱"
align=
"center"
prop=
"email"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"客户级别"
prop=
"level"
width=
"135"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
INDUSTRY"
:value=
"scope.row.industryId
"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
LEVEL"
:value=
"scope.row.level
"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"客户
级别"
prop=
"level"
width=
"12
0"
>
<el-table-column
align=
"center"
label=
"客户
行业"
prop=
"industryId"
width=
"10
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
LEVEL"
:value=
"scope.row.level
"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_CUSTOMER_
INDUSTRY"
:value=
"scope.row.industryId
"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"网址"
prop=
"website"
width=
"200"
/>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
...
@@ -77,12 +76,16 @@
...
@@ -77,12 +76,16 @@
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
align=
"center"
label=
"备注"
prop=
"remark"
width=
"200"
/>
<el-table-column
align=
"center"
label=
"备注"
prop=
"remark"
width=
"200"
/>
<el-table-column
align=
"center"
label=
"锁定状态"
prop=
"lockStatus"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.lockStatus"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"成交状态"
prop=
"dealStatus"
>
<el-table-column
align=
"center"
label=
"成交状态"
prop=
"dealStatus"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.dealStatus"
/>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.dealStatus"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"距进入公海天数"
prop=
"poolDay"
width=
"130"
/>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
...
@@ -90,10 +93,17 @@
...
@@ -90,10 +93,17 @@
prop=
"contactLastTime"
prop=
"contactLastTime"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
align=
"center"
label=
"最后跟进记录"
prop=
"contactLastContent"
width=
"200"
/>
<el-table-column
label=
"地址"
align=
"center"
prop=
"detailAddress"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"距离进入公海天数"
prop=
"poolDay"
width=
"140"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
poolDay
}}
天
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"负责人"
prop=
"ownerUserName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"所属部门"
prop=
"ownerUserDeptName"
width=
"100px"
/>
<el-table-column
<el-table-column
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
align=
"center"
align=
"center"
label=
"
创建
时间"
label=
"
更新
时间"
prop=
"updateTime"
prop=
"updateTime"
width=
"180px"
width=
"180px"
/>
/>
...
@@ -104,8 +114,6 @@
...
@@ -104,8 +114,6 @@
prop=
"createTime"
prop=
"createTime"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
align=
"center"
label=
"负责人"
prop=
"ownerUserName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"所属部门"
prop=
"ownerUserDeptName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"创建人"
prop=
"creatorName"
width=
"100px"
/>
<el-table-column
align=
"center"
label=
"创建人"
prop=
"creatorName"
width=
"100px"
/>
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
...
@@ -118,13 +126,13 @@
...
@@ -118,13 +126,13 @@
</ContentWrap>
</ContentWrap>
</template>
</template>
<
script
lang=
"ts"
setup
name=
"TodayCustomer"
>
<
script
lang=
"ts"
setup
>
import
*
as
CustomerApi
from
'@/api/crm/customer'
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'
// defineOptions({ name: 'TodayCustomer' }) TODO @dhb52:1)定义改成这种;2)命名要不要改成 CustomerTodayTable,就是 模块+形容词+表格(更容易识别),然后把 tables 目录改成 components 目录
defineOptions
({
name
:
'CrmCustomerTodayContactList'
})
const
{
push
}
=
useRouter
()
const
{
push
}
=
useRouter
()
...
...
src/views/crm/backlog/index.vue
View file @
a401fff7
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"20"
:xs=
"24"
>
<el-col
:span=
"20"
:xs=
"24"
>
<
TodayCustomer
v-if=
"leftMenu === 'todayCustomer
'"
/>
<
CustomerTodayContactList
v-if=
"leftMenu === 'customerTodayContact
'"
/>
<ClueFollowList
v-if=
"leftMenu === 'clueFollow'"
/>
<ClueFollowList
v-if=
"leftMenu === 'clueFollow'"
/>
<CheckContract
v-if=
"leftMenu === 'checkContract'"
/>
<CheckContract
v-if=
"leftMenu === 'checkContract'"
/>
<CheckReceivables
v-if=
"leftMenu === 'checkReceivables'"
/>
<CheckReceivables
v-if=
"leftMenu === 'checkReceivables'"
/>
<EndContract
v-if=
"leftMenu === 'endContract'"
/>
<EndContract
v-if=
"leftMenu === 'endContract'"
/>
<
FollowCustomer
v-if=
"leftMenu === 'followCustomer
'"
/>
<
CustomerFollowList
v-if=
"leftMenu === 'customerFollow
'"
/>
<
PutInPoolRemind
v-if=
"leftMenu === 'putIn
PoolRemind'"
/>
<
CustomerPutPoolRemindList
v-if=
"leftMenu === 'customerPut
PoolRemind'"
/>
<RemindReceivables
v-if=
"leftMenu === 'remindReceivables'"
/>
<RemindReceivables
v-if=
"leftMenu === 'remindReceivables'"
/>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -29,34 +29,35 @@
...
@@ -29,34 +29,35 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
*
as
BacklogApi
from
'@/api/crm/backlog'
import
*
as
BacklogApi
from
'@/api/crm/backlog'
import
CustomerFollowList
from
'./components/CustomerFollowList.vue'
import
CustomerTodayContactList
from
'./components/CustomerTodayContactList.vue'
import
CustomerPutPoolRemindList
from
'./components/CustomerPutPoolRemindList.vue'
import
ClueFollowList
from
'./components/ClueFollowList.vue'
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'
import
FollowCustomer
from
'./tables/FollowCustomer.vue'
import
ClueFollowList
from
'./components/ClueFollowList.vue'
import
PutInPoolRemind
from
'./tables/PutInPoolRemind.vue'
import
RemindReceivables
from
'./tables/RemindReceivables.vue'
import
RemindReceivables
from
'./tables/RemindReceivables.vue'
import
TodayCustomer
from
'./tables/TodayCustomer.vue
'
import
*
as
CustomerApi
from
'@/api/crm/customer
'
import
*
as
ClueApi
from
'@/api/crm/clue'
import
*
as
ClueApi
from
'@/api/crm/clue'
defineOptions
({
name
:
'CrmBacklog'
})
defineOptions
({
name
:
'CrmBacklog'
})
const
leftMenu
=
ref
(
'
todayCustomer
'
)
const
leftMenu
=
ref
(
'
customerTodayContact
'
)
const
todayCustomerCountRef
=
ref
(
0
)
const
customerTodayContactCount
=
ref
(
0
)
const
clueFollowCount
=
ref
(
0
)
const
clueFollowCount
=
ref
(
0
)
const
followCustomerCountRef
=
ref
(
0
)
const
customerFollowCount
=
ref
(
0
)
const
putInPoolCustomerRemindCountRef
=
ref
(
0
)
const
customerPutPoolRemindCount
=
ref
(
0
)
const
checkContractCount
Ref
=
ref
(
0
)
const
checkContractCount
=
ref
(
0
)
const
checkReceivablesCount
Ref
=
ref
(
0
)
const
checkReceivablesCount
=
ref
(
0
)
const
remindReceivablesCount
Ref
=
ref
(
0
)
const
remindReceivablesCount
=
ref
(
0
)
const
endContractCount
Ref
=
ref
(
0
)
const
endContractCount
=
ref
(
0
)
const
leftSides
=
ref
([
const
leftSides
=
ref
([
{
{
name
:
'今日需联系客户'
,
name
:
'今日需联系客户'
,
menu
:
'
todayCustomer
'
,
menu
:
'
customerTodayContact
'
,
count
:
todayCustomerCountRef
count
:
customerTodayContactCount
},
},
{
{
name
:
'分配给我的线索'
,
name
:
'分配给我的线索'
,
...
@@ -65,33 +66,33 @@ const leftSides = ref([
...
@@ -65,33 +66,33 @@ const leftSides = ref([
},
},
{
{
name
:
'分配给我的客户'
,
name
:
'分配给我的客户'
,
menu
:
'
followCustomer
'
,
menu
:
'
customerFollow
'
,
count
:
followCustomerCountRef
count
:
customerFollowCount
},
},
{
{
name
:
'待进入公海的客户'
,
name
:
'待进入公海的客户'
,
menu
:
'
putIn
PoolRemind'
,
menu
:
'
customerPut
PoolRemind'
,
count
:
putInPoolCustomerRemindCountRef
count
:
customerPutPoolRemindCount
},
},
{
{
name
:
'待审核合同'
,
name
:
'待审核合同'
,
menu
:
'checkContract'
,
menu
:
'checkContract'
,
count
:
checkContractCount
Ref
count
:
checkContractCount
},
},
{
{
name
:
'待审核回款'
,
name
:
'待审核回款'
,
menu
:
'checkReceivables'
,
menu
:
'checkReceivables'
,
count
:
checkReceivablesCount
Ref
count
:
checkReceivablesCount
},
},
{
{
name
:
'待回款提醒'
,
name
:
'待回款提醒'
,
menu
:
'remindReceivables'
,
menu
:
'remindReceivables'
,
count
:
remindReceivablesCount
Ref
count
:
remindReceivablesCount
},
},
{
{
name
:
'即将到期的合同'
,
name
:
'即将到期的合同'
,
menu
:
'endContract'
,
menu
:
'endContract'
,
count
:
endContractCount
Ref
count
:
endContractCount
}
}
])
])
...
@@ -101,19 +102,18 @@ const sideClick = (item: any) => {
...
@@ -101,19 +102,18 @@ const sideClick = (item: any) => {
}
}
const
getCount
=
()
=>
{
const
getCount
=
()
=>
{
BacklogApi
.
getTodayCustomerCount
().
then
((
count
)
=>
(
todayCustomerCountRef
.
value
=
count
))
CustomerApi
.
getTodayContactCustomerCount
().
then
(
ClueApi
.
getFollowClueCount
().
then
((
count
)
=>
(
clueFollowCount
.
value
=
count
))
(
count
)
=>
(
customerTodayContactCount
.
value
=
count
)
BacklogApi
.
getClueFollowListCount
().
then
((
count
)
=>
(
clueFollowCount
.
value
=
count
))
BacklogApi
.
getFollowCustomerCount
().
then
((
count
)
=>
(
followCustomerCountRef
.
value
=
count
))
BacklogApi
.
getPutInPoolCustomerRemindCount
().
then
(
(
count
)
=>
(
putInPoolCustomerRemindCountRef
.
value
=
count
)
)
)
BacklogApi
.
getCheckContractCount
().
then
((
count
)
=>
(
checkContractCountRef
.
value
=
count
))
CustomerApi
.
getPutPoolRemindCustomerCount
().
then
(
BacklogApi
.
getCheckReceivablesCount
().
then
((
count
)
=>
(
checkReceivablesCountRef
.
value
=
count
))
(
count
)
=>
(
customerPutPoolRemindCount
.
value
=
count
)
BacklogApi
.
getRemindReceivablePlanCount
().
then
(
(
count
)
=>
(
remindReceivablesCountRef
.
value
=
count
)
)
)
BacklogApi
.
getEndContractCount
().
then
((
count
)
=>
(
endContractCountRef
.
value
=
count
))
CustomerApi
.
getFollowCustomerCount
().
then
((
count
)
=>
(
customerFollowCount
.
value
=
count
))
ClueApi
.
getFollowClueCount
().
then
((
count
)
=>
(
clueFollowCount
.
value
=
count
))
BacklogApi
.
getCheckContractCount
().
then
((
count
)
=>
(
checkContractCount
.
value
=
count
))
BacklogApi
.
getCheckReceivablesCount
().
then
((
count
)
=>
(
checkReceivablesCount
.
value
=
count
))
BacklogApi
.
getRemindReceivablePlanCount
().
then
((
count
)
=>
(
remindReceivablesCount
.
value
=
count
))
BacklogApi
.
getEndContractCount
().
then
((
count
)
=>
(
endContractCount
.
value
=
count
))
}
}
/** 激活时 */
/** 激活时 */
...
...
src/views/crm/contact/ContactForm.vue
View file @
a401fff7
...
@@ -242,7 +242,7 @@ const open = async (type: string, id?: number) => {
...
@@ -242,7 +242,7 @@ const open = async (type: string, id?: number) => {
resetForm
()
resetForm
()
allContactList
.
value
=
await
ContactApi
.
getSimpleContactList
()
allContactList
.
value
=
await
ContactApi
.
getSimpleContactList
()
userList
.
value
=
await
UserApi
.
getSimpleUserList
()
userList
.
value
=
await
UserApi
.
getSimpleUserList
()
customerList
.
value
=
await
CustomerApi
.
get
SimpleCustomer
List
()
customerList
.
value
=
await
CustomerApi
.
get
CustomerSimple
List
()
areaList
.
value
=
await
AreaApi
.
getAreaTree
()
areaList
.
value
=
await
AreaApi
.
getAreaTree
()
// 修改时,设置数据
// 修改时,设置数据
if
(
id
)
{
if
(
id
)
{
...
...
src/views/crm/contact/index.vue
View file @
a401fff7
...
@@ -312,6 +312,6 @@ const openCustomerDetail = (id: number) => {
...
@@ -312,6 +312,6 @@ const openCustomerDetail = (id: number) => {
/** 初始化 **/
/** 初始化 **/
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
await
getList
()
await
getList
()
customerList
.
value
=
await
CustomerApi
.
get
SimpleCustomer
List
()
customerList
.
value
=
await
CustomerApi
.
get
CustomerSimple
List
()
})
})
</
script
>
</
script
>
src/views/crm/contract/ContractForm.vue
View file @
a401fff7
...
@@ -257,7 +257,7 @@ const getAllApi = async () => {
...
@@ -257,7 +257,7 @@ const getAllApi = async () => {
/** 获取客户 */
/** 获取客户 */
const
customerList
=
ref
<
CustomerApi
.
CustomerVO
[]
>
([])
const
customerList
=
ref
<
CustomerApi
.
CustomerVO
[]
>
([])
const
getCustomerList
=
async
()
=>
{
const
getCustomerList
=
async
()
=>
{
customerList
.
value
=
await
CustomerApi
.
get
SimpleCustomer
List
()
customerList
.
value
=
await
CustomerApi
.
get
CustomerSimple
List
()
}
}
/** 动态获取客户联系人 */
/** 动态获取客户联系人 */
...
...
src/views/crm/contract/oa/ContractDetail/index.vue
View file @
a401fff7
...
@@ -194,7 +194,7 @@ const getAllApi = async () => {
...
@@ -194,7 +194,7 @@ const getAllApi = async () => {
const
customerList
=
ref
<
CustomerApi
.
CustomerVO
[]
>
([])
const
customerList
=
ref
<
CustomerApi
.
CustomerVO
[]
>
([])
/** 获取客户 */
/** 获取客户 */
const
getCustomerList
=
async
()
=>
{
const
getCustomerList
=
async
()
=>
{
customerList
.
value
=
await
CustomerApi
.
get
SimpleCustomer
List
()
customerList
.
value
=
await
CustomerApi
.
get
CustomerSimple
List
()
}
}
const
contactList
=
ref
<
ContactApi
.
ContactVO
[]
>
([])
const
contactList
=
ref
<
ContactApi
.
ContactVO
[]
>
([])
/** 动态获取客户联系人 */
/** 动态获取客户联系人 */
...
...
src/views/crm/customer/detail/index.vue
View file @
a401fff7
...
@@ -26,14 +26,15 @@
...
@@ -26,14 +26,15 @@
>
>
锁定
锁定
</el-button>
</el-button>
<el-button
v-if=
"!customer.ownerUserId"
type=
"primary"
@
click=
"handleReceive"
>
<el-button
v-if=
"!customer.ownerUserId"
type=
"primary"
@
click=
"handleReceive"
>
领取
</el-button>
领取客户
<el-button
v-if=
"!customer.ownerUserId"
type=
"primary"
@
click=
"handleDistributeForm"
>
分配
</el-button>
</el-button>
<el-button
<el-button
v-if=
"customer.ownerUserId && permissionListRef?.validateOwnerUser"
v-if=
"customer.ownerUserId && permissionListRef?.validateOwnerUser"
@
click=
"handlePutPool"
@
click=
"handlePutPool"
>
>
客户
放入公海
放入公海
</el-button>
</el-button>
</CustomerDetailsHeader>
</CustomerDetailsHeader>
<el-col>
<el-col>
...
@@ -74,7 +75,8 @@
...
@@ -74,7 +75,8 @@
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<CustomerForm
ref=
"formRef"
@
success=
"getCustomer"
/>
<CustomerForm
ref=
"formRef"
@
success=
"getCustomer"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"close"
/>
<CustomerDistributeForm
ref=
"distributeForm"
@
success=
"getCustomer"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"getCustomer"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
...
@@ -93,6 +95,7 @@ import FollowUpList from '@/views/crm/followup/index.vue'
...
@@ -93,6 +95,7 @@ import FollowUpList from '@/views/crm/followup/index.vue'
import
{
BizTypeEnum
}
from
'@/api/crm/permission'
import
{
BizTypeEnum
}
from
'@/api/crm/permission'
import
type
{
OperateLogV2VO
}
from
'@/api/system/operatelog'
import
type
{
OperateLogV2VO
}
from
'@/api/system/operatelog'
import
{
getOperateLogPage
}
from
'@/api/crm/operateLog'
import
{
getOperateLogPage
}
from
'@/api/crm/operateLog'
import
CustomerDistributeForm
from
'@/views/crm/customer/pool/CustomerDistributeForm.vue'
defineOptions
({
name
:
'CrmCustomerDetail'
})
defineOptions
({
name
:
'CrmCustomerDetail'
})
...
@@ -166,6 +169,12 @@ const handleReceive = async () => {
...
@@ -166,6 +169,12 @@ const handleReceive = async () => {
await
getCustomer
()
await
getCustomer
()
}
}
/** 分配客户 */
const
distributeForm
=
ref
<
InstanceType
<
typeof
CustomerDistributeForm
>>
()
// 分配客户表单 Ref
const
handleDistributeForm
=
async
()
=>
{
distributeForm
.
value
?.
open
(
customerId
.
value
)
}
/** 客户放入公海 */
/** 客户放入公海 */
const
handlePutPool
=
async
()
=>
{
const
handlePutPool
=
async
()
=>
{
await
message
.
confirm
(
`确定将客户【
${
customer
.
value
.
name
}
】放入公海吗?`
)
await
message
.
confirm
(
`确定将客户【
${
customer
.
value
.
name
}
】放入公海吗?`
)
...
...
src/views/crm/customer/pool/CustomerDistributeForm.vue
0 → 100644
View file @
a401fff7
<
template
>
<Dialog
v-model=
"dialogVisible"
title=
"分配客户"
>
<el-form
ref=
"formRef"
v-loading=
"formLoading"
:model=
"formData"
:rules=
"formRules"
label-width=
"100px"
>
<el-form-item
label=
"负责人"
prop=
"ownerUserId"
>
<el-select
v-model=
"formData.ownerUserId"
class=
"w-1/1"
>
<el-option
v-for=
"item in userOptions"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-form>
<template
#
footer
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</
template
>
</Dialog>
</template>
<
script
lang=
"ts"
setup
>
import
*
as
CustomerApi
from
'@/api/crm/customer'
import
*
as
UserApi
from
'@/api/system/user'
import
{
distributeCustomer
}
from
'@/api/crm/customer'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const
userOptions
=
ref
<
UserApi
.
UserVO
[]
>
([])
// 用户列表
const
formData
=
ref
({
id
:
undefined
,
ownerUserId
:
undefined
})
const
formRules
=
reactive
({
ownerUserId
:
[{
required
:
true
,
message
:
'负责人不能为空'
,
trigger
:
'blur'
}]
})
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
const
open
=
async
(
id
:
number
)
=>
{
dialogVisible
.
value
=
true
resetForm
()
formData
.
value
.
id
=
id
// 获得用户列表
userOptions
.
value
=
await
UserApi
.
getSimpleUserList
()
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
submitForm
=
async
()
=>
{
// 校验表单
if
(
!
formRef
)
return
const
valid
=
await
formRef
.
value
.
validate
()
if
(
!
valid
)
return
// 提交请求
formLoading
.
value
=
true
try
{
await
CustomerApi
.
distributeCustomer
([
formData
.
value
.
id
],
formData
.
value
.
ownerUserId
)
message
.
success
(
'分配客户成功'
)
dialogVisible
.
value
=
false
// 发送操作成功的事件
emit
(
'success'
)
}
finally
{
formLoading
.
value
=
false
}
}
/** 重置表单 */
const
resetForm
=
()
=>
{
formData
.
value
=
{
id
:
undefined
,
ownerUserId
:
undefined
}
formRef
.
value
?.
resetFields
()
}
</
script
>
src/views/crm/customer/pool/index.vue
View file @
a401fff7
...
@@ -257,7 +257,7 @@ const handleExport = async () => {
...
@@ -257,7 +257,7 @@ const handleExport = async () => {
// 发起导出
// 发起导出
exportLoading
.
value
=
true
exportLoading
.
value
=
true
const
data
=
await
CustomerApi
.
exportCustomer
(
queryParams
.
value
)
const
data
=
await
CustomerApi
.
exportCustomer
(
queryParams
.
value
)
download
.
excel
(
data
,
'客户.xls'
)
download
.
excel
(
data
,
'客户
公海
.xls'
)
}
catch
{
}
catch
{
}
finally
{
}
finally
{
exportLoading
.
value
=
false
exportLoading
.
value
=
false
...
...
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