realNameAuditDialog.vue
9.61 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
<template>
<div class="dialogSty">
<el-dialog
:title="dialogParam.title"
:visible.sync="dialogParam.dialogVisible"
width="60%"
@close="handleClose('dialogForm')">
<el-row >
<el-col :span="24">
<el-divider content-position="left">个人身份证正信息</el-divider>
<el-col :span="24">
<el-image
v-for="(item,index) of cardImgList"
style="width: 100px; height: 100px; margin-right: 10px;"
:src="item"
:key="index"
:preview-src-list="cardImgList">
</el-image>
</el-col>
</el-col>
<el-col :span="24" v-if="dialogParam.dialogType == '非居民'">
<el-divider content-position="left">企业信息</el-divider>
<el-col :span="24">
<el-image
v-for="(item,index) of enterpriseImgList"
style="width: 100px; height: 100px; margin-right: 10px;"
:src="item"
:key="index"
:preview-src-list="enterpriseImgList">
</el-image>
</el-col>
</el-col>
<el-col :span="24">
<el-divider content-position="left">认证信息</el-divider>
<el-col v-if = "dialogParam.dialogType == '非居民'" :span="24" v-for="(item,index) in nonResidentInfoList1" :key="'gas'+index">
<el-col :span="12" v-for="(bitem,index) in item" :key="bitem.name" style="margin-bottom: 5px;">
<div class="info-div" >
<div class="item-name-sty">
{{bitem.name}}:
</div>
<div class="info-span" style="flex: 1;padding-left: 5px;font-size: 14px;">{{bitem.value}}</div>
</div>
</el-col>
</el-col>
<el-col v-if = "dialogParam.dialogType == '居民'" :span="24" v-for="(item,index) in residentInfoList1" :key="'resident'+index">
<el-col :span="12" v-for="(bitem,index) in item" :key="bitem.name" style="margin-bottom: 5px;">
<div class="info-div">
<div class="item-name-sty">
{{bitem.name}}:
</div>
<div class="info-span" style="flex: 1;padding-left: 5px;font-size: 14px;">{{bitem.value}}</div>
</div>
</el-col>
</el-col>
</el-col>
<el-col :span="24">
<el-divider content-position="left">认证审核意见</el-divider>
<el-form :model="dialogForm" ref="dialogForm" :rules="dialogFormRules" label-width="90px">
<el-col :span="24">
<el-form-item label="审核状态:" prop="fRzzt">
<el-radio-group v-model="dialogForm.fRzzt">
<el-radio :label="'yrz'">已认证</el-radio>
<el-radio :label="'rzwtg'">认证未通过</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="理由:">
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="dialogForm.reason">
</el-input>
</el-form-item>
</el-col>
</el-form>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose('dialogForm')">取 消</el-button>
<el-button type="primary" @click="handleSubmit('dialogForm')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { realNameDetailInfoPort,submitRealNameAuditPort } from '@/api/realNameAudit'
export default {
name: "realNameAuditDialog",
data(){
return{
rowData:{},
dialogForm:{
fRzzt:'yrz',
reason:''
},
dialogFormRules:{
fRzzt:[
{ required:true,message:'请勾选审核意见'}
]
},
cardImgList:[],
enterpriseImgList:[],
nonResidentInfoList1:[],
nonResidentInfoList: [
{
name: '经营者姓名',
value: '张三',
key:'fXm'
},
{
name: '经营者联系电话',
value:'17382982323',
key:'fSjh',
},
{
name: '经营者性别',
value:'女',
key:'fXb',
},
{
name: '经营者年龄',
value: '12',
key:'fNl'
},
{
name: '经营者身份证号',
value:'121243434',
key:'fSfzh',
},
{
name: '身份证有效期',
value: '十五年',
key:'fSfzhyxq'
},
{
name: '共/商业名称',
value: '323023',
key:'fSymc'
},
{
name: '统一社会信用代码(纳税人识别号)',
value:'12121',
key:'fShtysbm',
}
],
residentInfoList1:[],
residentInfoList: [
{
name: '姓名',
value: '张三',
key:'fXm'
},
{
name: '联系电话',
value:'17382982323',
key:'fSjh',
},
{
name: '性别',
value:'女',
key:'fXb',
},
{
name: '年龄',
value: '12',
key:'fNl'
},
{
name: '身份证号',
value:'121243434',
key:'fSfzh',
},
{
name: '身份证有效期',
value: '十五年',
key:'fSfzhyxq'
}
],
dialogParam:{
dialogVisible:false,
title:'居民身份认证审核',
dialogType:'非居民'
}
}
},
methods:{
open(row) {
console.log('打印详情部分row===>',row)
this.rowData ={
...row
}
this.dialogForm.fRzzt = 'yrz';
this.dialogForm.reason = '';
this.dialogParam.dialogVisible= true;
this.dialogParam.dialogType = row.whyxxfhylx;
this.getInfoDataList();
},
async getInfoDataList(){
await realNameDetailInfoPort(this.rowData.id_).then(async (res)=>{
console.log('打印res',res);
const { value } = res;
let cardImgUrlList = [];
if(value.fSfzghy){
let sfzghImg = JSON.parse(value.fSfzghy);
let sfzghImgUrl = await this.$getPhotoUrl(sfzghImg[0].response.fileId);
cardImgUrlList.push(sfzghImgUrl);
console.log('打印sfzghImg',sfzghImg,sfzghImgUrl);
}
if(value.fSfzrxy){
let sfzrxImg = JSON.parse(value.fSfzrxy);
let sfzrxImgUrl = await this.$getPhotoUrl(sfzrxImg[0].response.fileId);
cardImgUrlList.push(sfzrxImgUrl);
console.log('打印sfzghImg',sfzrxImg,sfzrxImgUrl);
}
this.cardImgList = cardImgUrlList;
if(this.rowData.whyxxfhylx == '居民'){
this.residentInfoList = await this.$assignValues(value, this.residentInfoList);
this.residentInfoList1 = await this.$createDoubleArray(this.residentInfoList,2);
}else{
let enterpriseImgUrlList = [];
if(value.fYyzz){
let yyzzImg = JSON.parse(value.fYyzz);
let yyzzImgUrl = await this.$getPhotoUrl(yyzzImg[0].response.fileId);
enterpriseImgUrlList.push(yyzzImgUrl);
console.log('打印sfzghImg',yyzzImg,yyzzImgUrl);
}
if(value.fKhxkz){
let khxkzImg = JSON.parse(value.fKhxkz);
let khxkzImgUrl = await this.$getPhotoUrl(khxkzImg[0].response.fileId);
enterpriseImgUrlList.push(khxkzImgUrl);
console.log('打印sfzghImg',khxkzImg,khxkzImgUrl);
}
if(value.fFrsfzrxy){
let frsfzrxImg = JSON.parse(value.fFrsfzrxy);
let frsfzrxImgUrl = await this.$getPhotoUrl(frsfzrxImg[0].response.fileId);
enterpriseImgUrlList.push(frsfzrxImgUrl);
console.log('打印sfzghImg',frsfzrxImgUrl,frsfzrxImg);
}
if(value.fFrsfzghy){
let frsfzghImg = JSON.parse(value.fFrsfzghy);
let frsfzghImgUrl = await this.$getPhotoUrl(frsfzghImg[0].response.fileId);
enterpriseImgUrlList.push(frsfzghImgUrl);
console.log('打印sfzghImg',frsfzghImg,frsfzghImgUrl);
}
this.enterpriseImgList = enterpriseImgUrlList;
this.nonResidentInfoList = await this.$assignValues(value, this.nonResidentInfoList);
this.nonResidentInfoList1 = await this.$createDoubleArray(this.nonResidentInfoList,2);
}
});
},
//关闭弹窗的事件
handleClose(formName){
this.$refs[formName].resetFields();
this.dialogParam.dialogVisible = false
},
//确定提交弹窗的事件
async handleSubmit(formName){
this.$refs[formName].validate(async(valid) => {
if (valid) {
let params = {
id:this.rowData.id_,
fRzzt:this.dialogForm.fRzzt,
}
await submitRealNameAuditPort(params).then((res)=>{
console.log('打印实名认证审核提交',res);
if(res.code == 200){
this.$message.success('审核成功!')
}
this.$emit('handleRefresh');
})
} else {
console.log('error submit!!');
return false;
}
});
this.dialogParam.dialogVisible = false;
},
}
}
</script>
<style lang="scss" scoped>
.dialogSty{
::v-deep.el-dialog__body{
padding: 20px!important;
padding-top: 0px!important;
}
.info-div{
display: flex;
align-items: center;
.item-name-sty{
color: #333333;
font-size: 16px;
}
}
}
</style>