|
|
@ -1,12 +1,13 @@
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
import { useEffect } from 'react';
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio } from 'antd';
|
|
|
|
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio, Modal } from 'antd';
|
|
|
|
import { useStore } from '@/stores/StoreContext.js';
|
|
|
|
import { useStore } from '@/stores/StoreContext.js';
|
|
|
|
|
|
|
|
|
|
|
|
const { Title } = Typography;
|
|
|
|
const { Title } = Typography;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Newest() {
|
|
|
|
const reservationListColumns = [
|
|
|
|
const reservationListColumns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Reference number',
|
|
|
|
title: 'Reference number',
|
|
|
@ -37,20 +38,131 @@ const reservationListColumns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Guide',
|
|
|
|
title: 'Guide',
|
|
|
|
key: 'Guide',
|
|
|
|
key: 'Guide',
|
|
|
|
dataIndex: 'guide'
|
|
|
|
dataIndex: 'guide',
|
|
|
|
|
|
|
|
render: guideRender
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
function Newest() {
|
|
|
|
function guideRender(text, record) {
|
|
|
|
|
|
|
|
if (record.key === '3') {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<Space size="middle">
|
|
|
|
|
|
|
|
<Button type="link" onClick={() => showModal()}>Fill in</Button>
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<Space size="middle">
|
|
|
|
|
|
|
|
<span>{record.guide}</span>
|
|
|
|
|
|
|
|
<Button type="link" onClick={() => showModal()}>Modify</Button>
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
const { reservationStore } = useStore();
|
|
|
|
const { reservationStore } = useStore();
|
|
|
|
const { reservationList } = reservationStore;
|
|
|
|
const { reservationList } = reservationStore;
|
|
|
|
|
|
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const showModal = () => {
|
|
|
|
|
|
|
|
setIsModalOpen(true);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleOk = () => {
|
|
|
|
|
|
|
|
setIsModalOpen(false);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
|
|
|
|
|
setIsModalOpen(false);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
console.info('Newest.useEffect');
|
|
|
|
console.info('Newest.useEffect');
|
|
|
|
}, []);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
|
|
|
title="团导游安排预览"
|
|
|
|
|
|
|
|
centered
|
|
|
|
|
|
|
|
open={isModalOpen} onOk={handleOk} onCancel={handleCancel}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
|
|
|
<Table
|
|
|
|
|
|
|
|
bordered
|
|
|
|
|
|
|
|
pagination={{
|
|
|
|
|
|
|
|
hideOnSinglePage: true
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
columns={[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: 'City',
|
|
|
|
|
|
|
|
dataIndex: 'city',
|
|
|
|
|
|
|
|
key: 'city'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: 'Guide',
|
|
|
|
|
|
|
|
dataIndex: 'guide',
|
|
|
|
|
|
|
|
key: 'guide'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]}
|
|
|
|
|
|
|
|
dataSource={[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
city: 'Guilin',
|
|
|
|
|
|
|
|
guide: 'Giffigan'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
|
|
|
<Title level={5}>Guide</Title>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
|
|
|
|
<Col span={16}>
|
|
|
|
|
|
|
|
<Input placeholder="Guide" />
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
|
|
<Button type='primary' onClick={() => {}}>Search</Button>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
|
|
|
<Radio.Group options={[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Jim',
|
|
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Giffigan',
|
|
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Herry',
|
|
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Giffigan',
|
|
|
|
|
|
|
|
value: '4',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Herry',
|
|
|
|
|
|
|
|
value: '5',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Giffigan',
|
|
|
|
|
|
|
|
value: '6',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: 'Herry',
|
|
|
|
|
|
|
|
value: '7',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]} />
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</Modal>
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
<Title level={3}>Newest Reservations</Title>
|
|
|
|
<Title level={3}>Newest Reservations</Title>
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
@ -74,6 +186,8 @@ function Newest() {
|
|
|
|
<Row>
|
|
|
|
<Row>
|
|
|
|
<Col span={24}>
|
|
|
|
<Col span={24}>
|
|
|
|
<Table
|
|
|
|
<Table
|
|
|
|
|
|
|
|
title={() => 'Reservations without the tour guide information will be highlighted in red if the arrival date is within 3 days.'}
|
|
|
|
|
|
|
|
bordered
|
|
|
|
pagination={{
|
|
|
|
pagination={{
|
|
|
|
position: ['bottomCenter'],
|
|
|
|
position: ['bottomCenter'],
|
|
|
|
current: 1,
|
|
|
|
current: 1,
|
|
|
@ -85,6 +199,7 @@ function Newest() {
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|