29 lines
779 B
TypeScript
29 lines
779 B
TypeScript
import createAxios from '@/utils/request';
|
|
import type IStoreOrder from '@/domain/iStoreOrder.ts';
|
|
import type { IOrderSummaryRow } from '@/domain/iStoreOrder.ts';
|
|
|
|
/** 订单详情(头 + 明细) */
|
|
export async function getStoreOrder(id: number) {
|
|
return createAxios<IStoreOrder>({
|
|
url: `/order/store/${id}`,
|
|
method: 'get',
|
|
});
|
|
}
|
|
|
|
/** 订单状态流转(2配送中 3已完成 9取消) */
|
|
export async function updateOrderStatus(id: number, status: number) {
|
|
return createAxios({
|
|
url: `/order/store/${id}/status`,
|
|
method: 'put',
|
|
data: { status },
|
|
});
|
|
}
|
|
|
|
/** 待汇总预览(按商品聚合) */
|
|
export async function getOrderSummary() {
|
|
return createAxios<IOrderSummaryRow[]>({
|
|
url: '/order/store/summary',
|
|
method: 'get',
|
|
});
|
|
}
|