30
30
31
31
<ContentWrap >
32
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" />
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 >
35
41
<el-table-column align =" center" label =" 客户名称" prop =" customerName" width =" 120" >
36
42
<template #default =" scope " >
37
43
<el-link
43
49
</el-link >
44
50
</template >
45
51
</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
+ />
48
70
<el-table-column
49
71
align =" center"
50
72
label =" 下单时间"
51
73
prop =" orderDate"
52
74
width =" 120"
53
75
:formatter =" dateFormatter2"
54
76
/>
55
- <el-table-column
56
- align =" center"
57
- label =" 合同金额"
58
- prop =" price"
59
- width =" 130"
60
- :formatter =" fenToYuanFormat"
61
- />
62
77
<el-table-column
63
78
align =" center"
64
79
label =" 合同开始时间"
78
93
<el-link
79
94
:underline =" false"
80
95
type =" primary"
81
- @click =" openContactDetail(scope.row.contactId )"
96
+ @click =" openContactDetail(scope.row.signContactId )"
82
97
>
83
- {{ scope.row.contactName }}
98
+ {{ scope.row.signContactName }}
84
99
</el-link >
85
100
</template >
86
101
</el-table-column >
87
102
<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 " />
89
104
<!-- TODO @puhui999:后续可加 【已收款金额】、【未收款金额】 -->
105
+ <el-table-column
106
+ :formatter =" dateFormatter"
107
+ align =" center"
108
+ label =" 最后跟进时间"
109
+ prop =" contactLastTime"
110
+ width =" 180px"
111
+ />
90
112
<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 " />
92
114
<el-table-column
93
115
:formatter =" dateFormatter"
94
116
align =" center"
103
125
prop =" createTime"
104
126
width =" 180px"
105
127
/>
128
+ <el-table-column align =" center" label =" 创建人" prop =" creatorName" width =" 120" />
106
129
<el-table-column align =" center" fixed =" right" label =" 合同状态" prop =" auditStatus" width =" 120" >
107
130
<template #default =" scope " >
108
131
<dict-tag :type =" DICT_TYPE.CRM_AUDIT_STATUS" :value =" scope.row.auditStatus" />
109
132
</template >
110
133
</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 >
111
146
</el-table >
112
147
<!-- 分页 -->
113
148
<Pagination
122
157
<script setup lang="ts" name="CheckContract">
123
158
import { dateFormatter , dateFormatter2 } from ' @/utils/formatTime'
124
159
import * as ContractApi from ' @/api/crm/contract'
125
- import { fenToYuanFormat } from ' @/utils/formatter'
126
160
import { DICT_TYPE } from ' @/utils/dict'
127
161
import { AUDIT_STATUS } from ' ./common'
162
+ import { erpPriceTableColumnFormatter } from ' @/utils'
128
163
129
164
const loading = ref (true ) // 列表的加载中
130
165
const total = ref (0 ) // 列表的总页数
131
166
const list = ref ([]) // 列表的数据
132
167
const queryParams = reactive ({
133
168
pageNo: 1 ,
134
169
pageSize: 10 ,
135
- auditStatus: 20
170
+ sceneType: 1 , // 我负责的
171
+ auditStatus: 10
136
172
})
137
173
const queryFormRef = ref () // 搜索的表单
138
174
@@ -154,8 +190,18 @@ const handleQuery = () => {
154
190
getList ()
155
191
}
156
192
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
+
157
204
/** 打开客户详情 */
158
- const { push } = useRouter () // 路由
159
205
const openCustomerDetail = (id : number ) => {
160
206
push ({ name: ' CrmCustomerDetail' , params: { id } })
161
207
}
@@ -165,6 +211,16 @@ const openContactDetail = (id: number) => {
165
211
push ({ name: ' CrmContactDetail' , params: { id } })
166
212
}
167
213
214
+ /** 打开商机详情 */
215
+ const openBusinessDetail = (id : number ) => {
216
+ push ({ name: ' CrmBusinessDetail' , params: { id } })
217
+ }
218
+
219
+ /** 激活时 */
220
+ onActivated (async () => {
221
+ await getList ()
222
+ })
223
+
168
224
/** 初始化 **/
169
225
onMounted (() => {
170
226
getList ()
0 commit comments