Compare commits
No commits in common. "bb907fa47ca4b3850cddc9ba1e0255e896a4ea2f" and "e498793678ba712a3b158324ccc2189232c6a5f7" have entirely different histories.
bb907fa47c
...
e498793678
|
|
@ -267,17 +267,17 @@ const ListPage: React.FC = () => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '物流',
|
title: '物流',
|
||||||
dataIndex: 'fulfillments',
|
dataIndex: 'shipmentList',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{(record as any)?.fulfillments?.map((item: any) => {
|
{(record as any)?.shipmentList?.map((item: any) => {
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
return (
|
return (
|
||||||
<div style={{ display:"flex", alignItems:"center" }}>
|
<div>
|
||||||
{item.tracking_provider}
|
{item.tracking_provider}:{item.primary_tracking_number} (
|
||||||
{item.tracking_number}
|
{formatShipmentState(item.state)})
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -288,6 +288,7 @@ const ListPage: React.FC = () => {
|
||||||
{
|
{
|
||||||
title: 'IP',
|
title: 'IP',
|
||||||
dataIndex: 'customer_ip_address',
|
dataIndex: 'customer_ip_address',
|
||||||
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '设备',
|
title: '设备',
|
||||||
|
|
@ -503,24 +504,31 @@ const ListPage: React.FC = () => {
|
||||||
}}
|
}}
|
||||||
tableRef={actionRef}
|
tableRef={actionRef}
|
||||||
/>,
|
/>,
|
||||||
|
// <Button
|
||||||
|
// type="primary"
|
||||||
|
// disabled={selectedRowKeys.length === 0}
|
||||||
|
// onClick={handleBatchExport}
|
||||||
|
// >
|
||||||
|
// 批量导出
|
||||||
|
// </Button>,
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="批量导出"
|
title="批量导出"
|
||||||
description="确认导出选中的订单吗?"
|
description="确认导出选中的订单吗?"
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
console.log(selectedRowKeys);
|
console.log(selectedRowKeys);
|
||||||
try {
|
try {
|
||||||
const res = await request('/order/export', {
|
const res = await request('/order/order/export', {
|
||||||
method: 'POST',
|
method: 'GET',
|
||||||
data: {
|
params: {
|
||||||
ids: selectedRowKeys,
|
ids: selectedRowKeys,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (res?.success && res.data) {
|
if (res?.success && res?.data?.csv) {
|
||||||
const blob = new Blob([res.data], { type: 'text/csv;charset=utf-8;' });
|
const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = 'orders.csv';
|
a.download = 'customers.csv';
|
||||||
a.click();
|
a.click();
|
||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -59,21 +59,6 @@ export async function ordercontrollerCreatenote(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /order/export */
|
|
||||||
export async function ordercontrollerExportorder(
|
|
||||||
body: Record<string, any>,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<any>('/order/export', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'text/plain',
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /order/getOrderByNumber */
|
/** 此处后端没有提供注释 POST /order/getOrderByNumber */
|
||||||
export async function ordercontrollerGetorderbynumber(
|
export async function ordercontrollerGetorderbynumber(
|
||||||
body: string,
|
body: string,
|
||||||
|
|
@ -266,14 +251,11 @@ export async function ordercontrollerSyncorderbyid(
|
||||||
options?: { [key: string]: any },
|
options?: { [key: string]: any },
|
||||||
) {
|
) {
|
||||||
const { orderId: param0, siteId: param1, ...queryParams } = params;
|
const { orderId: param0, siteId: param1, ...queryParams } = params;
|
||||||
return request<API.SyncOperationResult>(
|
return request<API.BooleanRes>(`/order/syncOrder/${param1}/order/${param0}`, {
|
||||||
`/order/syncOrder/${param1}/order/${param0}`,
|
method: 'POST',
|
||||||
{
|
params: { ...queryParams },
|
||||||
method: 'POST',
|
...(options || {}),
|
||||||
params: { ...queryParams },
|
});
|
||||||
...(options || {}),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /order/updateOrderItems/${param0} */
|
/** 此处后端没有提供注释 POST /order/updateOrderItems/${param0} */
|
||||||
|
|
|
||||||
|
|
@ -456,10 +456,6 @@ declare namespace API {
|
||||||
shipping_provider?: string;
|
shipping_provider?: string;
|
||||||
/** 发货方式 */
|
/** 发货方式 */
|
||||||
shipping_method?: string;
|
shipping_method?: string;
|
||||||
/** 状态 */
|
|
||||||
status?: string;
|
|
||||||
/** 创建时间 */
|
|
||||||
date_created?: string;
|
|
||||||
/** 发货商品项 */
|
/** 发货商品项 */
|
||||||
items?: FulfillmentItemDTO[];
|
items?: FulfillmentItemDTO[];
|
||||||
};
|
};
|
||||||
|
|
@ -2410,8 +2406,6 @@ declare namespace API {
|
||||||
params?: UnifiedSearchParamsDTO;
|
params?: UnifiedSearchParamsDTO;
|
||||||
};
|
};
|
||||||
|
|
||||||
type SyncOperationResult = {};
|
|
||||||
|
|
||||||
type SyncOperationResultDTO = {
|
type SyncOperationResultDTO = {
|
||||||
/** 总处理数量 */
|
/** 总处理数量 */
|
||||||
total?: number;
|
total?: number;
|
||||||
|
|
@ -2647,8 +2641,6 @@ declare namespace API {
|
||||||
number?: string;
|
number?: string;
|
||||||
/** 订单状态 */
|
/** 订单状态 */
|
||||||
status?: string;
|
status?: string;
|
||||||
/** 财务状态 */
|
|
||||||
financial_status?: string;
|
|
||||||
/** 货币 */
|
/** 货币 */
|
||||||
currency?: string;
|
currency?: string;
|
||||||
/** 货币符号 */
|
/** 货币符号 */
|
||||||
|
|
@ -2691,6 +2683,8 @@ declare namespace API {
|
||||||
fee_lines?: UnifiedFeeLineDTO[];
|
fee_lines?: UnifiedFeeLineDTO[];
|
||||||
/** 优惠券项 */
|
/** 优惠券项 */
|
||||||
coupon_lines?: UnifiedCouponLineDTO[];
|
coupon_lines?: UnifiedCouponLineDTO[];
|
||||||
|
/** 物流追踪信息 */
|
||||||
|
tracking?: UnifiedOrderTrackingDTO[];
|
||||||
/** 支付时间 */
|
/** 支付时间 */
|
||||||
date_paid?: string;
|
date_paid?: string;
|
||||||
/** 客户IP地址 */
|
/** 客户IP地址 */
|
||||||
|
|
@ -2701,10 +2695,6 @@ declare namespace API {
|
||||||
device_type?: string;
|
device_type?: string;
|
||||||
/** 来源类型 */
|
/** 来源类型 */
|
||||||
source_type?: string;
|
source_type?: string;
|
||||||
/** 订单状态 */
|
|
||||||
fulfillment_status?: number;
|
|
||||||
/** 物流信息 */
|
|
||||||
fulfillments?: FulfillmentDTO[];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type UnifiedOrderLineItemDTO = {
|
type UnifiedOrderLineItemDTO = {
|
||||||
|
|
@ -2749,16 +2739,14 @@ declare namespace API {
|
||||||
type UnifiedOrderTrackingDTO = {
|
type UnifiedOrderTrackingDTO = {
|
||||||
/** 订单ID */
|
/** 订单ID */
|
||||||
order_id?: string;
|
order_id?: string;
|
||||||
/** 物流单号 */
|
/** 快递公司 */
|
||||||
|
tracking_provider?: string;
|
||||||
|
/** 运单跟踪号 */
|
||||||
tracking_number?: string;
|
tracking_number?: string;
|
||||||
/** 物流公司 */
|
/** 发货日期 */
|
||||||
shipping_provider?: string;
|
date_shipped?: string;
|
||||||
/** 发货方式 */
|
/** 发货状态 */
|
||||||
shipping_method?: string;
|
status_shipped?: string;
|
||||||
/** 状态 */
|
|
||||||
status?: string;
|
|
||||||
/** 创建时间 */
|
|
||||||
date_created?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type UnifiedPaginationDTO = {
|
type UnifiedPaginationDTO = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue