@pisell/pisellos 2.2.178 → 2.2.179
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/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/modules/Customer/index.d.ts +0 -6
- package/dist/modules/Customer/index.js +83 -129
- package/dist/modules/Customer/types.d.ts +0 -2
- package/dist/modules/Discount/index.d.ts +4 -2
- package/dist/modules/Discount/index.js +93 -8
- package/dist/modules/Discount/types.d.ts +7 -1
- package/dist/modules/Order/index.d.ts +18 -88
- package/dist/modules/Order/index.js +501 -1357
- package/dist/modules/Order/types.d.ts +19 -198
- package/dist/modules/Order/types.js +0 -31
- package/dist/modules/Order/utils.d.ts +1 -50
- package/dist/modules/Order/utils.js +32 -261
- package/dist/modules/Quotation/index.d.ts +1 -0
- package/dist/modules/Quotation/index.js +21 -23
- package/dist/modules/Rules/index.d.ts +0 -4
- package/dist/modules/Rules/index.js +10 -26
- package/dist/modules/SalesSummary/index.js +2 -4
- package/dist/modules/SalesSummary/utils.js +7 -21
- package/dist/modules/Schedule/index.js +2 -6
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.js +1 -2
- package/dist/server/index.js +29 -87
- package/dist/server/modules/order/index.d.ts +0 -23
- package/dist/server/modules/order/index.js +46 -123
- package/dist/server/modules/order/types.d.ts +2 -0
- package/dist/server/modules/order/utils/filterOrders.js +6 -20
- package/dist/server/modules/products/index.d.ts +1 -1
- package/dist/server/modules/products/index.js +113 -130
- package/dist/server/modules/schedule/index.js +6 -13
- package/dist/solution/BaseSales/index.d.ts +7 -89
- package/dist/solution/BaseSales/index.js +375 -1494
- package/dist/solution/BaseSales/types.d.ts +1 -67
- package/dist/solution/BaseSales/types.js +1 -3
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +1 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +16 -68
- package/dist/solution/BaseSales/utils.js +8 -46
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -133
- package/dist/solution/BookingTicket/index.js +175 -780
- package/dist/solution/BookingTicket/types.d.ts +0 -2
- package/dist/solution/BookingTicket/types.js +0 -3
- package/dist/solution/BookingTicket/utils/cartView.js +2 -4
- package/dist/solution/ScanOrder/index.d.ts +3 -9
- package/dist/solution/ScanOrder/index.js +128 -231
- package/dist/solution/ScanOrder/utils.js +8 -46
- package/dist/solution/ShopDiscount/index.d.ts +1 -0
- package/dist/solution/ShopDiscount/index.js +23 -18
- package/dist/solution/VenueBooking/index.d.ts +9 -5
- package/dist/solution/VenueBooking/index.js +55 -103
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +0 -10
- package/lib/modules/Customer/index.d.ts +0 -6
- package/lib/modules/Customer/index.js +11 -26
- package/lib/modules/Customer/types.d.ts +0 -2
- package/lib/modules/Discount/index.d.ts +4 -2
- package/lib/modules/Discount/index.js +63 -8
- package/lib/modules/Discount/types.d.ts +7 -1
- package/lib/modules/Order/index.d.ts +18 -88
- package/lib/modules/Order/index.js +149 -677
- package/lib/modules/Order/types.d.ts +19 -198
- package/lib/modules/Order/types.js +0 -1
- package/lib/modules/Order/utils.d.ts +1 -50
- package/lib/modules/Order/utils.js +22 -229
- package/lib/modules/Quotation/index.d.ts +1 -0
- package/lib/modules/Quotation/index.js +15 -18
- package/lib/modules/Rules/index.d.ts +0 -4
- package/lib/modules/Rules/index.js +14 -22
- package/lib/modules/SalesSummary/index.js +2 -4
- package/lib/modules/SalesSummary/utils.js +7 -21
- package/lib/modules/Schedule/index.js +1 -3
- package/lib/modules/index.d.ts +0 -1
- package/lib/modules/index.js +1 -3
- package/lib/server/index.js +4 -41
- package/lib/server/modules/order/index.d.ts +0 -23
- package/lib/server/modules/order/index.js +14 -46
- package/lib/server/modules/order/types.d.ts +2 -0
- package/lib/server/modules/order/utils/filterOrders.js +4 -12
- package/lib/server/modules/products/index.d.ts +1 -1
- package/lib/server/modules/products/index.js +20 -30
- package/lib/server/modules/schedule/index.js +1 -2
- package/lib/solution/BaseSales/index.d.ts +7 -89
- package/lib/solution/BaseSales/index.js +22 -736
- package/lib/solution/BaseSales/types.d.ts +1 -67
- package/lib/solution/BaseSales/types.js +1 -3
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +1 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +12 -71
- package/lib/solution/BaseSales/utils.js +6 -46
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -133
- package/lib/solution/BookingTicket/index.js +8 -352
- package/lib/solution/BookingTicket/types.d.ts +0 -2
- package/lib/solution/BookingTicket/types.js +0 -6
- package/lib/solution/BookingTicket/utils/cartView.js +2 -4
- package/lib/solution/ScanOrder/index.d.ts +3 -9
- package/lib/solution/ScanOrder/index.js +66 -147
- package/lib/solution/ScanOrder/utils.js +6 -46
- package/lib/solution/ShopDiscount/index.d.ts +1 -0
- package/lib/solution/ShopDiscount/index.js +4 -2
- package/lib/solution/VenueBooking/index.d.ts +9 -5
- package/lib/solution/VenueBooking/index.js +14 -50
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +0 -10
- package/package.json +2 -2
- package/dist/modules/BookingContext/index.d.ts +0 -37
- package/dist/modules/BookingContext/index.js +0 -436
- package/dist/modules/BookingContext/types.d.ts +0 -102
- package/dist/modules/BookingContext/types.js +0 -51
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -193
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -137
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -75
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -215
- package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/dist/modules/BookingContext/utils/flexible.js +0 -56
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/dist/modules/BookingContext/utils/formatResourceList.js +0 -38
- package/dist/modules/BookingContext/utils/index.d.ts +0 -11
- package/dist/modules/BookingContext/utils/index.js +0 -11
- package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/dist/modules/BookingContext/utils/noResource.js +0 -77
- package/dist/modules/BookingContext/utils/productExtend.d.ts +0 -72
- package/dist/modules/BookingContext/utils/productExtend.js +0 -339
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/dist/modules/BookingContext/utils/resourceErrors.js +0 -74
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/dist/modules/BookingContext/utils/resourceSelection.js +0 -24
- package/dist/modules/BookingContext/utils/resources.d.ts +0 -80
- package/dist/modules/BookingContext/utils/resources.js +0 -486
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/dist/modules/BookingContext/utils/serviceTimes.js +0 -151
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/dist/modules/BookingContext/utils/timeSlices.js +0 -100
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/dist/modules/Order/utils/manualProductDiscount.js +0 -212
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +0 -275
- package/dist/solution/BaseSales/utils/cartPromotion.js +0 -1258
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
- package/dist/solution/BaseSales/utils/quotationPrice.js +0 -237
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -113
- package/dist/solution/BookingTicket/utils/addProductDecision.js +0 -346
- package/lib/modules/BookingContext/index.d.ts +0 -37
- package/lib/modules/BookingContext/index.js +0 -297
- package/lib/modules/BookingContext/types.d.ts +0 -102
- package/lib/modules/BookingContext/types.js +0 -34
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -207
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -141
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -75
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -198
- package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/lib/modules/BookingContext/utils/flexible.js +0 -80
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/lib/modules/BookingContext/utils/formatResourceList.js +0 -50
- package/lib/modules/BookingContext/utils/index.d.ts +0 -11
- package/lib/modules/BookingContext/utils/index.js +0 -43
- package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/lib/modules/BookingContext/utils/noResource.js +0 -90
- package/lib/modules/BookingContext/utils/productExtend.d.ts +0 -72
- package/lib/modules/BookingContext/utils/productExtend.js +0 -283
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/lib/modules/BookingContext/utils/resourceErrors.js +0 -80
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/lib/modules/BookingContext/utils/resourceSelection.js +0 -46
- package/lib/modules/BookingContext/utils/resources.d.ts +0 -80
- package/lib/modules/BookingContext/utils/resources.js +0 -377
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/lib/modules/BookingContext/utils/serviceTimes.js +0 -162
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/lib/modules/BookingContext/utils/timeSlices.js +0 -124
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/lib/modules/Order/utils/manualProductDiscount.js +0 -207
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +0 -275
- package/lib/solution/BaseSales/utils/cartPromotion.js +0 -836
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
- package/lib/solution/BaseSales/utils/quotationPrice.js +0 -277
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -113
- package/lib/solution/BookingTicket/utils/addProductDecision.js +0 -318
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
2
|
import { BaseModule } from '../BaseModule';
|
|
3
|
-
import { OrderModuleAPI, CommitOrderParams,
|
|
3
|
+
import { OrderModuleAPI, CommitOrderParams, UpdateProductInOrderParams, 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
|
|
6
|
+
import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView } from './types';
|
|
7
7
|
import type { ICustomer } from '../AccountList/types';
|
|
8
8
|
import type { Discount } from '../Discount/types';
|
|
9
|
+
import { UnavailableReason } from '../Rules/types';
|
|
9
10
|
export declare class OrderModule extends BaseModule implements Module, OrderModuleAPI {
|
|
10
11
|
protected defaultName: string;
|
|
11
12
|
protected defaultVersion: string;
|
|
@@ -19,22 +20,11 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
19
20
|
private rulesHooksOverride?;
|
|
20
21
|
private orderHooks?;
|
|
21
22
|
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;
|
|
32
23
|
/**
|
|
33
24
|
* Populate `savedAmount` on each discount based on product-level discount details.
|
|
34
25
|
* Only selected discounts get a non-zero value.
|
|
35
26
|
*/
|
|
36
27
|
static populateSavedAmounts(productList: Array<Record<string, any>>, discountList: Array<Record<string, any>>): void;
|
|
37
|
-
private applyProductDiscountPrices;
|
|
38
28
|
constructor(name?: string, version?: string);
|
|
39
29
|
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
40
30
|
/**
|
|
@@ -53,88 +43,43 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
53
43
|
private createDefaultRulesHooks;
|
|
54
44
|
loadDiscountConfig(params: {
|
|
55
45
|
customerId: number;
|
|
56
|
-
action?: 'create'
|
|
57
|
-
|
|
58
|
-
apply?: boolean;
|
|
59
|
-
}): Promise<Discount[]>;
|
|
46
|
+
action?: 'create';
|
|
47
|
+
}): Promise<void>;
|
|
60
48
|
getDiscountList(): Discount[];
|
|
61
|
-
scanCode(code: string, customerId?: number): Promise<
|
|
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
|
+
}>;
|
|
62
56
|
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;
|
|
103
57
|
initTempOrder(params: {
|
|
104
58
|
cacheId?: string;
|
|
105
59
|
salesSummaryModuleName?: string;
|
|
106
60
|
}): void;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
/** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化。 */
|
|
110
|
-
isTempOrderPersistEnabled(): boolean;
|
|
111
|
-
/** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化;草稿保存请使用 IndexedDB saveDraft。 */
|
|
61
|
+
private getTempOrderStorageKey;
|
|
62
|
+
private restoreTempOrderFromStorage;
|
|
112
63
|
persistTempOrder(): void;
|
|
113
64
|
private createDefaultTempOrderInstance;
|
|
114
65
|
private createExternalSaleNumber;
|
|
115
66
|
private ensureExternalSaleNumber;
|
|
116
67
|
private ensureRequestUniqueIdempotencyToken;
|
|
117
|
-
private buildPaymentSyncIdempotencyToken;
|
|
118
68
|
hasLocalDatabase(): boolean;
|
|
119
69
|
private buildLocalOrderRecord;
|
|
120
70
|
getLocalOrderByOrderId(orderId: number | string): Promise<Record<string, any> | null>;
|
|
121
71
|
getLocalOrderByOrderNumber(orderNumber: string): Promise<Record<string, any> | null>;
|
|
122
72
|
getLocalOrderByExternalSaleNumber(externalSaleNumber: string): Promise<Record<string, any> | null>;
|
|
123
73
|
saveDraft(): Promise<void>;
|
|
124
|
-
private saveDraftInBackground;
|
|
125
74
|
private hydrateTempOrderFromLocalRecord;
|
|
126
75
|
private extractOrderIdFromSubmitResult;
|
|
127
76
|
private calculatePaymentTotal;
|
|
128
77
|
private calculatePaidPaymentSummary;
|
|
129
78
|
private calculatePaymentServiceFee;
|
|
130
|
-
private formatSummaryMetadataMoney;
|
|
131
|
-
private syncSummaryProductMetadata;
|
|
132
|
-
private calculateSummaryPaymentBalance;
|
|
133
79
|
private getPaymentTargetAmount;
|
|
134
80
|
ensureTempOrder(): OrderTempOrder;
|
|
135
81
|
restoreOrder(): OrderTempOrder;
|
|
136
82
|
getTempOrder(): OrderTempOrder | null;
|
|
137
|
-
replaceTempOrder(tempOrder: OrderTempOrder, options?: ReplaceTempOrderOptions): Promise<OrderTempOrder>;
|
|
138
83
|
getOrderIdentity(): OrderIdentitySnapshot | null;
|
|
139
84
|
getOrderSyncState(): OrderSyncState;
|
|
140
85
|
getOrderAmountSnapshot(): OrderAmountSnapshot | null;
|
|
@@ -145,27 +90,20 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
145
90
|
private ensureExtend;
|
|
146
91
|
private captureProductRuntime;
|
|
147
92
|
private createLinkedProductAndBooking;
|
|
148
|
-
private getBookingUniqueIdentificationNumber;
|
|
149
|
-
private findBookingIndexByUniqueIdentificationNumber;
|
|
150
|
-
private removeLinkedBookingsForProduct;
|
|
151
93
|
private getSalesSummary;
|
|
152
94
|
recalculateSummary(options?: {
|
|
153
95
|
createIfMissing?: boolean;
|
|
154
96
|
}): Promise<OrderSummary | null>;
|
|
155
97
|
getOrderSummary(): Promise<OrderSummary>;
|
|
156
98
|
updateTempOrderNote(note: string): string;
|
|
157
|
-
updateTempOrderNote(note: string, sync: true): Promise<string>;
|
|
158
|
-
updateTempOrderNote(note: string, sync: boolean): string | Promise<string>;
|
|
159
|
-
syncTempOrderNoteToRemote(orderId: number | string, note: string): Promise<string>;
|
|
160
99
|
getTempOrderNote(): string;
|
|
161
100
|
updateTempOrderShopDiscount(amount: string | number): string;
|
|
162
101
|
updateTempOrderBuzzer(buzzer: string): string;
|
|
163
102
|
updateTempOrderContactsInfo(contactsInfo: Record<string, any> | null): Record<string, any> | null;
|
|
164
|
-
private buildTempOrderCustomer;
|
|
165
103
|
/**
|
|
166
104
|
* 更新当前 tempOrder 的客户协议字段。
|
|
167
105
|
*
|
|
168
|
-
* PaymentModal
|
|
106
|
+
* PaymentModal 只需要修改订单里的客户字段;如果外部还有客户模块需要同步,
|
|
169
107
|
* 应由调用方通过回调处理,不能把外部 UI 状态写进 tempOrder。
|
|
170
108
|
*/
|
|
171
109
|
updateTempOrderCustomer(customer: UpdateTempOrderCustomerInput): OrderSnapshot['customer'];
|
|
@@ -210,15 +148,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
210
148
|
private shouldMergeProductToOrder;
|
|
211
149
|
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput): Promise<OrderProduct[]>;
|
|
212
150
|
private hasGoodPassDiscount;
|
|
213
|
-
|
|
214
|
-
updateOrderProductQuantity(params: UpdateOrderProductQuantityParams): Promise<OrderProduct[]>;
|
|
215
|
-
updateOrderBooking(params: UpdateOrderBookingParams): any[];
|
|
151
|
+
updateProductInOrder(params: UpdateProductInOrderParams): Promise<OrderProduct[]>;
|
|
216
152
|
removeProductFromOrder(identity: OrderProductIdentity): Promise<OrderProduct[]>;
|
|
217
|
-
/**
|
|
218
|
-
* 仅清空购物车行(products / bookings),不重置整单。
|
|
219
|
-
* 用于「仅清空商品」;客户、备注、支付等协议字段保持不变。
|
|
220
|
-
*/
|
|
221
|
-
clearOrderCartLines(): Promise<OrderTempOrder>;
|
|
222
153
|
/**
|
|
223
154
|
* 提交当前 Sales tempOrder。
|
|
224
155
|
*
|
|
@@ -243,7 +174,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
243
174
|
private logSubmitBackendRejected;
|
|
244
175
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
245
176
|
createOrder(params: CommitOrderParams['query']): {
|
|
246
|
-
type: "
|
|
177
|
+
type: "appointment_booking" | "virtual";
|
|
247
178
|
platform: string;
|
|
248
179
|
sales_channel: string;
|
|
249
180
|
order_sales_channel: string;
|
|
@@ -290,9 +221,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
290
221
|
hydrateTempOrderFromRecord(record: Record<string, any>, options?: {
|
|
291
222
|
recalcOnHydrate?: boolean;
|
|
292
223
|
}): Promise<OrderTempOrder>;
|
|
293
|
-
private normalizeTempOrderForRuntime;
|
|
294
224
|
private normalizeHydratedOrderProduct;
|
|
295
225
|
getLastOrderInfo(): Record<string, any> | undefined;
|
|
296
226
|
getOrderInfo(order_id: number): Promise<any>;
|
|
297
227
|
}
|
|
298
|
-
export type {
|
|
228
|
+
export type { UpdateProductInOrderParams } from './types';
|