Skip to content

Commit 1694827

Browse files
author
puhui999
committed
Merge remote-tracking branch 'yudao/dev' into dev-crm
2 parents 32d5892 + c792e69 commit 1694827

37 files changed

+1436
-537
lines changed

src/api/crm/backlog/index.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/api/crm/contract/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface ContractVO {
2121
totalProductPrice: number
2222
discountPercent: number
2323
totalPrice: number
24+
totalReceivablePrice: number
2425
signContactId: number
2526
signContactName?: string
2627
signUserId: number
@@ -66,9 +67,9 @@ export const getContract = async (id: number) => {
6667
}
6768

6869
// 查询 CRM 合同下拉列表
69-
export const getCrmContractSimpleListByCustomerId = async (customerId: number) => {
70+
export const getContractSimpleList = async (customerId: number) => {
7071
return await request.get({
71-
url: `/crm/contract/list-all-simple-by-customer?customerId=${customerId}`
72+
url: `/crm/contract/simple-list?customerId=${customerId}`
7273
})
7374
}
7475

src/api/crm/receivable/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ export interface ReceivableVO {
55
no: string
66
planId: number
77
customerId: number
8+
customerName?: string
89
contractId: number
10+
contract?: {
11+
no: string
12+
totalPrice: number
13+
}
914
auditStatus: number
1015
processInstanceId: number
1116
returnTime: Date
1217
returnType: string
1318
price: number
1419
ownerUserId: number
20+
ownerUserName?: string
1521
remark: string
22+
creator: string // 创建人
23+
creatorName?: string // 创建人名称
24+
createTime: Date // 创建时间
25+
updateTime: Date // 更新时间
1626
}
1727

1828
// 查询回款列表
@@ -54,3 +64,8 @@ export const exportReceivable = async (params) => {
5464
export const submitReceivable = async (id: number) => {
5565
return await request.put({ url: `/crm/receivable/submit?id=${id}` })
5666
}
67+
68+
// 获得待审核回款数量
69+
export const getAuditReceivableCount = async () => {
70+
return await request.get({ url: '/crm/receivable/audit-count' })
71+
}

src/api/crm/receivable/plan/index.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,26 @@ export interface ReceivablePlanVO {
44
id: number
55
period: number
66
receivableId: number
7-
finishStatus: number
8-
processInstanceId: number
97
price: number
108
returnTime: Date
119
remindDays: number
10+
returnType: number
1211
remindTime: Date
1312
customerId: number
13+
customerName?: string
1414
contractId: number
15+
contractNo?: string
1516
ownerUserId: number
17+
ownerUserName?: string
1618
remark: string
19+
creator: string // 创建人
20+
creatorName?: string // 创建人名称
21+
createTime: Date // 创建时间
22+
updateTime: Date // 更新时间
23+
receivable?: {
24+
price: number
25+
returnTime: Date
26+
}
1727
}
1828

1929
// 查询回款计划列表
@@ -32,9 +42,9 @@ export const getReceivablePlan = async (id: number) => {
3242
}
3343

3444
// 查询回款计划下拉数据
35-
export const getReceivablePlanListByContractId = async (customerId: number, contractId: number) => {
45+
export const getReceivablePlanSimpleList = async (customerId: number, contractId: number) => {
3646
return await request.get({
37-
url: `/crm/receivable-plan/list-all-simple-by-customer?customerId=${customerId}&contractId=${contractId}`
47+
url: `/crm/receivable-plan/simple-list?customerId=${customerId}&contractId=${contractId}`
3848
})
3949
}
4050

@@ -57,3 +67,8 @@ export const deleteReceivablePlan = async (id: number) => {
5767
export const exportReceivablePlan = async (params) => {
5868
return await request.download({ url: `/crm/receivable-plan/export-excel`, params })
5969
}
70+
71+
// 获得待回款提醒数量
72+
export const getReceivablePlanRemindCount = async () => {
73+
return await request.get({ url: '/crm/receivable-plan/remind-count' })
74+
}

src/router/modules/remaining.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,28 @@ const remainingRouter: AppRouteRecordRaw[] = [
539539
},
540540
component: () => import('@/views/crm/contract/detail/index.vue')
541541
},
542+
{
543+
path: 'receivable-plan/detail/:id',
544+
name: 'CrmReceivablePlanDetail',
545+
meta: {
546+
title: '回款计划详情',
547+
noCache: true,
548+
hidden: true,
549+
activeMenu: '/crm/receivable-plan'
550+
},
551+
component: () => import('@/views/crm/receivable/plan/detail/index.vue')
552+
},
553+
{
554+
path: 'receivable/detail/:id',
555+
name: 'CrmReceivableDetail',
556+
meta: {
557+
title: '回款详情',
558+
noCache: true,
559+
hidden: true,
560+
activeMenu: '/crm/receivable'
561+
},
562+
component: () => import('@/views/crm/receivable/detail/index.vue')
563+
},
542564
{
543565
path: 'contact/detail/:id',
544566
name: 'CrmContactDetail',

src/views/crm/backlog/components/ContractAuditList.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,24 @@
101101
</el-table-column>
102102
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
103103
<el-table-column align="center" label="备注" prop="remark" width="200" />
104-
<!-- TODO @puhui999:后续可加 【已收款金额】、【未收款金额】 -->
104+
<el-table-column
105+
align="center"
106+
label="已回款金额(元)"
107+
prop="totalReceivablePrice"
108+
width="140"
109+
:formatter="erpPriceTableColumnFormatter"
110+
/>
111+
<el-table-column
112+
align="center"
113+
label="未回款金额(元)"
114+
prop="totalReceivablePrice"
115+
width="140"
116+
:formatter="erpPriceTableColumnFormatter"
117+
>
118+
<template #default="scope">
119+
{{ erpPriceInputFormatter(scope.row.totalPrice - scope.row.totalReceivablePrice) }}
120+
</template>
121+
</el-table-column>
105122
<el-table-column
106123
:formatter="dateFormatter"
107124
align="center"
@@ -159,7 +176,7 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
159176
import * as ContractApi from '@/api/crm/contract'
160177
import { DICT_TYPE } from '@/utils/dict'
161178
import { AUDIT_STATUS } from './common'
162-
import { erpPriceTableColumnFormatter } from '@/utils'
179+
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
163180
164181
const loading = ref(true) // 列表的加载中
165182
const total = ref(0) // 列表的总页数

src/views/crm/backlog/components/ContractRemindList.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,24 @@
101101
</el-table-column>
102102
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
103103
<el-table-column align="center" label="备注" prop="remark" width="200" />
104-
<!-- TODO @puhui999:后续可加 【已收款金额】、【未收款金额】 -->
104+
<el-table-column
105+
align="center"
106+
label="已回款金额(元)"
107+
prop="totalReceivablePrice"
108+
width="140"
109+
:formatter="erpPriceTableColumnFormatter"
110+
/>
111+
<el-table-column
112+
align="center"
113+
label="未回款金额(元)"
114+
prop="totalReceivablePrice"
115+
width="140"
116+
:formatter="erpPriceTableColumnFormatter"
117+
>
118+
<template #default="scope">
119+
{{ erpPriceInputFormatter(scope.row.totalPrice - scope.row.totalReceivablePrice) }}
120+
</template>
121+
</el-table-column>
105122
<el-table-column
106123
:formatter="dateFormatter"
107124
align="center"
@@ -160,7 +177,7 @@ import * as ContractApi from '@/api/crm/contract'
160177
import { fenToYuanFormat } from '@/utils/formatter'
161178
import { DICT_TYPE } from '@/utils/dict'
162179
import { CONTRACT_EXPIRY_TYPE } from './common'
163-
import { erpPriceTableColumnFormatter } from '@/utils'
180+
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
164181
165182
const loading = ref(true) // 列表的加载中
166183
const total = ref(0) // 列表的总页数

0 commit comments

Comments
 (0)