import { requestClient } from '#/api/request'; export namespace CostSyncVO { export interface Impact { id: number; productId: number; skuId: number; dateFrom: string; dateTo: string; status: string; lastProductCost?: number; lastShippingCost?: number; lastOtherCost?: number; createTime?: string; appliedTime?: string; applyBatchId?: string; } export interface ApplyTaskBrief { costSyncTaskId: number; shopId: number; biCalcTaskId?: number; dateFrom: string; dateTo: string; totalDays: number; status: string; createTime?: string; } export interface ApplyResult { applyBatchId: string; impactCount: number; taskCount: number; tasks: ApplyTaskBrief[]; } } /** 待同步成本影响面 */ export async function listPendingCostImpactsApi() { return requestClient.get('/ec/cost-sync/impacts/pending'); } /** 一键同步全部 PENDING → 成本任务 + BI 全量 */ export async function applyPendingCostImpactsApi() { return requestClient.post( '/ec/cost-sync/apply-pending', ); }