mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:19:19 +08:00
49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
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<CostSyncVO.Impact[]>('/ec/cost-sync/impacts/pending');
|
|
}
|
|
|
|
/** 一键同步全部 PENDING → 成本任务 + BI 全量 */
|
|
export async function applyPendingCostImpactsApi() {
|
|
return requestClient.post<CostSyncVO.ApplyResult>(
|
|
'/ec/cost-sync/apply-pending',
|
|
);
|
|
}
|