67
67
<!-- 列表 -->
68
68
<ContentWrap >
69
69
<el-table v-loading =" loading" :data =" list" :show-overflow-tooltip =" true" :stripe =" true" >
70
- <el-table-column align =" center" label =" 客户名称" prop =" customerName" width =" 150px" />
70
+ <el-table-column align =" center" fixed =" left" label =" 客户名称" prop =" customerName" width =" 150" >
71
+ <template #default =" scope " >
72
+ <el-link
73
+ :underline =" false"
74
+ type =" primary"
75
+ @click =" openCustomerDetail(scope.row.customerId)"
76
+ >
77
+ {{ scope.row.customerName }}
78
+ </el-link >
79
+ </template >
80
+ </el-table-column >
71
81
<el-table-column align =" center" label =" 合同编号" prop =" contractNo" width =" 200px" />
82
+ <!-- TODO @puhui999:这里可以点到详情;最新版本,他有了单独的详情哈 -->
72
83
<el-table-column align =" center" label =" 期数" prop =" period" />
73
- <el-table-column align =" center" label =" 计划回款(元)" prop =" price" width =" 120" />
84
+ <el-table-column
85
+ align =" center"
86
+ label =" 计划回款金额(元)"
87
+ prop =" price"
88
+ width =" 160"
89
+ :formatter =" erpPriceTableColumnFormatter"
90
+ />
74
91
<el-table-column
75
92
:formatter =" dateFormatter2"
76
93
align =" center"
80
97
/>
81
98
<el-table-column align =" center" label =" 提前几天提醒" prop =" remindDays" width =" 150" />
82
99
<el-table-column
83
- :formatter =" dateFormatter2"
84
100
align =" center"
85
101
label =" 提醒日期"
86
102
prop =" remindTime"
87
103
width =" 180px"
104
+ :formatter =" dateFormatter2"
88
105
/>
89
- <el-table-column label =" 负责人" prop =" ownerUserName" width =" 120" />
106
+ <el-table-column align =" center" label =" 回款方式" prop =" returnType" width =" 130px" >
107
+ <template #default =" scope " >
108
+ <dict-tag :type =" DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE" :value =" scope.row.returnType" />
109
+ </template >
110
+ </el-table-column >
90
111
<el-table-column align =" center" label =" 备注" prop =" remark" />
112
+ <el-table-column label =" 负责人" prop =" ownerUserName" width =" 120" />
113
+ <el-table-column
114
+ align =" center"
115
+ label =" 实际回款金额(元)"
116
+ prop =" receivable.price"
117
+ width =" 160"
118
+ >
119
+ <template #default =" scope " >
120
+ <el-text v-if =" scope.row.receivable" >
121
+ {{ erpPriceInputFormatter(scope.row.receivable.price) }}
122
+ </el-text >
123
+ <el-text v-else >{{ erpPriceInputFormatter(0) }}</el-text >
124
+ </template >
125
+ </el-table-column >
126
+ <el-table-column
127
+ align =" center"
128
+ label =" 实际回款日期"
129
+ prop =" receivable.returnTime"
130
+ width =" 180px"
131
+ :formatter =" dateFormatter2"
132
+ />
133
+ <el-table-column
134
+ align =" center"
135
+ label =" 实际回款金额(元)"
136
+ prop =" receivable.price"
137
+ width =" 160"
138
+ >
139
+ <template #default =" scope " >
140
+ <el-text v-if =" scope.row.receivable" >
141
+ {{ erpPriceInputFormatter(scope.row.price - scope.row.receivable.price) }}
142
+ </el-text >
143
+ <el-text v-else >{{ erpPriceInputFormatter(scope.row.price) }}</el-text >
144
+ </template >
145
+ </el-table-column >
91
146
<el-table-column
92
147
align =" center"
93
148
fixed =" right"
99
154
<dict-tag :type =" DICT_TYPE.INFRA_BOOLEAN_STRING" :value =" scope.row.finishStatus" />
100
155
</template >
101
156
</el-table-column >
157
+ <el-table-column
158
+ :formatter =" dateFormatter"
159
+ align =" center"
160
+ label =" 更新时间"
161
+ prop =" updateTime"
162
+ width =" 180px"
163
+ />
164
+ <el-table-column
165
+ :formatter =" dateFormatter"
166
+ align =" center"
167
+ label =" 创建时间"
168
+ prop =" createTime"
169
+ width =" 180px"
170
+ />
171
+ <el-table-column align =" center" label =" 创建人" prop =" creatorName" width =" 100px" />
102
172
<el-table-column align =" center" fixed =" right" label =" 操作" width =" 130px" >
173
+ <!-- TODO @puhui999:新建回款 -->
103
174
<template #default =" scope " >
104
175
<el-button
105
176
v-hasPermi =" ['crm:receivable-plan:update']"
135
206
136
207
<script lang="ts" setup>
137
208
import { DICT_TYPE } from ' @/utils/dict'
138
- import { dateFormatter2 } from ' @/utils/formatTime'
209
+ import { dateFormatter , dateFormatter2 } from ' @/utils/formatTime'
139
210
import download from ' @/utils/download'
140
211
import * as ReceivablePlanApi from ' @/api/crm/receivable/plan'
141
212
import ReceivablePlanForm from ' ./ReceivablePlanForm.vue'
142
- import * as UserApi from ' @/api/system/user'
143
213
import * as CustomerApi from ' @/api/crm/customer'
214
+ import { erpPriceInputFormatter , erpPriceTableColumnFormatter } from ' @/utils'
144
215
145
216
defineOptions ({ name: ' ReceivablePlan' })
146
217
@@ -150,7 +221,6 @@ const { t } = useI18n() // 国际化
150
221
const loading = ref (true ) // 列表的加载中
151
222
const total = ref (0 ) // 列表的总页数
152
223
const list = ref ([]) // 列表的数据
153
- const userList = ref <UserApi .UserVO []>([]) // 用户列表
154
224
const queryParams = reactive ({
155
225
pageNo: 1 ,
156
226
pageSize: 10 ,
@@ -159,6 +229,7 @@ const queryParams = reactive({
159
229
})
160
230
const queryFormRef = ref () // 搜索的表单
161
231
const exportLoading = ref (false ) // 导出的加载中
232
+ const customerList = ref <CustomerApi .CustomerVO []>([]) // 客户列表
162
233
163
234
/** 查询列表 */
164
235
const getList = async () => {
@@ -217,12 +288,16 @@ const handleExport = async () => {
217
288
exportLoading .value = false
218
289
}
219
290
}
220
- const customerList = ref <CustomerApi .CustomerVO []>([]) // 客户列表
291
+
292
+ /** 打开客户详情 */
293
+ const { push } = useRouter ()
294
+ const openCustomerDetail = (id : number ) => {
295
+ push ({ name: ' CrmCustomerDetail' , params: { id } })
296
+ }
297
+
221
298
/** 初始化 **/
222
299
onMounted (async () => {
223
300
await getList ()
224
- // 获取用户列表
225
- userList .value = await UserApi .getSimpleUserList ()
226
301
// 获得客户列表
227
302
customerList .value = await CustomerApi .getCustomerSimpleList ()
228
303
})
0 commit comments