退出、黑名单、品类库、准入审核状态前端转换

This commit is contained in:
孙景学
2025-08-11 14:40:47 +08:00
parent 0e90bdb8ea
commit 1641d17504
10 changed files with 99 additions and 16 deletions

View File

@ -79,7 +79,7 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
}
};
const [enterpriseTypeMap, setEnterpriseTypeMap] = useState<{ [code: string]: string }>({});
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
// 初始化
useEffect(() => {
getDictList('enterprise_type').then((res: any) => {
@ -92,6 +92,15 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
setEnterpriseTypeMap(map);
}
})
getDictList('approve_type').then((res) => {
if (res.code == 200) {
const map: { [code: string]: string } = {};
res.data.forEach((item: { code: string, dicName: string }) => {
map[item.code] = item.dicName;
});
setApproveTypeMap(map);
}
})
getList();
}, []);
@ -175,10 +184,11 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
},
{
title: '准入状态',
dataIndex: 'accessStatusCn',
key: 'accessStatusCn',
dataIndex: 'accessStatus',
key: 'accessStatus',
align: 'center',
width: 140,
render: (code: string) => approveTypeMap[code] || code
},
{
title: '操作',