/** * @fileoverview 订单表单相关常量定义 * @description 定义订单表单组件使用的枚举值和常量 */ /** * 订单类型枚举 * @readonly * @enum {number} */ export const OrderType = { /** 普通订单 */ NORMAL: 1, /** 紧急订单 */ URGENT: 2, /** 预订订单 */ RESERVATION: 3 } /** * 订单状态枚举 * @readonly * @enum {number} */ export const OrderStatus = { /** 草稿 */ DRAFT: 0, /** 待审核 */ PENDING: 1, /** 已审核 */ APPROVED: 2, /** 已发货 */ SHIPPED: 3, /** 已完成 */ COMPLETED: 4, /** 已取消 */ CANCELLED: 5 } /** * 物料明细状态枚举 * @readonly * @enum {string} */ export const MaterialDetailStatus = { /** 待确认 */ PENDING: '0', /** 已确认 */ CONFIRMED: '1', /** 已取消 */ CANCELLED: '2' } /** * 订单类型选项列表 * @type {Array<{label: string, value: number}>} */ export const ORDER_TYPE_OPTIONS = [ { label: '普通订单', value: OrderType.NORMAL }, { label: '紧急订单', value: OrderType.URGENT }, { label: '预订订单', value: OrderType.RESERVATION } ] /** * 订单状态选项列表 * @type {Array<{label: string, value: number}>} */ export const ORDER_STATUS_OPTIONS = [ { label: '草稿', value: OrderStatus.DRAFT }, { label: '待审核', value: OrderStatus.PENDING }, { label: '已审核', value: OrderStatus.APPROVED }, { label: '已发货', value: OrderStatus.SHIPPED }, { label: '已完成', value: OrderStatus.COMPLETED }, { label: '已取消', value: OrderStatus.CANCELLED } ] /** * 默认分页配置 * @description 通用的AvueJS分页配置,可在多个组件中复用 * @type {Object} */ export const DEFAULT_PAGINATION_CONFIG = { pageSize: 10, pageSizes: [5, 10, 20, 50], layout: 'total, sizes, prev, pager, next, jumper' } /** * 物料明细状态选项列表 * @type {Array<{label: string, value: string}>} */ export const MATERIAL_DETAIL_STATUS_OPTIONS = [ { label: '待确认', value: MaterialDetailStatus.PENDING }, { label: '已确认', value: MaterialDetailStatus.CONFIRMED }, { label: '已取消', value: MaterialDetailStatus.CANCELLED } ]