import request from '@/utils/request' const v = '1.0' export type OrderWhere = Record export type OrderSort = { sortField?: string sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' field?: string order?: 'asc' | 'desc' | 'ASC' | 'DESC' } export type OrderPagination = { page?: number pageSize?: number } export type DeliveryOrderListParams = { pagination?: OrderPagination where?: OrderWhere sort?: OrderSort } export type DeliveryOrderDetailParams = { ids?: Array | string | number id?: number | string order_id?: number | string orderId?: number | string tableType?: string tablePosition?: string type?: string moduleName?: string } export function orderDeliveryOrderList(data: DeliveryOrderListParams = {}): Promise { return request({ url: '/system', method: 'post', params: { method: 'order.deliveryOrder.list', v, timestamp: Date.now() }, data, isSystemApi: true } as any) } export function orderDeliveryOrderDetail(data: DeliveryOrderDetailParams): Promise { return request({ url: '/system', method: 'post', params: { method: 'order.deliveryOrder.detail', v, timestamp: Date.now() }, data, isSystemApi: true } as any) } export const orderDeliveryOrder = { list: orderDeliveryOrderList, detail: orderDeliveryOrderDetail }