Commit debf71b9 authored by suzhiquan's avatar suzhiquan

修复国际化处理遗漏bug

parent 9577e964
......@@ -1055,25 +1055,25 @@ const supplierRoute: RouterChild = {
],
};
const homeRoute = {
path: `/memberCenter/home`,
name: 'home',
icon: 'home',
key: 'home',
component: '@/pages/home',
};
const routes = [homeRoute, supplierRoute];
const indexRoute = {
path: '/supplierCenter',
component: '@/layouts/BasicLayout',
routes: [
{
path: '/supplierCenter',
redirect: '/memberCenter/home',
},
// const homeRoute = {
// path: `/memberCenter/home`,
// name: 'home',
// icon: 'home',
// key: 'home',
// component: '@/pages/home',
// };
// const routes = [homeRoute, supplierRoute];
// const indexRoute = {
// path: '/supplierCenter',
// component: '@/layouts/BasicLayout',
// routes: [
// {
// path: '/supplierCenter',
// redirect: '/memberCenter/home',
// },
...routes,
],
};
// ...routes,
// ],
// };
export default indexRoute;
export default supplierRoute;
......@@ -156,4 +156,6 @@ export default {
'supplier.components.SupplierBasicInfo.name': 'Supplier Name',
'supplier.supplierFlowRule.defaultColumns.roleName': 'Supplier Role',
'supplier.supplierFlowRule.defaultColumns.supplierTypeName': 'Supplier Type',
'supplier.management.supplierPrVerifyComingData.query.get-tip':
'Are you sure you want to pick up the selected supplier',
};
......@@ -150,4 +150,6 @@ export default {
'supplier.components.SupplierBasicInfo.name': '공급업체 이름',
'supplier.supplierFlowRule.defaultColumns.roleName': '공급업체 역할',
'supplier.supplierFlowRule.defaultColumns.supplierTypeName': '공급업체 유형',
'supplier.management.supplierPrVerifyComingData.query.get-tip':
'Are you sure you want to pick up the selected supplier',
};
......@@ -241,4 +241,6 @@ export default {
'supplier.components.SupplierBasicInfo.name': '供应商名称',
'supplier.supplierFlowRule.defaultColumns.roleName': '供应商角色',
'supplier.supplierFlowRule.defaultColumns.supplierTypeName': '供应商类型',
'supplier.management.supplierPrVerifyComingData.query.get-tip':
'선택된 공급자를 선택할 것인지를 결정합니까?',
};
......@@ -136,7 +136,7 @@ const MemberFrozen: React.FC<{}> = () => {
name: memberInfo?.name,
}}
extra={(
memberInfo.levelTag
memberInfo?.levelTag
)}
/>
)}
......
......@@ -23,8 +23,14 @@ export const querySchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'member.memberVisitManage.memberName.placeholder' }, { default: '搜索' }),
tip: intl.formatMessage({ id: 'member.memberVisitManage.memberName.tip' }, { default: '输入 会员名称 进行搜索' }),
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.memberName.placeholder' },
{ default: '搜索' },
),
tip: intl.formatMessage(
{ id: 'member.memberVisitManage.memberName.tip' },
{ default: '输入 会员名称 进行搜索' },
),
},
},
},
......@@ -51,7 +57,10 @@ export const querySchema: ISchema = {
visitTheme: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'member.memberVisitManage.visitTheme' }, { default: '拜访主题' }),
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTheme' },
{ default: '拜访主题' },
),
allowClear: true,
},
},
......@@ -59,7 +68,10 @@ export const querySchema: ISchema = {
type: 'string',
enum: [],
'x-component-props': {
placeholder: intl.formatMessage({ id: 'member.memberVisitManage.visitTypeName' }, { default: '拜访类型' }),
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTypeName' },
{ default: '拜访类型' },
),
allowClear: true,
},
},
......@@ -67,21 +79,30 @@ export const querySchema: ISchema = {
type: 'string',
enum: [],
'x-component-props': {
placeholder: intl.formatMessage({ id: 'member.memberVisitManage.visitLevelName' }, { default: '拜访级别' }),
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitLevelName' },
{ default: '拜访级别' },
),
allowClear: true,
},
},
visitor: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'member.memberVisitManage.visitor' }, { default: '拜访人' }),
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitor' },
{ default: '拜访人' },
),
allowClear: true,
},
},
peer: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'member.memberVisitManage.peer' }, { default: '同行人' }),
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.peer' },
{ default: '同行人' },
),
allowClear: true,
},
},
......@@ -93,10 +114,13 @@ export const querySchema: ISchema = {
span: 1,
},
'x-component-props': {
children: intl.formatMessage({ id: 'common.button.search' }, { default: '查询' }),
children: intl.formatMessage(
{ id: 'common.button.search' },
{ default: '查询' },
),
},
},
},
},
},
};
\ No newline at end of file
};
......@@ -322,7 +322,7 @@ const MemberMaintain: React.FC<[]> = () => {
title: intl.formatMessage({ id: 'member.actions.verify-tip' }),
icon: <QuestionCircleOutlined />,
content: intl.formatMessage({
id: 'supplier.management.supplierPrVerifyComingData.query.verify-tip',
id: 'supplier.management.supplierPrVerifyComingData.query.get-tip',
}),
onOk() {
return new Promise<void>((resolve, reject) => {
......
......@@ -136,7 +136,7 @@ const MemberFrozen: React.FC<{}> = () => {
name: memberInfo?.name,
}}
extra={(
memberInfo.levelTag
memberInfo?.levelTag
)}
/>
)}
......
......@@ -3,17 +3,17 @@
*/
import React from 'react';
import { message } from 'antd';
import { history } from 'umi';
import { history,useIntl } from 'umi';
import moment from 'moment';
import { postMemberVisitAddOrUpdate } from '@/services/MemberV2Api';
import MemberVisitForm, { SubmitValue } from './components/MemberVisitForm';
const AddMemberVisit: React.FC<{}> = (props) => {
const intl = useIntl();
const handleRoleRuleConfigFormSubmit = (value: SubmitValue): Promise<void> => (
new Promise((resolve, reject) => {
const msg = message.loading({
content: '正在添加,请稍候...',
content: intl.formatMessage({ id: 'member.memberVisitManage.add.adding' }, { default: '正在添加,请稍候...' }),
duration: 0,
});
const { subMember, visitorMember, visitDate, files, ...rest } = value;
......@@ -43,7 +43,7 @@ const AddMemberVisit: React.FC<{}> = (props) => {
return (
<MemberVisitForm
title='新增会员拜访'
title={intl.formatMessage({ id: 'supplier.supplierVisitManage.add.visit' }, { default: '新增供应商拜访' })}
onSubmit={handleRoleRuleConfigFormSubmit}
/>
);
......
......@@ -10,7 +10,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { getMemberAbilityMaintenancePage } from '@/services/MemberV2Api';
import PolymericTable, { FetchParamsType, FetchResponse } from '@/components/PolymericTable';
import { querySchema } from './schema';
import { useIntl } from 'umi';
export type MemberType = {
/**
* 会员id
......@@ -66,7 +66,7 @@ const MemberVisitedFieldItem = (props) => {
const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'radio', customKey: 'memberId' });
const schemaProps = useSchemaProps();
const intl = useIntl();
const componentProps = props.props['x-component-props'] || {};
useEffect(() => {
......@@ -78,18 +78,18 @@ const MemberVisitedFieldItem = (props) => {
const columns: ColumnType<MemberType>[] = [
{
title: '序号',
title: intl.formatMessage({ id: 'member.memberVisitManage.index' }, { default: '序号' }),
dataIndex: 'index',
width: '10%',
render: (_, record, index) => index + 1,
},
{
title: '会员ID',
title: intl.formatMessage({ id: 'supplier.supplierVisitManage.supplierId' }, { default: '供应商ID' }),
dataIndex: 'memberId',
width: '15%',
},
{
title: '会员名称',
title: intl.formatMessage({ id: 'supplier.supplierVisitManage.supplierName' }, { default: '供应商名称' }),
dataIndex: 'name',
},
// {
......@@ -100,10 +100,10 @@ const MemberVisitedFieldItem = (props) => {
// title: '会员角色',
// dataIndex: 'roleName',
// },
{
title: '会员等级',
dataIndex: 'levelTag',
},
// {
// title: intl.formatMessage({ id: 'member.memberVisitManage.levelTag' }, { default: '会员等级' }),
// dataIndex: 'levelTag',
// },
];
const handleVisibleDrawer = (flag?: boolean) => {
......@@ -124,7 +124,7 @@ const MemberVisitedFieldItem = (props) => {
const handleConfirm = () => {
if (!rowCtl.selectRow.length) {
message.warning('请选择会员');
message.warning(intl.formatMessage({ id: 'supplier.supplierVisitManage.supplier.required' }, { default: '请选择供应商' }));
return;
}
if (props.mutators.change) {
......@@ -138,7 +138,7 @@ const MemberVisitedFieldItem = (props) => {
<Input.Group compact>
<Input
value={value && value.length ? value[0].name : ''}
placeholder="请选择会员"
placeholder={intl.formatMessage({ id: 'member.memberVisitManage.member.required' }, { default: '请选择供应商' })}
style={{ width: 'calc(100% - 32px)' }}
disabled
/>
......@@ -150,7 +150,7 @@ const MemberVisitedFieldItem = (props) => {
/>
</Input.Group>
<Drawer
title="选择会员"
title={intl.formatMessage({ id: 'supplier.supplierVisitManage.supplier.placeholder' }, { default: '选择供应商' })}
visible={visibleDrawer}
width={800}
onClose={() => handleVisibleDrawer(false)}
......@@ -161,10 +161,10 @@ const MemberVisitedFieldItem = (props) => {
}}
>
<Button onClick={() => handleVisibleDrawer(false)} style={{ marginRight: 16 }}>
取消
{intl.formatMessage({ id: 'common.button.cancel' }, { default: '取消' })}
</Button>
<Button onClick={handleConfirm} type="primary">
确 定
{intl.formatMessage({ id: 'common.button.confirm' }, { default: '确定' })}
</Button>
</div>
}
......
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
const intl = getIntl();
export const querySchema: ISchema = {
type: 'object',
properties: {
......@@ -10,9 +11,16 @@ export const querySchema: ISchema = {
},
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.memberName.placeholder' },
{ default: '搜索' },
),
align: 'flex-left',
tip: '输入 会员名称 进行搜索',
tip: intl.formatMessage(
{ id: 'supplier.supplierVisitManage.supplierName.tip' },
{ default: '输入 供应商名称 进行搜索' },
),
advanced: false,
},
},
......
import { ISchema } from '@formily/antd';
import themeConfig from '@/../config/lingxi.theme.config';
import { MEMBER_VISIT_BASIC_INFO, MEMBER_VISIT_FILES } from './config';
import { getIntl } from 'umi';
const intl = getIntl();
const schema: ISchema = {
type: 'object',
properties: {
......@@ -9,7 +10,10 @@ const schema: ISchema = {
type: 'object',
'x-component': 'AnchorCardVirtualFieldWrap',
'x-component-props': {
title: '基本信息',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.basic' },
{ default: '基本信息' },
),
anchorKey: MEMBER_VISIT_BASIC_INFO,
},
properties: {
......@@ -26,88 +30,136 @@ const schema: ISchema = {
},
properties: {
visitTheme: {
title: '拜访主题',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTheme' },
{ default: '拜访主题' },
),
type: 'string',
'x-component-props': {
placeholder: '最长40个字符,20个文字',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTheme.placeholder' },
{ default: '最长40个字符,20个文字' },
),
},
'x-rules': [
{
required: true,
message: '请输入拜访主题',
message: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTheme.required' },
{ default: '请输入拜访主题' },
),
},
{
limitByte: true, // 自定义校验规则
maxByte: 40,
}
limitByte: true, // 自定义校验规则
maxByte: 40,
},
],
},
subMember: {
title: '会员名称',
title: intl.formatMessage(
{ id: 'supplier.supplierVisitManage.supplierName' },
{ default: '供应商名称' },
),
type: 'array',
required: true,
'x-component': 'MemberVisitedFieldItem',
},
visitType: {
title: '拜访类型',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTypeName' },
{ default: '拜访类型' },
),
type: 'string',
enum: [],
required: true,
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTypeName.placeholder' },
{ default: '请选择' },
),
},
},
visitorMember: {
title: '拜访人',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.visitor' },
{ default: '拜访人' },
),
type: 'array',
'x-component': 'VisitorMemberFieldItem',
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitor.placeholder' },
{ default: '请选择' },
),
},
},
visitLevel: {
title: '拜访级别',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.visitLevelName' },
{ default: '拜访级别' },
),
type: 'string',
enum: [],
required: true,
'x-component-props': {
placeholder: '请选择',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitLevelName.placeholder' },
{ default: '请选择' },
),
},
},
peer: {
title: '同行人',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.peer' },
{ default: '同行人' },
),
type: 'string',
'x-component-props': {
placeholder: '最长40个字符,20个汉字',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.peer.placeholder' },
{ default: '最长40个字符,20个汉字' },
),
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 40,
}
limitByte: true, // 自定义校验规则
maxByte: 40,
},
],
},
visitDate: {
title: '拜访日期',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.visitDate' },
{ default: '拜访日期' },
),
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
placeholder: '请输入',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitDate.placeholder' },
{ default: '请选择' },
),
},
},
visitRemark: {
title: '备注',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.visitRemark' },
{ default: '备注' },
),
type: 'string',
'x-component': 'TextArea',
'x-component-props': {
placeholder: '最长200个字符,100个汉字',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitRemark.placeholder' },
{ default: '最长200个字符,100个汉字' },
),
rows: 1,
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
limitByte: true, // 自定义校验规则
maxByte: 200,
},
],
},
},
......@@ -118,7 +170,10 @@ const schema: ISchema = {
type: 'object',
'x-component': 'AnchorCardVirtualFieldWrap',
'x-component-props': {
title: '附件',
title: intl.formatMessage(
{ id: 'member.memberVisitManage.files' },
{ default: '附件' },
),
anchorKey: MEMBER_VISIT_FILES,
style: {
marginTop: themeConfig['@margin-md'],
......@@ -140,7 +195,10 @@ const schema: ISchema = {
files: {
type: 'string',
'x-component': 'FormilyUploadFiles',
description: '一次上传一个文件,每个附件大小不能超过 20M',
description: intl.formatMessage(
{ id: 'member.memberVisitManage.files.description' },
{ default: '一次上传一个文件,每个附件大小不能超过 20M' },
),
},
},
},
......
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
const intl = getIntl();
export const querySchema: ISchema = {
type: 'object',
properties: {
......@@ -19,8 +20,14 @@ export const querySchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.memberName.placeholder' },
{ default: '搜索' },
),
tip: intl.formatMessage(
{ id: 'supplier.supplierVisitManage.supplierName.tip' },
{ default: '输入 供应商名称 进行搜索' },
),
},
},
},
......@@ -47,7 +54,10 @@ export const querySchema: ISchema = {
visitTheme: {
type: 'string',
'x-component-props': {
placeholder: '拜访主题',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTheme' },
{ default: '拜访主题' },
),
allowClear: true,
},
},
......@@ -55,7 +65,10 @@ export const querySchema: ISchema = {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '拜访类型',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitTypeName' },
{ default: '拜访类型' },
),
allowClear: true,
},
},
......@@ -63,21 +76,30 @@ export const querySchema: ISchema = {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '拜访级别',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitLevelName' },
{ default: '拜访级别' },
),
allowClear: true,
},
},
visitor: {
type: 'string',
'x-component-props': {
placeholder: '拜访人',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.visitor' },
{ default: '拜访人' },
),
allowClear: true,
},
},
peer: {
type: 'string',
'x-component-props': {
placeholder: '同行人',
placeholder: intl.formatMessage(
{ id: 'member.memberVisitManage.peer' },
{ default: '同行人' },
),
allowClear: true,
},
},
......@@ -89,10 +111,13 @@ export const querySchema: ISchema = {
span: 1,
},
'x-component-props': {
children: '查询',
children: intl.formatMessage(
{ id: 'common.button.search' },
{ default: '查询' },
),
},
},
},
},
},
};
\ No newline at end of file
};
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