删除不需要的查询条件

增加详细页功能
release
Jimmy Liow 2 years ago
parent a204cca6b0
commit 8dc92df46f

@ -3,10 +3,11 @@ import { useEffect } from 'react';
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { toJS } from "mobx"; import { toJS } from "mobx";
import moment from "moment"; import moment from "moment";
import { Row, Col, Space, Button, Table, Tag, Typography, DatePicker } from 'antd'; import { Row, Col, Space, Button, Table, Input, Typography, List } from 'antd';
import { useStore } from '../../stores/StoreContext.js'; import { useStore } from '../../stores/StoreContext.js';
const { Title } = Typography; const { Title } = Typography;
const { TextArea } = Input;
const dataSource = [ const dataSource = [
{ {
@ -71,6 +72,25 @@ const columns = [
}, },
]; ];
const customerList = [
{
title: 'Crane / Gemma Chelse',
description: '性别:男 生日:2002-07-02 国籍:英国 护照号:559489179 护照有效期:2029-03-11',
},
{
title: 'McCracken / Ryan Lee',
description: '性别:男 生日:1964-11-21 国籍:英国 护照号:126793728 护照有效期:2031-08-03',
},
{
title: 'Ramlakhan / Darryl',
description: '性别:男 生日:1983-04-16 国籍:特立尼达和多巴哥 护照号:TB591985 护照有效期:2027-11-12',
},
{
title: 'Ramlakhan / Reanne',
description: '性别:女 生日:1983-12-16 国籍:特立尼达和',
},
];
function Detail() { function Detail() {
const navigate = useNavigate(); const navigate = useNavigate();
const { reservationId } = useParams(); const { reservationId } = useParams();
@ -85,17 +105,52 @@ function Detail() {
<Space direction="vertical" style={{ width: '100%' }}> <Space direction="vertical" style={{ width: '100%' }}>
<Row gutter={{ md: 24 }}> <Row gutter={{ md: 24 }}>
<Col span={20}> <Col span={20}>
<Title level={4}>Reservation Detail 中华游111029-N111025076</Title> <Title level={4}>Reference number: 中华游111029-N111025076; Arrival date: 2023-12-15; Guide: Giffigan</Title>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Button type="link" onClick={() => navigate('/reservation/newest')}>Return</Button> <Button type="link" onClick={() => navigate('/reservation/newest')}>Return</Button>
</Col> </Col>
</Row> </Row>
<Row>
<Col span={2}>
<Button type="link" onClick={() => console.info('')}>Print Reservation</Button>
</Col>
<Col span={2}>
<Button type="link" onClick={() => console.info('')}>Print Feedback</Button>
</Col>
<Col span={2}>
<Button type="link" onClick={() => console.info('')}>Print Customer Card</Button>
</Col>
</Row>
<Row> <Row>
<Col span={24}> <Col span={24}>
<Table dataSource={dataSource} columns={columns} /> <Table dataSource={dataSource} columns={columns} />
</Col> </Col>
</Row> </Row>
<Row>
<Col span={24}>
<List
header={<Title level={5}>Customer List</Title>}
itemLayout="horizontal"
dataSource={customerList}
renderItem={(item, index) => (
<List.Item>
<List.Item.Meta
title={<a href="https://ant.design">{index + 1}. {item.title}</a>}
description={item.description}
/>
</List.Item>
)}
/>
</Col>
</Row>
<Row>
<Col span={24}>
<TextArea rows={4} placeholder="如贵社对计划中的行程安排有任何建议请联系组团人本人。中华游欢迎大家对我们的工作提出合理化建议。" maxLength={6} />
</Col>
</Row>
<Button type="primary" onClick={() => console.info('submit')}>Submit</Button>
</Space> </Space>
); );
} }

@ -54,7 +54,7 @@ function Newest() {
<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 }}>
<Col span={5}> <Col span={4}>
<Input placeholder="Reference number" /> <Input placeholder="Reference number" />
</Col> </Col>
<Col span={6}> <Col span={6}>
@ -63,29 +63,11 @@ function Newest() {
<DatePicker.RangePicker <DatePicker.RangePicker
allowClear={true} allowClear={true}
inputReadOnly={true} inputReadOnly={true}
placeholder={['Arrival Date', '']} placeholder={['From', 'Thru']}
/>
</Space>
</Col>
<Col span={8}>
<Space direction="horizontal">
快速选择
<Radio.Group
options={[
{ label: '未确认', value: '1' },
{ label: '已确认', value: '2' },
{ label: '未录入导游', value: '3' },
{ label: '有变更', value: '4' },
{ label: '已取消', value: '5' },
{ label: '全部', value: '6' },
]}
value={'6'}
optionType="button"
buttonStyle="solid"
/> />
</Space> </Space>
</Col> </Col>
<Col span={4}> <Col span={14}>
<Button type='primary' onClick={() => reservationStore.fetchRecent()}>Search</Button> <Button type='primary' onClick={() => reservationStore.fetchRecent()}>Search</Button>
</Col> </Col>
</Row> </Row>

Loading…
Cancel
Save