mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 14:29:19 +08:00
refactor(ecom): 订单状态统计规则从单一开关升级为多维度独立控制
- ec_order_status 表 auto_statistics 拆分为四个独立字段:include_sales_amount / include_product_cost / include_freight_cost / include_other_cost / include_refund - CompanyOverviewServiceImpl / ShopOverviewStatisticsServiceImpl / ProductOverviewServiceImpl / ExportStatusRangeHelper 全部改为按各维度独立统计 - OrderStatus PO/DTO/VO 层字段更新,Service 层校验逻辑同步调整 - ProductSpecImportHelper 导入逻辑适配新字段 - 前端订单状态配置页适配新字段及展示 - 新增 OrderStatusCard.vue 卡片组件 - 更新 ec_design.sql 设计文档
This commit is contained in:
@@ -30,11 +30,11 @@ export async function updateOrderStatusApi(
|
||||
}
|
||||
|
||||
/**
|
||||
* 部分更新订单状态(仅自动统计和退款状态)
|
||||
* 部分更新订单状态(统计维度开关,字段可选)
|
||||
*/
|
||||
export async function patchOrderStatusApi(
|
||||
id: number,
|
||||
data: { autoStatistics?: number; isRefund?: number },
|
||||
data: OrderStatusDTO.Patch,
|
||||
) {
|
||||
return requestClient.request<OrderStatusVO.Info>(
|
||||
`/ec/order-status/update/${id}`,
|
||||
|
||||
@@ -13,10 +13,16 @@ export namespace OrderStatusDTO {
|
||||
color?: string;
|
||||
/** 排序 */
|
||||
sortOrder?: number;
|
||||
/** 自动统计 0不参与 1参与 */
|
||||
autoStatistics: number;
|
||||
/** 是否为退款状态 0否 1是 */
|
||||
isRefund?: number;
|
||||
/** 是否计入销售额/单量等统计 0否 1是 */
|
||||
includeSalesAmount?: number;
|
||||
/** 是否计入商品成本统计 0否 1是 */
|
||||
includeProductCost?: number;
|
||||
/** 是否计入运费成本统计 0否 1是 */
|
||||
includeFreightCost?: number;
|
||||
/** 是否计入其他成本统计 0否 1是 */
|
||||
includeOtherCost?: number;
|
||||
/** 是否计入退款金额统计 0否 1是 */
|
||||
includeRefund?: number;
|
||||
}
|
||||
|
||||
/** 更新订单状态参数 */
|
||||
@@ -29,9 +35,24 @@ export namespace OrderStatusDTO {
|
||||
color?: string;
|
||||
/** 排序 */
|
||||
sortOrder?: number;
|
||||
/** 自动统计 0不参与 1参与 */
|
||||
autoStatistics: number;
|
||||
/** 是否为退款状态 0否 1是 */
|
||||
isRefund?: number;
|
||||
/** 是否计入销售额/单量等统计 0否 1是 */
|
||||
includeSalesAmount: number;
|
||||
/** 是否计入商品成本统计 0否 1是 */
|
||||
includeProductCost: number;
|
||||
/** 是否计入运费成本统计 0否 1是 */
|
||||
includeFreightCost: number;
|
||||
/** 是否计入其他成本统计 0否 1是 */
|
||||
includeOtherCost: number;
|
||||
/** 是否计入退款金额统计 0否 1是 */
|
||||
includeRefund: number;
|
||||
}
|
||||
|
||||
/** PATCH 部分更新(任意字段可选,与后端 PatchOrderStatusDTO 对齐) */
|
||||
export interface Patch {
|
||||
includeSalesAmount?: number;
|
||||
includeProductCost?: number;
|
||||
includeFreightCost?: number;
|
||||
includeOtherCost?: number;
|
||||
includeRefund?: number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,16 @@ export namespace OrderStatusVO {
|
||||
color?: string;
|
||||
/** 排序 */
|
||||
sortOrder?: number;
|
||||
/** 自动统计 0不参与 1参与 */
|
||||
autoStatistics: number;
|
||||
/** 是否为退款状态 0否 1是 */
|
||||
isRefund?: number;
|
||||
/** 是否计入销售额/单量等统计 0否 1是 */
|
||||
includeSalesAmount: number;
|
||||
/** 是否计入商品成本统计 0否 1是 */
|
||||
includeProductCost: number;
|
||||
/** 是否计入运费成本统计 0否 1是 */
|
||||
includeFreightCost: number;
|
||||
/** 是否计入其他成本统计 0否 1是 */
|
||||
includeOtherCost: number;
|
||||
/** 是否计入退款金额统计 0否 1是 */
|
||||
includeRefund: number;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
|
||||
Reference in New Issue
Block a user