Merge branch 'dev' of http://59.110.10.99:53000/liuc/fe_supplier_frontend into dev
This commit is contained in:
@ -20,7 +20,9 @@ const SupplierInfo: React.FC<SupplierInfoProps> = ({ taskData, onViewEvaluators
|
|||||||
userList: record.userList,
|
userList: record.userList,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
message.error(intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierInfo.noEvaluators' }));
|
message.error(
|
||||||
|
intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierInfo.noEvaluators' }),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,8 +46,19 @@ const SupplierInfo: React.FC<SupplierInfoProps> = ({ taskData, onViewEvaluators
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.dept" />,
|
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.dept" />,
|
||||||
dataIndex: 'deptName',
|
dataIndex: 'orgNameList',
|
||||||
key: 'deptName',
|
key: 'orgNameList',
|
||||||
|
render: (orgNameList: supplierAnnualTaskManage.SupplierOrgNameList[]) => (
|
||||||
|
<>
|
||||||
|
{orgNameList && orgNameList.length > 0 ? (
|
||||||
|
<Tooltip placement="topLeft" title={orgNameList.map((item) => item.deptName).join(',')}>
|
||||||
|
{orgNameList[0].deptName}
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.category" />,
|
title: <FormattedMessage id="supplierAnnualTaskManage.supplierInfo.category" />,
|
||||||
|
@ -34,7 +34,7 @@ const SupplierTable: React.FC<SupplierTableProps> = ({
|
|||||||
const showDeleteConfirm = (record: supplierAnnualTaskManage.SupplierItem) => {
|
const showDeleteConfirm = (record: supplierAnnualTaskManage.SupplierItem) => {
|
||||||
let content = intl.formatMessage(
|
let content = intl.formatMessage(
|
||||||
{ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.content' },
|
{ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.content' },
|
||||||
{ supplierName: record.supplierName }
|
{ supplierName: record.supplierName },
|
||||||
);
|
);
|
||||||
|
|
||||||
if (record.evaluatorCount && record.evaluatorCount > 0) {
|
if (record.evaluatorCount && record.evaluatorCount > 0) {
|
||||||
@ -42,17 +42,23 @@ const SupplierTable: React.FC<SupplierTableProps> = ({
|
|||||||
{ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.content.withEvaluators' },
|
{ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.content.withEvaluators' },
|
||||||
{
|
{
|
||||||
supplierName: record.supplierName,
|
supplierName: record.supplierName,
|
||||||
count: record.evaluatorCount
|
count: record.evaluatorCount,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.title' }),
|
title: intl.formatMessage({
|
||||||
|
id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.title',
|
||||||
|
}),
|
||||||
content: content,
|
content: content,
|
||||||
okText: intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.okText' }),
|
okText: intl.formatMessage({
|
||||||
|
id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.okText',
|
||||||
|
}),
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
cancelText: intl.formatMessage({ id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.cancelText' }),
|
cancelText: intl.formatMessage({
|
||||||
|
id: 'supplierAnnualTaskManage.supplierTable.confirm.delete.cancelText',
|
||||||
|
}),
|
||||||
onOk: () => onDeleteSupplier(record.id),
|
onOk: () => onDeleteSupplier(record.id),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -89,9 +95,20 @@ const SupplierTable: React.FC<SupplierTableProps> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierTable.deptName" />,
|
title: <FormattedMessage id="supplierAnnualTaskManage.supplierTable.deptName" />,
|
||||||
dataIndex: 'deptName',
|
dataIndex: 'orgNameList',
|
||||||
key: 'deptName',
|
key: 'orgNameList',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
render: (orgNameList: supplierAnnualTaskManage.SupplierOrgNameList[]) => (
|
||||||
|
<>
|
||||||
|
{orgNameList && orgNameList.length > 0 ? (
|
||||||
|
<Tooltip placement="topLeft" title={orgNameList.map((item) => item.deptName).join(',')}>
|
||||||
|
{orgNameList[0].deptName}
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <FormattedMessage id="supplierAnnualTaskManage.supplierTable.evaluatorCount" />,
|
title: <FormattedMessage id="supplierAnnualTaskManage.supplierTable.evaluatorCount" />,
|
||||||
|
@ -61,8 +61,19 @@ const SupplierInfo: React.FC<SupplierInfoProps> = ({ taskData, onViewEvaluators
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'supplierTaskManage.column.deptName' }),
|
title: intl.formatMessage({ id: 'supplierTaskManage.column.deptName' }),
|
||||||
dataIndex: 'deptName',
|
dataIndex: 'orgNameList',
|
||||||
key: 'deptName',
|
key: 'orgNameList',
|
||||||
|
render: (orgNameList: SupplierTaskManage.SupplierOrgNameList[]) => (
|
||||||
|
<>
|
||||||
|
{orgNameList && orgNameList.length > 0 ? (
|
||||||
|
<Tooltip placement="topLeft" title={orgNameList.map((item) => item.deptName).join(',')}>
|
||||||
|
{orgNameList[0].deptName}
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'supplierTaskManage.column.categoryName' }),
|
title: intl.formatMessage({ id: 'supplierTaskManage.column.categoryName' }),
|
||||||
|
@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
|
|||||||
import { Table, Space, Button, Tag, Modal, Tooltip } from 'antd';
|
import { Table, Space, Button, Tag, Modal, Tooltip } from 'antd';
|
||||||
import { useIntl } from 'umi';
|
import { useIntl } from 'umi';
|
||||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||||
|
import { render } from 'react-dom';
|
||||||
|
|
||||||
interface SupplierTableProps {
|
interface SupplierTableProps {
|
||||||
suppliers: SupplierTaskManage.SupplierItem[]; // 供应商数据列表
|
suppliers: SupplierTaskManage.SupplierItem[]; // 供应商数据列表
|
||||||
@ -38,8 +39,8 @@ const SupplierTable: React.FC<SupplierTableProps> = ({
|
|||||||
{ id: 'supplierTaskManage.modal.deleteSupplier.content' },
|
{ id: 'supplierTaskManage.modal.deleteSupplier.content' },
|
||||||
{
|
{
|
||||||
name: record.supplierName,
|
name: record.supplierName,
|
||||||
evaluatorCount: record.evaluatorCount || 0
|
evaluatorCount: record.evaluatorCount || 0,
|
||||||
}
|
},
|
||||||
),
|
),
|
||||||
okText: intl.formatMessage({ id: 'supplierTaskManage.button.confirm' }),
|
okText: intl.formatMessage({ id: 'supplierTaskManage.button.confirm' }),
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
@ -80,9 +81,20 @@ const SupplierTable: React.FC<SupplierTableProps> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'supplierTaskManage.column.deptName' }),
|
title: intl.formatMessage({ id: 'supplierTaskManage.column.deptName' }),
|
||||||
dataIndex: 'deptName',
|
dataIndex: 'orgNameList',
|
||||||
key: 'deptName',
|
key: 'orgNameList',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
render: (orgNameList: SupplierTaskManage.SupplierOrgNameList[]) => (
|
||||||
|
<>
|
||||||
|
{orgNameList && orgNameList.length > 0 ? (
|
||||||
|
<Tooltip placement="topLeft" title={orgNameList.map((item) => item.deptName).join(',')}>
|
||||||
|
{orgNameList[0].deptName}
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'supplierTaskManage.column.evaluatorCount' }),
|
title: intl.formatMessage({ id: 'supplierTaskManage.column.evaluatorCount' }),
|
||||||
|
@ -13,37 +13,43 @@ declare namespace supplierAnnualTaskManage {
|
|||||||
basePageRequest: BasePageRequest;
|
basePageRequest: BasePageRequest;
|
||||||
[property: string]: any;
|
[property: string]: any;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
人员信息
|
人员信息
|
||||||
*/
|
*/
|
||||||
interface PersonnelItem {
|
interface PersonnelItem {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
userId: string;
|
userId: string;
|
||||||
userName: string;
|
userName: string;
|
||||||
position: string;
|
position: string;
|
||||||
userDept: string;
|
userDept: string;
|
||||||
userDeptId: string;
|
userDeptId: string;
|
||||||
indicatorIds?: string[];
|
indicatorIds?: string[];
|
||||||
isSelected?: boolean;
|
isSelected?: boolean;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 供应商项
|
* 供应商项
|
||||||
*/
|
*/
|
||||||
interface SupplierItem {
|
interface SupplierItem {
|
||||||
id: string; // 供应商ID
|
id: string; // 供应商ID
|
||||||
supplierName: string; // 供应商名称
|
supplierName: string; // 供应商名称
|
||||||
supplierId?: string; // 供应商ID
|
supplierId?: string; // 供应商ID
|
||||||
socialCreditCode?: string; // 统一社会信用代码
|
socialCreditCode?: string; // 统一社会信用代码
|
||||||
category?: string; // 品类
|
category?: string; // 品类
|
||||||
department?: string; // 准入部门
|
department?: string; // 准入部门
|
||||||
evaluatorCount?: number; // 评价人员数量
|
evaluatorCount?: number; // 评价人员数量
|
||||||
evaluators: PersonnelItem[]; // 评价人员列表
|
evaluators: PersonnelItem[]; // 评价人员列表
|
||||||
deptName?: string; // 部门名称
|
deptName?: string; // 部门名称
|
||||||
isSelected?: boolean; // 是否可以选中
|
isSelected?: boolean; // 是否可以选中
|
||||||
// 其他可能的字段
|
orgNameList?: SupplierOrgNameList[],
|
||||||
[key: string]: any;
|
// 其他可能的字段
|
||||||
}
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
// 供应商的组织
|
||||||
|
interface SupplierOrgNameList {
|
||||||
|
deptId: string;
|
||||||
|
deptName: string;
|
||||||
|
}
|
||||||
// 列表响应
|
// 列表响应
|
||||||
interface TaskListResponse {
|
interface TaskListResponse {
|
||||||
code: number;
|
code: number;
|
||||||
|
@ -250,10 +250,15 @@ declare namespace SupplierTaskManage {
|
|||||||
evaluators: PersonnelItem[]; // 评价人员列表
|
evaluators: PersonnelItem[]; // 评价人员列表
|
||||||
deptName?: string; // 部门名称
|
deptName?: string; // 部门名称
|
||||||
isSelected?: boolean; // 是否可以选中
|
isSelected?: boolean; // 是否可以选中
|
||||||
|
orgNameList?: SupplierOrgNameList[],
|
||||||
// 其他可能的字段
|
// 其他可能的字段
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
// 供应商的组织
|
||||||
|
interface SupplierOrgNameList {
|
||||||
|
deptId: string;
|
||||||
|
deptName: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 品类树响应
|
* 品类树响应
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user