37 lines
875 B
TypeScript
37 lines
875 B
TypeScript
import createAxios from '@/utils/request';
|
|
import type IStoreOrder from '@/domain/iStoreOrder.ts';
|
|
|
|
/** 订单详情 */
|
|
export async function getStoreOrder(id: number) {
|
|
return createAxios<IStoreOrder>({
|
|
url: `/order/store/${id}`,
|
|
method: 'get',
|
|
});
|
|
}
|
|
|
|
/** 订单状态流转 */
|
|
export async function updateOrderStatus(id: number, status: number) {
|
|
return createAxios({
|
|
url: `/order/store/${id}/status`,
|
|
method: 'put',
|
|
data: { status },
|
|
});
|
|
}
|
|
|
|
/** 批量订单状态流转 */
|
|
export async function batchUpdateOrderStatus(ids: number[], status: number) {
|
|
return createAxios<{ success: number }>({
|
|
url: '/order/store/batchStatus',
|
|
method: 'put',
|
|
data: { ids, status },
|
|
});
|
|
}
|
|
|
|
/** 删除订单 */
|
|
export async function deleteStoreOrder(id: number) {
|
|
return createAxios({
|
|
url: `/order/store/${id}`,
|
|
method: 'delete',
|
|
});
|
|
}
|