- {viewingRequest.request_code || viewingRequest.code}
- {getStatusTag(viewingRequest.status)}
-
- {viewingRequest.purchase_type === 'project' ? '项目采购' : '库存采购'}
+ {viewingRequest.request_code || viewingRequest.code}
+ {getStatusTag(viewingRequest.status)}
+
+ {viewingRequest.purchase_type === 'project' ? t('purchaseRequest.projectPurchase') : t('purchaseRequest.stockPurchase')}
- {viewingRequest.project_name || '-'}
- {viewingRequest.applicant}
- {viewingRequest.request_date}
- {viewingRequest.brief_description || '-'}
-
+ {viewingRequest.project_name || '-'}
+ {viewingRequest.applicant}
+ {viewingRequest.request_date}
+ {viewingRequest.brief_description || '-'}
+
{{
- material: '材料',
- equipment: '设备',
- pole: '电杆',
- other: '其他'
+ material: t('purchaseRequest.material'),
+ equipment: t('purchaseRequest.equipment'),
+ pole: t('purchaseRequest.pole'),
+ other: t('purchaseRequest.other')
}[viewingRequest.expense_category] || viewingRequest.expense_category}
-
+
{viewingRequest.currency} {viewingRequest.total_amount?.toFixed(2) || '0.00'}
-
+
{viewingRequest.expected_date || '-'}
-
+
{viewingRequest.created_at}
{viewingRequest.remark && (
- {viewingRequest.remark}
+ {viewingRequest.remark}
)}
@@ -1001,4 +1018,4 @@ const PurchaseRequestsPage: React.FC = () => {
)
}
-export default PurchaseRequestsPage
+export default PurchaseRequestsPage
\ No newline at end of file
diff --git a/frontend/src/pages/RolesPage.tsx b/frontend/src/pages/RolesPage.tsx
index 7fb9f83..aea8085 100644
--- a/frontend/src/pages/RolesPage.tsx
+++ b/frontend/src/pages/RolesPage.tsx
@@ -1,138 +1,140 @@
-import React from 'react';
-import { Card, Typography, Button, Table, Tag, Space, Modal, Form, Input, Checkbox, message, Tree } from 'antd';
-import { PlusOutlined, SafetyOutlined } from '@ant-design/icons';
-
-const { Title, Paragraph } = Typography;
-
-const RolesPage: React.FC = () => {
- const [loading] = React.useState(false);
- const [modalVisible, setModalVisible] = React.useState(false);
- const [form] = Form.useForm();
-
- const permissionTree = [
- {
- title: '项目管理',
- key: 'project',
- children: [
- { title: '查看项目', key: 'project:view' },
- { title: '创建项目', key: 'project:create' },
- { title: '编辑项目', key: 'project:edit' },
- { title: '删除项目', key: 'project:delete' },
- ],
- },
- {
- title: '财务管理',
- key: 'finance',
- children: [
- { title: '查看财务', key: 'finance:view' },
- { title: '预支审批', key: 'finance:advance' },
- { title: '报销审批', key: 'finance:reimburse' },
- { title: '付款审批', key: 'finance:payment' },
- ],
- },
- {
- title: '采购管理',
- key: 'procurement',
- children: [
- { title: '查看采购', key: 'procurement:view' },
- { title: '创建采购', key: 'procurement:create' },
- { title: '审批采购', key: 'procurement:approve' },
- ],
- },
- {
- title: '系统设置',
- key: 'system',
- children: [
- { title: '用户管理', key: 'system:users' },
- { title: '角色管理', key: 'system:roles' },
- { title: '系统配置', key: 'system:config' },
- ],
- },
- ];
-
- const columns = [
- { title: '角色ID', dataIndex: 'id', key: 'id', width: 100 },
- { title: '角色名称', dataIndex: 'name', key: 'name', width: 150 },
- { title: '角色描述', dataIndex: 'description', key: 'description' },
- {
- title: '权限数量',
- dataIndex: 'permissionCount',
- key: 'permissionCount',
- width: 100,
- render: (v: number) =>
{v} 项
- },
- { title: '创建时间', dataIndex: 'createdAt', key: 'createdAt', width: 150 },
- { title: '创建人', dataIndex: 'creator', key: 'creator', width: 120 },
- {
- title: '操作',
- key: 'action',
- width: 180,
- render: () => (
-
-
-
-
-
- )
- }
- ];
-
- const data = [
- { key: '1', id: 'R001', name: '超级管理员', description: '拥有系统所有权限', permissionCount: 50, createdAt: '2026-01-01', creator: '系统' },
- { key: '2', id: 'R002', name: '项目经理', description: '项目管理、施工管理权限', permissionCount: 25, createdAt: '2026-01-15', creator: 'admin' },
- { key: '3', id: 'R003', name: '财务经理', description: '财务管理、审批权限', permissionCount: 18, createdAt: '2026-02-01', creator: 'admin' },
- { key: '4', id: 'R004', name: '普通员工', description: '查看和申请权限', permissionCount: 10, createdAt: '2026-02-15', creator: 'admin' },
- ];
-
- const handleSubmit = () => {
- message.success('角色已创建');
- setModalVisible(false);
- };
-
- return (
-
-
-
-
-
- } onClick={() => setModalVisible(true)}>
- 新增角色
-
-
-
-
-
-
-
-
-
setModalVisible(false)}
- onOk={handleSubmit}
- width={600}
- >
-
- } />
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default RolesPage;
+import React from 'react';
+import { Card, Typography, Button, Table, Tag, Space, Modal, Form, Input, Checkbox, message, Tree } from 'antd';
+import { PlusOutlined, SafetyOutlined } from '@ant-design/icons';
+import { useLanguageStore } from '../store/languageStore';
+
+const { Title, Paragraph } = Typography;
+
+const RolesPage: React.FC = () => {
+ const { t, currentLanguage } = useLanguageStore();
+ const [loading] = React.useState(false);
+ const [modalVisible, setModalVisible] = React.useState(false);
+ const [form] = Form.useForm();
+
+ const permissionTree = [
+ {
+ title: t('roles.permProject'),
+ key: 'project',
+ children: [
+ { title: t('roles.permViewProject'), key: 'project:view' },
+ { title: t('roles.permCreateProject'), key: 'project:create' },
+ { title: t('roles.permEditProject'), key: 'project:edit' },
+ { title: t('roles.permDeleteProject'), key: 'project:delete' },
+ ],
+ },
+ {
+ title: t('roles.permFinance'),
+ key: 'finance',
+ children: [
+ { title: t('roles.permViewFinance'), key: 'finance:view' },
+ { title: t('roles.permApproveAdvance'), key: 'finance:advance' },
+ { title: t('roles.permApproveReimburse'), key: 'finance:reimburse' },
+ { title: t('roles.permApprovePayment'), key: 'finance:payment' },
+ ],
+ },
+ {
+ title: t('roles.permProcurement'),
+ key: 'procurement',
+ children: [
+ { title: t('roles.permViewProcurement'), key: 'procurement:view' },
+ { title: t('roles.permCreateProcurement'), key: 'procurement:create' },
+ { title: t('roles.permApproveProcurement'), key: 'procurement:approve' },
+ ],
+ },
+ {
+ title: t('roles.permSystem'),
+ key: 'system',
+ children: [
+ { title: t('roles.permUserManagement'), key: 'system:users' },
+ { title: t('roles.permRoleManagement'), key: 'system:roles' },
+ { title: t('roles.permSystemConfig'), key: 'system:config' },
+ ],
+ },
+ ];
+
+ const columns = [
+ { title: t('roles.roleId'), dataIndex: 'id', key: 'id', width: 100 },
+ { title: t('roles.roleName'), dataIndex: 'name', key: 'name', width: 150 },
+ { title: t('roles.roleDesc'), dataIndex: 'description', key: 'description' },
+ {
+ title: t('roles.permCount'),
+ dataIndex: 'permissionCount',
+ key: 'permissionCount',
+ width: 100,
+ render: (v: number) =>
{v} {t('common.item')}
+ },
+ { title: t('roles.createdAt'), dataIndex: 'createdAt', key: 'createdAt', width: 150 },
+ { title: t('roles.creator'), dataIndex: 'creator', key: 'creator', width: 120 },
+ {
+ title: t('roles.action'),
+ key: 'action',
+ width: 180,
+ render: () => (
+
+
+
+
+
+ )
+ }
+ ];
+
+ const data = [
+ { key: '1', id: 'R001', name: t('roles.superAdmin'), description: t('roles.superAdminDesc'), permissionCount: 50, createdAt: '2026-01-01', creator: t('roles.admin') },
+ { key: '2', id: 'R002', name: t('user.manager'), description: t('roles.adminDesc'), permissionCount: 25, createdAt: '2026-01-15', creator: 'admin' },
+ { key: '3', id: 'R003', name: t('roles.financeManager'), description: t('roles.financeManagerDesc'), permissionCount: 18, createdAt: '2026-02-01', creator: 'admin' },
+ { key: '4', id: 'R004', name: t('roles.employee'), description: t('roles.employeeDesc'), permissionCount: 10, createdAt: '2026-02-15', creator: 'admin' },
+ ];
+
+ const handleSubmit = () => {
+ message.success(t('roles.roleCreated'));
+ setModalVisible(false);
+ };
+
+ return (
+
+
+
+
{t('roles.title')}
+
{t('roles.description')}
+
+
+
+ } onClick={() => setModalVisible(true)}>
+ {t('roles.newRole')}
+
+
+
+
+
+
+
+
+
setModalVisible(false)}
+ onOk={handleSubmit}
+ width={600}
+ >
+
+ } />
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default RolesPage;
\ No newline at end of file
diff --git a/frontend/src/pages/SubcontractorDetail.tsx b/frontend/src/pages/SubcontractorDetail.tsx
index c09dfff..a2d191f 100644
--- a/frontend/src/pages/SubcontractorDetail.tsx
+++ b/frontend/src/pages/SubcontractorDetail.tsx
@@ -8,6 +8,7 @@ import {
FileTextOutlined, DollarOutlined, BankOutlined
} from '@ant-design/icons'
import BusinessLedgerTab from '../components/BusinessLedgerTab'
+import { useLanguageStore } from '../store/languageStore'
const { Title, Text } = Typography
@@ -68,6 +69,7 @@ interface Subcontractor {
const SubcontractorDetail: React.FC = () => {
const { id } = useParams<{ id: string }>()
const navigate = useNavigate()
+ const { t, currentLanguage } = useLanguageStore()
const [subcontractor, setSubcontractor] = useState
(null)
const [loading, setLoading] = useState(true)
const [activeTab, setActiveTab] = useState('basic')
@@ -89,12 +91,12 @@ const SubcontractorDetail: React.FC = () => {
}
if (loading) return
- if (!subcontractor) return
+ if (!subcontractor) return
return (
} onClick={() => navigate('/subcontractors')} style={{ marginBottom: 16 }} type="text">
- 返回列表
+ {t('subcontractor.returnToList')}
@@ -105,65 +107,65 @@ const SubcontractorDetail: React.FC = () => {
{/* TAB1: 基本信息 */}
- 基本信息} key="basic">
+ {t('subcontractor.basicInfo')}} key="basic">
- {subcontractor.code}
- {subcontractor.scope || '-'}
- {subcontractor.country || '-'}
+ {subcontractor.code}
+ {subcontractor.scope || '-'}
+ {subcontractor.country || '-'}
{subcontractor.features && (
-
特点:
+
{t('subcontractor.featureLabel')}
{subcontractor.features}
)}
{subcontractor.remark && (
-
备注:
+
{t('subcontractor.remarkLabel')}
{subcontractor.remark}
)}
{/* TAB2: 联系人 */}
- 联系人} key="contacts">
+ {t('subcontractor.contact')}} key="contacts">
{(subcontractor.contacts || []).map((contact, i) => (
- {contact.name || '未命名'}
- {contact.is_primary && 主联系人}
+ {contact.name || t('common.unnamed')}
+ {contact.is_primary && {t('subcontractor.mainContactTag')}}
- {contact.position &&
职位:{contact.position}
}
- {contact.phone &&
电话:{contact.phone}
}
+ {contact.position &&
{t('subcontractor.positionLabel')}{contact.position}
}
+ {contact.phone &&
{t('subcontractor.phoneLabel')}{contact.phone}
}
))}
- {(subcontractor.contacts || []).length === 0 && }
+ {(subcontractor.contacts || []).length === 0 && }
{/* TAB3: 收款信息 */}
- 收款信息} key="payment">
+ {t('subcontractor.paymentInfo')}} key="payment">
{(subcontractor.payment_infos || []).map((payment, i) => (
{payment.account_name}
- {payment.is_primary && 默认账户}
+ {payment.is_primary && {t('subcontractor.defaultAccount')}}
-
银行:{payment.bank_name}
-
账号:{payment.bank_account}
+
{t('subcontractor.bankLabel')}{payment.bank_name}
+
{t('subcontractor.accountLabel')}{payment.bank_account}
{payment.qr_code && (
-
二维码:
+
{t('subcontractor.qrCodeLabel')}
-

+
)}
@@ -172,11 +174,11 @@ const SubcontractorDetail: React.FC = () => {
))}
- {(subcontractor.payment_infos || []).length === 0 &&
}
+ {(subcontractor.payment_infos || []).length === 0 &&
}
{/* TAB4: 业务台账 */}
-
业务台账} key="ledger">
+ {t('subcontractor.ledger')}} key="ledger">
{
)
}
-export default SubcontractorDetail
+export default SubcontractorDetail
\ No newline at end of file
diff --git a/frontend/src/pages/SubcontractorsPage.tsx b/frontend/src/pages/SubcontractorsPage.tsx
index 3ddc3c5..3425f84 100644
--- a/frontend/src/pages/SubcontractorsPage.tsx
+++ b/frontend/src/pages/SubcontractorsPage.tsx
@@ -5,6 +5,7 @@ import { PlusOutlined, EditOutlined, DeleteOutlined, SearchOutlined, SolutionOut
import type { ColumnsType } from 'antd/es/table'
import FileUpload from '../components/FileUpload'
import useFormDraft from '../hooks/useFormDraft'
+import { useLanguageStore } from '../store/languageStore'
interface Contact {
name: string
@@ -39,6 +40,7 @@ interface Subcontractor {
const SubcontractorPage: React.FC = () => {
const navigate = useNavigate()
+ const { t, currentLanguage } = useLanguageStore()
const [subcontractors, setSubcontractors] = useState([])
const [loading, setLoading] = useState(false)
const [modalVisible, setModalVisible] = useState(false)
@@ -63,7 +65,7 @@ const SubcontractorPage: React.FC = () => {
const data = await response.json()
if (data.success) setSubcontractors(data.data || [])
} catch (error) {
- message.error('获取分包商列表失败')
+ message.error(t('subcontractor.getListFailed'))
} finally {
setLoading(false)
}
@@ -89,16 +91,16 @@ const SubcontractorPage: React.FC = () => {
const columns: ColumnsType = [
{
- title: '名称', dataIndex: 'name', key: 'name',
+ title: t('subcontractor.name'), dataIndex: 'name', key: 'name',
render: (text, record) => (
)
},
- { title: '承包范围', dataIndex: 'scope', key: 'scope', width: 120 },
- { title: '国家', dataIndex: 'country', key: 'country', width: 80, render: (c) => {c || '-'} },
- { title: '合同金额', dataIndex: 'total_contract_amount', key: 'total_contract_amount', width: 100, render: (v) => `¥${(v || 0).toLocaleString()}` },
- { title: '应付金额', dataIndex: 'total_payable', key: 'total_payable', width: 100, render: (v) => 0 ? '#ff4d4f' : '#52c41a' }}>¥{(v || 0).toLocaleString()} },
- { title: '操作', key: 'actions', width: 100, render: (_, record) => (
+ { title: t('subcontractor.scope'), dataIndex: 'scope', key: 'scope', width: 120 },
+ { title: t('subcontractor.country'), dataIndex: 'country', key: 'country', width: 80, render: (c) => {c || '-'} },
+ { title: t('subcontractor.contractAmount'), dataIndex: 'total_contract_amount', key: 'total_contract_amount', width: 100, render: (v) => `¥${(v || 0).toLocaleString()}` },
+ { title: t('subcontractor.payableAmount'), dataIndex: 'total_payable', key: 'total_payable', width: 100, render: (v) => 0 ? '#ff4d4f' : '#52c41a' }}>¥{(v || 0).toLocaleString()} },
+ { title: t('common.action'), key: 'actions', width: 100, render: (_, record) => (
} onClick={() => handleEdit(record)} size="small" />
} onClick={() => handleDelete(record.id)} size="small" />
@@ -156,17 +158,17 @@ const SubcontractorPage: React.FC = () => {
})
const data = await response.json()
if (data.success) {
- message.success(editingSubcontractor ? '更新成功' : '创建成功')
+ message.success(editingSubcontractor ? t('common.updateSuccess') : t('common.createSuccess'))
clearDraft()
setModalVisible(false)
form.resetFields()
setEditingSubcontractor(null)
fetchSubcontractors()
} else {
- message.error(data.message || '操作失败')
+ message.error(data.message || t('common.operationFailed'))
}
} catch (error) {
- message.error('操作失败')
+ message.error(t('common.operationFailed'))
}
}
@@ -186,14 +188,14 @@ const SubcontractorPage: React.FC = () => {
const handleDelete = async (id: number) => {
Modal.confirm({
- title: '确认删除', content: '确定要删除此分包商吗?', okText: '确定', cancelText: '取消',
+ title: t('common.confirmDelete'), content: t('subcontractor.confirmDeleteMsg'), okText: t('common.confirm'), cancelText: t('common.cancel'),
onOk: async () => {
try {
const response = await fetch(`/api/subcontractors/${id}`, { method: 'DELETE' })
const data = await response.json()
- if (data.success) { message.success('删除成功'); fetchSubcontractors() }
- else message.error(data.message || '删除失败')
- } catch (error) { message.error('删除失败') }
+ if (data.success) { message.success(t('common.deleteSuccess')); fetchSubcontractors() }
+ else message.error(data.message || t('common.deleteFailed'))
+ } catch (error) { message.error(t('common.deleteFailed')) }
}
})
}
@@ -211,10 +213,10 @@ const SubcontractorPage: React.FC = () => {
setTimeout(() => {
if (hasDraft()) {
Modal.confirm({
- title: '发现未完成的草稿',
- content: '检测到上次未提交的分包商信息,是否恢复?',
- okText: '恢复草稿',
- cancelText: '重新填写',
+ title: t('common.draftFound'),
+ content: t('common.draftRestore'),
+ okText: t('common.restoreDraft'),
+ cancelText: t('common.reFill'),
onOk: () => {
restoreDraft()
},
@@ -235,89 +237,90 @@ const SubcontractorPage: React.FC = () => {
return (
- } />
-
- 0 ? '#ff4d4f' : '#52c41a' }} />
+ } />
+
+ 0 ? '#ff4d4f' : '#52c41a' }} />
- } value={searchText} onChange={(e) => setSearchText(e.target.value)} allowClear style={{ width: 350 }} />
- } onClick={handleAdd}>新增分包商
+ } value={searchText} onChange={(e) => setSearchText(e.target.value)} allowClear style={{ width: 350 }} />
+ } onClick={handleAdd}>{t('subcontractor.newSubcontractor')}
- `共 ${total} 条` }} scroll={{ x: 1100 }} />
+ t('common.totalCount', { total }) }} scroll={{ x: 1100 }} />
- {
if (form.isFieldsTouched()) {
Modal.confirm({
- title: '确认关闭',
- content: '表单数据尚未保存,关闭后可通过草稿恢复。确定关闭吗?',
- okText: '关闭',
- cancelText: '继续编辑',
+ title: t('common.closeConfirm'),
+ content: t('common.closeConfirmMsg'),
+ okText: t('common.close'),
+ cancelText: t('common.continueEdit'),
onOk: () => {
saveDraft()
+ form.resetFields();
setModalVisible(false)
- form.resetFields()
setEditingSubcontractor(null)
},
})
} else {
+ form.resetFields();
setModalVisible(false)
- form.resetFields()
setEditingSubcontractor(null)
}
- }}
- onOk={() => form.submit()}
+ }}
+ onOk={() => form.submit()}
+ destroyOnClose
width={800}
maskClosable={false}
>
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
- 联系人
+ {t('subcontractor.contact')}
{(fields, { add, remove }) => (
{fields.map(({ key, name, ...restField }) => (
))}
-
+
)}
- 收款信息
+ {t('subcontractor.paymentInfo')}
{(fields, { add, remove }) => (
{fields.map(({ key, name, ...restField }) => (
))}
)}
@@ -384,4 +387,4 @@ const SubcontractorPage: React.FC = () => {
)
}
-export default SubcontractorPage
+export default SubcontractorPage
\ No newline at end of file
diff --git a/frontend/src/pages/SupplierDetail.tsx b/frontend/src/pages/SupplierDetail.tsx
index c992c21..416159f 100644
--- a/frontend/src/pages/SupplierDetail.tsx
+++ b/frontend/src/pages/SupplierDetail.tsx
@@ -7,6 +7,7 @@ import {
ArrowLeftOutlined, ShopOutlined, UserOutlined, PhoneOutlined, BankOutlined, DollarOutlined
} from '@ant-design/icons'
import BusinessLedgerTab from '../components/BusinessLedgerTab'
+import { useLanguageStore } from '../store/languageStore'
const { Title, Text } = Typography
@@ -66,6 +67,7 @@ interface Supplier {
const SupplierDetail: React.FC = () => {
const { id } = useParams<{ id: string }>()
const navigate = useNavigate()
+ const { t, currentLanguage } = useLanguageStore()
const [supplier, setSupplier] = useState(null)
const [loading, setLoading] = useState(true)
const [activeTab, setActiveTab] = useState('basic')
@@ -87,22 +89,22 @@ const SupplierDetail: React.FC = () => {
}
if (loading) return
- if (!supplier) return
+ if (!supplier) return
const tabItems = [
{
key: 'basic',
- label: 基本信息,
+ label: {t('supplier.basicInfo')},
children: (
<>
- {supplier.code}
- {supplier.supply_category || '-'}
- {supplier.country || '-'}
+ {supplier.code}
+ {supplier.supply_category || '-'}
+ {supplier.country || '-'}
{supplier.remark && (
-
备注:
+
{t('supplier.remarkLabel')}
{supplier.remark}
)}
@@ -111,7 +113,7 @@ const SupplierDetail: React.FC = () => {
},
{
key: 'contacts',
- label: 联系人,
+ label: {t('supplier.contact')},
children: (
<>
@@ -119,24 +121,24 @@ const SupplierDetail: React.FC = () => {
- {contact.name || '未命名'}
- {contact.is_primary && 主联系人}
+ {contact.name || t('common.unnamed')}
+ {contact.is_primary && {t('supplier.mainContactTag')}}
- {contact.position &&
职位:{contact.position}
}
- {contact.phone &&
电话:{contact.phone}
}
+ {contact.position &&
{t('supplier.positionLabel')}{contact.position}
}
+ {contact.phone &&
{t('supplier.phoneLabel')}{contact.phone}
}
))}
- {(supplier.contacts || []).length === 0 && }
+ {(supplier.contacts || []).length === 0 && }
>
)
},
{
key: 'payment',
- label: 收款信息,
+ label: {t('supplier.paymentInfo')},
children: (
<>
@@ -144,17 +146,17 @@ const SupplierDetail: React.FC = () => {
- {payment.bank_name || '未命名'}
- {payment.is_primary && 主要收款账户}
+ {payment.bank_name || t('common.unnamed')}
+ {payment.is_primary && {t('supplier.mainAccountTag')}}
- {payment.account_name &&
户名:{payment.account_name}
}
- {payment.bank_account &&
账号:{payment.bank_account}
}
+ {payment.account_name &&
{t('supplier.accountNameLabel')}{payment.account_name}
}
+ {payment.bank_account &&
{t('supplier.accountNumLabel')}{payment.bank_account}
}
{payment.qr_code && (
-
收款码:
+
{t('supplier.qrCodeLabel')}
-

+
)}
@@ -163,13 +165,13 @@ const SupplierDetail: React.FC = () => {
))}
- {(supplier.payment_infos || []).length === 0 &&
}
+ {(supplier.payment_infos || []).length === 0 &&
}
>
)
},
{
key: 'ledger',
- label:
业务台账,
+ label:
{t('supplier.ledger')},
children: (
{
return (
} onClick={() => navigate('/suppliers')} style={{ marginBottom: 16 }} type="text">
- 返回列表
+ {t('supplier.returnToList')}
@@ -198,4 +200,4 @@ const SupplierDetail: React.FC = () => {
)
}
-export default SupplierDetail
+export default SupplierDetail
\ No newline at end of file
diff --git a/frontend/src/pages/SuppliersPage.tsx b/frontend/src/pages/SuppliersPage.tsx
index 8e1531d..6c9b92d 100644
--- a/frontend/src/pages/SuppliersPage.tsx
+++ b/frontend/src/pages/SuppliersPage.tsx
@@ -5,6 +5,7 @@ import { PlusOutlined, EditOutlined, DeleteOutlined, SearchOutlined, ShopOutline
import type { ColumnsType } from 'antd/es/table'
import FileUpload from '../components/FileUpload'
import useFormDraft from '../hooks/useFormDraft'
+import { useLanguageStore } from '../store/languageStore'
interface Contact {
name: string
@@ -39,6 +40,7 @@ interface Supplier {
const SupplierPage: React.FC = () => {
const navigate = useNavigate()
const location = useLocation()
+ const { t, currentLanguage } = useLanguageStore()
const [suppliers, setSuppliers] = useState([])
const [loading, setLoading] = useState(false)
const [modalVisible, setModalVisible] = useState(false)
@@ -66,7 +68,7 @@ const SupplierPage: React.FC = () => {
const data = await response.json()
if (data.success) setSuppliers(data.data || [])
} catch (error) {
- message.error('获取供应商列表失败')
+ message.error(t('supplier.getListFailed'))
} finally {
setLoading(false)
}
@@ -92,7 +94,7 @@ const SupplierPage: React.FC = () => {
const columns: ColumnsType