团计划默认搜索为确认状态

release
Jimmy Liow 2 years ago
parent bc63e50747
commit 347719f77d

@ -11,6 +11,7 @@ class Auth {
makeAutoObservable(this, { rootStore: false });
this.root = root;
this.login.token = root.getSession(KEY_LOGIN_TOKEN);
console.info('Auth()');
}
valdateUserPassword(usr, pwd) {

@ -10,7 +10,7 @@ class Reservation {
this.root = root;
}
fetchReservationList(current) {
fetchReservationList(current, status=null) {
const fromDate = this.arrivalDateRange.length == 0 ? null : this.arrivalDateRange[0].format('YYYY-MM-DD');
const thruDate = this.arrivalDateRange.length == 0 ? null : this.arrivalDateRange[1].format('YYYY-MM-DD');
this.reservationPage.current = current;
@ -21,6 +21,7 @@ class Reservation {
.append('GroupNo', this.referenceNo)
.append('DateStart', fromDate)
.append('DateEnd', thruDate)
.append('NotConfirm', status)
.append('TotalNum', totalNum)
.append('PageSize', this.reservationPage.size)
.append('PageIndex', this.reservationPage.current)

@ -102,8 +102,9 @@ function Newest() {
});
useEffect (() => {
if (location.search !== '?back') {
onSearchClick();
if (location.search !== '?back') {
//
onSearchClick(1, 1);
}
return () => {
console.info('unmount...');
@ -140,9 +141,10 @@ function Newest() {
setDataLoading(false);
};
const onSearchClick = (current=1) => {
//
const onSearchClick = (current=1, status=null) => {
setDataLoading(true);
reservationStore.fetchReservationList(current)
reservationStore.fetchReservationList(current, status)
.catch(ex => {
notification.error({
message: `Notification`,

Loading…
Cancel
Save