|
@@ -10,104 +10,56 @@ import {
|
|
|
getOrderTypeTagType as getOrderTypeTagTypeFromConstants,
|
|
|
getOrderStatusLabel as getOrderStatusLabelFromConstants,
|
|
|
getOrderStatusTagType as getOrderStatusTagTypeFromConstants
|
|
|
-} from '@/constants'
|
|
|
+} from '@/constants/order'
|
|
|
|
|
|
-/**
|
|
|
- * 订单类型枚举(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @enum {number}
|
|
|
- * @deprecated 请使用 @/constants 中的 ORDER_TYPES
|
|
|
- */
|
|
|
+// 订单类型枚举(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 ORDER_TYPES
|
|
|
export { ORDER_TYPES }
|
|
|
|
|
|
-/**
|
|
|
- * 订单状态枚举(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @enum {number}
|
|
|
- * @deprecated 请使用 @/constants 中的 ORDER_STATUS
|
|
|
- */
|
|
|
+// 订单状态枚举(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 ORDER_STATUS
|
|
|
export { ORDER_STATUS }
|
|
|
|
|
|
-/**
|
|
|
- * 订单类型标签映射(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @type {Record<number, string>}
|
|
|
- * @deprecated 请使用 @/constants 中的 getOrderTypeLabel 函数
|
|
|
- */
|
|
|
+// 订单类型标签映射(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 getOrderTypeLabel 函数
|
|
|
export const ORDER_TYPE_LABELS = Object.fromEntries(
|
|
|
Object.entries(ORDER_TYPE_CONFIG).map(([key, config]) => [key, config.label])
|
|
|
)
|
|
|
|
|
|
-/**
|
|
|
- * 订单状态标签映射(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @type {Record<number, string>}
|
|
|
- * @deprecated 请使用 @/constants 中的 getOrderStatusLabel 函数
|
|
|
- */
|
|
|
+// 订单状态标签映射(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 getOrderStatusLabel 函数
|
|
|
export const ORDER_STATUS_LABELS = Object.fromEntries(
|
|
|
Object.entries(ORDER_STATUS_CONFIG).map(([key, config]) => [key, config.label])
|
|
|
)
|
|
|
|
|
|
-/**
|
|
|
- * 订单类型标签类型映射(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @type {Record<number, string>}
|
|
|
- * @deprecated 请使用 @/constants 中的 getOrderTypeTagType 函数
|
|
|
- */
|
|
|
+// 订单类型标签类型映射(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 getOrderTypeTagType 函数
|
|
|
export const ORDER_TYPE_TAG_TYPES = Object.fromEntries(
|
|
|
Object.entries(ORDER_TYPE_CONFIG).map(([key, config]) => [key, config.type])
|
|
|
)
|
|
|
|
|
|
-/**
|
|
|
- * 订单状态标签类型映射(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @type {Record<number, string>}
|
|
|
- * @deprecated 请使用 @/constants 中的 getOrderStatusTagType 函数
|
|
|
- */
|
|
|
+// 订单状态标签类型映射(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 getOrderStatusTagType 函数
|
|
|
export const ORDER_STATUS_TAG_TYPES = Object.fromEntries(
|
|
|
Object.entries(ORDER_STATUS_CONFIG).map(([key, config]) => [key, config.type])
|
|
|
)
|
|
|
|
|
|
-/**
|
|
|
- * 订单类型选项数组(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @type {Array<{label: string, value: number}>}
|
|
|
- * @deprecated 请使用 @/constants 中的 ORDER_TYPE_OPTIONS
|
|
|
- */
|
|
|
+// 订单类型选项数组(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 ORDER_TYPE_OPTIONS
|
|
|
export { ORDER_TYPE_OPTIONS }
|
|
|
|
|
|
-/**
|
|
|
- * 订单状态选项数组(兼容性别名)
|
|
|
- * @readonly
|
|
|
- * @type {Array<{label: string, value: number}>}
|
|
|
- * @deprecated 请使用 @/constants 中的 ORDER_STATUS_OPTIONS
|
|
|
- */
|
|
|
+// 订单状态选项数组(兼容性别名)
|
|
|
+// @deprecated 请使用 @/constants 中的 ORDER_STATUS_OPTIONS
|
|
|
export { ORDER_STATUS_OPTIONS }
|
|
|
|
|
|
-/**
|
|
|
- * 获取订单类型标签
|
|
|
- * @param {number} orderType - 订单类型值
|
|
|
- * @returns {string} 订单类型标签
|
|
|
- */
|
|
|
+// 获取订单类型标签
|
|
|
export const getOrderTypeLabel = getOrderTypeLabelFromConstants
|
|
|
|
|
|
-/**
|
|
|
- * 获取订单类型标签类型
|
|
|
- * @param {number} orderType - 订单类型值
|
|
|
- * @returns {string} 标签类型
|
|
|
- */
|
|
|
+// 获取订单类型标签类型
|
|
|
export const getOrderTypeTagType = getOrderTypeTagTypeFromConstants
|
|
|
|
|
|
-/**
|
|
|
- * 获取订单状态标签
|
|
|
- * @param {number} status - 订单状态值
|
|
|
- * @returns {string} 订单状态标签
|
|
|
- */
|
|
|
+// 获取订单状态标签
|
|
|
export const getOrderStatusLabel = getOrderStatusLabelFromConstants
|
|
|
|
|
|
-/**
|
|
|
- * 获取订单状态标签类型
|
|
|
- * @param {number} status - 订单状态值
|
|
|
- * @returns {string} 标签类型
|
|
|
- */
|
|
|
+// 获取订单状态标签类型
|
|
|
export const getOrderStatusTagType = getOrderStatusTagTypeFromConstants
|