@pisell/pisellos 2.2.277 → 2.2.800
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/core/index.d.ts +0 -2
- package/dist/core/index.js +1 -7
- package/dist/model/strategy/adapter/promotion/adapter.d.ts +0 -4
- package/dist/model/strategy/adapter/promotion/adapter.js +0 -23
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +0 -17
- package/dist/model/strategy/adapter/promotion/evaluator.js +6 -279
- package/dist/model/strategy/adapter/promotion/examples.d.ts +0 -86
- package/dist/model/strategy/adapter/promotion/examples.js +0 -99
- package/dist/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/model/strategy/adapter/promotion/type.d.ts +2 -90
- package/dist/model/strategy/adapter/promotion/type.js +0 -45
- package/dist/model/strategy/adapter/walletPass/evaluator.js +2 -0
- package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -5
- package/dist/model/strategy/adapter/walletPass/utils.js +26 -57
- package/dist/modules/OpenData/index.d.ts +0 -2
- package/dist/modules/OpenData/index.js +0 -8
- package/dist/modules/Order/index.d.ts +8 -28
- package/dist/modules/Order/index.js +496 -808
- package/dist/modules/Order/types.d.ts +1 -35
- package/dist/modules/Order/utils/orderCollectionIdentity.js +2 -7
- package/dist/modules/Order/utils.js +6 -10
- package/dist/modules/Payment/index.d.ts +0 -2
- package/dist/modules/Payment/index.js +49 -78
- package/dist/modules/Payment/types.d.ts +25 -106
- package/dist/modules/Payment/types.js +0 -17
- package/dist/modules/Payment/utils.js +1 -4
- package/dist/modules/Payment/walletpass.d.ts +1 -49
- package/dist/modules/Payment/walletpass.js +124 -1081
- package/dist/modules/Rules/index.d.ts +0 -3
- package/dist/modules/Rules/index.js +70 -100
- package/dist/server/index.d.ts +0 -25
- package/dist/server/index.js +1069 -2001
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +4 -70
- package/dist/server/modules/order/index.js +728 -1816
- package/dist/server/modules/order/types.d.ts +3 -25
- package/dist/server/modules/order/types.js +1 -7
- package/dist/server/utils/small-ticket.js +2 -1
- package/dist/solution/BaseSales/index.d.ts +5 -109
- package/dist/solution/BaseSales/index.js +436 -1802
- package/dist/solution/BaseSales/types.d.ts +1 -55
- package/dist/solution/BaseSales/types.js +1 -2
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +1 -3
- package/dist/solution/BaseSales/utils/cartPromotion.js +31 -90
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -6
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +4 -7
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +5 -21
- package/dist/solution/BookingTicket/index.js +56 -139
- package/dist/solution/BookingTicket/types.d.ts +0 -1
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -8
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +83 -173
- package/dist/solution/Sales/index.d.ts +0 -2
- package/dist/solution/Sales/index.js +4 -26
- package/dist/solution/ScanOrder/index.js +20 -31
- package/dist/solution/VenueBooking/index.d.ts +0 -1
- package/dist/solution/VenueBooking/index.js +19 -30
- package/dist/types/index.d.ts +0 -1
- package/lib/core/index.d.ts +0 -2
- package/lib/core/index.js +1 -4
- package/lib/model/strategy/adapter/promotion/adapter.d.ts +0 -4
- package/lib/model/strategy/adapter/promotion/adapter.js +0 -20
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +0 -17
- package/lib/model/strategy/adapter/promotion/evaluator.js +0 -235
- package/lib/model/strategy/adapter/promotion/examples.d.ts +0 -86
- package/lib/model/strategy/adapter/promotion/examples.js +0 -91
- package/lib/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +49 -0
- package/lib/model/strategy/adapter/promotion/type.d.ts +2 -90
- package/lib/model/strategy/adapter/promotion/type.js +0 -2
- package/lib/model/strategy/adapter/walletPass/evaluator.js +2 -0
- package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -5
- package/lib/model/strategy/adapter/walletPass/utils.js +11 -62
- package/lib/modules/OpenData/index.d.ts +0 -2
- package/lib/modules/OpenData/index.js +0 -5
- package/lib/modules/Order/index.d.ts +8 -28
- package/lib/modules/Order/index.js +69 -231
- package/lib/modules/Order/types.d.ts +1 -35
- package/lib/modules/Order/utils/orderCollectionIdentity.js +0 -3
- package/lib/modules/Order/utils.js +4 -11
- package/lib/modules/Payment/index.d.ts +0 -2
- package/lib/modules/Payment/index.js +12 -33
- package/lib/modules/Payment/types.d.ts +25 -106
- package/lib/modules/Payment/types.js +0 -1
- package/lib/modules/Payment/utils.js +1 -5
- package/lib/modules/Payment/walletpass.d.ts +1 -49
- package/lib/modules/Payment/walletpass.js +22 -898
- package/lib/modules/Rules/index.d.ts +0 -3
- package/lib/modules/Rules/index.js +9 -38
- package/lib/server/index.d.ts +0 -25
- package/lib/server/index.js +31 -726
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +4 -70
- package/lib/server/modules/order/index.js +69 -818
- package/lib/server/modules/order/types.d.ts +3 -25
- package/lib/server/modules/order/types.js +0 -1
- package/lib/server/utils/small-ticket.js +1 -1
- package/lib/solution/BaseSales/index.d.ts +5 -109
- package/lib/solution/BaseSales/index.js +27 -874
- package/lib/solution/BaseSales/types.d.ts +1 -55
- package/lib/solution/BaseSales/types.js +1 -2
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +1 -3
- package/lib/solution/BaseSales/utils/cartPromotion.js +12 -63
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -6
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -4
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +5 -21
- package/lib/solution/BookingTicket/index.js +13 -64
- package/lib/solution/BookingTicket/types.d.ts +0 -1
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -8
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +5 -37
- package/lib/solution/Sales/index.d.ts +0 -2
- package/lib/solution/Sales/index.js +6 -20
- package/lib/solution/ScanOrder/index.js +0 -8
- package/lib/solution/VenueBooking/index.d.ts +0 -1
- package/lib/solution/VenueBooking/index.js +0 -8
- package/lib/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/modules/Order/payment-utils.d.ts +0 -26
- package/dist/modules/Order/payment-utils.js +0 -225
- package/dist/utils/payment-number.d.ts +0 -9
- package/dist/utils/payment-number.js +0 -69
- package/lib/modules/Order/payment-utils.d.ts +0 -26
- package/lib/modules/Order/payment-utils.js +0 -224
- package/lib/utils/payment-number.d.ts +0 -9
- package/lib/utils/payment-number.js +0 -64
|
@@ -12,8 +12,6 @@ export declare const PROMOTION_ACTION_TYPES: {
|
|
|
12
12
|
readonly X_ITEMS_FOR_Y_PRICE: "X_ITEMS_FOR_Y_PRICE";
|
|
13
13
|
/** 买X送Y(买X件送Y件,可累计) */
|
|
14
14
|
readonly BUY_X_GET_Y_FREE: "BUY_X_GET_Y_FREE";
|
|
15
|
-
/** 商品奖励(满足条件后,订单内指定目标商品享优惠) */
|
|
16
|
-
readonly ITEM_REWARD: "ITEM_REWARD";
|
|
17
15
|
/** 固定折扣 */
|
|
18
16
|
readonly DISCOUNT_RATE: "DISCOUNT_RATE";
|
|
19
17
|
/** 固定减价 */
|
|
@@ -68,59 +66,6 @@ export interface BuyXGetYFreeConfig {
|
|
|
68
66
|
/** 可选的赠品列表 */
|
|
69
67
|
giftProducts?: ProductIdentifier[];
|
|
70
68
|
}
|
|
71
|
-
/**
|
|
72
|
-
* 商品奖励优惠方式
|
|
73
|
-
*
|
|
74
|
-
* - free: 目标商品最终价为 0
|
|
75
|
-
* - percent_off: 目标商品按百分比折扣,rewardValue 为 0-100
|
|
76
|
-
* - amount_off: 每个目标商品固定减免 rewardValue
|
|
77
|
-
* - fixed_price: 目标商品改为固定价 rewardValue
|
|
78
|
-
*/
|
|
79
|
-
export type ItemRewardMethod = 'free' | 'percent_off' | 'amount_off' | 'fixed_price';
|
|
80
|
-
/**
|
|
81
|
-
* 商品奖励数量规则
|
|
82
|
-
*
|
|
83
|
-
* - per_condition_quantity: 每满足 N 个条件商品,奖励 Y 个目标商品
|
|
84
|
-
* - all_targets: 满足条件后奖励全部目标商品
|
|
85
|
-
* - max_per_order: 满足条件后每单最多奖励固定数量目标商品
|
|
86
|
-
*/
|
|
87
|
-
export type ItemRewardQuantityRule = 'per_condition_quantity' | 'all_targets' | 'max_per_order';
|
|
88
|
-
/** 商品奖励目标选择规则 */
|
|
89
|
-
export type ItemRewardTargetSelection = 'consumer_best';
|
|
90
|
-
/**
|
|
91
|
-
* 商品奖励 - Action Value
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* value: {
|
|
95
|
-
* rewardMethod: 'free',
|
|
96
|
-
* quantityRule: 'per_condition_quantity',
|
|
97
|
-
* triggerQuantity: 1,
|
|
98
|
-
* rewardQuantity: 1,
|
|
99
|
-
* }
|
|
100
|
-
*/
|
|
101
|
-
export interface ItemRewardValue {
|
|
102
|
-
/** 奖励方式 */
|
|
103
|
-
rewardMethod: ItemRewardMethod;
|
|
104
|
-
/** 奖励值:percent_off/amount_off/fixed_price 使用,free 可省略 */
|
|
105
|
-
rewardValue?: number;
|
|
106
|
-
/** 奖励数量规则 */
|
|
107
|
-
quantityRule: ItemRewardQuantityRule;
|
|
108
|
-
/** 每满足 N 个条件商品;默认 1 */
|
|
109
|
-
triggerQuantity?: number;
|
|
110
|
-
/** 奖励 Y 个目标商品;默认 1 */
|
|
111
|
-
rewardQuantity?: number;
|
|
112
|
-
/** 每单最多奖励 Y 个目标商品;max_per_order 使用 */
|
|
113
|
-
maxRewardQuantity?: number;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* 商品奖励 - Action Config
|
|
117
|
-
*/
|
|
118
|
-
export interface ItemRewardConfig {
|
|
119
|
-
/** 奖励对象,本期支持指定商品/变体;product_variant_id=0 表示任意变体 */
|
|
120
|
-
rewardTargets?: ProductIdentifier[];
|
|
121
|
-
/** 目标商品超额时的选择规则;本期支持 consumer_best */
|
|
122
|
-
targetSelection?: ItemRewardTargetSelection;
|
|
123
|
-
}
|
|
124
69
|
/**
|
|
125
70
|
* 商品标识
|
|
126
71
|
*
|
|
@@ -157,19 +102,10 @@ export interface BuyXGetYFreeAction extends Omit<ActionEffect, 'type' | 'value'
|
|
|
157
102
|
valueType: 'object';
|
|
158
103
|
config?: BuyXGetYFreeConfig;
|
|
159
104
|
}
|
|
160
|
-
/**
|
|
161
|
-
* 商品奖励 Action
|
|
162
|
-
*/
|
|
163
|
-
export interface ItemRewardAction extends Omit<ActionEffect, 'type' | 'value' | 'config'> {
|
|
164
|
-
type: typeof PROMOTION_ACTION_TYPES.ITEM_REWARD;
|
|
165
|
-
value: ItemRewardValue;
|
|
166
|
-
valueType: 'object';
|
|
167
|
-
config?: ItemRewardConfig;
|
|
168
|
-
}
|
|
169
105
|
/**
|
|
170
106
|
* 促销活动 Action 联合类型
|
|
171
107
|
*/
|
|
172
|
-
export type PromotionAction = XItemsForYPriceAction | BuyXGetYFreeAction
|
|
108
|
+
export type PromotionAction = XItemsForYPriceAction | BuyXGetYFreeAction;
|
|
173
109
|
/**
|
|
174
110
|
* 促销相关运算符
|
|
175
111
|
*/
|
|
@@ -234,8 +170,6 @@ export interface PromotionProduct {
|
|
|
234
170
|
quantity: number;
|
|
235
171
|
/** 原价 */
|
|
236
172
|
original_price?: number;
|
|
237
|
-
/** 内部字段:编辑态订单行只允许参与 ITEM_REWARD,避免旧促销误算历史行 */
|
|
238
|
-
_promotionOnlyForItemReward?: boolean;
|
|
239
173
|
}
|
|
240
174
|
/**
|
|
241
175
|
* 促销活动适配器转换结果
|
|
@@ -261,7 +195,7 @@ export interface PromotionTransformResult {
|
|
|
261
195
|
/**
|
|
262
196
|
* Action 详情联合类型
|
|
263
197
|
*/
|
|
264
|
-
export type PromotionActionDetail = XItemsForYPriceActionDetail | BuyXGetYFreeActionDetail
|
|
198
|
+
export type PromotionActionDetail = XItemsForYPriceActionDetail | BuyXGetYFreeActionDetail;
|
|
265
199
|
/**
|
|
266
200
|
* X件Y元 Action 详情
|
|
267
201
|
*/
|
|
@@ -292,28 +226,6 @@ export interface BuyXGetYFreeActionDetail {
|
|
|
292
226
|
/** 可选的赠品列表 */
|
|
293
227
|
giftProducts: ProductIdentifier[];
|
|
294
228
|
}
|
|
295
|
-
/**
|
|
296
|
-
* 商品奖励 Action 详情
|
|
297
|
-
*/
|
|
298
|
-
export interface ItemRewardActionDetail {
|
|
299
|
-
type: typeof PROMOTION_ACTION_TYPES.ITEM_REWARD;
|
|
300
|
-
/** 奖励方式 */
|
|
301
|
-
rewardMethod: ItemRewardMethod;
|
|
302
|
-
/** 奖励值:percent_off/amount_off/fixed_price 使用,free 为 0 */
|
|
303
|
-
rewardValue: number;
|
|
304
|
-
/** 奖励数量规则 */
|
|
305
|
-
quantityRule: ItemRewardQuantityRule;
|
|
306
|
-
/** 每满足 N 个条件商品;默认 1 */
|
|
307
|
-
triggerQuantity: number;
|
|
308
|
-
/** 奖励 Y 个目标商品;默认 1 */
|
|
309
|
-
rewardQuantity: number;
|
|
310
|
-
/** 每单最多奖励 Y 个目标商品;max_per_order 使用 */
|
|
311
|
-
maxRewardQuantity?: number;
|
|
312
|
-
/** 奖励对象,本期支持指定商品/变体 */
|
|
313
|
-
rewardTargets: ProductIdentifier[];
|
|
314
|
-
/** 目标商品超额时的选择规则 */
|
|
315
|
-
targetSelection: ItemRewardTargetSelection;
|
|
316
|
-
}
|
|
317
229
|
/**
|
|
318
230
|
* X件Y元 - 业务层计算结果
|
|
319
231
|
*
|
|
@@ -16,8 +16,6 @@ export var PROMOTION_ACTION_TYPES = {
|
|
|
16
16
|
X_ITEMS_FOR_Y_PRICE: 'X_ITEMS_FOR_Y_PRICE',
|
|
17
17
|
/** 买X送Y(买X件送Y件,可累计) */
|
|
18
18
|
BUY_X_GET_Y_FREE: 'BUY_X_GET_Y_FREE',
|
|
19
|
-
/** 商品奖励(满足条件后,订单内指定目标商品享优惠) */
|
|
20
|
-
ITEM_REWARD: 'ITEM_REWARD',
|
|
21
19
|
/** 固定折扣 */
|
|
22
20
|
DISCOUNT_RATE: 'DISCOUNT_RATE',
|
|
23
21
|
/** 固定减价 */
|
|
@@ -56,41 +54,6 @@ export var PROMOTION_ACTION_TYPES = {
|
|
|
56
54
|
* 买X送Y - Action Config
|
|
57
55
|
*/
|
|
58
56
|
|
|
59
|
-
/**
|
|
60
|
-
* 商品奖励优惠方式
|
|
61
|
-
*
|
|
62
|
-
* - free: 目标商品最终价为 0
|
|
63
|
-
* - percent_off: 目标商品按百分比折扣,rewardValue 为 0-100
|
|
64
|
-
* - amount_off: 每个目标商品固定减免 rewardValue
|
|
65
|
-
* - fixed_price: 目标商品改为固定价 rewardValue
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 商品奖励数量规则
|
|
70
|
-
*
|
|
71
|
-
* - per_condition_quantity: 每满足 N 个条件商品,奖励 Y 个目标商品
|
|
72
|
-
* - all_targets: 满足条件后奖励全部目标商品
|
|
73
|
-
* - max_per_order: 满足条件后每单最多奖励固定数量目标商品
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
/** 商品奖励目标选择规则 */
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* 商品奖励 - Action Value
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* value: {
|
|
83
|
-
* rewardMethod: 'free',
|
|
84
|
-
* quantityRule: 'per_condition_quantity',
|
|
85
|
-
* triggerQuantity: 1,
|
|
86
|
-
* rewardQuantity: 1,
|
|
87
|
-
* }
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* 商品奖励 - Action Config
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
57
|
// ============================================
|
|
95
58
|
// 商品标识
|
|
96
59
|
// ============================================
|
|
@@ -115,10 +78,6 @@ export var PROMOTION_ACTION_TYPES = {
|
|
|
115
78
|
* 买X送Y Action
|
|
116
79
|
*/
|
|
117
80
|
|
|
118
|
-
/**
|
|
119
|
-
* 商品奖励 Action
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
81
|
/**
|
|
123
82
|
* 促销活动 Action 联合类型
|
|
124
83
|
*/
|
|
@@ -187,10 +146,6 @@ var obj = {
|
|
|
187
146
|
* 买X送Y Action 详情
|
|
188
147
|
*/
|
|
189
148
|
|
|
190
|
-
/**
|
|
191
|
-
* 商品奖励 Action 详情
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
149
|
// ============================================
|
|
195
150
|
// 业务层输出类型(供参考)
|
|
196
151
|
// ============================================
|
|
@@ -257,6 +257,7 @@ export var WalletPassEvaluator = /*#__PURE__*/function () {
|
|
|
257
257
|
var rawText = this.getText(reasonCode);
|
|
258
258
|
// 金额类型字段:从 otherParams.getData 取货币符号;非金额或取不到则留空
|
|
259
259
|
var currency = failedField && AMOUNT_FIELDS.has(failedField) ? ((_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 || (_this$otherParams$get = (_this$otherParams2 = _this$otherParams).getData) === null || _this$otherParams$get === void 0 ? void 0 : _this$otherParams$get.call(_this$otherParams2, 'shop_symbol')) || '' : '';
|
|
260
|
+
console.log(currency, 'currency12345');
|
|
260
261
|
var reason = thresholdValue !== undefined ? formatReason(rawText, thresholdValue, currency) : rawText;
|
|
261
262
|
results.push({
|
|
262
263
|
voucher: voucher,
|
|
@@ -505,6 +506,7 @@ export var WalletPassEvaluator = /*#__PURE__*/function () {
|
|
|
505
506
|
}, {
|
|
506
507
|
key: "calculateApplicableProducts",
|
|
507
508
|
value: function calculateApplicableProducts(products, applicableProductIds, deductTaxAndFee) {
|
|
509
|
+
console.log(products, 'products1234');
|
|
508
510
|
var total = 0;
|
|
509
511
|
var count = 0;
|
|
510
512
|
|
|
@@ -26,11 +26,6 @@ export interface Voucher {
|
|
|
26
26
|
recommended_usage_amount: number;
|
|
27
27
|
/** 后端计算推荐使用金额(仅商品) 不包含税费附加费 */
|
|
28
28
|
recommended_pure_product_usage_amount: number;
|
|
29
|
-
/**
|
|
30
|
-
* 扫码资产自身可供前端重新计算的金额基准。
|
|
31
|
-
* 后端 recommended_usage_amount 会包含当前已选券上下文,取消勾选后不能继续把它当作资产永久上限。
|
|
32
|
-
*/
|
|
33
|
-
_wallet_asset_recalculation_base_amount?: number;
|
|
34
29
|
/** 实际抵扣金额 */
|
|
35
30
|
actualDeduction: number;
|
|
36
31
|
/** 抵扣详情 */
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
7
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3
8
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
9
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -6,25 +11,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
6
11
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
12
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
import Decimal from 'decimal.js';
|
|
15
|
-
var DEFAULT_WALLET_PASS_CALCULATION_CONFIG = {
|
|
16
|
-
maxDeductionAmount: 99999,
|
|
17
|
-
maxUsagePerOrder: 0,
|
|
18
|
-
allowCrossProduct: true,
|
|
19
|
-
applicableProductLimit: 0,
|
|
20
|
-
deductTaxAndFee: true,
|
|
21
|
-
maxPassesPerItem: 0,
|
|
22
|
-
deductOptionPrice: false
|
|
23
|
-
};
|
|
24
|
-
function getWalletPassCalculationConfig(voucher) {
|
|
25
|
-
return _objectSpread(_objectSpread({}, DEFAULT_WALLET_PASS_CALCULATION_CONFIG), (voucher === null || voucher === void 0 ? void 0 : voucher.config) || {});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
15
|
/** 订单商品数量 */
|
|
29
16
|
export var getProductQuantity = function getProductQuantity(product) {
|
|
30
17
|
return product.quantity || product.product_quantity || 1;
|
|
@@ -85,22 +72,12 @@ function applyMaxPassUsageIncrements(usageMap, walletPassProductId, maxPassesPer
|
|
|
85
72
|
// 辅助函数:根据 deductTaxAndFee 配置获取推荐使用金额
|
|
86
73
|
var getRecommendedAmount = function getRecommendedAmount(voucher) {
|
|
87
74
|
var _config$deductTaxAndF;
|
|
75
|
+
console.log('voucher312', voucher);
|
|
88
76
|
var config = voucher.config,
|
|
89
77
|
recommended_usage_amount = voucher.recommended_usage_amount,
|
|
90
78
|
recommended_pure_product_usage_amount = voucher.recommended_pure_product_usage_amount;
|
|
91
79
|
var deductTaxAndFee = (_config$deductTaxAndF = config === null || config === void 0 ? void 0 : config.deductTaxAndFee) !== null && _config$deductTaxAndF !== void 0 ? _config$deductTaxAndF : true; // 默认开启抵扣税费
|
|
92
80
|
|
|
93
|
-
// 扫码接口的 recommended_* 金额包含搜索时已选券的上下文,可能只是当时的
|
|
94
|
-
// 剩余可抵扣额。取消其他券后,前端重算需要回到资产自身金额基准,再由
|
|
95
|
-
// 剩余订单金额、适用商品金额和策略上限重新裁剪。
|
|
96
|
-
var rawRecalculationBaseAmount = voucher._wallet_asset_recalculation_base_amount;
|
|
97
|
-
if (rawRecalculationBaseAmount !== undefined && rawRecalculationBaseAmount !== null) {
|
|
98
|
-
var recalculationBaseAmount = Number(rawRecalculationBaseAmount);
|
|
99
|
-
if (Number.isFinite(recalculationBaseAmount) && recalculationBaseAmount >= 0) {
|
|
100
|
-
return recalculationBaseAmount;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
81
|
// 如果开启抵扣税费,使用 recommended_usage_amount(包含税费)
|
|
105
82
|
// 如果关闭抵扣税费,使用 recommended_pure_product_usage_amount(仅商品金额)
|
|
106
83
|
return deductTaxAndFee ? recommended_usage_amount : recommended_pure_product_usage_amount !== null && recommended_pure_product_usage_amount !== void 0 ? recommended_pure_product_usage_amount : recommended_usage_amount;
|
|
@@ -189,6 +166,8 @@ var getApplicableProducts = function getApplicableProducts(voucher, productsData
|
|
|
189
166
|
* @returns 返回推荐券列表和全部列表,每个券包含 _available_max_amount 和 _unified_available_status
|
|
190
167
|
*/
|
|
191
168
|
export function processVouchers(applicableVouchers, orderTotalAmount, products) {
|
|
169
|
+
console.log(products, 'products123');
|
|
170
|
+
|
|
192
171
|
// 拆分商品数据,同时维护含税和不含税两个金额池
|
|
193
172
|
// remainingAmountWithTax: 含税费的剩余可抵扣金额
|
|
194
173
|
// remainingAmountPure: 纯商品金额(不含税费)的剩余可抵扣金额
|
|
@@ -306,6 +285,7 @@ export function processVouchers(applicableVouchers, orderTotalAmount, products)
|
|
|
306
285
|
// 辅助函数:判断券是否可用,返回可用性和原因代码
|
|
307
286
|
var isVoucherAvailable = function isVoucherAvailable(voucher, productsData, usedVoucherCounts, itemPassUsage) {
|
|
308
287
|
var config = voucher.config,
|
|
288
|
+
id = voucher.id,
|
|
309
289
|
product_id = voucher.product_id;
|
|
310
290
|
|
|
311
291
|
// 根据 deductTaxAndFee 配置获取推荐金额
|
|
@@ -679,7 +659,6 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
679
659
|
var productsForCalc = expandProductsWithBundleItems(products, true);
|
|
680
660
|
var remainingOrderAmount = new Decimal(orderTotalAmount);
|
|
681
661
|
var selectedWithDetails = [];
|
|
682
|
-
var usedVoucherCounts = new Map();
|
|
683
662
|
|
|
684
663
|
// 追踪每个 Wallet Pass 商品对每个订单商品行的已使用卡券次数(按行唯一键)
|
|
685
664
|
var itemPassUsageMap = new Map();
|
|
@@ -699,26 +678,15 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
699
678
|
// 第一步:按顺序应用已选中的券,计算实际抵扣
|
|
700
679
|
selectedVouchers.forEach(function (selectedVoucher) {
|
|
701
680
|
var _selectedVoucher$_ava;
|
|
702
|
-
var
|
|
703
|
-
|
|
681
|
+
var config = selectedVoucher.config,
|
|
682
|
+
id = selectedVoucher.id;
|
|
704
683
|
var maxDeductionAmount = config.maxDeductionAmount,
|
|
705
|
-
maxUsagePerOrder = config.maxUsagePerOrder,
|
|
706
684
|
allowCrossProduct = config.allowCrossProduct,
|
|
707
685
|
applicableProductLimit = config.applicableProductLimit,
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
selectedWithDetails.push(_objectSpread(_objectSpread({}, selectedVoucher), {}, {
|
|
713
|
-
config: config,
|
|
714
|
-
actualDeduction: 0,
|
|
715
|
-
deductionDetails: [],
|
|
716
|
-
_available_max_amount: 0,
|
|
717
|
-
_unified_available_status: 0,
|
|
718
|
-
reasonCode: 'usage_limit_reached'
|
|
719
|
-
}));
|
|
720
|
-
return;
|
|
721
|
-
}
|
|
686
|
+
_config$deductTaxAndF4 = config.deductTaxAndFee,
|
|
687
|
+
deductTaxAndFee = _config$deductTaxAndF4 === void 0 ? true : _config$deductTaxAndF4,
|
|
688
|
+
_config$maxPassesPerI = config.maxPassesPerItem,
|
|
689
|
+
maxPassesPerItem = _config$maxPassesPerI === void 0 ? 0 : _config$maxPassesPerI;
|
|
722
690
|
|
|
723
691
|
// 根据券的配置选择使用哪个单价字段和金额字段
|
|
724
692
|
var unitPriceField = deductTaxAndFee ? 'unitPriceWithTax' : 'unitPricePure';
|
|
@@ -734,7 +702,6 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
734
702
|
if (applicableProducts.length === 0) {
|
|
735
703
|
// 无适用商品,跳过
|
|
736
704
|
selectedWithDetails.push(_objectSpread(_objectSpread({}, selectedVoucher), {}, {
|
|
737
|
-
config: config,
|
|
738
705
|
actualDeduction: 0,
|
|
739
706
|
deductionDetails: [],
|
|
740
707
|
_available_max_amount: 0,
|
|
@@ -831,7 +798,6 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
831
798
|
remainingOrderAmount = remainingOrderAmount.minus(totalDeducted);
|
|
832
799
|
applyMaxPassUsageIncrements(itemPassUsageMap, selectedVoucher.product_id, maxPassesPerItem, deductionDetails);
|
|
833
800
|
selectedWithDetails.push(_objectSpread(_objectSpread({}, selectedVoucher), {}, {
|
|
834
|
-
config: config,
|
|
835
801
|
actualDeduction: totalDeducted.toNumber(),
|
|
836
802
|
// 转换为数字
|
|
837
803
|
deductionDetails: deductionDetails,
|
|
@@ -839,15 +805,16 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
839
805
|
// 转换为数字
|
|
840
806
|
_unified_available_status: totalDeducted.greaterThan(0) ? 1 : 0
|
|
841
807
|
}));
|
|
842
|
-
if (totalDeducted.greaterThan(0)) {
|
|
843
|
-
usedVoucherCounts.set(product_id, usedCount + 1);
|
|
844
|
-
}
|
|
845
808
|
});
|
|
846
809
|
|
|
847
810
|
// 第二步:为所有券重新计算 _available_max_amount 和 _unified_available_status
|
|
848
811
|
var selectedIds = new Set(selectedVouchers.map(function (v) {
|
|
849
812
|
return v.id;
|
|
850
813
|
}));
|
|
814
|
+
var usedVoucherCounts = new Map();
|
|
815
|
+
selectedVouchers.forEach(function (v) {
|
|
816
|
+
usedVoucherCounts.set(v.product_id, (usedVoucherCounts.get(v.product_id) || 0) + 1);
|
|
817
|
+
});
|
|
851
818
|
var allWithUpdatedStatus = allVouchers.map(function (voucher) {
|
|
852
819
|
// 如果是已选中的券,使用详细计算结果
|
|
853
820
|
if (selectedIds.has(voucher.id)) {
|
|
@@ -858,13 +825,16 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
858
825
|
}
|
|
859
826
|
|
|
860
827
|
// 未选中的券,重新计算其可用状态
|
|
861
|
-
var
|
|
862
|
-
|
|
828
|
+
var config = voucher.config,
|
|
829
|
+
id = voucher.id,
|
|
830
|
+
product_id = voucher.product_id;
|
|
863
831
|
var maxDeductionAmount = config.maxDeductionAmount,
|
|
864
832
|
allowCrossProduct = config.allowCrossProduct,
|
|
865
833
|
applicableProductLimit = config.applicableProductLimit,
|
|
866
|
-
|
|
867
|
-
|
|
834
|
+
_config$deductTaxAndF5 = config.deductTaxAndFee,
|
|
835
|
+
deductTaxAndFee = _config$deductTaxAndF5 === void 0 ? true : _config$deductTaxAndF5,
|
|
836
|
+
_config$maxPassesPerI2 = config.maxPassesPerItem,
|
|
837
|
+
maxPassesPerItem = _config$maxPassesPerI2 === void 0 ? 0 : _config$maxPassesPerI2;
|
|
868
838
|
|
|
869
839
|
// 根据券的配置选择使用哪个单价字段和金额字段
|
|
870
840
|
var unitPriceField = deductTaxAndFee ? 'unitPriceWithTax' : 'unitPricePure';
|
|
@@ -959,7 +929,6 @@ export function recalculateVouchers(allVouchers, selectedVouchers, orderTotalAmo
|
|
|
959
929
|
}
|
|
960
930
|
}
|
|
961
931
|
return _objectSpread(_objectSpread({}, voucher), {}, {
|
|
962
|
-
config: config,
|
|
963
932
|
_available_max_amount: calculatedMaxAmount.toNumber(),
|
|
964
933
|
// 转换为数字
|
|
965
934
|
_unified_available_status: isAvailable ? 1 : 0
|
|
@@ -27,8 +27,6 @@ export declare class OpenDataModule extends BaseModule implements Module {
|
|
|
27
27
|
fetchOpenData(params: OpenDataFetchParams): Promise<OpenDataConfig>;
|
|
28
28
|
getOpenData(): OpenDataConfig | null;
|
|
29
29
|
getLastFetchedAt(): number | null;
|
|
30
|
-
/** 清除内存与 sessionStorage 镜像中的 OpenData,供宿主切店时调用。 */
|
|
31
|
-
clearCache(): void;
|
|
32
30
|
checkAvailability(scheduleModule?: ScheduleModule): OpenDataAvailabilityResult;
|
|
33
31
|
storeChange(): void;
|
|
34
32
|
}
|
|
@@ -166,14 +166,6 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
166
166
|
var _this$store$lastFetch;
|
|
167
167
|
return (_this$store$lastFetch = this.store.lastFetchedAt) !== null && _this$store$lastFetch !== void 0 ? _this$store$lastFetch : null;
|
|
168
168
|
}
|
|
169
|
-
|
|
170
|
-
/** 清除内存与 sessionStorage 镜像中的 OpenData,供宿主切店时调用。 */
|
|
171
|
-
}, {
|
|
172
|
-
key: "clearCache",
|
|
173
|
-
value: function clearCache() {
|
|
174
|
-
this.store.data = null;
|
|
175
|
-
this.store.lastFetchedAt = null;
|
|
176
|
-
}
|
|
177
169
|
}, {
|
|
178
170
|
key: "checkAvailability",
|
|
179
171
|
value: function checkAvailability(scheduleModule) {
|
|
@@ -3,7 +3,7 @@ import { BaseModule } from '../BaseModule';
|
|
|
3
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, AddProductToOrderOptions, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData,
|
|
6
|
+
import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions } from './types';
|
|
7
7
|
import type { ICustomer } from '../AccountList/types';
|
|
8
8
|
import type { Discount } from '../Discount/types';
|
|
9
9
|
import { UnavailableReason } from '../Rules/types';
|
|
@@ -14,7 +14,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
14
14
|
private request;
|
|
15
15
|
private logger;
|
|
16
16
|
private window;
|
|
17
|
-
private appPlugin;
|
|
18
17
|
private cacheId;
|
|
19
18
|
private salesSummaryModuleName;
|
|
20
19
|
private rulesHooksOverride?;
|
|
@@ -81,7 +80,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
81
80
|
private ensureEditDiscountConfigForProductChange;
|
|
82
81
|
scanCode(code: string, customerId?: number): Promise<{
|
|
83
82
|
isAvailable: boolean;
|
|
84
|
-
isAccepted?: boolean;
|
|
85
83
|
discountList: Discount[];
|
|
86
84
|
type: 'server' | 'clientCalc';
|
|
87
85
|
unavailableReason?: UnavailableReason;
|
|
@@ -178,9 +176,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
178
176
|
};
|
|
179
177
|
private calculateDepositPaidAmount;
|
|
180
178
|
private resolveNextOrderPaymentType;
|
|
181
|
-
private getPaymentNumberAppData;
|
|
182
|
-
private getPaymentNumberDevicePrefixSync;
|
|
183
|
-
private getPaymentNumberDevicePrefixAsync;
|
|
184
179
|
private normalizePaymentSource;
|
|
185
180
|
private updateTempOrderPaymentStatus;
|
|
186
181
|
private shouldKeepPaymentStatusAfterAmountRecalc;
|
|
@@ -312,20 +307,19 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
312
307
|
* 用一组支付来源覆盖当前订单支付项。
|
|
313
308
|
*
|
|
314
309
|
* 入参允许来自 PaymentModule 的 PaymentItem,内部统一映射为 Sales 协议:
|
|
315
|
-
*
|
|
310
|
+
* uuid -> metadata.unique_payment_number,id -> custom_payment_id,
|
|
316
311
|
* isSynced 等运行态字段不会进入 tempOrder.payments。
|
|
317
312
|
*/
|
|
318
313
|
setOrderPayments(payments: OrderPaymentSource[]): OrderPaymentData[];
|
|
319
|
-
/**
|
|
314
|
+
/** 追加单个支付项,并立即持久化当前 tempOrder。 */
|
|
320
315
|
addOrderPayment(payment: OrderPaymentSource): OrderPaymentData[];
|
|
321
|
-
/** 异步入口:创建支付项时读取最新 IoT 设备短号。 */
|
|
322
|
-
addOrderPaymentAsync(payment: OrderPaymentSource): Promise<OrderPaymentData[]>;
|
|
323
|
-
private addOrderPaymentWithDevicePrefix;
|
|
324
316
|
/**
|
|
325
|
-
*
|
|
326
|
-
*
|
|
317
|
+
* 按支付唯一号、后端支付 ID、自定义支付方式 ID 或旧 uuid 更新支付项。
|
|
318
|
+
*
|
|
319
|
+
* 该方法服务 PaymentModal 的 void / 编辑场景;更新 metadata 时会做浅合并,
|
|
320
|
+
* 避免覆盖 unique_payment_number、现金实付/找零等已有元数据。
|
|
327
321
|
*/
|
|
328
|
-
updateOrderPayment(paymentIdentity: string | number, updates: Partial<OrderPaymentData> & Record<string, any
|
|
322
|
+
updateOrderPayment(paymentIdentity: string | number, updates: Partial<OrderPaymentData> & Record<string, any>): OrderPaymentData[];
|
|
329
323
|
/** 从当前订单支付项中移除指定支付项。 */
|
|
330
324
|
deleteOrderPayment(paymentIdentity: string | number): OrderPaymentData[];
|
|
331
325
|
private confirmPendingVoucherPaymentsInList;
|
|
@@ -348,11 +342,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
348
342
|
*/
|
|
349
343
|
updateVoucherOrderPayments(payments: OrderPaymentSource[], options?: {
|
|
350
344
|
status?: 'paid' | 'payment_pending';
|
|
351
|
-
devicePrefix?: string;
|
|
352
345
|
}): OrderPaymentData[];
|
|
353
|
-
updateVoucherOrderPaymentsAsync(payments: OrderPaymentSource[], options?: {
|
|
354
|
-
status?: 'paid' | 'payment_pending';
|
|
355
|
-
}): Promise<OrderPaymentData[]>;
|
|
356
346
|
private shouldMergeProductToOrder;
|
|
357
347
|
private hasOrderProductLineNote;
|
|
358
348
|
/**
|
|
@@ -437,14 +427,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
437
427
|
type?: string;
|
|
438
428
|
}): import("./types").OrderSubmitPayload;
|
|
439
429
|
applyLocalPrintOrderNumbers(order?: Record<string, any> | null): Promise<OrderTempOrder>;
|
|
440
|
-
saveTempOrderAsDraft<T = any>(params?: {
|
|
441
|
-
cacheId?: string;
|
|
442
|
-
platform?: string;
|
|
443
|
-
businessCode?: string;
|
|
444
|
-
channel?: string;
|
|
445
|
-
type?: string;
|
|
446
|
-
enhancePayload?: SubmitPayloadEnhancer;
|
|
447
|
-
}): Promise<T>;
|
|
448
430
|
/**
|
|
449
431
|
* 提交当前 Sales tempOrder。
|
|
450
432
|
*
|
|
@@ -549,8 +531,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
549
531
|
*/
|
|
550
532
|
private seedAnonymousBookingUidsFromProducts;
|
|
551
533
|
private normalizeTempOrderForRuntime;
|
|
552
|
-
private isSyntheticDraftOrderIdForRuntime;
|
|
553
|
-
private withoutSyntheticDraftOrderIdForRuntime;
|
|
554
534
|
private hydrateLinkedBookingIdentity;
|
|
555
535
|
private pickHydratedDisplayText;
|
|
556
536
|
private formatHydratedNamePair;
|