fix:kyc审核界面中英适配
This commit is contained in:
@@ -777,6 +777,39 @@ const local: any = {
|
|||||||
search:'Search',
|
search:'Search',
|
||||||
reset:'Reset',
|
reset:'Reset',
|
||||||
},
|
},
|
||||||
|
kyc:{
|
||||||
|
title:'KYC Authentication Review',
|
||||||
|
total:'Total',
|
||||||
|
pass:'Pass',
|
||||||
|
refuse:'Refuse',
|
||||||
|
verified:'Verified',
|
||||||
|
pending:'Pending',
|
||||||
|
approved:'Approved',
|
||||||
|
rejected:'Rejected',
|
||||||
|
unknow:'unknow',
|
||||||
|
username:'User Name',
|
||||||
|
realname:'Real Name',
|
||||||
|
type:'Identification type',
|
||||||
|
file:'Identification photograph',
|
||||||
|
picture:'Facial photograph',
|
||||||
|
status:'Status',
|
||||||
|
createtime:'Create Time',
|
||||||
|
operate:'Operate',
|
||||||
|
confirmtitle:'Confirmation approved.',
|
||||||
|
confirmcontent:'Are you sure you want to verify this user\'s real-name authentication?',
|
||||||
|
confirmsuc:'Successfully approved.',
|
||||||
|
confirmerr:'Operation failed.',
|
||||||
|
rejecttitle:'Confirm rejection',
|
||||||
|
rejectcontent:'Are you sure you want to reject this user\'s real-name authentication?',
|
||||||
|
rejectpla:'Please enter the reason for refusal.',
|
||||||
|
rejectsuc:'successfully rejected',
|
||||||
|
searchtime:'Submission Time',
|
||||||
|
starttime:'Start Time',
|
||||||
|
endtime:'End Time',
|
||||||
|
plestatus:'Please select status.',
|
||||||
|
search:'Search',
|
||||||
|
reset:'Reset',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
required: 'Cannot be empty',
|
required: 'Cannot be empty',
|
||||||
|
|||||||
@@ -776,8 +776,40 @@ const local:any = {
|
|||||||
pleclientname:'请输入设备名',
|
pleclientname:'请输入设备名',
|
||||||
search:'搜索',
|
search:'搜索',
|
||||||
reset:'重置',
|
reset:'重置',
|
||||||
|
|
||||||
},
|
},
|
||||||
|
kyc:{
|
||||||
|
title:'KYC实名认证审核',
|
||||||
|
total:'共',
|
||||||
|
pass:'通过',
|
||||||
|
refuse:'拒绝',
|
||||||
|
verified:'未认证',
|
||||||
|
pending:'待审核',
|
||||||
|
approved:'已通过',
|
||||||
|
rejected:'已拒绝',
|
||||||
|
unknow:'未知',
|
||||||
|
username:'用户名',
|
||||||
|
realname:'姓名',
|
||||||
|
type:'证件类型',
|
||||||
|
file:'证件照片',
|
||||||
|
picture:'面部照片',
|
||||||
|
status:'状态',
|
||||||
|
createtime:'提交时间',
|
||||||
|
operate:'操作',
|
||||||
|
confirmtitle:'确认通过',
|
||||||
|
confirmcontent:'确定要通过该用户的实名认证吗?',
|
||||||
|
confirmsuc:'审核通过成功',
|
||||||
|
confirmerr:'操作失败',
|
||||||
|
rejecttitle:'确认拒绝',
|
||||||
|
rejectcontent:'确定要拒绝该用户的实名认证吗?',
|
||||||
|
rejectpla:'请输入拒绝原因',
|
||||||
|
rejectsuc:'审核拒绝成功',
|
||||||
|
searchtime:'提交时间',
|
||||||
|
starttime:'开始时间',
|
||||||
|
endtime:'结束时间',
|
||||||
|
plestatus:'请选择状态',
|
||||||
|
search:'查询',
|
||||||
|
reset:'重置',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
required: '不能为空',
|
required: '不能为空',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
/>
|
/>
|
||||||
<ACard
|
<ACard
|
||||||
title="KYC实名认证审核"
|
:title="t('page.kyc.title')"
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
:body-style="{ flex: 1, overflow: 'hidden' }"
|
:body-style="{ flex: 1, overflow: 'hidden' }"
|
||||||
class="flex-col-stretch sm:flex-1-hidden card-wrapper"
|
class="flex-col-stretch sm:flex-1-hidden card-wrapper"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
total: mobilePagination.total,
|
total: mobilePagination.total,
|
||||||
current: searchParams.pageNum,
|
current: searchParams.pageNum,
|
||||||
pageSize: searchParams.pageSize,
|
pageSize: searchParams.pageSize,
|
||||||
showTotal: (total: number) => `共 ${total} 条`
|
showTotal: (total: number) => `${t('page.kyc.total')} ${total} `
|
||||||
}"
|
}"
|
||||||
:scroll="scrollConfig"
|
:scroll="scrollConfig"
|
||||||
class="h-full"
|
class="h-full"
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
:disabled="record.status !== 'PENDING'"
|
:disabled="record.status !== 'PENDING'"
|
||||||
@click="handleApprove(record)"
|
@click="handleApprove(record)"
|
||||||
>
|
>
|
||||||
通过
|
{{ t('page.kyc.pass') }}
|
||||||
</AButton>
|
</AButton>
|
||||||
<AButton
|
<AButton
|
||||||
danger
|
danger
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
:disabled="record.status !== 'PENDING'"
|
:disabled="record.status !== 'PENDING'"
|
||||||
@click="handleReject(record)"
|
@click="handleReject(record)"
|
||||||
>
|
>
|
||||||
拒绝
|
{{ t('page.kyc.refuse') }}
|
||||||
</AButton>
|
</AButton>
|
||||||
</ASpace>
|
</ASpace>
|
||||||
</template>
|
</template>
|
||||||
@@ -99,7 +99,8 @@ import {
|
|||||||
message
|
message
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
import KycSearch from './modules/kyc-search.vue';
|
import KycSearch from './modules/kyc-search.vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
const { t } = useI18n();
|
||||||
const wrapperEl = shallowRef<HTMLElement | null>(null);
|
const wrapperEl = shallowRef<HTMLElement | null>(null);
|
||||||
const { height: wrapperElHeight } = useElementSize(wrapperEl);
|
const { height: wrapperElHeight } = useElementSize(wrapperEl);
|
||||||
|
|
||||||
@@ -137,15 +138,15 @@ const parseFile = (path:string)=>{
|
|||||||
const getStatusText = (status: string) => {
|
const getStatusText = (status: string) => {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'VERIFIED':
|
case 'VERIFIED':
|
||||||
return '未认证';
|
return t('page.kyc.verified');
|
||||||
case 'PENDING':
|
case 'PENDING':
|
||||||
return '待审核';
|
return t('page.kyc.pending');
|
||||||
case 'APPROVED':
|
case 'APPROVED':
|
||||||
return '已通过';
|
return t('page.kyc.approved');
|
||||||
case 'REJECTED':
|
case 'REJECTED':
|
||||||
return '已拒绝';
|
return t('page.kyc.rejected');
|
||||||
default:
|
default:
|
||||||
return '未知';
|
return t('page.kyc.unknow');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,28 +173,28 @@ const {
|
|||||||
{
|
{
|
||||||
key: 'userName',
|
key: 'userName',
|
||||||
dataIndex: 'userName',
|
dataIndex: 'userName',
|
||||||
title: '用户名',
|
title: t('page.kyc.username'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'realName',
|
key: 'realName',
|
||||||
dataIndex: 'realName',
|
dataIndex: 'realName',
|
||||||
title: '姓名',
|
title: t('page.kyc.realname'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'idType',
|
key: 'idType',
|
||||||
dataIndex: 'idType',
|
dataIndex: 'idType',
|
||||||
title: '证件类型',
|
title: t('page.kyc.type'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'idFile',
|
key: 'idFile',
|
||||||
dataIndex: 'idFile',
|
dataIndex: 'idFile',
|
||||||
title: '证件照片',
|
title: t('page.kyc.file'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
// customRender: ({ text }) => h('div', { class: 'image-wrapper' }, [
|
// customRender: ({ text }) => h('div', { class: 'image-wrapper' }, [
|
||||||
@@ -211,7 +212,7 @@ const {
|
|||||||
{
|
{
|
||||||
key: 'identifyPicture',
|
key: 'identifyPicture',
|
||||||
dataIndex: 'identifyPicture',
|
dataIndex: 'identifyPicture',
|
||||||
title: '面部照片',
|
title: t('page.kyc.picture'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
// customRender: ({ text }) => h('div', { class: 'image-wrapper' }, [
|
// customRender: ({ text }) => h('div', { class: 'image-wrapper' }, [
|
||||||
@@ -229,20 +230,20 @@ const {
|
|||||||
{
|
{
|
||||||
key: 'status',
|
key: 'status',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
title: '状态',
|
title: t('page.kyc.status'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'createTime',
|
key: 'createTime',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
title: '提交时间',
|
title: t('page.kyc.createtime'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180
|
width: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'operate',
|
key: 'operate',
|
||||||
title: '操作',
|
title: t('page.kyc.operate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
fixed: 'right'
|
fixed: 'right'
|
||||||
@@ -264,16 +265,16 @@ const handleReset = () => {
|
|||||||
const handleApprove = async (record: Api.Kyc.KycInfo) => {
|
const handleApprove = async (record: Api.Kyc.KycInfo) => {
|
||||||
try {
|
try {
|
||||||
AModal.confirm({
|
AModal.confirm({
|
||||||
title: '确认通过',
|
title: t('page.kyc.confirmtitle'),
|
||||||
content: '确定要通过该用户的实名认证吗?',
|
content: t('page.kyc.confirmcontent'),
|
||||||
async onOk() {
|
async onOk() {
|
||||||
await approveKyc(record.id, record.userId);
|
await approveKyc(record.id, record.userId);
|
||||||
message.success('审核通过成功');
|
message.success(t('page.kyc.confirmsuc'));
|
||||||
getData(); // 刷新列表
|
getData(); // 刷新列表
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('操作失败');
|
message.error(t('page.kyc.confirmerr'));
|
||||||
console.error('Approve failed:', error);
|
console.error('Approve failed:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -281,11 +282,11 @@ const handleApprove = async (record: Api.Kyc.KycInfo) => {
|
|||||||
const handleReject = (record: Api.Kyc.KycInfo) => {
|
const handleReject = (record: Api.Kyc.KycInfo) => {
|
||||||
let reason = '';
|
let reason = '';
|
||||||
AModal.confirm({
|
AModal.confirm({
|
||||||
title: '确认拒绝',
|
title: t('page.kyc.rejecttitle'),
|
||||||
content: h('div', [
|
content: h('div', [
|
||||||
h('p', '确定要拒绝该用户的实名认证吗?'),
|
h('p', t('page.kyc.rejectcontent')),
|
||||||
h(AInput.TextArea, {
|
h(AInput.TextArea, {
|
||||||
placeholder: '请输入拒绝原因',
|
placeholder: t('page.kyc.rejectpla'),
|
||||||
rows: 4,
|
rows: 4,
|
||||||
'onUpdate:value': (val: string) => {
|
'onUpdate:value': (val: string) => {
|
||||||
reason = val;
|
reason = val;
|
||||||
@@ -294,15 +295,15 @@ const handleReject = (record: Api.Kyc.KycInfo) => {
|
|||||||
]),
|
]),
|
||||||
async onOk() {
|
async onOk() {
|
||||||
if (!reason.trim()) {
|
if (!reason.trim()) {
|
||||||
message.error('请输入拒绝原因');
|
message.error(t('page.kyc.rejectpla'));
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await rejectKyc(record.id, record.userId, reason);
|
await rejectKyc(record.id, record.userId, reason);
|
||||||
message.success('审核拒绝成功');
|
message.success(t('page.kyc.rejectsuc'));
|
||||||
getData(); // 刷新列表
|
getData(); // 刷新列表
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('操作失败');
|
message.error(t('page.kyc.confirmerr'));
|
||||||
console.error('Reject failed:', error);
|
console.error('Reject failed:', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,33 +6,39 @@
|
|||||||
layout="inline"
|
layout="inline"
|
||||||
class="flex flex-wrap gap-16px items-center"
|
class="flex flex-wrap gap-16px items-center"
|
||||||
>
|
>
|
||||||
<AFormItem label="提交时间">
|
<AFormItem :label="t('page.kyc.searchtime')">
|
||||||
<ARangePicker
|
<ARangePicker
|
||||||
v-model:value="queryRangePicker"
|
v-model:value="queryRangePicker"
|
||||||
show-time
|
show-time
|
||||||
:placeholder="['开始时间', '结束时间']"
|
:placeholder="[t('page.kyc.starttime'), t('page.kyc.endtime')]"
|
||||||
format="YYYY-MM-DD HH:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
class="w-400px"
|
class="w-400px"
|
||||||
@change="handleTimeChange"
|
@change="handleTimeChange"
|
||||||
/>
|
/>
|
||||||
</AFormItem>
|
</AFormItem>
|
||||||
<AFormItem label="状态">
|
<AFormItem :label="t('page.kyc.status')">
|
||||||
<ASelect
|
<ASelect
|
||||||
v-model:value="formModel.status"
|
v-model:value="formModel.status"
|
||||||
placeholder="请选择状态"
|
:placeholder="t('page.kyc.plestatus')"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="w-200px"
|
class="w-200px"
|
||||||
>
|
>
|
||||||
<ASelectOption value="PENDING">待审核</ASelectOption>
|
<ASelectOption value="PENDING">{{ t('page.kyc.pending') }}</ASelectOption>
|
||||||
<ASelectOption value="APPROVED">已通过</ASelectOption>
|
<ASelectOption value="APPROVED">{{ t('page.kyc.approved') }}</ASelectOption>
|
||||||
<ASelectOption value="REJECTED">已拒绝</ASelectOption>
|
<ASelectOption value="REJECTED">{{ t('page.kyc.rejected') }}</ASelectOption>
|
||||||
</ASelect>
|
</ASelect>
|
||||||
</AFormItem>
|
</AFormItem>
|
||||||
<AFormItem class="flex-1 justify-end">
|
<AFormItem class="flex-1 justify-end">
|
||||||
<ASpace>
|
<ASpace>
|
||||||
<AButton @click="handleReset">重置</AButton>
|
<AButton type="primary" @click="handleSearch">
|
||||||
<AButton type="primary" @click="handleSearch">查询</AButton>
|
<template #icon>
|
||||||
|
<icon-mdi-search />
|
||||||
|
</template>{{ t('page.kyc.search') }}</AButton>
|
||||||
|
<AButton @click="handleReset">
|
||||||
|
<template #icon>
|
||||||
|
<icon-mdi-refresh />
|
||||||
|
</template>{{ t('page.kyc.reset') }}</AButton>
|
||||||
</ASpace>
|
</ASpace>
|
||||||
</AFormItem>
|
</AFormItem>
|
||||||
</AForm>
|
</AForm>
|
||||||
@@ -52,6 +58,8 @@ import {
|
|||||||
DatePicker
|
DatePicker
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
const { t } = useI18n();
|
||||||
const ARangePicker = DatePicker.RangePicker;
|
const ARangePicker = DatePicker.RangePicker;
|
||||||
import dayjs, { Dayjs } from 'dayjs';
|
import dayjs, { Dayjs } from 'dayjs';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user