Browse Source

个人用户实名认证关联修改

main
TonyStark 2 months ago
parent
commit
016547f52b
  1. 18
      src/api/business/userVerification.js
  2. 106
      src/views/business/userVerification/index.vue

18
src/api/business/userVerification.js

@ -42,3 +42,21 @@ export function delUserVerification(id) {
method: 'delete'
})
}
// 实名认证不通过
export function auditRefuse(data) {
return request({
url: '/business/userVerification/auditRefuse' ,
method: 'post',
data:data
})
}
// 实名认证通过
export function auditPass(data) {
return request({
url: '/business/userVerification/auditPass' ,
method: 'post',
data:data
})
}

106
src/views/business/userVerification/index.vue

@ -83,7 +83,14 @@
<el-table-column label="姓名" align="center" prop="userInfoName" />
<el-table-column label="身份证号" align="center" prop="idCard" />
<el-table-column label="国籍简码" align="center" prop="nationality" />
<el-table-column label="认证状态" align="center" prop="status" />
<el-table-column label="认证状态" align="center" prop="status" >
<template slot-scope="scope">
<el-tag type="primary" v-if="scope.row.status == '0'">未认证</el-tag>
<el-tag type="success" v-if="scope.row.status == '1'">认证通过</el-tag>
<el-tag type="danger" v-if="scope.row.status == '2'">认证失败</el-tag>
<el-tag type="warning" v-if="scope.row.status == '3'">待审核</el-tag>
</template>
</el-table-column>
<el-table-column label="认证时间" align="center" prop="authenticationDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.authenticationDate, '{y}-{m}-{d}') }}</span>
@ -104,6 +111,12 @@
icon="el-icon-view"
@click="handleDetail(scope.row)"
>详情</el-button>
<el-button v-if="(scope.row.status == 3)"
size="mini"
type="text"
icon="el-icon-view"
@click="handleAudit(scope.row)"
>审核</el-button>
<el-button
size="mini"
type="text"
@ -166,6 +179,46 @@
</div>
</el-dialog>
<!-- 实名审核 -->
<el-dialog :title="title" :visible.sync="auditOpen" width="700px" append-to-body>
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="auto">
<el-form-item label="注册姓名:">
{{auditForm.userInfoName}}
</el-form-item>
<el-form-item label="认证姓名:">
{{auditForm.fullName}}
</el-form-item>
<el-form-item label="注册身份证号:">
{{auditForm.idCardShow}}
</el-form-item>
<el-form-item label="认证身份证号:">
{{auditForm.idCardNumber}}
</el-form-item>
<el-form-item label="国籍简码:">
{{auditForm.nationality}}
</el-form-item>
<el-form-item label="出生日期:">
{{ auditForm.birthDate ? auditForm.birthDate.substring(0, 9) : '' }}
</el-form-item>
<el-form-item label="身份证正面照:">
{{auditForm.idCardFrontImagePath}}
</el-form-item>
<el-form-item label="身份证反面照:">
{{auditForm.idCardBackImagePath}}
</el-form-item>
<el-form-item label="手持身份证照:">
{{auditForm.userWithIdCardImagePath}}
</el-form-item>
<el-form-item label="认证失败原因:" prop="auditFailureReason">
<el-input v-model="auditForm.failureReason" placeholder="请输入认证失败原因" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="success" @click="submitPass"> </el-button>
<el-button :loading="buttonLoading" type="danger" @click="submitRefuse"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 实名认证详情 -->
<el-dialog :title="title" :visible.sync="detailOpen" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="auto">
@ -221,7 +274,7 @@
</template>
<script>
import { listUserVerification, getUserVerification, delUserVerification, addUserVerification, updateUserVerification } from "@/api/business/userVerification";
import { listUserVerification, getUserVerification, delUserVerification, addUserVerification, updateUserVerification, auditRefuse, auditPass } from "@/api/business/userVerification";
export default {
name: "UserVerification",
@ -249,6 +302,8 @@ export default {
open: false,
//
detailOpen: false,
//
auditOpen: false,
//
queryParams: {
pageNum: 1,
@ -269,6 +324,8 @@ export default {
},
//
form: {},
//
auditForm: {},
//
rules: {
idCardNumber: [
@ -292,8 +349,8 @@ export default {
userWithIdCardImagePath: [
{ required: true, message: "手持身份证照不能为空", trigger: "blur" }
],
biometrics: [
{ required: true, message: "生物识别信息不能为空", trigger: "blur" }
failureReason: [
{ required: true, message: "审核失败原因不能为空", trigger: "blur" }
],
}
};
@ -315,6 +372,7 @@ export default {
cancel() {
this.open = false;
this.detailOpen = false;
this.auditOpen = false;
this.reset();
},
//
@ -361,9 +419,15 @@ export default {
/** 新增按钮操作 */
handleAdd(row) {
this.reset();
if (row.id != null){
this.form = row;
this.open = true;
this.title = "实名认证";
}else {
this.form.userId = row.userId;
this.open = true;
this.title = "添加实名认证";
this.title = "实名认证";
}
},
/** 详情按钮操作 */
handleDetail(row){
@ -372,6 +436,13 @@ export default {
this.detailOpen = true;
this.title = "实名认证";
},
/** 审核按钮操作 */
handleAudit(row){
this.reset();
this.auditForm = row;
this.auditOpen = true;
this.title = "实名认证审核";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
@ -429,7 +500,32 @@ export default {
this.download('business/userVerification/export', {
...this.queryParams
}, `userVerification_${new Date().getTime()}.xlsx`)
},
/** 审核拒绝*/
submitRefuse() {
this.$refs["auditForm"].validate(valid => {
if (valid) {
this.buttonLoading = true;
auditRefuse(this.auditForm).then(response => {
this.$modal.msgSuccess("审核结果:拒绝");
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
});
},
submitPass() {
this.buttonLoading = true;
auditPass(this.auditForm).then(response => {
this.$modal.msgSuccess("审核结果:通过");
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
},
}
};
</script>

Loading…
Cancel
Save