Commit 919dd2ff authored by XieZhiXiong's avatar XieZhiXiong

chore: 添加会员管理 -> 待审核入库资料CN国际化

parent 137bd247
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-11-29 11:33:12
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-29 19:54:37
* @LastEditTime: 2021-12-02 16:26:31
* @Description:
*/
export default {
......@@ -148,6 +148,51 @@ export default {
'member.management.maintain.detail.sincerityInfo.complainPoint': '反馈扣分',
'member.management.maintain.detail.sincerityInfo.registerYearsPoint': '入驻年数积分',
// 待审核入库资料
'member.management.memberPrVerifyComingData.query.verify-tip': '确定要审核通过选中的会员吗?',
'member.management.memberPrVerifyComingData.drawer.title': '入库资料审核',
'member.management.memberPrVerifyComingData.drawer.form.title': '单据审核',
'member.management.memberPrVerifyComingData.drawer.form.agree': '是否通过',
'member.management.memberPrVerifyComingData.drawer.form.agree.pass': '审核通过',
'member.management.memberPrVerifyComingData.drawer.form.agree.noPass': '审核不通过',
'member.management.memberPrVerifyComingData.drawer.form.reason': '不通过原因',
'member.management.memberPrVerifyComingData.drawer.form.placeholder': '在此输入你的内容,最长120个字符,60个汉字',
'member.management.memberPrVerifyComingData.verify.commiting': '正在提交,请稍候...',
'member.management.memberPrVerifyComingData.verify.channel.required': '请填写必要的渠道信息',
'member.management.memberPrVerifyComingData.verify.deposit.required': '请填写必要的入库资料',
'member.management.memberPrVerifyComingData.verify.qualities.required': '请填写必要的资质证明',
'member.management.memberPrVerifyComingData.verify.upperMember.null': '无',
// 会员状态
'member.status.notAaudit': '待审核',
// 按钮操作
'member.actions.verify': '审核',
'member.actions.verify-tip': '提示',
'member.actions.verify-batch': '批量审核通过',
'member.actions.batch.nothing': '未选择任何会员',
'member.actions.cancel': '取 消',
'member.actions.confirm': '确 定',
'member.actions.apply.verify': '单据审核',
// 公共部分
'member.management.common.columns.memberId': '会员Id',
'member.management.common.columns.memberName': '名称',
'member.management.common.columns.memberTypeName': '会员类型',
'member.management.common.columns.roleName': '会员角色',
'member.management.common.columns.level': '会员等级',
'member.management.common.columns.sourceName': '注册来源',
'member.management.common.columns.registerTime': '时间',
'member.management.common.columns.statusName': '会员状态',
'member.management.common.columns.outerStatusName': '外部状态',
'member.management.common.columns.innerStatusName': '内部状态',
'member.management.common.schames.innerStatusName': '内部状态',
'member.management.common.schames.name.placeholder': '搜索',
'member.management.common.schames.name.placeholder-tip': '输入 会员名称 进行搜索',
'member.management.common.schames.memberTypeId.placeholder': '会员类型(全部)',
'member.management.common.schames.roleId.placeholde': '会员角色(全部)',
'member.management.common.schames.source.placeholder': '申请来源(全部)',
'member.management.common.schames.query': '查询',
'member.management.common.form.reason.pass': '通过原因',
'member.management.common.form.reason.noPass': '不通过原因',
};
......@@ -2,11 +2,12 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 10:22:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-26 10:23:44
* @LastEditTime: 2021-12-02 16:04:02
* @Description:
*/
import React from 'react';
import { Badge } from 'antd';
import { getIntl } from 'umi';
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import {
......@@ -15,6 +16,8 @@ import {
} from '../../constant';
import StatusTag from '@/components/StatusTag';
const intl = getIntl();
/**
*
* @param target string 会员详情路径前缀
......@@ -22,7 +25,7 @@ import StatusTag from '@/components/StatusTag';
*/
const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/detail'): ColumnType<any>[] => ([
{
title: '会员ID/名称',
title: `${intl.formatMessage({ id: 'member.management.common.columns.memberId' })}/${intl.formatMessage({ id: 'member.management.common.columns.memberName' })}`,
dataIndex: 'memberId',
render: (text, record) => (
<>
......@@ -38,22 +41,22 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
),
},
{
title: '会员类型',
title: intl.formatMessage({ id: 'member.management.common.columns.memberTypeName' }),
dataIndex: 'memberTypeName',
},
{
title: '会员角色',
title: intl.formatMessage({ id: 'member.management.common.columns.roleName' }),
dataIndex: 'roleName',
},
{
title: '外部状态',
title: intl.formatMessage({ id: 'member.management.common.columns.outerStatusName' }),
dataIndex: 'outerStatusName',
render: (text, record) => (
<StatusTag type={MEMBER_OUTER_STATUS_TYPE[record.outerStatus]} title={text} />
),
},
{
title: '内部状态',
title: intl.formatMessage({ id: 'member.management.common.columns.innerStatusName' }),
dataIndex: 'innerStatusName',
render: (text, record) => <Badge color={MEMBER_INNER_STATUS_BADGE_COLOR[record.innerStatus]} text={text} />,
},
......
......@@ -2,11 +2,12 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 11:30:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 14:20:54
* @LastEditTime: 2021-12-02 15:59:49
* @Description: 审核入库相关公用 columns
*/
import React from 'react';
import { Badge } from 'antd';
import { getIntl } from 'umi';
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import {
......@@ -16,6 +17,8 @@ import {
import StatusTag from '@/components/StatusTag';
import styles from '../styles.less';
const intl = getIntl();
/**
*
* @param target string 会员详情路径前缀
......@@ -23,7 +26,7 @@ import styles from '../styles.less';
*/
const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/detail'): ColumnType<any>[] => ([
{
title: '会员ID/名称',
title: `${intl.formatMessage({ id: 'member.management.common.columns.memberId' })}/${intl.formatMessage({ id: 'member.management.common.columns.memberName' })}`,
dataIndex: 'memberId',
render: (text, record) => (
<>
......@@ -39,15 +42,15 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
),
},
{
title: '会员类型',
title: intl.formatMessage({ id: 'member.management.common.columns.memberTypeName' }),
dataIndex: 'memberTypeName',
},
{
title: '会员角色',
title: intl.formatMessage({ id: 'member.management.common.columns.roleName' }),
dataIndex: 'roleName',
},
{
title: '申请来源/时间',
title: `${intl.formatMessage({ id: 'member.management.common.columns.sourceName' })}/${intl.formatMessage({ id: 'member.management.common.columns.registerTime' })}`,
dataIndex: 'sourceName',
render: (text, record) => (
<>
......@@ -57,14 +60,14 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
),
},
{
title: '外部状态',
title: intl.formatMessage({ id: 'member.management.common.columns.outerStatusName' }),
dataIndex: 'outerStatusName',
render: (text, record) => (
<StatusTag type={MEMBER_OUTER_STATUS_TYPE[record.outerStatus]} title={text} />
),
},
{
title: '内部状态',
title: intl.formatMessage({ id: 'member.management.common.columns.innerStatusName' }),
dataIndex: 'innerStatusName',
render: (text, record) => <Badge color={MEMBER_INNER_STATUS_BADGE_COLOR[record.innerStatus] || '#606266'} text={text} />,
},
......
......@@ -2,12 +2,15 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 14:21:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-25 14:32:13
* @LastEditTime: 2021-12-02 16:29:47
* @Description:
*/
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
const verifyComingSchema: ISchema = {
type: 'object',
properties: {
......@@ -19,9 +22,9 @@ const verifyComingSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.name.placeholder' }),
align: 'flex-left',
tip: '输入 会员名称 进行搜索',
tip: intl.formatMessage({ id: 'member.management.common.schames.name.placeholder-tip' }),
},
},
[FORM_FILTER_PATH]: {
......@@ -39,7 +42,7 @@ const verifyComingSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.memberTypeId.placeholder' }),
allowClear: true,
style: {
width: 160,
......@@ -51,7 +54,7 @@ const verifyComingSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.roleId.placeholde' }),
allowClear: true,
style: {
width: 160,
......@@ -63,7 +66,7 @@ const verifyComingSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '申请来源(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.source.placeholder' }),
allowClear: true,
style: {
width: 160,
......@@ -76,7 +79,7 @@ const verifyComingSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'member.management.common.schames.query' }),
},
},
},
......
......@@ -2,12 +2,15 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 10:21:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-26 10:22:15
* @LastEditTime: 2021-12-02 16:27:42
* @Description:
*/
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
const verifyChangeShema: ISchema = {
type: 'object',
properties: {
......@@ -33,8 +36,8 @@ const verifyChangeShema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.name.placeholder' }),
tip: intl.formatMessage({ id: 'member.management.common.schames.name.placeholder-tip' }),
},
},
},
......@@ -53,7 +56,7 @@ const verifyChangeShema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.memberTypeId.placeholder' }),
allowClear: true,
style: {
width: 160,
......@@ -65,7 +68,7 @@ const verifyChangeShema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.roleId.placeholde' }),
allowClear: true,
style: {
width: 160,
......@@ -78,7 +81,7 @@ const verifyChangeShema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'member.management.common.schames.query' }),
},
},
},
......
......@@ -6,8 +6,11 @@
* @Description: 审核入库相关公用schema
*/
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import { FORM_FILTER_PATH } from '@/formSchema/const';
const intl = getIntl();
const verifyComingSchema: ISchema = {
type: 'object',
properties: {
......@@ -30,8 +33,8 @@ const verifyComingSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.name.placeholder' }),
tip: intl.formatMessage({ id: 'member.management.common.schames.name.placeholder-tip' }),
},
},
},
......@@ -50,7 +53,7 @@ const verifyComingSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.memberTypeId.placeholder' }),
allowClear: true,
style: {
width: 160,
......@@ -62,7 +65,7 @@ const verifyComingSchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
placeholder: intl.formatMessage({ id: 'member.management.common.schames.roleId.placeholde' }),
allowClear: true,
style: {
width: 160,
......@@ -75,7 +78,7 @@ const verifyComingSchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'member.management.common.schames.query' }),
},
},
},
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:47:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-27 15:43:58
* @LastEditTime: 2021-12-02 16:40:16
* @Description: 审核Form抽屉
*/
import React from 'react';
......@@ -10,6 +10,7 @@ import {
Drawer,
Button,
} from 'antd';
import { useIntl } from 'umi';
import { DatePicker } from '@formily/antd-components';
import {
createAsyncFormActions,
......@@ -76,6 +77,8 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
submitLoading,
} = props;
const intl = useIntl();
const handleClose = () => {
if (onClose) {
onClose();
......@@ -91,7 +94,7 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
return (
<Drawer
title="入库资料审核"
title={intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.title' })}
width={600}
onClose={handleClose}
visible={visible}
......@@ -102,14 +105,14 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
}}
>
<Button onClick={handleClose} style={{ marginRight: 16 }}>
取 消
{intl.formatMessage({ id: 'member.actions.cancel' })}
</Button>
<Button
onClick={() => formActions.submit()}
type="primary"
loading={submitLoading}
>
确 定
{intl.formatMessage({ id: 'member.actions.confirm' })}
</Button>
</div>
}
......@@ -122,7 +125,7 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
effects={($, { setFieldState }) => {
onFieldValueChange$('agree').subscribe(fieldState => {
setFieldState('reason', state => {
state.title = fieldState.value === 0 ? '不通过原因' : '通过原因';
state.title = fieldState.value === 0 ? intl.formatMessage({ id: 'member.management.common.form.reason.noPass' }) : intl.formatMessage({ id: 'member.management.common.form.reason.pass' });
state.required = fieldState.value === 0;
setTimeout(() => {
formActions.validate('reason');
......
......@@ -2,11 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2021-06-02 10:04:02
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 10:06:30
* @LastEditTime: 2021-12-02 16:50:24
* @Description:
*/
import { getIntl } from 'umi';
import { ISchema } from '@formily/antd';
const intl = getIntl();
export const schema: ISchema = {
type: 'object',
properties: {
......@@ -14,7 +17,7 @@ export const schema: ISchema = {
type: 'object',
'x-component': 'FlagBox',
'x-component-props': {
title: '单据审核',
title: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.form.title' }),
},
properties: {
MEGA_LAYOUT: {
......@@ -28,22 +31,22 @@ export const schema: ISchema = {
properties: {
agree: {
type: 'string',
title: '是否通过',
title: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.form.agree' }),
default: 1,
'x-component': 'Radio',
required: true,
enum: [
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 },
{ label: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.form.agree.pass' }), value: 1 },
{ label: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.form.agree.noPass' }), value: 0 },
],
'x-component-props': {},
},
reason: {
type: 'string',
title: '不通过原因',
title: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.form.reason' }),
'x-component': 'Textarea',
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
placeholder: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.drawer.form.placeholder' }),
rows: 5,
},
'x-rules': [
......
......@@ -2,11 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 10:27:36
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:11:38
* @LastEditTime: 2021-12-02 15:54:43
* @Description: 待审核入库资料
*/
import React, { useState, useRef } from 'react';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { Card, Space, Button, Modal, message } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { StandardTable } from 'god';
......@@ -30,20 +30,22 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<number[]>([]);
const intl = useIntl();
const handleJumpAudit = record => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyComingData/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyComingData/detail').concat([
{
title: '操作',
title: intl.formatMessage({ id: 'common.table.action' }),
dataIndex: 'option',
render: (_, record) => (
<Button
type="link"
onClick={() => handleJumpAudit(record)}
>
审核
{intl.formatMessage({ id: 'member.actions.verify' })}
</Button>
),
},
......@@ -79,13 +81,13 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
const handleBatch = () => {
if (!selectedRowKeys.length) {
message.warning('未选择任何会员');
message.warning(intl.formatMessage({ id: 'member.actions.batch.nothing' }));
return;
}
confirm({
title: '提示',
title: intl.formatMessage({ id: 'member.actions.verify-tip' }),
icon: <QuestionCircleOutlined />,
content: '确定要审核通过选中的会员吗?',
content: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.query.verify-tip' }),
onOk() {
return new Promise<void>((resolve, reject) => {
postMemberDepositVerifyBatch({
......@@ -131,7 +133,7 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
const ControllerBtns = () => (
<Space>
<Button onClick={handleBatch}>
批量审核通过
{intl.formatMessage({ id: 'member.actions.verify-batch' })}
</Button>
</Space>
);
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:01:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:11:58
* @LastEditTime: 2021-12-02 16:58:23
* @Description: 审核入库资料
*/
import React, { useState, useRef } from 'react';
......@@ -14,7 +14,7 @@ import {
import {
CheckCircleOutlined,
} from '@ant-design/icons';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { postMemberDepositVerify, getMemberDepositVerifyDetail } from '@/services/MemberV2Api';
import { normalizeFiledata } from '@/utils';
......@@ -37,6 +37,8 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
const depositInfoRef = useRef<DepositValueType | null>(null);
const qualitiesRef = useRef<QualitiesSubmitValueType[] | null>([]);
const intl = useIntl();
const handleVisibleVerifyDrawer = (flag?) => {
setVisibleVerifyDrawer(!!flag);
};
......@@ -60,7 +62,7 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
),
};
const msg = message.loading({
content: '正在提交,请稍候...',
content: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.verify.commiting' }),
duration: 0,
});
postMemberDepositVerify(payload, {
......@@ -82,15 +84,15 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
const handleVerify = () => {
const promises = [
channelFormRef?.current?.validate().catch(() => {
message.warning('请填写必要的渠道信息');
message.warning(intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.verify.channel.required' }));
return Promise.reject();
}),
depositFormRef?.current?.validate().catch(() => {
message.warning('请填写必要的入库资料');
message.warning(intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.verify.deposit.required' }));
return Promise.reject();
}),
qualitiesFormRef?.current?.validate().catch(() => {
message.warning('请填写必要的资质证明');
message.warning(intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.verify.qualities.required' }));
return Promise.reject();
}),
];
......@@ -111,7 +113,7 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
if (newUpperMembers.findIndex((item) => item.upperRelationId === 0) === -1) {
newUpperMembers.unshift({
upperRelationId: 0,
name: '无',
name: intl.formatMessage({ id: 'member.management.memberPrVerifyComingData.verify.upperMember.null' }),
});
}
res.data.upperMembers = newUpperMembers;
......@@ -167,7 +169,7 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
icon={<CheckCircleOutlined />}
onClick={handleVerify}
>
单据审核
{intl.formatMessage({ id: 'member.actions.apply.verify' })}
</Button>
</Space>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment