添加机票计划搜索和列表显示

feature/price_manager
YCC 1 year ago
parent 0c91e88674
commit e2766501ca

@ -49,7 +49,8 @@
"Invoice": "Invoice",
"Feedback": "Feedback",
"Notice": "Notice",
"Report": "Report"
"Report": "Report",
"Airticket": "AirTicket"
},
"Validation": {
"Title": "Notification",

@ -10,6 +10,7 @@
"Attachments": "Attachments",
"ConfirmationDate": "Confirmation Date",
"ConfirmationDetails": "Confirmation Details",
"PNR": "PASSAGER NAME RECORD",
"#": "#"
}

@ -49,7 +49,8 @@
"Invoice": "账单",
"Feedback": "反馈表",
"Notice": "通知",
"Report": "质量评分"
"Report": "质量评分",
"Airticket": "机票订票"
},
"Validation": {
"Title": "温馨提示",

@ -10,6 +10,7 @@
"Attachments": "附件",
"ConfirmationDate": "确认日期",
"ConfirmationDetails": "确认信息",
"PNR": "旅客订座记录",
"#": "#"
}

@ -134,12 +134,20 @@ function getFields(props) {
baseChildren = [
item(
'referenceNo',
99,
<Form.Item name='referenceNo'>
<Input placeholder={t('group:RefNo')} allowClear />
1,
<Form.Item name='referenceNo' label={t('group:RefNo')} {...fieldProps.referenceNo}>
<Input placeholder={t('group:RefNo')} allowClear />
</Form.Item>,
fieldProps?.referenceNo?.col || 4
),
item(
'PNR',
2,
<Form.Item name='PNR' label="PNR">
<Input placeholder={t('group:PNR')} allowClear />
</Form.Item>,
fieldProps?.PNR?.col || 4
),
item(
'invoiceStatus',
99,
@ -168,6 +176,7 @@ function getFields(props) {
</Form.Item>,
fieldProps?.dates?.col || midCol
),
];
baseChildren = baseChildren
.map((x) => {

@ -29,6 +29,7 @@ import InvoiceIndex from "@/views/invoice/Index";
import InvoiceDetail from "@/views/invoice/Detail";
import InvoicePaid from "@/views/invoice/Paid";
import InvoicePaidDetail from "@/views/invoice/PaidDetail";
import Airticket from "@/views/airticket/Index";
import './i18n';
@ -63,6 +64,7 @@ const router = createBrowserRouter([
{ path: "invoice/detail/:GMDSN/:GSN",element:<InvoiceDetail />},
{ path: "invoice/paid",element:<InvoicePaid />},
{ path: "invoice/paid/detail/:flid",element:<InvoicePaidDetail />},
{ path: "airticket",element:<Airticket />},
]
},
{

@ -0,0 +1,30 @@
import { create } from "zustand";
import { fetchJSON } from "@/utils/request";
import { prepareUrl, isNotEmpty } from "@/utils/commons";
import { HT_HOST, DATE_FORMAT } from "@/config";
import dayjs from "dayjs";
const airTicketStore = create((set, get) => ({
loading: false,
setLoading: loading => set({ loading }),
setPlanList: planList => set({ planList }),
async getPlanList(vei_sn, GRI_Name, PNR, TimeStart, TimeEnd) {
const { setLoading, setPlanList } = get();
setLoading(true);
const searchParams = {
vei_sn: 4272, //vei_sn,
FlightDate1: TimeStart,
FlightDate2: TimeEnd,
GRI_Name: GRI_Name,
PNR: PNR,
};
const { errcode, result } = await fetchJSON(`${HT_HOST}/Service_BaseInfoWeb/GetFlightPlan`, searchParams);
const _result = errcode !== 0 ? [] : result;
setPlanList(_result);
setLoading(false);
},
}));
export default airTicketStore;

@ -124,6 +124,7 @@ function App() {
{ key: 'invoice', label: <Link to='/invoice'>{t('menu.Invoice')}</Link> },
{ key: 'feedback', label: <Link to='/feedback'>{t('menu.Feedback')}</Link> },
{ key: 'report', label: <Link to='/report'>{t('menu.Report')}</Link> },
{ key: 'airticket', label: <Link to='/airticket'>{t('menu.Airticket')}</Link> },
{
key: 'notice',
label: (

@ -0,0 +1,105 @@
import { useState, useEffect } from "react";
import { Grid, Divider, Layout, Spin, Input, Col, Row, Space, List, Table } from "antd";
import { PhoneOutlined, CustomerServiceOutlined, AudioOutlined } from "@ant-design/icons";
import { useParams, useHref, useNavigate } from "react-router-dom";
import { isEmpty } from "@/utils/commons";
import dayjs from "dayjs";
import SearchForm from "@/components/SearchForm";
import airTicketStore from "@/stores/Airticket";
import useAuthStore from "@/stores/Auth";
const planListColumns = [
{
title: "团名",
key: "GRI_No",
dataIndex: "GRI_No",
},
{
title: "组团人",
key: "WL",
dataIndex: "WL",
},
{
title: "人数",
dataIndex: "PersonNum",
key: "PersonNum",
},
{
title: "出发日期",
key: "StartDate",
dataIndex: "StartDate",
},
{
title: "出发城市",
key: "FromCity",
dataIndex: "FromCity",
},
{
title: "抵达城市",
key: "ToCity",
dataIndex: "ToCity",
},
{
title: "航空",
key: "FlightNo",
dataIndex: "FlightNo",
},
{
title: "起飞时间",
key: "FlightTimeStart",
dataIndex: "FlightTimeStart",
},
{
title: "落地时间",
key: "FlightTimeEnd",
dataIndex: "FlightTimeEnd",
},
{
title: "PNR 暂时用FlightInfo",
key: "FlightInfo",
dataIndex: "FlightInfo",
},
];
const Airticket = props => {
const href = useHref();
const navigate = useNavigate();
const { phonenumber } = useParams();
const travelAgencyId = useAuthStore(state => state.loginUser.travelAgencyId);
const [getPlanList, planList, loading] = airTicketStore(state => [state.getPlanList, state.planList, state.loading]);
const [loginUser] = useAuthStore(state => [state.loginUser]);
const [phone_number, setPhone_number] = useState(phonenumber);
const showTotal = total => `合计 ${total} `;
useEffect(() => {}, []);
const oncall = () => {};
return (
<Space direction="vertical" style={{ width: "100%" }}>
<SearchForm
initialValue={{
dates: [dayjs().startOf("M"), dayjs().endOf("M")],
}}
fieldsConfig={{
shows: ["referenceNo", "PNR", "dates"],
fieldProps: {
referenceNo: { label: "搜索计划" },
dates: { label: "出发日期" },
},
}}
onSubmit={(err, formVal, filedsVal) => {
getPlanList(travelAgencyId, formVal.referenceNo, formVal.PNR, formVal.startdate, formVal.endtime);
}}
/>
<Row>
<Col md={24} lg={24} xxl={24}>
<Table bordered={true} rowKey="id" columns={planListColumns} dataSource={planList} loading={loading} pagination={{ defaultPageSize: 20, showTotal: showTotal }} />
</Col>
<Col md={24} lg={24} xxl={24}></Col>
</Row>
</Space>
);
};
export default Airticket;
Loading…
Cancel
Save