From 6ba53e1a206d7e0811da6021fc2fe9ad7f428e3f Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 22 Sep 2025 11:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.ts | 14 ++- src/pages/InnovativeService/apply.tsx | 87 +++++++++++++++++++ src/pages/InnovativeService/index.tsx | 15 +++- src/services/pop-b2b2c/errorController.ts | 30 +++---- .../pbcInnovativeServiceController.ts | 48 ++++++++++ src/services/pop-b2b2c/typings.d.ts | 56 ++++++++++++ 6 files changed, 232 insertions(+), 18 deletions(-) create mode 100644 src/pages/InnovativeService/apply.tsx diff --git a/config/routes.ts b/config/routes.ts index c1f53fd..bff9923 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -314,7 +314,19 @@ export default [ path: '/innovative-service', icon: 'solution', access: 'innovativeServiceQuery', - component: './InnovativeService', + routes: [ + { + path: '', + name: '创新服务', + component: './InnovativeService', + }, + { + name: '预约名单', + path: 'apply/:id', + hideInMenu: true, + component: './InnovativeService/apply', + }, + ], }, { name: '广告设置', diff --git a/src/pages/InnovativeService/apply.tsx b/src/pages/InnovativeService/apply.tsx new file mode 100644 index 0000000..265fac7 --- /dev/null +++ b/src/pages/InnovativeService/apply.tsx @@ -0,0 +1,87 @@ +import React, { useRef } from 'react'; +import { PageContainer } from '@ant-design/pro-layout'; +import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; +import { handlePageQuery } from '@/utils/utils'; +import { applyInnovativeServicePageUsingPost } from '@/services/pop-b2b2c/pbcInnovativeServiceController'; +import { useParams } from '@umijs/max'; + +/** + * 查询表格 + * @param param0 + */ +const fetchData = async (params: API.PageVO) => { + const msg = await applyInnovativeServicePageUsingPost(params); + return { + data: msg.data?.records, + total: msg.data?.total, + success: msg.retcode, + } as any; +}; + +// eslint-disable-next-line @typescript-eslint/ban-types +const TableList: React.FC<{}> = () => { + const actionRef = useRef(); + const params = useParams(); + + const columns: ProColumns[] = [ + { + title: '创新标题', + dataIndex: 'pbcInnovativeServiceTitle', + search: false, + }, + { + title: '预约人', + dataIndex: 'pbcUserName', + }, + { + title: '预约手机号', + dataIndex: 'pbcMobile', + }, + { + title: '预约人公司', + dataIndex: 'pbcCompany', + }, + { + title: '备注', + dataIndex: 'pbcRemark', + search: false, + }, + ]; + return ( + + + columns={columns} + actionRef={actionRef} + request={(param: any) => { + const queryParam = handlePageQuery(param); + return fetchData(queryParam); + }} + rowKey="pbcId" + size="small" + bordered + search={{ + labelWidth: 'auto', + span: 6 + }} + params={{ pbcInnovativeServiceId: params.id }} + pagination={{ + defaultPageSize: 20, + showSizeChanger: true, + }} + scroll={{ + y: 'calc(100vh - 320px)', + }} + dateFormatter="string" + options={false} + toolBarRender={() => []} + /> + + ); +}; + +export default TableList; diff --git a/src/pages/InnovativeService/index.tsx b/src/pages/InnovativeService/index.tsx index 3956988..68806f2 100644 --- a/src/pages/InnovativeService/index.tsx +++ b/src/pages/InnovativeService/index.tsx @@ -3,7 +3,7 @@ import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; import { PageContainer } from '@ant-design/pro-layout'; import { Button, message, Popconfirm, Switch } from 'antd'; import React, { useRef, useState } from 'react'; -import { Access, useAccess } from 'umi'; +import { Access, history, useAccess } from 'umi'; import UpdateForm from './components/UpdateForm'; import { addOrUpdateInnovativeServiceUsingPost, changeInnovativeServiceStateUsingGet, getInnovativeServicePageUsingPost, removeInnovativeServiceUsingGet } from '@/services/pop-b2b2c/pbcInnovativeServiceController'; @@ -110,7 +110,7 @@ const TableList: React.FC = () => { { title: '操作', valueType: 'option', - width: 180, + width: 230, render: (text, record) => ( @@ -126,6 +126,17 @@ const TableList: React.FC = () => { }} /> + + +