Skip to content

Commit ae3d44d

Browse files
committed
feat: 待回款提醒,即将到期的合同,待审核回款
1 parent 361c06b commit ae3d44d

File tree

8 files changed

+488
-30
lines changed

8 files changed

+488
-30
lines changed

src/api/crm/backlog/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import request from '@/config/axios'
33
import { type CustomerVO } from '../customer'
44
import { type ClueVO } from '../clue'
55

6-
76
// 查询客户列表
87
// TODO @芋艿:看看是不是后续融合到 getCustomerPage 里;
98
export const getTodayCustomerPage = async (params) => {
@@ -15,4 +14,4 @@ export const getFollowLeadsPage = async (params) => {
1514
return await request.get({ url: `/crm/backlog/page`, params })
1615
}
1716

18-
export { type CustomerVO, type ClueVO }
17+
export { type CustomerVO, type ClueVO }

src/views/crm/backlog/tables/CheckContract.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@change="handleQuery"
1919
>
2020
<el-option
21-
v-for="(option, index) in CONTRACT_AUDIT_STATUS"
21+
v-for="(option, index) in AUDIT_STATUS"
2222
:label="option.label"
2323
:value="option.value"
2424
:key="index"
@@ -124,7 +124,7 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
124124
import * as ContractApi from '@/api/crm/contract'
125125
import { fenToYuanFormat } from '@/utils/formatter'
126126
import { DICT_TYPE } from '@/utils/dict'
127-
import { CONTRACT_AUDIT_STATUS } from './common'
127+
import { AUDIT_STATUS } from './common'
128128
129129
const { push } = useRouter() // 路由
130130
Lines changed: 116 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,124 @@
11
<!-- 待审核回款 -->
2-
<!-- TODO: 后续再统一改名字 -->
32
<template>
4-
<div>
5-
TODO: 待审核回款
6-
</div>
3+
<ContentWrap>
4+
<div class="pb-5 text-xl"> 待审核回款 </div>
5+
<!-- 搜索工作栏 -->
6+
<el-form
7+
class="-mb-15px"
8+
:model="queryParams"
9+
ref="queryFormRef"
10+
:inline="true"
11+
label-width="68px"
12+
>
13+
<el-form-item label="合同状态" prop="auditStatus">
14+
<el-select
15+
v-model="queryParams.auditStatus"
16+
class="!w-240px"
17+
placeholder="状态"
18+
@change="handleQuery"
19+
>
20+
<el-option
21+
v-for="(option, index) in AUDIT_STATUS"
22+
:label="option.label"
23+
:value="option.value"
24+
:key="index"
25+
/>
26+
</el-select>
27+
</el-form-item>
28+
</el-form>
29+
</ContentWrap>
30+
<!-- 列表 -->
31+
<ContentWrap>
32+
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
33+
<el-table-column label="ID" align="center" prop="id" />
34+
<el-table-column label="回款编号" align="center" prop="no" />
35+
<!-- <el-table-column label="回款计划ID" align="center" prop="planId" />-->
36+
<el-table-column label="客户" align="center" prop="customerId" />
37+
<el-table-column label="合同" align="center" prop="contractId" />
38+
<el-table-column label="审批状态" align="center" prop="checkStatus" width="130px">
39+
<template #default="scope">
40+
<dict-tag :type="DICT_TYPE.CRM_AUDIT_STATUS" :value="scope.row.checkStatus" />
41+
</template>
42+
</el-table-column>
43+
<!-- <el-table-column label="工作流编号" align="center" prop="processInstanceId" />-->
44+
<el-table-column
45+
label="回款日期"
46+
align="center"
47+
prop="returnTime"
48+
:formatter="dateFormatter2"
49+
width="150px"
50+
/>
51+
<el-table-column label="回款方式" align="center" prop="returnType" width="130px">
52+
<template #default="scope">
53+
<dict-tag :type="DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE" :value="scope.row.returnType" />
54+
</template>
55+
</el-table-column>
56+
<el-table-column label="回款金额(元)" align="center" prop="price" />
57+
<el-table-column label="负责人" align="center" prop="ownerUserId" />
58+
<el-table-column label="批次" align="center" prop="batchId" />
59+
<!--<el-table-column label="显示顺序" align="center" prop="sort" />-->
60+
<el-table-column label="状态" align="center" prop="status">
61+
<template #default="scope">
62+
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
63+
</template>
64+
</el-table-column>
65+
<el-table-column label="备注" align="center" prop="remark" />
66+
<el-table-column
67+
label="创建时间"
68+
align="center"
69+
prop="createTime"
70+
:formatter="dateFormatter"
71+
width="180px"
72+
/>
73+
</el-table>
74+
<!-- 分页 -->
75+
<Pagination
76+
:total="total"
77+
v-model:page="queryParams.pageNo"
78+
v-model:limit="queryParams.pageSize"
79+
@pagination="getList"
80+
/>
81+
</ContentWrap>
782
</template>
883

984
<script setup lang="ts" name="CheckReceivables">
85+
import { DICT_TYPE } from '@/utils/dict'
86+
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
87+
import * as ReceivableApi from '@/api/crm/receivable'
88+
import { AUDIT_STATUS } from './common'
1089
11-
</script>
90+
const loading = ref(true) // 列表的加载中
91+
const total = ref(0) // 列表的总页数
92+
const list = ref([]) // 列表的数据
93+
const queryParams = reactive({
94+
pageNo: 1,
95+
pageSize: 10,
96+
auditStatus: 20
97+
})
98+
const queryFormRef = ref() // 搜索的表单
99+
100+
/** 查询列表 */
101+
const getList = async () => {
102+
loading.value = true
103+
try {
104+
const data = await ReceivableApi.getReceivablePage(queryParams)
105+
list.value = data.list
106+
total.value = data.total
107+
} finally {
108+
loading.value = false
109+
}
110+
}
12111
13-
<style scoped>
112+
/** 搜索按钮操作 */
113+
const handleQuery = () => {
114+
queryParams.pageNo = 1
115+
getList()
116+
}
117+
118+
/** 初始化 **/
119+
onMounted(() => {
120+
getList()
121+
})
122+
</script>
14123

15-
</style>
124+
<style scoped></style>
Lines changed: 168 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,175 @@
1-
<!-- 分配给我的客户 -->
2-
<!-- TODO: 即将到期的合同 -->
1+
<!-- 即将到期的合同 -->
32
<template>
4-
<div>
5-
TODO: 即将到期的合同
6-
</div>
3+
<ContentWrap>
4+
<div class="pb-5 text-xl"> 即将到期的合同 </div>
5+
<!-- 搜索工作栏 -->
6+
<el-form
7+
class="-mb-15px"
8+
:model="queryParams"
9+
ref="queryFormRef"
10+
:inline="true"
11+
label-width="68px"
12+
>
13+
<el-form-item label="到期状态" prop="expiryType">
14+
<el-select
15+
v-model="queryParams.expiryType"
16+
class="!w-240px"
17+
placeholder="状态"
18+
@change="handleQuery"
19+
>
20+
<el-option
21+
v-for="(option, index) in CONTRACT_EXPIRY_TYPE"
22+
:label="option.label"
23+
:value="option.value"
24+
:key="index"
25+
/>
26+
</el-select>
27+
</el-form-item>
28+
</el-form>
29+
</ContentWrap>
30+
31+
<ContentWrap>
32+
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
33+
<el-table-column align="center" fixed="left" label="合同编号" prop="no" width="130" />
34+
<el-table-column align="center" label="合同名称" prop="name" width="130" />
35+
<el-table-column align="center" label="客户名称" prop="customerName" width="120">
36+
<template #default="scope">
37+
<el-link
38+
:underline="false"
39+
type="primary"
40+
@click="openCustomerDetail(scope.row.customerId)"
41+
>
42+
{{ scope.row.customerName }}
43+
</el-link>
44+
</template>
45+
</el-table-column>
46+
<!-- TODO @puhui999:做了商机详情后,可以把这个超链接加上 -->
47+
<el-table-column align="center" label="商机名称" prop="businessName" width="130" />
48+
<el-table-column
49+
align="center"
50+
label="下单时间"
51+
prop="orderDate"
52+
width="120"
53+
:formatter="dateFormatter2"
54+
/>
55+
<el-table-column
56+
align="center"
57+
label="合同金额"
58+
prop="price"
59+
width="130"
60+
:formatter="fenToYuanFormat"
61+
/>
62+
<el-table-column
63+
align="center"
64+
label="合同开始时间"
65+
prop="startTime"
66+
width="120"
67+
:formatter="dateFormatter2"
68+
/>
69+
<el-table-column
70+
align="center"
71+
label="合同结束时间"
72+
prop="endTime"
73+
width="120"
74+
:formatter="dateFormatter2"
75+
/>
76+
<el-table-column align="center" label="客户签约人" prop="contactName" width="130">
77+
<template #default="scope">
78+
<el-link
79+
:underline="false"
80+
type="primary"
81+
@click="openContactDetail(scope.row.contactId)"
82+
>
83+
{{ scope.row.contactName }}
84+
</el-link>
85+
</template>
86+
</el-table-column>
87+
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
88+
<el-table-column align="center" label="备注" prop="remark" width="130" />
89+
<!-- TODO @puhui999:后续可加 【已收款金额】、【未收款金额】 -->
90+
<el-table-column align="center" label="负责人" prop="ownerUserName" width="120" />
91+
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
92+
<el-table-column
93+
:formatter="dateFormatter"
94+
align="center"
95+
label="更新时间"
96+
prop="updateTime"
97+
width="180px"
98+
/>
99+
<el-table-column
100+
:formatter="dateFormatter"
101+
align="center"
102+
label="创建时间"
103+
prop="createTime"
104+
width="180px"
105+
/>
106+
<el-table-column align="center" fixed="right" label="合同状态" prop="auditStatus" width="120">
107+
<template #default="scope">
108+
<dict-tag :type="DICT_TYPE.CRM_AUDIT_STATUS" :value="scope.row.auditStatus" />
109+
</template>
110+
</el-table-column>
111+
</el-table>
112+
<!-- 分页 -->
113+
<Pagination
114+
v-model:limit="queryParams.pageSize"
115+
v-model:page="queryParams.pageNo"
116+
:total="total"
117+
@pagination="getList"
118+
/>
119+
</ContentWrap>
7120
</template>
8121

9122
<script setup lang="ts" name="EndContract">
123+
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
124+
import * as ContractApi from '@/api/crm/contract'
125+
import { fenToYuanFormat } from '@/utils/formatter'
126+
import { DICT_TYPE } from '@/utils/dict'
127+
import { CONTRACT_EXPIRY_TYPE } from './common'
10128
11-
</script>
129+
const { push } = useRouter() // 路由
130+
131+
const loading = ref(true) // 列表的加载中
132+
const total = ref(0) // 列表的总页数
133+
const list = ref([]) // 列表的数据
134+
const queryParams = reactive({
135+
pageNo: 1,
136+
pageSize: 10,
137+
expiryType: 1
138+
})
139+
const queryFormRef = ref() // 搜索的表单
140+
141+
/** 查询列表 */
142+
const getList = async () => {
143+
loading.value = true
144+
try {
145+
const data = await ContractApi.getContractPage(queryParams)
146+
list.value = data.list
147+
total.value = data.total
148+
} finally {
149+
loading.value = false
150+
}
151+
}
12152
13-
<style scoped>
153+
/** 搜索按钮操作 */
154+
const handleQuery = () => {
155+
queryParams.pageNo = 1
156+
getList()
157+
}
158+
159+
/** 打开客户详情 */
160+
const openCustomerDetail = (id: number) => {
161+
push({ name: 'CrmCustomerDetail', params: { id } })
162+
}
163+
164+
/** 打开联系人详情 */
165+
const openContactDetail = (id: number) => {
166+
push({ name: 'CrmContactDetail', params: { id } })
167+
}
168+
169+
/** 初始化 **/
170+
onMounted(() => {
171+
getList()
172+
})
173+
</script>
14174

15-
</style>
175+
<style scoped></style>

src/views/crm/backlog/tables/FollowCustomer.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ import { DICT_TYPE } from '@/utils/dict'
114114
import { dateFormatter } from '@/utils/formatTime'
115115
import { FOLLOWUP_STATUS } from './common'
116116
117-
118117
const { push } = useRouter()
119118
120119
const loading = ref(true) // 列表的加载中

src/views/crm/backlog/tables/PutInPoolRemind.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const queryParams = ref({
119119
pageNo: 1,
120120
pageSize: 10,
121121
sceneType: 1, // 我负责的
122-
pool: true, // 固定 公海参数为 true
122+
pool: true // 固定 公海参数为 true
123123
})
124124
const queryFormRef = ref() // 搜索的表单
125125

0 commit comments

Comments
 (0)