mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 22:29:19 +08:00
feat: 完善成本同步
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
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',
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user