@pisell/pisellos 0.10.15 → 0.10.17
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 -9
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- 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.d.ts +5 -2
- package/dist/modules/OpenData/index.js +27 -14
- package/dist/modules/OpenData/types.d.ts +42 -0
- package/dist/modules/OpenData/types.js +7 -1
- package/dist/modules/OpenData/utils.d.ts +15 -1
- package/dist/modules/OpenData/utils.js +85 -0
- package/dist/modules/Order/index.d.ts +4 -2
- package/dist/modules/Order/index.js +131 -123
- package/dist/modules/Order/types.d.ts +8 -1
- package/dist/modules/Order/types.js +1 -0
- package/dist/modules/Order/utils.js +7 -1
- package/dist/modules/Payment/index.js +97 -162
- package/dist/modules/Product/types.d.ts +2 -0
- package/dist/modules/ProductList/index.js +96 -74
- package/dist/modules/Rules/index.js +12 -12
- package/dist/modules/SalesSummary/index.js +6 -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.d.ts +11 -0
- package/dist/server/index.js +977 -641
- package/dist/server/modules/menu/index.js +32 -41
- package/dist/server/modules/order/index.d.ts +8 -0
- package/dist/server/modules/order/index.js +253 -219
- 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/server/utils/small-ticket.d.ts +9 -1
- package/dist/server/utils/small-ticket.js +117 -43
- package/dist/solution/BaseSales/index.d.ts +7 -0
- package/dist/solution/BaseSales/index.js +350 -215
- package/dist/solution/BaseSales/types.d.ts +2 -0
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +5 -0
- package/dist/solution/BaseSales/utils/cartPromotion.js +15 -6
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +3 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +7 -1
- package/dist/solution/BaseSales/utils.js +6 -3
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- 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.d.ts +14 -19
- package/dist/solution/BookingTicket/index.js +553 -433
- package/dist/solution/BookingTicket/utils/addProductDecision.js +3 -1
- 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/Sales/index.d.ts +20 -4
- package/dist/solution/Sales/index.js +348 -75
- package/dist/solution/Sales/types.d.ts +10 -0
- package/dist/solution/ScanOrder/index.js +50 -60
- package/dist/solution/ScanOrder/types.d.ts +2 -0
- package/dist/solution/ScanOrder/utils.js +6 -3
- package/dist/solution/ShopDiscount/index.js +2 -7
- package/dist/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/dist/solution/UnifiedBookingSales/index.js +495 -422
- package/dist/solution/UnifiedBookingSales/types.d.ts +7 -1
- 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 +131 -131
- 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 +209 -315
- 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 -51
- 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 +133 -143
- 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.d.ts +5 -2
- package/lib/modules/OpenData/index.js +119 -78
- package/lib/modules/OpenData/types.d.ts +42 -0
- package/lib/modules/OpenData/types.js +12 -16
- package/lib/modules/OpenData/utils.d.ts +15 -1
- package/lib/modules/OpenData/utils.js +129 -78
- package/lib/modules/Order/index.d.ts +4 -2
- package/lib/modules/Order/index.js +1843 -2251
- package/lib/modules/Order/payment-utils.js +77 -120
- package/lib/modules/Order/types.d.ts +8 -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/virtualSettlement.js +120 -171
- package/lib/modules/Order/utils.js +834 -668
- 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.d.ts +2 -0
- package/lib/modules/Product/types.js +4 -16
- package/lib/modules/Product/utils.js +32 -33
- package/lib/modules/ProductList/index.js +141 -161
- package/lib/modules/ProductList/types.js +9 -31
- package/lib/modules/Quotation/index.js +66 -100
- 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 +591 -772
- package/lib/modules/ResourcePlanner/types.js +10 -29
- package/lib/modules/Rules/index.js +1224 -963
- package/lib/modules/Rules/types.js +17 -40
- package/lib/modules/SalesSummary/index.js +80 -89
- package/lib/modules/SalesSummary/types.js +4 -16
- package/lib/modules/SalesSummary/utils.js +359 -442
- 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.d.ts +11 -0
- package/lib/server/index.js +3432 -2757
- package/lib/server/modules/floor-plan/index.js +102 -123
- 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 +146 -122
- package/lib/server/modules/menu/types.js +18 -31
- package/lib/server/modules/order/index.d.ts +8 -0
- package/lib/server/modules/order/index.js +781 -956
- 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 +575 -459
- 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 +213 -184
- 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.d.ts +9 -1
- package/lib/server/utils/small-ticket.js +565 -470
- package/lib/server/utils/time.js +40 -49
- package/lib/solution/BaseSales/index.d.ts +7 -0
- package/lib/solution/BaseSales/index.js +1385 -1503
- package/lib/solution/BaseSales/types.d.ts +2 -0
- 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.d.ts +3 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +138 -180
- package/lib/solution/BaseSales/utils.js +161 -143
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- 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.d.ts +14 -19
- package/lib/solution/BookingTicket/index.js +663 -526
- package/lib/solution/BookingTicket/types.js +99 -77
- package/lib/solution/BookingTicket/utils/addProductDecision.js +229 -190
- 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.d.ts +20 -4
- package/lib/solution/Sales/index.js +502 -330
- package/lib/solution/Sales/types.d.ts +10 -0
- package/lib/solution/Sales/types.js +27 -33
- package/lib/solution/ScanOrder/index.js +822 -852
- package/lib/solution/ScanOrder/types.d.ts +2 -0
- package/lib/solution/ScanOrder/types.js +33 -34
- package/lib/solution/ScanOrder/utils.js +412 -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.d.ts +5 -4
- package/lib/solution/UnifiedBookingSales/index.js +1087 -1222
- package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +99 -159
- package/lib/solution/UnifiedBookingSales/types.d.ts +7 -1
- 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
|
@@ -50,6 +50,12 @@ export interface GetResourceBookingItemParams {
|
|
|
50
50
|
bookingList: BookingData[];
|
|
51
51
|
deviceTime?: string;
|
|
52
52
|
}
|
|
53
|
+
export interface SalesPrintLocalOrderReceiptOptions {
|
|
54
|
+
/** 当前销售业务类型,用于隔离 Documents Invoice 配置。 */
|
|
55
|
+
businessCode: string;
|
|
56
|
+
/** 当前销售入口;缺失或为 system 时按 pos 处理。 */
|
|
57
|
+
channel?: string;
|
|
58
|
+
}
|
|
53
59
|
/**
|
|
54
60
|
* Sales 解决方案状态
|
|
55
61
|
*
|
|
@@ -82,6 +88,10 @@ export interface SalesModuleAPI {
|
|
|
82
88
|
cancelOrder: (orderIds: Array<number | string>) => Promise<any>;
|
|
83
89
|
/** 变更预约状态 */
|
|
84
90
|
changeBookingStatus: (params: ChangeBookingStatusParams) => Promise<any>;
|
|
91
|
+
/** 按本地订单标识打印小票;本地未命中时由 OS Server 负责远端兜底。 */
|
|
92
|
+
printLocalOrderReceipt: <T = any>(lookup: string | number, options: SalesPrintLocalOrderReceiptOptions) => Promise<T>;
|
|
93
|
+
/** 清除 Legacy Sales 独立维护的 Documents OpenData 缓存。 */
|
|
94
|
+
clearOpenDataCache: () => void;
|
|
85
95
|
/** 获取资源维度的预约占用列表 */
|
|
86
96
|
getResourceBookingList: (currentTime: string, bookingList: BookingData[], deviceTime?: string) => Promise<SalesResourceBookingItem[]>;
|
|
87
97
|
/** 获取单个资源维度的预约占用、已完成、未支付列表 */
|
|
@@ -166,12 +166,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
166
166
|
payload: payload,
|
|
167
167
|
extra: extra
|
|
168
168
|
});
|
|
169
|
-
} else {
|
|
170
|
-
console.log('[ScanOrder][log-fallback]', params.title, {
|
|
171
|
-
payload: payload,
|
|
172
|
-
extra: extra
|
|
173
|
-
});
|
|
174
|
-
}
|
|
169
|
+
} else {}
|
|
175
170
|
return _context.abrupt("return");
|
|
176
171
|
case 6:
|
|
177
172
|
_context.next = 8;
|
|
@@ -501,50 +496,48 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
501
496
|
this.store.scanOrderLogger.setContext(this.getScanOrderLoggerContext());
|
|
502
497
|
}
|
|
503
498
|
this.registerCustomerLoginListeners();
|
|
504
|
-
|
|
505
|
-
_context6.
|
|
506
|
-
_context6.next = 22;
|
|
499
|
+
_context6.prev = 18;
|
|
500
|
+
_context6.next = 21;
|
|
507
501
|
return (_this$store$order = this.store.order) === null || _this$store$order === void 0 ? void 0 : _this$store$order.recalculateSummary({
|
|
508
502
|
createIfMissing: false
|
|
509
503
|
});
|
|
510
|
-
case
|
|
504
|
+
case 21:
|
|
511
505
|
(_this$store$order2 = this.store.order) === null || _this$store$order2 === void 0 || _this$store$order2.persistTempOrder();
|
|
512
|
-
_context6.next =
|
|
506
|
+
_context6.next = 24;
|
|
513
507
|
return this.loadRuntimeConfigs();
|
|
514
|
-
case
|
|
508
|
+
case 24:
|
|
515
509
|
if (!this.store.schedule) {
|
|
516
|
-
_context6.next =
|
|
510
|
+
_context6.next = 33;
|
|
517
511
|
break;
|
|
518
512
|
}
|
|
519
|
-
_context6.prev =
|
|
520
|
-
_context6.next =
|
|
513
|
+
_context6.prev = 25;
|
|
514
|
+
_context6.next = 28;
|
|
521
515
|
return this.store.schedule.loadAllSchedule();
|
|
522
|
-
case
|
|
523
|
-
_context6.next =
|
|
516
|
+
case 28:
|
|
517
|
+
_context6.next = 33;
|
|
524
518
|
break;
|
|
525
|
-
case
|
|
526
|
-
_context6.prev =
|
|
527
|
-
_context6.t0 = _context6["catch"](
|
|
519
|
+
case 30:
|
|
520
|
+
_context6.prev = 30;
|
|
521
|
+
_context6.t0 = _context6["catch"](25);
|
|
528
522
|
console.warn('[ScanOrder] loadAllSchedule 失败,operating_hours 判定将跳过', _context6.t0);
|
|
529
|
-
case
|
|
530
|
-
_context6.next =
|
|
523
|
+
case 33:
|
|
524
|
+
_context6.next = 35;
|
|
531
525
|
return this.refreshItemRuleQuantityLimits();
|
|
532
|
-
case
|
|
526
|
+
case 35:
|
|
533
527
|
this.store.status = 'ready';
|
|
534
|
-
|
|
535
|
-
_context6.next = 40;
|
|
528
|
+
_context6.next = 38;
|
|
536
529
|
return this.core.effects.emit(ScanOrderHooks.onInited, {
|
|
537
530
|
status: this.store.status
|
|
538
531
|
});
|
|
539
|
-
case
|
|
532
|
+
case 38:
|
|
540
533
|
this.logMethodSuccess('initialize', {
|
|
541
534
|
status: this.store.status
|
|
542
535
|
});
|
|
543
|
-
_context6.next =
|
|
536
|
+
_context6.next = 48;
|
|
544
537
|
break;
|
|
545
|
-
case
|
|
546
|
-
_context6.prev =
|
|
547
|
-
_context6.t1 = _context6["catch"](
|
|
538
|
+
case 41:
|
|
539
|
+
_context6.prev = 41;
|
|
540
|
+
_context6.t1 = _context6["catch"](18);
|
|
548
541
|
this.store.status = 'error';
|
|
549
542
|
this.store.error = _context6.t1 instanceof Error ? _context6.t1.message : '初始化失败';
|
|
550
543
|
console.error('[ScanOrder] 初始化失败', _context6.t1);
|
|
@@ -552,11 +545,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
552
545
|
status: this.store.status
|
|
553
546
|
});
|
|
554
547
|
throw _context6.t1;
|
|
555
|
-
case
|
|
548
|
+
case 48:
|
|
556
549
|
case "end":
|
|
557
550
|
return _context6.stop();
|
|
558
551
|
}
|
|
559
|
-
}, _callee6, this, [[
|
|
552
|
+
}, _callee6, this, [[18, 41], [25, 30]]);
|
|
560
553
|
}));
|
|
561
554
|
function initialize(_x5) {
|
|
562
555
|
return _initialize.apply(this, arguments);
|
|
@@ -576,9 +569,8 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
576
569
|
return this.core.effects.emit(ScanOrderHooks.onDestroy, {});
|
|
577
570
|
case 4:
|
|
578
571
|
_get(_getPrototypeOf(ScanOrderImpl.prototype), "destroy", this).call(this);
|
|
579
|
-
console.log('[ScanOrder] 已销毁');
|
|
580
572
|
this.logMethodSuccess('destroy');
|
|
581
|
-
case
|
|
573
|
+
case 6:
|
|
582
574
|
case "end":
|
|
583
575
|
return _context7.stop();
|
|
584
576
|
}
|
|
@@ -598,27 +590,26 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
598
590
|
case 0:
|
|
599
591
|
this.logMethodStart('retryInit');
|
|
600
592
|
// TODO: 细化重试策略(指数退避、最大重试次数)后替换当前实现
|
|
601
|
-
|
|
602
|
-
_context8.next = 4;
|
|
593
|
+
_context8.next = 3;
|
|
603
594
|
return this.core.effects.emit(ScanOrderHooks.onRetryInit, {});
|
|
604
|
-
case
|
|
605
|
-
_context8.prev =
|
|
606
|
-
_context8.next =
|
|
595
|
+
case 3:
|
|
596
|
+
_context8.prev = 3;
|
|
597
|
+
_context8.next = 6;
|
|
607
598
|
return this.initialize(this.core, this.initializeOptions);
|
|
608
|
-
case
|
|
599
|
+
case 6:
|
|
609
600
|
this.logMethodSuccess('retryInit');
|
|
610
|
-
_context8.next =
|
|
601
|
+
_context8.next = 13;
|
|
611
602
|
break;
|
|
612
|
-
case
|
|
613
|
-
_context8.prev =
|
|
614
|
-
_context8.t0 = _context8["catch"](
|
|
603
|
+
case 9:
|
|
604
|
+
_context8.prev = 9;
|
|
605
|
+
_context8.t0 = _context8["catch"](3);
|
|
615
606
|
this.logMethodError('retryInit', _context8.t0);
|
|
616
607
|
throw _context8.t0;
|
|
617
|
-
case
|
|
608
|
+
case 13:
|
|
618
609
|
case "end":
|
|
619
610
|
return _context8.stop();
|
|
620
611
|
}
|
|
621
|
-
}, _callee8, this, [[
|
|
612
|
+
}, _callee8, this, [[3, 9]]);
|
|
622
613
|
}));
|
|
623
614
|
function retryInit() {
|
|
624
615
|
return _retryInit.apply(this, arguments);
|
|
@@ -634,36 +625,35 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
634
625
|
case 0:
|
|
635
626
|
this.logMethodStart('refresh');
|
|
636
627
|
// TODO: 接入真实刷新逻辑(资源重拉取、流程重建)后替换当前实现
|
|
637
|
-
|
|
638
|
-
_context9.prev = 2;
|
|
628
|
+
_context9.prev = 1;
|
|
639
629
|
this.store.status = 'initializing';
|
|
640
|
-
_context9.next =
|
|
630
|
+
_context9.next = 5;
|
|
641
631
|
return this.loadRuntimeConfigs();
|
|
642
|
-
case
|
|
643
|
-
_context9.next =
|
|
632
|
+
case 5:
|
|
633
|
+
_context9.next = 7;
|
|
644
634
|
return this.refreshItemRuleQuantityLimits();
|
|
645
|
-
case
|
|
635
|
+
case 7:
|
|
646
636
|
this.store.status = 'ready';
|
|
647
|
-
_context9.next =
|
|
637
|
+
_context9.next = 10;
|
|
648
638
|
return this.core.effects.emit(ScanOrderHooks.onRefresh, {
|
|
649
639
|
status: this.store.status
|
|
650
640
|
});
|
|
651
|
-
case
|
|
641
|
+
case 10:
|
|
652
642
|
this.logMethodSuccess('refresh', {
|
|
653
643
|
status: this.store.status
|
|
654
644
|
});
|
|
655
|
-
_context9.next =
|
|
645
|
+
_context9.next = 17;
|
|
656
646
|
break;
|
|
657
|
-
case
|
|
658
|
-
_context9.prev =
|
|
659
|
-
_context9.t0 = _context9["catch"](
|
|
647
|
+
case 13:
|
|
648
|
+
_context9.prev = 13;
|
|
649
|
+
_context9.t0 = _context9["catch"](1);
|
|
660
650
|
this.logMethodError('refresh', _context9.t0);
|
|
661
651
|
throw _context9.t0;
|
|
662
|
-
case
|
|
652
|
+
case 17:
|
|
663
653
|
case "end":
|
|
664
654
|
return _context9.stop();
|
|
665
655
|
}
|
|
666
|
-
}, _callee9, this, [[
|
|
656
|
+
}, _callee9, this, [[1, 13]]);
|
|
667
657
|
}));
|
|
668
658
|
function refresh() {
|
|
669
659
|
return _refresh.apply(this, arguments);
|
|
@@ -44,6 +44,8 @@ export interface ScanOrderProductSku {
|
|
|
44
44
|
export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
45
45
|
order_detail_id: number | null;
|
|
46
46
|
num: number;
|
|
47
|
+
/** Product 或当前 Variant 的生产编码 */
|
|
48
|
+
production_code?: string;
|
|
47
49
|
product_sku: ScanOrderProductSku;
|
|
48
50
|
/**
|
|
49
51
|
* 券后 **行 composite 单价** = `metadata.main_product_selling_price`
|
|
@@ -660,11 +660,14 @@ export function normalizeOrderProduct(product) {
|
|
|
660
660
|
sellingPrice: composedSellingPrice,
|
|
661
661
|
quantity: getSafeProductNum(product.num)
|
|
662
662
|
});
|
|
663
|
-
return {
|
|
663
|
+
return _objectSpread(_objectSpread({
|
|
664
664
|
order_detail_id: product.order_detail_id || null,
|
|
665
665
|
product_id: product.product_id,
|
|
666
666
|
num: getSafeProductNum(product.num),
|
|
667
|
-
product_variant_id: product.product_variant_id
|
|
667
|
+
product_variant_id: product.product_variant_id
|
|
668
|
+
}, product.production_code !== undefined && product.production_code !== null ? {
|
|
669
|
+
production_code: String(product.production_code).trim()
|
|
670
|
+
} : {}), {}, {
|
|
668
671
|
product_sku: productSku,
|
|
669
672
|
selling_price: composedSellingPrice,
|
|
670
673
|
original_price: manualOriginalPrice,
|
|
@@ -674,7 +677,7 @@ export function normalizeOrderProduct(product) {
|
|
|
674
677
|
product_bundle: normalizedBundle,
|
|
675
678
|
metadata: metadata,
|
|
676
679
|
note: product.note != null ? String(product.note) : ''
|
|
677
|
-
};
|
|
680
|
+
});
|
|
678
681
|
}
|
|
679
682
|
|
|
680
683
|
/**
|
|
@@ -76,8 +76,6 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
76
76
|
this.options = options;
|
|
77
77
|
this.store = _objectSpread(_objectSpread({}, this.store), options.store || {});
|
|
78
78
|
this.hooks = (_options$otherParams = options.otherParams) === null || _options$otherParams === void 0 || (_options$otherParams = _options$otherParams.rules) === null || _options$otherParams === void 0 ? void 0 : _options$otherParams.hooks;
|
|
79
|
-
console.log('[ShopDiscount] 初始化完成');
|
|
80
|
-
|
|
81
79
|
// 获取依赖的插件
|
|
82
80
|
this.initializePlugins();
|
|
83
81
|
|
|
@@ -86,7 +84,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
86
84
|
|
|
87
85
|
// 注册事件监听
|
|
88
86
|
this.registerEventListeners();
|
|
89
|
-
case
|
|
87
|
+
case 7:
|
|
90
88
|
case "end":
|
|
91
89
|
return _context.stop();
|
|
92
90
|
}
|
|
@@ -113,8 +111,6 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
113
111
|
_context2.next = 7;
|
|
114
112
|
return this.core.effects.emit("".concat(this.name, ":onDestroy"), {});
|
|
115
113
|
case 7:
|
|
116
|
-
console.log('[ShopDiscount] 已销毁');
|
|
117
|
-
case 8:
|
|
118
114
|
case "end":
|
|
119
115
|
return _context2.stop();
|
|
120
116
|
}
|
|
@@ -137,8 +133,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
137
133
|
this.store.customer = null;
|
|
138
134
|
(_this$store$discount2 = this.store.discount) === null || _this$store$discount2 === void 0 || _this$store$discount2.clear();
|
|
139
135
|
(_this$store$rules2 = this.store.rules) === null || _this$store$rules2 === void 0 || _this$store$rules2.clear();
|
|
140
|
-
|
|
141
|
-
case 5:
|
|
136
|
+
case 4:
|
|
142
137
|
case "end":
|
|
143
138
|
return _context3.stop();
|
|
144
139
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
2
|
import type { ProductData } from '../../modules';
|
|
3
|
-
import type
|
|
3
|
+
import { type InvoiceLayoutConfig, type InvoiceTemplateSettings, type OpenDataConfig } from '../../modules/OpenData';
|
|
4
4
|
import type { LoadScheduleAvailableDateParams, ScheduleItem } from '../../modules/Schedule/types';
|
|
5
5
|
import type { ProductListLoadProductsParams } from '../../modules/ProductList';
|
|
6
6
|
import type { AvailabilityDateRange, AvailabilityOccupancy, AvailabilityProduct, AvailabilityResource, GetProductTimeRangesRequest } from '../../modules/ResourcePlanner';
|
|
@@ -59,9 +59,6 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
59
59
|
protected defaultVersion: string;
|
|
60
60
|
protected store: UnifiedBookingSalesState;
|
|
61
61
|
private unifiedProductCatalog;
|
|
62
|
-
private openDataTarget;
|
|
63
|
-
private loadOpenDataInFlight;
|
|
64
|
-
private loadOpenDataInFlightTarget;
|
|
65
62
|
private availabilityRuntimeOffsetMinutes;
|
|
66
63
|
private availabilityScheduleCatalog;
|
|
67
64
|
private availabilityProjectionSequence;
|
|
@@ -147,6 +144,10 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
147
144
|
*/
|
|
148
145
|
loadOpenData(params: UnifiedBookingSalesLoadOpenDataParams): Promise<OpenDataConfig>;
|
|
149
146
|
getOpenData(): Promise<OpenDataConfig | null>;
|
|
147
|
+
clearOpenDataCache(): void;
|
|
148
|
+
getInvoiceLayoutConfig(): Promise<InvoiceLayoutConfig>;
|
|
149
|
+
getInvoiceTemplateSettings(): Promise<InvoiceTemplateSettings>;
|
|
150
|
+
protected isInvoiceOpenDataCacheCurrent(): boolean;
|
|
150
151
|
/**
|
|
151
152
|
* Load a resource policy without depending on the legacy appointmentBooking solution.
|
|
152
153
|
*/
|