import React from 'react'; import { Card, Table, Button, message, Tooltip } from 'antd'; import { useIntl, FormattedMessage } from 'umi'; import styles from '../../supplierAnnualTaskManageDetail.less'; import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext'; interface SupplierInfoProps { taskData: supplierAnnualTaskManage.TaskDetailData; onViewEvaluators: (supplier: any) => void; } const SupplierInfo: React.FC = ({ taskData, onViewEvaluators }) => { const intl = useIntl(); const supplierDetailModal = useSupplierDetailModal(); // 查看供应商评价人员 const handleViewSupplierEvaluators = (record: supplierAnnualTaskManage.TaskDetailData) => { if (record.userList && record.userList.length > 0) { onViewEvaluators({ ...record, userList: record.userList, }); } else { message.error(intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierInfo.noEvaluators' })); } }; const columns = [ { title: , dataIndex: 'index', key: 'index', render: (_: any, __: any, index: number) => index + 1, width: 80, }, { title: , dataIndex: 'supplierName', key: 'supplierName', render: (text: string, record: any) => ( supplierDetailModal?.(record.supplierId)}>{text} ), }, { title: , dataIndex: 'deptName', key: 'deptName', }, { title: , dataIndex: 'categoryName', key: 'categoryName', render: (text: string) => text || '--', }, { title: , key: 'action', render: (record: any) => ( ), }, ]; if (!taskData || !taskData.blackSupplierVos || taskData.blackSupplierVos.length === 0) { return (
); } return ( ); }; export default SupplierInfo;