From 763c0baa7352f8a0dc1895f7ad1407a358838f42 Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Sat, 6 May 2023 15:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E9=85=8D=E5=AF=BC?= =?UTF-8?q?=E6=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Reservation.js | 19 +++++++++++++++++++ src/views/reservation/Newest.jsx | 8 ++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index 77ef760..3edbe85 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -99,6 +99,8 @@ class Reservation { cityName: data.CityName, tourGuideId: data.TGI_SN, tourGuide: data.GuideName, + reservationId: reservationId, + travelAgencyId: this.root.authStore.login.travelAgencyId, } }); } else { @@ -108,6 +110,22 @@ class Reservation { }); } + setupCityGuide() { + let formData = new FormData(); + formData.append('GRI_SN', 1); + formData.append('VEI_SN', 1); + formData.append('TGI_SN', 1); + formData.append('CII_SN', 1); + formData.append('GetDate', '2023-06-01'); + formData.append('LMI_SN', 1); + const postUrl = HT_HOST + '/service-cusservice/PTAddGuide'; + + return req.postForm(postUrl, formData) + .then(json => { + console.info(json); + }); + } + fetchGuideList() { const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/PTGetGuideList') .append('VEI_SN', 628)//this.root.authStore.login.travelAgencyId) @@ -119,6 +137,7 @@ class Reservation { if (json.errcode == 0) { this.guideList = json.Result.map((data, index) => { return { + guideId: data.TGI_SN, guideName: data.TGI2_Name, mobileNo: data.TGI_Mobile } diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index ebbf36e..ae9a073 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -68,10 +68,14 @@ function Newest() { width: 280, }} bordered={false} + allowClear placeholder="Select a guide" optionFilterProp="children" onChange={(value) => { - console.log(`selected ${value}`); + console.log(`selected:`); + console.log(value); + console.log(`city:`); + console.log(city); }} onSearch={(value) => { console.log('search:', value); @@ -93,7 +97,7 @@ function Newest() { const guideSelectOptions = guideList.map((data, index) => { return { - value: data.guideName, + value: data.guideId, label: data.guideName } });