From b568379f413bf6fdb7adb6303c0adbf282062ca4 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 4 Jun 2024 15:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BD=AC=E6=8D=A2=E6=A0=BC=E5=BC=8F:=20YYYY-?= =?UTF-8?q?MM-DD=2023:59?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchForm.jsx | 4 +++- src/config.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) 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;