CommonBillListModal.vue
11.8 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
<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="titleName" key="1">
<a-spin :spinning="confirmLoading">
<a-card title="客户信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item v-if="userType == 1 || userType == 3" label="客户名称" :labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }">
<div>{{ detailData.idCardName }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item v-if="userType == 1 || userType == 3" label="身份证号码" :labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }">
<div>{{ detailData.idCardNoView }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item v-if="userType == 1 || userType == 3" label="客户手机号" :labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }">
<div>{{ detailData.mobilePhoneView }}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item v-if="userType == 2 || userType == 3" label="企业名称" :labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }">
<div>{{ detailData.enterpriseName }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item v-if="userType == 2 || userType == 3" label="统一社会信用代码" :labelCol="{ span: 10 }"
:wrapperCol="{ span: 14 }">
<div>{{ detailData.orgCode }}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<div v-if="billType == 10">
<!-- 借款 -->
<a-card title="账单信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="账单编号" :labelCol="{ span: 6 }" :wrapperCol="{ span: 18 }">
<div>{{ detailData.billNo }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="产品名称" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ detailData.productName }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="还款状态" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div class="c189" v-for="(item, index) in dbShowPayStatus" :key="index"
v-if="detailData.repaymentStatus == item.name || detailData.viewPayStatus == item.name">
{{ item.title }}
</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="应还款总额(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.dueSumMoney) }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="应还款日期" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ detailData.planTime ? detailData.planTime.slice(0, 10) : '' }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="逾期天数" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ detailData.overDueDay }}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="应还本金(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.userPlanPrincipalMoney) }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="应还利息(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ this.$numMoney(detailData.userPlanInterestMoney) }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="应还罚息(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ this.$numMoney(detailData.userPlanPenaltyMoney) }}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="" :bordered="true">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="已还款总额(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.userActualSumMoney) }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="已还款本金(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.userActualPrincipalMoney) }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="已还款利息(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.userActualInterestMoney) }}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="已还款罚息(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>
{{ this.$numMoney(detailData.userActualPenaltyMoney) }}
</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="" :bordered="false">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="剩余应还本金(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>
{{ this.$numMoney(detailData.userDuePrincipalMoney) }}
</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="剩余应还利息(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.userDueInterestMoney) }}
</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="剩余应还罚息(元)" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
<div>{{ this.$numMoney(detailData.userDuePenaltyMoney) }}
</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
</div>
<!-- 费用 -->
<a-card v-else title="账单信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="子账单编号" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ detailData.billNo }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="产品名称" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ detailData.productName }}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="还款状态" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div class="c189" v-for="(item, index) in dbShowPayStatus" :key="index"
v-if="detailData.repaymentStatus == item.name || detailData.viewPayStatus == item.name">
{{ item.title }}
</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="应还费用(元)" :labelCol="{span:8}" :wrapperCol="{span:14}">
<div>{{detailData.dueSumMoney}}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="应还款日期" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.planTime?detailData.planTime.slice(0,10):''}}</div>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="逾期天数" :labelCol="{span:8}" :wrapperCol="{span:16}">
<div>{{detailData.overDueDay}}</div>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-spin>
</a-tab-pane>
<a-tab-pane tab="还款信息" key="2" forceRender>
<repay-msg :userType.sync="userType" ref="msg" :billNo.sync="billNo">
</repay-msg>
</a-tab-pane>
<!-- <a-tab-pane tab="回购信息" key="3" forceRender>
<back-msg :userType.sync="userType" ref="backMsg" :billNo.sync="billNo">
</back-msg>
</a-tab-pane> -->
</a-tabs>
</a-modal>
</template>
<script>
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { queryChargeList } from '@/api/makeLoan'
import repayMsg from './common/repayMsg'// tab切换 放款信息
import backMsg from './common/backMsg' // 还款计划
export default {
name: 'CommonBillListModal',
mixins: [JeecgListMixin],
components: {
repayMsg, // 放款信息
backMsg, // 还款计划
},
data() {
return {
visible: false,
confirmLoading: false,
title: '',
disableSubmit: false,
billNo: '',
defaultTabKey: '',
userType: '',
titleName: '',
billType: '', // 1 借款 2 费用
dbShowPayStatus: JSON.parse(sessionStorage.getItem('DB_SHOW_PAY_STATUS')), // 还款状态
dbBillType: JSON.parse(sessionStorage.getItem('DB_BILL_TYPE')), // 账单类型
model: {},
detailData: {},
form: this.$form.createForm(this),
disableMixinCreated: true,
}
},
methods: {
edit(res, billType, billNo, userType) {
console.log(res)
billType == 10 ? this.titleName = '账单信息(借款)' : this.titleName = '账单信息(费用)'
// 账单类型:10借款账单、20服务费账单、30借款服务费账单
this.billType = billType
this.userType = userType
this.defaultTabKey = '1'
this.detailData = res
this.billNo = billNo
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.msg.loadData()
} else if (key == 3) {
this.$refs.backMsg.loadData()
}
},
}
}
</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>