From af1cebe29de44ed5cc67c6ff9acaff5e550f5feb Mon Sep 17 00:00:00 2001 From: zhuotianyuan Date: Tue, 13 Jan 2026 19:26:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=AE=A2=E5=8D=95=E5=90=8C=E6=AD=A5):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A2=E5=8D=95=E5=90=8C=E6=AD=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B9=B6=E6=B7=BB=E5=8A=A0=E6=97=A5=E6=9C=9F=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复订单同步接口调用参数错误 在同步表单中添加日期范围选择器 调整订单来源统计接口名称拼写错误 --- src/components/SyncForm.tsx | 28 ++++++++++++++++++++-- src/pages/Order/List/index.tsx | 23 +++++++++--------- src/pages/Statistics/OrderSource/index.tsx | 4 ++-- 3 files changed, 40 insertions(+), 15 deletions(-) diff --git a/src/components/SyncForm.tsx b/src/components/SyncForm.tsx index dadb23a..334e90e 100644 --- a/src/components/SyncForm.tsx +++ b/src/components/SyncForm.tsx @@ -5,8 +5,10 @@ import { DrawerForm, ProForm, ProFormSelect, + ProFormDateRangePicker, } from '@ant-design/pro-components'; import { Button } from 'antd'; +import dayjs from 'dayjs'; import React from 'react'; // 定义SyncForm组件的props类型 @@ -14,6 +16,7 @@ interface SyncFormProps { tableRef: React.MutableRefObject; onFinish: (values: any) => Promise; siteId?: string; + dateRange?: [dayjs.Dayjs, dayjs.Dayjs]; } /** @@ -21,7 +24,7 @@ interface SyncFormProps { * @param {SyncFormProps} props 组件属性 * @returns {React.ReactElement} 抽屉表单 */ -const SyncForm: React.FC = ({ tableRef, onFinish, siteId }) => { +const SyncForm: React.FC = ({ tableRef, onFinish, siteId, dateRange }) => { // 使用 antd 的 App 组件提供的 message API const [loading, setLoading] = React.useState(false); @@ -49,7 +52,11 @@ const SyncForm: React.FC = ({ tableRef, onFinish, siteId }) => { // 返回一个抽屉表单 return ( - title="同步订单" + initialValues={{ + dateRange: [dayjs().subtract(1, 'week'), dayjs()], + }} + + title="同步订单" // 表单的触发器,一个带图标的按钮 trigger={