@pisell/pisellos 2.2.267 → 2.2.269
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 +2 -0
- package/dist/core/index.js +7 -0
- package/dist/model/strategy/adapter/promotion/adapter.d.ts +4 -0
- package/dist/model/strategy/adapter/promotion/adapter.js +23 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +17 -0
- package/dist/model/strategy/adapter/promotion/evaluator.js +279 -6
- package/dist/model/strategy/adapter/promotion/examples.d.ts +86 -0
- package/dist/model/strategy/adapter/promotion/examples.js +99 -0
- package/dist/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/dist/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/model/strategy/adapter/promotion/type.d.ts +90 -2
- package/dist/model/strategy/adapter/promotion/type.js +45 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +12 -10
- package/dist/modules/OpenData/index.d.ts +2 -0
- package/dist/modules/OpenData/index.js +8 -0
- package/dist/modules/Order/index.d.ts +33 -13
- package/dist/modules/Order/index.js +883 -524
- package/dist/modules/Order/payment-utils.d.ts +26 -0
- package/dist/modules/Order/payment-utils.js +225 -0
- package/dist/modules/Order/types.d.ts +56 -4
- package/dist/modules/Order/types.js +11 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.js +7 -2
- package/dist/modules/Order/utils.js +10 -6
- package/dist/modules/Payment/index.d.ts +2 -0
- package/dist/modules/Payment/index.js +78 -49
- package/dist/modules/Payment/types.d.ts +104 -25
- package/dist/modules/Payment/types.js +17 -0
- package/dist/modules/Payment/walletpass.d.ts +38 -1
- package/dist/modules/Payment/walletpass.js +917 -114
- package/dist/modules/Rules/index.d.ts +3 -0
- package/dist/modules/Rules/index.js +146 -106
- package/dist/modules/SalesSummary/utils.js +7 -1
- package/dist/server/index.d.ts +16 -0
- package/dist/server/index.js +1940 -1043
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +70 -4
- package/dist/server/modules/order/index.js +1816 -728
- package/dist/server/modules/order/types.d.ts +25 -3
- package/dist/server/modules/order/types.js +7 -1
- package/dist/solution/BaseSales/index.d.ts +118 -9
- package/dist/solution/BaseSales/index.js +1849 -480
- package/dist/solution/BaseSales/types.d.ts +55 -1
- package/dist/solution/BaseSales/types.js +2 -1
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +3 -1
- package/dist/solution/BaseSales/utils/cartPromotion.js +90 -31
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +6 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +6 -3
- package/dist/solution/BookingTicket/index.d.ts +8 -16
- package/dist/solution/BookingTicket/index.js +138 -52
- package/dist/solution/BookingTicket/types.d.ts +4 -0
- package/dist/solution/BookingTicket/utils/cartView.js +44 -32
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +8 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +173 -83
- package/dist/solution/Sales/index.d.ts +2 -0
- package/dist/solution/Sales/index.js +26 -4
- package/dist/solution/ScanOrder/index.js +31 -20
- package/dist/solution/VenueBooking/index.d.ts +1 -0
- package/dist/solution/VenueBooking/index.js +30 -19
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/payment-number.d.ts +9 -0
- package/dist/utils/payment-number.js +69 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +4 -0
- package/lib/model/strategy/adapter/promotion/adapter.d.ts +4 -0
- package/lib/model/strategy/adapter/promotion/adapter.js +20 -0
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +17 -0
- package/lib/model/strategy/adapter/promotion/evaluator.js +235 -0
- package/lib/model/strategy/adapter/promotion/examples.d.ts +86 -0
- package/lib/model/strategy/adapter/promotion/examples.js +91 -0
- package/lib/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/type.d.ts +90 -2
- package/lib/model/strategy/adapter/promotion/type.js +2 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -1
- package/lib/modules/OpenData/index.d.ts +2 -0
- package/lib/modules/OpenData/index.js +5 -0
- package/lib/modules/Order/index.d.ts +33 -13
- package/lib/modules/Order/index.js +306 -79
- package/lib/modules/Order/payment-utils.d.ts +26 -0
- package/lib/modules/Order/payment-utils.js +224 -0
- package/lib/modules/Order/types.d.ts +56 -4
- package/lib/modules/Order/utils/orderCollectionIdentity.js +3 -0
- package/lib/modules/Order/utils.js +11 -4
- package/lib/modules/Payment/index.d.ts +2 -0
- package/lib/modules/Payment/index.js +33 -12
- package/lib/modules/Payment/types.d.ts +104 -25
- package/lib/modules/Payment/types.js +1 -0
- package/lib/modules/Payment/walletpass.d.ts +38 -1
- package/lib/modules/Payment/walletpass.js +730 -21
- package/lib/modules/Rules/index.d.ts +3 -0
- package/lib/modules/Rules/index.js +54 -21
- package/lib/modules/SalesSummary/utils.js +5 -1
- package/lib/server/index.d.ts +16 -0
- package/lib/server/index.js +670 -18
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +70 -4
- package/lib/server/modules/order/index.js +818 -69
- package/lib/server/modules/order/types.d.ts +25 -3
- package/lib/server/modules/order/types.js +1 -0
- package/lib/solution/BaseSales/index.d.ts +118 -9
- package/lib/solution/BaseSales/index.js +902 -38
- package/lib/solution/BaseSales/types.d.ts +55 -1
- package/lib/solution/BaseSales/types.js +2 -1
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +3 -1
- package/lib/solution/BaseSales/utils/cartPromotion.js +63 -12
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +6 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -2
- package/lib/solution/BookingTicket/index.d.ts +8 -16
- package/lib/solution/BookingTicket/index.js +63 -9
- package/lib/solution/BookingTicket/types.d.ts +4 -0
- package/lib/solution/BookingTicket/utils/cartView.js +43 -30
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +8 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +37 -5
- package/lib/solution/Sales/index.d.ts +2 -0
- package/lib/solution/Sales/index.js +20 -6
- package/lib/solution/ScanOrder/index.js +8 -0
- package/lib/solution/VenueBooking/index.d.ts +1 -0
- package/lib/solution/VenueBooking/index.js +8 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/payment-number.d.ts +9 -0
- package/lib/utils/payment-number.js +64 -0
- package/package.json +1 -1
|
@@ -87,7 +87,13 @@ function getUnitOriginalTotal(product) {
|
|
|
87
87
|
function isGeneratedVoucherProduct(product) {
|
|
88
88
|
var record = product;
|
|
89
89
|
var metadata = (record === null || record === void 0 ? void 0 : record.metadata) || {};
|
|
90
|
-
|
|
90
|
+
var isGeneratedChild = metadata.parent_order_detail_id !== undefined || metadata.gift_card_type !== undefined;
|
|
91
|
+
if (isGeneratedChild) return true;
|
|
92
|
+
|
|
93
|
+
// `product_voucher` 既可能是当前购物车生成的零价子券,也可能是独立售卖的
|
|
94
|
+
// gift card。已有 order_detail_id 且没有 parent 标记的是后者,必须继续计价。
|
|
95
|
+
var isPersisted = (record === null || record === void 0 ? void 0 : record.order_detail_id) !== undefined && (record === null || record === void 0 ? void 0 : record.order_detail_id) !== null;
|
|
96
|
+
return (record === null || record === void 0 ? void 0 : record.extension_type) === 'product_voucher' && !isPersisted;
|
|
91
97
|
}
|
|
92
98
|
function buildSurchargeServiceItems(products) {
|
|
93
99
|
return products.map(function (product) {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare class Server {
|
|
|
57
57
|
private readonly BOOKING_REMOTE_CACHE_MAX_ENTRIES;
|
|
58
58
|
private salesSearchSubscribers;
|
|
59
59
|
private deviceTaskActionsRegistered;
|
|
60
|
+
private localPaymentUpdateQueues;
|
|
60
61
|
private floorPlanQuerySubscribers;
|
|
61
62
|
private moduleRegistry;
|
|
62
63
|
constructor(core: PisellCore);
|
|
@@ -120,6 +121,8 @@ declare class Server {
|
|
|
120
121
|
private handleSyncSalesTask;
|
|
121
122
|
private runCheckoutSync;
|
|
122
123
|
private omitCheckoutSyncMode;
|
|
124
|
+
private buildRemoteCheckoutData;
|
|
125
|
+
private mergeCheckoutSyncPayments;
|
|
123
126
|
private persistSyncedCheckoutOrder;
|
|
124
127
|
/**
|
|
125
128
|
* 将普通层 QuotationModule 的报价单计算能力桥接到 Server Products 模块。
|
|
@@ -453,6 +456,18 @@ declare class Server {
|
|
|
453
456
|
*/
|
|
454
457
|
private handleUpdateLocalOrder;
|
|
455
458
|
private handleOrderSalesCheckout;
|
|
459
|
+
private handleOrderSalesDraft;
|
|
460
|
+
private createLocalPaymentOperationId;
|
|
461
|
+
private buildLocalPaymentOrderLogContext;
|
|
462
|
+
private isValidLocalPaymentDecimal;
|
|
463
|
+
private getInvalidLocalPaymentSurchargeFields;
|
|
464
|
+
private buildLocalPaymentSurchargeUpdate;
|
|
465
|
+
private handleGetLocalPayment;
|
|
466
|
+
private handleUpdateLocalPayment;
|
|
467
|
+
private runLocalPaymentUpdateInQueue;
|
|
468
|
+
private processLocalPaymentUpdate;
|
|
469
|
+
private processSuccessfulLocalPayment;
|
|
470
|
+
private sanitizeLocalRecoveryOrder;
|
|
456
471
|
private handleOrderCheckout;
|
|
457
472
|
private getDeviceTaskPlugin;
|
|
458
473
|
private getIdGeneratorPlugin;
|
|
@@ -480,6 +495,7 @@ declare class Server {
|
|
|
480
495
|
private syncMachinecodeRedeemStatusToLocalOrder;
|
|
481
496
|
private handleOrderCheckoutSubmit;
|
|
482
497
|
private handleSyncCheckoutSubmit;
|
|
498
|
+
private handleOrderDraftSubmit;
|
|
483
499
|
private handlePendingSyncCheckoutOrder;
|
|
484
500
|
private buildPendingSyncCheckoutOrder;
|
|
485
501
|
private shouldBuildSmallTicketData;
|