From 718b656357d1a6a69384be6d2a07d3abed16533e Mon Sep 17 00:00:00 2001
From: Jimmy Liow <18777396951@163.com>
Date: Thu, 27 Apr 2023 11:56:38 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=87=E6=9C=AC=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E5=AE=A2=E4=BA=BA=E5=90=8D=E5=AD=97=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/stores/Reservation.js | 31 +++++--------------------------
src/views/reservation/Detail.jsx | 26 +++++++-------------------
src/views/reservation/Newest.jsx | 16 ++++++++--------
3 files changed, 20 insertions(+), 53 deletions(-)
diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js
index 67edcfb..dd55f3f 100644
--- a/src/stores/Reservation.js
+++ b/src/stores/Reservation.js
@@ -17,6 +17,7 @@ class Reservation {
.append('GroupNo', referenceNo)
.append('DateStart', fromDate)
.append('DateEnd', thruDate)
+ .append('RsTotal', this.reservationPage.total)
.append('PageNum', this.reservationPage.size)
.append('PageIndex', this.reservationPage.current)
.build();
@@ -47,9 +48,9 @@ class Reservation {
fetchReservation(reservationId) {
const fetchUrl = prepareUrl(HT_HOST + '/service-tourdesign/GetPlanInfo')
- .append('VEI_SN', this.root.authStore.login.travelAgencyId)
- .append('GRI_SN', reservationId)
- .build();
+ .append('VEI_SN', this.root.authStore.login.travelAgencyId)
+ .append('GRI_SN', reservationId)
+ .build();
return fetchJSON(fetchUrl)
.then(json => {
@@ -97,29 +98,7 @@ class Reservation {
itineraryList = [
];
-
- customerList = [];
- // {
- // title: 'Crane / Gemma Chelse',
- // description: 'Gender: Male Nationality: United States Passport: 655844449 Expiration Date: 2030-09-07 Birth Date: 1979-12-23',
- // },
- // {
- // title: 'McCracken / Ryan Lee',
- // description: 'Gender: Female Nationality: United States Passport: 655844450 Expiration Date: 2030-09-07 Birth Date: 1983-05-17',
- // },
- // {
- // title: 'Ramlakhan / Darryl',
- // description: 'Gender: Female Nationality: United States Passport: 661810034 Expiration Date: 2026-03-16 Birth Date: 2006-07-12',
- // },
- // {
- // title: 'Ramlakhan / Reanne',
- // description: 'Gender: Male Nationality: United States Passport: 593422145 Expiration Date: 2023-04-25 Birth Date: 2012-03-26',
- // },
- // {
- // title: 'Alexander Daich',
- // description: 'Gender: Male Nationality: United States Passport: 593422145 Expiration Date: 2023-04-25 Birth Date: 2012-03-26s',
- // },
- // ];
+
customerNames = '';
}
diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx
index d4a0985..cabe475 100644
--- a/src/views/reservation/Detail.jsx
+++ b/src/views/reservation/Detail.jsx
@@ -74,33 +74,21 @@ function Detail() {
-
+
Itinerary Overview
-
-
-
-
+
-
- Customer Names (Full name as it appears on passport) {customerNames} >}
- itemLayout="horizontal"
- dataSource={toJS(customerList)}
- renderItem={(item, index) => (
-
- {index + 1}. {item.title}}
- description={item.description}
- />
-
- )}
- />
+
+ Customer Names (Full name as it appears on passport)
+
+
diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx
index fa36815..45f3716 100644
--- a/src/views/reservation/Newest.jsx
+++ b/src/views/reservation/Newest.jsx
@@ -62,9 +62,9 @@ function Newest() {
const { reservationStore } = useStore();
const { reservationList, reservationPage } = reservationStore;
const [isModalOpen, setIsModalOpen] = useState(false);
- const [selectedDateRange, onDateRangeChange] = useState([]);
+ const [arrivalDateRange, onDateRangeChange] = useState([]);
const [referenceNo, onNumberChange] = useState('');
- const [tableLoading, setTableLoading] = useState(false);
+ const [dataLoading, setDataLoading] = useState(false);
const { notification } = App.useApp();
const showModal = () => {
@@ -77,9 +77,9 @@ function Newest() {
setIsModalOpen(false);
};
- const onSearchClick = (current) => {
- setTableLoading(true);
- reservationStore.fetchReservationList(current, referenceNo, selectedDateRange[0], selectedDateRange[1])
+ const onSearchClick = (current=1) => {
+ setDataLoading(true);
+ reservationStore.fetchReservationList(current, referenceNo, arrivalDateRange[0], arrivalDateRange[1])
.catch(ex => {
notification.error({
message: `Notification`,
@@ -89,7 +89,7 @@ function Newest() {
});
})
.finally(() => {
- setTableLoading(false);
+ setDataLoading(false);
});
}
@@ -196,7 +196,7 @@ function Newest() {
- onSearchClick(1)}>Search
+ onSearchClick()} loading={dataLoading}>Search
@@ -204,7 +204,7 @@ function Newest() {
'Reservations without the tour guide information will be highlighted in red if the arrival date is within 3 days.'}
bordered
- loading={tableLoading}
+ loading={dataLoading}
pagination={{
position: ['bottomCenter'],
current: reservationPage.current,