style(订单详情): 统一中文标点符号为英文格式并清理合并冲突标记
This commit is contained in:
parent
9335ce205d
commit
9814eca928
|
|
@ -13,15 +13,7 @@ import {
|
||||||
import { ActionType, ProDescriptions } from '@ant-design/pro-components';
|
import { ActionType, ProDescriptions } from '@ant-design/pro-components';
|
||||||
import { CopyOutlined, DeleteFilled } from '@ant-design/icons';
|
import { CopyOutlined, DeleteFilled } from '@ant-design/icons';
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// 服务器 API 引用(保持与原 index.tsx 一致)
|
// 服务器 API 引用(保持与原 index.tsx 一致)
|
||||||
=======
|
|
||||||
// 服务器 API 引用(保持与原 index.tsx 一致)
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
// 服务器 API 引用(保持与原 index.tsx 一致)
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
import {
|
import {
|
||||||
ordercontrollerChangestatus,
|
ordercontrollerChangestatus,
|
||||||
ordercontrollerGetorderdetail,
|
ordercontrollerGetorderdetail,
|
||||||
|
|
@ -35,46 +27,21 @@ import { formatShipmentState, formatSource } from '@/utils/format';
|
||||||
import RelatedOrders from './RelatedOrders';
|
import RelatedOrders from './RelatedOrders';
|
||||||
import { ORDER_STATUS_ENUM } from '@/constants';
|
import { ORDER_STATUS_ENUM } from '@/constants';
|
||||||
|
|
||||||
<<<<<<< HEAD
|
// 为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状
|
||||||
<<<<<<< HEAD
|
|
||||||
// 中文注释:为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状
|
|
||||||
=======
|
|
||||||
// 中文注释:为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
// 中文注释:为保持原文件结构简单,此处从 index.tsx 引入的子组件仍由原文件导出或保持原状
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
// 若后续需要彻底解耦,可将 OrderNote / Shipping / SalesChange 也独立到文件
|
// 若后续需要彻底解耦,可将 OrderNote / Shipping / SalesChange 也独立到文件
|
||||||
// 当前按你的要求仅抽离详情 Drawer
|
// 当前按你的要求仅抽离详情 Drawer
|
||||||
|
|
||||||
type OrderRecord = API.Order;
|
type OrderRecord = API.Order;
|
||||||
|
|
||||||
interface OrderDetailDrawerProps {
|
interface OrderDetailDrawerProps {
|
||||||
<<<<<<< HEAD
|
tableRef: React.MutableRefObject<ActionType | undefined>; // 列表刷新引用
|
||||||
<<<<<<< HEAD
|
orderId: number; // 订单主键 ID
|
||||||
=======
|
record: OrderRecord; // 订单行记录
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
open: boolean; // 是否打开抽屉
|
||||||
tableRef: React.MutableRefObject<ActionType | undefined>; // 中文注释:列表刷新引用
|
onClose: () => void; // 关闭抽屉回调
|
||||||
orderId: number; // 中文注释:订单主键 ID
|
setActiveLine: (id: number) => void; // 高亮当前行
|
||||||
record: OrderRecord; // 中文注释:订单行记录
|
OrderNoteComponent: React.ComponentType<any>; // 备注组件(从外部注入)
|
||||||
open: boolean; // 中文注释:是否打开抽屉
|
SalesChangeComponent: React.ComponentType<any>; // 换货组件(从外部注入)
|
||||||
onClose: () => void; // 中文注释:关闭抽屉回调
|
|
||||||
setActiveLine: (id: number) => void; // 中文注释:高亮当前行
|
|
||||||
OrderNoteComponent: React.ComponentType<any>; // 中文注释:备注组件(从外部注入)
|
|
||||||
SalesChangeComponent: React.ComponentType<any>; // 中文注释:换货组件(从外部注入)
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
tableRef: React.MutableRefObject<ActionType | undefined>; // 中文注释:列表刷新引用
|
|
||||||
orderId: number; // 中文注释:订单主键 ID
|
|
||||||
record: OrderRecord; // 中文注释:订单行记录
|
|
||||||
open: boolean; // 中文注释:是否打开抽屉
|
|
||||||
onClose: () => void; // 中文注释:关闭抽屉回调
|
|
||||||
setActiveLine: (id: number) => void; // 中文注释:高亮当前行
|
|
||||||
OrderNoteComponent: React.ComponentType<any>; // 中文注释:备注组件(从外部注入)
|
|
||||||
SalesChangeComponent: React.ComponentType<any>; // 中文注释:换货组件(从外部注入)
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
|
|
@ -90,15 +57,7 @@ const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
const { message } = App.useApp();
|
const { message } = App.useApp();
|
||||||
const ref = useRef<ActionType>();
|
const ref = useRef<ActionType>();
|
||||||
|
|
||||||
<<<<<<< HEAD
|
// 加载详情数据(与 index.tsx 中完全保持一致)
|
||||||
<<<<<<< HEAD
|
|
||||||
// 中文注释:加载详情数据(与 index.tsx 中完全保持一致)
|
|
||||||
=======
|
|
||||||
// 中文注释:加载详情数据(与 index.tsx 中完全保持一致)
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
// 中文注释:加载详情数据(与 index.tsx 中完全保持一致)
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
const initRequest = async () => {
|
const initRequest = async () => {
|
||||||
const { data, success }: API.OrderDetailRes = await ordercontrollerGetorderdetail({ orderId });
|
const { data, success }: API.OrderDetailRes = await ordercontrollerGetorderdetail({ orderId });
|
||||||
if (!success || !data) return { data: {} } as any;
|
if (!success || !data) return { data: {} } as any;
|
||||||
|
|
@ -125,15 +84,7 @@ const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
size="large"
|
size="large"
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
footer={[
|
footer={[
|
||||||
<<<<<<< HEAD
|
// 备注组件(外部传入以避免循环依赖)
|
||||||
<<<<<<< HEAD
|
|
||||||
// 中文注释:备注组件(外部传入以避免循环依赖)
|
|
||||||
=======
|
|
||||||
// 中文注释:备注组件(外部传入以避免循环依赖)
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
// 中文注释:备注组件(外部传入以避免循环依赖)
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
<OrderNoteComponent key="order-note" id={orderId} descRef={ref} />,
|
<OrderNoteComponent key="order-note" id={orderId} descRef={ref} />,
|
||||||
...(['after_sale_pending', 'pending_reshipment'].includes(
|
...(['after_sale_pending', 'pending_reshipment'].includes(
|
||||||
record.orderStatus,
|
record.orderStatus,
|
||||||
|
|
@ -290,10 +241,6 @@ const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
<ProDescriptions.Item label="客户备注" dataIndex="customer_note" span={3} />
|
<ProDescriptions.Item label="客户备注" dataIndex="customer_note" span={3} />
|
||||||
<ProDescriptions.Item label="发货信息" span={3} render={(_, r: any) => (
|
<ProDescriptions.Item label="发货信息" span={3} render={(_, r: any) => (
|
||||||
<div>
|
<div>
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
<div>company:<span>{r?.shipping?.company || r?.billing?.company || '-'}</span></div>
|
<div>company:<span>{r?.shipping?.company || r?.billing?.company || '-'}</span></div>
|
||||||
<div>first_name:<span>{r?.shipping?.first_name || r?.billing?.first_name || '-'}</span></div>
|
<div>first_name:<span>{r?.shipping?.first_name || r?.billing?.first_name || '-'}</span></div>
|
||||||
<div>last_name:<span>{r?.shipping?.last_name || r?.billing?.last_name || '-'}</span></div>
|
<div>last_name:<span>{r?.shipping?.last_name || r?.billing?.last_name || '-'}</span></div>
|
||||||
|
|
@ -303,34 +250,12 @@ const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
<div>postcode:<span>{r?.shipping?.postcode || r?.billing?.postcode || '-'}</span></div>
|
<div>postcode:<span>{r?.shipping?.postcode || r?.billing?.postcode || '-'}</span></div>
|
||||||
<div>phone:<span>{r?.shipping?.phone || r?.billing?.phone || '-'}</span></div>
|
<div>phone:<span>{r?.shipping?.phone || r?.billing?.phone || '-'}</span></div>
|
||||||
<div>address_1:<span>{r?.shipping?.address_1 || r?.billing?.address_1 || '-'}</span></div>
|
<div>address_1:<span>{r?.shipping?.address_1 || r?.billing?.address_1 || '-'}</span></div>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
<div>company:<span>{r?.shipping?.company || r?.billing?.company || '-'}</span></div>
|
|
||||||
<div>first_name:<span>{r?.shipping?.first_name || r?.billing?.first_name || '-'}</span></div>
|
|
||||||
<div>last_name:<span>{r?.shipping?.last_name || r?.billing?.last_name || '-'}</span></div>
|
|
||||||
<div>country:<span>{r?.shipping?.country || r?.billing?.country || '-'}</span></div>
|
|
||||||
<div>state:<span>{r?.shipping?.state || r?.billing?.state || '-'}</span></div>
|
|
||||||
<div>city:<span>{r?.shipping?.city || r?.billing?.city || '-'}</span></div>
|
|
||||||
<div>postcode:<span>{r?.shipping?.postcode || r?.billing?.postcode || '-'}</span></div>
|
|
||||||
<div>phone:<span>{r?.shipping?.phone || r?.billing?.phone || '-'}</span></div>
|
|
||||||
<div>address_1:<span>{r?.shipping?.address_1 || r?.billing?.address_1 || '-'}</span></div>
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
</div>
|
</div>
|
||||||
)} />
|
)} />
|
||||||
<ProDescriptions.Item label="原始订单" span={3} render={(_, r: any) => (
|
<ProDescriptions.Item label="原始订单" span={3} render={(_, r: any) => (
|
||||||
<ul>
|
<ul>
|
||||||
{(r?.items || []).map((item: any) => (
|
{(r?.items || []).map((item: any) => (
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<li key={item.id}>{item.name}:{item.quantity}</li>
|
<li key={item.id}>{item.name}:{item.quantity}</li>
|
||||||
=======
|
|
||||||
<li key={item.id}>{item.name}:{item.quantity}</li>
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
<li key={item.id}>{item.name}:{item.quantity}</li>
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
)} />
|
)} />
|
||||||
|
|
@ -340,15 +265,7 @@ const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
<ProDescriptions.Item label="订单内容" span={3} render={(_, r: any) => (
|
<ProDescriptions.Item label="订单内容" span={3} render={(_, r: any) => (
|
||||||
<ul>
|
<ul>
|
||||||
{(r?.sales || []).map((item: any) => (
|
{(r?.sales || []).map((item: any) => (
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<li key={item.id}>{item.name}:{item.quantity}</li>
|
<li key={item.id}>{item.name}:{item.quantity}</li>
|
||||||
=======
|
|
||||||
<li key={item.id}>{item.name}:{item.quantity}</li>
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
<li key={item.id}>{item.name}:{item.quantity}</li>
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
)} />
|
)} />
|
||||||
|
|
@ -393,15 +310,7 @@ const OrderDetailDrawer: React.FC<OrderDetailDrawerProps> = ({
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
] : [] }
|
] : [] }
|
||||||
>
|
>
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<div>订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}</div>
|
<div>订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}</div>
|
||||||
=======
|
|
||||||
<div>订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}</div>
|
|
||||||
>>>>>>> d98e843 (refactor(订单): 重构订单详情抽屉组件并移动相关文件)
|
|
||||||
=======
|
|
||||||
<div>订单号: {Array.isArray(v?.orderIds) ? v.orderIds.join(',') : '-'}</div>
|
|
||||||
>>>>>>> 3ac2724 (style: 统一中文标点符号为英文格式)
|
|
||||||
{Array.isArray(v?.items) && v.items.map((item: any) => (
|
{Array.isArray(v?.items) && v.items.map((item: any) => (
|
||||||
<div key={item.id}>{item.name}: {item.quantity}</div>
|
<div key={item.id}>{item.name}: {item.quantity}</div>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue