mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 17:09:19 +08:00
1
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
|
||||
export * from './types.dto';
|
||||
export * from './types.vo';
|
||||
export * from './types.enum';
|
||||
|
||||
@@ -14,15 +14,15 @@ export namespace OrderDTO {
|
||||
/** 商家实收金额 */
|
||||
receivedAmount: number;
|
||||
/** 下单时间 */
|
||||
orderDate: string;
|
||||
orderTime: string;
|
||||
/** 商品ID */
|
||||
productId: number;
|
||||
/** 商品规格ID */
|
||||
productSpecId?: number;
|
||||
/** 商品名称(冗余存储) */
|
||||
productName: string;
|
||||
/** 规格名称(冗余存储) */
|
||||
specName?: string;
|
||||
/** 链接商品名称(冗余存储) */
|
||||
linkProductName: string;
|
||||
/** 链接规格名称(冗余存储) */
|
||||
linkSpecName?: string;
|
||||
/** 数量 */
|
||||
quantity: number;
|
||||
/** 销售单价 */
|
||||
@@ -42,15 +42,15 @@ export namespace OrderDTO {
|
||||
/** 商家实收金额 */
|
||||
receivedAmount: number;
|
||||
/** 下单时间 */
|
||||
orderDate: string;
|
||||
orderTime: string;
|
||||
/** 商品ID */
|
||||
productId?: number;
|
||||
/** 商品规格ID */
|
||||
productSpecId?: number;
|
||||
/** 商品名称(冗余存储) */
|
||||
productName?: string;
|
||||
/** 规格名称(冗余存储) */
|
||||
specName?: string;
|
||||
/** 链接商品名称(冗余存储) */
|
||||
linkProductName?: string;
|
||||
/** 链接规格名称(冗余存储) */
|
||||
linkSpecName?: string;
|
||||
/** 数量 */
|
||||
quantity?: number;
|
||||
/** 销售单价 */
|
||||
@@ -72,9 +72,9 @@ export namespace OrderDTO {
|
||||
/** 实收金额范围-最大值 */
|
||||
maxReceivedAmount?: number;
|
||||
/** 下单时间范围-开始时间 */
|
||||
startOrderDate?: string;
|
||||
startOrderTime?: string;
|
||||
/** 下单时间范围-结束时间 */
|
||||
endOrderDate?: string;
|
||||
endOrderTime?: string;
|
||||
}
|
||||
|
||||
/** 批量导入订单参数 */
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* 订单状态枚举
|
||||
*/
|
||||
export enum OrderStatus {
|
||||
/** 未知状态 */
|
||||
UNKNOWN = 'UNKNOWN',
|
||||
/** 待发货 */
|
||||
PENDING_SHIPMENT = 'PENDING_SHIPMENT',
|
||||
/** 已发货 */
|
||||
SHIPPED = 'SHIPPED',
|
||||
/** 已完成 */
|
||||
COMPLETED = 'COMPLETED',
|
||||
/** 已取消 */
|
||||
CANCELLED = 'CANCELLED',
|
||||
/** 退款中 */
|
||||
REFUNDING = 'REFUNDING',
|
||||
/** 已退款 */
|
||||
REFUNDED = 'REFUNDED',
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单状态选项配置
|
||||
*/
|
||||
export const ORDER_STATUS_OPTIONS = [
|
||||
{ label: '未知状态', value: OrderStatus.UNKNOWN },
|
||||
{ label: '待发货', value: OrderStatus.PENDING_SHIPMENT },
|
||||
{ label: '已发货', value: OrderStatus.SHIPPED },
|
||||
{ label: '已完成', value: OrderStatus.COMPLETED },
|
||||
{ label: '已取消', value: OrderStatus.CANCELLED },
|
||||
{ label: '退款中', value: OrderStatus.REFUNDING },
|
||||
{ label: '已退款', value: OrderStatus.REFUNDED },
|
||||
];
|
||||
|
||||
/**
|
||||
* 根据订单状态枚举值获取中文名称
|
||||
*/
|
||||
export function getOrderStatusName(status: OrderStatus): string {
|
||||
const option = ORDER_STATUS_OPTIONS.find((opt) => opt.value === status);
|
||||
return option?.label || '未知状态';
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@ export namespace OrderVO {
|
||||
platformOrderNo: string;
|
||||
/** 订单状态ID */
|
||||
statusId: number;
|
||||
/** 订单状态名称 */
|
||||
/** 订单状态名称(中文) */
|
||||
statusName: string;
|
||||
/** 商家实收金额 */
|
||||
receivedAmount: number;
|
||||
/** 下单时间 */
|
||||
orderDate: string;
|
||||
orderTime: string;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
@@ -35,10 +35,10 @@ export namespace OrderVO {
|
||||
productId: number;
|
||||
/** 商品规格ID */
|
||||
productSpecId?: number;
|
||||
/** 商品名称(冗余存储) */
|
||||
productName: string;
|
||||
/** 规格名称(冗余存储) */
|
||||
specName?: string;
|
||||
/** 链接商品名称(冗余存储) */
|
||||
linkProductName: string;
|
||||
/** 链接规格名称(冗余存储) */
|
||||
linkSpecName?: string;
|
||||
/** 数量 */
|
||||
quantity: number;
|
||||
/** 销售单价 */
|
||||
|
||||
Reference in New Issue
Block a user