更新用户登陆信息;增加预订行程

release
Jimmy Liow 2 years ago
parent c75dd11a3d
commit 59d2e9241d

@ -9,8 +9,8 @@ class Auth {
login = {
userId: 1,
username: 'Giffigan(Discova)',
travelAgencyId: 628
username: 'Vu Xuan Giang(TOI)',
travelAgencyId: 30333
}
}

@ -12,10 +12,10 @@ class Reservation {
fetchReservationList(referenceNo, fromDate, thruDate) {
const fetchUrl = prepareUrl(HT_HOST + '/service-tourdesign/GetPlanSearchList')
.append('VEISn', this.root.authStore.login.travelAgencyId)
.append('VEI_SN', this.root.authStore.login.travelAgencyId)
.append('GroupNo', referenceNo)
.append('DateStart', fromDate)
.append('DataEnd', thruDate)
.append('DateEnd', thruDate)
.append('ReTotal', 0)
.append('PageSize', 0)
.append('PageNum', 0)
@ -55,19 +55,20 @@ class Reservation {
.then(json => {
runInAction(() => {
if (json.errcode == 0) {
console.info(json);
// this.reservationList = json.Result.map((data, index) => {
// return {
// key: data.vas_gri_sn,
// id: data.vas_gri_sn,
// referenceNumber: data.GriName,
// arrivalDate: data.GetGDate,
// pax: data.PersonNum,
// status: data.GState,
// reservationDate: data.GetGDate,
// guide: data.Guide,
// }
// });
this.itineraryList = json.VendorTour.map((data, index) => {
return {
key: data.GRD_GRI_SN,
day: data.GRD_OrderDate,
placeTransport: data.GRD_Traffic,
todayActivities: data.GRD_LandscapeWL,
accommodation: data.GRD_Hotel,
meals: data.GRD_Meal_L + data.GRD_Meal_S,
}
});
this.reservationDetail = {
referenceNumber: json.PlanDetail[0].GRI_Name, tourGuide: json.Guide[0].TGI2_Name, arrivalDate: json.PlanDetail[0].eoi_getdate
};
this.customerNames = json.CusAndRequest[0].GCI_CustomerList;
} else {
throw new Error(json.errmsg + ': ' + json.errcode);
}
@ -77,6 +78,13 @@ class Reservation {
reservationList = [];
reservationDetail = {
referenceNumber: '', arrivalDate: '', tourGuide: ''
};
itineraryList = [
];
customerList = [
{
title: 'Crane / Gemma Chelse',
@ -99,33 +107,7 @@ class Reservation {
description: 'Gender: Male Nationality: United States Passport: 593422145 Expiration Date: 2023-04-25 Birth Date: 2012-03-26s',
},
];
itineraryList = [
{
key: '1',
day: 'Tue 05-Jul-2022',
placeTransport: 'Bangkok to Chiang Mai, PG217 Dep 12:15 - Arr 13:35 (Economy class)',
todayActivities: 'Hotel to airport Transfer (Bangkok), Airport to Hotel Transfer (Chiang Mai), Street Food Tour in Chiang Mai (Morning or Afternoon)',
accommodation: 'The Rim Resort **** (Dahla Junior Suite)',
meals: 'B,D'
},
{
key: '2',
day: 'Wed 06-Jul-2022',
placeTransport: 'Chiang Mai',
todayActivities: 'Elephant Jungle Sanctuary Half Day Tour (Private transfer and Join in activity), Chiang Mai City Lifestyle Experiece and Mountain Doi Suthep Half Day Tour with a rickshaw ride',
accommodation: 'The Rim Resort **** (Dahla Junior Suite)',
meals: 'B'
},
{
key: '3',
day: 'Thu 07-Jul-2022',
placeTransport: 'Chiang Mai to Phuket , VZ414 Dep 10:40 - Arr 12:50 (Economy class)',
todayActivities: 'Hotel to airport Transfer (Chiang Mai), Airport to Hotel Transfer (Phuket )',
accommodation: 'Pamookkoo Resort **** (Family room)',
meals: 'B'
},
];
customerNames = '';
}
export default Reservation;

@ -71,7 +71,7 @@ function App() {
}}>
<Header className="header" style={{ position: 'sticky', top: 0, zIndex: 1, width: '100%' }}>
<Row gutter={{ md: 24 }} justify="end">
<Col span={22}>
<Col span={20}>
<img src={AppLogo} className="logo" alt="App logo" />
<Menu theme="dark" mode="horizontal" defaultSelectedKeys={[href]} items={
[
@ -81,7 +81,7 @@ function App() {
]
} />
</Col>
<Col span={2}>
<Col span={4}>
<Dropdown
menu={{
items

@ -42,10 +42,9 @@ function Detail() {
const { notification } = App.useApp();
const { reservationId } = useParams();
const { reservationStore } = useStore();
const { itineraryList, customerList } = reservationStore;
const { itineraryList, customerNames, customerList, reservationDetail } = reservationStore;
useEffect(() => {
console.info('Detail.useEffect: ' + reservationId);
reservationStore.fetchReservation(reservationId)
.catch(ex => {
notification.error({
@ -61,7 +60,7 @@ function Detail() {
<Space direction="vertical" style={{ width: '100%' }}>
<Row gutter={{ md: 24 }}>
<Col span={20}>
<Title level={4}>Reference Number: 220629-W220420009; Arrival date: 2023-12-15; Tour guide: Giffigan</Title>
<Title level={4}>Reference Number: {reservationDetail.referenceNumber}; Arrival date: {reservationDetail.arrivalDate}; Tour guide: {reservationDetail.tourGuide}</Title>
</Col>
<Col span={4}>
<Button type="link" onClick={() => navigate('/reservation/newest')}>Back</Button>

@ -77,10 +77,6 @@ function Newest() {
setIsModalOpen(false);
};
useEffect(() => {
console.info('Newest.useEffect');
}, []);
const onSearchClick = () => {
setTableLoading(true);
reservationStore.fetchReservationList(referenceNo, selectedDateRange[0], selectedDateRange[1])

Loading…
Cancel
Save