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