import { ICrmApp } from "../CrmApp"; import { OrderKind } from "../dto/order/OrderKind"; import { OrderDeliveryKind } from "../dto/orderDelivery/OrderDeliveryKind"; import { OrderPaymentKind } from "../dto/orderPayment/OrderPaymentKind"; import { QueryForPurchaseData } from "../dto/product/QueryForPurchaseData"; import { QueryForSaleData } from "../dto/product/QueryForSaleData"; import { PromotionCodeCalculation, PromotionOrderLine } from "../dto/promotion/PromotionCode"; import { PromotionItem } from "../dto/promotion/PromotionItem"; /** * Order utils * 订单工具类 */ export declare namespace OrderUtils { /** * Calculate promotions * 计算促销 * @param promotions Promotions * @param totalAmount Total amount, default is the line amount, for product level promotion, it should be the line amount; for order level promotion, it should be the order total amount * @param sale Sale item * @param onUpdate When promotion pushed * @returns Result */ function calculatePromotions(promotions: PromotionItem[], totalAmount?: number, sale?: PromotionOrderLine, onUpdate?: (promotion: PromotionItem, result: PromotionCodeCalculation) => void): PromotionCodeCalculation[]; } /** * Order * 订单 */ export declare class Order { private crm; constructor(crm: ICrmApp); /** * Get order delivery kind label * 获取订单配送方式标签 * @param delivery Delivery kind * @returns Result */ getDeliveryKind(delivery?: OrderDeliveryKind): string | undefined; /** * Get order delivery kinds * 获取订单配送方式 */ getDeliveryKinds(): import("@etsoo/shared").ListType[]; /** * Get kind label * 获取类型标签 * @param kind Kind * @returns Result */ getKind(kind?: OrderKind): string | undefined; /** * Get order kinds * 获取订单类型 */ getKinds(): import("@etsoo/shared").ListType[]; /** * Get modifiers * 获取定制选项 * @param data Modifiers data */ getModifiers(data?: Record): string | undefined; /** * Get modifier SN * 获取定制选项中的唯一编号 * @param data Modifiers data */ getModifierSn(data?: Record): string | undefined; /** * Get order payment kind label * 获取订单付款方式标签 * @param payment Payment kind * @returns Result */ getPaymentKind(payment?: OrderPaymentKind): string | undefined; /** * Get order payment kinds * 获取订单付款方式 */ getPaymentKinds(): import("@etsoo/shared").ListType[]; /** * Get price for sale * 获取销售价格 * @param data Sale data * @returns Result */ getPrice(data: QueryForSaleData): number; /** * Get price for purchase * 获取采购价格 * @param data Purchase data * @returns Result */ getPOPrice(data: QueryForPurchaseData): number | undefined; }