From d78b5870359737e7c80390f8da337305225aff3a Mon Sep 17 00:00:00 2001 From: tikkhun Date: Tue, 20 Jan 2026 17:20:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=B9=B6=E7=A7=BB=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84BrandSpace=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit style: 统一字符串引号和代码缩进格式 fix: 修复订单同步日期范围参数格式 feat: 添加产品分组列表API接口 --- src/components/SyncForm.tsx | 46 +- src/pages/Order/List/index.tsx | 25 +- src/pages/Product/BrandSpace/index.tsx | 486 --------------------- src/pages/Product/CsvTool/index.tsx | 24 +- src/pages/Product/List/index.tsx | 5 +- src/pages/Site/List/index.tsx | 8 +- src/pages/Site/Shop/EditSiteForm.tsx | 1 - src/pages/Statistics/Order/index.tsx | 43 +- src/pages/Statistics/OrderSource/index.tsx | 18 +- src/servers/api/product.ts | 15 + src/servers/api/typings.d.ts | 53 +++ 11 files changed, 157 insertions(+), 567 deletions(-) delete mode 100644 src/pages/Product/BrandSpace/index.tsx diff --git a/src/components/SyncForm.tsx b/src/components/SyncForm.tsx index 334e90e..9d5d260 100644 --- a/src/components/SyncForm.tsx +++ b/src/components/SyncForm.tsx @@ -4,8 +4,8 @@ import { ActionType, DrawerForm, ProForm, - ProFormSelect, ProFormDateRangePicker, + ProFormSelect, } from '@ant-design/pro-components'; import { Button } from 'antd'; import dayjs from 'dayjs'; @@ -24,7 +24,12 @@ interface SyncFormProps { * @param {SyncFormProps} props 组件属性 * @returns {React.ReactElement} 抽屉表单 */ -const SyncForm: React.FC = ({ tableRef, onFinish, siteId, dateRange }) => { +const SyncForm: React.FC = ({ + tableRef, + onFinish, + siteId, + dateRange, +}) => { // 使用 antd 的 App 组件提供的 message API const [loading, setLoading] = React.useState(false); @@ -52,11 +57,10 @@ const SyncForm: React.FC = ({ tableRef, onFinish, siteId, dateRan // 返回一个抽屉表单 return ( - initialValues={{ - dateRange: [dayjs().subtract(1, 'week'), dayjs()], - }} - - title="同步订单" + initialValues={{ + dateRange: [dayjs().subtract(1, 'week'), dayjs()], + }} + title="同步订单" // 表单的触发器,一个带图标的按钮 trigger={