diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index 255dbc4..4ad6ddc 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -49,7 +49,8 @@
"Invoice": "Invoice",
"Feedback": "Feedback",
"Notice": "Notice",
- "Report": "Report"
+ "Report": "Report",
+ "Airticket": "AirTicket"
},
"Validation": {
"Title": "Notification",
diff --git a/public/locales/en/group.json b/public/locales/en/group.json
index 58a3a3d..4286b80 100644
--- a/public/locales/en/group.json
+++ b/public/locales/en/group.json
@@ -10,6 +10,7 @@
"Attachments": "Attachments",
"ConfirmationDate": "Confirmation Date",
"ConfirmationDetails": "Confirmation Details",
+ "PNR": "PASSAGER NAME RECORD",
"#": "#"
}
diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json
index 7511da4..f6c273c 100644
--- a/public/locales/zh/common.json
+++ b/public/locales/zh/common.json
@@ -49,7 +49,8 @@
"Invoice": "账单",
"Feedback": "反馈表",
"Notice": "通知",
- "Report": "质量评分"
+ "Report": "质量评分",
+ "Airticket": "机票订票"
},
"Validation": {
"Title": "温馨提示",
diff --git a/public/locales/zh/group.json b/public/locales/zh/group.json
index 531c631..2f25071 100644
--- a/public/locales/zh/group.json
+++ b/public/locales/zh/group.json
@@ -10,6 +10,7 @@
"Attachments": "附件",
"ConfirmationDate": "确认日期",
"ConfirmationDetails": "确认信息",
+ "PNR": "旅客订座记录",
"#": "#"
}
diff --git a/src/components/SearchForm.jsx b/src/components/SearchForm.jsx
index 8b8ce1c..0e33c82 100644
--- a/src/components/SearchForm.jsx
+++ b/src/components/SearchForm.jsx
@@ -134,12 +134,20 @@ function getFields(props) {
baseChildren = [
item(
'referenceNo',
- 99,
-
-
+ 1,
+
+
,
fieldProps?.referenceNo?.col || 4
),
+ item(
+ 'PNR',
+ 2,
+
+
+ ,
+ fieldProps?.PNR?.col || 4
+ ),
item(
'invoiceStatus',
99,
@@ -168,6 +176,7 @@ function getFields(props) {
,
fieldProps?.dates?.col || midCol
),
+
];
baseChildren = baseChildren
.map((x) => {
diff --git a/src/main.jsx b/src/main.jsx
index 7be63e3..ff392ac 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -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:},
{ path: "invoice/paid",element:},
{ path: "invoice/paid/detail/:flid",element:},
+ { path: "airticket",element:},
]
},
{
diff --git a/src/stores/Airticket.js b/src/stores/Airticket.js
new file mode 100644
index 0000000..1ddc720
--- /dev/null
+++ b/src/stores/Airticket.js
@@ -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;
diff --git a/src/views/App.jsx b/src/views/App.jsx
index 2556d2b..0d11cd0 100644
--- a/src/views/App.jsx
+++ b/src/views/App.jsx
@@ -124,6 +124,7 @@ function App() {
{ key: 'invoice', label: {t('menu.Invoice')} },
{ key: 'feedback', label: {t('menu.Feedback')} },
{ key: 'report', label: {t('menu.Report')} },
+ { key: 'airticket', label: {t('menu.Airticket')} },
{
key: 'notice',
label: (
diff --git a/src/views/airticket/Index.jsx b/src/views/airticket/Index.jsx
new file mode 100644
index 0000000..479975c
--- /dev/null
+++ b/src/views/airticket/Index.jsx
@@ -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 (
+
+ {
+ getPlanList(travelAgencyId, formVal.referenceNo, formVal.PNR, formVal.startdate, formVal.endtime);
+ }}
+ />
+
+
+
+
+
+
+
+ );
+};
+export default Airticket;