release/2.19.1.2503.01-业务线个税
lys 2 months ago
parent 979c278bbf
commit 7a74b371a1

@ -57,6 +57,7 @@
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/store": "^2.0.5",
"@umijs/plugin-access": "2.4.2",
"@umijs/plugin-dva": "^0.13.0",
"@umijs/plugin-initial-state": "^2.4.0",

@ -1,58 +1,58 @@
export default {
'403': "Sorry, you don't have access to this page.",
'404': 'Sorry, the page you visited does not exist.',
'500': 'Sorry, the server is reporting an error.',
BackToHome: 'Back to home',
'Add Param': 'Add Param',
Address: 'Address',
Age: 'Age',
'Are you sure delete this record?': 'Are you sure delete this record?',
Author: 'Author',
Avatar: 'Avatar',
Categories: 'Categories',
'Clear notifications': 'Clear notifications',
Comments: 'Comments',
Create: 'Create',
'Create User': 'Create User',
CreateTime: 'CreateTime',
Dark: 'Dark',
Delete: 'Delete',
Email: 'Email',
Female: 'Female',
Gender: 'Gender',
'Hi,': 'Hi,',
Image: 'Image',
Light: 'Light',
Male: 'Male',
Name: 'Name',
NickName: 'NickName',
'Not Found': 'Not Found',
Operation: 'Operation',
Params: 'Params',
Password: 'Password',
Phone: 'Phone',
'Pick an address': 'Pick an address',
'Please pick an address': 'Please pick an address',
Publised: 'Publised',
'Publish Date': 'Publish Date',
Reset: 'Reset',
Search: 'Search',
'Search Name': 'Search Name',
Send: 'Send',
'Sign in': 'Sign in',
'Sign out': 'Sign out',
'Switch Theme': 'Switch Theme',
Tags: 'Tags',
'The input is not valid E-mail!': 'The input is not valid E-mail!',
'The input is not valid phone!': 'The input is not valid phone!',
Title: 'Title',
'Total {total} Items': 'Total {total} Items',
Unpublished: 'Unpublished',
Update: 'Update',
'Update User': 'Update User',
Username: 'Username',
RememberMe: 'Remember me',
Views: 'Views',
Visibility: 'Visibility',
'You have viewed all notifications.': 'You have viewed all notifications.',
"403": "Sorry, you don't have access to this page.",
"404": "Sorry, the page you visited does not exist.",
"500": "Sorry, the server is reporting an error.",
BackToHome: "Back to home",
"Add Param": "Add Param",
Address: "Address",
Age: "Age",
"Are you sure delete this record?": "Are you sure delete this record?",
Author: "Author",
Avatar: "Avatar",
Categories: "Categories",
"Clear notifications": "Clear notifications",
Comments: "Comments",
Create: "Create",
"Create User": "Create User",
CreateTime: "CreateTime",
Dark: "Dark",
Delete: "Delete",
Email: "Email",
Female: "Female",
Gender: "Gender",
"Hi,": "Hi,",
Image: "Image",
Light: "Light",
Male: "Male",
Name: "Name",
NickName: "NickName",
"Not Found": "Not Found",
Operation: "Operation",
Params: "Params",
Password: "Password",
Phone: "Phone",
"Pick an address": "Pick an address",
"Please pick an address": "Please pick an address",
Publised: "Publised",
"Publish Date": "Publish Date",
Reset: "Reset",
Search: "Search",
"Search Name": "Search Name",
Send: "Send",
"Sign in": "Sign in",
"Sign out": "Sign out",
"Switch Theme": "Switch Theme",
Tags: "Tags",
"The input is not valid E-mail!": "The input is not valid E-mail!",
"The input is not valid phone!": "The input is not valid phone!",
Title: "Title",
"Total {total} Items": "Total {total} Items",
Unpublished: "Unpublished",
Update: "Update",
"Update User": "Update User",
Username: "Username",
RememberMe: "Remember me",
Views: "Views",
Visibility: "Visibility",
"You have viewed all notifications.": "You have viewed all notifications."
};

