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