发布当前测试版本至临时灰度环境 #11
@@ -1,5 +1,5 @@
|
||||
import { ApiError, apiRequest } from '@/api/http'
|
||||
import type { ApiContainerMode, ApiDestinationType, ApiFirstLegStatus, ApiPickupMethod, MerchantFirstLegOrderDetail, PageResult } from '@/modules/first-leg/api/firstLeg'
|
||||
import type { ApiContainerMode, ApiDestinationType, ApiFirstLegStatus, ApiPickupMethod, ApiTaxMode, MerchantFirstLegOrderDetail, PageResult } from '@/modules/first-leg/api/firstLeg'
|
||||
|
||||
export type ApiUnifiedOrderMainStatus =
|
||||
| 'PENDING_REVIEW'
|
||||
@@ -83,6 +83,8 @@ export interface MerchantUnifiedOrderRow {
|
||||
actualGrossWeightKg: number | null
|
||||
actualVolumeCbm: number | null
|
||||
pickupMethod: ApiPickupMethod | null
|
||||
taxMode: ApiTaxMode | null
|
||||
customsInspection: boolean | null
|
||||
requestedPickupAt: string | null
|
||||
containerMode: ApiContainerMode | null
|
||||
destinationType: ApiDestinationType | null
|
||||
|
||||
@@ -107,6 +107,8 @@ test('declares the final C02 row and detail contract in the API adapter', () =>
|
||||
for (const field of ['pickupMethod', 'requestedPickupAt', 'containerMode', 'destinationType', 'destinationCode', 'skuNos', 'totalQuantity', 'totalNetWeightKg', 'chargeableVolumeCbm', 'inboundCompletedAt', 'shipmentId', 'referenceId']) {
|
||||
assert.match(unifiedApiSource, new RegExp(`${field}:`))
|
||||
}
|
||||
assert.match(unifiedApiSource, /taxMode: ApiTaxMode \| null/)
|
||||
assert.match(unifiedApiSource, /customsInspection: boolean \| null/)
|
||||
assert.match(unifiedApiSource, /loadingVersion: number/)
|
||||
assert.match(unifiedApiSource, /pickingVersion: number/)
|
||||
assert.match(unifiedApiSource, /summary: MerchantUnifiedOrderRow/)
|
||||
@@ -142,6 +144,8 @@ test('maps C02 authoritative status, transport, cargo and pickup snapshots', ()
|
||||
assert.match(storeSource, /id: String\(summary\.orderId\)/)
|
||||
assert.match(storeSource, /transportMode: unifiedTransport\(summary\.containerMode\)/)
|
||||
assert.match(storeSource, /status: summary\.mainStatus/)
|
||||
assert.match(storeSource, /taxMode: summary\.taxMode \?\? 'BUY_DECLARATION'/)
|
||||
assert.match(storeSource, /customsInspection: summary\.customsInspection \?\? false/)
|
||||
assert.match(storeSource, /fulfillmentType: summary\.fulfillmentType \?\? 'STANDARD'/)
|
||||
assert.match(storeSource, /lxCode: summary\.lxCode \?\? ''/)
|
||||
assert.match(storeSource, /mapped\.fulfillmentType = detail\.summary\.fulfillmentType \?\? mapped\.fulfillmentType/)
|
||||
|
||||
@@ -343,7 +343,7 @@ function mapUnifiedOrderRow(summary: MerchantUnifiedOrderRow, warehouses: Platfo
|
||||
createdAt: summary.createdAt, updatedAt: summary.updatedAt, tradeTerm: '', destinationCountryCode: '',
|
||||
destinationWarehouseId: summary.destinationWarehouseId == null ? '' : String(summary.destinationWarehouseId),
|
||||
destinationWarehouseName: summary.destinationWarehouseName ?? '', pickupMethod: summary.pickupMethod ?? 'SELF_EXPRESS', channelCode: '',
|
||||
channelName: summary.channelName ?? '', pricingTaxMode: 'TAX_INCLUDED', carrierId: '', carrierName: '', taxMode: 'BUY_DECLARATION', customsInspection: false,
|
||||
channelName: summary.channelName ?? '', pricingTaxMode: 'TAX_INCLUDED', carrierId: '', carrierName: '', taxMode: summary.taxMode ?? 'BUY_DECLARATION', customsInspection: summary.customsInspection ?? false,
|
||||
destinationType: summary.destinationType ?? 'PRIVATE', amazonWarehouseCode: summary.destinationCode ?? '', shipmentId: summary.shipmentId ?? '',
|
||||
requestedPickupAt: summary.requestedPickupAt ?? '', receivingTime: '', submittedAt: '', completedAt: '',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user