登录与品类
This commit is contained in:
@ -130,9 +130,24 @@ const SupplierAnnualStatistics: React.FC = () => {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.common.category' }),
|
||||
dataIndex: 'categoryNameList',
|
||||
key: 'categoryNameList',
|
||||
width: 120,
|
||||
render: (text: string[]) => text.join(','),
|
||||
ellipsis: true,
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
|
||||
// 多于1条
|
||||
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 }}>
|
||||
<span>
|
||||
{value[0].categoryName}
|
||||
{value.length !== 1 && (
|
||||
<span>等</span>
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dataStatistics.common.accessUnit' }),
|
||||
|
@ -3,7 +3,7 @@ import { Form, Input, Button, Checkbox, Tabs, message } from 'antd';
|
||||
import { UserOutlined, LockOutlined, EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||
import { history, useIntl } from 'umi';
|
||||
import './login.less';
|
||||
import { getCaptcha, supplierLogin, expertLogin, accountLogin, getUserinfo, refreshDictCache } from '@/servers/api/login';
|
||||
import { getCaptcha, supplierLogin, expertLogin, accountLogin, getUserinfo, refreshDictCache, findMenuList } from '@/servers/api/login';
|
||||
|
||||
import { encryptWithRsa } from '@/utils/encryptWithRsa'
|
||||
|
||||
@ -26,18 +26,20 @@ const LoginPage: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
fetchCaptcha();
|
||||
if(!sessionStorage.getItem('dict')) {
|
||||
if (!sessionStorage.getItem('dict')) {
|
||||
refreshDictCache().then((res) => {
|
||||
if(res.code == 200) {
|
||||
if (res.code == 200) {
|
||||
sessionStorage.setItem('dict', JSON.stringify(res.data))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
form.setFieldsValue( { password: 'cosco2025', identifying: '1' } )
|
||||
|
||||
|
||||
}, [activeKey]);
|
||||
|
||||
// 组件挂载时,检查是否有记住的用户名
|
||||
// 组件挂载时,检查是否有记住的用户名
|
||||
useEffect(() => {
|
||||
// const savedUser = localStorage.getItem('remember_user');
|
||||
// if (savedUser) {
|
||||
@ -88,25 +90,14 @@ const LoginPage: React.FC = () => {
|
||||
// })
|
||||
}
|
||||
sessionStorage.setItem('currentUser', JSON.stringify(loginRes.data));
|
||||
|
||||
|
||||
getUserinfo().then(async (res) => {
|
||||
// if(res.code == 200) {
|
||||
const roleIdList = res.authorityList.map((item: any) => {
|
||||
return item.roleId
|
||||
})
|
||||
console.log(roleIdList, 'roleIdList');
|
||||
await getUserinfo().then(async (res) => {
|
||||
const roleIdList = res.authorityList.map((item: any) => item.roleId);
|
||||
sessionStorage.setItem('Userinfo', JSON.stringify(res));
|
||||
// const menuList = await findMenuList({ roleIdList });
|
||||
// sessionStorage.setItem('menuList', JSON.stringify(menuList.data));
|
||||
// }
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
message.success('登录成功');
|
||||
history.push('/index');
|
||||
const menuList: any = await findMenuList({ roleIdList });
|
||||
sessionStorage.setItem('menuList', JSON.stringify(menuList.data));
|
||||
message.success('登录成功');
|
||||
history.push('/index');
|
||||
});
|
||||
} else {
|
||||
message.error(loginRes.message || '登录失败');
|
||||
}
|
||||
@ -162,7 +153,7 @@ const LoginPage: React.FC = () => {
|
||||
|
||||
// 忘记密码点击
|
||||
const onForgot = () => {
|
||||
history.push('/forgot?type='+activeKey);
|
||||
history.push('/forgot?type=' + activeKey);
|
||||
}
|
||||
|
||||
return (
|
||||
@ -179,7 +170,7 @@ const LoginPage: React.FC = () => {
|
||||
<div className="login-tab-container">
|
||||
<Tabs activeKey={activeKey} onChange={handleTabChange} className='login-tabs'>
|
||||
<TabPane tab={intl.formatMessage({ id: 'login.tab.supplier' })} key="supplierLogin" />
|
||||
<TabPane tab={intl.formatMessage({ id: 'login.tab.expert' })} key="expertLogin" />
|
||||
{/* <TabPane tab={intl.formatMessage({ id: 'login.tab.expert' })} key="expertLogin" /> */}
|
||||
<TabPane tab={intl.formatMessage({ id: 'login.tab.agent' })} key="accountLogin" />
|
||||
</Tabs>
|
||||
</div>
|
||||
@ -239,7 +230,7 @@ const LoginPage: React.FC = () => {
|
||||
<Form.Item name="remember" valuePropName="checked" noStyle>
|
||||
<Checkbox>{intl.formatMessage({ id: 'login.remember' })}</Checkbox>
|
||||
</Form.Item>
|
||||
<Button type="link" onClick={()=>onForgot()} className="login-form-forgot" href="">
|
||||
<Button type="link" onClick={() => onForgot()} className="login-form-forgot" href="">
|
||||
{intl.formatMessage({ id: 'login.forgot' })}
|
||||
</Button>
|
||||
</div>
|
||||
|
@ -5,22 +5,31 @@ import SupplierSelector from './SupplierSelector';
|
||||
import AccessDepartmentSelect from '@/components/AccessDepartmentSelect';
|
||||
// 请求
|
||||
import { categoryTree, add } from '../services';
|
||||
|
||||
interface CategoryNode {
|
||||
key: string;
|
||||
pathName: string;
|
||||
path: string;
|
||||
title: string;
|
||||
children?: CategoryNode[];
|
||||
}
|
||||
|
||||
function flattenTree(
|
||||
function getKeyTitlePathMap(
|
||||
tree: CategoryNode[],
|
||||
map: Record<string, string> = {}
|
||||
): Record<string, string> {
|
||||
keyTitleMap: Record<string, string> = {},
|
||||
keyPathMap: Record<string, string> = {},
|
||||
keyIdMap: Record<string, string> = {}
|
||||
) {
|
||||
tree.forEach((node) => {
|
||||
map[node.key] = node.title;
|
||||
if (node.children) flattenTree(node.children, map);
|
||||
keyTitleMap[node.key] = node.title;
|
||||
keyPathMap[node.key] = node.pathName;
|
||||
keyIdMap[node.key] = node.path;
|
||||
if (node.children && node.children.length > 0) {
|
||||
getKeyTitlePathMap(node.children, keyTitleMap, keyPathMap, keyIdMap);
|
||||
}
|
||||
});
|
||||
return map;
|
||||
}
|
||||
return { keyTitleMap, keyPathMap, keyIdMap };
|
||||
}
|
||||
// 主体
|
||||
const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ visible, onCancel }) => {
|
||||
|
||||
@ -76,14 +85,16 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
const leafKeys = findLeafKeys(convertTreeData(categoriesTreeData));
|
||||
const onlyLeafChecked = keys.filter(key => leafKeys.includes(String(key)));
|
||||
|
||||
// 平铺tree获取id=>title映射
|
||||
const keyTitleMap = flattenTree(convertTreeData(categoriesTreeData));
|
||||
// 拼 categoryItem 数组
|
||||
const coscoAccessCategoryList = onlyLeafChecked.map((id) => ({
|
||||
categoryId: id,
|
||||
categoryName: keyTitleMap[id] || '',
|
||||
}));
|
||||
|
||||
// 获取映射
|
||||
const { keyTitleMap, keyPathMap, keyIdMap } = getKeyTitlePathMap(convertTreeData(categoriesTreeData));
|
||||
|
||||
// 拼 categoryItem 数组
|
||||
const coscoAccessCategoryList = onlyLeafChecked.map((id) => ({
|
||||
categoryId: id,
|
||||
categoryName: keyTitleMap[id] || '',
|
||||
categoryPathName: keyPathMap[id] || '',
|
||||
categoryPathId: keyIdMap[id] || '',
|
||||
}));
|
||||
|
||||
setCheckedKeys(keys); // UI 显示用,还是全量
|
||||
form.setFieldsValue({ categoryIds: onlyLeafChecked, coscoAccessCategoryList }); // 只存叶子到表单
|
||||
|
@ -67,7 +67,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
|
@ -67,7 +67,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
|
@ -86,7 +86,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
@ -101,7 +101,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
@ -117,7 +117,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
|
@ -43,7 +43,7 @@ const SupplierEntryReview: React.FC = () => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [modalInfo, setModalInfo] = useState<ModalInfo>({ visible: false, record: null });
|
||||
//
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
// 查询数据
|
||||
const fetchData = async (params = {}) => {
|
||||
setLoading(true);
|
||||
@ -75,11 +75,11 @@ const SupplierEntryReview: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
fetchData({ pageNo: 1 });
|
||||
getDictList('approve_type').then((res) => {
|
||||
if (res.code == 200) {
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
getDictList('approve_type').then((res) => {
|
||||
if (res.code == 200) {
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
}, []);
|
||||
|
||||
// 表格分页切换
|
||||
@ -146,18 +146,18 @@ const SupplierEntryReview: React.FC = () => {
|
||||
dataIndex: 'categoryNameList',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
render: (value: { item: string }[] = []) => {
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
if (value.length === 1) {
|
||||
return <span>{value[0]}</span>;
|
||||
}
|
||||
|
||||
// 多于1条
|
||||
const allNames = value.map(item => item).join('、');
|
||||
const allNames = value.map(item => item.categoryPathName).join('\n');
|
||||
return (
|
||||
<Tooltip title={allNames} overlayStyle={{ zIndex: 1200 }}>
|
||||
<Tooltip title={<pre style={{ margin: 0, fontSize: 12, fontFamily: '微软雅黑', whiteSpace: 'pre-wrap' }}>{allNames}</pre>} overlayStyle={{ zIndex: 1200 }}>
|
||||
<span>
|
||||
{value[0]}
|
||||
<span>等</span>
|
||||
{value[0].categoryName}
|
||||
{value.length !== 1 && (
|
||||
<span>等</span>
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
@ -213,7 +213,7 @@ const SupplierEntryReview: React.FC = () => {
|
||||
onFinish={handleSearch}
|
||||
>
|
||||
<Form.Item name="accessType" label="准入方式">
|
||||
<AdmissionTypeSelect/>
|
||||
<AdmissionTypeSelect />
|
||||
</Form.Item>
|
||||
<Form.Item name="deptId" label="准入部门">
|
||||
<AccessDepartmentSelect orgCategory='' />
|
||||
|
@ -28,20 +28,28 @@ interface ReviewerSelectorData {
|
||||
|
||||
interface CategoryNode {
|
||||
key: string;
|
||||
pathName: string;
|
||||
path: string;
|
||||
title: string;
|
||||
children?: CategoryNode[];
|
||||
}
|
||||
|
||||
function flattenTree(
|
||||
function getKeyTitlePathMap(
|
||||
tree: CategoryNode[],
|
||||
map: Record<string, string> = {}
|
||||
): Record<string, string> {
|
||||
keyTitleMap: Record<string, string> = {},
|
||||
keyPathMap: Record<string, string> = {},
|
||||
keyIdMap: Record<string, string> = {}
|
||||
) {
|
||||
tree.forEach((node) => {
|
||||
map[node.key] = node.title;
|
||||
if (node.children) flattenTree(node.children, map);
|
||||
keyTitleMap[node.key] = node.title;
|
||||
keyPathMap[node.key] = node.pathName;
|
||||
keyIdMap[node.key] = node.path;
|
||||
if (node.children && node.children.length > 0) {
|
||||
getKeyTitlePathMap(node.children, keyTitleMap, keyPathMap, keyIdMap);
|
||||
}
|
||||
});
|
||||
return map;
|
||||
}
|
||||
return { keyTitleMap, keyPathMap, keyIdMap };
|
||||
}
|
||||
// 主体
|
||||
const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ visible, onCancel }) => {
|
||||
|
||||
@ -106,12 +114,15 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
||||
const leafKeys = findLeafKeys(convertTreeData(categoriesTreeData));
|
||||
const onlyLeafChecked = keys.filter(key => leafKeys.includes(String(key)));
|
||||
|
||||
// 平铺tree获取id=>title映射
|
||||
const keyTitleMap = flattenTree(convertTreeData(categoriesTreeData));
|
||||
// 获取映射
|
||||
const { keyTitleMap, keyPathMap, keyIdMap } = getKeyTitlePathMap(convertTreeData(categoriesTreeData));
|
||||
|
||||
// 拼 categoryItem 数组
|
||||
const coscoAccessCategoryList = onlyLeafChecked.map((id) => ({
|
||||
categoryId: id,
|
||||
categoryName: keyTitleMap[id] || '',
|
||||
categoryPathName: keyPathMap[id] || '',
|
||||
categoryPathId: keyIdMap[id] || '',
|
||||
}));
|
||||
|
||||
setCheckedKeys(keys); // UI 显示用,还是全量
|
||||
|
@ -89,7 +89,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
@ -104,7 +104,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
@ -120,7 +120,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
|
@ -90,7 +90,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
@ -105,7 +105,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
@ -120,7 +120,7 @@ const ViewModal: React.FC<{
|
||||
<Descriptions.Item label="申请准入品类">
|
||||
{data.coscoAccessCategoryList.map((item) => {
|
||||
return (
|
||||
<div style={{ margin: '5px' }}>{item.categoryName}</div>
|
||||
<div style={{ margin: '5px' }}>{item.categoryPathName}</div>
|
||||
)
|
||||
})}
|
||||
</Descriptions.Item>
|
||||
|
@ -117,18 +117,18 @@ const CooperateEnterprise: React.FC = () => {
|
||||
dataIndex: 'categoryNameList',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
render: (value: { item: string }[] = []) => {
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
if (value.length === 1) {
|
||||
return <span>{value[0]}</span>;
|
||||
}
|
||||
|
||||
// 多于1条
|
||||
const allNames = value.map(item => item).join('、');
|
||||
const allNames = value.map(item => item.categoryPathName).join('\n');
|
||||
return (
|
||||
<Tooltip title={allNames} overlayStyle={{ zIndex: 1200 }}>
|
||||
<Tooltip title={<pre style={{ margin: 0, fontSize: 12, fontFamily: '微软雅黑', whiteSpace: 'pre-wrap' }}>{allNames}</pre>} overlayStyle={{ zIndex: 1200 }}>
|
||||
<span>
|
||||
{value[0]}
|
||||
<span>等</span>
|
||||
{value[0].categoryName}
|
||||
{value.length !== 1 && (
|
||||
<span>等</span>
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useIntl } from 'umi';
|
||||
import { Form, Button, Table, DatePicker } from 'antd';
|
||||
import { Form, Button, Table, DatePicker, Tooltip } from 'antd';
|
||||
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
||||
import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
//接口
|
||||
@ -20,6 +20,7 @@ interface Data {
|
||||
createTime: string;
|
||||
exitTime: string;
|
||||
exitReason: string;
|
||||
categoryPathName: string;
|
||||
}
|
||||
|
||||
const CooperateEnterprise: React.FC = () => {
|
||||
@ -91,11 +92,23 @@ const CooperateEnterprise: React.FC = () => {
|
||||
key: 'deptName',
|
||||
ellipsis: true
|
||||
},
|
||||
|
||||
{
|
||||
title: '准入品类',
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 120,
|
||||
align: 'center',
|
||||
render: (_:any, item:{ categoryName:string; categoryPathName:string; }) => {
|
||||
return (
|
||||
<Tooltip title={<pre style={{ margin: 0, fontSize: 12, fontFamily: '微软雅黑', whiteSpace: 'pre-wrap' }}>{item.categoryPathName}</pre>} overlayStyle={{ zIndex: 1200 }}>
|
||||
<span>
|
||||
{item.categoryName}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '准入时间',
|
||||
|
@ -35,13 +35,15 @@ function collectSelectedNodesWithParents(
|
||||
): { id: string; categoryName: string; lockType: number; categoryType: string }[] {
|
||||
const allKeysSet = collectCheckedWithParents(nodes, checkedKeys);
|
||||
|
||||
const result: { id: string; categoryName: string; lockType: number; categoryType: string }[] = [];
|
||||
const result: { id: string; categoryName: string; lockType: number; categoryType: string; categoryPathName: string; categoryPathId: string }[] = [];
|
||||
function dfs(list: TreeNodeType[]) {
|
||||
list.forEach(node => {
|
||||
if (allKeysSet.has(node.key)) {
|
||||
result.push({
|
||||
id: node.key,
|
||||
categoryName: node.categoryName,
|
||||
categoryPathName: node.pathName,
|
||||
categoryPathId: node.path,
|
||||
lockType: 0,
|
||||
categoryType: node.children?.length === 0 ? '1' : '0',
|
||||
});
|
||||
|
@ -142,13 +142,29 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
width: 120,
|
||||
render: (code: string) => enterpriseTypeMap[code] || code
|
||||
},
|
||||
|
||||
{
|
||||
title: '准入品类',
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
dataIndex: 'categoryNameList',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
|
||||
// 多于1条
|
||||
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 }}>
|
||||
<span>
|
||||
{value[0].categoryName}
|
||||
{value.length !== 1 && (
|
||||
<span>等</span>
|
||||
)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '准入时间',
|
||||
|
@ -17,6 +17,8 @@ interface Supplier {
|
||||
lastEvalDate: string; // 评价时间
|
||||
supplierId: string;
|
||||
categoryId: string;
|
||||
categoryPathId: string;
|
||||
categoryPathName: string;
|
||||
}
|
||||
|
||||
interface CreateBlacklistModalProps {
|
||||
@ -73,9 +75,14 @@ const CreateBlacklistModal: React.FC<CreateBlacklistModalProps> = ({
|
||||
} = {
|
||||
coscoSupplierexit: {...values},
|
||||
supplierIdList: suppliers.map((item) => item.supplierId),
|
||||
coscoSupplierexitSupplierCategoryList: suppliers.map((item) => ({ supplierId: item.supplierId, categoryId: item.categoryId, categoryName: item.categoryName }))
|
||||
coscoSupplierexitSupplierCategoryList: suppliers.map((item) => ({
|
||||
supplierId: item.supplierId,
|
||||
categoryId: item.categoryId,
|
||||
categoryName: item.categoryName,
|
||||
categoryPathName: item.categoryPathName,
|
||||
categoryPathId: item.categoryPathId,
|
||||
}))
|
||||
}
|
||||
|
||||
const res = await add(payload);
|
||||
if (res?.success) {
|
||||
message.success("提交成功");
|
||||
|
@ -21,6 +21,8 @@ interface Supplier {
|
||||
lastEvalDate: string; // 评价时间
|
||||
supplierId: string;
|
||||
categoryId: string;
|
||||
categoryPathName: string;
|
||||
categoryPathId: string;
|
||||
}
|
||||
|
||||
interface SupplierSelectModalProps {
|
||||
|
Reference in New Issue
Block a user