From 1641d1750414a626d264b5ef3d7302095ba5127e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=99=AF=E5=AD=A6?= <5412262+sun_jing_xue@user.noreply.gitee.com> Date: Mon, 11 Aug 2025 14:40:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E3=80=81=E9=BB=91=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E3=80=81=E5=93=81=E7=B1=BB=E5=BA=93=E3=80=81=E5=87=86?= =?UTF-8?q?=E5=85=A5=E5=AE=A1=E6=A0=B8=E7=8A=B6=E6=80=81=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admission/SupplierCategoryEntry/index.tsx | 11 +++++++++-- .../SupplierCategoryEntryReview/index.tsx | 13 ++++++++++++- .../admission/SupplierEntryReview/index.tsx | 12 ++++++++++-- .../category/CategoryLibraryReview/index.tsx | 12 ++++++++++-- .../category/SupplierEntryReview/index.tsx | 15 +++++++++++++-- .../mySupplierInquiry/index.tsx | 16 +++++++++++++--- .../supplierBlacklist/blacklistAudit/index.tsx | 9 ++++++++- .../supplierBlacklist/blacklistManage/index.tsx | 8 +++++++- .../supplierExit/supplierExitAudit/index.tsx | 9 ++++++++- .../supplierExit/supplierExitManage/index.tsx | 10 +++++++++- 10 files changed, 99 insertions(+), 16 deletions(-) diff --git a/src/pages/supplier/admission/SupplierCategoryEntry/index.tsx b/src/pages/supplier/admission/SupplierCategoryEntry/index.tsx index e559e97..9e65d79 100644 --- a/src/pages/supplier/admission/SupplierCategoryEntry/index.tsx +++ b/src/pages/supplier/admission/SupplierCategoryEntry/index.tsx @@ -40,7 +40,9 @@ const SupplierCategoryEntry: React.FC = () => { //列表分页 const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 }); // - const [enterpriseType, setEnterpriseType] = useState(); + const [enterpriseType, setEnterpriseType] = useState(); + 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, diff --git a/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx b/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx index 0b48fde..46992d2 100644 --- a/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx +++ b/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx @@ -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({ 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, diff --git a/src/pages/supplier/admission/SupplierEntryReview/index.tsx b/src/pages/supplier/admission/SupplierEntryReview/index.tsx index 932816a..5b9f4ab 100644 --- a/src/pages/supplier/admission/SupplierEntryReview/index.tsx +++ b/src/pages/supplier/admission/SupplierEntryReview/index.tsx @@ -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({ visible: false, record: null }); - // + const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({}); const [enterpriseType, setEnterpriseType] = useState(); // 查询数据 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: '操作', diff --git a/src/pages/supplier/category/CategoryLibraryReview/index.tsx b/src/pages/supplier/category/CategoryLibraryReview/index.tsx index 8733744..19731a7 100644 --- a/src/pages/supplier/category/CategoryLibraryReview/index.tsx +++ b/src/pages/supplier/category/CategoryLibraryReview/index.tsx @@ -46,6 +46,8 @@ const CategoryLibraryManage: React.FC = () => { // const [areaMap, setAreaMap] = useState<{ [code: string]: string }>({}); const [enterpriseType, setEnterpriseType] = useState(); + const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({}); + // 新增弹窗 const [viewVisible, setViewVisible] = useState(false); const [currentStoreId, setCurrentStoreId] = useState(''); @@ -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: '操作', diff --git a/src/pages/supplier/category/SupplierEntryReview/index.tsx b/src/pages/supplier/category/SupplierEntryReview/index.tsx index 62eb955..1acc5bb 100644 --- a/src/pages/supplier/category/SupplierEntryReview/index.tsx +++ b/src/pages/supplier/category/SupplierEntryReview/index.tsx @@ -43,6 +43,7 @@ const CategoryLibraryManage: React.FC = () => { // 分页 const [pagination, setPagination] = useState({ 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 }, { diff --git a/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx b/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx index eb0b5c8..ab5843d 100644 --- a/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx +++ b/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx @@ -79,7 +79,7 @@ const mySupplierInquiry: React.FC = ({ 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 = ({ 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 = ({ dispatch }) => { }, { title: '准入状态', - dataIndex: 'accessStatusCn', - key: 'accessStatusCn', + dataIndex: 'accessStatus', + key: 'accessStatus', align: 'center', width: 140, + render: (code: string) => approveTypeMap[code] || code }, { title: '操作', diff --git a/src/pages/supplier/supplierBlacklist/blacklistAudit/index.tsx b/src/pages/supplier/supplierBlacklist/blacklistAudit/index.tsx index f2152e0..c1a0be2 100644 --- a/src/pages/supplier/supplierBlacklist/blacklistAudit/index.tsx +++ b/src/pages/supplier/supplierBlacklist/blacklistAudit/index.tsx @@ -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(); + 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: "操作", diff --git a/src/pages/supplier/supplierBlacklist/blacklistManage/index.tsx b/src/pages/supplier/supplierBlacklist/blacklistManage/index.tsx index dfb0a77..8bd7a1d 100644 --- a/src/pages/supplier/supplierBlacklist/blacklistManage/index.tsx +++ b/src/pages/supplier/supplierBlacklist/blacklistManage/index.tsx @@ -41,6 +41,7 @@ const blacklistManage: React.FC = () => { const [selectedRecordId, setSelectedRecordId] = useState(null); //字典下拉 const [enterpriseType, setEnterpriseType] = useState(); + 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: "操作", diff --git a/src/pages/supplier/supplierExit/supplierExitAudit/index.tsx b/src/pages/supplier/supplierExit/supplierExitAudit/index.tsx index eca0a0a..bfcc65d 100644 --- a/src/pages/supplier/supplierExit/supplierExitAudit/index.tsx +++ b/src/pages/supplier/supplierExit/supplierExitAudit/index.tsx @@ -35,6 +35,7 @@ const supplierExitAudit: React.FC = () => { const [viewVisible, setViewVisible] = useState(false); const [selectedRecordId, setSelectedRecordId] = useState(null); const [enterpriseType, setEnterpriseType] = useState(); + 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", diff --git a/src/pages/supplier/supplierExit/supplierExitManage/index.tsx b/src/pages/supplier/supplierExit/supplierExitManage/index.tsx index 742ab0c..8008f1c 100644 --- a/src/pages/supplier/supplierExit/supplierExitManage/index.tsx +++ b/src/pages/supplier/supplierExit/supplierExitManage/index.tsx @@ -33,6 +33,8 @@ const supplierExitManage: React.FC = () => { const [viewVisible, setViewVisible] = useState(false); const [selectedRecordId, setSelectedRecordId] = useState(null); const [enterpriseType, setEnterpriseType] = useState(); + 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",