Files
fe_supplier_frontend/src/components/CompanyInfo/index.tsx

47 lines
1.7 KiB
TypeScript
Raw Normal View History

2025-06-24 10:52:30 +08:00
import React, { useState } from 'react';
import { Tabs } from 'antd';
import { useIntl } from 'umi';
import BaseInfoTab from './component/BaseInfoTab';
import QualificationTab from './component/QualificationTab';
import InvoiceTab from './component/InvoiceTab';
2025-07-02 16:18:03 +08:00
import AttachmentsTab from './component/AttachmentsTab';
2025-06-24 10:52:30 +08:00
import ContactsInfoTab from './component/ContactsInfoTab';
import BankInfoTab from './component/BankInfoTab';
2025-07-02 16:18:03 +08:00
interface CompanyInfoProps {
viewType?: boolean;
}
2025-06-24 10:52:30 +08:00
const { TabPane } = Tabs;
2025-07-02 16:18:03 +08:00
const CompanyInfo: React.FC<CompanyInfoProps> = (props) => {
const { viewType = false } = props;
2025-06-24 10:52:30 +08:00
const intl = useIntl();
// 切换tab
const [subTab, setSubTab] = useState<string>('base');
return (
<Tabs activeKey={subTab} onChange={setSubTab}>
<TabPane tab={intl.formatMessage({ id: 'page.workbench.base' })} key="base">
2025-07-02 16:18:03 +08:00
<BaseInfoTab viewType={viewType} />
2025-06-24 10:52:30 +08:00
</TabPane>
<TabPane tab={intl.formatMessage({ id: 'page.workbench.qualification' })} key="qualification">
2025-07-02 16:18:03 +08:00
<QualificationTab viewType={viewType} />
2025-06-24 10:52:30 +08:00
</TabPane>
<TabPane tab={intl.formatMessage({ id: 'page.workbench.invoice' })} key="invoice">
2025-07-02 16:18:03 +08:00
<InvoiceTab viewType={viewType} />
2025-06-24 10:52:30 +08:00
</TabPane>
<TabPane tab={intl.formatMessage({ id: 'page.workbench.bank' })} key="bank">
2025-07-02 16:18:03 +08:00
<BankInfoTab viewType={viewType} />
2025-06-24 10:52:30 +08:00
</TabPane>
<TabPane tab={intl.formatMessage({ id: 'page.workbench.attachments' })} key="attachments">
2025-07-02 16:18:03 +08:00
<AttachmentsTab viewType={viewType} />
2025-06-24 10:52:30 +08:00
</TabPane>
<TabPane tab={intl.formatMessage({ id: 'page.workbench.contacts' })} key="contacts">
<ContactsInfoTab />
</TabPane>
</Tabs>
);
};
export default CompanyInfo;