@pisell/pisellos 0.0.245 → 0.0.246
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/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/Checkout/index.js +42 -30
- package/dist/solution/Checkout/types.d.ts +20 -1
- package/dist/solution/Checkout/types.js +1 -0
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/Checkout/index.js +11 -1
- package/lib/solution/Checkout/types.d.ts +20 -1
- package/lib/solution/Checkout/types.js +1 -0
- package/package.json +1 -1
|
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
111
111
|
* 获取当前的客户搜索条件
|
|
112
112
|
* @returns 当前搜索条件
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|
|
@@ -343,7 +343,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
343
343
|
key: "initWalletData",
|
|
344
344
|
value: function () {
|
|
345
345
|
var _initWalletData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
|
|
346
|
-
var _this$store$currentOr3, _this$store$currentCu;
|
|
346
|
+
var _this$store$currentOr3, _this$store$currentCu, _this$store$currentOr4;
|
|
347
347
|
var amountInfo, walletBusinessData;
|
|
348
348
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
349
349
|
while (1) switch (_context8.prev = _context8.next) {
|
|
@@ -367,6 +367,18 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
367
367
|
_context8.next = 6;
|
|
368
368
|
return this.payment.wallet.initializeWalletDataFromBusinessAsync(walletBusinessData);
|
|
369
369
|
case 6:
|
|
370
|
+
_context8.next = 8;
|
|
371
|
+
return this.core.effects.emit(CheckoutHooks.OnWalletDataInitialized, {
|
|
372
|
+
orderUuid: (_this$store$currentOr4 = this.store.currentOrder) === null || _this$store$currentOr4 === void 0 ? void 0 : _this$store$currentOr4.uuid,
|
|
373
|
+
customerId: walletBusinessData.customer_id,
|
|
374
|
+
walletBusinessData: {
|
|
375
|
+
customer_id: walletBusinessData.customer_id,
|
|
376
|
+
amountInfo: walletBusinessData.amountInfo,
|
|
377
|
+
order_wait_pay_amount: params === null || params === void 0 ? void 0 : params.order_wait_pay_amount
|
|
378
|
+
},
|
|
379
|
+
timestamp: Date.now()
|
|
380
|
+
});
|
|
381
|
+
case 8:
|
|
370
382
|
case "end":
|
|
371
383
|
return _context8.stop();
|
|
372
384
|
}
|
|
@@ -981,12 +993,12 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
981
993
|
key: "getCheckoutSummaryAsync",
|
|
982
994
|
value: (function () {
|
|
983
995
|
var _getCheckoutSummaryAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
984
|
-
var _this$store$
|
|
996
|
+
var _this$store$currentOr5, _this$store$currentOr6;
|
|
985
997
|
var totalAmount, paidAmount, remainingAmount;
|
|
986
998
|
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
987
999
|
while (1) switch (_context15.prev = _context15.next) {
|
|
988
1000
|
case 0:
|
|
989
|
-
totalAmount = ((_this$store$
|
|
1001
|
+
totalAmount = ((_this$store$currentOr5 = this.store.currentOrder) === null || _this$store$currentOr5 === void 0 ? void 0 : _this$store$currentOr5.total_amount) || '0.00';
|
|
990
1002
|
_context15.next = 3;
|
|
991
1003
|
return this.calculatePaidAmountAsync();
|
|
992
1004
|
case 3:
|
|
@@ -1000,7 +1012,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1000
1012
|
totalAmount: totalAmount,
|
|
1001
1013
|
paidAmount: paidAmount,
|
|
1002
1014
|
remainingAmount: remainingAmount,
|
|
1003
|
-
paymentStatus: ((_this$store$
|
|
1015
|
+
paymentStatus: ((_this$store$currentOr6 = this.store.currentOrder) === null || _this$store$currentOr6 === void 0 ? void 0 : _this$store$currentOr6.payment_status) || PaymentStatus.Processing,
|
|
1004
1016
|
availablePaymentMethods: this.store.paymentMethods
|
|
1005
1017
|
});
|
|
1006
1018
|
case 8:
|
|
@@ -1087,8 +1099,8 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1087
1099
|
}, {
|
|
1088
1100
|
key: "getOrderOriginalData",
|
|
1089
1101
|
value: function getOrderOriginalData() {
|
|
1090
|
-
var _this$store$
|
|
1091
|
-
return (_this$store$
|
|
1102
|
+
var _this$store$currentOr7;
|
|
1103
|
+
return (_this$store$currentOr7 = this.store.currentOrder) === null || _this$store$currentOr7 === void 0 ? void 0 : _this$store$currentOr7.order_info;
|
|
1092
1104
|
}
|
|
1093
1105
|
|
|
1094
1106
|
/**
|
|
@@ -2250,7 +2262,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2250
2262
|
key: "manualSyncOrderAsync",
|
|
2251
2263
|
value: (function () {
|
|
2252
2264
|
var _manualSyncOrderAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
2253
|
-
var orderUuid, oldOrderId, realOrderId, finalOrderId, finalIsVirtual, _this$store$
|
|
2265
|
+
var orderUuid, oldOrderId, realOrderId, finalOrderId, finalIsVirtual, _this$store$currentOr8, errorMessage;
|
|
2254
2266
|
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
2255
2267
|
while (1) switch (_context31.prev = _context31.next) {
|
|
2256
2268
|
case 0:
|
|
@@ -2326,7 +2338,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2326
2338
|
return _context31.abrupt("return", {
|
|
2327
2339
|
success: false,
|
|
2328
2340
|
message: "\u8BA2\u5355\u540C\u6B65\u5931\u8D25: ".concat(errorMessage),
|
|
2329
|
-
orderUuid: (_this$store$
|
|
2341
|
+
orderUuid: (_this$store$currentOr8 = this.store.currentOrder) === null || _this$store$currentOr8 === void 0 ? void 0 : _this$store$currentOr8.uuid
|
|
2330
2342
|
});
|
|
2331
2343
|
case 32:
|
|
2332
2344
|
case "end":
|
|
@@ -2403,15 +2415,15 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2403
2415
|
key: "cancelCurrentOrderAsync",
|
|
2404
2416
|
value: (function () {
|
|
2405
2417
|
var _cancelCurrentOrderAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(cancelReason) {
|
|
2406
|
-
var _this$store$
|
|
2418
|
+
var _this$store$currentOr9, _this$store$currentOr10, currentOrderUuid, currentOrderId, isOrderSynced, errorMessage;
|
|
2407
2419
|
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
2408
2420
|
while (1) switch (_context32.prev = _context32.next) {
|
|
2409
2421
|
case 0:
|
|
2410
2422
|
_context32.prev = 0;
|
|
2411
2423
|
console.log('[Checkout] 开始取消当前本地订单:', {
|
|
2412
2424
|
hasCurrentOrder: !!this.store.currentOrder,
|
|
2413
|
-
orderUuid: (_this$store$
|
|
2414
|
-
orderId: (_this$store$
|
|
2425
|
+
orderUuid: (_this$store$currentOr9 = this.store.currentOrder) === null || _this$store$currentOr9 === void 0 ? void 0 : _this$store$currentOr9.uuid,
|
|
2426
|
+
orderId: (_this$store$currentOr10 = this.store.currentOrder) === null || _this$store$currentOr10 === void 0 ? void 0 : _this$store$currentOr10.order_id,
|
|
2415
2427
|
isOrderSynced: this.store.isOrderSynced,
|
|
2416
2428
|
cancelReason: cancelReason
|
|
2417
2429
|
});
|
|
@@ -2525,7 +2537,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2525
2537
|
key: "saveForLaterPaymentAsync",
|
|
2526
2538
|
value: (function () {
|
|
2527
2539
|
var _saveForLaterPaymentAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
|
|
2528
|
-
var orderUuid, currentOrderId, allPaymentItems, filteredPaymentItems, voucherItems, realOrderId, finalOrderId, _this$store$
|
|
2540
|
+
var orderUuid, currentOrderId, allPaymentItems, filteredPaymentItems, voucherItems, realOrderId, finalOrderId, _this$store$currentOr11, errorMessage;
|
|
2529
2541
|
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
2530
2542
|
while (1) switch (_context33.prev = _context33.next) {
|
|
2531
2543
|
case 0:
|
|
@@ -2615,7 +2627,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2615
2627
|
return _context33.abrupt("return", {
|
|
2616
2628
|
success: false,
|
|
2617
2629
|
message: "\u8BA2\u5355\u4FDD\u5B58\u5931\u8D25: ".concat(errorMessage),
|
|
2618
|
-
orderUuid: (_this$store$
|
|
2630
|
+
orderUuid: (_this$store$currentOr11 = this.store.currentOrder) === null || _this$store$currentOr11 === void 0 ? void 0 : _this$store$currentOr11.uuid
|
|
2619
2631
|
});
|
|
2620
2632
|
case 26:
|
|
2621
2633
|
case "end":
|
|
@@ -2666,14 +2678,14 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2666
2678
|
key: "updateShopDiscountAsync",
|
|
2667
2679
|
value: (function () {
|
|
2668
2680
|
var _updateShopDiscountAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(discountAmount) {
|
|
2669
|
-
var _this$store$
|
|
2681
|
+
var _this$store$currentOr12, _this$store$currentOr13, oldDiscount, shopDiscountItem, updatedAmountInfo;
|
|
2670
2682
|
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
|
|
2671
2683
|
while (1) switch (_context34.prev = _context34.next) {
|
|
2672
2684
|
case 0:
|
|
2673
2685
|
_context34.prev = 0;
|
|
2674
2686
|
oldDiscount = this.getShopDiscount();
|
|
2675
2687
|
console.log('[Checkout] 更新商店折扣:', {
|
|
2676
|
-
orderUuid: (_this$store$
|
|
2688
|
+
orderUuid: (_this$store$currentOr12 = this.store.currentOrder) === null || _this$store$currentOr12 === void 0 ? void 0 : _this$store$currentOr12.uuid,
|
|
2677
2689
|
oldDiscount: oldDiscount,
|
|
2678
2690
|
newDiscount: discountAmount
|
|
2679
2691
|
});
|
|
@@ -2723,7 +2735,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2723
2735
|
case 8:
|
|
2724
2736
|
_context34.next = 10;
|
|
2725
2737
|
return this.core.effects.emit(CheckoutHooks.OnShopDiscountChanged, {
|
|
2726
|
-
orderUuid: (_this$store$
|
|
2738
|
+
orderUuid: (_this$store$currentOr13 = this.store.currentOrder) === null || _this$store$currentOr13 === void 0 ? void 0 : _this$store$currentOr13.uuid,
|
|
2727
2739
|
oldDiscount: oldDiscount,
|
|
2728
2740
|
newDiscount: discountAmount,
|
|
2729
2741
|
timestamp: Date.now()
|
|
@@ -2764,7 +2776,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2764
2776
|
key: "updateOrderNoteAsync",
|
|
2765
2777
|
value: (function () {
|
|
2766
2778
|
var _updateOrderNoteAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(note) {
|
|
2767
|
-
var _this$store$
|
|
2779
|
+
var _this$store$currentOr14, _this$store$currentOr15, oldNote, orderInPayment;
|
|
2768
2780
|
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
|
|
2769
2781
|
while (1) switch (_context35.prev = _context35.next) {
|
|
2770
2782
|
case 0:
|
|
@@ -2776,7 +2788,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2776
2788
|
throw createCheckoutError(CheckoutErrorType.ValidationFailed, '没有本地订单数据,无法更新备注');
|
|
2777
2789
|
case 3:
|
|
2778
2790
|
console.log('[Checkout] 更新订单备注:', {
|
|
2779
|
-
orderUuid: (_this$store$
|
|
2791
|
+
orderUuid: (_this$store$currentOr14 = this.store.currentOrder) === null || _this$store$currentOr14 === void 0 ? void 0 : _this$store$currentOr14.uuid,
|
|
2780
2792
|
oldNote: this.store.localOrderData.shop_note,
|
|
2781
2793
|
newNote: note
|
|
2782
2794
|
});
|
|
@@ -2809,7 +2821,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2809
2821
|
case 17:
|
|
2810
2822
|
_context35.next = 19;
|
|
2811
2823
|
return this.core.effects.emit(CheckoutHooks.OnOrderNoteChanged, {
|
|
2812
|
-
orderUuid: (_this$store$
|
|
2824
|
+
orderUuid: (_this$store$currentOr15 = this.store.currentOrder) === null || _this$store$currentOr15 === void 0 ? void 0 : _this$store$currentOr15.uuid,
|
|
2813
2825
|
oldNote: oldNote,
|
|
2814
2826
|
newNote: note,
|
|
2815
2827
|
timestamp: Date.now()
|
|
@@ -2949,7 +2961,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2949
2961
|
key: "handlePaymentSuccess",
|
|
2950
2962
|
value: (function () {
|
|
2951
2963
|
var _handlePaymentSuccess = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(data) {
|
|
2952
|
-
var _this$store$
|
|
2964
|
+
var _this$store$currentOr16;
|
|
2953
2965
|
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
|
|
2954
2966
|
while (1) switch (_context39.prev = _context39.next) {
|
|
2955
2967
|
case 0:
|
|
@@ -2963,7 +2975,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2963
2975
|
return this.core.effects.emit(CheckoutHooks.OnPaymentSuccess, {
|
|
2964
2976
|
orderUuid: data.orderUuid,
|
|
2965
2977
|
paymentMethodCode: '',
|
|
2966
|
-
amount: ((_this$store$
|
|
2978
|
+
amount: ((_this$store$currentOr16 = this.store.currentOrder) === null || _this$store$currentOr16 === void 0 ? void 0 : _this$store$currentOr16.total_amount) || '0',
|
|
2967
2979
|
timestamp: data.timestamp
|
|
2968
2980
|
});
|
|
2969
2981
|
case 6:
|
|
@@ -2988,7 +3000,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2988
3000
|
key: "handlePaymentError",
|
|
2989
3001
|
value: (function () {
|
|
2990
3002
|
var _handlePaymentError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(data) {
|
|
2991
|
-
var _this$store$
|
|
3003
|
+
var _this$store$currentOr17;
|
|
2992
3004
|
var error;
|
|
2993
3005
|
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
|
|
2994
3006
|
while (1) switch (_context40.prev = _context40.next) {
|
|
@@ -3001,7 +3013,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3001
3013
|
return this.core.effects.emit(CheckoutHooks.OnPaymentFailed, {
|
|
3002
3014
|
orderUuid: data.orderUuid,
|
|
3003
3015
|
paymentMethodCode: '',
|
|
3004
|
-
amount: ((_this$store$
|
|
3016
|
+
amount: ((_this$store$currentOr17 = this.store.currentOrder) === null || _this$store$currentOr17 === void 0 ? void 0 : _this$store$currentOr17.total_amount) || '0',
|
|
3005
3017
|
timestamp: data.timestamp
|
|
3006
3018
|
});
|
|
3007
3019
|
case 5:
|
|
@@ -3320,7 +3332,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3320
3332
|
key: "updateBalanceDueAmount",
|
|
3321
3333
|
value: (function () {
|
|
3322
3334
|
var _updateBalanceDueAmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44() {
|
|
3323
|
-
var _this$store$
|
|
3335
|
+
var _this$store$currentOr18, remainingAmount, currentBalanceDueAmount;
|
|
3324
3336
|
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
|
|
3325
3337
|
while (1) switch (_context44.prev = _context44.next) {
|
|
3326
3338
|
case 0:
|
|
@@ -3334,7 +3346,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3334
3346
|
calculatedRemainingAmount: remainingAmount,
|
|
3335
3347
|
currentBalanceDueAmount: currentBalanceDueAmount,
|
|
3336
3348
|
needsUpdate: remainingAmount !== currentBalanceDueAmount,
|
|
3337
|
-
orderUuid: (_this$store$
|
|
3349
|
+
orderUuid: (_this$store$currentOr18 = this.store.currentOrder) === null || _this$store$currentOr18 === void 0 ? void 0 : _this$store$currentOr18.uuid
|
|
3338
3350
|
});
|
|
3339
3351
|
|
|
3340
3352
|
// 只有当剩余金额与当前 balanceDueAmount 不同时才更新
|
|
@@ -3389,7 +3401,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3389
3401
|
key: "updateStateAmountToRemaining",
|
|
3390
3402
|
value: (function () {
|
|
3391
3403
|
var _updateStateAmountToRemaining = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45() {
|
|
3392
|
-
var _this$store$
|
|
3404
|
+
var _this$store$currentOr19, remainingAmount, currentStateAmount;
|
|
3393
3405
|
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
|
|
3394
3406
|
while (1) switch (_context45.prev = _context45.next) {
|
|
3395
3407
|
case 0:
|
|
@@ -3403,7 +3415,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3403
3415
|
calculatedRemainingAmount: remainingAmount,
|
|
3404
3416
|
currentStateAmount: currentStateAmount,
|
|
3405
3417
|
needsUpdate: remainingAmount !== currentStateAmount,
|
|
3406
|
-
orderUuid: (_this$store$
|
|
3418
|
+
orderUuid: (_this$store$currentOr19 = this.store.currentOrder) === null || _this$store$currentOr19 === void 0 ? void 0 : _this$store$currentOr19.uuid
|
|
3407
3419
|
});
|
|
3408
3420
|
|
|
3409
3421
|
// 只有当剩余金额与当前 stateAmount 不同时才更新
|
|
@@ -3646,7 +3658,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3646
3658
|
key: "syncOrderToBackendWithReturn",
|
|
3647
3659
|
value: (function () {
|
|
3648
3660
|
var _syncOrderToBackendWithReturn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
|
|
3649
|
-
var _this$store$currentCu2, _this$store$
|
|
3661
|
+
var _this$store$currentCu2, _this$store$currentOr20, _this$store$currentOr21, _checkoutResponse3, _checkoutResponse4, _checkoutResponse5, _checkoutResponse6, _checkoutResponse7, _checkoutResponse8;
|
|
3650
3662
|
var isManual,
|
|
3651
3663
|
customPaymentItems,
|
|
3652
3664
|
syncType,
|
|
@@ -3776,8 +3788,8 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3776
3788
|
currency_code: this.otherParams.currency_code,
|
|
3777
3789
|
currency_symbol: this.otherParams.currency_symbol,
|
|
3778
3790
|
currency_format: this.otherParams.currency_format,
|
|
3779
|
-
is_deposit: ((_this$store$
|
|
3780
|
-
deposit_amount: ((_this$store$
|
|
3791
|
+
is_deposit: ((_this$store$currentOr20 = this.store.currentOrder) === null || _this$store$currentOr20 === void 0 ? void 0 : _this$store$currentOr20.is_deposit) || 0,
|
|
3792
|
+
deposit_amount: ((_this$store$currentOr21 = this.store.currentOrder) === null || _this$store$currentOr21 === void 0 ? void 0 : _this$store$currentOr21.deposit_amount) || '0.00',
|
|
3781
3793
|
// surcharge_fee: this.otherParams.surcharge_fee,
|
|
3782
3794
|
// surcharges: ,
|
|
3783
3795
|
note: this.store.localOrderData.shop_note
|
|
@@ -403,7 +403,9 @@ export declare enum CheckoutHooks {
|
|
|
403
403
|
/** 下单接口请求开始 */
|
|
404
404
|
OnOrderSubmitStart = "checkout:onOrderSubmitStart",
|
|
405
405
|
/** 下单接口请求完成 */
|
|
406
|
-
OnOrderSubmitEnd = "checkout:onOrderSubmitEnd"
|
|
406
|
+
OnOrderSubmitEnd = "checkout:onOrderSubmitEnd",
|
|
407
|
+
/** 钱包数据初始化完成 */
|
|
408
|
+
OnWalletDataInitialized = "checkout:onWalletDataInitialized"
|
|
407
409
|
}
|
|
408
410
|
/**
|
|
409
411
|
* 结账状态数据
|
|
@@ -897,4 +899,21 @@ export interface CheckoutEventData {
|
|
|
897
899
|
duration?: number;
|
|
898
900
|
timestamp: number;
|
|
899
901
|
};
|
|
902
|
+
/** 钱包数据初始化完成事件 */
|
|
903
|
+
walletDataInitialized: {
|
|
904
|
+
/** 订单UUID */
|
|
905
|
+
orderUuid?: string;
|
|
906
|
+
/** 客户ID */
|
|
907
|
+
customerId?: number;
|
|
908
|
+
/** 钱包业务数据 */
|
|
909
|
+
walletBusinessData: {
|
|
910
|
+
customer_id?: number;
|
|
911
|
+
amountInfo: {
|
|
912
|
+
totalAmount: string;
|
|
913
|
+
subTotal: string;
|
|
914
|
+
};
|
|
915
|
+
order_wait_pay_amount?: number;
|
|
916
|
+
};
|
|
917
|
+
timestamp: number;
|
|
918
|
+
};
|
|
900
919
|
}
|
|
@@ -123,6 +123,7 @@ export var CheckoutHooks = /*#__PURE__*/function (CheckoutHooks) {
|
|
|
123
123
|
CheckoutHooks["OnOrderCleared"] = "checkout:onOrderCleared";
|
|
124
124
|
CheckoutHooks["OnOrderSubmitStart"] = "checkout:onOrderSubmitStart";
|
|
125
125
|
CheckoutHooks["OnOrderSubmitEnd"] = "checkout:onOrderSubmitEnd";
|
|
126
|
+
CheckoutHooks["OnWalletDataInitialized"] = "checkout:onWalletDataInitialized";
|
|
126
127
|
return CheckoutHooks;
|
|
127
128
|
}({});
|
|
128
129
|
|
|
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
111
111
|
* 获取当前的客户搜索条件
|
|
112
112
|
* @returns 当前搜索条件
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|
|
@@ -164,7 +164,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
164
164
|
return [...productList, ...relationProducts];
|
|
165
165
|
}
|
|
166
166
|
async initWalletData(params) {
|
|
167
|
-
var _a, _b, _c;
|
|
167
|
+
var _a, _b, _c, _d;
|
|
168
168
|
const amountInfo = (_b = (_a = this.store.currentOrder) == null ? void 0 : _a.order_info) == null ? void 0 : _b.amount_breakdown;
|
|
169
169
|
if (!amountInfo) {
|
|
170
170
|
return;
|
|
@@ -181,6 +181,16 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
181
181
|
await this.payment.wallet.initializeWalletDataFromBusinessAsync(
|
|
182
182
|
walletBusinessData
|
|
183
183
|
);
|
|
184
|
+
await this.core.effects.emit(import_types.CheckoutHooks.OnWalletDataInitialized, {
|
|
185
|
+
orderUuid: (_d = this.store.currentOrder) == null ? void 0 : _d.uuid,
|
|
186
|
+
customerId: walletBusinessData.customer_id,
|
|
187
|
+
walletBusinessData: {
|
|
188
|
+
customer_id: walletBusinessData.customer_id,
|
|
189
|
+
amountInfo: walletBusinessData.amountInfo,
|
|
190
|
+
order_wait_pay_amount: params == null ? void 0 : params.order_wait_pay_amount
|
|
191
|
+
},
|
|
192
|
+
timestamp: Date.now()
|
|
193
|
+
});
|
|
184
194
|
}
|
|
185
195
|
/**
|
|
186
196
|
* 创建本地订单 (前端模拟下单流程)
|
|
@@ -403,7 +403,9 @@ export declare enum CheckoutHooks {
|
|
|
403
403
|
/** 下单接口请求开始 */
|
|
404
404
|
OnOrderSubmitStart = "checkout:onOrderSubmitStart",
|
|
405
405
|
/** 下单接口请求完成 */
|
|
406
|
-
OnOrderSubmitEnd = "checkout:onOrderSubmitEnd"
|
|
406
|
+
OnOrderSubmitEnd = "checkout:onOrderSubmitEnd",
|
|
407
|
+
/** 钱包数据初始化完成 */
|
|
408
|
+
OnWalletDataInitialized = "checkout:onWalletDataInitialized"
|
|
407
409
|
}
|
|
408
410
|
/**
|
|
409
411
|
* 结账状态数据
|
|
@@ -897,4 +899,21 @@ export interface CheckoutEventData {
|
|
|
897
899
|
duration?: number;
|
|
898
900
|
timestamp: number;
|
|
899
901
|
};
|
|
902
|
+
/** 钱包数据初始化完成事件 */
|
|
903
|
+
walletDataInitialized: {
|
|
904
|
+
/** 订单UUID */
|
|
905
|
+
orderUuid?: string;
|
|
906
|
+
/** 客户ID */
|
|
907
|
+
customerId?: number;
|
|
908
|
+
/** 钱包业务数据 */
|
|
909
|
+
walletBusinessData: {
|
|
910
|
+
customer_id?: number;
|
|
911
|
+
amountInfo: {
|
|
912
|
+
totalAmount: string;
|
|
913
|
+
subTotal: string;
|
|
914
|
+
};
|
|
915
|
+
order_wait_pay_amount?: number;
|
|
916
|
+
};
|
|
917
|
+
timestamp: number;
|
|
918
|
+
};
|
|
900
919
|
}
|
|
@@ -75,6 +75,7 @@ var CheckoutHooks = /* @__PURE__ */ ((CheckoutHooks2) => {
|
|
|
75
75
|
CheckoutHooks2["OnOrderCleared"] = "checkout:onOrderCleared";
|
|
76
76
|
CheckoutHooks2["OnOrderSubmitStart"] = "checkout:onOrderSubmitStart";
|
|
77
77
|
CheckoutHooks2["OnOrderSubmitEnd"] = "checkout:onOrderSubmitEnd";
|
|
78
|
+
CheckoutHooks2["OnWalletDataInitialized"] = "checkout:onWalletDataInitialized";
|
|
78
79
|
return CheckoutHooks2;
|
|
79
80
|
})(CheckoutHooks || {});
|
|
80
81
|
// Annotate the CommonJS export names for ESM import in node:
|