diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index dd55f3f..835c732 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -12,13 +12,13 @@ class Reservation { fetchReservationList(current, referenceNo, fromDate, thruDate) { this.reservationPage.current = current; - const fetchUrl = prepareUrl(HT_HOST + '/service-tourdesign/GetPlanSearchList') + const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/GetPlanSearchList') .append('VEI_SN', this.root.authStore.login.travelAgencyId) .append('GroupNo', referenceNo) .append('DateStart', fromDate) .append('DateEnd', thruDate) - .append('RsTotal', this.reservationPage.total) - .append('PageNum', this.reservationPage.size) + .append('TotalNum', this.reservationPage.total) + .append('PageSize', this.reservationPage.size) .append('PageIndex', this.reservationPage.current) .build(); @@ -47,7 +47,7 @@ class Reservation { } fetchReservation(reservationId) { - const fetchUrl = prepareUrl(HT_HOST + '/service-tourdesign/GetPlanInfo') + const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/GetPlanInfo') .append('VEI_SN', this.root.authStore.login.travelAgencyId) .append('GRI_SN', reservationId) .build(); @@ -98,7 +98,7 @@ class Reservation { itineraryList = [ ]; - + customerNames = ''; } diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx index cabe475..b178a83 100644 --- a/src/views/reservation/Detail.jsx +++ b/src/views/reservation/Detail.jsx @@ -1,5 +1,5 @@ import { useParams, useNavigate } from "react-router-dom"; -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; import { observer } from "mobx-react"; import { toJS } from "mobx"; import { Row, Col, Space, Button, Table, Input, Typography, List, App } from 'antd'; @@ -41,9 +41,11 @@ function Detail() { const { notification } = App.useApp(); const { reservationId } = useParams(); const { reservationStore } = useStore(); + const [dataLoading, setDataLoading] = useState(false); const { itineraryList, customerNames, customerList, reservationDetail } = reservationStore; - useEffect(() => { + useEffect(() => { + setDataLoading(true); reservationStore.fetchReservation(reservationId) .catch(ex => { notification.error({ @@ -52,6 +54,9 @@ function Detail() { placement: 'top', duration: 4, }); + }) + .finally(() => { + setDataLoading(false); }); }, [reservationId]); @@ -78,6 +83,7 @@ function Detail() {