维护年审任务管理国际化
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Card, Table, Button, message } from 'antd';
|
||||
import { useIntl, FormattedMessage } from 'umi';
|
||||
import styles from '../../supplierAnnualTaskManageDetail.less';
|
||||
|
||||
interface SupplierInfoProps {
|
||||
@ -8,6 +9,8 @@ interface SupplierInfoProps {
|
||||
}
|
||||
|
||||
const SupplierInfo: React.FC<SupplierInfoProps> = ({ taskData, onViewEvaluators }) => {
|
||||
const intl = useIntl();
|
||||
|
||||
// 查看供应商评价人员
|
||||
const handleViewSupplierEvaluators = (record: supplierAnnualTaskManage.TaskDetailData) => {
|
||||
if (record.userList && record.userList.length > 0) {
|
||||
@ -16,47 +19,51 @@ const SupplierInfo: React.FC<SupplierInfoProps> = ({ taskData, onViewEvaluators
|
||||
userList: record.userList,
|
||||
});
|
||||
} else {
|
||||
message.error('未找到该供应商的年审人员信息');
|
||||
message.error(intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierInfo.noEvaluators' }));
|
||||
}
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.index" />,
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
render: (_: any, __: any, index: number) => index + 1,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '供应商名称',
|
||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.supplierName" />,
|
||||
dataIndex: 'supplierName',
|
||||
key: 'supplierName',
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.dept" />,
|
||||
dataIndex: 'deptName',
|
||||
key: 'deptName',
|
||||
},
|
||||
{
|
||||
title: '品类',
|
||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.category" />,
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
render: (text: string) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.action" />,
|
||||
key: 'action',
|
||||
render: (record: any) => (
|
||||
<Button type="link" onClick={() => handleViewSupplierEvaluators(record)}>
|
||||
查看评价人员
|
||||
<FormattedMessage id="supplierAnnualTaskManage.supplierInfo.viewEvaluators" />
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
if (!taskData || !taskData.blackSupplierVos || taskData.blackSupplierVos.length === 0) {
|
||||
return <div className={styles.emptyData}>暂无供应商数据</div>;
|
||||
return (
|
||||
<div className={styles.emptyData}>
|
||||
<FormattedMessage id="supplierAnnualTaskManage.supplierInfo.empty" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user