commonRiskModal2.vue
11.4 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
367
368
369
370
371
372
373
374
375
376
377
378
379
<template>
<a-modal
title="授信审批风控报告"
:width="1200"
:centered="false"
:visible="visible"
@cancel="handleCancel"
:confirmLoading="confirmLoading"
:footer="null"
cancelText="关闭"
:maskClosable="false"
style="top: 40px"
class="scope-link-man"
>
<a-spin :spinning="confirmLoading">
<div class="labelBox" v-if="data.applyCreditType == 1">
<div>
<p>申请时间</p>
<p>{{ data.applyTime }}</p>
</div>
<div>
<p>申请产品</p>
<p>{{ data.applyProductCode }}</p>
</div>
<div>
<p>风控类型</p>
<p v-if="data.applyCreditType == 1">准入</p>
<p v-else-if="data.applyCreditType == 2">授信</p>
</div>
<div>
<p>风控结果</p>
<p v-if="data.applyStatus == 'PASS'">通过</p>
<p v-else-if="data.applyStatus == 'REFUSE'">拒绝</p>
<p v-else-if="data.applyStatus == 'MANUAL'">转人工</p>
</div>
</div>
<div class="labelBox" v-if="data.applyCreditType == 2">
<div>
<p>信用评分</p>
<p>{{ data.creditScore }}</p>
</div>
<div>
<p>个人评级</p>
<p>{{ data.createLevel }}</p>
</div>
<div>
<p>申请时间</p>
<p>{{ data.applyTime }}</p>
</div>
<div>
<p>申请产品</p>
<p>{{ data.applyProductCode }}</p>
</div>
<div>
<p>风控类型</p>
<p v-if="data.applyCreditType == 1">准入</p>
<p v-else-if="data.applyCreditType == 2">授信</p>
</div>
<div>
<p>申请额度(元)</p>
<p>{{ data.applyAmount }}</p>
</div>
<div>
<p>建议额度(元)</p>
<p>{{ data.resultAmount }}</p>
</div>
</div>
<a-card title="客户基本信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="企业名称" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.entName }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="统一社会信用代码" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.creditCode }}</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>{{ data.operatorPhone }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="经办人手机号" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.phone }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="经办人名称" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.name }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="经办人身份证号码" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.idCard }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系地址" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.contactAddress }}</div>
</a-form-item>
</a-col>
</a-row>
<div class="imgBox">
<div>
<p>营业执照</p>
<img :src="data.businessLicense" width="200px" />
</div>
<div>
<p>经办人身份证正面照片</p>
<img :src="data.idCardFront" width="200px" />
</div>
<div>
<p>经办人身份证反面照片</p>
<img :src="data.idCardReverse" width="200px" />
</div>
</div>
</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>{{ data.controlName }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="实控人身份证号码" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div>{{ data.controlIdCard }}</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>{{ data.controlPhone }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="学历" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div v-if="data.education == 0">研究生</div>
<div v-if="data.education == 1">大学本科</div>
<div v-if="data.education == 2">大学专科</div>
<div v-if="data.education == 3">高中</div>
<div v-if="data.education == 4">技术学校/中等专业学校/中等技术学校</div>
<div v-if="data.education == 5">初中</div>
<div v-if="data.education == 6">小学</div>
<div v-if="data.education == 7">文盲/半文盲</div>
<div v-if="data.education == 8">其他</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="婚姻状况" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<div v-if="data.maritalStatus == 0">未婚</div>
<div v-if="data.maritalStatus == 1">已婚</div>
<div v-if="data.maritalStatus == 2">丧偶</div>
<div v-if="data.maritalStatus == 3">离异</div>
<div v-if="data.maritalStatus == 4">其他</div>
<div v-if="data.maritalStatus == 5">未说明</div>
</a-form-item>
</a-col>
</a-row>
<!-- <div class="imgBox">
<div>
<p>实控人身份证正面照片</p>
<img :src="data.idCardFront" width="200px" />
</div>
<div>
<p>实控人身份证反面照片</p>
<img :src="data.idCardReverse" width="200px" />
</div>
</div> -->
</a-card>
<a-card title="规则状态" :bordered="false">
<a-table
ref="table"
size="middle"
:bordered="false"
:columns="riskData"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowKey="(record) => record.id"
@change="handleTableChange"
style="margin-bottom: 20px"
>
<span slot="rule" slot-scope="text, record">
{{ record.targetBaseName }} {{ record.judge }} {{ record.threshold }}
</span>
<template slot="hit" slot-scope="text, record">
<div v-if="record.execType == 1">{{ record.score }}分</div>
<div v-if="record.execType == 0">
<span v-if="record.hit == 0">未命中</span>
<span v-else style="color: rgb(255, 77, 79)">命中</span>
</div>
</template>
</a-table>
</a-card>
</a-spin>
</a-modal>
</template>
<script>
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { ossDownloadFile } from '@/api/configApi'
export default {
name: 'commonBankAccountTable2',
mixins: [JeecgListMixin],
data() {
return {
title: '',
confirmLoading: false,
visible: false,
riskNode: '',
model: [],
data: {},
riskData: [
{
title: '策略节点',
align: 'center',
width: '100px',
dataIndex: 'groupName',
customRender: this.changeRowSpan,
},
{
title: '规则',
dataIndex: 'rule',
scopedSlots: { customRender: 'rule' },
align: 'center',
width: 400,
},
{
title: '取值',
align: 'center',
dataIndex: 'targetValue',
},
{
title: '结果',
align: 'center',
dataIndex: 'hit',
scopedSlots: { customRender: 'hit' },
},
],
dataSource: [],
}
},
created() {},
methods: {
edit(res) {
this.data = res
this.dataSource = res.strategyRuleItemResult
var totalArr = []
var arr = []
this.dataSource.forEach((item, index) => {
arr.push(item)
if (
(this.dataSource[index + 1] && item.groupName !== this.dataSource[index + 1].groupName) ||
!this.dataSource[index + 1]
) {
arr.forEach((it, ind) => {
if (ind === 0) {
it.rowSpan = arr.length
} else {
it.rowSpan = 0
}
})
totalArr.push(...arr)
arr = []
}
})
this.dataSource = totalArr
let p = {
fileIdentifyingCode: res.businessLicense,
expire: 10000,
}
let t = {
fileIdentifyingCode: res.idCardFront,
expire: 10000,
}
let y = {
fileIdentifyingCode: res.idCardReverse,
expire: 10000,
}
ossDownloadFile(p).then((res) => {
if (res.status.statusCode == 0) {
this.data.businessLicense = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
ossDownloadFile(t).then((res) => {
if (res.status.statusCode == 0) {
this.data.idCardFront = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
ossDownloadFile(y).then((res) => {
if (res.status.statusCode == 0) {
this.data.idCardReverse = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
this.visible = true
},
changeRowSpan(value, row, index) {
return {
children: value,
attrs: {
rowSpan: row.rowSpan,
},
}
},
close() {
this.$emit('close')
this.visible = false
},
handleCancel() {
this.close()
},
selectUserHierarchy(key) {
this.riskNode = key
this.dataSource = []
this.keyFindVal()
},
// 返回数据处理
objForEach(obj) {
this.model = []
Object.keys(obj).forEach((key) => {
this.model.push(obj[key])
this.selectData.push(key)
})
this.selectData.map((v) => {
this.riskNode = this.selectData[0] // 默认选择第一个
})
},
keyFindVal() {
this.dataSource = []
// 根据key找val
this.model.map((v) => {
v.map((v1) => {
if (this.riskNode == v1.nodeName) {
this.dataSource.push(v1)
}
})
})
},
},
}
</script>
<style>
.labelBox {
display: flex;
justify-content: space-around;
text-align: center;
width: 100%;
}
.labelBox div p:nth-child(1) {
font-size: 15px;
font-weight: 600;
}
.imgBox {
display: flex;
justify-content: space-around;
text-align: center;
width: 100%;
}
.gBox {
display: flex;
justify-content: space-between;
}
</style>