评价任务 改为dva数据流转模式
This commit is contained in:
@ -148,7 +148,10 @@ const SupplierSelector: React.FC<SupplierSelectorProps> = ({
|
||||
|
||||
if (response && response.code === 200) {
|
||||
// 请求成功,更新数据和分页信息
|
||||
setTableListData(response.data.records || []);
|
||||
setTableListData(response.data.records.map((item: any) => ({
|
||||
...item,
|
||||
supplierName: item.name,
|
||||
})));
|
||||
setPagination({
|
||||
current: queryParams.pageNo,
|
||||
pageSize: queryParams.pageSize,
|
||||
@ -231,16 +234,26 @@ const SupplierSelector: React.FC<SupplierSelectorProps> = ({
|
||||
const columns = [
|
||||
{
|
||||
title: '供应商名称',
|
||||
dataIndex: 'name',
|
||||
dataIndex: 'supplierName',
|
||||
ellipsis: true,
|
||||
render: (name: string) => (
|
||||
<Tooltip placement="topLeft" title={name}>
|
||||
{name}
|
||||
render: (supplierName: string) => (
|
||||
<Tooltip placement="topLeft" title={supplierName}>
|
||||
{supplierName}
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '所属品类',
|
||||
title: '统一社会信用代码',
|
||||
dataIndex: 'socialCreditCode',
|
||||
ellipsis: true,
|
||||
render: (socialCreditCode: string) => (
|
||||
<Tooltip placement="topLeft" title={socialCreditCode}>
|
||||
{socialCreditCode || '-'}
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '准入品类',
|
||||
dataIndex: 'categoryName',
|
||||
ellipsis: true,
|
||||
render: (categoryName: string) => (
|
||||
@ -249,16 +262,7 @@ const SupplierSelector: React.FC<SupplierSelectorProps> = ({
|
||||
</Tooltip>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
dataIndex: 'deptName',
|
||||
ellipsis: true,
|
||||
render: (deptName: string) => (
|
||||
<Tooltip placement="topLeft" title={deptName}>
|
||||
{deptName || '-'}
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user