interface CartItem { price: number | string; quantity?: number; [k: string]: any; } interface PriceDetail { subtotal: string; total: string; taxTitle?: string; totalTaxFee?: string; isPriceIncludeTax?: 0 | 1; taxRate?: number; surcharge?: any; deposit?: { total: string; protocols: any[]; hasDeposit: boolean; }; } /** * 计算商品小计(不含其他费用) * @param items - 购物车商品数组 * @returns 商品总价字符串,保留2位小数 */ export declare const calculateSubtotal: (items: CartItem[]) => string; /** * @description: 将购物车数据格式化成summaryModule需要的格式 * @param {any} items 购物车数据 * @return {*} */ export declare const formatCartsToSummaryModule: (items: any[]) => any[]; /** * @title: 单个商品的税费 * @description: * 单个商品的税费 = 商品销售单价(折扣后) * 税率 * is_charge_tax /( 1+ 税率 * is_price_include_tax) * $taxFee = $price * $taxRate * $isChargeTax / (1 + $taxRate * $isPriceIncludeTax); * @return {*} * @Author: xiangfeng.xue */ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[], summaryModule: any) => any; /** * 计算所有价格明细 * @param items - 购物车商品数组 * @param options - 其他费用配置 * @returns 价格明细对象 */ export declare const calculatePriceDetails: (shopInfo: any, items: CartItem[], summaryModule: any) => PriceDetail; /** * @title: 计算定金 * @param items - 购物车商品数组 * @returns 定金字符串,保留2位小数 */ export declare const calculateDeposit: (items: CartItem[]) => { total: string; protocols: any[]; hasDeposit: never; } | undefined; export {};