供应商名称点击弹出问题
This commit is contained in:
@ -4,6 +4,7 @@ import SupplierRegisterInfo from '@/components/GlobalModal/components/SupplierRe
|
||||
import AccessCategoryTable from '@/components/GlobalModal/components/AccessCategoryTable';
|
||||
import TianyanchaInfo from '@/components/GlobalModal/components/TianyanchaInfo';
|
||||
import RiskList from '@/components/GlobalModal/components/RiskList';
|
||||
import ContactsInfo from '@/components/GlobalModal/components/ContactsInfo';
|
||||
import { coscoSupplierBase } from '@/components/GlobalModal/services';
|
||||
import { useIntl } from 'umi';
|
||||
|
||||
@ -13,7 +14,7 @@ interface SupplierDetailProps {
|
||||
|
||||
const SupplierDetail: React.FC<SupplierDetailProps> = ({ supplierId }) => {
|
||||
const intl = useIntl();
|
||||
const [modalType, setModalType] = useState<'register' | 'category' | 'tianyancha' | 'risk'>('register');
|
||||
const [modalType, setModalType] = useState<'register' | 'category' | 'tianyancha' | 'risk' | 'contactsInfo'>('register');
|
||||
const [registerInfo, setRegisterInfo] = useState<any>(null);
|
||||
|
||||
// 获取供应商信息
|
||||
@ -46,6 +47,9 @@ const SupplierDetail: React.FC<SupplierDetailProps> = ({ supplierId }) => {
|
||||
if (modalType === 'risk') {
|
||||
return supplierId ? <RiskList id={supplierId} /> : null;
|
||||
}
|
||||
if (modalType === 'contactsInfo') {
|
||||
return supplierId ? <ContactsInfo id={supplierId} /> : null;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@ -69,6 +73,7 @@ const SupplierDetail: React.FC<SupplierDetailProps> = ({ supplierId }) => {
|
||||
<Button type={modalType === 'category' ? 'primary' : 'default'} onClick={() => handleSwitch('category')}>{intl.formatMessage({ id: 'component.globalModal.category' })}</Button>
|
||||
<Button type={modalType === 'tianyancha' ? 'primary' : 'default'} onClick={() => handleSwitch('tianyancha')}>{intl.formatMessage({ id: 'component.globalModal.tianyancha' })}</Button>
|
||||
<Button type={modalType === 'risk' ? 'primary' : 'default'} onClick={() => handleSwitch('risk')}>{intl.formatMessage({ id: 'component.globalModal.ComplianceRisk' })}</Button>
|
||||
<Button type={modalType === 'contactsInfo' ? 'primary' : 'default'} onClick={() => handleSwitch('contactsInfo')}>{ '联系人' }</Button>
|
||||
</Space>
|
||||
<div style={{ height: '600px', overflowY: 'auto' }}>
|
||||
{renderContent()}
|
||||
|
Reference in New Issue
Block a user