退出、黑名单、品类库、准入审核状态前端转换
This commit is contained in:
@ -40,7 +40,9 @@ const SupplierCategoryEntry: React.FC = () => {
|
||||
//列表分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
//
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
//列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
// 列表方法
|
||||
@ -62,6 +64,11 @@ const SupplierCategoryEntry: React.FC = () => {
|
||||
getList(values, 1, 10);
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -109,7 +116,7 @@ const SupplierCategoryEntry: React.FC = () => {
|
||||
{ title: '准入部门', ellipsis: true, width: 120, dataIndex: 'deptName' },
|
||||
{ title: '准入方式', ellipsis: true, width: 120, dataIndex: 'accessTypeText' },
|
||||
{ title: '申请时间', dataIndex: 'createTime', width: 180 },
|
||||
{ title: '审批状态', ellipsis: true, width: 120, dataIndex: 'approveStatusText' },
|
||||
{ title: '审批状态', ellipsis: true, width: 120, dataIndex: 'approveStatus', render: (code: string) => approveTypeMap[code] || code },
|
||||
{
|
||||
title: '操作',
|
||||
width: 140,
|
||||
|
@ -10,6 +10,7 @@ import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect';
|
||||
import AccessDepartmentSelect from "@/components/AccessDepartmentSelect"
|
||||
//接口
|
||||
import { getPage } from './services'
|
||||
import { getDictList } from '@/servers/api/dicts'
|
||||
//统一列表分页
|
||||
import tableProps from '@/utils/tableProps'
|
||||
|
||||
@ -33,6 +34,7 @@ const SupplierCategoryEntryReview: React.FC = () => {
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
//列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
// 列表方法
|
||||
const getList = async (values: any = {}, pageNo: number = 1, pageSize: number = 10) => {
|
||||
setLoading(true);
|
||||
@ -50,6 +52,15 @@ const SupplierCategoryEntryReview: React.FC = () => {
|
||||
useEffect(() => {
|
||||
const values = form.getFieldsValue();
|
||||
getList(values, 1, 10);
|
||||
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);
|
||||
}
|
||||
})
|
||||
}, []);
|
||||
//开启弹窗
|
||||
const openModal = (type: string, record?: any) => {
|
||||
@ -80,7 +91,7 @@ const SupplierCategoryEntryReview: React.FC = () => {
|
||||
{ title: '准入部门', dataIndex: 'deptName', ellipsis: true },
|
||||
{ title: '准入方式', dataIndex: 'accessTypeText', width: 120 },
|
||||
{ title: '申请时间', dataIndex: 'createTime', width: 180 },
|
||||
{ title: '审批状态', dataIndex: 'approveStatusText', width: 120 },
|
||||
{ title: '审批状态', dataIndex: 'approveStatus', width: 120, render: (code: string) => approveTypeMap[code] || code },
|
||||
{
|
||||
title: '操作',
|
||||
width: 80,
|
||||
|
@ -42,7 +42,7 @@ const SupplierEntryReview: React.FC = () => {
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [modalInfo, setModalInfo] = useState<ModalInfo>({ visible: false, record: null });
|
||||
//
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
// 查询数据
|
||||
const fetchData = async (params = {}) => {
|
||||
@ -77,6 +77,11 @@ const SupplierEntryReview: React.FC = () => {
|
||||
fetchData({ pageNo: 1 });
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -132,6 +137,7 @@ const SupplierEntryReview: React.FC = () => {
|
||||
title: '准入部门',
|
||||
dataIndex: 'deptName',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
@ -145,6 +151,7 @@ const SupplierEntryReview: React.FC = () => {
|
||||
title: '准入品类',
|
||||
dataIndex: 'categoryNameList',
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
render: (value: { categoryName: string; categoryPathName: string }[] = []) => {
|
||||
if (!value || value.length === 0) return '-';
|
||||
@ -185,9 +192,10 @@ const SupplierEntryReview: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '审批状态',
|
||||
dataIndex: 'approveStatusText',
|
||||
dataIndex: 'approveStatus',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
render: (code: string) => approveTypeMap[code] || code
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
@ -46,6 +46,8 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
//
|
||||
const [areaMap, setAreaMap] = useState<{ [code: string]: string }>({});
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
// 新增弹窗
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
const [currentStoreId, setCurrentStoreId] = useState<string>('');
|
||||
@ -95,6 +97,11 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
useEffect(() => {
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -166,9 +173,10 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '审批状态',
|
||||
dataIndex: 'approveStatusName',
|
||||
key: 'approveStatusName',
|
||||
dataIndex: 'approveStatus',
|
||||
key: 'approveStatus',
|
||||
align: 'center',
|
||||
render: (code: string) => approveTypeMap[code] || code
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
@ -43,6 +43,7 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
// 分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
const [areaMap, setAreaMap] = useState<{ [code: string]: string }>({});
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
// 新增弹窗
|
||||
const [addVisible, setAddVisible] = useState(false);
|
||||
@ -92,6 +93,15 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
|
||||
// 初始化
|
||||
useEffect(() => {
|
||||
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);
|
||||
}
|
||||
})
|
||||
getDictList('area').then(res => {
|
||||
if (res.code === 200) {
|
||||
const map: { [code: string]: string } = {};
|
||||
@ -157,11 +167,12 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '审批状态',
|
||||
dataIndex: 'processStatusName',
|
||||
key: 'processStatusName',
|
||||
dataIndex: 'approveStatus',
|
||||
key: 'approveStatus',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
ellipsis: true,
|
||||
render: (code: string) => approveTypeMap[code] || code
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -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: '操作',
|
||||
|
@ -27,6 +27,7 @@ const blacklistManage: React.FC = () => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
// 查询接口
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
@ -88,6 +89,11 @@ const blacklistManage: React.FC = () => {
|
||||
useEffect(() => {
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -107,7 +113,8 @@ const blacklistManage: React.FC = () => {
|
||||
{ title: "发起单位", dataIndex: "unitName", key: "unitName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起部门", dataIndex: "deptName", key: "deptName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起时间", dataIndex: "createTime", key: "createTime", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatusName", key: "approveStatusName", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatus", key: "approveStatus", align: "center", width: 180, render: (code: string) => approveTypeMap[code] || code },
|
||||
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
|
@ -41,6 +41,7 @@ const blacklistManage: React.FC = () => {
|
||||
const [selectedRecordId, setSelectedRecordId] = useState<string | null>(null);
|
||||
//字典下拉
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
// 查询接口
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
@ -82,6 +83,11 @@ const blacklistManage: React.FC = () => {
|
||||
useEffect(() => {
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -101,7 +107,7 @@ const blacklistManage: React.FC = () => {
|
||||
{ title: "发起单位", dataIndex: "unitName", key: "unitName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起部门", dataIndex: "deptName", key: "deptName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起时间", dataIndex: "createTime", key: "createTime", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatusName", key: "approveStatusName", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatus", key: "approveStatus", align: "center", width: 180, render: (code: string) => approveTypeMap[code] || code },
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
|
@ -35,6 +35,7 @@ const supplierExitAudit: React.FC = () => {
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
const [selectedRecordId, setSelectedRecordId] = useState<string | null>(null);
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
// 查询接口
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
@ -79,6 +80,11 @@ const supplierExitAudit: React.FC = () => {
|
||||
useEffect(() => {
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -98,7 +104,8 @@ const supplierExitAudit: React.FC = () => {
|
||||
{ title: "发起单位", dataIndex: "orgName", key: "orgName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起部门", dataIndex: "deptName", key: "deptName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起时间", dataIndex: "createTime", key: "createTime", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatusText", key: "approveStatusText", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatus", key: "approveStatus", align: "center", width: 180, render: (code: string) => approveTypeMap[code] || code },
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "option",
|
||||
|
@ -33,6 +33,8 @@ const supplierExitManage: React.FC = () => {
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
const [selectedRecordId, setSelectedRecordId] = useState<string | null>(null);
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
|
||||
|
||||
// 查询接口
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
setLoading(true);
|
||||
@ -77,6 +79,11 @@ const supplierExitManage: React.FC = () => {
|
||||
useEffect(() => {
|
||||
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);
|
||||
setEnterpriseType(res.data)
|
||||
}
|
||||
})
|
||||
@ -96,7 +103,8 @@ const supplierExitManage: React.FC = () => {
|
||||
{ title: "发起单位", dataIndex: "orgName", key: "orgName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起部门", dataIndex: "deptName", key: "deptName", align: "center", width: 180, ellipsis: true },
|
||||
{ title: "发起时间", dataIndex: "createTime", key: "createTime", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatusText", key: "approveStatusText", align: "center", width: 180 },
|
||||
{ title: "审批记录状态", dataIndex: "approveStatus", key: "approveStatus", align: "center", width: 180, render: (code: string) => approveTypeMap[code] || code },
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "option",
|
||||
|
Reference in New Issue
Block a user