退出、黑名单、品类库、准入审核状态前端转换
This commit is contained in:
@ -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: '操作',
|
||||
|
Reference in New Issue
Block a user