diff --git a/src/components/SearchForm.jsx b/src/components/SearchForm.jsx index b9dafc8..24ef907 100644 --- a/src/components/SearchForm.jsx +++ b/src/components/SearchForm.jsx @@ -21,7 +21,7 @@ const SearchForm = ({ initialValue, onSubmit, onReset, ...props }) => { fieldComProps: '', hides: [], shows: [], - ...props.defaultValue, + ...props.fieldsConfig, }; const { confirmText } = props; const readValues = { ...initialValue, ...formValues }; diff --git a/src/views/feedback/Index.jsx b/src/views/feedback/Index.jsx index 3e8a5f0..e788887 100644 --- a/src/views/feedback/Index.jsx +++ b/src/views/feedback/Index.jsx @@ -71,7 +71,7 @@ function Index() { initialValue={{ dates: [dayjs().subtract(2, 'M').startOf('M'), dayjs().endOf('M')], }} - defaultValue={{ + fieldsConfig={{ shows: ['referenceNo', 'dates'], fieldProps: { dates: { label: t('group:ArrivalDate') }, diff --git a/src/views/invoice/Index.jsx b/src/views/invoice/Index.jsx index a90b5d4..e77dd13 100644 --- a/src/views/invoice/Index.jsx +++ b/src/views/invoice/Index.jsx @@ -88,7 +88,7 @@ function Index() { initialValue={{ dates: [dayjs().subtract(2, 'M').startOf('M'), dayjs().endOf('M')], }} - defaultValue={{ + fieldsConfig={{ shows: ['referenceNo', 'invoiceStatus', 'dates'], fieldProps: { referenceNo: { col: 5}, diff --git a/src/views/invoice/Paid.jsx b/src/views/invoice/Paid.jsx index c036e3a..3b32fb6 100644 --- a/src/views/invoice/Paid.jsx +++ b/src/views/invoice/Paid.jsx @@ -76,7 +76,7 @@ function Paid() { initialValue={{ dates: [dayjs().subtract(2, 'M').startOf('M'), dayjs().endOf('M')], }} - defaultValue={{ + fieldsConfig={{ shows: ['referenceNo', 'dates'], fieldProps: { referenceNo: { col: 5 }, diff --git a/src/views/report/Index.jsx b/src/views/report/Index.jsx index a96a3c0..b369805 100644 --- a/src/views/report/Index.jsx +++ b/src/views/report/Index.jsx @@ -283,7 +283,7 @@ function Index() { initialValue={{ dates: [dayjs().startOf('year'), dayjs().endOf('year')], }} - defaultValue={{ + fieldsConfig={{ shows: ['dates'], fieldProps: { dates: { label: 'Select Date', col: 12 }, diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index 6857b17..4e3d7f3 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -106,7 +106,7 @@ function Newest() { const [dataLoading, setDataLoading] = useState(false) const [guideSelectOptions, setGuideSelectOptions] = useState([]) - const formValues = useFormStore((state) => state.formValues) + const formValuesToSub = useFormStore((state) => state.formValuesToSub) const [fetchAllGuideList, fetchReservationList, reservationList, reservationPage, cityList, selectReservation, getCityListByReservationId] = useReservationStore((state) => @@ -163,7 +163,7 @@ function Newest() { // 默认重新搜索第一页,所有状态的计划 const onSearchClick = (current=1, status=null) => { setDataLoading(true) - fetchReservationList(formValues, current) + fetchReservationList(formValuesToSub, current) .catch(ex => { notification.error({ message: `Notification`, @@ -216,7 +216,7 @@ function Newest() { // { // } // } - defaultValue={{ + fieldsConfig={{ shows: ['referenceNo', 'dates'], fieldProps: { dates: { label: t('group:ArrivalDate') }, @@ -224,7 +224,7 @@ function Newest() { }} onSubmit={(err, formVal, filedsVal) => { setDataLoading(true) - fetchReservationList(travelAgencyId, formVal) + fetchReservationList(formVal) .catch(ex => { notification.error({ message: 'Notification',