更新数据分页参数

release
Jimmy Liow 2 years ago
parent 718b656357
commit 4b66cc64c6

@ -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 = '';
}

@ -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() {
<Title level={5}>Itinerary Overview</Title>
<Table
bordered
loading={dataLoading}
pagination={false}
dataSource={toJS(itineraryList)} columns={itineraryListColumns}
/>
@ -92,12 +98,22 @@ function Detail() {
</Col>
</Row>
<Row>
<Col span={24}>
<TextArea rows={4} placeholder="如贵社对计划中的行程安排有任何建议请联系组团人本人。中华游欢迎大家对我们的工作提出合理化建议。" maxLength={6} />
<Col span={24}><Space direction="vertical" style={{ width: '100%' }}>
<Title level={5}>Confirmation</Title>
<TextArea rows={4}
autoSize={{
minRows: 2,
maxRows: 6,
}}
value="------变更内容 (2023-04-17):------
客人火车变更
4月27日 D2952(1249-1549)(一等)北站
4月30日 D1761(1646-2006)(一等)西站
======收到后请速确认并回执谢谢! 变更日期2023-04-16" maxLength={6} />
<Button type="primary" onClick={() => console.info('submit')}>Submit</Button>
</Space>
</Col>
</Row>
<Button type="primary" onClick={() => console.info('submit')}>Submit</Button>
</Space>
);
}

@ -1,5 +1,5 @@
import { NavLink } from "react-router-dom";
import { useEffect, useState } from 'react';
import { useState } from 'react';
import { observer } from "mobx-react";
import { toJS } from "mobx";
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio, Modal, App } from 'antd';
@ -77,7 +77,7 @@ function Newest() {
setIsModalOpen(false);
};
const onSearchClick = (current=1) => {
const onSearchClick = (current=1) => {
setDataLoading(true);
reservationStore.fetchReservationList(current, referenceNo, arrivalDateRange[0], arrivalDateRange[1])
.catch(ex => {

Loading…
Cancel
Save