@pisell/pisellos 2.2.175 → 2.2.176
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/modules/BookingContext/index.d.ts +37 -0
- package/dist/modules/BookingContext/index.js +436 -0
- package/dist/modules/BookingContext/types.d.ts +102 -0
- package/dist/modules/BookingContext/types.js +51 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +193 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +137 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +75 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +215 -0
- package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/dist/modules/BookingContext/utils/flexible.js +56 -0
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/dist/modules/BookingContext/utils/formatResourceList.js +38 -0
- package/dist/modules/BookingContext/utils/index.d.ts +11 -0
- package/dist/modules/BookingContext/utils/index.js +11 -0
- package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/dist/modules/BookingContext/utils/noResource.js +77 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/dist/modules/BookingContext/utils/productExtend.js +339 -0
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/dist/modules/BookingContext/utils/resourceErrors.js +74 -0
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/dist/modules/BookingContext/utils/resourceSelection.js +24 -0
- package/dist/modules/BookingContext/utils/resources.d.ts +80 -0
- package/dist/modules/BookingContext/utils/resources.js +486 -0
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/dist/modules/BookingContext/utils/serviceTimes.js +151 -0
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/dist/modules/BookingContext/utils/timeSlices.js +100 -0
- package/dist/modules/Customer/index.d.ts +6 -0
- package/dist/modules/Customer/index.js +129 -83
- package/dist/modules/Customer/types.d.ts +2 -0
- package/dist/modules/Discount/index.d.ts +2 -4
- package/dist/modules/Discount/index.js +8 -93
- package/dist/modules/Discount/types.d.ts +1 -7
- package/dist/modules/Order/index.d.ts +84 -17
- package/dist/modules/Order/index.js +1239 -495
- package/dist/modules/Order/types.d.ts +198 -18
- package/dist/modules/Order/types.js +31 -0
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/dist/modules/Order/utils/manualProductDiscount.js +212 -0
- package/dist/modules/Order/utils.d.ts +50 -1
- package/dist/modules/Order/utils.js +261 -31
- package/dist/modules/Quotation/index.d.ts +0 -1
- package/dist/modules/Quotation/index.js +23 -21
- package/dist/modules/Rules/index.d.ts +4 -0
- package/dist/modules/Rules/index.js +26 -10
- package/dist/modules/SalesSummary/index.js +4 -2
- package/dist/modules/SalesSummary/utils.js +3 -3
- package/dist/modules/Schedule/index.js +6 -2
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +2 -1
- package/dist/server/index.js +87 -29
- package/dist/server/modules/order/utils/filterOrders.js +20 -6
- package/dist/server/modules/products/index.d.ts +1 -1
- package/dist/server/modules/products/index.js +130 -113
- package/dist/server/modules/schedule/index.js +13 -6
- package/dist/solution/BaseSales/index.d.ts +89 -7
- package/dist/solution/BaseSales/index.js +1484 -365
- package/dist/solution/BaseSales/types.d.ts +67 -1
- package/dist/solution/BaseSales/types.js +3 -1
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +275 -0
- package/dist/solution/BaseSales/utils/cartPromotion.js +1258 -0
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +7 -0
- package/dist/solution/BaseSales/utils/quotationPrice.js +237 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +68 -16
- package/dist/solution/BaseSales/utils.js +46 -8
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +133 -1
- package/dist/solution/BookingTicket/index.js +780 -175
- package/dist/solution/BookingTicket/types.d.ts +2 -0
- package/dist/solution/BookingTicket/types.js +3 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +113 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +346 -0
- package/dist/solution/BookingTicket/utils/cartView.js +4 -2
- package/dist/solution/ScanOrder/index.d.ts +9 -3
- package/dist/solution/ScanOrder/index.js +231 -128
- package/dist/solution/ScanOrder/utils.js +46 -8
- package/dist/solution/ShopDiscount/index.d.ts +0 -1
- package/dist/solution/ShopDiscount/index.js +18 -23
- package/dist/solution/VenueBooking/index.d.ts +5 -9
- package/dist/solution/VenueBooking/index.js +103 -55
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +10 -0
- package/lib/model/strategy/adapter/promotion/index.js +0 -49
- package/lib/modules/BookingContext/index.d.ts +37 -0
- package/lib/modules/BookingContext/index.js +297 -0
- package/lib/modules/BookingContext/types.d.ts +102 -0
- package/lib/modules/BookingContext/types.js +34 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +207 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +141 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +75 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +198 -0
- package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/lib/modules/BookingContext/utils/flexible.js +80 -0
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/lib/modules/BookingContext/utils/formatResourceList.js +50 -0
- package/lib/modules/BookingContext/utils/index.d.ts +11 -0
- package/lib/modules/BookingContext/utils/index.js +43 -0
- package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/lib/modules/BookingContext/utils/noResource.js +90 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/lib/modules/BookingContext/utils/productExtend.js +283 -0
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/lib/modules/BookingContext/utils/resourceErrors.js +80 -0
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/lib/modules/BookingContext/utils/resourceSelection.js +46 -0
- package/lib/modules/BookingContext/utils/resources.d.ts +80 -0
- package/lib/modules/BookingContext/utils/resources.js +377 -0
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/lib/modules/BookingContext/utils/serviceTimes.js +162 -0
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/lib/modules/BookingContext/utils/timeSlices.js +124 -0
- package/lib/modules/Customer/index.d.ts +6 -0
- package/lib/modules/Customer/index.js +26 -11
- package/lib/modules/Customer/types.d.ts +2 -0
- package/lib/modules/Discount/index.d.ts +2 -4
- package/lib/modules/Discount/index.js +8 -63
- package/lib/modules/Discount/types.d.ts +1 -7
- package/lib/modules/Order/index.d.ts +84 -17
- package/lib/modules/Order/index.js +588 -145
- package/lib/modules/Order/types.d.ts +198 -18
- package/lib/modules/Order/types.js +1 -0
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/lib/modules/Order/utils/manualProductDiscount.js +207 -0
- package/lib/modules/Order/utils.d.ts +50 -1
- package/lib/modules/Order/utils.js +229 -21
- package/lib/modules/Quotation/index.d.ts +0 -1
- package/lib/modules/Quotation/index.js +18 -15
- package/lib/modules/Rules/index.d.ts +4 -0
- package/lib/modules/Rules/index.js +22 -14
- package/lib/modules/SalesSummary/index.js +4 -2
- package/lib/modules/SalesSummary/utils.js +3 -3
- package/lib/modules/Schedule/index.js +3 -1
- package/lib/modules/index.d.ts +1 -0
- package/lib/modules/index.js +3 -1
- package/lib/server/index.js +41 -4
- package/lib/server/modules/order/utils/filterOrders.js +12 -4
- package/lib/server/modules/products/index.d.ts +1 -1
- package/lib/server/modules/products/index.js +30 -20
- package/lib/server/modules/schedule/index.js +2 -1
- package/lib/solution/BaseSales/index.d.ts +89 -7
- package/lib/solution/BaseSales/index.js +736 -22
- package/lib/solution/BaseSales/types.d.ts +67 -1
- package/lib/solution/BaseSales/types.js +3 -1
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +275 -0
- package/lib/solution/BaseSales/utils/cartPromotion.js +836 -0
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +7 -0
- package/lib/solution/BaseSales/utils/quotationPrice.js +277 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +71 -12
- package/lib/solution/BaseSales/utils.js +46 -6
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +133 -1
- package/lib/solution/BookingTicket/index.js +352 -8
- package/lib/solution/BookingTicket/types.d.ts +2 -0
- package/lib/solution/BookingTicket/types.js +6 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +113 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.js +318 -0
- package/lib/solution/BookingTicket/utils/cartView.js +4 -2
- package/lib/solution/ScanOrder/index.d.ts +9 -3
- package/lib/solution/ScanOrder/index.js +147 -66
- package/lib/solution/ScanOrder/utils.js +46 -6
- package/lib/solution/ShopDiscount/index.d.ts +0 -1
- package/lib/solution/ShopDiscount/index.js +2 -4
- package/lib/solution/VenueBooking/index.d.ts +5 -9
- package/lib/solution/VenueBooking/index.js +50 -14
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +10 -0
- package/package.json +2 -2
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
2
|
import { BaseModule } from '../BaseModule';
|
|
3
|
-
import { OrderModuleAPI, CommitOrderParams,
|
|
3
|
+
import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CheckoutOrderParams, CancelOrderParams, ChangeBookingStatusParams } from './types';
|
|
4
4
|
import { CartItem } from '../Cart/types';
|
|
5
5
|
import { type SubmitPayloadEnhancer } from './utils';
|
|
6
|
-
import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView } from './types';
|
|
6
|
+
import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, OrderScanCodeResult, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions } from './types';
|
|
7
7
|
import type { ICustomer } from '../AccountList/types';
|
|
8
8
|
import type { Discount } from '../Discount/types';
|
|
9
|
-
import { UnavailableReason } from '../Rules/types';
|
|
10
9
|
export declare class OrderModule extends BaseModule implements Module, OrderModuleAPI {
|
|
11
10
|
protected defaultName: string;
|
|
12
11
|
protected defaultVersion: string;
|
|
@@ -20,11 +19,22 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
20
19
|
private rulesHooksOverride?;
|
|
21
20
|
private orderHooks?;
|
|
22
21
|
private otherParams?;
|
|
22
|
+
/** 评估器引用;由 SalesSdkProvider 注入,未注入时 applyPromotion 静默跳过 */
|
|
23
|
+
private promotionEvaluator;
|
|
24
|
+
/** 赠品选择 resolver;由 SDK host bridge 注入 */
|
|
25
|
+
private giftSelectResolver;
|
|
26
|
+
/** applyPromotion 递归保护 flag(写路径同步调 applyPromotion,禁止重入) */
|
|
27
|
+
private isApplyingPromotion;
|
|
28
|
+
/** 最近一次 applyPromotion 的未满足促销提示 */
|
|
29
|
+
private lastUnfulfilledPromotions;
|
|
30
|
+
/** 最近一次 applyPromotion 的赠品操作 diff(debug / SDK 读取使用) */
|
|
31
|
+
private lastGiftActions;
|
|
23
32
|
/**
|
|
24
33
|
* Populate `savedAmount` on each discount based on product-level discount details.
|
|
25
34
|
* Only selected discounts get a non-zero value.
|
|
26
35
|
*/
|
|
27
36
|
static populateSavedAmounts(productList: Array<Record<string, any>>, discountList: Array<Record<string, any>>): void;
|
|
37
|
+
private applyProductDiscountPrices;
|
|
28
38
|
constructor(name?: string, version?: string);
|
|
29
39
|
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
30
40
|
/**
|
|
@@ -43,34 +53,75 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
43
53
|
private createDefaultRulesHooks;
|
|
44
54
|
loadDiscountConfig(params: {
|
|
45
55
|
customerId: number;
|
|
46
|
-
action?: 'create';
|
|
47
|
-
|
|
56
|
+
action?: 'create' | 'edit';
|
|
57
|
+
orderId?: number;
|
|
58
|
+
apply?: boolean;
|
|
59
|
+
}): Promise<Discount[]>;
|
|
48
60
|
getDiscountList(): Discount[];
|
|
49
|
-
scanCode(code: string, customerId?: number): Promise<
|
|
50
|
-
isAvailable: boolean;
|
|
51
|
-
discountList: Discount[];
|
|
52
|
-
type: 'server' | 'clientCalc';
|
|
53
|
-
unavailableReason?: UnavailableReason;
|
|
54
|
-
unavailableReasonKey?: string | null;
|
|
55
|
-
}>;
|
|
61
|
+
scanCode(code: string, customerId?: number): Promise<OrderScanCodeResult>;
|
|
56
62
|
applyDiscount(): void;
|
|
63
|
+
/**
|
|
64
|
+
* 注入促销评估器。
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* order.setPromotionEvaluator(appHelper.utils.promotionEvaluator);
|
|
68
|
+
*/
|
|
69
|
+
setPromotionEvaluator(evaluator: OrderPromotionEvaluator | null): void;
|
|
70
|
+
/**
|
|
71
|
+
* 注入赠品选择 resolver。OS 需要补赠品时会 await 调用 resolver;缺省时跳过新增并 console.warn。
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* order.setGiftSelectResolver(async (ctx) => {
|
|
75
|
+
* // SDK 内部决定弹窗 or 自动选第一项,返回完整 OrderProduct[]
|
|
76
|
+
* return giftSelectBridge.request(ctx);
|
|
77
|
+
* });
|
|
78
|
+
*/
|
|
79
|
+
setGiftSelectResolver(resolver: OrderGiftSelectResolver | null): void;
|
|
80
|
+
/**
|
|
81
|
+
* 为商品目录追加促销标签,供上层 Sales 门面复用。
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* const products = order.appendPromotionTags(catalogProducts);
|
|
85
|
+
*/
|
|
86
|
+
appendPromotionTags<T extends Record<string, any>>(products: T[]): T[];
|
|
87
|
+
/**
|
|
88
|
+
* 应用购物车促销:计算 → 差异化赠品 → 写回 tempOrder.products → emit onPromotionApplied。
|
|
89
|
+
*
|
|
90
|
+
* 调用时机:写路径(add/update/remove/clear/setCustomer)末尾自动触发;外部一般无需手动调。
|
|
91
|
+
*
|
|
92
|
+
* 关键约束:
|
|
93
|
+
* - 不调用任何公开 CRUD API(如 removeProductFromOrder),全部内部 mutate tempOrder.products,避免事件风暴;
|
|
94
|
+
* - 用 `isApplyingPromotion` 防递归;
|
|
95
|
+
* - 多选项赠品依赖 giftSelectResolver,未注入则跳过且 console.warn;
|
|
96
|
+
* - 不主动调用 applyDiscount / recalculateSummary,调用方负责跟进。
|
|
97
|
+
*/
|
|
98
|
+
applyPromotion(): Promise<void>;
|
|
99
|
+
/** 最近一次 applyPromotion 输出的未满足促销列表 */
|
|
100
|
+
getUnfulfilledPromotions(): OrderUnfulfilledPromotion[];
|
|
101
|
+
/** 最近一次 applyPromotion 输出的赠品操作 diff */
|
|
102
|
+
getLastGiftActions(): OrderLastGiftActions | null;
|
|
57
103
|
initTempOrder(params: {
|
|
58
104
|
cacheId?: string;
|
|
59
105
|
salesSummaryModuleName?: string;
|
|
60
106
|
}): void;
|
|
61
|
-
|
|
62
|
-
|
|
107
|
+
/** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化。 */
|
|
108
|
+
setEnableTempOrderPersist(_enabled: boolean): void;
|
|
109
|
+
/** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化。 */
|
|
110
|
+
isTempOrderPersistEnabled(): boolean;
|
|
111
|
+
/** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化;草稿保存请使用 IndexedDB saveDraft。 */
|
|
63
112
|
persistTempOrder(): void;
|
|
64
113
|
private createDefaultTempOrderInstance;
|
|
65
114
|
private createExternalSaleNumber;
|
|
66
115
|
private ensureExternalSaleNumber;
|
|
67
116
|
private ensureRequestUniqueIdempotencyToken;
|
|
117
|
+
private buildPaymentSyncIdempotencyToken;
|
|
68
118
|
hasLocalDatabase(): boolean;
|
|
69
119
|
private buildLocalOrderRecord;
|
|
70
120
|
getLocalOrderByOrderId(orderId: number | string): Promise<Record<string, any> | null>;
|
|
71
121
|
getLocalOrderByOrderNumber(orderNumber: string): Promise<Record<string, any> | null>;
|
|
72
122
|
getLocalOrderByExternalSaleNumber(externalSaleNumber: string): Promise<Record<string, any> | null>;
|
|
73
123
|
saveDraft(): Promise<void>;
|
|
124
|
+
private saveDraftInBackground;
|
|
74
125
|
private hydrateTempOrderFromLocalRecord;
|
|
75
126
|
private extractOrderIdFromSubmitResult;
|
|
76
127
|
private calculatePaymentTotal;
|
|
@@ -80,6 +131,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
80
131
|
ensureTempOrder(): OrderTempOrder;
|
|
81
132
|
restoreOrder(): OrderTempOrder;
|
|
82
133
|
getTempOrder(): OrderTempOrder | null;
|
|
134
|
+
replaceTempOrder(tempOrder: OrderTempOrder, options?: ReplaceTempOrderOptions): Promise<OrderTempOrder>;
|
|
83
135
|
getOrderIdentity(): OrderIdentitySnapshot | null;
|
|
84
136
|
getOrderSyncState(): OrderSyncState;
|
|
85
137
|
getOrderAmountSnapshot(): OrderAmountSnapshot | null;
|
|
@@ -90,20 +142,27 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
90
142
|
private ensureExtend;
|
|
91
143
|
private captureProductRuntime;
|
|
92
144
|
private createLinkedProductAndBooking;
|
|
145
|
+
private getBookingUniqueIdentificationNumber;
|
|
146
|
+
private findBookingIndexByUniqueIdentificationNumber;
|
|
147
|
+
private removeLinkedBookingsForProduct;
|
|
93
148
|
private getSalesSummary;
|
|
94
149
|
recalculateSummary(options?: {
|
|
95
150
|
createIfMissing?: boolean;
|
|
96
151
|
}): Promise<OrderSummary | null>;
|
|
97
152
|
getOrderSummary(): Promise<OrderSummary>;
|
|
98
153
|
updateTempOrderNote(note: string): string;
|
|
154
|
+
updateTempOrderNote(note: string, sync: true): Promise<string>;
|
|
155
|
+
updateTempOrderNote(note: string, sync: boolean): string | Promise<string>;
|
|
156
|
+
syncTempOrderNoteToRemote(orderId: number | string, note: string): Promise<string>;
|
|
99
157
|
getTempOrderNote(): string;
|
|
100
158
|
updateTempOrderShopDiscount(amount: string | number): string;
|
|
101
159
|
updateTempOrderBuzzer(buzzer: string): string;
|
|
102
160
|
updateTempOrderContactsInfo(contactsInfo: Record<string, any> | null): Record<string, any> | null;
|
|
161
|
+
private buildTempOrderCustomer;
|
|
103
162
|
/**
|
|
104
163
|
* 更新当前 tempOrder 的客户协议字段。
|
|
105
164
|
*
|
|
106
|
-
* PaymentModal
|
|
165
|
+
* PaymentModal 只需要修改订单里的客户事实;如果外部还有客户模块需要同步,
|
|
107
166
|
* 应由调用方通过回调处理,不能把外部 UI 状态写进 tempOrder。
|
|
108
167
|
*/
|
|
109
168
|
updateTempOrderCustomer(customer: UpdateTempOrderCustomerInput): OrderSnapshot['customer'];
|
|
@@ -148,8 +207,15 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
148
207
|
private shouldMergeProductToOrder;
|
|
149
208
|
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput): Promise<OrderProduct[]>;
|
|
150
209
|
private hasGoodPassDiscount;
|
|
151
|
-
|
|
210
|
+
updateOrderProduct(params: UpdateOrderProductParams): Promise<OrderProduct[]>;
|
|
211
|
+
updateOrderProductQuantity(params: UpdateOrderProductQuantityParams): Promise<OrderProduct[]>;
|
|
212
|
+
updateOrderBooking(params: UpdateOrderBookingParams): any[];
|
|
152
213
|
removeProductFromOrder(identity: OrderProductIdentity): Promise<OrderProduct[]>;
|
|
214
|
+
/**
|
|
215
|
+
* 仅清空购物车行(products / bookings),不重置整单。
|
|
216
|
+
* 用于「仅清空商品」;客户、备注、支付等协议字段保持不变。
|
|
217
|
+
*/
|
|
218
|
+
clearOrderCartLines(): Promise<OrderTempOrder>;
|
|
153
219
|
/**
|
|
154
220
|
* 提交当前 Sales tempOrder。
|
|
155
221
|
*
|
|
@@ -221,8 +287,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
221
287
|
hydrateTempOrderFromRecord(record: Record<string, any>, options?: {
|
|
222
288
|
recalcOnHydrate?: boolean;
|
|
223
289
|
}): Promise<OrderTempOrder>;
|
|
290
|
+
private normalizeTempOrderForRuntime;
|
|
224
291
|
private normalizeHydratedOrderProduct;
|
|
225
292
|
getLastOrderInfo(): Record<string, any> | undefined;
|
|
226
293
|
getOrderInfo(order_id: number): Promise<any>;
|
|
227
294
|
}
|
|
228
|
-
export type {
|
|
295
|
+
export type { UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
|