From e6832cfd7f1c448791b1bd01ad388b2ea2005677 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Mon, 28 Jul 2025 15:03:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=B0=E6=8E=A5=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=B9=B4=E4=BB=BD=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 3 +++ src/views/products/PickYear.jsx | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/views/products/PickYear.jsx diff --git a/src/main.jsx b/src/main.jsx index 7a3310c..51170af 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -45,6 +45,8 @@ import { isNotEmpty } from '@/utils/commons' import ProductsManage from '@/views/products/Manage'; import ProductsDetail from '@/views/products/Detail'; import ProductsAudit from '@/views/products/Audit'; +import PickYear from './views/products/PickYear' + import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA,PERM_TRAIN_TICKET, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT, PERM_PRODUCTS_OFFER_PUT } from '@/config' import './i18n' @@ -94,6 +96,7 @@ const initRouter = async () => { { path: "products/:travel_agency_id/:use_year/:audit_state/edit",element:}, { path: "products/audit",element:}, { path: "products/edit",element:}, + { path: "products/pick-year",element: }, // ] }, diff --git a/src/views/products/PickYear.jsx b/src/views/products/PickYear.jsx new file mode 100644 index 0000000..6329175 --- /dev/null +++ b/src/views/products/PickYear.jsx @@ -0,0 +1,40 @@ +import { useNavigate } from "react-router-dom"; +import { Row, DatePicker, Flex, Col, Typography } from "antd"; +import dayjs from "dayjs"; +import { usingStorage } from "@/hooks/usingStorage"; + +function PickYear() { + const navigate = useNavigate(); + const { travelAgencyId } = usingStorage(); + + return ( + <> + + + + + 请选择采购年份 + + { + const useYear = date.year(); + navigate(`/products/${travelAgencyId}/${useYear}/all/edit`); + }} + /> + + + + + ); +} +export default PickYear;