From 497530d6a9a6b8f729dd197af74cd6febd23aa8e Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Fri, 11 Sep 2026 18:44:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../carrier-rates/api/platformPriceBooks.ts | 19 ++- .../carrier-rates/pages/CarrierRatesView.vue | 143 +----------------- src/modules/fba-pricing/routes.ts | 11 ++ 3 files changed, 33 insertions(+), 140 deletions(-) diff --git a/src/modules/fba-pricing/carrier-rates/api/platformPriceBooks.ts b/src/modules/fba-pricing/carrier-rates/api/platformPriceBooks.ts index e1cf9459..20bd6333 100644 --- a/src/modules/fba-pricing/carrier-rates/api/platformPriceBooks.ts +++ b/src/modules/fba-pricing/carrier-rates/api/platformPriceBooks.ts @@ -1,6 +1,6 @@ import { http, unwrapApiResponse, type ApiEnvelope } from '@/shared/api/http' -export type PriceBookStatus = 'PENDING_CONFIRMATION' | 'ACTIVE' | 'SUPERSEDED' | 'FAILED' +export type PriceBookStatus = 'PENDING_CONFIRMATION' | 'ACTIVE' | 'SUPERSEDED' | 'VOIDED' | 'FAILED' export type PriceModel = 'FBA_WAREHOUSE_RATE' | 'REGION_WEIGHT_TIER' export type PricingTaxMode = 'TAX_INCLUDED' | 'TAX_EXCLUDED' export type PricingDestinationType = 'FBA' | 'OVERSEAS' @@ -27,6 +27,9 @@ export interface PlatformPriceBookVersion { publishedBy: string | null publishedAt: string | null supersededAt: string | null + voidedBy: string | null + voidedAt: string | null + voidReason: string | null } /** Read-only channel data parsed from the uploaded workbook. */ @@ -102,7 +105,7 @@ export interface PlatformPriceBookQuery { } interface PriceBookVersionPayload extends Omit { + 'id' | 'customerId' | 'versionNo' | 'sourceFileId' | 'channelCount' | 'rateCount' | 'blockingErrorCount' | 'warningCount' | 'createdBy' | 'publishedBy' | 'voidedBy'> { id: ApiId customerId: ApiId versionNo: ApiNumber @@ -113,6 +116,7 @@ interface PriceBookVersionPayload extends Omit { + const response = await http.post, ApiEnvelope>( + `${basePath}/${encodeURIComponent(versionId)}/void`, + { reason }, + ) + return normalizeDetail(unwrapApiResponse(response)) +} + export function downloadPlatformPriceBookSource(versionId: string) { return http.get(`${basePath}/${encodeURIComponent(versionId)}/source`, { responseType: 'blob' }) } diff --git a/src/modules/fba-pricing/carrier-rates/pages/CarrierRatesView.vue b/src/modules/fba-pricing/carrier-rates/pages/CarrierRatesView.vue index 49817d7c..2703a6f6 100644 --- a/src/modules/fba-pricing/carrier-rates/pages/CarrierRatesView.vue +++ b/src/modules/fba-pricing/carrier-rates/pages/CarrierRatesView.vue @@ -1,31 +1,24 @@