CommonLoanListModal.vue
15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<template>
<a-modal :title="title" :width="1000" :centered="false" :visible="visible" :footer="null" :confirmLoading="confirmLoading" @ok="handleSubmit" @cancel="handleCancel" cancelText :maskClosable="false" style="top:20px;" class="scope-loan">
<a-tabs defaultActiveKey="1" v-model="defaultTabKey" @change="callback" :animated="false">
<a-tab-pane tab="借款信息" key="1">
<a-spin :spinning="confirmLoading">
<a-card title="个人基本信息" :bordered="false" v-if="userType == 1">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="客户名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.idcardName}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证号码" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.idcardNoView}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.mobilePhoneView}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授信申请单号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.mobilePhoneView}}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="企业基本信息" :bordered="false" v-else-if="userType == 2">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="企业名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.enterpriseName}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="统一社会信用代码" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.orgCode}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="企业联系人" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.contactsName}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系人手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.contactsPhone}}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="企业法定代表人基本信息" :bordered="false" v-else-if="userType==3">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="客户名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.idcardName}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证号码" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.idcardNoView}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.mobilePhoneView}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.enterpriseName}}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="用信申请信息" :bordered="false">
<a-row :gutter="24" v-if="detailData.status!=31 && detailData.status!=21 ">
<a-button style="margin-bottom:10px;float:right;position:relative;z-index:10;" @click="handleRepaymentPlanTrial" type="primary">还款计划试算</a-button>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="借款订单号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.orderNo}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="申请时间" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.applyDate}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="申请金额(元)" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div class="c189 fw">{{this.$numMoney(detailData.applyMoney)}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="借款审批状态" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div class="c189" v-for="(item,index) in loanApplyStatusCode" :key="index" v-if="detailData.status==item.name">
{{item.title}}
</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="申请产品名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.productName}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="产品类型" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div v-for="(item,index) in dbProductType" :key="index" v-if="detailData.productType==item.name">{{item.title}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="账单期限" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.termType==2?detailData.term+' 个月':detailData.termType==1?detailData.term+' 天':detailData.term+' 年'}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="还款方式" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div v-for="(item,index) in dbRepaymentType" :key="index" v-if="detailData.repaymentType==item.name">{{item.title}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="还款日" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.repaymentDay?detailData.repaymentDay+' 日':''}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="产品利率(%)" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.interestRate}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="产品罚息利率(%)" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.penaltyRate}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务费用合计(元)" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.feeSum}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="资金方编号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.fundNo}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="资金方名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.fundName}}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="业务线信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="业务机构" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div v-for="(item,index) in programOffices" :key="index" v-if="detailData.businessDepartmentNo==item.name">{{item.title}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="业务名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div v-for="(item,index) in dbBusinessChannel" :key="index" v-if="detailData.businessChannelNo==item.name">{{item.title}}</div>
</a-form-item>
</a-col>
</a-row>
<!-- <a-row :gutter="24">
<a-col :span="12">
<a-form-item label="合作平台" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div v-for="(item,index) in dbCooPerationPlatform" :key="index" v-if="detailData.cooperationPlatformNo==item.name">{{item.title}}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="产品分类名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div v-for="(item,index) in dbProductCategory" :key="index" v-if="detailData.productCategoryNo==item.name">{{item.title}}</div>
</a-form-item>
</a-col>
</a-row> -->
</a-card>
</a-spin>
<repayment-plan-modal ref="repaymentPlanModal"></repayment-plan-modal>
<cost-detail-modal :userType.sync="userType" ref="costDetailModal"></cost-detail-modal>
</a-tab-pane>
<a-tab-pane tab="放款信息" key="2" forceRender>
<record-lending :userType.sync="userType" ref="lending" :orderNo.sync="orderNo">
</record-lending>
</a-tab-pane>
<a-tab-pane tab="还款计划" key="3" forceRender>
<repayment-plan :userType.sync="userType" ref="repaymentPlan" :orderNo.sync="orderNo">
</repayment-plan>
</a-tab-pane>
</a-tabs>
</a-modal>
</template>
<script>
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { queryChargeList, onceInterestRepaymentCalculation, repaymentPlanCalculation } from '@/api/makeLoan'
import repaymentPlanModal from './common/repaymentPlanModal' // 还款计划试算
import recordLending from './common/recordLending'// tab切换 放款信息
import costDetailModal from './common/costDetailModal' // 费用详细查看
import repaymentPlan from './common/repaymentPlan' // 还款计划
export default {
name: 'CommonLoanListModal',
mixins: [JeecgListMixin],
components: {
repaymentPlanModal, // 还款计划试算
recordLending, // 放款信息
costDetailModal, // 费用详细查看
repaymentPlan, // 还款计划
},
data () {
return {
visible: false,
confirmLoading: false,
title: '',
disableSubmit: false,
orderNo: '',
defaultTabKey: '',
userType: '',
programOffices: JSON.parse(sessionStorage.getItem('PROGRAMOFFICES')), // 组织机构
dbBusinessChannel: JSON.parse(sessionStorage.getItem('DB_BUSINESS_CHANNEL')), // 业务线名称
dbCooPerationPlatform: JSON.parse(sessionStorage.getItem('DB_COOPERATION_PLATFORM')), // 合作平台
dbProductCategory: JSON.parse(sessionStorage.getItem('DB_PRODUCT_CATEGORY')), // 产品分类
loanApplyStatusCode: JSON.parse(sessionStorage.getItem('LOAN_APPLY_STATUS_CODE')), // 借款审批状态
dbProductType: JSON.parse(sessionStorage.getItem('DB_PRODUCT_TYPE')), // 产品类型
dbRepaymentType: JSON.parse(sessionStorage.getItem('DB_REPAYMENT_TYPE')), // 还款方式
model: {},
detailData: {},
collPersonalApply: {}, // 进件信息
collCusBasicInfo: {}, // 个人基本信息
collCusContactInfoList: [], // 联系人信息
collCusBankAccountList: [], // 银行账户信息
collCusExtAttachmentList: {}, // 自定义附件信息
collCusExtObjDataList: {}, // 自定义文本信息
collCreditStatusList: {}, // 认证状态信息
form: this.$form.createForm(this),
disableMixinCreated: true,
}
},
methods: {
edit (res, orderNo, userType) {
this.userType = userType
console.log(this.loanApplyStatusCode)
this.defaultTabKey = '1'
this.detailData = res
this.assignment(res)
this.orderNo = orderNo
this.form.resetFields()
this.visible = true
this.$nextTick(() => { })
},
add () {
this.model = {}
this.form.resetFields()
this.visible = true
this.$nextTick(() => { })
},
close () {
this.$emit('close')
this.visible = false
this.disableSubmit = false
this.selectedRole = []
},
handleCancel () {
this.close()
},
handleSubmit () {
},
// tabs 回调
callback (key) {
if (key == 2) {
this.$refs.lending.loadData()
} else if (key == 3) {
this.$refs.repaymentPlan.loadData()
}
},
assignment (res) {
this.model = res ? res : {}
this.collPersonalApply = this.model.collPersonalApply
this.collCusBasicInfo = this.model.collCusBasicInfo
this.collCusContactInfoList = this.model.collCusContactInfoList
this.collCusBankAccountList = this.model.collCusBankAccountList
this.collCusExtAttachmentList = this.model.collCusExtAttachmentList
this.collCusExtObjDataList = this.model.collCusExtObjDataList
this.collCreditStatusList = this.model.collCreditStatusList
},
handleRepaymentPlanTrial () { // 还款计划试算
console.log(this.detailData.productVersion)
let _p = {
"productNo": this.detailData.productNo,
'loanMoney': this.detailData.applyMoney,
'version': this.detailData.productVersion
}
console.log(_p)
if (this.detailData.productType == 1) { //产品类型 1 非分期 2分期
onceInterestRepaymentCalculation(_p).then(res => {
if (res.status.statusCode == 0) {
this.$refs.repaymentPlanModal.edit(res.result, 1)
this.$refs.repaymentPlanModal.disableSubmit = true
} else {
this.$message.warning(res.status.statusReason)
}
})
} else {
repaymentPlanCalculation(_p).then(res => {
if (res.status.statusCode == 0) {
this.$refs.repaymentPlanModal.edit(res.result.repaymentPlanList, 2)
this.$refs.repaymentPlanModal.disableSubmit = true
} else {
this.$message.warning(res.status.statusReason)
}
})
}
},
costDetailLook () { // 费用详细查看
let _p = { "orderNo": this.orderNo }
queryChargeList(_p).then(res => {
if (res.status.statusCode == 0) {
this.$refs.costDetailModal.edit(res.result)
this.$refs.costDetailModal.disableSubmit = true
} else {
this.$message.warning(res.status.statusReason)
}
})
},
}
}
</script>
<style>
.scope-loan .ant-form-item {
margin-bottom: 12px;
}
.scope-loan .ant-card-body {
padding: 20px 24px 0;
}
.scope-loan .c189 {
color: #1890ff;
}
.scope-loan .fw {
font-weight: bold;
}
</style>