|
|
|
|
@ -157,30 +157,10 @@ function Newest() {
|
|
|
|
|
// 默认重新搜索第一页,所有状态的计划
|
|
|
|
|
const searchReservation = (submitValues, current=1) => {
|
|
|
|
|
setDataLoading(true)
|
|
|
|
|
console.info('submitValues: ', submitValues)
|
|
|
|
|
|
|
|
|
|
const getSelectedAgencyId = () => {
|
|
|
|
|
|
|
|
|
|
if (isPermitted(PERM_AGENCY_ALL)) {
|
|
|
|
|
return isEmpty(submitValues.agency) ? travelAgencyId : parseInt(submitValues.agency, 10)
|
|
|
|
|
} else {
|
|
|
|
|
return travelAgencyId
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const selectedAgencyId = getSelectedAgencyId()
|
|
|
|
|
|
|
|
|
|
initAgencyGuideList(selectedAgencyId)
|
|
|
|
|
|
|
|
|
|
if (isEmpty(selectedAgencyId)) {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `Notification`,
|
|
|
|
|
description: 'Agency is required',
|
|
|
|
|
placement: 'top',
|
|
|
|
|
duration: 4,
|
|
|
|
|
});
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const formValues = {...submitValues, ...{ selectedAgencyId }};
|
|
|
|
|
fetchReservationList(formValues, current)
|
|
|
|
|
// const formValues = {...submitValues, ...{ selectedAgencyId }};
|
|
|
|
|
fetchReservationList(submitValues, current)
|
|
|
|
|
.catch(ex => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: `Notification`,
|
|
|
|
|
|