diff --git a/src/pages/Order/List/index.tsx b/src/pages/Order/List/index.tsx
index a0b0818..2e60da5 100644
--- a/src/pages/Order/List/index.tsx
+++ b/src/pages/Order/List/index.tsx
@@ -288,7 +288,6 @@ const ListPage: React.FC = () => {
{
title: 'IP',
dataIndex: 'customer_ip_address',
- hideInSearch: true,
},
{
title: '设备',
@@ -504,31 +503,24 @@ const ListPage: React.FC = () => {
}}
tableRef={actionRef}
/>,
- // ,
{
console.log(selectedRowKeys);
try {
- const res = await request('/order/order/export', {
- method: 'GET',
- params: {
+ const res = await request('/order/export', {
+ method: 'POST',
+ data: {
ids: selectedRowKeys,
}
});
- if (res?.success && res?.data?.csv) {
- const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
+ if (res?.success && res.data) {
+ const blob = new Blob([res.data], { type: 'text/csv;charset=utf-8;' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
- a.download = 'customers.csv';
+ a.download = 'orders.csv';
a.click();
URL.revokeObjectURL(url);
} else {
diff --git a/src/servers/api/order.ts b/src/servers/api/order.ts
index 22dfe95..ffab60f 100644
--- a/src/servers/api/order.ts
+++ b/src/servers/api/order.ts
@@ -59,6 +59,21 @@ export async function ordercontrollerCreatenote(
});
}
+/** 此处后端没有提供注释 POST /order/export */
+export async function ordercontrollerExportorder(
+ body: Record,
+ options?: { [key: string]: any },
+) {
+ return request('/order/export', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'text/plain',
+ },
+ data: body,
+ ...(options || {}),
+ });
+}
+
/** 此处后端没有提供注释 POST /order/getOrderByNumber */
export async function ordercontrollerGetorderbynumber(
body: string,
@@ -251,11 +266,14 @@ export async function ordercontrollerSyncorderbyid(
options?: { [key: string]: any },
) {
const { orderId: param0, siteId: param1, ...queryParams } = params;
- return request(`/order/syncOrder/${param1}/order/${param0}`, {
- method: 'POST',
- params: { ...queryParams },
- ...(options || {}),
- });
+ return request(
+ `/order/syncOrder/${param1}/order/${param0}`,
+ {
+ method: 'POST',
+ params: { ...queryParams },
+ ...(options || {}),
+ },
+ );
}
/** 此处后端没有提供注释 POST /order/updateOrderItems/${param0} */
diff --git a/src/servers/api/typings.d.ts b/src/servers/api/typings.d.ts
index 591abad..fa7b3b7 100644
--- a/src/servers/api/typings.d.ts
+++ b/src/servers/api/typings.d.ts
@@ -456,6 +456,10 @@ declare namespace API {
shipping_provider?: string;
/** 发货方式 */
shipping_method?: string;
+ /** 状态 */
+ status?: string;
+ /** 创建时间 */
+ date_created?: string;
/** 发货商品项 */
items?: FulfillmentItemDTO[];
};
@@ -2406,6 +2410,8 @@ declare namespace API {
params?: UnifiedSearchParamsDTO;
};
+ type SyncOperationResult = {};
+
type SyncOperationResultDTO = {
/** 总处理数量 */
total?: number;
@@ -2641,6 +2647,8 @@ declare namespace API {
number?: string;
/** 订单状态 */
status?: string;
+ /** 财务状态 */
+ financial_status?: string;
/** 货币 */
currency?: string;
/** 货币符号 */
@@ -2683,8 +2691,6 @@ declare namespace API {
fee_lines?: UnifiedFeeLineDTO[];
/** 优惠券项 */
coupon_lines?: UnifiedCouponLineDTO[];
- /** 物流追踪信息 */
- tracking?: UnifiedOrderTrackingDTO[];
/** 支付时间 */
date_paid?: string;
/** 客户IP地址 */
@@ -2695,6 +2701,10 @@ declare namespace API {
device_type?: string;
/** 来源类型 */
source_type?: string;
+ /** 订单状态 */
+ fulfillment_status?: number;
+ /** 物流信息 */
+ fulfillments?: FulfillmentDTO[];
};
type UnifiedOrderLineItemDTO = {
@@ -2739,14 +2749,16 @@ declare namespace API {
type UnifiedOrderTrackingDTO = {
/** 订单ID */
order_id?: string;
- /** 快递公司 */
- tracking_provider?: string;
- /** 运单跟踪号 */
+ /** 物流单号 */
tracking_number?: string;
- /** 发货日期 */
- date_shipped?: string;
- /** 发货状态 */
- status_shipped?: string;
+ /** 物流公司 */
+ shipping_provider?: string;
+ /** 发货方式 */
+ shipping_method?: string;
+ /** 状态 */
+ status?: string;
+ /** 创建时间 */
+ date_created?: string;
};
type UnifiedPaginationDTO = {