反馈表列表和详细页
parent
998302332d
commit
8042127689
@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export const stores_Context = React.createContext();
|
||||
export const DATE_FORMAT = "YYYY-MM-DD";
|
||||
export const HT_HOST = process.env.NODE_ENV == "production" ? "https://p9axztuwd7x8a7.mycht.cn" : "http://202.103.68.100:890";
|
@ -0,0 +1,103 @@
|
||||
import { useParams, useNavigate } from "react-router-dom";
|
||||
import { useEffect } from 'react';
|
||||
import { observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import moment from "moment";
|
||||
import { Row, Col, Space, Button, Table, Tag, Typography, DatePicker } from 'antd';
|
||||
import { useStore } from '../../stores/StoreContext.js';
|
||||
|
||||
const { Title } = Typography;
|
||||
|
||||
const dataSource = [
|
||||
{
|
||||
key: '1',
|
||||
name: '2',
|
||||
age: '二',
|
||||
address: '5月2日',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: '胡彦祖',
|
||||
age: 42,
|
||||
address: '西湖区湖底公园1号',
|
||||
},
|
||||
];
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '天数',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '星期',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
},
|
||||
{
|
||||
title: '日期',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
{
|
||||
title: '始发城市',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
{
|
||||
title: '抵达城市',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
{
|
||||
title: '交通',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
{
|
||||
title: '酒店',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
{
|
||||
title: '餐饮 [午、晚]',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
{
|
||||
title: '景点及旅游服务安排',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
},
|
||||
];
|
||||
|
||||
function Detail() {
|
||||
const navigate = useNavigate();
|
||||
const { reservationId } = useParams();
|
||||
const { reservationStore } = useStore();
|
||||
const { reservationList } = reservationStore;
|
||||
|
||||
useEffect(() => {
|
||||
console.info('Detail.useEffect: ' + reservationId);
|
||||
}, [reservationId]);
|
||||
|
||||
return (
|
||||
<Space direction="vertical" style={{ width: '100%' }}>
|
||||
<Row gutter={{ md: 24 }}>
|
||||
<Col span={20}>
|
||||
<Title level={4}>Reservation Detail 中华游111029-N111025076</Title>
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
<Button type="link" onClick={() => navigate('/reservation/newest')}>Return</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<Table dataSource={dataSource} columns={columns} />
|
||||
</Col>
|
||||
</Row>
|
||||
</Space>
|
||||
);
|
||||
}
|
||||
|
||||
export default observer(Detail);
|
@ -0,0 +1,83 @@
|
||||
import { NavLink } from "react-router-dom";
|
||||
import { useEffect } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio } from "antd";
|
||||
import { useStore } from "@/stores/StoreContext.js";
|
||||
|
||||
const { Title } = Typography;
|
||||
|
||||
const groupListColumns = [
|
||||
{
|
||||
title: "团名",
|
||||
dataIndex: "referenceNumber",
|
||||
key: "Reference number",
|
||||
render: (text, record) => <NavLink to={`/feedback/${record.EOI_SN}`}>{text}</NavLink>,
|
||||
},
|
||||
{
|
||||
title: "离团日期",
|
||||
dataIndex: "arrivalDate",
|
||||
key: "Arrival date",
|
||||
},
|
||||
{
|
||||
title: "城市",
|
||||
key: "Pax",
|
||||
dataIndex: "pax",
|
||||
},
|
||||
{
|
||||
title: "导游",
|
||||
key: "Status",
|
||||
dataIndex: "status",
|
||||
},
|
||||
{
|
||||
title: "平均分",
|
||||
key: "Reservation date",
|
||||
dataIndex: "reservationDate",
|
||||
},
|
||||
{
|
||||
title: "图片数",
|
||||
key: "Guide",
|
||||
dataIndex: "guide",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "Guide",
|
||||
dataIndex: "guide",
|
||||
},
|
||||
];
|
||||
|
||||
function Index() {
|
||||
const { feedbackStore } = useStore();
|
||||
const { groupList } = feedbackStore;
|
||||
|
||||
useEffect(() => {
|
||||
console.info("Newest.useEffect");
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Space direction="vertical" style={{ width: "100%" }}>
|
||||
<Title level={3}>反馈表</Title>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col md={24} lg={4} xxl={4}>
|
||||
<Input placeholder="团号" />
|
||||
</Col>
|
||||
<Col md={24} lg={4} xxl={4}>
|
||||
<DatePicker.RangePicker allowClear={true} inputReadOnly={true} placeholder={["离团日期 从", "截止"]} />
|
||||
</Col>
|
||||
<Col md={24} lg={4} xxl={4}>
|
||||
<Button type="primary" loading={feedbackStore.loading} onClick={() => feedbackStore.searchFeedbackList(32531,'','2023-02-01 00:00','2023-03-30 23:59')}>
|
||||
搜索
|
||||
</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col md={24} lg={24} xxl={24}>
|
||||
<Table bordered={true} columns={groupListColumns} dataSource={groupList} />
|
||||
</Col>
|
||||
</Row>
|
||||
</Space>
|
||||
);
|
||||
}
|
||||
|
||||
export default observer(Index);
|
Loading…
Reference in New Issue