From d35a19adbc325f90a32d72158ecbc2f1c87ac717 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 19 Feb 2025 00:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.ts | 18 ++++ src/constants.ts | 17 ++++ src/pages/RequirementAudits/detail.tsx | 110 ++++++------------------- src/pages/RequirementAudits/index.tsx | 59 +++++++------ 4 files changed, 89 insertions(+), 115 deletions(-) diff --git a/config/routes.ts b/config/routes.ts index 2eb64a9..6f65604 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -90,6 +90,24 @@ export default [ }, ], }, + { + name: '需求审核', + path: '/requirement', + icon: 'verified', + access: 'requirementQuery', + routes: [ + { + path: '', + component: './RequirementAudits', + }, + { + name: '详情', + path: 'detail/:id', + hideInMenu: true, + component: './RequirementAudits/detail', + }, + ], + }, { name: '商家管理', path: '/business', diff --git a/src/constants.ts b/src/constants.ts index 9783f03..095e292 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -36,6 +36,23 @@ const Constants = { status: 'Success' } }, + /** + * 需求审核状态 + */ + pbcApprovalStatus: { + 0: { + text: '待审核', + status: 'Process' + }, + 1: { + text: '审核通过', + status: 'Success' + }, + 2: { + text: '审核驳回', + status: 'Error' + } + }, /** * 回复状态 */ diff --git a/src/pages/RequirementAudits/detail.tsx b/src/pages/RequirementAudits/detail.tsx index 9dcee83..c2b6316 100644 --- a/src/pages/RequirementAudits/detail.tsx +++ b/src/pages/RequirementAudits/detail.tsx @@ -1,9 +1,5 @@ -import { - approvalSignNUsingPost, - approvalSignYUsingGet, - getRecordByBusinessIdAdminUsingGet, -} from '@/services/pop-b2b2c/pbcBusinessApprovalController'; -import { ModalForm, ProCard, ProFormTextArea } from '@ant-design/pro-components'; +import { approvalRequirementForAdminUsingGet, requirementDetailForAdminUsingGet } from '@/services/pop-b2b2c/pbcRequirementController'; +import { ProCard } from '@ant-design/pro-components'; import { PageContainer } from '@ant-design/pro-layout'; import { Access, useAccess, useParams } from '@umijs/max'; import { Button, Descriptions, Image, message } from 'antd'; @@ -13,12 +9,11 @@ const Detail: React.FC = () => { const params = useParams(); const access: any = useAccess(); - const [info, setInfo] = useState({}); - const [isModalOpen, setIsModalOpen] = useState(false); + const [info, setInfo] = useState({}); const getInfo = () => { if (params.id) { - getRecordByBusinessIdAdminUsingGet({ businessId: parseInt(params.id) }).then((res) => { + requirementDetailForAdminUsingGet({ pbcId: parseInt(params.id) }).then((res) => { if (res.retcode && res.data) { setInfo(res.data); } @@ -36,7 +31,7 @@ const Detail: React.FC = () => { title: '', }} footer={ - info.pbcBusinessApprovalResult === 0 + info.pbcApprovalStatus === 0 ? [ , - + , - +