diff --git a/src/components/SearchForm.jsx b/src/components/SearchForm.jsx index d4b5e05..a539f72 100644 --- a/src/components/SearchForm.jsx +++ b/src/components/SearchForm.jsx @@ -1,7 +1,7 @@ import { createContext, useContext, useEffect, useState } from 'react'; import { Form, Input, Row, Col, Select, DatePicker, Space, Button } from 'antd'; import { objectMapper, at, isEmpty } from '@/utils/commons'; -import { DATE_FORMAT } from '@/config'; +import { DATE_FORMAT, SMALL_DATETIME_FORMAT } from '@/config'; import useFormStore from '@/stores/Form'; import usePresets from '@/hooks/usePresets'; import { useTranslation } from 'react-i18next'; @@ -31,6 +31,8 @@ const SearchForm = ({ initialValue, onSubmit, onReset, ...props }) => { 'dates': [ { key: 'startdate', transform: (arrVal) => (arrVal ? arrVal[0].format(DATE_FORMAT) : '') }, { key: 'enddate', transform: (arrVal) => (arrVal ? arrVal[1].format(DATE_FORMAT) : '') }, + { key: 'starttime', transform: (arrVal) => (arrVal ? arrVal[0].format(DATE_FORMAT) : '') }, + { key: 'endtime', transform: (arrVal) => (arrVal ? arrVal[1].format(SMALL_DATETIME_FORMAT) : '') }, ], 'invoiceStatus': { key: 'invoiceStatus', transform: (value) => value?.value || value?.key || '', default: '' }, }; diff --git a/src/config.js b/src/config.js index 8f45d94..58e13a2 100644 --- a/src/config.js +++ b/src/config.js @@ -5,6 +5,7 @@ export const PROJECT_NAME = "GHHub"; export const HT_HOST = import.meta.env.PROD ? "https://p9axztuwd7x8a7.mycht.cn" :"http://202.103.68.144:890"; //"http://202.103.68.231:889"; export const DATE_FORMAT = "YYYY-MM-DD"; export const DATE_FORMAT_MONTH = "YYYY-MM"; +export const SMALL_DATETIME_FORMAT = "YYYY-MM-DD 23:59"; const __BUILD_VERSION__ = `__BUILD_VERSION__`.replace(/"/g, '') export const BUILD_VERSION = import.meta.env.PROD ? __BUILD_VERSION__ : import.meta.env.MODE;