@pisell/pisellos 2.3.74 → 2.3.76
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.js +6 -10
- package/dist/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/model/strategy/adapter/walletPass/example.js +3 -26
- package/dist/model/strategy/strategy-example.js +5 -19
- package/dist/modules/Cart/index.js +0 -3
- package/dist/modules/Cart/utils/cartProduct.js +0 -1
- package/dist/modules/Date/index.js +1 -5
- package/dist/modules/Discount/index.js +2 -4
- package/dist/modules/OpenData/index.js +0 -2
- package/dist/modules/Order/index.d.ts +1 -1
- package/dist/modules/Order/index.js +75 -91
- package/dist/modules/Order/types.d.ts +3 -1
- package/dist/modules/Payment/index.js +97 -162
- package/dist/modules/Rules/index.js +1 -4
- package/dist/modules/Schedule/index.js +0 -1
- package/dist/modules/Schedule/utils.js +0 -1
- package/dist/modules/Step/index.js +0 -1
- package/dist/plugins/request.js +1 -4
- package/dist/plugins/window.js +2 -6
- package/dist/server/index.js +97 -129
- package/dist/server/modules/menu/index.js +32 -41
- package/dist/server/modules/order/index.js +2 -4
- package/dist/server/modules/products/index.js +24 -42
- package/dist/server/modules/quotation/index.js +29 -38
- package/dist/server/modules/resource/index.js +3 -4
- package/dist/server/modules/schedule/index.js +27 -35
- package/dist/server/utils/product.js +0 -1
- package/dist/solution/BaseSales/index.js +100 -72
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +5 -0
- package/dist/solution/BaseSales/utils/cartPromotion.js +15 -6
- package/dist/solution/BookingByStep/index.js +7 -59
- package/dist/solution/BookingByStep/utils/capacity.js +1 -11
- package/dist/solution/BookingByStep/utils/resources.js +1 -3
- package/dist/solution/BookingByStep/utils/timeslots.js +2 -43
- package/dist/solution/BookingTicket/index.js +0 -2
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +6 -7
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +25 -31
- package/dist/solution/BookingTicket/utils/scan/index.js +6 -10
- package/dist/solution/BuyTickets/index.js +9 -12
- package/dist/solution/Checkout/index.js +177 -252
- package/dist/solution/Checkout/utils/index.js +4 -16
- package/dist/solution/RegisterAndLogin/index.js +30 -76
- package/dist/solution/ScanOrder/index.js +50 -60
- package/dist/solution/ShopDiscount/index.js +2 -7
- package/dist/solution/VenueBooking/index.js +45 -55
- package/dist/utils/task.js +15 -18
- package/dist/utils/watch.js +0 -1
- package/lib/apis/picoding.js +2 -0
- package/lib/core/index.js +134 -134
- package/lib/effects/index.js +46 -57
- package/lib/index.js +82 -49
- package/lib/model/index.js +14 -21
- package/lib/model/strategy/adapter/dataVariant/adapter.js +38 -50
- package/lib/model/strategy/adapter/dataVariant/evaluator.js +162 -236
- package/lib/model/strategy/adapter/dataVariant/examples.js +229 -237
- package/lib/model/strategy/adapter/dataVariant/index.js +39 -34
- package/lib/model/strategy/adapter/dataVariant/type.js +57 -28
- package/lib/model/strategy/adapter/index.js +100 -64
- package/lib/model/strategy/adapter/itemRule/adapter.js +156 -144
- package/lib/model/strategy/adapter/itemRule/evaluator.js +36 -48
- package/lib/model/strategy/adapter/itemRule/examples.js +295 -225
- package/lib/model/strategy/adapter/itemRule/index.js +83 -57
- package/lib/model/strategy/adapter/itemRule/type.js +97 -36
- package/lib/model/strategy/adapter/promotion/adapter.js +91 -69
- package/lib/model/strategy/adapter/promotion/evaluator.js +444 -310
- package/lib/model/strategy/adapter/promotion/examples.js +222 -234
- package/lib/model/strategy/adapter/promotion/index.js +1 -0
- package/lib/model/strategy/adapter/promotion/type.js +243 -36
- package/lib/model/strategy/adapter/type.js +4 -16
- package/lib/model/strategy/adapter/walletPass/evaluator.js +180 -150
- package/lib/model/strategy/adapter/walletPass/example.js +217 -190
- package/lib/model/strategy/adapter/walletPass/index.js +75 -51
- package/lib/model/strategy/adapter/walletPass/locales.js +36 -58
- package/lib/model/strategy/adapter/walletPass/type.js +4 -16
- package/lib/model/strategy/adapter/walletPass/utils.js +588 -378
- package/lib/model/strategy/engine.js +270 -168
- package/lib/model/strategy/index.js +49 -34
- package/lib/model/strategy/strategy-example.js +243 -239
- package/lib/model/strategy/type.js +100 -40
- package/lib/modules/Account/index.js +39 -53
- package/lib/modules/Account/types.js +20 -33
- package/lib/modules/AccountList/index.js +116 -154
- package/lib/modules/AccountList/types.js +30 -31
- package/lib/modules/AccountList/utils.js +18 -30
- package/lib/modules/BaseModule.js +23 -42
- package/lib/modules/BookingContext/index.js +158 -136
- package/lib/modules/BookingContext/types.js +46 -32
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +138 -146
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +78 -83
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +170 -150
- package/lib/modules/BookingContext/utils/flexible.js +38 -55
- package/lib/modules/BookingContext/utils/formatResourceList.js +19 -34
- package/lib/modules/BookingContext/utils/index.js +124 -41
- package/lib/modules/BookingContext/utils/noResource.js +58 -70
- package/lib/modules/BookingContext/utils/orderLineDisplay.js +14 -41
- package/lib/modules/BookingContext/utils/productExtend.js +202 -155
- package/lib/modules/BookingContext/utils/resourceErrors.js +53 -53
- package/lib/modules/BookingContext/utils/resourceSelection.js +19 -41
- package/lib/modules/BookingContext/utils/resources.js +209 -167
- package/lib/modules/BookingContext/utils/serviceTimes.js +115 -116
- package/lib/modules/BookingContext/utils/timeSlices.js +76 -86
- package/lib/modules/Cart/index.js +170 -124
- package/lib/modules/Cart/types.js +46 -51
- package/lib/modules/Cart/utils/cartAccount.js +40 -39
- package/lib/modules/Cart/utils/cartDate.js +56 -61
- package/lib/modules/Cart/utils/cartDiscount.js +28 -33
- package/lib/modules/Cart/utils/cartNote.js +27 -32
- package/lib/modules/Cart/utils/cartProduct.js +321 -251
- package/lib/modules/Cart/utils/cartRelationForms.js +29 -35
- package/lib/modules/Cart/utils/cartResource.js +70 -78
- package/lib/modules/Cart/utils/changePrice.js +22 -50
- package/lib/modules/Cart/utils/index.js +106 -48
- package/lib/modules/Customer/constants.js +13 -34
- package/lib/modules/Customer/index.js +235 -172
- package/lib/modules/Customer/types.js +38 -35
- package/lib/modules/Date/index.js +116 -115
- package/lib/modules/Date/types.js +16 -28
- package/lib/modules/Date/utils.js +174 -123
- package/lib/modules/Discount/index.js +122 -127
- package/lib/modules/Discount/types.js +9 -31
- package/lib/modules/Guests/index.js +30 -56
- package/lib/modules/Guests/types.js +23 -33
- package/lib/modules/Holder/index.js +209 -189
- package/lib/modules/Holder/types.js +4 -16
- package/lib/modules/Holder/utils.js +20 -49
- package/lib/modules/OpenData/index.js +70 -76
- package/lib/modules/OpenData/types.js +4 -16
- package/lib/modules/OpenData/utils.js +44 -78
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/modules/Order/index.js +1733 -2121
- package/lib/modules/Order/payment-utils.js +77 -120
- package/lib/modules/Order/types.d.ts +3 -1
- package/lib/modules/Order/types.js +88 -35
- package/lib/modules/Order/utils/bundleDiscountHydration.js +41 -74
- package/lib/modules/Order/utils/discountProductLineIdentity.js +142 -100
- package/lib/modules/Order/utils/manualProductDiscount.js +124 -123
- package/lib/modules/Order/utils/orderCollectionIdentity.js +184 -244
- package/lib/modules/Order/utils.js +814 -647
- package/lib/modules/Payment/cash.js +20 -33
- package/lib/modules/Payment/cashRecommendationAlgorithm.js +145 -76
- package/lib/modules/Payment/eftpos.js +16 -30
- package/lib/modules/Payment/index.js +532 -399
- package/lib/modules/Payment/mx51.js +1 -0
- package/lib/modules/Payment/types.js +230 -108
- package/lib/modules/Payment/utils.js +52 -51
- package/lib/modules/Payment/walletpass.js +485 -660
- package/lib/modules/Product/index.js +51 -46
- package/lib/modules/Product/types.js +4 -16
- package/lib/modules/Product/utils.js +32 -33
- package/lib/modules/ProductList/index.js +113 -123
- package/lib/modules/ProductList/types.js +9 -31
- package/lib/modules/Quotation/index.js +81 -118
- package/lib/modules/Quotation/types.js +4 -16
- package/lib/modules/Resource/index.js +27 -59
- package/lib/modules/Resource/types.js +22 -32
- package/lib/modules/Resource/utils.js +30 -38
- package/lib/modules/ResourcePlanner/index.js +25 -23
- package/lib/modules/ResourcePlanner/localClock.js +54 -119
- package/lib/modules/ResourcePlanner/planner.js +589 -770
- package/lib/modules/ResourcePlanner/types.js +10 -29
- package/lib/modules/Rules/index.js +1218 -959
- package/lib/modules/Rules/types.js +17 -40
- package/lib/modules/SalesSummary/index.js +85 -90
- package/lib/modules/SalesSummary/types.js +4 -16
- package/lib/modules/SalesSummary/utils.js +355 -430
- package/lib/modules/ScanOrderLogger/index.js +59 -79
- package/lib/modules/ScanOrderLogger/providers/feishu.js +54 -78
- package/lib/modules/ScanOrderLogger/providers/grafana.js +13 -36
- package/lib/modules/ScanOrderLogger/types.js +4 -16
- package/lib/modules/Schedule/getDateIsInSchedule.js +334 -163
- package/lib/modules/Schedule/index.js +100 -114
- package/lib/modules/Schedule/type.js +4 -16
- package/lib/modules/Schedule/types.js +4 -16
- package/lib/modules/Schedule/utils.js +433 -291
- package/lib/modules/Step/index.js +40 -52
- package/lib/modules/Step/tyeps.js +4 -16
- package/lib/modules/Summary/index.js +66 -71
- package/lib/modules/Summary/types.js +4 -16
- package/lib/modules/Summary/utils.js +773 -418
- package/lib/modules/SurchargeList/index.js +46 -60
- package/lib/modules/SurchargeList/types.js +4 -16
- package/lib/modules/index.js +245 -63
- package/lib/plugins/app.js +4 -16
- package/lib/plugins/index.js +36 -25
- package/lib/plugins/request.js +137 -126
- package/lib/plugins/shopStore.js +4 -16
- package/lib/plugins/user.js +4 -16
- package/lib/plugins/window.js +171 -179
- package/lib/server/index.js +3050 -2665
- package/lib/server/modules/floor-plan/index.js +118 -134
- package/lib/server/modules/floor-plan/types.js +15 -30
- package/lib/server/modules/index.js +106 -68
- package/lib/server/modules/menu/index.js +142 -122
- package/lib/server/modules/menu/types.js +18 -31
- package/lib/server/modules/order/index.js +784 -1002
- package/lib/server/modules/order/types.js +122 -33
- package/lib/server/modules/order/utils/filterBookings.js +219 -194
- package/lib/server/modules/order/utils/filterOrders.js +118 -92
- package/lib/server/modules/payment/index.js +59 -83
- package/lib/server/modules/payment/types.js +4 -16
- package/lib/server/modules/products/index.js +583 -471
- package/lib/server/modules/products/types.js +44 -34
- package/lib/server/modules/quotation/index.js +137 -172
- package/lib/server/modules/quotation/types.js +21 -31
- package/lib/server/modules/resource/index.js +220 -186
- package/lib/server/modules/resource/types.js +42 -33
- package/lib/server/modules/schedule/index.js +135 -123
- package/lib/server/modules/schedule/types.js +14 -21
- package/lib/server/modules/schedule/utils.js +334 -163
- package/lib/server/types.js +4 -16
- package/lib/server/utils/index.js +25 -23
- package/lib/server/utils/product.js +196 -139
- package/lib/server/utils/schedule.js +34 -41
- package/lib/server/utils/small-ticket.js +479 -456
- package/lib/server/utils/time.js +40 -49
- package/lib/solution/BaseSales/index.js +1220 -1412
- package/lib/solution/BaseSales/types.js +42 -38
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +5 -0
- package/lib/solution/BaseSales/utils/cartPromotion.js +652 -498
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +85 -105
- package/lib/solution/BaseSales/utils/quotationPrice.js +56 -114
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +108 -145
- package/lib/solution/BaseSales/utils.js +158 -143
- package/lib/solution/BookingByStep/index.js +1527 -1340
- package/lib/solution/BookingByStep/types.js +40 -99
- package/lib/solution/BookingByStep/utils/capacity.js +192 -160
- package/lib/solution/BookingByStep/utils/products.js +42 -52
- package/lib/solution/BookingByStep/utils/resources.js +527 -330
- package/lib/solution/BookingByStep/utils/stock.js +65 -44
- package/lib/solution/BookingByStep/utils/timeslots.js +129 -131
- package/lib/solution/BookingTicket/index.js +607 -522
- package/lib/solution/BookingTicket/types.js +99 -77
- package/lib/solution/BookingTicket/utils/addProductDecision.js +226 -189
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +58 -89
- package/lib/solution/BookingTicket/utils/bookingStatus.js +107 -78
- package/lib/solution/BookingTicket/utils/cartView.js +114 -99
- package/lib/solution/BookingTicket/utils/exampleData.js +185 -0
- package/lib/solution/BookingTicket/utils/orderCustomer.js +18 -41
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +219 -86
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +168 -116
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +79 -91
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +54 -41
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +84 -81
- package/lib/solution/BookingTicket/utils/scan/index.js +98 -104
- package/lib/solution/BookingTicket/utils/scan/scanCache.js +90 -43
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +52 -64
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +56 -58
- package/lib/solution/BookingTicket/utils/weighingProductSku.js +34 -48
- package/lib/solution/BuyTickets/index.js +67 -70
- package/lib/solution/BuyTickets/types.js +22 -38
- package/lib/solution/Checkout/index.js +1451 -1158
- package/lib/solution/Checkout/types.js +91 -61
- package/lib/solution/Checkout/utils/index.js +228 -156
- package/lib/solution/PlaceOrder/index.js +55 -0
- package/lib/solution/RegisterAndLogin/config.js +493 -460
- package/lib/solution/RegisterAndLogin/index.js +633 -630
- package/lib/solution/RegisterAndLogin/types.js +189 -76
- package/lib/solution/RegisterAndLogin/utils.js +183 -125
- package/lib/solution/Sales/index.js +328 -324
- package/lib/solution/Sales/types.js +27 -33
- package/lib/solution/ScanOrder/index.js +832 -864
- package/lib/solution/ScanOrder/types.js +33 -34
- package/lib/solution/ScanOrder/utils.js +409 -374
- package/lib/solution/ShopDiscount/index.js +226 -232
- package/lib/solution/ShopDiscount/types.js +15 -37
- package/lib/solution/ShopDiscount/utils.js +300 -172
- package/lib/solution/UnifiedBookingSales/index.js +1035 -1201
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +99 -159
- package/lib/solution/UnifiedBookingSales/types.js +10 -32
- package/lib/solution/VenueBooking/index.js +811 -879
- package/lib/solution/VenueBooking/types.js +19 -39
- package/lib/solution/VenueBooking/utils/dateSummary.js +27 -56
- package/lib/solution/VenueBooking/utils/resource.js +31 -54
- package/lib/solution/VenueBooking/utils/slotMerge.js +94 -107
- package/lib/solution/VenueBooking/utils/timeSlot.js +132 -132
- package/lib/solution/VenueBooking/utils.js +130 -67
- package/lib/solution/index.js +124 -41
- package/lib/store/createStore.js +32 -29
- package/lib/types/index.js +4 -16
- package/lib/utils/payment-number.js +26 -46
- package/lib/utils/task.js +36 -36
- package/lib/utils/watch.js +81 -47
- package/package.json +2 -1
|
@@ -207,9 +207,8 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
207
207
|
// // 预连接数据库
|
|
208
208
|
// this.dbManager.connect()
|
|
209
209
|
|
|
210
|
-
console.log('[PaymentModule] 初始化完成');
|
|
211
210
|
this.logInfo('PaymentModule initialized successfully');
|
|
212
|
-
case
|
|
211
|
+
case 15:
|
|
213
212
|
case "end":
|
|
214
213
|
return _context.stop();
|
|
215
214
|
}
|
|
@@ -341,7 +340,6 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
341
340
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
342
341
|
while (1) switch (_context2.prev = _context2.next) {
|
|
343
342
|
case 0:
|
|
344
|
-
console.log('网络状态:', status.connected);
|
|
345
343
|
_this3.logInfo('Network status changed', {
|
|
346
344
|
connected: status.connected,
|
|
347
345
|
previousStatus: status.previousStatus
|
|
@@ -350,7 +348,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
350
348
|
_this3.logInfo('Network reconnected');
|
|
351
349
|
// 网络恢复时的处理逻辑可以在这里添加
|
|
352
350
|
}
|
|
353
|
-
case
|
|
351
|
+
case 2:
|
|
354
352
|
case "end":
|
|
355
353
|
return _context2.stop();
|
|
356
354
|
}
|
|
@@ -627,7 +625,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
627
625
|
case 3:
|
|
628
626
|
order = _context7.sent;
|
|
629
627
|
if (!order) {
|
|
630
|
-
_context7.next =
|
|
628
|
+
_context7.next = 9;
|
|
631
629
|
break;
|
|
632
630
|
}
|
|
633
631
|
_context7.next = 7;
|
|
@@ -636,20 +634,18 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
636
634
|
_context7.next = 9;
|
|
637
635
|
return this.core.effects.emit("".concat(this.name, ":onOrderDeleted"), order);
|
|
638
636
|
case 9:
|
|
639
|
-
|
|
640
|
-
case 10:
|
|
641
|
-
_context7.next = 16;
|
|
637
|
+
_context7.next = 15;
|
|
642
638
|
break;
|
|
643
|
-
case
|
|
644
|
-
_context7.prev =
|
|
639
|
+
case 11:
|
|
640
|
+
_context7.prev = 11;
|
|
645
641
|
_context7.t0 = _context7["catch"](0);
|
|
646
642
|
console.error('[PaymentModule] 删除支付订单失败', _context7.t0);
|
|
647
643
|
throw _context7.t0;
|
|
648
|
-
case
|
|
644
|
+
case 15:
|
|
649
645
|
case "end":
|
|
650
646
|
return _context7.stop();
|
|
651
647
|
}
|
|
652
|
-
}, _callee7, this, [[0,
|
|
648
|
+
}, _callee7, this, [[0, 11]]);
|
|
653
649
|
}));
|
|
654
650
|
function deletePaymentOrderAsync(_x6) {
|
|
655
651
|
return _deletePaymentOrderAsync.apply(this, arguments);
|
|
@@ -799,10 +795,9 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
799
795
|
originalOrderId: originalOrderId,
|
|
800
796
|
newOrderId: newOrderId
|
|
801
797
|
});
|
|
802
|
-
console.log("[PaymentModule] \u8BA2\u5355ID\u66FF\u6362\u6210\u529F: ".concat(originalOrderId, " \u2192 ").concat(newOrderId));
|
|
803
798
|
return _context9.abrupt("return", updatedOrder);
|
|
804
|
-
case
|
|
805
|
-
_context9.prev =
|
|
799
|
+
case 27:
|
|
800
|
+
_context9.prev = 27;
|
|
806
801
|
_context9.t0 = _context9["catch"](1);
|
|
807
802
|
console.error('[PaymentModule] 替换订单ID失败', _context9.t0);
|
|
808
803
|
this.logError('replaceOrderIdByUuidAsync failed', _context9.t0, {
|
|
@@ -810,11 +805,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
810
805
|
newOrderId: newOrderId
|
|
811
806
|
});
|
|
812
807
|
throw _context9.t0;
|
|
813
|
-
case
|
|
808
|
+
case 32:
|
|
814
809
|
case "end":
|
|
815
810
|
return _context9.stop();
|
|
816
811
|
}
|
|
817
|
-
}, _callee9, this, [[1,
|
|
812
|
+
}, _callee9, this, [[1, 27]]);
|
|
818
813
|
}));
|
|
819
814
|
function replaceOrderIdByUuidAsync(_x9, _x10) {
|
|
820
815
|
return _replaceOrderIdByUuidAsync.apply(this, arguments);
|
|
@@ -1105,42 +1100,36 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1105
1100
|
paymentItem.origin_amount = paymentItem.amount; // 保存原始金额
|
|
1106
1101
|
paymentItem.amount = '0.00'; // 将金额设为0,不参与订单金额计算
|
|
1107
1102
|
|
|
1108
|
-
console.log("[PaymentModule] \u652F\u4ED8\u9879\u6807\u8BB0\u4E3A\u5220\u9664:", {
|
|
1109
|
-
uuid: paymentItem.uuid,
|
|
1110
|
-
originalAmount: paymentItem.origin_amount,
|
|
1111
|
-
status: paymentItem.status
|
|
1112
|
-
});
|
|
1113
|
-
|
|
1114
1103
|
// 重新计算待付金额
|
|
1115
1104
|
this.recalculateOrderAmount(order);
|
|
1116
1105
|
|
|
1117
1106
|
// 更新到 IndexDB
|
|
1118
|
-
_context13.next =
|
|
1107
|
+
_context13.next = 19;
|
|
1119
1108
|
return this.dbManager.update('order', order);
|
|
1120
|
-
case
|
|
1121
|
-
_context13.next =
|
|
1109
|
+
case 19:
|
|
1110
|
+
_context13.next = 21;
|
|
1122
1111
|
return this.core.effects.emit("".concat(this.name, ":onPaymentDeleted"), {
|
|
1123
1112
|
order: order,
|
|
1124
1113
|
paymentItem: paymentItem
|
|
1125
1114
|
});
|
|
1126
|
-
case
|
|
1127
|
-
_context13.next =
|
|
1115
|
+
case 21:
|
|
1116
|
+
_context13.next = 23;
|
|
1128
1117
|
return this.core.effects.emit("".concat(this.name, ":onOrderChanged"), {
|
|
1129
1118
|
action: 'payment_delete',
|
|
1130
1119
|
order: order,
|
|
1131
1120
|
paymentItem: paymentItem
|
|
1132
1121
|
});
|
|
1133
|
-
case
|
|
1122
|
+
case 23:
|
|
1134
1123
|
this.logInfo('deletePaymentAsync completed successfully (marked as voided)', {
|
|
1135
1124
|
orderUuid: orderUuid,
|
|
1136
1125
|
paymentUuid: paymentUuid,
|
|
1137
1126
|
originalAmount: paymentItem.origin_amount,
|
|
1138
1127
|
newExpectAmount: order.expect_amount
|
|
1139
1128
|
});
|
|
1140
|
-
_context13.next =
|
|
1129
|
+
_context13.next = 31;
|
|
1141
1130
|
break;
|
|
1142
|
-
case
|
|
1143
|
-
_context13.prev =
|
|
1131
|
+
case 26:
|
|
1132
|
+
_context13.prev = 26;
|
|
1144
1133
|
_context13.t0 = _context13["catch"](1);
|
|
1145
1134
|
console.error('[PaymentModule] 删除支付项失败', _context13.t0);
|
|
1146
1135
|
this.logError('deletePaymentAsync failed', _context13.t0, {
|
|
@@ -1148,11 +1137,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1148
1137
|
paymentUuid: paymentUuid
|
|
1149
1138
|
});
|
|
1150
1139
|
throw _context13.t0;
|
|
1151
|
-
case
|
|
1140
|
+
case 31:
|
|
1152
1141
|
case "end":
|
|
1153
1142
|
return _context13.stop();
|
|
1154
1143
|
}
|
|
1155
|
-
}, _callee13, this, [[1,
|
|
1144
|
+
}, _callee13, this, [[1, 26]]);
|
|
1156
1145
|
}));
|
|
1157
1146
|
function deletePaymentAsync(_x15, _x16) {
|
|
1158
1147
|
return _deletePaymentAsync.apply(this, arguments);
|
|
@@ -1216,80 +1205,61 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1216
1205
|
existingVoucherItems = order.payment.filter(function (payment) {
|
|
1217
1206
|
return payment.voucher_id && payment.status !== 'voided' && !payment.isSynced;
|
|
1218
1207
|
});
|
|
1219
|
-
console.log('[PaymentModule] 发现现有代金券支付项:', {
|
|
1220
|
-
orderUuid: orderUuid,
|
|
1221
|
-
existingVoucherCount: existingVoucherItems.length,
|
|
1222
|
-
existingItems: existingVoucherItems.map(function (item) {
|
|
1223
|
-
return {
|
|
1224
|
-
uuid: item.uuid,
|
|
1225
|
-
code: item.code,
|
|
1226
|
-
amount: item.amount,
|
|
1227
|
-
voucher_id: item.voucher_id,
|
|
1228
|
-
isSynced: item.isSynced
|
|
1229
|
-
};
|
|
1230
|
-
})
|
|
1231
|
-
});
|
|
1232
|
-
|
|
1233
1208
|
// 2. 删除所有现有的代金券支付项(仅删除未同步的)
|
|
1234
1209
|
_iterator2 = _createForOfIteratorHelper(existingVoucherItems);
|
|
1235
|
-
_context14.prev =
|
|
1210
|
+
_context14.prev = 11;
|
|
1236
1211
|
_iterator2.s();
|
|
1237
|
-
case
|
|
1212
|
+
case 13:
|
|
1238
1213
|
if ((_step2 = _iterator2.n()).done) {
|
|
1239
|
-
_context14.next =
|
|
1214
|
+
_context14.next = 19;
|
|
1240
1215
|
break;
|
|
1241
1216
|
}
|
|
1242
1217
|
voucherItem = _step2.value;
|
|
1243
|
-
|
|
1244
|
-
_context14.next = 19;
|
|
1218
|
+
_context14.next = 17;
|
|
1245
1219
|
return _this6.deletePaymentAsync(orderUuid, voucherItem.uuid);
|
|
1220
|
+
case 17:
|
|
1221
|
+
_context14.next = 13;
|
|
1222
|
+
break;
|
|
1246
1223
|
case 19:
|
|
1247
|
-
_context14.next =
|
|
1224
|
+
_context14.next = 24;
|
|
1248
1225
|
break;
|
|
1249
1226
|
case 21:
|
|
1250
|
-
_context14.
|
|
1251
|
-
|
|
1252
|
-
case 23:
|
|
1253
|
-
_context14.prev = 23;
|
|
1254
|
-
_context14.t0 = _context14["catch"](12);
|
|
1227
|
+
_context14.prev = 21;
|
|
1228
|
+
_context14.t0 = _context14["catch"](11);
|
|
1255
1229
|
_iterator2.e(_context14.t0);
|
|
1256
|
-
case
|
|
1257
|
-
_context14.prev =
|
|
1230
|
+
case 24:
|
|
1231
|
+
_context14.prev = 24;
|
|
1258
1232
|
_iterator2.f();
|
|
1259
|
-
return _context14.finish(
|
|
1260
|
-
case
|
|
1261
|
-
_context14.next =
|
|
1233
|
+
return _context14.finish(24);
|
|
1234
|
+
case 27:
|
|
1235
|
+
_context14.next = 29;
|
|
1262
1236
|
return _this6.getPaymentOrderByUuidAsync(orderUuid);
|
|
1263
|
-
case
|
|
1237
|
+
case 29:
|
|
1264
1238
|
orderAfterDelete = _context14.sent;
|
|
1265
1239
|
if (orderAfterDelete) {
|
|
1266
|
-
_context14.next =
|
|
1240
|
+
_context14.next = 32;
|
|
1267
1241
|
break;
|
|
1268
1242
|
}
|
|
1269
1243
|
throw new Error("\u8BA2\u5355\u4E0D\u5B58\u5728: ".concat(orderUuid));
|
|
1270
|
-
case
|
|
1244
|
+
case 32:
|
|
1271
1245
|
existingActiveVoucherKeys = new Set(orderAfterDelete.payment.filter(function (p) {
|
|
1272
1246
|
return p.voucher_id && p.status !== 'voided' && !p.isSynced;
|
|
1273
1247
|
}).map(function (p) {
|
|
1274
1248
|
return "".concat(p.voucher_id, "|").concat(p.order_payment_type || 'normal');
|
|
1275
1249
|
}));
|
|
1276
|
-
console.log('[PaymentModule] 添加新的代金券支付项:', {
|
|
1277
|
-
orderUuid: orderUuid,
|
|
1278
|
-
newItemCount: normalizedVoucherItems.length
|
|
1279
|
-
});
|
|
1280
1250
|
_iterator3 = _createForOfIteratorHelper(normalizedVoucherItems);
|
|
1281
|
-
_context14.prev =
|
|
1251
|
+
_context14.prev = 34;
|
|
1282
1252
|
_iterator3.s();
|
|
1283
|
-
case
|
|
1253
|
+
case 36:
|
|
1284
1254
|
if ((_step3 = _iterator3.n()).done) {
|
|
1285
|
-
_context14.next =
|
|
1255
|
+
_context14.next = 48;
|
|
1286
1256
|
break;
|
|
1287
1257
|
}
|
|
1288
1258
|
_voucherItem = _step3.value;
|
|
1289
1259
|
orderPaymentType = _voucherItem.order_payment_type || 'normal';
|
|
1290
1260
|
key = "".concat(_voucherItem.voucher_id, "|").concat(orderPaymentType);
|
|
1291
1261
|
if (!existingActiveVoucherKeys.has(key)) {
|
|
1292
|
-
_context14.next =
|
|
1262
|
+
_context14.next = 43;
|
|
1293
1263
|
break;
|
|
1294
1264
|
}
|
|
1295
1265
|
console.warn('[PaymentModule] Skip adding voucher payment item because it already exists (active)', {
|
|
@@ -1297,54 +1267,48 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1297
1267
|
voucher_id: _voucherItem.voucher_id,
|
|
1298
1268
|
order_payment_type: orderPaymentType
|
|
1299
1269
|
});
|
|
1300
|
-
return _context14.abrupt("continue",
|
|
1301
|
-
case
|
|
1302
|
-
|
|
1303
|
-
code: _voucherItem.code,
|
|
1304
|
-
amount: _voucherItem.amount,
|
|
1305
|
-
voucher_id: _voucherItem.voucher_id,
|
|
1306
|
-
order_payment_type: orderPaymentType
|
|
1307
|
-
}));
|
|
1308
|
-
_context14.next = 49;
|
|
1270
|
+
return _context14.abrupt("continue", 46);
|
|
1271
|
+
case 43:
|
|
1272
|
+
_context14.next = 45;
|
|
1309
1273
|
return _this6.addPaymentItemAsync(orderUuid, _voucherItem);
|
|
1310
|
-
case
|
|
1274
|
+
case 45:
|
|
1311
1275
|
existingActiveVoucherKeys.add(key);
|
|
1312
|
-
case
|
|
1313
|
-
_context14.next =
|
|
1276
|
+
case 46:
|
|
1277
|
+
_context14.next = 36;
|
|
1314
1278
|
break;
|
|
1315
|
-
case
|
|
1316
|
-
_context14.next =
|
|
1279
|
+
case 48:
|
|
1280
|
+
_context14.next = 53;
|
|
1317
1281
|
break;
|
|
1318
|
-
case
|
|
1319
|
-
_context14.prev =
|
|
1320
|
-
_context14.t1 = _context14["catch"](
|
|
1282
|
+
case 50:
|
|
1283
|
+
_context14.prev = 50;
|
|
1284
|
+
_context14.t1 = _context14["catch"](34);
|
|
1321
1285
|
_iterator3.e(_context14.t1);
|
|
1322
|
-
case
|
|
1323
|
-
_context14.prev =
|
|
1286
|
+
case 53:
|
|
1287
|
+
_context14.prev = 53;
|
|
1324
1288
|
_iterator3.f();
|
|
1325
|
-
return _context14.finish(
|
|
1326
|
-
case
|
|
1327
|
-
_context14.next =
|
|
1289
|
+
return _context14.finish(53);
|
|
1290
|
+
case 56:
|
|
1291
|
+
_context14.next = 58;
|
|
1328
1292
|
return _this6.getPaymentOrderByUuidAsync(orderUuid);
|
|
1329
|
-
case
|
|
1293
|
+
case 58:
|
|
1330
1294
|
updatedOrder = _context14.sent;
|
|
1331
|
-
_context14.next =
|
|
1295
|
+
_context14.next = 61;
|
|
1332
1296
|
return _this6.core.effects.emit("".concat(_this6.name, ":onPaymentAdded"), {
|
|
1333
1297
|
orderUuid: orderUuid,
|
|
1334
1298
|
order: updatedOrder,
|
|
1335
1299
|
payment: null // 批量操作不提供单个支付项
|
|
1336
1300
|
});
|
|
1337
|
-
case
|
|
1301
|
+
case 61:
|
|
1338
1302
|
_this6.logInfo('updateVoucherPaymentItemsAsync completed successfully', {
|
|
1339
1303
|
orderUuid: orderUuid,
|
|
1340
1304
|
removedVoucherCount: existingVoucherItems.length,
|
|
1341
1305
|
addedVoucherCount: normalizedVoucherItems.length,
|
|
1342
1306
|
finalExpectAmount: updatedOrder === null || updatedOrder === void 0 ? void 0 : updatedOrder.expect_amount
|
|
1343
1307
|
});
|
|
1344
|
-
_context14.next =
|
|
1308
|
+
_context14.next = 69;
|
|
1345
1309
|
break;
|
|
1346
|
-
case
|
|
1347
|
-
_context14.prev =
|
|
1310
|
+
case 64:
|
|
1311
|
+
_context14.prev = 64;
|
|
1348
1312
|
_context14.t2 = _context14["catch"](3);
|
|
1349
1313
|
console.error('[PaymentModule] 批量更新代金券支付项失败:', _context14.t2);
|
|
1350
1314
|
_this6.logError('updateVoucherPaymentItemsAsync failed', _context14.t2, {
|
|
@@ -1352,11 +1316,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1352
1316
|
voucherPaymentItems: voucherPaymentItems
|
|
1353
1317
|
});
|
|
1354
1318
|
throw _context14.t2;
|
|
1355
|
-
case
|
|
1319
|
+
case 69:
|
|
1356
1320
|
case "end":
|
|
1357
1321
|
return _context14.stop();
|
|
1358
1322
|
}
|
|
1359
|
-
}, _callee14, null, [[3,
|
|
1323
|
+
}, _callee14, null, [[3, 64], [11, 21, 24, 27], [34, 50, 53, 56]]);
|
|
1360
1324
|
}))));
|
|
1361
1325
|
case 1:
|
|
1362
1326
|
case "end":
|
|
@@ -1577,11 +1541,9 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1577
1541
|
if (totalPaidAmount.gte(orderTotalAmount)) {
|
|
1578
1542
|
// 支付金额足够,标记为已完成
|
|
1579
1543
|
order.payment_status = PaymentStatus.Finished;
|
|
1580
|
-
console.log("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u652F\u4ED8\u5B8C\u6210\uFF0C\u91D1\u989D: ").concat(totalPaidAmount.toString(), "/").concat(orderTotalAmount.toString()));
|
|
1581
1544
|
} else {
|
|
1582
1545
|
// 支付金额不足,标记为部分支付
|
|
1583
1546
|
order.payment_status = PaymentStatus.PartiallyPaid;
|
|
1584
|
-
console.log("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u90E8\u5206\u652F\u4ED8\uFF0C\u91D1\u989D: ").concat(totalPaidAmount.toString(), "/").concat(orderTotalAmount.toString()));
|
|
1585
1547
|
}
|
|
1586
1548
|
|
|
1587
1549
|
// 给后端标记一下是全部支付(paid)还是部分支付
|
|
@@ -1592,37 +1554,36 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1592
1554
|
return this.dbManager.update('order', order);
|
|
1593
1555
|
case 8:
|
|
1594
1556
|
if (!(paymentData.payments.length === 0)) {
|
|
1595
|
-
_context18.next =
|
|
1557
|
+
_context18.next = 11;
|
|
1596
1558
|
break;
|
|
1597
1559
|
}
|
|
1598
|
-
console.log("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u652F\u4ED8\u5217\u8868\u4E3A\u7A7A\uFF0C\u8DF3\u8FC7\u652F\u4ED8\u5904\u7406"));
|
|
1599
1560
|
this.logWarning('Empty payment list', {
|
|
1600
1561
|
orderUuid: order.uuid,
|
|
1601
1562
|
orderId: order.order_id
|
|
1602
1563
|
});
|
|
1603
1564
|
return _context18.abrupt("return");
|
|
1604
|
-
case
|
|
1605
|
-
_context18.next =
|
|
1565
|
+
case 11:
|
|
1566
|
+
_context18.next = 13;
|
|
1606
1567
|
return this.core.effects.emit("".concat(this.name, ":onPaymentSubmitted"), order);
|
|
1607
|
-
case
|
|
1608
|
-
_context18.next =
|
|
1568
|
+
case 13:
|
|
1569
|
+
_context18.next = 15;
|
|
1609
1570
|
return this.core.effects.emit("".concat(this.name, ":onOrderChanged"), {
|
|
1610
1571
|
action: 'submit',
|
|
1611
1572
|
order: order
|
|
1612
1573
|
});
|
|
1613
|
-
case
|
|
1614
|
-
_context18.next =
|
|
1574
|
+
case 15:
|
|
1575
|
+
_context18.next = 21;
|
|
1615
1576
|
break;
|
|
1616
|
-
case
|
|
1617
|
-
_context18.prev =
|
|
1577
|
+
case 17:
|
|
1578
|
+
_context18.prev = 17;
|
|
1618
1579
|
_context18.t0 = _context18["catch"](0);
|
|
1619
1580
|
console.error("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u652F\u4ED8\u63D0\u4EA4\u5931\u8D25"), _context18.t0);
|
|
1620
1581
|
throw _context18.t0;
|
|
1621
|
-
case
|
|
1582
|
+
case 21:
|
|
1622
1583
|
case "end":
|
|
1623
1584
|
return _context18.stop();
|
|
1624
1585
|
}
|
|
1625
|
-
}, _callee18, this, [[0,
|
|
1586
|
+
}, _callee18, this, [[0, 17]]);
|
|
1626
1587
|
}));
|
|
1627
1588
|
function submitSingleOrderPayment(_x23) {
|
|
1628
1589
|
return _submitSingleOrderPayment.apply(this, arguments);
|
|
@@ -1764,29 +1725,6 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1764
1725
|
// 如果是定金模式,则使用deposit_amount 去减已付款金额
|
|
1765
1726
|
var remainingAmount = order.is_deposit === 1 ? new Decimal(order.deposit_amount).minus(paidAmount) : totalAmount.minus(paidAmount);
|
|
1766
1727
|
order.expect_amount = Decimal.max(0, remainingAmount).toFixed(2);
|
|
1767
|
-
console.log("[PaymentModule] \u91CD\u65B0\u8BA1\u7B97\u8BA2\u5355\u91D1\u989D:", {
|
|
1768
|
-
orderUuid: order.uuid,
|
|
1769
|
-
totalAmount: order.total_amount,
|
|
1770
|
-
effectivePaidAmount: paidAmount.toFixed(2),
|
|
1771
|
-
remainingAmount: order.expect_amount,
|
|
1772
|
-
activePayments: order.payment.filter(function (p) {
|
|
1773
|
-
return p.status !== 'voided';
|
|
1774
|
-
}).length,
|
|
1775
|
-
voidedPayments: order.payment.filter(function (p) {
|
|
1776
|
-
return p.status === 'voided';
|
|
1777
|
-
}).length,
|
|
1778
|
-
paymentDetails: order.payment.filter(function (p) {
|
|
1779
|
-
return p.status !== 'voided';
|
|
1780
|
-
}).map(function (p) {
|
|
1781
|
-
return {
|
|
1782
|
-
code: p.code,
|
|
1783
|
-
amount: p.amount,
|
|
1784
|
-
rounding_amount: p.rounding_amount || '0.00',
|
|
1785
|
-
effective_amount: new Decimal(p.amount || 0).minus(new Decimal(p.rounding_amount || 0)).toFixed(2)
|
|
1786
|
-
};
|
|
1787
|
-
}),
|
|
1788
|
-
说明: '有效支付金额包含抹零计算(amount + |rounding_amount|)'
|
|
1789
|
-
});
|
|
1790
1728
|
}
|
|
1791
1729
|
|
|
1792
1730
|
/**
|
|
@@ -2017,62 +1955,59 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2017
1955
|
|
|
2018
1956
|
// 计算基础值:x / interval
|
|
2019
1957
|
baseValue = amount.div(roundingInterval);
|
|
2020
|
-
console.log("[PaymentModule] \u820D\u5165\u8BA1\u7B97 - \u539F\u59CB\u91D1\u989D: ".concat(amount.toString(), ", \u95F4\u9694: ").concat(intervalValue, ", \u57FA\u7840\u503C: ").concat(baseValue.toString(), ", \u89C4\u5219: ").concat(rule));
|
|
2021
1958
|
_context26.t0 = rule;
|
|
2022
|
-
_context26.next = _context26.t0 === RoundingRule.Standard ?
|
|
1959
|
+
_context26.next = _context26.t0 === RoundingRule.Standard ? 12 : _context26.t0 === 'standard' ? 12 : _context26.t0 === RoundingRule.StandardDown ? 14 : _context26.t0 === 'standard_rounding_midpoint_down' ? 14 : _context26.t0 === RoundingRule.AlwaysUp ? 16 : _context26.t0 === 'always_up' ? 16 : _context26.t0 === RoundingRule.AlwaysDown ? 18 : _context26.t0 === 'always_down' ? 18 : 20;
|
|
2023
1960
|
break;
|
|
2024
|
-
case
|
|
1961
|
+
case 12:
|
|
2025
1962
|
// 标准舍入(中点向上)
|
|
2026
1963
|
roundedValue = this.standardRound(baseValue, true);
|
|
2027
|
-
return _context26.abrupt("break",
|
|
2028
|
-
case
|
|
1964
|
+
return _context26.abrupt("break", 21);
|
|
1965
|
+
case 14:
|
|
2029
1966
|
// 标准舍入(中点向下)
|
|
2030
1967
|
roundedValue = this.standardRound(baseValue, false);
|
|
2031
|
-
return _context26.abrupt("break",
|
|
2032
|
-
case
|
|
1968
|
+
return _context26.abrupt("break", 21);
|
|
1969
|
+
case 16:
|
|
2033
1970
|
// 总是向上舍入
|
|
2034
1971
|
roundedValue = baseValue.ceil();
|
|
2035
|
-
return _context26.abrupt("break",
|
|
2036
|
-
case
|
|
1972
|
+
return _context26.abrupt("break", 21);
|
|
1973
|
+
case 18:
|
|
2037
1974
|
// 总是向下舍入
|
|
2038
1975
|
roundedValue = baseValue.floor();
|
|
2039
|
-
return _context26.abrupt("break",
|
|
2040
|
-
case
|
|
1976
|
+
return _context26.abrupt("break", 21);
|
|
1977
|
+
case 20:
|
|
2041
1978
|
throw new Error("\u4E0D\u652F\u6301\u7684\u820D\u5165\u89C4\u5219: ".concat(rule));
|
|
2042
|
-
case
|
|
1979
|
+
case 21:
|
|
2043
1980
|
// 计算最终金额:roundedValue * interval
|
|
2044
1981
|
finalAmount = roundedValue.mul(roundingInterval);
|
|
2045
1982
|
originalAmountStr = amount.toFixed(2); // 如果最终金额是 0 元,则不采用舍入金额,返回原始金额
|
|
2046
1983
|
if (!finalAmount.eq(0)) {
|
|
2047
|
-
_context26.next =
|
|
1984
|
+
_context26.next = 25;
|
|
2048
1985
|
break;
|
|
2049
1986
|
}
|
|
2050
|
-
console.log("[PaymentModule] \u6700\u7EC8\u91D1\u989D\u4E3A0\uFF0C\u8FD4\u56DE\u539F\u59CB\u91D1\u989D: ".concat(originalAmountStr));
|
|
2051
1987
|
return _context26.abrupt("return", {
|
|
2052
1988
|
originalAmount: originalAmountStr,
|
|
2053
1989
|
roundedAmount: originalAmountStr,
|
|
2054
1990
|
roundingDifference: '0.00'
|
|
2055
1991
|
});
|
|
2056
|
-
case
|
|
1992
|
+
case 25:
|
|
2057
1993
|
roundedAmountStr = finalAmount.toFixed(2); // 计算舍入差额
|
|
2058
1994
|
roundingDifference = finalAmount.sub(amount);
|
|
2059
1995
|
roundingDifferenceStr = roundingDifference.toFixed(2);
|
|
2060
|
-
console.log("[PaymentModule] \u820D\u5165\u7ED3\u679C - \u539F\u59CB\u91D1\u989D: ".concat(originalAmountStr, ", \u820D\u5165\u540E\u91D1\u989D: ").concat(roundedAmountStr, ", \u820D\u5165\u5DEE\u989D: ").concat(roundingDifferenceStr));
|
|
2061
1996
|
return _context26.abrupt("return", {
|
|
2062
1997
|
originalAmount: originalAmountStr,
|
|
2063
1998
|
roundedAmount: roundedAmountStr,
|
|
2064
1999
|
roundingDifference: roundingDifferenceStr
|
|
2065
2000
|
});
|
|
2066
|
-
case
|
|
2067
|
-
_context26.prev =
|
|
2001
|
+
case 31:
|
|
2002
|
+
_context26.prev = 31;
|
|
2068
2003
|
_context26.t1 = _context26["catch"](0);
|
|
2069
2004
|
console.error('[PaymentModule] 金额舍入失败:', _context26.t1);
|
|
2070
2005
|
throw new Error("\u91D1\u989D\u820D\u5165\u5931\u8D25: ".concat(_context26.t1 instanceof Error ? _context26.t1.message : String(_context26.t1)));
|
|
2071
|
-
case
|
|
2006
|
+
case 35:
|
|
2072
2007
|
case "end":
|
|
2073
2008
|
return _context26.stop();
|
|
2074
2009
|
}
|
|
2075
|
-
}, _callee26, this, [[0,
|
|
2010
|
+
}, _callee26, this, [[0, 31]]);
|
|
2076
2011
|
}));
|
|
2077
2012
|
function roundAmountAsync(_x27, _x28, _x29) {
|
|
2078
2013
|
return _roundAmountAsync.apply(this, arguments);
|
|
@@ -2457,9 +2457,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2457
2457
|
_context3.next = 3;
|
|
2458
2458
|
return this.core.effects.emit("".concat(this.name, ":onDestroy"), {});
|
|
2459
2459
|
case 3:
|
|
2460
|
-
console.log('[Rules] 已销毁');
|
|
2461
2460
|
_get(_getPrototypeOf(RulesModule.prototype), "destroy", this).call(this);
|
|
2462
|
-
case
|
|
2461
|
+
case 4:
|
|
2463
2462
|
case "end":
|
|
2464
2463
|
return _context3.stop();
|
|
2465
2464
|
}
|
|
@@ -2477,8 +2476,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2477
2476
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2478
2477
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2479
2478
|
case 0:
|
|
2480
|
-
console.log('[Rules] clear');
|
|
2481
|
-
case 1:
|
|
2482
2479
|
case "end":
|
|
2483
2480
|
return _context4.stop();
|
|
2484
2481
|
}
|
|
@@ -255,7 +255,6 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
255
255
|
var idSet = new Set(ids.map(function (id) {
|
|
256
256
|
return String(id);
|
|
257
257
|
}));
|
|
258
|
-
console.log('getScheduleListByIds', this.store.scheduleList);
|
|
259
258
|
if (this.store.map instanceof Map && this.store.map.size > 0) {
|
|
260
259
|
return ids.map(function (id) {
|
|
261
260
|
return _this2.store.map.get(Number(id));
|
package/dist/plugins/request.js
CHANGED
|
@@ -107,15 +107,12 @@ var RequestPluginImpl = /*#__PURE__*/function () {
|
|
|
107
107
|
// 初始化方法
|
|
108
108
|
function initialize() {
|
|
109
109
|
this.core = globalThis.pisellOS;
|
|
110
|
-
console.log('[RequestPlugin] 初始化完成');
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
// 销毁方法
|
|
114
113
|
}, {
|
|
115
114
|
key: "destroy",
|
|
116
|
-
value: function destroy() {
|
|
117
|
-
console.log('[RequestPlugin] 已销毁');
|
|
118
|
-
}
|
|
115
|
+
value: function destroy() {}
|
|
119
116
|
|
|
120
117
|
/**
|
|
121
118
|
* 添加请求拦截器
|
package/dist/plugins/window.js
CHANGED
|
@@ -312,16 +312,12 @@ var WindowPluginImpl = /*#__PURE__*/function () {
|
|
|
312
312
|
key: "initialize",
|
|
313
313
|
value:
|
|
314
314
|
// 初始化方法
|
|
315
|
-
function initialize() {
|
|
316
|
-
console.log('[WindowPlugin] 初始化完成');
|
|
317
|
-
}
|
|
315
|
+
function initialize() {}
|
|
318
316
|
|
|
319
317
|
// 销毁方法
|
|
320
318
|
}, {
|
|
321
319
|
key: "destroy",
|
|
322
|
-
value: function destroy() {
|
|
323
|
-
console.log('[WindowPlugin] 已销毁');
|
|
324
|
-
}
|
|
320
|
+
value: function destroy() {}
|
|
325
321
|
}]);
|
|
326
322
|
return WindowPluginImpl;
|
|
327
323
|
}();
|