|
|
@@ -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; |