优化
This commit is contained in:
@@ -110,6 +110,36 @@ export interface LastMileStatusHistoryDto {
|
||||
createdAt?: string | null
|
||||
}
|
||||
|
||||
export interface LastMileFeeDto {
|
||||
id: string
|
||||
customerId: string
|
||||
orderId: string
|
||||
feeItem: string
|
||||
currency: string
|
||||
amount: number
|
||||
status: string
|
||||
supplierDescription?: string | null
|
||||
createdBy: string
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface LastMileOperationDto {
|
||||
id: string
|
||||
operationNode: string
|
||||
operatorName: string
|
||||
result: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface CreateLastMileFeePayload {
|
||||
feeItem: string
|
||||
currency: string
|
||||
amount: number
|
||||
status: string
|
||||
supplierDescription?: string
|
||||
}
|
||||
|
||||
export interface TransferDestinationPayload {
|
||||
orderIds: string[]
|
||||
warehouseId: string
|
||||
@@ -126,6 +156,8 @@ export interface LastMileOrderDetailDto {
|
||||
order: LastMileOrderDto
|
||||
cargo: LastMileCargoDto[]
|
||||
statusHistory: LastMileStatusHistoryDto[]
|
||||
fees: LastMileFeeDto[]
|
||||
operationHistory: LastMileOperationDto[]
|
||||
}
|
||||
|
||||
export async function listLastMileOrders(query: LastMileOrderQuery) {
|
||||
@@ -143,6 +175,13 @@ export async function getLastMileOrder(orderId: string) {
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function createLastMileOrderFee(orderId: string, payload: CreateLastMileFeePayload) {
|
||||
const response = await overseasHttp.post<ApiEnvelope<LastMileFeeDto>, ApiEnvelope<LastMileFeeDto>>(
|
||||
`/platform/v1/last-leg/orders/${encodeURIComponent(orderId)}/fees`, payload,
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function transferLastMileOrders(payload: TransferDestinationPayload) {
|
||||
const response = await overseasHttp.put<ApiEnvelope<number>, ApiEnvelope<number>>(
|
||||
'/platform/v1/last-leg/orders/destination', payload,
|
||||
|
||||
Reference in New Issue
Block a user