Browse Source

公司预约

undefined
gwbvipvip 1 year ago
parent
commit
8d1d52f32d
4 changed files with 140 additions and 0 deletions
  1. +7
    -0
      config/routes.js
  2. +7
    -0
      src/app.jsx
  3. +110
    -0
      src/pages/card/enterpriseReservation/index.jsx
  4. +16
    -0
      src/pages/card/enterpriseReservation/service.js

+ 7
- 0
config/routes.js View File

@@ -206,6 +206,13 @@ export default [
component: './card/reservationReport',
access: 'k10',
},
{
name: '公司预约统计',
icon: 'smile',
path: '/card/enterpriseReservation',
component: './card/enterpriseReservation',
access: 'k10',
},
]
},
{


+ 7
- 0
src/app.jsx View File

@@ -333,6 +333,13 @@ export async function getInitialState() {
component: './card/reservationReport',
access: 'k10',
},
{
name: '公司预约统计',
icon: 'smile',
path: '/card/enterpriseReservation',
component: './card/enterpriseReservation',
access: 'k10',
},
]
},
{


+ 110
- 0
src/pages/card/enterpriseReservation/index.jsx View File

@@ -0,0 +1,110 @@
import { PlusOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm, Checkbox,Alert } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import { history } from 'umi';
import {Getenterprisereservation} from './service';




const enterpriseReservation = () => {

/** 分布更新窗口的弹窗 */
const actionRef = useRef();
/** 国际化配置 */

useEffect(() => {
}, []);
const columns = [
{
title: '主键',
dataIndex: 'id',
hideInTable: true,
hideInSearch: true,

},
{
title: '公司',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '预约人数',
dataIndex: 'peopleQuantity',
search:false,
valueType: 'textarea',
},
{
title: '到场时间',
dataIndex: 'arrivalTimeList',
hideInTable: true,
valueType: 'dateTimeRange',
},
{
title: '到场时间',
dataIndex: 'arrivalTime',
search:false,
valueType: 'dateTime',
},
{
title: '预约时间',
dataIndex: 'createAtList',
hideInTable: true,
valueType: 'dateTimeRange',
},
{
title: '预约时间',
search:false,
dataIndex: 'createAt',
valueType: 'dateTime',
}
];
return (
<PageContainer>
{/* <Alert message="Success Text" type="success" /> */}
<ProTable
headerTitle="查询表格"
actionRef={actionRef}
showHiddenNum
rowKey="id"
search={{
labelWidth: 120,
}}
request={async (params) => {
if(params.arrivalTimeList!=undefined){
params.arrivalStartTime=params.arrivalTimeList[0];
params.arrivalEndTime=params.arrivalTimeList[1];
}
if(params.createAtList!=undefined){
params.createStartTime=params.createAtList[0];
params.createEndTime=params.createAtList[1];
}
var data = [];
var total = 0;
await Getenterprisereservation(params).then((r) => {
data = r.data.data.data;
total = r.data.data.total;
});
return {
data: data,
success: true,
total: total,
};
}}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
/>
</PageContainer>
);
};

export default enterpriseReservation;

+ 16
- 0
src/pages/card/enterpriseReservation/service.js View File

@@ -0,0 +1,16 @@
// @ts-ignore

/* eslint-disable */
import { request } from 'umi';

/** 获取公司预约*/
export async function Getenterprisereservation(data) {
return request(`/kitchen/api/one-card/enterprise-reservation-page`, {
method: 'Post',
data: data,
// params: { ...params },
// ...(options || {}),
});
}



Loading…
Cancel
Save