@ -1,58 +1,58 @@
export default {
'403': '您无权访问此页面。',
'404': '您所访问的地址不存在。',
'500': '发生了服务器错误,请联系管理员处理。',
BackToHome: '返回首页',
'Add Param': '添加参数',
Address: '地址',
Age: '年龄',
'Are you sure delete this record?': '您确定要删除这条记录吗?',
Author: '作者',
Avatar: '头像',
Categories: '类别',
'Clear notifications': '清空消息',
Comments: '评论数',
Create: '创建',
'Create User': '创建用户',
CreateTime: '创建时间',
Dark: '暗',
Delete: '删除',
Email: '电子邮件',
Female: '女',
Gender: '性别',
'Hi,': '你好,',
Image: '图像',
Light: '明',
Male: '男性',
Name: '名字',
NickName: '昵称',
'Not Found': '未找到',
Operation: '操作',
Params: '参数',
Password: '密码',
Phone: '电话',
'Pick an address': '选择地址',
'Please pick an address': '选择地址',
Publised: '已发布',
'Publish Date': '发布日期',
Reset: '重置',
Search: '搜索',
'Search Name': '搜索名字',
Send: '发送',
'Sign in': '登录',
'Sign out': '退出登录',
'Switch Theme': '切换主题',
Tags: '标签',
'The input is not valid E-mail!': '输入的电子邮件无效!',
'The input is not valid phone!': '输入无效的手机!',
Title: '标题',
'Total {total} Items': '总共 {total} 条记录',
Unpublished: '未发布',
Update: '更新',
'Update User': '更新用户',
Username: '用户名',
RememberMe: '记住我',
Views: '浏览数',
Visibility: '可见性',
'You have viewed all notifications.': '您已查看所有通知',
"403": "您无权访问此页面。",
"404": "您所访问的地址不存在。",
"500": "发生了服务器错误,请联系管理员处理。",
BackToHome: "返回首页",
"Add Param": "添加参数",
Address: "地址",
Age: "年龄",
"Are you sure delete this record?": "您确定要删除这条记录吗?",
Author: "作者",
Avatar: "头像",
Categories: "类别",
"Clear notifications": "清空消息",
Comments: "评论数",
Create: "创建",
"Create User": "创建用户",
CreateTime: "创建时间",
Dark: "暗",
Delete: "删除",
Email: "电子邮件",
Female: "女",
Gender: "性别",
"Hi,": "你好,",
Image: "图像",
Light: "明",
Male: "男性",
Name: "名字",
NickName: "昵称",
"Not Found": "未找到",
Operation: "操作",
Params: "参数",
Password: "密码",
Phone: "电话",
"Pick an address": "选择地址",
"Please pick an address": "选择地址",
Publised: "已发布",
"Publish Date": "发布日期",
Reset: "重置",
Search: "搜索",
"Search Name": "搜索名字",
Send: "发送",
"Sign in": "登录",
"Sign out": "退出登录",
"Switch Theme": "切换主题",
Tags: "标签",
"The input is not valid E-mail!": "输入的电子邮件无效!",
"The input is not valid phone!": "输入无效的手机!",
Title: "标题",
"Total {total} Items": "总共 {total} 条记录",
Unpublished: "未发布",
Update: "更新",
"Update User": "更新用户",
Username: "用户名",
RememberMe: "记住我",
Views: "浏览数",
Visibility: "可见性",
"You have viewed all notifications.": "您已查看所有通知"
};

@ -1,5 +1,6 @@
import { useIntl, Link } from 'umi';
import { Result, Button } from 'antd';
import React from "react";
export default () => {
const intl = useIntl();

@ -6,6 +6,7 @@ import { DownloadOutlined, PrinterOutlined } from "@ant-design/icons";
import { useMobStore } from "@/hooks";
import { toJS } from "mobx";
import styles from "./index.less";
import Trans from "@/utils/locale";
interface IProps extends DrawerProps {}
@ -44,7 +45,7 @@ const Index: React.FC<IProps> = observer((props) => {
</Button>
<Button type="ghost" icon={<DownloadOutlined />} onClick={toPdf}>
pdf
pdf<Trans>Address</Trans>
</Button>
</Space>
}

@ -9,7 +9,7 @@ import { useMobStore } from "@/hooks";
import * as hiprintConfig from "./config";
import classnames from "classnames";
import styles from "./index.less";
import Trans from "@/utils/locale";
const { Header, Sider, Content } = Layout;
interface OwnProps {}
@ -88,7 +88,7 @@ const Design: FunctionComponent<Props> = observer((props) => {
</Button>
)}
<Button type="primary" icon={<EyeOutlined />} onClick={() => setOpen(true)}>
<Trans>Address</Trans>
</Button>
</Space>
</div>

@ -1,19 +1,20 @@
import * as React from 'react';
import moment from 'moment';
import store from 'store';
import { useIntl } from 'umi';
import { i18n } from './config';
import * as React from "react";
import moment from "moment";
import store from "store";
import { useIntl } from "umi";
import { i18n } from "./config";
export const languages = i18n ? i18n.languages.map((item) => item.key) : [];
export const defaultLanguage = i18n ? i18n.defaultLanguage : '';
export const defaultLanguage = i18n ? i18n.defaultLanguage : "";
export function getLocale() {
return store.get('locale') || defaultLanguage;
return store.get("locale") || defaultLanguage;
}
export function setLocale(language: string) {
if (getLocale() !== language) {
moment.locale(language === 'zh-CN' ? 'zh-CN' : language);
store.set('locale', language);
moment.locale(language === "zh-CN" ? "zh-CN" : language);
store.set("locale", language);
window.location.reload();
}
}
@ -21,7 +22,8 @@ export function setLocale(language: string) {
interface ITransProps {
children: string;
}
const Trans: React.FC<ITransProps> = ({ children }: any) => {
export default function Trans({ children }: ITransProps) {
const intl = useIntl();
return intl.formatMessage({ id: children });
};
return <>{intl.formatMessage({ id: children })}</>;
}

Loading…
Cancel
Save