预约名单

dev-v2
Joe 4 weeks ago
parent 0408fe50d0
commit 6ba53e1a20

@ -314,7 +314,19 @@ export default [
path: '/innovative-service', path: '/innovative-service',
icon: 'solution', icon: 'solution',
access: 'innovativeServiceQuery', access: 'innovativeServiceQuery',
component: './InnovativeService', routes: [
{
path: '',
name: '创新服务',
component: './InnovativeService',
},
{
name: '预约名单',
path: 'apply/:id',
hideInMenu: true,
component: './InnovativeService/apply',
},
],
}, },
{ {
name: '广告设置', name: '广告设置',

@ -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<ActionType>();
const params = useParams();
const columns: ProColumns<API.PbcInnovativeServiceApply>[] = [
{
title: '创新标题',
dataIndex: 'pbcInnovativeServiceTitle',
search: false,
},
{
title: '预约人',
dataIndex: 'pbcUserName',
},
{
title: '预约手机号',
dataIndex: 'pbcMobile',
},
{
title: '预约人公司',
dataIndex: 'pbcCompany',
},
{
title: '备注',
dataIndex: 'pbcRemark',
search: false,
},
];
return (
<PageContainer
header={{
title: '',
breadcrumb: {},
}}
>
<ProTable<API.PbcInnovativeServiceApply>
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={() => []}
/>
</PageContainer>
);
};
export default TableList;

@ -3,7 +3,7 @@ import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
import { PageContainer } from '@ant-design/pro-layout'; import { PageContainer } from '@ant-design/pro-layout';
import { Button, message, Popconfirm, Switch } from 'antd'; import { Button, message, Popconfirm, Switch } from 'antd';
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { Access, useAccess } from 'umi'; import { Access, history, useAccess } from 'umi';
import UpdateForm from './components/UpdateForm'; import UpdateForm from './components/UpdateForm';
import { addOrUpdateInnovativeServiceUsingPost, changeInnovativeServiceStateUsingGet, getInnovativeServicePageUsingPost, removeInnovativeServiceUsingGet } from '@/services/pop-b2b2c/pbcInnovativeServiceController'; import { addOrUpdateInnovativeServiceUsingPost, changeInnovativeServiceStateUsingGet, getInnovativeServicePageUsingPost, removeInnovativeServiceUsingGet } from '@/services/pop-b2b2c/pbcInnovativeServiceController';
@ -110,7 +110,7 @@ const TableList: React.FC<any> = () => {
{ {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 180, width: 230,
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Access key="switch" accessible={access.innovativeServiceUpdateState}> <Access key="switch" accessible={access.innovativeServiceUpdateState}>
@ -126,6 +126,17 @@ const TableList: React.FC<any> = () => {
}} }}
/> />
</Access> </Access>
<Access key="apply" accessible={access.innovativeServiceApply}>
<Button
size="small"
type="link"
onClick={() => {
history.push(`/innovative-service/apply/${record.pbcId}`);
}}
>
</Button>
</Access>
<Access key="config" accessible={access.innovativeServiceSave}> <Access key="config" accessible={access.innovativeServiceSave}>
<Button <Button
size="small" size="small"

@ -2,41 +2,41 @@
/* eslint-disable */ /* eslint-disable */
import request from '@/utils/request'; import request from '@/utils/request';
/** errorHtml GET /error */ /** error GET /error */
export async function errorHtmlUsingGet(options?: { [key: string]: any }) { export async function errorUsingGet(options?: { [key: string]: any }) {
return request<API.ModelAndView>('/error', { return request<Record<string, any>>('/error', {
method: 'GET', method: 'GET',
...(options || {}), ...(options || {}),
}); });
} }
/** errorHtml PUT /error */ /** error PUT /error */
export async function errorHtmlUsingPut(options?: { [key: string]: any }) { export async function errorUsingPut(options?: { [key: string]: any }) {
return request<API.ModelAndView>('/error', { return request<Record<string, any>>('/error', {
method: 'PUT', method: 'PUT',
...(options || {}), ...(options || {}),
}); });
} }
/** errorHtml POST /error */ /** error POST /error */
export async function errorHtmlUsingPost(options?: { [key: string]: any }) { export async function errorUsingPost(options?: { [key: string]: any }) {
return request<API.ModelAndView>('/error', { return request<Record<string, any>>('/error', {
method: 'POST', method: 'POST',
...(options || {}), ...(options || {}),
}); });
} }
/** errorHtml DELETE /error */ /** error DELETE /error */
export async function errorHtmlUsingDelete(options?: { [key: string]: any }) { export async function errorUsingDelete(options?: { [key: string]: any }) {
return request<API.ModelAndView>('/error', { return request<Record<string, any>>('/error', {
method: 'DELETE', method: 'DELETE',
...(options || {}), ...(options || {}),
}); });
} }
/** errorHtml PATCH /error */ /** error PATCH /error */
export async function errorHtmlUsingPatch(options?: { [key: string]: any }) { export async function errorUsingPatch(options?: { [key: string]: any }) {
return request<API.ModelAndView>('/error', { return request<Record<string, any>>('/error', {
method: 'PATCH', method: 'PATCH',
...(options || {}), ...(options || {}),
}); });

@ -38,6 +38,21 @@ export async function innovativeServiceDetailForAdminUsingGet(
); );
} }
/** 用户报名创新服务 用户报名创新服务 POST /b2b2c/pbcInnovativeService/applyInnovativeService */
export async function applyInnovativeServiceUsingPost(
body: API.PbcInnovativeServiceApply,
options?: { [key: string]: any },
) {
return request<API.AjaxResultString_>('/b2b2c/pbcInnovativeService/applyInnovativeService', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 更改服务状态,就是那个按钮 GET /b2b2c/pbcInnovativeService/changeInnovativeServiceState */ /** 更改服务状态,就是那个按钮 GET /b2b2c/pbcInnovativeService/changeInnovativeServiceState */
export async function changeInnovativeServiceStateUsingGet( export async function changeInnovativeServiceStateUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
@ -56,6 +71,24 @@ export async function changeInnovativeServiceStateUsingGet(
); );
} }
/** 后台查询报名信息 后台查询报名信息 POST /b2b2c/pbcInnovativeService/getApplyInnovativeService */
export async function applyInnovativeServicePageUsingPost(
body: API.PageVO,
options?: { [key: string]: any },
) {
return request<API.AjaxResultIPagePbcInnovativeServiceApply_>(
'/b2b2c/pbcInnovativeService/getApplyInnovativeService',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 前端使用获取可用的创新服务列表 列表 GET /b2b2c/pbcInnovativeService/getInnovativeServiceList */ /** 前端使用获取可用的创新服务列表 列表 GET /b2b2c/pbcInnovativeService/getInnovativeServiceList */
export async function getInnovativeServiceListUsingGet(options?: { [key: string]: any }) { export async function getInnovativeServiceListUsingGet(options?: { [key: string]: any }) {
return request<API.AjaxResultListPbcInnovativeService_>( return request<API.AjaxResultListPbcInnovativeService_>(
@ -121,6 +154,21 @@ export async function innovativeServiceDetailUsingGet(
); );
} }
/** 当前用户是否预约服务 当前用户是否预约服务 POST /b2b2c/pbcInnovativeService/isApplyInnovativeService */
export async function isApplyInnovativeServiceUsingPost(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.isApplyInnovativeServiceUsingPOSTParams,
options?: { [key: string]: any },
) {
return request<API.AjaxResultBoolean_>('/b2b2c/pbcInnovativeService/isApplyInnovativeService', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 后台根据id删除单个服务详情 GET /b2b2c/pbcInnovativeService/removeInnovativeService */ /** 后台根据id删除单个服务详情 GET /b2b2c/pbcInnovativeService/removeInnovativeService */
export async function removeInnovativeServiceUsingGet( export async function removeInnovativeServiceUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)

@ -111,6 +111,12 @@ declare namespace API {
retmsg?: string; retmsg?: string;
}; };
type AjaxResultIPagePbcInnovativeServiceApply_ = {
data?: IPagePbcInnovativeServiceApply_;
retcode?: number;
retmsg?: string;
};
type AjaxResultIPagePbcOperationalBusinessDataVO_ = { type AjaxResultIPagePbcOperationalBusinessDataVO_ = {
data?: IPagePbcOperationalBusinessDataVO_; data?: IPagePbcOperationalBusinessDataVO_;
retcode?: number; retcode?: number;
@ -1249,6 +1255,14 @@ declare namespace API {
total?: number; total?: number;
}; };
type IPagePbcInnovativeServiceApply_ = {
current?: number;
pages?: number;
records?: PbcInnovativeServiceApply[];
size?: number;
total?: number;
};
type IPagePbcOperationalBusinessDataVO_ = { type IPagePbcOperationalBusinessDataVO_ = {
current?: number; current?: number;
pages?: number; pages?: number;
@ -1393,6 +1407,11 @@ declare namespace API {
total?: number; total?: number;
}; };
type isApplyInnovativeServiceUsingPOSTParams = {
/** pbcId */
pbcId: number;
};
type JSONObject = true; type JSONObject = true;
type judgePurchaseAgentForAdminUsingGETParams = { type judgePurchaseAgentForAdminUsingGETParams = {
@ -2518,6 +2537,43 @@ declare namespace API {
pbcUpdateByUserName?: string; pbcUpdateByUserName?: string;
}; };
type PbcInnovativeServiceApply = {
/** 当前页 */
current?: number;
/** 条数 */
pageSize?: number;
/** 公司 */
pbcCompany?: string;
/** 创建时间 */
pbcCreateAt?: string;
/** 创建人 */
pbcCreateBy?: number;
/** 创建人 */
pbcCreateByUserName?: string;
/** 主键 */
pbcId?: number;
/** 创新服务id */
pbcInnovativeServiceId?: number;
/** 标题 */
pbcInnovativeServiceTitle?: string;
/** 报名手机号 */
pbcMobile?: string;
/** 备注 */
pbcRemark?: string;
/** 状态,0是删除1是正常2是作废 */
pbcState?: number;
/** 更新时间 */
pbcUpdateAt?: string;
/** 更新人 */
pbcUpdateBy?: number;
/** 更新人 */
pbcUpdateByUserName?: string;
/** 报名用户ID */
pbcUserId?: number;
/** 报名用户姓名 */
pbcUserName?: string;
};
type PbcInteractStaticalVO = { type PbcInteractStaticalVO = {
pbcColectNumber?: number; pbcColectNumber?: number;
/** 新增商品浏览次数 */ /** 新增商品浏览次数 */

Loading…
Cancel
Save