mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 21:49:19 +08:00
feat: 完善公司全店概览
This commit is contained in:
+35
-25
@@ -29,6 +29,14 @@ export namespace CompanyOverviewVO {
|
||||
totalROI?: number;
|
||||
/** 总税后盈亏 */
|
||||
totalProfitAfterTax?: number;
|
||||
/** 全店总销量目标(目标订单数) */
|
||||
totalTargetOrderCount?: number;
|
||||
/** 全店总销售额目标 */
|
||||
totalTargetAmount?: number;
|
||||
/** 销量目标达成率(实际订单数/目标订单数) */
|
||||
orderCountAchievementRate?: number;
|
||||
/** 销售额目标达成率(实际销售额/目标销售额) */
|
||||
salesAmountAchievementRate?: number;
|
||||
}
|
||||
|
||||
/** 店铺销售占比 */
|
||||
@@ -65,35 +73,37 @@ export namespace CompanyOverviewVO {
|
||||
shopName: string;
|
||||
/** 平台 */
|
||||
platform?: string;
|
||||
/** 目标销量(目标订单数) */
|
||||
targetOrderCount?: number;
|
||||
/** 销量达成率 */
|
||||
orderCountAchievementRate?: number;
|
||||
/** 目标销售额 */
|
||||
targetAmount?: number;
|
||||
/** 销售额达成率 */
|
||||
salesAmountAchievementRate?: number;
|
||||
/** 销售额 */
|
||||
salesAmount: number;
|
||||
/** ROI */
|
||||
roi?: number;
|
||||
/** 退款金额 */
|
||||
refundAmount?: number;
|
||||
/** 刷单费 */
|
||||
brushFee?: number;
|
||||
/** 推广费总和 */
|
||||
totalPromotionFee?: number;
|
||||
/** 税后盈亏 */
|
||||
profitAfterTax?: number;
|
||||
/** 订单数量 */
|
||||
/** 单量 */
|
||||
orderCount?: number;
|
||||
/** 总成本 */
|
||||
totalCost?: number;
|
||||
/** 总利润(税前) */
|
||||
totalProfitBeforeTax?: number;
|
||||
/** 税额 */
|
||||
taxAmount?: number;
|
||||
/** 费比 */
|
||||
feeRatio?: number;
|
||||
/** 客单价 */
|
||||
averageOrderValue?: number;
|
||||
/** 利润率 */
|
||||
profitMargin?: number;
|
||||
/** 推广费占比 */
|
||||
promotionFeeRatio?: number;
|
||||
/** 退款率 */
|
||||
refundRate?: number;
|
||||
/** 成本运费 */
|
||||
shippingCost?: number;
|
||||
/** 退款金额 */
|
||||
refundAmount?: number;
|
||||
/** 推广费 */
|
||||
totalPromotionFee?: number;
|
||||
/** 刷单费用 */
|
||||
brushFee?: number;
|
||||
/** 费比 */
|
||||
feeRatio?: number;
|
||||
/** 税前盈亏 */
|
||||
totalProfitBeforeTax?: number;
|
||||
/** 销售额4%税额 */
|
||||
salesTaxAmount?: number;
|
||||
/** 税后盈亏 */
|
||||
profitAfterTax?: number;
|
||||
/** ROI */
|
||||
roi?: number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
import type {
|
||||
ShopMonthlyTargetDTO,
|
||||
ShopMonthlyTargetVO,
|
||||
} from './types';
|
||||
|
||||
import type { PageQueryDTO, PageResultVO } from '#/types/common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 店铺月销量目标管理API
|
||||
*/
|
||||
|
||||
/**
|
||||
* 创建店铺月销量目标
|
||||
*/
|
||||
export async function createShopMonthlyTargetApi(
|
||||
data: ShopMonthlyTargetDTO.Create,
|
||||
) {
|
||||
return requestClient.post<ShopMonthlyTargetVO.Info>(
|
||||
'/ec/shop-monthly-target/create',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新店铺月销量目标
|
||||
*/
|
||||
export async function updateShopMonthlyTargetApi(
|
||||
id: number,
|
||||
data: ShopMonthlyTargetDTO.Update,
|
||||
) {
|
||||
return requestClient.put<ShopMonthlyTargetVO.Info>(
|
||||
`/ec/shop-monthly-target/update/${id}`,
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店铺月销量目标
|
||||
*/
|
||||
export async function deleteShopMonthlyTargetApi(id: number) {
|
||||
return requestClient.delete(`/ec/shop-monthly-target/delete/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取店铺月销量目标列表
|
||||
*/
|
||||
export async function getShopMonthlyTargetPageApi(
|
||||
params: PageQueryDTO<ShopMonthlyTargetDTO.Filters>,
|
||||
) {
|
||||
return requestClient.post<PageResultVO<ShopMonthlyTargetVO.Info>>(
|
||||
'/ec/shop-monthly-target/page',
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺月销量目标详情
|
||||
*/
|
||||
export async function getShopMonthlyTargetByIdApi(id: number) {
|
||||
return requestClient.get<ShopMonthlyTargetVO.Info>(
|
||||
`/ec/shop-monthly-target/detail/${id}`,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 店铺月销量目标管理模块API导出
|
||||
*/
|
||||
|
||||
export * from './apis';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 店铺月销量目标管理模块类型定义导出
|
||||
*/
|
||||
|
||||
export * from './types.dto';
|
||||
export * from './types.vo';
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* 店铺月销量目标相关DTO类型定义
|
||||
*/
|
||||
|
||||
export namespace ShopMonthlyTargetDTO {
|
||||
/** 创建店铺月销量目标参数 */
|
||||
export interface Create {
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 目标月份(格式:YYYY-MM-01) */
|
||||
targetMonth: string;
|
||||
/** 目标销售额 */
|
||||
targetAmount: number;
|
||||
/** 目标订单数 */
|
||||
targetOrderCount: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 更新店铺月销量目标参数 */
|
||||
export interface Update {
|
||||
/** 目标月份(格式:YYYY-MM-01) */
|
||||
targetMonth: string;
|
||||
/** 目标销售额 */
|
||||
targetAmount: number;
|
||||
/** 目标订单数 */
|
||||
targetOrderCount: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 店铺月销量目标过滤条件 */
|
||||
export interface Filters {
|
||||
/** 店铺ID */
|
||||
shopId?: number;
|
||||
/** 目标月份范围-开始月份 */
|
||||
startTargetMonth?: string;
|
||||
/** 目标月份范围-结束月份 */
|
||||
endTargetMonth?: string;
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* 店铺月销量目标相关VO类型定义
|
||||
*/
|
||||
|
||||
export namespace ShopMonthlyTargetVO {
|
||||
/** 店铺月销量目标信息 */
|
||||
export interface Info {
|
||||
/** 目标ID */
|
||||
id: number;
|
||||
/** 公司ID */
|
||||
companyId: number;
|
||||
/** 店铺ID */
|
||||
shopId: number;
|
||||
/** 店铺名称 */
|
||||
shopName: string;
|
||||
/** 目标月份 */
|
||||
targetMonth: string;
|
||||
/** 目标销售额 */
|
||||
targetAmount: number;
|
||||
/** 目标订单数 */
|
||||
targetOrderCount: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
updateTime: string;
|
||||
/** 创建人ID */
|
||||
createBy?: number;
|
||||
/** 更新人ID */
|
||||
updateBy?: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user