68 lines
1.5 KiB
TypeScript
68 lines
1.5 KiB
TypeScript
import request from '@/utils/request'
|
|
|
|
const v = '1.0'
|
|
|
|
export type { OrderWorkbenchListResponse, OrderListPagination } from '@/api/order.index/orderindex'
|
|
|
|
export type OrderWhere = Record<string, any>
|
|
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 EntrustOrderListParams = {
|
|
pagination?: OrderPagination
|
|
where?: OrderWhere
|
|
sort?: OrderSort
|
|
}
|
|
|
|
export type EntrustOrderDetailParams = {
|
|
ids?: Array<number | string> | string | number
|
|
id?: number | string
|
|
order_id?: number | string
|
|
orderId?: number | string
|
|
tableType?: string
|
|
tablePosition?: string
|
|
type?: string
|
|
moduleName?: string
|
|
}
|
|
|
|
export function orderEntrustOrderList(data: EntrustOrderListParams = {}): Promise<any> {
|
|
return request({
|
|
url: '/system',
|
|
method: 'post',
|
|
params: {
|
|
method: 'order.entrustOrder.list',
|
|
v,
|
|
timestamp: Date.now()
|
|
},
|
|
data,
|
|
isSystemApi: true
|
|
} as any)
|
|
}
|
|
|
|
export function orderEntrustOrderDetail(data: EntrustOrderDetailParams): Promise<any> {
|
|
return request({
|
|
url: '/system',
|
|
method: 'post',
|
|
params: {
|
|
method: 'order.entrustOrder.detail',
|
|
v,
|
|
timestamp: Date.now()
|
|
},
|
|
data,
|
|
isSystemApi: true
|
|
} as any)
|
|
}
|
|
|
|
export const orderEntrustOrder = {
|
|
list: orderEntrustOrderList,
|
|
detail: orderEntrustOrderDetail
|
|
}
|