diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js
index 835c732..d6a69de 100644
--- a/src/stores/Reservation.js
+++ b/src/stores/Reservation.js
@@ -17,7 +17,7 @@ class Reservation {
.append('GroupNo', referenceNo)
.append('DateStart', fromDate)
.append('DateEnd', thruDate)
- .append('TotalNum', this.reservationPage.total)
+ .append('TotalNum', 0)
.append('PageSize', this.reservationPage.size)
.append('PageIndex', this.reservationPage.current)
.build();
@@ -29,13 +29,13 @@ class Reservation {
this.reservationList = json.Result.map((data, index) => {
return {
key: data.vas_gri_sn,
- id: data.vas_gri_sn,
+ referenceId: data.vas_gri_sn,
referenceNumber: data.GriName,
arrivalDate: data.GetGDate,
pax: data.PersonNum,
status: data.GState,
reservationDate: data.GetGDate,
- guide: data.Guide,
+ guide: data.Guide
}
});
this.reservationPage.total = json.Result[0].RsTotal;
@@ -80,6 +80,34 @@ class Reservation {
});
}
+ fetchCityList(reservationId) {
+ const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/PTGetCityGuide')
+ .append('VEI_SN', this.root.authStore.login.travelAgencyId)
+ .append('GRI_SN', reservationId)
+ .append('LGC', 1)
+ .build();
+
+ return fetchJSON(fetchUrl)
+ .then(json => {
+ runInAction(() => {
+ if (json.errcode == 0) {
+ this.cityList = json.Result.map((data, index) => {
+ return {
+ key: data.CII_SN,
+ cityName: data.CityName,
+ tourGuideId: data.TGI_SN,
+ tourGuide: data.GuideName,
+ }
+ });
+ } else {
+ throw new Error(json.errmsg + ': ' + json.errcode);
+ }
+ });
+ });
+ }
+
+ cityList = [];
+
reservationList = [];
reservationDetail = {
diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx
index 6ec77cc..c827ea5 100644
--- a/src/views/reservation/Newest.jsx
+++ b/src/views/reservation/Newest.jsx
@@ -43,31 +43,45 @@ function Newest() {
},
];
- function guideRender(text, record) {
- if (record.guide === '') {
+ function guideRender(text, reservation) {
+ if (reservation.guide === '') {
return (