feat(procurement): show customer sample fulfillment and charges
This commit is contained in:
@@ -8,7 +8,7 @@ export interface PageResult<T> {
|
||||
pages: number
|
||||
}
|
||||
|
||||
export type CrossBorderBusinessKind = 'procurement' | 'trucking' | 'looseboard'
|
||||
export type CrossBorderBusinessKind = 'trucking' | 'looseboard'
|
||||
|
||||
export interface BusinessOrderQuery {
|
||||
page: number
|
||||
@@ -16,8 +16,6 @@ export interface BusinessOrderQuery {
|
||||
orderNo?: string
|
||||
status?: string
|
||||
routeKeyword?: string
|
||||
productName?: string
|
||||
purchaseCategory?: string
|
||||
transportType?: string
|
||||
transportMode?: string
|
||||
requestedFrom?: string
|
||||
@@ -26,54 +24,6 @@ export interface BusinessOrderQuery {
|
||||
createdTo?: string
|
||||
}
|
||||
|
||||
export interface ProcurementSummary {
|
||||
orderNo: string
|
||||
purchaseCategory: string
|
||||
productName: string
|
||||
productSpecification: string | null
|
||||
purchaseQuantity: number
|
||||
budgetUnitPrice: number | null
|
||||
currency: string | null
|
||||
inboundQuantity: number
|
||||
outboundQuantity: number
|
||||
inventoryQuantity: number
|
||||
status: string
|
||||
version: number
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface ProcurementDetail {
|
||||
summary: ProcurementSummary
|
||||
productUrl: string | null
|
||||
receivingAddress: string | null
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
domesticCarrier: string | null
|
||||
domesticTrackingNo: string | null
|
||||
overseasCarrier: string | null
|
||||
overseasTrackingNo: string | null
|
||||
estimatedArrivalAt: string | null
|
||||
remark: string | null
|
||||
reviewRemark: string | null
|
||||
}
|
||||
|
||||
export interface ProcurementCreate {
|
||||
customerName: string
|
||||
purchaseCategory: string
|
||||
productName: string
|
||||
productSpecification?: string
|
||||
productUrl?: string
|
||||
purchaseQuantity: number
|
||||
budgetUnitPrice?: number
|
||||
currency?: string
|
||||
receivingAddress?: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
remark?: string
|
||||
idempotencyKey: string
|
||||
}
|
||||
|
||||
export interface TransportSummary {
|
||||
fleetArrangement: import('../fleetArrangement').FleetArrangement | null
|
||||
orderNo: string
|
||||
@@ -132,7 +82,6 @@ export interface TransportUpdate extends Omit<TransportCreate, 'idempotencyKey'>
|
||||
}
|
||||
|
||||
const endpointByKind: Record<CrossBorderBusinessKind, string> = {
|
||||
procurement: '/merchant/v1/last-leg/overseas-procurements',
|
||||
trucking: '/merchant/v1/last-leg/us-truck-orders',
|
||||
looseboard: '/merchant/v1/last-leg/local-looseboard-orders',
|
||||
}
|
||||
@@ -149,10 +98,6 @@ export function getBusinessOrder<T>(kind: CrossBorderBusinessKind, orderNo: stri
|
||||
return apiRequest<T>({ method: 'GET', url: `${endpointByKind[kind]}/${encodeURIComponent(orderNo)}` })
|
||||
}
|
||||
|
||||
export function createProcurement(payload: ProcurementCreate) {
|
||||
return apiRequest<ProcurementDetail>({ method: 'POST', url: endpointByKind.procurement, data: payload })
|
||||
}
|
||||
|
||||
export function createTransport(kind: 'trucking' | 'looseboard', payload: TransportCreate) {
|
||||
return apiRequest<TransportDetail>({ method: 'POST', url: endpointByKind[kind], data: payload })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user