diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index 2fb6999..c73b5ca 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -30,7 +30,7 @@ class Reservation { .then(json => { if (json.errcode == 0) { runInAction(() => { - this.reservationList = (json?.Result ?? []).map((data, index) => { + this.reservationList = (json?.Result??[]).map((data, index) => { return { key: data.vas_gri_sn, reservationId: data.vas_gri_sn, @@ -42,7 +42,7 @@ class Reservation { guide: data.Guide } }); - this.reservationPage.total = (json?.Result ?? [{RsTotal: 0}]).RsTotal; + this.reservationPage.total = (json?.Result??[{RsTotal: 0}]).RsTotal; }); } else { throw new Error(json.errmsg + ': ' + json.errcode); @@ -63,7 +63,7 @@ class Reservation { this.reservationDetail = { referenceNumber: json.PlanDetail[0].GRI_Name, tourGuide: json.PlanDetail[0].Guide, arrivalDate: json.PlanDetail[0].eoi_getdate }; - this.confirmationList = (json?.PlanChange ?? []).map((data, index) => { + this.confirmationList = (json?.PlanChange??[]).map((data, index) => { return { key: data.PCI_SN, PCI_Changetext: data.PCI_Changetext, @@ -91,7 +91,7 @@ class Reservation { .then(json => { runInAction(() => { if (json.errcode == 0) { - this.cityList = (json?.Result ?? []).map((data, index) => { + this.cityList = (json?.Result??[]).map((data, index) => { return { key: data.CII_SN, cityId: data.CII_SN, @@ -117,7 +117,7 @@ class Reservation { runInAction(() => { if (json.errcode == 0) { console.info(json.Result); - this.guideList = (json?.Result ?? []).map((data, index) => { + this.guideList = (json?.Result??[]).map((data, index) => { return { guideId: data.TGI_SN, guideName: data.TGI2_Name, diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx index 74d2e51..d93828f 100644 --- a/src/views/reservation/Detail.jsx +++ b/src/views/reservation/Detail.jsx @@ -57,9 +57,9 @@ function Detail() { 'https://view.officeapps.live.com/op/embed.aspx?wdPrint=1&wdHideGridlines=0&wdHideComments=1&wdEmbedCode=0&src='; // 测试文档:https://www.chinahighlights.com/public/reservationW220420009.doc const reservationUrl = - `https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=1`; + `https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=1&Test=1`; const nameCardUrl = - `https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=2`; + `https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=2&Test=1`; const reservationPreviewUrl = officeWebViewerUrl + encodeURIComponent(reservationUrl); const nameCardPreviewUrl = officeWebViewerUrl + encodeURIComponent(nameCardUrl); diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index 926568d..84fa80d 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -94,10 +94,6 @@ function Newest() { const [isModalOpen, setIsModalOpen] = useState(false); const [dataLoading, setDataLoading] = useState(false); const { notification } = App.useApp(); - - const arrivalDateFrom = arrivalDateRange.length == 0 ? null : arrivalDateRange[0]; - const arrivalDateThru = arrivalDateRange.length == 0 ? null : arrivalDateRange[1]; - const guideSelectOptions = guideList.map((data, index) => { return { value: data.guideId, @@ -202,9 +198,11 @@ function Newest() { allowClear={true} inputReadOnly={true} presets={DATE_PRESETS} - value={[arrivalDateFrom, arrivalDateThru]} + defaultValue={toJS(arrivalDateRange)} placeholder={['From', 'Thru']} - onChange={(dateRange) => { reservationStore.updatePropertyValue('arrivalDateRange', dateRange)}} + onChange={(dateRange) => { + reservationStore.updatePropertyValue('arrivalDateRange', dateRange == null ? [] : dateRange) + }} />