@pisell/pisellos 2.2.322 → 2.2.324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/inventory/index.d.ts +92 -0
- package/dist/inventory/index.js +509 -0
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/modules/BookingContext/index.d.ts +2 -2
- package/dist/modules/BookingContext/index.js +55 -25
- package/dist/modules/BookingContext/types.d.ts +2 -0
- package/dist/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
- package/dist/modules/BookingContext/utils/calendarBooking.js +207 -0
- package/dist/modules/BookingContext/utils/index.d.ts +1 -0
- package/dist/modules/BookingContext/utils/index.js +1 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +20 -1
- package/dist/modules/BookingContext/utils/productExtend.js +122 -29
- package/dist/modules/Date/index.d.ts +1 -1
- package/dist/modules/Date/index.js +60 -14
- package/dist/modules/Date/types.d.ts +5 -0
- package/dist/modules/Discount/index.js +1 -0
- package/dist/modules/OpenData/index.d.ts +1 -0
- package/dist/modules/OpenData/index.js +1 -0
- package/dist/modules/OpenData/salesSettings.d.ts +32 -0
- package/dist/modules/OpenData/salesSettings.js +80 -0
- package/dist/modules/OpenData/types.d.ts +16 -0
- package/dist/modules/OpenData/utils.d.ts +1 -1
- package/dist/modules/OpenData/utils.js +3 -2
- package/dist/modules/Order/index.d.ts +54 -11
- package/dist/modules/Order/index.js +2699 -1411
- package/dist/modules/Order/types.d.ts +43 -5
- package/dist/modules/Order/types.js +4 -0
- package/dist/modules/Order/unpaidAmountGap.d.ts +6 -0
- package/dist/modules/Order/unpaidAmountGap.js +72 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.js +2 -2
- package/dist/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/dist/modules/Order/utils/productVoucherGroups.js +115 -0
- package/dist/modules/Order/utils.d.ts +3 -1
- package/dist/modules/Order/utils.js +18 -3
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/Product/types.d.ts +5 -0
- package/dist/modules/ProductList/clientDataVariants.js +6 -2
- package/dist/modules/ProductList/index.d.ts +2 -0
- package/dist/modules/ProductList/index.js +161 -51
- package/dist/modules/ResourcePlanner/planner.js +58 -2
- package/dist/modules/ResourcePlanner/types.d.ts +13 -0
- package/dist/modules/Rules/index.d.ts +2 -0
- package/dist/modules/Rules/index.js +58 -39
- package/dist/modules/Schedule/index.d.ts +7 -1
- package/dist/modules/Schedule/index.js +155 -39
- package/dist/modules/Schedule/types.d.ts +2 -0
- package/dist/modules/bookingReadValidation.d.ts +6 -0
- package/dist/modules/bookingReadValidation.js +72 -0
- package/dist/plugins/request.d.ts +2 -0
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.js +1312 -1154
- package/dist/server/modules/order/index.js +2 -1
- package/dist/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
- package/dist/shared/receipt/customerInvoiceLanguages.js +5 -3
- package/dist/shared/receipt/small-ticket.d.ts +4 -0
- package/dist/shared/receipt/small-ticket.js +70 -12
- package/dist/solution/BaseSales/index.d.ts +40 -5
- package/dist/solution/BaseSales/index.js +1939 -1484
- package/dist/solution/BaseSales/types.d.ts +4 -0
- package/dist/solution/BaseSales/types.js +1 -0
- package/dist/solution/BaseSales/utils/posDurationPricing.d.ts +21 -0
- package/dist/solution/BaseSales/utils/posDurationPricing.js +174 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +2 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +8 -8
- package/dist/solution/BookingByStep/index.d.ts +16 -2
- package/dist/solution/BookingByStep/index.js +676 -361
- package/dist/solution/BookingByStep/utils/resources.d.ts +10 -0
- package/dist/solution/BookingByStep/utils/resources.js +117 -76
- package/dist/solution/BookingTicket/index.d.ts +2 -2
- package/dist/solution/BookingTicket/index.js +249 -135
- package/dist/solution/BookingTicket/types.d.ts +14 -2
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.js +39 -11
- package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
- package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.js +188 -0
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +8 -0
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +88 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -1
- package/dist/solution/OrderInvoicePreview/index.js +14 -8
- package/dist/solution/ScanOrder/index.d.ts +2 -0
- package/dist/solution/ScanOrder/index.js +166 -67
- package/dist/solution/ScanOrder/menuAvailability.d.ts +24 -0
- package/dist/solution/ScanOrder/menuAvailability.js +363 -0
- package/dist/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
- package/dist/solution/UnifiedBookingSales/catalogQueryBatch.js +202 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +96 -4
- package/dist/solution/UnifiedBookingSales/index.js +3391 -1176
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +4 -0
- package/dist/solution/UnifiedBookingSales/salesSettings.d.ts +16 -0
- package/dist/solution/UnifiedBookingSales/salesSettings.js +81 -0
- package/dist/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
- package/dist/solution/UnifiedBookingSales/sessionResourceCache.js +271 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +71 -2
- package/dist/solution/UnifiedBookingSales/types.js +7 -1
- package/dist/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
- package/dist/solution/UnifiedBookingSales/venueCatalogSession.js +283 -0
- package/dist/utils/platform.d.ts +2 -0
- package/dist/utils/platform.js +6 -0
- package/dist/utils/pos-receipt-auto-print.d.ts +4 -0
- package/dist/utils/pos-receipt-auto-print.js +14 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/lib/inventory/index.d.ts +92 -0
- package/lib/inventory/index.js +287 -0
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/BookingContext/index.d.ts +2 -2
- package/lib/modules/BookingContext/index.js +42 -10
- package/lib/modules/BookingContext/types.d.ts +2 -0
- package/lib/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
- package/lib/modules/BookingContext/utils/calendarBooking.js +156 -0
- package/lib/modules/BookingContext/utils/index.d.ts +1 -0
- package/lib/modules/BookingContext/utils/index.js +11 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +20 -1
- package/lib/modules/BookingContext/utils/productExtend.js +96 -7
- package/lib/modules/Date/index.d.ts +1 -1
- package/lib/modules/Date/index.js +28 -5
- package/lib/modules/Date/types.d.ts +5 -0
- package/lib/modules/Discount/index.js +1 -0
- package/lib/modules/OpenData/index.d.ts +1 -0
- package/lib/modules/OpenData/index.js +12 -0
- package/lib/modules/OpenData/salesSettings.d.ts +32 -0
- package/lib/modules/OpenData/salesSettings.js +70 -0
- package/lib/modules/OpenData/types.d.ts +16 -0
- package/lib/modules/OpenData/utils.d.ts +1 -1
- package/lib/modules/OpenData/utils.js +3 -2
- package/lib/modules/Order/index.d.ts +54 -11
- package/lib/modules/Order/index.js +659 -80
- package/lib/modules/Order/types.d.ts +43 -5
- package/lib/modules/Order/types.js +2 -0
- package/lib/modules/Order/unpaidAmountGap.d.ts +6 -0
- package/lib/modules/Order/unpaidAmountGap.js +60 -0
- package/lib/modules/Order/utils/discountProductLineIdentity.js +1 -1
- package/lib/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/lib/modules/Order/utils/productVoucherGroups.js +64 -0
- package/lib/modules/Order/utils.d.ts +3 -1
- package/lib/modules/Order/utils.js +19 -2
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Product/types.d.ts +5 -0
- package/lib/modules/ProductList/clientDataVariants.js +6 -2
- package/lib/modules/ProductList/index.d.ts +2 -0
- package/lib/modules/ProductList/index.js +74 -0
- package/lib/modules/ResourcePlanner/planner.js +52 -1
- package/lib/modules/ResourcePlanner/types.d.ts +13 -0
- package/lib/modules/Rules/index.d.ts +2 -0
- package/lib/modules/Rules/index.js +25 -9
- package/lib/modules/Schedule/index.d.ts +7 -1
- package/lib/modules/Schedule/index.js +68 -4
- package/lib/modules/Schedule/types.d.ts +2 -0
- package/lib/modules/bookingReadValidation.d.ts +6 -0
- package/lib/modules/bookingReadValidation.js +56 -0
- package/lib/plugins/request.d.ts +2 -0
- package/lib/server/index.d.ts +5 -0
- package/lib/server/index.js +124 -16
- package/lib/server/modules/order/index.js +2 -1
- package/lib/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
- package/lib/shared/receipt/customerInvoiceLanguages.js +5 -3
- package/lib/shared/receipt/small-ticket.d.ts +4 -0
- package/lib/shared/receipt/small-ticket.js +63 -8
- package/lib/solution/BaseSales/index.d.ts +40 -5
- package/lib/solution/BaseSales/index.js +296 -43
- package/lib/solution/BaseSales/types.d.ts +4 -0
- package/lib/solution/BaseSales/types.js +1 -0
- package/lib/solution/BaseSales/utils/posDurationPricing.d.ts +21 -0
- package/lib/solution/BaseSales/utils/posDurationPricing.js +133 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +2 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/lib/solution/BookingByStep/index.d.ts +16 -2
- package/lib/solution/BookingByStep/index.js +222 -14
- package/lib/solution/BookingByStep/utils/resources.d.ts +10 -0
- package/lib/solution/BookingByStep/utils/resources.js +25 -15
- package/lib/solution/BookingTicket/index.d.ts +2 -2
- package/lib/solution/BookingTicket/index.js +47 -4
- package/lib/solution/BookingTicket/types.d.ts +14 -2
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +37 -6
- package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
- package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.js +136 -0
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +8 -0
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +54 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -1
- package/lib/solution/OrderInvoicePreview/index.js +7 -1
- package/lib/solution/ScanOrder/index.d.ts +2 -0
- package/lib/solution/ScanOrder/index.js +72 -2
- package/lib/solution/ScanOrder/menuAvailability.d.ts +24 -0
- package/lib/solution/ScanOrder/menuAvailability.js +203 -0
- package/lib/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
- package/lib/solution/UnifiedBookingSales/catalogQueryBatch.js +109 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +96 -4
- package/lib/solution/UnifiedBookingSales/index.js +1339 -74
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +2 -0
- package/lib/solution/UnifiedBookingSales/salesSettings.d.ts +16 -0
- package/lib/solution/UnifiedBookingSales/salesSettings.js +72 -0
- package/lib/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
- package/lib/solution/UnifiedBookingSales/sessionResourceCache.js +199 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +71 -2
- package/lib/solution/UnifiedBookingSales/types.js +4 -1
- package/lib/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
- package/lib/solution/UnifiedBookingSales/venueCatalogSession.js +155 -0
- package/lib/utils/platform.d.ts +2 -0
- package/lib/utils/platform.js +7 -0
- package/lib/utils/pos-receipt-auto-print.d.ts +4 -0
- package/lib/utils/pos-receipt-auto-print.js +13 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InventoryController, type CheckoutRuntimeSnapshot } from '../../inventory';
|
|
1
2
|
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
3
|
import { BaseModule } from '../../modules/BaseModule';
|
|
3
4
|
import { type LocalEftposFinalization } from '../../modules/Order/localEftposState';
|
|
@@ -6,12 +7,13 @@ import { OrderModule } from '../../modules/Order';
|
|
|
6
7
|
import { type PickupTimingBookingInput } from '../../modules/Order/pickupTiming';
|
|
7
8
|
import type { PickupTimingAvailability, PickupTimingSelection, PickupTimingValidationResult } from '../../modules/FulfillmentTiming';
|
|
8
9
|
import { type ContactInfoConfig } from '../../modules/OpenData/contactInfo';
|
|
9
|
-
import type { AddProductBookingInput, AddProductToOrderOptions, LoadSalesDetailParams, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, OrderPaymentSource, SendCustomerPayLinkParams, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, UpdateTempOrderCustomerInput, UpdateOrderBookingParams, UpdateOrderProductParams, OrderTempOrder, OrderSummary, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, ReplaceTempOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, ShopServiceData, ShopServiceType } from '../../modules/Order/types';
|
|
10
|
+
import type { AddProductBookingInput, AddProductToOrderOptions, LoadSalesDetailParams, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, OrderPaymentSource, SendCustomerPayLinkParams, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, UpdateTempOrderCustomerInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, OrderTempOrder, OrderSummary, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, ReplaceTempOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, ShopServiceData, ShopServiceType } from '../../modules/Order/types';
|
|
10
11
|
import type { SubmitPayloadEnhancer } from '../../modules/Order/utils';
|
|
11
12
|
import type { Discount, VirtualCurrencyAsset } from '../../modules/Discount/types';
|
|
12
13
|
import { RequestPlugin, WindowPlugin } from '../../plugins';
|
|
13
14
|
export * from './types';
|
|
14
15
|
import { ProductList } from '../../modules/ProductList';
|
|
16
|
+
import { type PosReceiptAutoPrintPaymentStatus } from '../../utils/pos-receipt-auto-print';
|
|
15
17
|
import { PaymentModule } from '../../modules/Payment';
|
|
16
18
|
import type { PaymentMethod, RoundingResult, WalletAssetId, WalletAssetsBehaviorOptions, WalletAssetsSnapshot, WalletAssetsState, WalletAssetSelectionSource, ScanWalletAssetResult } from '../../modules/Payment/types';
|
|
17
19
|
import type { SalesSummaryModule } from '../../modules/SalesSummary';
|
|
@@ -52,6 +54,8 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
52
54
|
protected appPlugin: AppPlugin;
|
|
53
55
|
protected store: BaseSalesState;
|
|
54
56
|
protected otherParams: Record<string, any>;
|
|
57
|
+
getInventory(): InventoryController | undefined;
|
|
58
|
+
prepareCheckout(signal?: AbortSignal): Promise<CheckoutRuntimeSnapshot | undefined>;
|
|
55
59
|
protected cacheId: string | undefined;
|
|
56
60
|
/**
|
|
57
61
|
* 由已在初始化阶段解析过设备短号的业务解决方案写入。
|
|
@@ -66,6 +70,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
66
70
|
request: RequestPlugin;
|
|
67
71
|
protected currentSalesDetail: ISalesDetail | null;
|
|
68
72
|
protected discountConfigCacheKey: string | null;
|
|
73
|
+
private discountConfigPrepareInFlight;
|
|
69
74
|
protected hasManualDiscountSelection: boolean;
|
|
70
75
|
private readonly reusedSharedSubModuleNames;
|
|
71
76
|
private paymentMethodsCache;
|
|
@@ -78,6 +83,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
78
83
|
private salesDetailHydrateQueue;
|
|
79
84
|
private serverOrderChangeUnsubscribe;
|
|
80
85
|
private paymentMethodsChangedUnsubscribe;
|
|
86
|
+
private orderSessionChangedUnsubscribe;
|
|
81
87
|
private serverOrderChangeHydrateInFlight;
|
|
82
88
|
private queuedServerOrderChanges;
|
|
83
89
|
private serverOrderChangeSyncEnabled;
|
|
@@ -112,6 +118,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
112
118
|
private syncCurrentSalesDetailFromServerOrderChange;
|
|
113
119
|
private registerServerOrderChangeSync;
|
|
114
120
|
private registerPaymentMethodsChangeSync;
|
|
121
|
+
private registerOrderSessionChangeSync;
|
|
115
122
|
private hydrateLatestLoadedSalesDetail;
|
|
116
123
|
private hydrateOrderPaymentNames;
|
|
117
124
|
get payment(): PaymentModule | undefined;
|
|
@@ -129,7 +136,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
129
136
|
* /product/query 的智能定价评估只读取 strategy_context;
|
|
130
137
|
* application_code 仅作为接口兼容字段,不能替代 channel / business_code。
|
|
131
138
|
*/
|
|
132
|
-
|
|
139
|
+
protected getPriceQueryStrategyContext(channel?: string): Record<string, any>;
|
|
133
140
|
/**
|
|
134
141
|
* 子类可在商品重报价前准备客户维度的策略上下文,例如等待 Wallet/优惠资产加载。
|
|
135
142
|
*/
|
|
@@ -156,6 +163,12 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
156
163
|
private prepareRawProductForPriceQuery;
|
|
157
164
|
private resolveLocalProductForPriceQuery;
|
|
158
165
|
private loadProductsForPriceQuery;
|
|
166
|
+
/** Opt-in subclasses may supply page-owned raw pools; ordinary sales keep remote fallback. */
|
|
167
|
+
protected isVenueCatalogLocalPricingActive(): boolean;
|
|
168
|
+
protected getVenueCatalogLocalPriceSource(_productId: number, _selectedProduct?: Record<string, any>): {
|
|
169
|
+
product: Record<string, any>;
|
|
170
|
+
menuList: Record<string, any>[];
|
|
171
|
+
} | undefined;
|
|
159
172
|
private resolveProductsForPriceQuery;
|
|
160
173
|
private getAuthoritativeBundleItems;
|
|
161
174
|
private findAuthoritativeBundleItem;
|
|
@@ -187,6 +200,8 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
187
200
|
private getFulfillmentRefMode;
|
|
188
201
|
private getCachedInvoiceLayoutConfig;
|
|
189
202
|
private getCachedInvoiceTemplateSettings;
|
|
203
|
+
/** Only solutions with a current POS business configuration opt into this receipt policy. */
|
|
204
|
+
protected getPosReceiptAutoPrintPaymentStatuses(): PosReceiptAutoPrintPaymentStatus[] | undefined;
|
|
190
205
|
private buildSubmitPayloadEnhancerWithOpenDataConfig;
|
|
191
206
|
/**
|
|
192
207
|
* 工厂入口:根据子模块名实例化对应模块。
|
|
@@ -194,6 +209,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
194
209
|
* 可覆盖此方法并把未识别的 name 委托给 `super.createSubModule(name)`。
|
|
195
210
|
*/
|
|
196
211
|
protected createSubModule(moduleName: string): Module | null;
|
|
212
|
+
private inventoryOrderHooks?;
|
|
197
213
|
protected getSubModuleHooks(moduleName: string): any;
|
|
198
214
|
/**
|
|
199
215
|
* 构造传给 BaseSales 子模块的完整运行态参数,保证初始化和后续同步语义一致。
|
|
@@ -231,7 +247,11 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
231
247
|
private isActiveVirtualSettlementOrder;
|
|
232
248
|
private isHistoricalVirtualSettlementOrder;
|
|
233
249
|
private syncAppDataToTempOrder;
|
|
250
|
+
private initialization?;
|
|
251
|
+
/** Hosts can await readiness without changing Core's synchronous registration API. */
|
|
252
|
+
whenInitialized(): Promise<void>;
|
|
234
253
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
254
|
+
private initializeSalesRuntime;
|
|
235
255
|
destroy(): Promise<void>;
|
|
236
256
|
/**
|
|
237
257
|
* 加载销售订单到统一 tempOrder 工作区。
|
|
@@ -256,6 +276,8 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
256
276
|
/** 获取附加费用(运费/服务费/税费等)。 */
|
|
257
277
|
getSurcharges(): ISalesSurcharge[];
|
|
258
278
|
getTempOrder(): OrderTempOrder | null;
|
|
279
|
+
getOrderSessionId(): string | null;
|
|
280
|
+
isOrderSessionCurrent(sessionId: string): boolean;
|
|
259
281
|
replaceTempOrder(tempOrder: OrderTempOrder, options?: ReplaceTempOrderOptions): Promise<OrderTempOrder>;
|
|
260
282
|
getOrderIdentity(): import("../../modules/Order/types").OrderIdentitySnapshot | null;
|
|
261
283
|
getOrderSnapshot(): import("../../modules/Order/types").OrderSnapshot | null;
|
|
@@ -294,7 +316,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
294
316
|
saveDraft(): Promise<void>;
|
|
295
317
|
restoreOrder(): Promise<OrderTempOrder>;
|
|
296
318
|
/**
|
|
297
|
-
*
|
|
319
|
+
* 清空 tempOrder 购物车行(products / bookings / discount_list)及整单折扣。
|
|
298
320
|
* 同步清空内存中的 salesDetail 商品/预约视图,避免编辑态仍读到旧 bookings。
|
|
299
321
|
*/
|
|
300
322
|
clearOrderCartLines(): Promise<OrderTempOrder>;
|
|
@@ -340,7 +362,9 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
340
362
|
discountList: Discount[];
|
|
341
363
|
originalDiscountList?: Discount[];
|
|
342
364
|
}): Promise<void>;
|
|
343
|
-
scanPromotionCode(code: string, customerId?: number
|
|
365
|
+
scanPromotionCode(code: string, customerId?: number, options?: {
|
|
366
|
+
productVouchersOnly?: boolean;
|
|
367
|
+
}): Promise<BaseSalesScanCodeResult>;
|
|
344
368
|
setDiscountSelected(params: {
|
|
345
369
|
discountId: number;
|
|
346
370
|
isSelected: boolean;
|
|
@@ -520,14 +544,25 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
520
544
|
submitBeforeSend?: boolean;
|
|
521
545
|
}): Promise<T>;
|
|
522
546
|
transformBaseProductToOrderProduct(params: TransformBaseProductToOrderProductParams): import("./utils/transformBaseProductToOrderProduct").BaseProductOrderProductInput | null;
|
|
547
|
+
/** Explicit pool source avoids races between two simultaneous Venue pricing contexts. */
|
|
548
|
+
protected calculateVenueCatalogProductBookingPrice(params: BaseSalesCalculateProductBookingPriceParams, source: {
|
|
549
|
+
product: Record<string, any>;
|
|
550
|
+
menuList: Record<string, any>[];
|
|
551
|
+
}): Promise<BaseSalesProductBookingPriceResult>;
|
|
523
552
|
calculateProductBookingPrice(params: BaseSalesCalculateProductBookingPriceParams): Promise<BaseSalesProductBookingPriceResult>;
|
|
524
553
|
getQuotationCustomerScopeInfo(): BaseSalesQuotationCustomerScopeInfo;
|
|
525
554
|
private hasSmartPricingStrategies;
|
|
526
555
|
shouldRecalculateProductBookingPricesForContextChange(params: BaseSalesPriceRecalculationContextChange): boolean;
|
|
556
|
+
private resolveProductBookingPriceGroups;
|
|
527
557
|
calculateProductBookingPrices(paramsList: BaseSalesCalculateProductBookingPriceParams[]): Promise<BaseSalesProductBookingPriceResult[]>;
|
|
558
|
+
setProductVoucherGroups(groups: Array<{
|
|
559
|
+
key: string;
|
|
560
|
+
discountIds: Array<number | string>;
|
|
561
|
+
}>): void;
|
|
562
|
+
validateProductVoucherSelection(): void;
|
|
528
563
|
addProductToOrder(product: Partial<BaseSalesOrderProduct> & BaseSalesOrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
529
564
|
updateOrderProduct(params: UpdateOrderProductParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
530
|
-
updateOrderProducts(paramsList: UpdateOrderProductParams[]): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
565
|
+
updateOrderProducts(paramsList: UpdateOrderProductParams[], options?: UpdateOrderProductsOptions): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
531
566
|
updateOrderProductQuantity(params: BaseSalesUpdateOrderProductQuantityParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
532
567
|
updateOrderBooking(params: UpdateOrderBookingParams): any[];
|
|
533
568
|
/**
|