优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { apiRequest } from '@/api/http'
|
||||
import { apiBlobRequest, apiRequest } from '@/api/http'
|
||||
|
||||
export type ApiFirstLegStatus = 'DRAFT' | 'SUBMITTED' | 'APPROVED' | 'ACCEPTED' | 'REJECTED' | 'CANCELLED' | 'PROCESSING' | 'COMPLETED'
|
||||
export type ApiTransportMode = 'SEA' | 'AIR' | 'RAIL' | 'TRUCK'
|
||||
@@ -95,8 +95,28 @@ export interface FirstLegOrderCargoPayload {
|
||||
skuNo?: string
|
||||
upcNo?: string
|
||||
cargoNameEn?: string
|
||||
customsHsCode?: string
|
||||
unitsPerPackage?: number
|
||||
totalQuantity?: number
|
||||
netWeightKg?: number
|
||||
unitDeclaredValue?: number
|
||||
material?: string
|
||||
usage?: string
|
||||
model?: string
|
||||
brand?: string
|
||||
productLengthCm?: number
|
||||
productWidthCm?: number
|
||||
productHeightCm?: number
|
||||
shipmentId?: string
|
||||
referenceId?: string
|
||||
productImageFileId?: number | string
|
||||
}
|
||||
|
||||
export interface ProductImageUploadResult {
|
||||
fileId: number | string
|
||||
fileName: string
|
||||
contentType: string
|
||||
sizeBytes: number
|
||||
}
|
||||
|
||||
export interface FirstLegOrderSaveRequest {
|
||||
@@ -196,6 +216,16 @@ export interface MerchantFirstLegOrderDetail {
|
||||
statusHistory: MerchantOrderStatusHistory[]
|
||||
}
|
||||
|
||||
export function uploadMerchantProductImage(file: File) {
|
||||
const data = new FormData()
|
||||
data.append('file', file)
|
||||
return apiRequest<ProductImageUploadResult>({ method: 'POST', url: '/merchant/v1/files/product-images', data })
|
||||
}
|
||||
|
||||
export function downloadMerchantProductImage(fileId: number | string) {
|
||||
return apiBlobRequest({ method: 'GET', url: `/merchant/v1/files/product-images/${fileId}` })
|
||||
}
|
||||
|
||||
export interface FirstLegOrderQuery {
|
||||
keyword?: string
|
||||
status?: ApiFirstLegStatus
|
||||
|
||||
Reference in New Issue
Block a user