同上修改table单位和部门字段
This commit is contained in:
@ -35,7 +35,6 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
| undefined
|
||||
>();
|
||||
|
||||
|
||||
// 获取数据
|
||||
const fetchStatisticsData = async (current = 1, pageSize = 10, params = searchParams) => {
|
||||
// 如果params没传,证明是重置
|
||||
@ -134,16 +133,23 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
ellipsis: true,
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
|
||||
|
||||
// 多于1条
|
||||
const allNames = value.map(item => item.categoryPathName).join('\n');
|
||||
const allNames = value.map((item) => item.categoryPathName).join('\n');
|
||||
return (
|
||||
<Tooltip title={<pre style={{ margin: 0, fontSize: 12, fontFamily: '微软雅黑', whiteSpace: 'pre-wrap' }}>{allNames}</pre>} overlayStyle={{ zIndex: 1200 }}>
|
||||
<Tooltip
|
||||
title={
|
||||
<pre
|
||||
style={{ margin: 0, fontSize: 12, fontFamily: '微软雅黑', whiteSpace: 'pre-wrap' }}
|
||||
>
|
||||
{allNames}
|
||||
</pre>
|
||||
}
|
||||
overlayStyle={{ zIndex: 1200 }}
|
||||
>
|
||||
<span>
|
||||
{value[0].categoryName}
|
||||
{value.length !== 1 && (
|
||||
<span>等</span>
|
||||
)}
|
||||
{value.length !== 1 && <span>等</span>}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
@ -168,6 +174,14 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
dataIndex: 'deptName',
|
||||
key: 'deptName',
|
||||
width: 120,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text: string) => (
|
||||
<Tooltip placement="topLeft" title={text}>
|
||||
{text}
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.common.accessYear' }),
|
||||
@ -189,8 +203,12 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
const values = form.getFieldsValue();
|
||||
const params = {
|
||||
...values,
|
||||
startTime: values.annualreviewYear ? moment(values.annualreviewYear).format('YYYY-MM-DD') : undefined,
|
||||
endTime: values.annualreviewYear ? moment(values.annualreviewYear).add(1, 'year').format('YYYY-MM-DD') : undefined,
|
||||
startTime: values.annualreviewYear
|
||||
? moment(values.annualreviewYear).format('YYYY-MM-DD')
|
||||
: undefined,
|
||||
endTime: values.annualreviewYear
|
||||
? moment(values.annualreviewYear).add(1, 'year').format('YYYY-MM-DD')
|
||||
: undefined,
|
||||
};
|
||||
delete params.annualreviewYear;
|
||||
downloadFile('/coscoAccessSupplier/getPageExport', 'GET', params);
|
||||
|
@ -136,6 +136,9 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
width: 120,
|
||||
ellipsis: {
|
||||
showTitle: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.common.accessUnit' }),
|
||||
@ -162,6 +165,9 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
dataIndex: 'orgNameList',
|
||||
key: 'orgNameList',
|
||||
width: 120,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (orgNameList: supplierAnnualTaskManage.SupplierOrgNameList[]) => (
|
||||
<>
|
||||
{orgNameList && orgNameList.length > 0 ? (
|
||||
|
@ -164,7 +164,7 @@ const SupplierEvaluateStatistics: React.FC = () => {
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (orgNameList: SupplierTaskManage.SupplierOrgNameList[]) => (
|
||||
render: (orgNameList: SupplierTaskManage.SupplierOrgNameList[]) => (
|
||||
<>
|
||||
{orgNameList && orgNameList.length > 0 ? (
|
||||
<Tooltip placement="topLeft" title={orgNameList.map((item) => item.orgName).join(',')}>
|
||||
@ -181,6 +181,9 @@ const SupplierEvaluateStatistics: React.FC = () => {
|
||||
dataIndex: 'orgNameList',
|
||||
key: 'orgNameList',
|
||||
width: 120,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (orgNameList: SupplierTaskManage.SupplierOrgNameList[]) => (
|
||||
<>
|
||||
{orgNameList && orgNameList.length > 0 ? (
|
||||
|
@ -146,7 +146,15 @@ const SupplierExitStatistics: React.FC = () => {
|
||||
title: intl.formatMessage({ id: 'dataStatistics.exit.exitDept' }),
|
||||
dataIndex: 'accessDept',
|
||||
key: 'accessDept',
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
width: 120,
|
||||
render: (text: string) => (
|
||||
<Tooltip placement="topLeft" title={text}>
|
||||
{text}
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.exit.applyUser' }),
|
||||
|
@ -147,6 +147,14 @@ const SupplierQualificationWarningStatistics: React.FC = () => {
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
width: 120,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text: string) => (
|
||||
<Tooltip placement="topLeft" title={text}>
|
||||
{text}
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.common.accessUnit' }),
|
||||
@ -167,6 +175,14 @@ const SupplierQualificationWarningStatistics: React.FC = () => {
|
||||
dataIndex: 'accessDept',
|
||||
key: 'accessDept',
|
||||
width: 120,
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text: string) => (
|
||||
<Tooltip placement="topLeft" title={text}>
|
||||
{text}
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.qualification.qualificationName' }),
|
||||
|
Reference in New Issue
Block a user