jhzh
2026-01-04 68079a248b6d552c5fc7c2feb64ba035d8994896
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
<template>
    <div>
        <a-modal title="实名认证审核" :width="1000" :visible="userDialog" :footer="false" @cancel="userDialog = false">
            <a-descriptions bordered :title="currentDetails.realName ? currentDetails.realName : '未认证'"
                :column="{ xxl: 3, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
                <a-descriptions-item label="真实姓名">
                    {{ currentDetails.realName ? currentDetails.realName : '--' }}
                </a-descriptions-item>
                <a-descriptions-item label="认证状态">
                    <a-tag
                        :color="(currentDetails.isActive == 0 || currentDetails.isActive == 1) ? 'blue' : currentDetails.isActive == 2 ? 'green' : 'red'">
                        {{ currentDetails.isActive == 0 ? '待认证' : currentDetails.isActive == 1 ? '待审核' :
                                currentDetails.isActive == 2 ? '认证成功' : '驳回'
                        }}
                    </a-tag>
                </a-descriptions-item>
                <a-descriptions-item label="驳回原因" v-if="currentDetails.isActive == 3">
                    {{ currentDetails.authMsg ? currentDetails.authMsg : '--' }}
                </a-descriptions-item>
                <a-descriptions-item label="身份证号码">
                    {{ currentDetails.idCard ? currentDetails.idCard : '--' }}
                </a-descriptions-item>
                <a-descriptions-item label="注册ip">
                    {{ currentDetails.regIp ? currentDetails.regIp : '--' }}
                </a-descriptions-item>
                <a-descriptions-item label="注册地址">
                    {{ currentDetails.regAddress ? currentDetails.regAddress : '--' }}
                </a-descriptions-item>
                <a-descriptions-item label="注册时间">
                    {{ currentDetails.regTime | moment }}
                </a-descriptions-item>
                <a-descriptions-item label="身份证正面">
                    <img :src="currentDetails.img2Key" alt="" style="width:140px;height: 70px;">
                </a-descriptions-item>
                <a-descriptions-item label="身份证背面">
                    <img :src="currentDetails.img1Key" alt="" style="width:140px;height: 70px;">
                </a-descriptions-item>
                <a-descriptions-item label="手持身份证">
                    <img :src="currentDetails.img3Key" alt="" style="width:140px;height: 70px;">
                </a-descriptions-item>
            </a-descriptions>
            <div style="margin-top:20px;display:flex;justify-content: center;" v-show="currentDetails.isActive == 0 || currentDetails.isActive == 1">
                <a-button type="danger" @click="userDialog = false;bohuidialog = true">
                    驳回
                </a-button>
                <a-button type="primary" style="margin-left:10px;" @click="gettongguo(2)">
                    通过
                </a-button>
            </div>
        </a-modal>
        <a-modal title="驳回原因" :width="500" :visible="bohuidialog" :confirmLoading="bohuidialogloading"
            @ok="Okbohuidialog" @cancel="Cancelbohuidialog">
            <a-form :form="bohuiform" ref="bohuiform">
                <a-form-item>
                    <a-input placeholder="请输入驳回原因"
                        v-decorator="['authMsg', { rules: [{ required: true, message: '请输入驳回原因', }] }]" />
                </a-form-item>
            </a-form>
        </a-modal>
    </div>
</template>
<script>
import { userauthByAdmin } from '@/api/home'
export default {
    components: {},
    props: {
        currentDetails: {
            type: Object,
        },
        getinit: {
            type: Function,
            default: function () {
            }
        },
    },
    data() {
        return {
            userDialog: false,
            bohuidialog: false,
            bohuidialogloading: false,
            bohuiform: this.$form.createForm(this),
        }
    },
    methods: {
        Okbohuidialog() {
            const form = this.$refs.bohuiform.form
            form.validateFields((errors, values) => {
                if (!errors) {
                    values.userId = this.currentDetails.id
                    values.state = 3
                    this.bohuidialogloading = true
                    userauthByAdmin(values).then(res => {
                        if (res.status == 0) {
                            this.bohuidialog = false
                            this.$message.success({ content: res.msg, duration: 2 });
                            form.resetFields()
                            this.getinit()
                        } else {
                            this.$message.error({ content: res.msg });
                        }
                        this.bohuidialogloading = false
                    })
                }
            })
        },
        Cancelbohuidialog() {
            this.bohuidialog = false
            const form = this.$refs.bohuiform.form
            form.resetFields()
        },
        gettongguo(val) {
            var data = {
                userId: this.currentDetails.id,
                state: val,
            }
            userauthByAdmin(data).then(res => {
                if (res.status == 0) {
                    this.userDialog = false
                    this.getinit()
                } else {
                    this.$message.error({ content: res.msg });
                }
                this.userDialog = false
            })
        }
    }
}
</script>