Skip to content

Commit 6caa94e

Browse files
committed
✨ CRM:待办事项(接入合同)
1 parent 8f8591f commit 6caa94e

File tree

8 files changed

+183
-63
lines changed

8 files changed

+183
-63
lines changed

src/api/crm/backlog/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import request from '@/config/axios'
22
// TODO 芋艿:融合下
33

4-
// 3. 获得分配给我的客户数量
5-
export const getFollowCustomerCount = async () => {
6-
return await request.get({ url: '/crm/customer/follow-customer-count' })
7-
}
8-
94
// 5. 获得待审核合同数量
105
export const getCheckContractCount = async () => {
116
return await request.get({ url: '/crm/contract/check-contract-count' })

src/api/crm/contract/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,13 @@ export const submitContract = async (id: number) => {
9494
export const transferContract = async (data: TransferReqVO) => {
9595
return await request.put({ url: '/crm/contract/transfer', data })
9696
}
97+
98+
// 获得待审核合同数量
99+
export const getAuditContractCount = async () => {
100+
return await request.get({ url: '/crm/contract/audit-count' })
101+
}
102+
103+
// 获得即将到期(提醒)的合同数量
104+
export const getRemindContractCount = async () => {
105+
return await request.get({ url: '/crm/contract/remind-count' })
106+
}

src/views/crm/backlog/tables/CheckContract.vue renamed to src/views/crm/backlog/components/ContractAuditList.vue

Lines changed: 74 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@
3030

3131
<ContentWrap>
3232
<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" />
33+
<el-table-column align="center" fixed="left" label="合同编号" prop="no" width="180" />
34+
<el-table-column align="center" fixed="left" label="合同名称" prop="name" width="160">
35+
<template #default="scope">
36+
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
37+
{{ scope.row.name }}
38+
</el-link>
39+
</template>
40+
</el-table-column>
3541
<el-table-column align="center" label="客户名称" prop="customerName" width="120">
3642
<template #default="scope">
3743
<el-link
@@ -43,22 +49,31 @@
4349
</el-link>
4450
</template>
4551
</el-table-column>
46-
<!-- TODO @puhui999:做了商机详情后,可以把这个超链接加上 -->
47-
<el-table-column align="center" label="商机名称" prop="businessName" width="130" />
52+
<el-table-column align="center" label="商机名称" prop="businessName" width="130">
53+
<template #default="scope">
54+
<el-link
55+
:underline="false"
56+
type="primary"
57+
@click="openBusinessDetail(scope.row.businessId)"
58+
>
59+
{{ scope.row.businessName }}
60+
</el-link>
61+
</template>
62+
</el-table-column>
63+
<el-table-column
64+
align="center"
65+
label="合同金额(元)"
66+
prop="totalPrice"
67+
width="140"
68+
:formatter="erpPriceTableColumnFormatter"
69+
/>
4870
<el-table-column
4971
align="center"
5072
label="下单时间"
5173
prop="orderDate"
5274
width="120"
5375
:formatter="dateFormatter2"
5476
/>
55-
<el-table-column
56-
align="center"
57-
label="合同金额"
58-
prop="price"
59-
width="130"
60-
:formatter="fenToYuanFormat"
61-
/>
6277
<el-table-column
6378
align="center"
6479
label="合同开始时间"
@@ -78,17 +93,24 @@
7893
<el-link
7994
:underline="false"
8095
type="primary"
81-
@click="openContactDetail(scope.row.contactId)"
96+
@click="openContactDetail(scope.row.signContactId)"
8297
>
83-
{{ scope.row.contactName }}
98+
{{ scope.row.signContactName }}
8499
</el-link>
85100
</template>
86101
</el-table-column>
87102
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
88-
<el-table-column align="center" label="备注" prop="remark" width="130" />
103+
<el-table-column align="center" label="备注" prop="remark" width="200" />
89104
<!-- TODO @puhui999:后续可加 【已收款金额】、【未收款金额】 -->
105+
<el-table-column
106+
:formatter="dateFormatter"
107+
align="center"
108+
label="最后跟进时间"
109+
prop="contactLastTime"
110+
width="180px"
111+
/>
90112
<el-table-column align="center" label="负责人" prop="ownerUserName" width="120" />
91-
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
113+
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
92114
<el-table-column
93115
:formatter="dateFormatter"
94116
align="center"
@@ -103,11 +125,24 @@
103125
prop="createTime"
104126
width="180px"
105127
/>
128+
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
106129
<el-table-column align="center" fixed="right" label="合同状态" prop="auditStatus" width="120">
107130
<template #default="scope">
108131
<dict-tag :type="DICT_TYPE.CRM_AUDIT_STATUS" :value="scope.row.auditStatus" />
109132
</template>
110133
</el-table-column>
134+
<el-table-column fixed="right" label="操作" width="90">
135+
<template #default="scope">
136+
<el-button
137+
link
138+
v-hasPermi="['crm:contract:update']"
139+
type="primary"
140+
@click="handleProcessDetail(scope.row)"
141+
>
142+
查看审批
143+
</el-button>
144+
</template>
145+
</el-table-column>
111146
</el-table>
112147
<!-- 分页 -->
113148
<Pagination
@@ -122,17 +157,18 @@
122157
<script setup lang="ts" name="CheckContract">
123158
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
124159
import * as ContractApi from '@/api/crm/contract'
125-
import { fenToYuanFormat } from '@/utils/formatter'
126160
import { DICT_TYPE } from '@/utils/dict'
127161
import { AUDIT_STATUS } from './common'
162+
import { erpPriceTableColumnFormatter } from '@/utils'
128163
129164
const loading = ref(true) // 列表的加载中
130165
const total = ref(0) // 列表的总页数
131166
const list = ref([]) // 列表的数据
132167
const queryParams = reactive({
133168
pageNo: 1,
134169
pageSize: 10,
135-
auditStatus: 20
170+
sceneType: 1, // 我负责的
171+
auditStatus: 10
136172
})
137173
const queryFormRef = ref() // 搜索的表单
138174
@@ -154,8 +190,18 @@ const handleQuery = () => {
154190
getList()
155191
}
156192
193+
/** 查看审批 */
194+
const handleProcessDetail = (row: ContractApi.ContractVO) => {
195+
push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })
196+
}
197+
198+
/** 打开合同详情 */
199+
const { push } = useRouter()
200+
const openDetail = (id: number) => {
201+
push({ name: 'CrmContractDetail', params: { id } })
202+
}
203+
157204
/** 打开客户详情 */
158-
const { push } = useRouter() // 路由
159205
const openCustomerDetail = (id: number) => {
160206
push({ name: 'CrmCustomerDetail', params: { id } })
161207
}
@@ -165,6 +211,16 @@ const openContactDetail = (id: number) => {
165211
push({ name: 'CrmContactDetail', params: { id } })
166212
}
167213
214+
/** 打开商机详情 */
215+
const openBusinessDetail = (id: number) => {
216+
push({ name: 'CrmBusinessDetail', params: { id } })
217+
}
218+
219+
/** 激活时 */
220+
onActivated(async () => {
221+
await getList()
222+
})
223+
168224
/** 初始化 **/
169225
onMounted(() => {
170226
getList()

src/views/crm/backlog/tables/EndContract.vue renamed to src/views/crm/backlog/components/ContractRemindList.vue

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@
3030

3131
<ContentWrap>
3232
<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" />
33+
<el-table-column align="center" fixed="left" label="合同编号" prop="no" width="180" />
34+
<el-table-column align="center" fixed="left" label="合同名称" prop="name" width="160">
35+
<template #default="scope">
36+
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
37+
{{ scope.row.name }}
38+
</el-link>
39+
</template>
40+
</el-table-column>
3541
<el-table-column align="center" label="客户名称" prop="customerName" width="120">
3642
<template #default="scope">
3743
<el-link
@@ -43,22 +49,31 @@
4349
</el-link>
4450
</template>
4551
</el-table-column>
46-
<!-- TODO @puhui999:做了商机详情后,可以把这个超链接加上 -->
47-
<el-table-column align="center" label="商机名称" prop="businessName" width="130" />
52+
<el-table-column align="center" label="商机名称" prop="businessName" width="130">
53+
<template #default="scope">
54+
<el-link
55+
:underline="false"
56+
type="primary"
57+
@click="openBusinessDetail(scope.row.businessId)"
58+
>
59+
{{ scope.row.businessName }}
60+
</el-link>
61+
</template>
62+
</el-table-column>
63+
<el-table-column
64+
align="center"
65+
label="合同金额(元)"
66+
prop="totalPrice"
67+
width="140"
68+
:formatter="erpPriceTableColumnFormatter"
69+
/>
4870
<el-table-column
4971
align="center"
5072
label="下单时间"
5173
prop="orderDate"
5274
width="120"
5375
:formatter="dateFormatter2"
5476
/>
55-
<el-table-column
56-
align="center"
57-
label="合同金额"
58-
prop="price"
59-
width="130"
60-
:formatter="fenToYuanFormat"
61-
/>
6277
<el-table-column
6378
align="center"
6479
label="合同开始时间"
@@ -78,17 +93,24 @@
7893
<el-link
7994
:underline="false"
8095
type="primary"
81-
@click="openContactDetail(scope.row.contactId)"
96+
@click="openContactDetail(scope.row.signContactId)"
8297
>
83-
{{ scope.row.contactName }}
98+
{{ scope.row.signContactName }}
8499
</el-link>
85100
</template>
86101
</el-table-column>
87102
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
88-
<el-table-column align="center" label="备注" prop="remark" width="130" />
103+
<el-table-column align="center" label="备注" prop="remark" width="200" />
89104
<!-- TODO @puhui999:后续可加 【已收款金额】、【未收款金额】 -->
105+
<el-table-column
106+
:formatter="dateFormatter"
107+
align="center"
108+
label="最后跟进时间"
109+
prop="contactLastTime"
110+
width="180px"
111+
/>
90112
<el-table-column align="center" label="负责人" prop="ownerUserName" width="120" />
91-
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
113+
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
92114
<el-table-column
93115
:formatter="dateFormatter"
94116
align="center"
@@ -103,11 +125,24 @@
103125
prop="createTime"
104126
width="180px"
105127
/>
128+
<el-table-column align="center" label="创建人" prop="creatorName" width="120" />
106129
<el-table-column align="center" fixed="right" label="合同状态" prop="auditStatus" width="120">
107130
<template #default="scope">
108131
<dict-tag :type="DICT_TYPE.CRM_AUDIT_STATUS" :value="scope.row.auditStatus" />
109132
</template>
110133
</el-table-column>
134+
<el-table-column fixed="right" label="操作" width="90">
135+
<template #default="scope">
136+
<el-button
137+
link
138+
v-hasPermi="['crm:contract:update']"
139+
type="primary"
140+
@click="handleProcessDetail(scope.row)"
141+
>
142+
查看审批
143+
</el-button>
144+
</template>
145+
</el-table-column>
111146
</el-table>
112147
<!-- 分页 -->
113148
<Pagination
@@ -125,15 +160,15 @@ import * as ContractApi from '@/api/crm/contract'
125160
import { fenToYuanFormat } from '@/utils/formatter'
126161
import { DICT_TYPE } from '@/utils/dict'
127162
import { CONTRACT_EXPIRY_TYPE } from './common'
128-
129-
const { push } = useRouter() // 路由
163+
import { erpPriceTableColumnFormatter } from '@/utils'
130164
131165
const loading = ref(true) // 列表的加载中
132166
const total = ref(0) // 列表的总页数
133167
const list = ref([]) // 列表的数据
134168
const queryParams = reactive({
135169
pageNo: 1,
136170
pageSize: 10,
171+
sceneType: '1', // 自己负责的
137172
expiryType: 1
138173
})
139174
const queryFormRef = ref() // 搜索的表单
@@ -156,6 +191,17 @@ const handleQuery = () => {
156191
getList()
157192
}
158193
194+
/** 查看审批 */
195+
const handleProcessDetail = (row: ContractApi.ContractVO) => {
196+
push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })
197+
}
198+
199+
/** 打开合同详情 */
200+
const { push } = useRouter()
201+
const openDetail = (id: number) => {
202+
push({ name: 'CrmContractDetail', params: { id } })
203+
}
204+
159205
/** 打开客户详情 */
160206
const openCustomerDetail = (id: number) => {
161207
push({ name: 'CrmCustomerDetail', params: { id } })
@@ -166,10 +212,18 @@ const openContactDetail = (id: number) => {
166212
push({ name: 'CrmContactDetail', params: { id } })
167213
}
168214
215+
/** 打开商机详情 */
216+
const openBusinessDetail = (id: number) => {
217+
push({ name: 'CrmBusinessDetail', params: { id } })
218+
}
219+
220+
/** 激活时 */
221+
onActivated(async () => {
222+
await getList()
223+
})
224+
169225
/** 初始化 **/
170226
onMounted(() => {
171227
getList()
172228
})
173229
</script>
174-
175-
<style scoped></style>

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ const list = ref([]) // 列表的数据
130130
const queryParams = ref({
131131
pageNo: 1,
132132
pageSize: 10,
133-
followUpStatus: false,
134-
sceneType: 1
133+
sceneType: 1,
134+
followUpStatus: false
135135
})
136136
const queryFormRef = ref() // 搜索的表单
137137
@@ -158,10 +158,13 @@ const openDetail = (id: number) => {
158158
push({ name: 'CrmCustomerDetail', params: { id } })
159159
}
160160
161+
/** 激活时 */
162+
onActivated(async () => {
163+
await getList()
164+
})
165+
161166
/** 初始化 **/
162167
onMounted(() => {
163168
getList()
164169
})
165170
</script>
166-
167-
<style scoped></style>

0 commit comments

Comments
 (0)