@pisell/pisellos 2.2.323 → 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/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 +6 -2
- 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 +39 -5
- package/dist/solution/BaseSales/index.js +1828 -1462
- package/dist/solution/BaseSales/types.d.ts +1 -0
- package/dist/solution/BaseSales/types.js +1 -0
- package/dist/solution/BookingByStep/index.d.ts +17 -3
- 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 +15 -3
- 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 +3374 -1177
- 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/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 +6 -2
- 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 +39 -5
- package/lib/solution/BaseSales/index.js +212 -18
- package/lib/solution/BaseSales/types.d.ts +1 -0
- package/lib/solution/BaseSales/types.js +1 -0
- package/lib/solution/BookingByStep/index.d.ts +17 -3
- 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 +15 -3
- 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 +1316 -73
- 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,10 +1,11 @@
|
|
|
1
1
|
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
2
|
import { BaseModule } from '../BaseModule';
|
|
3
|
-
import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
|
|
3
|
+
import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
|
|
4
4
|
import { CartItem } from '../Cart/types';
|
|
5
5
|
import { type SubmitPayloadEnhancer } from './utils';
|
|
6
6
|
import { type PickupTimingBooking, type PickupTimingBookingInput } from './pickupTiming';
|
|
7
|
-
import
|
|
7
|
+
import { type ProductVoucherGroup } from './utils/productVoucherGroups';
|
|
8
|
+
import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, ReplaceBookingProductWithRelatedRetailParams, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, OrderHooksConfig, OrderCartIntentCommitContext, ReplaceTempOrderOptions, HydrateTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, PointCardSnapshotMergeContext, PointCardSnapshotItem, ShopServiceData, ShopServiceType } from './types';
|
|
8
9
|
import type { ICustomer } from '../AccountList/types';
|
|
9
10
|
import type { Discount } from '../Discount/types';
|
|
10
11
|
import { UnavailableReason } from '../Rules/types';
|
|
@@ -21,6 +22,10 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
21
22
|
private openCache;
|
|
22
23
|
private sessionStoragePersistEnabled;
|
|
23
24
|
private sessionStorageRestoreRecord;
|
|
25
|
+
private orderSessionId;
|
|
26
|
+
private orderSessionDestroyed;
|
|
27
|
+
private orderSessionAliases;
|
|
28
|
+
private orderReplacement;
|
|
24
29
|
/** 只允许当前订单最新的 prepare/config 请求回写客户资产态。 */
|
|
25
30
|
private customerWalletPrepareConfigEpoch;
|
|
26
31
|
/** Payment 可能早于 prepare/config 返回;先按实例 ID 暂存卡号等待 Snapshot。 */
|
|
@@ -29,6 +34,12 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
29
34
|
private rulesHooksOverride?;
|
|
30
35
|
private moduleHooksOverride?;
|
|
31
36
|
private orderHooks?;
|
|
37
|
+
private cartCommandQueue;
|
|
38
|
+
private queueCartCommand;
|
|
39
|
+
/** Use the exact Order normalizers/merge rules on a private draft, not a second projection. */
|
|
40
|
+
private beginCartMutation;
|
|
41
|
+
/** Serializes checkout preparation with local cart commands; hydration remains outside this guard. */
|
|
42
|
+
prepareCheckout<T>(prepare: (items: OrderProduct[]) => Promise<T>): Promise<T>;
|
|
32
43
|
private otherParams?;
|
|
33
44
|
/** 评估器引用;由 SalesSdkProvider 注入,未注入时 applyPromotion 静默跳过 */
|
|
34
45
|
private promotionEvaluator;
|
|
@@ -66,7 +77,11 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
66
77
|
* @example
|
|
67
78
|
* orderModule.updateOtherParams({ cacheId: 'cache-2', channel: 'pos' });
|
|
68
79
|
*/
|
|
69
|
-
updateOtherParams(params: Record<string, any
|
|
80
|
+
updateOtherParams(params: Record<string, any>, options?: {
|
|
81
|
+
hooks?: OrderHooksConfig;
|
|
82
|
+
changedParams?: Record<string, any>;
|
|
83
|
+
cover?: boolean;
|
|
84
|
+
}): void;
|
|
70
85
|
/** Internal intent boundary shared with asynchronous scanner/detail flows. */
|
|
71
86
|
createCartIntentCommitGuard(action: OrderCartIntentCommitContext['action'], tempOrder?: OrderTempOrder | null): () => void;
|
|
72
87
|
/** PC/H5 属于在线店铺;其它或缺失平台统一沿用 POS 行为。 */
|
|
@@ -84,6 +99,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
84
99
|
*/
|
|
85
100
|
private logError;
|
|
86
101
|
private registerDiscountModules;
|
|
102
|
+
setProductVoucherGroups(groups: ProductVoucherGroup[]): void;
|
|
103
|
+
validateProductVoucherSelection(): void;
|
|
87
104
|
private createDefaultRulesHooks;
|
|
88
105
|
/**
|
|
89
106
|
* Stable across notifyTempOrderChanged's immutable copy, but changes when a
|
|
@@ -102,7 +119,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
102
119
|
getCustomerWalletPrepareConfigEpoch(): number;
|
|
103
120
|
private syncScannedDiscountsToOriginalDiscountList;
|
|
104
121
|
private ensureEditDiscountConfigForProductChange;
|
|
105
|
-
scanCode(code: string, customerId?: number
|
|
122
|
+
scanCode(code: string, customerId?: number, options?: {
|
|
123
|
+
productVouchersOnly?: boolean;
|
|
124
|
+
}): Promise<{
|
|
106
125
|
isAvailable: boolean;
|
|
107
126
|
isAccepted?: boolean;
|
|
108
127
|
discountList: Discount[];
|
|
@@ -190,6 +209,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
190
209
|
clearSessionStoragePersistedTempOrder(): void;
|
|
191
210
|
consumeSessionStorageRestore(): Record<string, any> | null;
|
|
192
211
|
notifyTempOrderChanged(): void;
|
|
212
|
+
private getOrderSessionAliases;
|
|
213
|
+
private publishOrderSession;
|
|
214
|
+
getOrderSessionId(): string | null;
|
|
215
|
+
isOrderSessionCurrent(sessionId: string): boolean;
|
|
216
|
+
private beginOrderReplacement;
|
|
217
|
+
private assertOrderReplacementCurrent;
|
|
218
|
+
private completeOrderReplacement;
|
|
219
|
+
private rollbackOrderReplacement;
|
|
193
220
|
private createDefaultTempOrderInstance;
|
|
194
221
|
private clearTempOrderCustomerWalletSnapshots;
|
|
195
222
|
private clearCustomerWalletState;
|
|
@@ -216,6 +243,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
216
243
|
private calculatePaymentTotal;
|
|
217
244
|
private calculateOrderPaidPaymentTotal;
|
|
218
245
|
private getDepositAmount;
|
|
246
|
+
private isDepositSelectionDisabled;
|
|
247
|
+
/** Cap only the active target; product rules, manual intent and saved snapshots stay raw. */
|
|
248
|
+
private applyEffectiveDepositSummary;
|
|
219
249
|
private normalizeDepositAmount;
|
|
220
250
|
private normalizeDepositFlag;
|
|
221
251
|
private getHistoricalDepositSnapshot;
|
|
@@ -482,6 +512,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
482
512
|
* // → tempOrder.products 新增 3 行,每行 num=1,bookings 3 条
|
|
483
513
|
*/
|
|
484
514
|
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<OrderProduct[]>;
|
|
515
|
+
private addProductToOrderDraft;
|
|
516
|
+
/**
|
|
517
|
+
* Replaces one local Party booking and its confirmed children on a detached draft.
|
|
518
|
+
* All fallible preparation precedes a guarded synchronous publication; never rolls
|
|
519
|
+
* an old whole-order snapshot over concurrent edits or a newly selected order.
|
|
520
|
+
*/
|
|
521
|
+
replaceBookingProductWithRelatedRetail(params: ReplaceBookingProductWithRelatedRetailParams): Promise<OrderProduct[]>;
|
|
522
|
+
private replaceBookingProductWithRelatedRetailDraft;
|
|
485
523
|
/**
|
|
486
524
|
* 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
|
|
487
525
|
*
|
|
@@ -497,6 +535,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
497
535
|
}>, options?: {
|
|
498
536
|
skipEditDiscountConfigRefresh?: boolean;
|
|
499
537
|
}): Promise<OrderProduct[]>;
|
|
538
|
+
private addProductsToOrderDraft;
|
|
500
539
|
private getFullCoveragePassDiscounts;
|
|
501
540
|
private hasEntitlementPassDiscount;
|
|
502
541
|
private hasGoodPassDiscount;
|
|
@@ -508,10 +547,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
508
547
|
private isRestrictedCartProductUpdate;
|
|
509
548
|
private applyOrderProductUpdateToTempOrder;
|
|
510
549
|
updateOrderProduct(params: UpdateOrderProductParams): Promise<OrderProduct[]>;
|
|
511
|
-
|
|
550
|
+
private updateOrderProductDraft;
|
|
551
|
+
updateOrderProducts(paramsList: UpdateOrderProductParams[], options?: UpdateOrderProductsOptions): Promise<OrderProduct[]>;
|
|
552
|
+
private updateOrderProductsDraft;
|
|
553
|
+
private updateOrderProductsGuarded;
|
|
512
554
|
updateOrderProductQuantity(params: UpdateOrderProductQuantityParams, options?: {
|
|
513
555
|
isCurrentOrder?: () => boolean;
|
|
514
556
|
}): Promise<OrderProduct[]>;
|
|
557
|
+
private updateOrderProductQuantityDraft;
|
|
515
558
|
updateOrderBooking(params: UpdateOrderBookingParams): any[];
|
|
516
559
|
/**
|
|
517
560
|
* 商品行写路径收尾:促销 → 折扣 → 清洗 → summary → 持久化。
|
|
@@ -528,12 +571,14 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
528
571
|
* await order.removeProductsFromOrder([identityA, identityB]);
|
|
529
572
|
*/
|
|
530
573
|
removeProductsFromOrder(identities: OrderProductIdentity[], options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
|
|
574
|
+
private removeProductsFromOrderDraft;
|
|
531
575
|
removeProductFromOrder(identity: OrderProductIdentity, options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
|
|
532
576
|
/**
|
|
533
|
-
*
|
|
577
|
+
* 清空购物车行(products / bookings)及整单折扣,不重置整单。
|
|
534
578
|
* 普通整单 note 保持不变;以商品行为主体的 Sales Notes 同步删除。
|
|
535
579
|
*/
|
|
536
580
|
clearOrderCartLines(): Promise<OrderTempOrder>;
|
|
581
|
+
private clearOrderCartLinesDraft;
|
|
537
582
|
/**
|
|
538
583
|
* 切换购物车结算单位时清理所有会影响新币种的订单状态,但保留当前客户。
|
|
539
584
|
*/
|
|
@@ -644,10 +689,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
644
689
|
* 数据源应尽量返回 tempOrder 所需结构;这里仅做 SDK 运行必须字段兜底,
|
|
645
690
|
* 例如数组字段、商品行唯一值、价格 metadata、summary 派生状态和 _extend。
|
|
646
691
|
*/
|
|
647
|
-
hydrateTempOrderFromRecord(record: Record<string, any>, options?:
|
|
648
|
-
|
|
649
|
-
source?: 'salesDetail' | 'mergedSalesDetail' | 'sessionStorage';
|
|
650
|
-
}): Promise<OrderTempOrder>;
|
|
692
|
+
hydrateTempOrderFromRecord(record: Record<string, any>, options?: HydrateTempOrderOptions): Promise<OrderTempOrder>;
|
|
693
|
+
private prepareHydratedTempOrder;
|
|
651
694
|
/**
|
|
652
695
|
* 兼容后端详情将 holder 放在 metadata.holder 的历史形态,统一补到运行时展示路径。
|
|
653
696
|
*
|
|
@@ -673,6 +716,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
673
716
|
getOrderInfo(order_id: number): Promise<any>;
|
|
674
717
|
getVouchers(): any[];
|
|
675
718
|
}
|
|
676
|
-
export type { OrderHolderRelation, AddProductToOrderOptions, OrderMetaList, PointCardSnapshotItem, VirtualCurrencySnapshotItem, RemoveProductsFromOrderOptions, SalesNote, SalesNoteDraftInput, SalesNoteLocalizedSelection, SalesNoteLocalizedText, SalesNoteRelation, SalesNoteTextInput, SetSalesNoteInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
|
|
719
|
+
export type { OrderHolderRelation, AddProductToOrderOptions, OrderMetaList, PointCardSnapshotItem, VirtualCurrencySnapshotItem, RemoveProductsFromOrderOptions, SalesNote, SalesNoteDraftInput, SalesNoteLocalizedSelection, SalesNoteLocalizedText, SalesNoteRelation, SalesNoteTextInput, SetSalesNoteInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, UpdateOrderProductQuantityParams, } from './types';
|
|
677
720
|
export { isFulfillmentTimingBooking } from './pickupTiming';
|
|
678
721
|
export type { PickupTimingBooking, PickupTimingBookingInput, PickupTimingBookingMetadata, PickupTimingSelectionMode, PickupTimingSource, } from './pickupTiming';
|