66
66
67
67
<!-- 列表 -->
68
68
<ContentWrap >
69
+ <el-tabs v-model =" activeName" @tab-click =" handleTabClick" >
70
+ <el-tab-pane label =" 我负责的" name =" 1" />
71
+ <el-tab-pane label =" 我参与的" name =" 2" />
72
+ <el-tab-pane label =" 下属负责的" name =" 3" />
73
+ </el-tabs >
69
74
<el-table v-loading =" loading" :data =" list" :show-overflow-tooltip =" true" :stripe =" true" >
70
- <el-table-column align =" center" label =" 回款编号" prop =" no" />
71
- <el-table-column align =" center" label =" 客户" prop =" customerName" />
72
- <el-table-column align =" center" label =" 合同" prop =" contractName" />
75
+ <el-table-column align =" center" fixed =" left" label =" 回款编号" prop =" no" width =" 180" />
76
+ <el-table-column align =" center" label =" 客户名称" prop =" customerName" width =" 120" >
77
+ <template #default =" scope " >
78
+ <el-link
79
+ :underline =" false"
80
+ type =" primary"
81
+ @click =" openCustomerDetail(scope.row.customerId)"
82
+ >
83
+ {{ scope.row.customerName }}
84
+ </el-link >
85
+ </template >
86
+ </el-table-column >
87
+ <el-table-column align =" center" label =" 合同编号" prop =" contractNo" width =" 180" >
88
+ <template #default =" scope " >
89
+ <el-link
90
+ :underline =" false"
91
+ type =" primary"
92
+ @click =" openContractDetail(scope.row.contractId)"
93
+ >
94
+ {{ scope.row.contract.no }}
95
+ </el-link >
96
+ </template >
97
+ </el-table-column >
73
98
<el-table-column
74
99
:formatter =" dateFormatter2"
75
100
align =" center"
76
101
label =" 回款日期"
77
102
prop =" returnTime"
78
103
width =" 150px"
79
104
/>
105
+ <el-table-column
106
+ align =" center"
107
+ label =" 回款金额(元)"
108
+ prop =" price"
109
+ width =" 140"
110
+ :formatter =" erpPriceTableColumnFormatter"
111
+ />
80
112
<el-table-column align =" center" label =" 回款方式" prop =" returnType" width =" 130px" >
81
113
<template #default =" scope " >
82
114
<dict-tag :type =" DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE" :value =" scope.row.returnType" />
83
115
</template >
84
116
</el-table-column >
85
- <el-table-column align =" center" label =" 回款金额(元)" prop =" price" />
86
- <el-table-column align =" center" label =" 负责人" prop =" ownerUserName" />
87
- <el-table-column align =" center" label =" 备注" prop =" remark" />
117
+ <el-table-column align =" center" label =" 备注" prop =" remark" width =" 200" />
118
+ <el-table-column
119
+ align =" center"
120
+ label =" 合同金额(元)"
121
+ prop =" contract.totalPrice"
122
+ width =" 140"
123
+ :formatter =" erpPriceTableColumnFormatter"
124
+ />
125
+ <el-table-column align =" center" label =" 负责人" prop =" ownerUserName" width =" 120" />
126
+ <el-table-column align =" center" label =" 所属部门" prop =" ownerUserDeptName" width =" 100px" />
127
+ <el-table-column
128
+ :formatter =" dateFormatter"
129
+ align =" center"
130
+ label =" 更新时间"
131
+ prop =" updateTime"
132
+ width =" 180px"
133
+ />
134
+ <el-table-column
135
+ :formatter =" dateFormatter"
136
+ align =" center"
137
+ label =" 创建时间"
138
+ prop =" createTime"
139
+ width =" 180px"
140
+ />
141
+ <el-table-column align =" center" label =" 创建人" prop =" creatorName" width =" 120" />
88
142
<el-table-column align =" center" fixed =" right" label =" 回款状态" prop =" auditStatus" width =" 120" >
89
143
<template #default =" scope " >
90
144
<dict-tag :type =" DICT_TYPE.CRM_AUDIT_STATUS" :value =" scope.row.auditStatus" />
144
198
145
199
<script lang="ts" setup>
146
200
import { DICT_TYPE } from ' @/utils/dict'
147
- import { dateFormatter2 } from ' @/utils/formatTime'
201
+ import { dateFormatter , dateFormatter2 } from ' @/utils/formatTime'
148
202
import download from ' @/utils/download'
149
203
import * as ReceivableApi from ' @/api/crm/receivable'
150
204
import ReceivableForm from ' ./ReceivableForm.vue'
151
205
import * as CustomerApi from ' @/api/crm/customer'
206
+ import { TabsPaneContext } from ' element-plus'
207
+ import { erpPriceTableColumnFormatter } from ' @/utils'
152
208
153
209
defineOptions ({ name: ' Receivable' })
154
210
155
211
const message = useMessage () // 消息弹窗
156
212
const { t } = useI18n () // 国际化
157
- const { push } = useRouter () // 路由
158
213
const loading = ref (true ) // 列表的加载中
159
214
const total = ref (0 ) // 列表的总页数
160
215
const list = ref ([]) // 列表的数据
161
216
const queryParams = reactive ({
162
217
pageNo: 1 ,
163
218
pageSize: 10 ,
219
+ sceneType: ' 1' , // 默认和 activeName 相等
164
220
no: undefined ,
165
221
customerId: undefined
166
222
})
167
223
const queryFormRef = ref () // 搜索的表单
168
224
const exportLoading = ref (false ) // 导出的加载中
225
+ const activeName = ref (' 1' ) // 列表 tab
226
+ const customerList = ref <CustomerApi .CustomerVO []>([]) // 客户列表
227
+
228
+ /** tab 切换 */
229
+ const handleTabClick = (tab : TabsPaneContext ) => {
230
+ queryParams .sceneType = tab .paneName
231
+ handleQuery ()
232
+ }
169
233
170
234
/** 查询列表 */
171
235
const getList = async () => {
@@ -218,10 +282,27 @@ const handleSubmit = async (row: ReceivableApi.ReceivableVO) => {
218
282
await getList ()
219
283
}
220
284
285
+ /** 打开回款详情 */
286
+ const { push } = useRouter ()
287
+ const openDetail = (id : number ) => {
288
+ push ({ name: ' CrmReceivableDetail' , params: { id } })
289
+ }
290
+
291
+ /** 打开客户详情 */
292
+ const openCustomerDetail = (id : number ) => {
293
+ push ({ name: ' CrmCustomerDetail' , params: { id } })
294
+ }
295
+
296
+ /** 打开合同详情 */
297
+ const openContractDetail = (id : number ) => {
298
+ push ({ name: ' CrmContractDetail' , params: { id } })
299
+ }
300
+
221
301
/** 查看审批 */
222
302
const handleProcessDetail = (row : ReceivableApi .ReceivableVO ) => {
223
303
push ({ name: ' BpmProcessInstanceDetail' , query: { id: row .processInstanceId } })
224
304
}
305
+
225
306
// TODO puhui999: 回款流程审批表单详情查看后面完善
226
307
/** 导出按钮操作 */
227
308
const handleExport = async () => {
@@ -237,7 +318,7 @@ const handleExport = async () => {
237
318
exportLoading .value = false
238
319
}
239
320
}
240
- const customerList = ref < CustomerApi . CustomerVO []>([]) // 客户列表
321
+
241
322
/** 初始化 **/
242
323
onMounted (async () => {
243
324
await getList ()
0 commit comments