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-07-03 10:24:33 +08:00
|
|
|
record?: string;
|
2025-07-02 16:18:03 +08:00
|
|
|
}
|
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) => {
|
2025-07-03 10:24:33 +08:00
|
|
|
const { viewType = false, record = '' } = 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-03 10:24:33 +08:00
|
|
|
<BaseInfoTab viewType={viewType} record={record} />
|
2025-06-24 10:52:30 +08:00
|
|
|
</TabPane>
|
|
|
|
<TabPane tab={intl.formatMessage({ id: 'page.workbench.qualification' })} key="qualification">
|
2025-07-03 10:24:33 +08:00
|
|
|
<QualificationTab viewType={viewType} record={record} />
|
2025-06-24 10:52:30 +08:00
|
|
|
</TabPane>
|
|
|
|
<TabPane tab={intl.formatMessage({ id: 'page.workbench.invoice' })} key="invoice">
|
2025-07-03 10:24:33 +08:00
|
|
|
<InvoiceTab viewType={viewType} record={record} />
|
2025-06-24 10:52:30 +08:00
|
|
|
</TabPane>
|
|
|
|
<TabPane tab={intl.formatMessage({ id: 'page.workbench.bank' })} key="bank">
|
2025-07-03 10:24:33 +08:00
|
|
|
<BankInfoTab viewType={viewType} record={record} />
|
2025-06-24 10:52:30 +08:00
|
|
|
</TabPane>
|
|
|
|
<TabPane tab={intl.formatMessage({ id: 'page.workbench.attachments' })} key="attachments">
|
2025-07-03 10:24:33 +08:00
|
|
|
<AttachmentsTab viewType={viewType} record={record} />
|
2025-06-24 10:52:30 +08:00
|
|
|
</TabPane>
|
|
|
|
<TabPane tab={intl.formatMessage({ id: 'page.workbench.contacts' })} key="contacts">
|
2025-07-03 10:24:33 +08:00
|
|
|
<ContactsInfoTab viewType={viewType} record={record} />
|
2025-06-24 10:52:30 +08:00
|
|
|
</TabPane>
|
|
|
|
</Tabs>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default CompanyInfo;
|