From 9814eca928ea59755e3f165cfd370d5731d187b6 Mon Sep 17 00:00:00 2001 From: tikkhun Date: Tue, 25 Nov 2025 10:58:55 +0800 Subject: [PATCH] =?UTF-8?q?style(=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85):=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=AD=E6=96=87=E6=A0=87=E7=82=B9=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E4=B8=BA=E8=8B=B1=E6=96=87=E6=A0=BC=E5=BC=8F=E5=B9=B6?= =?UTF-8?q?=E6=B8=85=E7=90=86=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81=E6=A0=87?= =?UTF-8?q?=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Subscription/Orders/OrderDetailDrawer.tsx | 113 ++---------------- 1 file changed, 11 insertions(+), 102 deletions(-) diff --git a/src/pages/Subscription/Orders/OrderDetailDrawer.tsx b/src/pages/Subscription/Orders/OrderDetailDrawer.tsx index 344f5ab..eabbbb3 100644 --- a/src/pages/Subscription/Orders/OrderDetailDrawer.tsx +++ b/src/pages/Subscription/Orders/OrderDetailDrawer.tsx @@ -13,15 +13,7 @@ import { import { ActionType, ProDescriptions } from '@ant-design/pro-components'; import { CopyOutlined, DeleteFilled } from '@ant-design/icons'; -<<<<<<< HEAD -<<<<<<< HEAD // 服务器 API 引用(保持与原 index.tsx 一致) -======= -// 服务器 API 引用(保持与原 index.tsx 一致) ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= -// 服务器 API 引用(保持与原 index.tsx 一致) ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) import { ordercontrollerChangestatus, ordercontrollerGetorderdetail, @@ -35,46 +27,21 @@ import { formatShipmentState, formatSource } from '@/utils/format'; import RelatedOrders from './RelatedOrders'; import { ORDER_STATUS_ENUM } from '@/constants'; -<<<<<<< HEAD -<<<<<<< HEAD -// 中文注释:为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状 -======= -// 中文注释:为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状 ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= -// 中文注释:为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状 ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) +// 为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状 // 若后续需要彻底解耦,可将 OrderNote / Shipping / SalesChange 也独立到文件 // 当前按你的要求仅抽离详情 Drawer type OrderRecord = API.Order; interface OrderDetailDrawerProps { -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) - tableRef: React.MutableRefObject; // 中文注释:列表刷新引用 - orderId: number; // 中文注释:订单主键 ID - record: OrderRecord; // 中文注释:订单行记录 - open: boolean; // 中文注释:是否打开抽屉 - onClose: () => void; // 中文注释:关闭抽屉回调 - setActiveLine: (id: number) => void; // 中文注释:高亮当前行 - OrderNoteComponent: React.ComponentType; // 中文注释:备注组件(从外部注入) - SalesChangeComponent: React.ComponentType; // 中文注释:换货组件(从外部注入) -<<<<<<< HEAD -======= - tableRef: React.MutableRefObject; // 中文注释:列表刷新引用 - orderId: number; // 中文注释:订单主键 ID - record: OrderRecord; // 中文注释:订单行记录 - open: boolean; // 中文注释:是否打开抽屉 - onClose: () => void; // 中文注释:关闭抽屉回调 - setActiveLine: (id: number) => void; // 中文注释:高亮当前行 - OrderNoteComponent: React.ComponentType; // 中文注释:备注组件(从外部注入) - SalesChangeComponent: React.ComponentType; // 中文注释:换货组件(从外部注入) ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) + tableRef: React.MutableRefObject; // 列表刷新引用 + orderId: number; // 订单主键 ID + record: OrderRecord; // 订单行记录 + open: boolean; // 是否打开抽屉 + onClose: () => void; // 关闭抽屉回调 + setActiveLine: (id: number) => void; // 高亮当前行 + OrderNoteComponent: React.ComponentType; // 备注组件(从外部注入) + SalesChangeComponent: React.ComponentType; // 换货组件(从外部注入) } const OrderDetailDrawer: React.FC = ({ @@ -90,15 +57,7 @@ const OrderDetailDrawer: React.FC = ({ const { message } = App.useApp(); const ref = useRef(); -<<<<<<< HEAD -<<<<<<< HEAD - // 中文注释:加载详情数据(与 index.tsx 中完全保持一致) -======= - // 中文注释:加载详情数据(与 index.tsx 中完全保持一致) ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= - // 中文注释:加载详情数据(与 index.tsx 中完全保持一致) ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) + // 加载详情数据(与 index.tsx 中完全保持一致) const initRequest = async () => { const { data, success }: API.OrderDetailRes = await ordercontrollerGetorderdetail({ orderId }); if (!success || !data) return { data: {} } as any; @@ -125,15 +84,7 @@ const OrderDetailDrawer: React.FC = ({ size="large" onClose={onClose} footer={[ -<<<<<<< HEAD -<<<<<<< HEAD - // 中文注释:备注组件(外部传入以避免循环依赖) -======= - // 中文注释:备注组件(外部传入以避免循环依赖) ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= - // 中文注释:备注组件(外部传入以避免循环依赖) ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) + // 备注组件(外部传入以避免循环依赖) , ...(['after_sale_pending', 'pending_reshipment'].includes( record.orderStatus, @@ -290,10 +241,6 @@ const OrderDetailDrawer: React.FC = ({ (
-<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
company:{r?.shipping?.company || r?.billing?.company || '-'}
first_name:{r?.shipping?.first_name || r?.billing?.first_name || '-'}
last_name:{r?.shipping?.last_name || r?.billing?.last_name || '-'}
@@ -303,34 +250,12 @@ const OrderDetailDrawer: React.FC = ({
postcode:{r?.shipping?.postcode || r?.billing?.postcode || '-'}
phone:{r?.shipping?.phone || r?.billing?.phone || '-'}
address_1:{r?.shipping?.address_1 || r?.billing?.address_1 || '-'}
-<<<<<<< HEAD -======= -
company:{r?.shipping?.company || r?.billing?.company || '-'}
-
first_name:{r?.shipping?.first_name || r?.billing?.first_name || '-'}
-
last_name:{r?.shipping?.last_name || r?.billing?.last_name || '-'}
-
country:{r?.shipping?.country || r?.billing?.country || '-'}
-
state:{r?.shipping?.state || r?.billing?.state || '-'}
-
city:{r?.shipping?.city || r?.billing?.city || '-'}
-
postcode:{r?.shipping?.postcode || r?.billing?.postcode || '-'}
-
phone:{r?.shipping?.phone || r?.billing?.phone || '-'}
-
address_1:{r?.shipping?.address_1 || r?.billing?.address_1 || '-'}
->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
)} /> (
    {(r?.items || []).map((item: any) => ( -<<<<<<< HEAD -<<<<<<< HEAD
  • {item.name}:{item.quantity}
  • -======= -
  • {item.name}:{item.quantity}
  • ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= -
  • {item.name}:{item.quantity}
  • ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) ))}
)} /> @@ -340,15 +265,7 @@ const OrderDetailDrawer: React.FC = ({ (
    {(r?.sales || []).map((item: any) => ( -<<<<<<< HEAD -<<<<<<< HEAD
  • {item.name}:{item.quantity}
  • -======= -
  • {item.name}:{item.quantity}
  • ->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= -
  • {item.name}:{item.quantity}
  • ->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) ))}
)} /> @@ -393,15 +310,7 @@ const OrderDetailDrawer: React.FC = ({ ] : [] } > -<<<<<<< HEAD -<<<<<<< HEAD
订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}
-======= -
订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}
->>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件) -======= -
订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}
->>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式) {Array.isArray(v?.items) && v.items.map((item: any) => (
{item.name}: {item.quantity}
))}