@pisell/pisellos 0.0.568 → 0.0.570
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/effects/index.d.ts +2 -2
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +3 -3
- package/dist/model/strategy/adapter/itemRule/type.d.ts +6 -6
- package/dist/model/strategy/adapter/promotion/evaluator.js +3 -2
- package/dist/model/strategy/adapter/promotion/type.d.ts +5 -5
- package/dist/model/strategy/adapter/walletPass/utils.js +7 -4
- package/dist/model/strategy/type.d.ts +1 -1
- package/dist/modules/BaseModule.d.ts +2 -2
- package/dist/modules/BaseModule.js +4 -4
- package/dist/modules/BookingContext/index.d.ts +48 -0
- package/dist/modules/BookingContext/index.js +566 -0
- package/dist/modules/BookingContext/types.d.ts +102 -0
- package/dist/modules/BookingContext/types.js +51 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +302 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +149 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +249 -0
- package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/dist/modules/BookingContext/utils/flexible.js +56 -0
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/dist/modules/BookingContext/utils/formatResourceList.js +38 -0
- package/dist/modules/BookingContext/utils/index.d.ts +11 -0
- package/dist/modules/BookingContext/utils/index.js +11 -0
- package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/dist/modules/BookingContext/utils/noResource.js +77 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.js +36 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/dist/modules/BookingContext/utils/productExtend.js +339 -0
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/dist/modules/BookingContext/utils/resourceErrors.js +74 -0
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/dist/modules/BookingContext/utils/resourceSelection.js +24 -0
- package/dist/modules/BookingContext/utils/resources.d.ts +80 -0
- package/dist/modules/BookingContext/utils/resources.js +486 -0
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/dist/modules/BookingContext/utils/serviceTimes.js +151 -0
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/dist/modules/BookingContext/utils/timeSlices.js +100 -0
- package/dist/modules/Cart/utils/cartProduct.js +26 -5
- package/dist/modules/Cart/utils/changePrice.js +27 -20
- package/dist/modules/Customer/index.d.ts +20 -0
- package/dist/modules/Customer/index.js +172 -83
- package/dist/modules/Customer/types.d.ts +3 -1
- package/dist/modules/Discount/index.d.ts +2 -1
- package/dist/modules/Discount/index.js +37 -9
- package/dist/modules/Discount/types.d.ts +2 -1
- package/dist/modules/Holder/types.d.ts +1 -1
- package/dist/modules/OpenData/index.d.ts +8 -0
- package/dist/modules/OpenData/index.js +36 -16
- package/dist/modules/OpenData/types.d.ts +1 -1
- package/dist/modules/Order/index.d.ts +448 -23
- package/dist/modules/Order/index.js +5417 -561
- package/dist/modules/Order/types.d.ts +693 -88
- package/dist/modules/Order/types.js +68 -1
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/dist/modules/Order/utils/bundleDiscountHydration.js +144 -0
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/dist/modules/Order/utils/manualProductDiscount.js +210 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.js +405 -0
- package/dist/modules/Order/utils.d.ts +167 -18
- package/dist/modules/Order/utils.js +960 -165
- package/dist/modules/Payment/index.d.ts +10 -9
- package/dist/modules/Payment/index.js +465 -703
- package/dist/modules/Payment/types.d.ts +47 -23
- package/dist/modules/Payment/utils.d.ts +1 -1
- package/dist/modules/Payment/utils.js +4 -3
- package/dist/modules/Payment/walletpass.js +44 -29
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/Product/types.d.ts +29 -7
- package/dist/modules/ProductList/index.d.ts +17 -13
- package/dist/modules/ProductList/index.js +184 -74
- package/dist/modules/ProductList/types.d.ts +17 -0
- package/dist/modules/Quotation/index.d.ts +22 -2
- package/dist/modules/Quotation/index.js +108 -42
- package/dist/modules/Quotation/types.d.ts +19 -0
- package/dist/modules/ResourcePlanner/index.d.ts +24 -0
- package/dist/modules/ResourcePlanner/index.js +181 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
- package/dist/modules/ResourcePlanner/planner.js +1069 -0
- package/dist/modules/ResourcePlanner/types.d.ts +227 -0
- package/dist/modules/ResourcePlanner/types.js +1 -0
- package/dist/modules/Rules/index.d.ts +8 -10
- package/dist/modules/Rules/index.js +222 -109
- package/dist/modules/Rules/types.d.ts +15 -4
- package/dist/modules/SalesSummary/index.d.ts +23 -26
- package/dist/modules/SalesSummary/index.js +152 -46
- package/dist/modules/SalesSummary/types.d.ts +9 -1
- package/dist/modules/SalesSummary/utils.d.ts +3 -22
- package/dist/modules/SalesSummary/utils.js +803 -163
- package/dist/modules/ScanOrderLogger/types.d.ts +2 -2
- package/dist/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
- package/dist/modules/Schedule/getDateIsInSchedule.js +14 -7
- package/dist/modules/Schedule/index.d.ts +18 -5
- package/dist/modules/Schedule/index.js +78 -24
- package/dist/modules/Schedule/type.d.ts +7 -7
- package/dist/modules/Schedule/types.d.ts +11 -9
- package/dist/modules/Summary/index.js +4 -3
- package/dist/modules/SurchargeList/index.d.ts +18 -0
- package/dist/modules/SurchargeList/index.js +185 -0
- package/dist/modules/SurchargeList/types.d.ts +15 -0
- package/dist/modules/SurchargeList/types.js +1 -0
- package/dist/modules/index.d.ts +3 -0
- package/dist/modules/index.js +4 -1
- package/dist/plugins/app.d.ts +2 -0
- package/dist/plugins/request.d.ts +3 -2
- package/dist/server/index.d.ts +462 -8
- package/dist/server/index.js +6112 -656
- package/dist/server/modules/floor-plan/index.d.ts +39 -0
- package/dist/server/modules/floor-plan/index.js +595 -0
- package/dist/server/modules/floor-plan/types.d.ts +43 -0
- package/dist/server/modules/floor-plan/types.js +13 -0
- package/dist/server/modules/index.d.ts +7 -2
- package/dist/server/modules/index.js +6 -0
- package/dist/server/modules/menu/types.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +207 -14
- package/dist/server/modules/order/index.js +2326 -379
- package/dist/server/modules/order/types.d.ts +91 -20
- package/dist/server/modules/order/types.js +14 -1
- package/dist/server/modules/order/utils/filterBookings.d.ts +7 -1
- package/dist/server/modules/order/utils/filterBookings.js +118 -11
- package/dist/server/modules/order/utils/filterOrders.js +242 -14
- package/dist/server/modules/payment/index.d.ts +28 -0
- package/dist/server/modules/payment/index.js +305 -0
- package/dist/server/modules/payment/types.d.ts +9 -0
- package/dist/server/modules/payment/types.js +1 -0
- package/dist/server/modules/products/index.d.ts +105 -14
- package/dist/server/modules/products/index.js +1393 -516
- package/dist/server/modules/products/types.d.ts +35 -2
- package/dist/server/modules/products/types.js +4 -0
- package/dist/server/modules/quotation/index.d.ts +39 -0
- package/dist/server/modules/quotation/index.js +278 -66
- package/dist/server/modules/resource/index.d.ts +2 -3
- package/dist/server/modules/resource/index.js +108 -86
- package/dist/server/modules/resource/types.d.ts +1 -1
- package/dist/server/modules/schedule/index.d.ts +6 -4
- package/dist/server/modules/schedule/index.js +116 -85
- package/dist/server/modules/schedule/utils.d.ts +1 -1
- package/dist/server/test.json +713 -0
- package/dist/server/types.d.ts +6 -4
- package/dist/server/utils/product.js +2 -2
- package/dist/server/utils/small-ticket.d.ts +71 -0
- package/dist/server/utils/small-ticket.js +963 -0
- package/dist/solution/BaseSales/index.d.ts +378 -0
- package/dist/solution/BaseSales/index.js +4006 -0
- package/dist/solution/BaseSales/types.d.ts +394 -0
- package/dist/solution/BaseSales/types.js +40 -0
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
- package/dist/solution/BaseSales/utils/cartPromotion.js +1450 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +144 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +157 -0
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +18 -0
- package/dist/solution/BaseSales/utils/quotationPrice.js +250 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +63 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +218 -0
- package/dist/solution/BaseSales/utils.d.ts +40 -0
- package/dist/solution/BaseSales/utils.js +263 -0
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +382 -25
- package/dist/solution/BookingTicket/index.js +2506 -443
- package/dist/solution/BookingTicket/types.d.ts +191 -6
- package/dist/solution/BookingTicket/types.js +83 -10
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +346 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.js +136 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts +29 -0
- package/dist/solution/BookingTicket/utils/cartView.js +209 -0
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
- package/dist/solution/BookingTicket/utils/orderCustomer.d.ts +4 -0
- package/dist/solution/BookingTicket/utils/orderCustomer.js +31 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +438 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +400 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +41 -1
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +56 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +11 -3
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +5 -0
- package/dist/solution/BookingTicket/utils/scan/index.js +20 -8
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +150 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +78 -0
- package/dist/solution/Checkout/index.d.ts +1 -0
- package/dist/solution/Checkout/index.js +25 -34
- package/dist/solution/Checkout/utils/index.js +4 -4
- package/dist/solution/RegisterAndLogin/config.js +2 -10
- package/dist/solution/Sales/index.d.ts +50 -5
- package/dist/solution/Sales/index.js +484 -92
- package/dist/solution/Sales/types.d.ts +29 -5
- package/dist/solution/ScanOrder/index.d.ts +27 -21
- package/dist/solution/ScanOrder/index.js +499 -434
- package/dist/solution/ScanOrder/types.d.ts +38 -16
- package/dist/solution/ScanOrder/types.js +4 -5
- package/dist/solution/ScanOrder/utils.d.ts +4 -1
- package/dist/solution/ScanOrder/utils.js +109 -34
- package/dist/solution/ShopDiscount/index.js +4 -4
- package/dist/solution/ShopDiscount/types.d.ts +1 -1
- package/dist/solution/ShopDiscount/utils.d.ts +2 -2
- package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/dist/solution/UnifiedBookingSales/index.js +1871 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/dist/solution/UnifiedBookingSales/types.js +11 -0
- package/dist/solution/VenueBooking/index.d.ts +29 -20
- package/dist/solution/VenueBooking/index.js +301 -213
- package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -2
- package/dist/solution/VenueBooking/types.d.ts +1 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +9 -3
- package/dist/solution/index.d.ts +2 -0
- package/dist/solution/index.js +3 -1
- package/dist/types/index.d.ts +12 -2
- package/dist/utils/task.d.ts +2 -2
- package/dist/utils/watch.d.ts +2 -2
- package/lib/effects/index.d.ts +2 -2
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +3 -3
- package/lib/model/strategy/adapter/itemRule/type.d.ts +6 -6
- package/lib/model/strategy/adapter/promotion/evaluator.js +3 -2
- package/lib/model/strategy/adapter/promotion/type.d.ts +5 -5
- package/lib/model/strategy/adapter/walletPass/utils.js +6 -4
- package/lib/model/strategy/type.d.ts +1 -1
- package/lib/modules/BaseModule.d.ts +2 -2
- package/lib/modules/BaseModule.js +4 -4
- package/lib/modules/BookingContext/index.d.ts +48 -0
- package/lib/modules/BookingContext/index.js +390 -0
- package/lib/modules/BookingContext/types.d.ts +102 -0
- package/lib/modules/BookingContext/types.js +48 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +286 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +148 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +242 -0
- package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/lib/modules/BookingContext/utils/flexible.js +63 -0
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/lib/modules/BookingContext/utils/formatResourceList.js +35 -0
- package/lib/modules/BookingContext/utils/index.d.ts +11 -0
- package/lib/modules/BookingContext/utils/index.js +126 -0
- package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/lib/modules/BookingContext/utils/noResource.js +78 -0
- package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
- package/lib/modules/BookingContext/utils/orderLineDisplay.js +29 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/lib/modules/BookingContext/utils/productExtend.js +330 -0
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/lib/modules/BookingContext/utils/resourceErrors.js +80 -0
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/lib/modules/BookingContext/utils/resourceSelection.js +24 -0
- package/lib/modules/BookingContext/utils/resources.d.ts +80 -0
- package/lib/modules/BookingContext/utils/resources.js +419 -0
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/lib/modules/BookingContext/utils/serviceTimes.js +161 -0
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/lib/modules/BookingContext/utils/timeSlices.js +114 -0
- package/lib/modules/Cart/utils/cartProduct.js +27 -5
- package/lib/modules/Cart/utils/changePrice.js +20 -14
- package/lib/modules/Customer/index.d.ts +20 -0
- package/lib/modules/Customer/index.js +63 -10
- package/lib/modules/Customer/types.d.ts +3 -1
- package/lib/modules/Discount/index.d.ts +2 -1
- package/lib/modules/Discount/index.js +18 -2
- package/lib/modules/Discount/types.d.ts +2 -1
- package/lib/modules/Holder/types.d.ts +1 -1
- package/lib/modules/OpenData/index.d.ts +8 -0
- package/lib/modules/OpenData/index.js +21 -3
- package/lib/modules/OpenData/types.d.ts +1 -1
- package/lib/modules/Order/index.d.ts +448 -23
- package/lib/modules/Order/index.js +3641 -308
- package/lib/modules/Order/types.d.ts +693 -88
- package/lib/modules/Order/types.js +55 -1
- package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/lib/modules/Order/utils/bundleDiscountHydration.js +106 -0
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/lib/modules/Order/utils/manualProductDiscount.js +207 -0
- package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
- package/lib/modules/Order/utils/orderCollectionIdentity.js +353 -0
- package/lib/modules/Order/utils.d.ts +167 -18
- package/lib/modules/Order/utils.js +974 -138
- package/lib/modules/Payment/index.d.ts +10 -9
- package/lib/modules/Payment/index.js +30 -124
- package/lib/modules/Payment/types.d.ts +47 -23
- package/lib/modules/Payment/utils.d.ts +1 -1
- package/lib/modules/Payment/utils.js +4 -3
- package/lib/modules/Payment/walletpass.js +16 -6
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Product/types.d.ts +29 -7
- package/lib/modules/ProductList/index.d.ts +17 -13
- package/lib/modules/ProductList/index.js +92 -51
- package/lib/modules/ProductList/types.d.ts +17 -0
- package/lib/modules/Quotation/index.d.ts +22 -2
- package/lib/modules/Quotation/index.js +76 -20
- package/lib/modules/Quotation/types.d.ts +19 -0
- package/lib/modules/ResourcePlanner/index.d.ts +24 -0
- package/lib/modules/ResourcePlanner/index.js +147 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
- package/lib/modules/ResourcePlanner/planner.js +895 -0
- package/lib/modules/ResourcePlanner/types.d.ts +227 -0
- package/lib/modules/ResourcePlanner/types.js +5 -0
- package/lib/modules/Rules/index.d.ts +8 -10
- package/lib/modules/Rules/index.js +153 -61
- package/lib/modules/Rules/types.d.ts +15 -4
- package/lib/modules/SalesSummary/index.d.ts +23 -26
- package/lib/modules/SalesSummary/index.js +84 -16
- package/lib/modules/SalesSummary/types.d.ts +9 -1
- package/lib/modules/SalesSummary/utils.d.ts +3 -22
- package/lib/modules/SalesSummary/utils.js +616 -111
- package/lib/modules/ScanOrderLogger/types.d.ts +2 -2
- package/lib/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
- package/lib/modules/Schedule/getDateIsInSchedule.js +14 -7
- package/lib/modules/Schedule/index.d.ts +18 -5
- package/lib/modules/Schedule/index.js +49 -14
- package/lib/modules/Schedule/type.d.ts +7 -7
- package/lib/modules/Schedule/types.d.ts +11 -9
- package/lib/modules/Summary/index.js +2 -2
- package/lib/modules/SurchargeList/index.d.ts +18 -0
- package/lib/modules/SurchargeList/index.js +95 -0
- package/lib/modules/SurchargeList/types.d.ts +15 -0
- package/lib/modules/SurchargeList/types.js +5 -0
- package/lib/modules/index.d.ts +3 -0
- package/lib/modules/index.js +33 -0
- package/lib/plugins/app.d.ts +2 -0
- package/lib/plugins/request.d.ts +3 -2
- package/lib/server/index.d.ts +462 -8
- package/lib/server/index.js +3901 -205
- package/lib/server/modules/floor-plan/index.d.ts +39 -0
- package/lib/server/modules/floor-plan/index.js +306 -0
- package/lib/server/modules/floor-plan/types.d.ts +43 -0
- package/lib/server/modules/floor-plan/types.js +19 -0
- package/lib/server/modules/index.d.ts +7 -2
- package/lib/server/modules/index.js +21 -0
- package/lib/server/modules/menu/types.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +207 -14
- package/lib/server/modules/order/index.js +1324 -141
- package/lib/server/modules/order/types.d.ts +91 -20
- package/lib/server/modules/order/types.js +11 -1
- package/lib/server/modules/order/utils/filterBookings.d.ts +7 -1
- package/lib/server/modules/order/utils/filterBookings.js +119 -11
- package/lib/server/modules/order/utils/filterOrders.js +238 -13
- package/lib/server/modules/payment/index.d.ts +28 -0
- package/lib/server/modules/payment/index.js +168 -0
- package/lib/server/modules/payment/types.d.ts +9 -0
- package/lib/server/modules/payment/types.js +5 -0
- package/lib/server/modules/products/index.d.ts +105 -14
- package/lib/server/modules/products/index.js +588 -97
- package/lib/server/modules/products/types.d.ts +35 -2
- package/lib/server/modules/products/types.js +3 -0
- package/lib/server/modules/quotation/index.d.ts +39 -0
- package/lib/server/modules/quotation/index.js +145 -1
- package/lib/server/modules/resource/index.d.ts +2 -3
- package/lib/server/modules/resource/index.js +71 -45
- package/lib/server/modules/resource/types.d.ts +1 -1
- package/lib/server/modules/schedule/index.d.ts +6 -4
- package/lib/server/modules/schedule/index.js +55 -44
- package/lib/server/modules/schedule/utils.d.ts +1 -1
- package/lib/server/test.json +713 -0
- package/lib/server/types.d.ts +6 -4
- package/lib/server/utils/product.js +2 -2
- package/lib/server/utils/small-ticket.d.ts +71 -0
- package/lib/server/utils/small-ticket.js +926 -0
- package/lib/solution/BaseSales/index.d.ts +378 -0
- package/lib/solution/BaseSales/index.js +2367 -0
- package/lib/solution/BaseSales/types.d.ts +394 -0
- package/lib/solution/BaseSales/types.js +47 -0
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
- package/lib/solution/BaseSales/utils/cartPromotion.js +1155 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +144 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +140 -0
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +18 -0
- package/lib/solution/BaseSales/utils/quotationPrice.js +231 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +63 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +215 -0
- package/lib/solution/BaseSales/utils.d.ts +40 -0
- package/lib/solution/BaseSales/utils.js +259 -0
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +382 -25
- package/lib/solution/BookingTicket/index.js +1350 -76
- package/lib/solution/BookingTicket/types.d.ts +191 -6
- package/lib/solution/BookingTicket/types.js +71 -10
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.js +353 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +94 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.js +136 -0
- package/lib/solution/BookingTicket/utils/cartView.d.ts +29 -0
- package/lib/solution/BookingTicket/utils/cartView.js +200 -0
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/lib/solution/BookingTicket/utils/exampleData.js +185 -0
- package/lib/solution/BookingTicket/utils/orderCustomer.d.ts +4 -0
- package/lib/solution/BookingTicket/utils/orderCustomer.js +35 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +387 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +220 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +24 -3
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +64 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +4 -2
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +5 -0
- package/lib/solution/BookingTicket/utils/scan/index.js +14 -2
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +115 -0
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +83 -0
- package/lib/solution/Checkout/index.d.ts +1 -0
- package/lib/solution/Checkout/index.js +18 -19
- package/lib/solution/Checkout/utils/index.js +4 -4
- package/lib/solution/RegisterAndLogin/config.js +2 -10
- package/lib/solution/Sales/index.d.ts +50 -5
- package/lib/solution/Sales/index.js +296 -39
- package/lib/solution/Sales/types.d.ts +29 -5
- package/lib/solution/ScanOrder/index.d.ts +27 -21
- package/lib/solution/ScanOrder/index.js +144 -103
- package/lib/solution/ScanOrder/types.d.ts +38 -16
- package/lib/solution/ScanOrder/types.js +4 -5
- package/lib/solution/ScanOrder/utils.d.ts +4 -1
- package/lib/solution/ScanOrder/utils.js +98 -26
- package/lib/solution/ShopDiscount/index.js +3 -3
- package/lib/solution/ShopDiscount/types.d.ts +1 -1
- package/lib/solution/ShopDiscount/utils.d.ts +2 -2
- package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/lib/solution/UnifiedBookingSales/index.js +1050 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/lib/solution/UnifiedBookingSales/types.js +14 -0
- package/lib/solution/VenueBooking/index.d.ts +29 -20
- package/lib/solution/VenueBooking/index.js +169 -94
- package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -2
- package/lib/solution/VenueBooking/types.d.ts +1 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +9 -3
- package/lib/solution/index.d.ts +2 -0
- package/lib/solution/index.js +22 -0
- package/lib/types/index.d.ts +12 -2
- package/lib/utils/task.d.ts +2 -2
- package/lib/utils/watch.d.ts +2 -2
- package/package.json +18 -19
- package/dist/model/strategy/adapter/promotion/index.d.ts +0 -4
- package/dist/solution/Checkout/appointmentDemo.json +0 -1
- package/lib/model/strategy/adapter/promotion/index.d.ts +0 -4
- package/lib/solution/Checkout/appointmentDemo.json +0 -1
|
@@ -7,7 +7,7 @@ var _exportNames = {
|
|
|
7
7
|
ScanOrderImpl: true
|
|
8
8
|
};
|
|
9
9
|
exports.ScanOrderImpl = void 0;
|
|
10
|
-
var
|
|
10
|
+
var _BaseSales = require("../BaseSales");
|
|
11
11
|
var _types = require("./types");
|
|
12
12
|
Object.keys(_types).forEach(function (key) {
|
|
13
13
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -27,13 +27,12 @@ var _decimal = _interopRequireDefault(require("decimal.js"));
|
|
|
27
27
|
var _utils = require("./utils");
|
|
28
28
|
var _types4 = require("../BookingByStep/types");
|
|
29
29
|
var _ProductList = require("../../modules/ProductList");
|
|
30
|
-
var _Schedule = require("../../modules/Schedule");
|
|
31
30
|
var _getDateIsInSchedule = require("../../modules/Schedule/getDateIsInSchedule");
|
|
32
31
|
var _utils2 = require("../../modules/Order/utils");
|
|
33
32
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
34
33
|
var _itemRule = require("../../model/strategy/adapter/itemRule");
|
|
35
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
-
class ScanOrderImpl extends
|
|
35
|
+
class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
37
36
|
defaultName = 'scanOrder';
|
|
38
37
|
defaultVersion = '1.0.0';
|
|
39
38
|
isSolution = true;
|
|
@@ -269,21 +268,22 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
269
268
|
constructor(name, version) {
|
|
270
269
|
super(name, version);
|
|
271
270
|
}
|
|
271
|
+
getRegisteredModuleNames() {
|
|
272
|
+
return ['scanOrderLogger', 'products', 'order', 'salesSummary', 'schedule'];
|
|
273
|
+
}
|
|
274
|
+
createSubModule(moduleName) {
|
|
275
|
+
if (moduleName === 'scanOrderLogger') {
|
|
276
|
+
return (0, _types4.createModule)('scanOrderLogger', this.name);
|
|
277
|
+
}
|
|
278
|
+
return super.createSubModule(moduleName);
|
|
279
|
+
}
|
|
272
280
|
|
|
273
281
|
/** 与 `otherParams.cacheId` 一致,供宿主在 URL 变化时判断是否需要重新注册模块 */
|
|
274
282
|
getCacheId() {
|
|
275
283
|
return this.cacheId;
|
|
276
284
|
}
|
|
277
|
-
async destroyRegisteredChildModules() {
|
|
278
|
-
const modules = [this.store.schedule, this.store.salesSummary, this.store.order, this.store.products, this.store.scanOrderLogger];
|
|
279
|
-
for (const mod of modules) {
|
|
280
|
-
if (mod && typeof mod.destroy === 'function') await Promise.resolve(mod.destroy());
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
285
|
async initialize(core, options = {}) {
|
|
284
286
|
this.logMethodStart('initialize');
|
|
285
|
-
this.core = core;
|
|
286
|
-
this.initializeOptions = options || {};
|
|
287
287
|
this.store = {
|
|
288
288
|
...this.store,
|
|
289
289
|
...options.store
|
|
@@ -302,60 +302,17 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
302
302
|
passed: null,
|
|
303
303
|
failures: []
|
|
304
304
|
};
|
|
305
|
-
|
|
306
|
-
this.request = core.getPlugin('request');
|
|
307
|
-
if (!this.window) {
|
|
308
|
-
this.logMethodError('initialize', 'window plugin missing');
|
|
309
|
-
throw new Error('scanOrder解决方案需要 window 插件支持');
|
|
310
|
-
}
|
|
311
|
-
if (!this.request) {
|
|
312
|
-
this.logMethodError('initialize', 'request plugin missing');
|
|
313
|
-
throw new Error('scanOrder解决方案需要 request 插件支持');
|
|
314
|
-
}
|
|
315
|
-
const moduleArr = ['scanOrderLogger', 'products', 'order', 'salesSummary'];
|
|
316
|
-
moduleArr.forEach(step => {
|
|
317
|
-
const targetModule = (0, _types4.createModule)(step, this.name);
|
|
318
|
-
if (targetModule) {
|
|
319
|
-
this.store[step] = targetModule;
|
|
320
|
-
const initialState = step === 'salesSummary' ? {
|
|
321
|
-
summary: this.store.order?.getTempOrder()?.summary || (0, _utils.createEmptySummary)()
|
|
322
|
-
} : {};
|
|
323
|
-
const loggerProvider = this.otherParams?.scanOrderLoggerProvider || 'feishu';
|
|
324
|
-
const loggerConfig = this.otherParams?.scanOrderLoggerConfig || {
|
|
325
|
-
feishu: {
|
|
326
|
-
webhook: 'https://open.feishu.cn/open-apis/bot/v2/hook/216b3fe6-af98-424e-8706-f0471241a7ed',
|
|
327
|
-
errorHook: 'https://open.feishu.cn/open-apis/bot/v2/hook/015b7c2a-dd3c-4c30-9898-ef0f5253111f'
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
this.core.registerModule(targetModule, {
|
|
331
|
-
initialState,
|
|
332
|
-
otherParams: {
|
|
333
|
-
...this.otherParams,
|
|
334
|
-
fatherModule: this.name,
|
|
335
|
-
openCache: this.otherParams?.cacheId ? true : false,
|
|
336
|
-
cacheId: this.otherParams?.cacheId,
|
|
337
|
-
salesSummaryModuleName: `${this.name}_salesSummary`,
|
|
338
|
-
provider: loggerProvider,
|
|
339
|
-
providerConfig: loggerConfig,
|
|
340
|
-
context: this.getScanOrderLoggerContext()
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
} else {
|
|
344
|
-
this.logMethodError('initialize', `module ${step} missing`);
|
|
345
|
-
throw new Error(`模块 ${step} 不存在`);
|
|
346
|
-
}
|
|
347
|
-
});
|
|
305
|
+
await super.initialize(core, options);
|
|
348
306
|
if (this.store.scanOrderLogger) {
|
|
307
|
+
this.store.scanOrderLogger.setProvider(this.otherParams?.scanOrderLoggerProvider || 'feishu');
|
|
308
|
+
this.store.scanOrderLogger.setProviderConfig(this.otherParams?.scanOrderLoggerConfig || {
|
|
309
|
+
feishu: {
|
|
310
|
+
webhook: 'https://open.feishu.cn/open-apis/bot/v2/hook/216b3fe6-af98-424e-8706-f0471241a7ed',
|
|
311
|
+
errorHook: 'https://open.feishu.cn/open-apis/bot/v2/hook/015b7c2a-dd3c-4c30-9898-ef0f5253111f'
|
|
312
|
+
}
|
|
313
|
+
});
|
|
349
314
|
this.store.scanOrderLogger.setContext(this.getScanOrderLoggerContext());
|
|
350
315
|
}
|
|
351
|
-
const scheduleModule = new _Schedule.ScheduleModule(`${this.name}_schedule`);
|
|
352
|
-
this.store.schedule = scheduleModule;
|
|
353
|
-
this.core.registerModule(scheduleModule, {
|
|
354
|
-
otherParams: {
|
|
355
|
-
...this.otherParams,
|
|
356
|
-
fatherModule: this.name
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
316
|
this.registerCustomerLoginListeners();
|
|
360
317
|
try {
|
|
361
318
|
await this.store.order?.recalculateSummary({
|
|
@@ -392,7 +349,6 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
392
349
|
this.logMethodStart('destroy');
|
|
393
350
|
this.clearLoginEffectListeners();
|
|
394
351
|
await this.core.effects.emit(_types.ScanOrderHooks.onDestroy, {});
|
|
395
|
-
await this.destroyRegisteredChildModules();
|
|
396
352
|
super.destroy();
|
|
397
353
|
this.logMethodSuccess('destroy');
|
|
398
354
|
}
|
|
@@ -491,17 +447,26 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
491
447
|
});
|
|
492
448
|
return result;
|
|
493
449
|
}
|
|
494
|
-
updateTempOrderNote(note) {
|
|
450
|
+
updateTempOrderNote(note, sync = false) {
|
|
495
451
|
this.logMethodStart('updateTempOrderNote', {
|
|
496
452
|
noteLength: String(note || '').length
|
|
497
453
|
});
|
|
498
454
|
try {
|
|
499
455
|
if (!this.store.order) throw new Error('order 模块未初始化');
|
|
500
|
-
const result = this.store.order.updateTempOrderNote(note);
|
|
456
|
+
const result = this.store.order.updateTempOrderNote(note, sync);
|
|
457
|
+
if (result && typeof result.then === 'function') {
|
|
458
|
+
return result.then(nextNote => {
|
|
459
|
+
this.logMethodSuccess('updateTempOrderNote', {
|
|
460
|
+
noteLength: nextNote.length
|
|
461
|
+
});
|
|
462
|
+
return nextNote;
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
const nextNote = result;
|
|
501
466
|
this.logMethodSuccess('updateTempOrderNote', {
|
|
502
|
-
noteLength:
|
|
467
|
+
noteLength: nextNote.length
|
|
503
468
|
});
|
|
504
|
-
return
|
|
469
|
+
return nextNote;
|
|
505
470
|
} catch (error) {
|
|
506
471
|
this.logMethodError('updateTempOrderNote', error);
|
|
507
472
|
throw error;
|
|
@@ -555,7 +520,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
555
520
|
throw error;
|
|
556
521
|
}
|
|
557
522
|
}
|
|
558
|
-
|
|
523
|
+
ensureScanOrderTempOrder() {
|
|
559
524
|
if (!this.store.order) throw new Error('order 模块未初始化');
|
|
560
525
|
return this.store.order.ensureTempOrder();
|
|
561
526
|
}
|
|
@@ -608,7 +573,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
608
573
|
this.logMethodStart('getSummary');
|
|
609
574
|
try {
|
|
610
575
|
if (!this.store.order) throw new Error('order 模块未初始化');
|
|
611
|
-
const summary = await this.store.order.
|
|
576
|
+
const summary = await this.store.order.getOrderSummary();
|
|
612
577
|
this.logMethodSuccess('getSummary', {
|
|
613
578
|
totalAmount: summary.total_amount
|
|
614
579
|
});
|
|
@@ -706,7 +671,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
706
671
|
// 券作用于 source(不含 option、不含 bundle);算出新 source 折后价后补回 options
|
|
707
672
|
// 写入含 option 的 main_product_selling_price,再合成 composite 回写 selling_price。
|
|
708
673
|
const totalPerUnitDiscount = (product.discount_list || []).reduce((sum, pd) => sum + (pd.amount || 0), 0);
|
|
709
|
-
const optionSum = (0, _utils2.sumOptionUnitPrice)(
|
|
674
|
+
const optionSum = (0, _utils2.sumOptionUnitPrice)((0, _utils2.getProductSkuOptions)(product));
|
|
710
675
|
const sourcePrice = product.metadata?.source_product_price ?? (product.metadata?.main_product_original_price != null ? new _decimal.default(Number(product.metadata.main_product_original_price) || 0).minus(optionSum).toFixed(2) : product.original_price ?? '0');
|
|
711
676
|
const newSourceSellingPrice = new _decimal.default(Number(sourcePrice) || 0).minus(totalPerUnitDiscount).toDecimalPlaces(2).toString();
|
|
712
677
|
const newMainSellingPrice = new _decimal.default(Number(newSourceSellingPrice) || 0).plus(optionSum).toDecimalPlaces(2).toFixed(2);
|
|
@@ -818,8 +783,8 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
818
783
|
mode: availabilityInfo.mode,
|
|
819
784
|
retailMode: true,
|
|
820
785
|
retailReason: reason,
|
|
821
|
-
|
|
822
|
-
persistedResourceId:
|
|
786
|
+
relationId: resourceState.relationId,
|
|
787
|
+
persistedResourceId: resourceState.relationId
|
|
823
788
|
});
|
|
824
789
|
return availabilityInfo;
|
|
825
790
|
}
|
|
@@ -848,8 +813,8 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
848
813
|
bookingUuid,
|
|
849
814
|
tempOrder
|
|
850
815
|
}) => {
|
|
851
|
-
const resourceId = String(
|
|
852
|
-
const hasReservationBookingContext = Boolean(ruleProduct && resourceState && resourceId &&
|
|
816
|
+
const resourceId = String(resourceState?.relationId ?? '').trim();
|
|
817
|
+
const hasReservationBookingContext = Boolean(ruleProduct && resourceState && resourceId && resourceState.relationId && resourceState.tableFormId);
|
|
853
818
|
if (!hasReservationBookingContext) {
|
|
854
819
|
return {
|
|
855
820
|
...payload,
|
|
@@ -930,7 +895,9 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
930
895
|
original_price: originalPrice,
|
|
931
896
|
payment_price: sellingPrice,
|
|
932
897
|
is_charge_tax: ruleProduct.is_gst ?? 0,
|
|
933
|
-
|
|
898
|
+
product_sku: {
|
|
899
|
+
option: []
|
|
900
|
+
},
|
|
934
901
|
discount_list: [],
|
|
935
902
|
product_bundle: [],
|
|
936
903
|
booking_uid: bookingUuid,
|
|
@@ -948,6 +915,52 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
948
915
|
};
|
|
949
916
|
};
|
|
950
917
|
}
|
|
918
|
+
isScanOrderMoreMode(tempOrder) {
|
|
919
|
+
const mode = this.store.resource?.mode;
|
|
920
|
+
return Boolean(tempOrder.order_id && (mode === 'additional_order' || mode === 'additional_order_with_code' || this.store.entryContext?.mode === 'append'));
|
|
921
|
+
}
|
|
922
|
+
async submitScanOrderMore(params) {
|
|
923
|
+
if (!this.request) {
|
|
924
|
+
throw new Error('scanOrder解决方案需要 request 插件支持');
|
|
925
|
+
}
|
|
926
|
+
if (!this.store.order) {
|
|
927
|
+
throw new Error('scanOrder解决方案需要 order 模块支持');
|
|
928
|
+
}
|
|
929
|
+
const {
|
|
930
|
+
tempOrder,
|
|
931
|
+
enhancePayload
|
|
932
|
+
} = params;
|
|
933
|
+
const latestSummary = await this.store.order.recalculateSummary({
|
|
934
|
+
createIfMissing: true
|
|
935
|
+
});
|
|
936
|
+
const payload = (0, _utils2.buildSubmitPayload)({
|
|
937
|
+
tempOrder: tempOrder,
|
|
938
|
+
cacheId: this.cacheId,
|
|
939
|
+
platform: this.otherParams?.platform,
|
|
940
|
+
businessCode: this.otherParams?.businessCode || this.otherParams?.business_code,
|
|
941
|
+
channel: this.otherParams?.channel,
|
|
942
|
+
type: this.otherParams?.type,
|
|
943
|
+
summary: latestSummary,
|
|
944
|
+
enhance: enhancePayload
|
|
945
|
+
});
|
|
946
|
+
const products = (0, _utils.filterProductsForScanOrderMore)(payload.products);
|
|
947
|
+
const orderId = tempOrder.order_id;
|
|
948
|
+
const result = await this.request.put(`/order/order/product/${orderId}`, {
|
|
949
|
+
products,
|
|
950
|
+
request_unique_idempotency_token: payload.request_unique_idempotency_token
|
|
951
|
+
}, {
|
|
952
|
+
customToast: () => {}
|
|
953
|
+
});
|
|
954
|
+
if (result?.code === 200 && !result?.data) {
|
|
955
|
+
return {
|
|
956
|
+
...result,
|
|
957
|
+
data: {
|
|
958
|
+
order_id: orderId
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
return result;
|
|
963
|
+
}
|
|
951
964
|
async submitScanOrder() {
|
|
952
965
|
this.logMethodStart('submitScanOrder');
|
|
953
966
|
try {
|
|
@@ -955,7 +968,13 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
955
968
|
if (!this.store.order) {
|
|
956
969
|
throw new Error('scanOrder解决方案需要 order 模块支持');
|
|
957
970
|
}
|
|
971
|
+
const pax = (0, _utils2.normalizeSubmitCollectPaxValue)(this.store.entryPaxNumber);
|
|
972
|
+
this.store.entryPaxNumber = pax;
|
|
958
973
|
const tempOrderForSubmit = this.store.order.ensureTempOrder();
|
|
974
|
+
tempOrderForSubmit.metadata = {
|
|
975
|
+
...tempOrderForSubmit.metadata,
|
|
976
|
+
collect_pax: pax
|
|
977
|
+
};
|
|
959
978
|
tempOrderForSubmit.delivery_type = 'shop_service';
|
|
960
979
|
const resourceTableName = this.store.resource?.table_form_record?.name;
|
|
961
980
|
if (resourceTableName && typeof resourceTableName === 'object') {
|
|
@@ -965,12 +984,10 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
965
984
|
}
|
|
966
985
|
this.store.order.persistTempOrder();
|
|
967
986
|
const enhancePayload = this.buildSubmitPayloadEnhancer();
|
|
968
|
-
const result = await this.
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
channel: this.otherParams?.channel,
|
|
973
|
-
type: this.otherParams?.type,
|
|
987
|
+
const result = this.isScanOrderMoreMode(tempOrderForSubmit) ? await this.submitScanOrderMore({
|
|
988
|
+
tempOrder: tempOrderForSubmit,
|
|
989
|
+
enhancePayload
|
|
990
|
+
}) : await this.submitSalesOrder({
|
|
974
991
|
enhancePayload
|
|
975
992
|
});
|
|
976
993
|
const tempOrder = this.store.order.getTempOrder();
|
|
@@ -1002,22 +1019,22 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1002
1019
|
throw error;
|
|
1003
1020
|
}
|
|
1004
1021
|
}
|
|
1005
|
-
async
|
|
1006
|
-
this.logMethodStart('
|
|
1022
|
+
async updateOrderProduct(params) {
|
|
1023
|
+
this.logMethodStart('updateOrderProduct', {
|
|
1007
1024
|
product_id: params.product_id,
|
|
1008
1025
|
product_variant_id: params.product_variant_id
|
|
1009
1026
|
});
|
|
1010
1027
|
try {
|
|
1011
1028
|
if (!this.store.order) throw new Error('order 模块未初始化');
|
|
1012
|
-
const products = await this.store.order.
|
|
1029
|
+
const products = await this.store.order.updateOrderProduct(params);
|
|
1013
1030
|
await this.refreshItemRuleQuantityLimits();
|
|
1014
1031
|
await this.refreshCartValidationPassed();
|
|
1015
|
-
this.logMethodSuccess('
|
|
1032
|
+
this.logMethodSuccess('updateOrderProduct', {
|
|
1016
1033
|
productCount: products.length
|
|
1017
1034
|
});
|
|
1018
1035
|
return products;
|
|
1019
1036
|
} catch (error) {
|
|
1020
|
-
this.logMethodError('
|
|
1037
|
+
this.logMethodError('updateOrderProduct', error);
|
|
1021
1038
|
throw error;
|
|
1022
1039
|
}
|
|
1023
1040
|
}
|
|
@@ -1040,11 +1057,11 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1040
1057
|
}
|
|
1041
1058
|
};
|
|
1042
1059
|
if (identity.identity_key !== undefined) params.identity_key = identity.identity_key;
|
|
1043
|
-
if (identity.
|
|
1044
|
-
params.
|
|
1060
|
+
if (identity.product_sku !== undefined) {
|
|
1061
|
+
params.product_sku = identity.product_sku;
|
|
1045
1062
|
}
|
|
1046
1063
|
if (identity.product_bundle !== undefined) params.product_bundle = identity.product_bundle;
|
|
1047
|
-
const products = await this.
|
|
1064
|
+
const products = await this.updateOrderProduct(params);
|
|
1048
1065
|
this.logMethodSuccess('setOrderProductLineNote', {
|
|
1049
1066
|
productCount: products.length
|
|
1050
1067
|
});
|
|
@@ -1204,7 +1221,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1204
1221
|
return [];
|
|
1205
1222
|
}
|
|
1206
1223
|
const businessData = (0, _utils.buildItemRuleBusinessData)({
|
|
1207
|
-
tempOrder: this.
|
|
1224
|
+
tempOrder: this.ensureScanOrderTempOrder(),
|
|
1208
1225
|
runtimeConfig: this.getItemRuleRuntimeConfig(),
|
|
1209
1226
|
itemRuleConfigs: this.itemRuleConfigs
|
|
1210
1227
|
});
|
|
@@ -1226,7 +1243,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1226
1243
|
const strategyConfigs = await this.ensureItemRuleConfigsLoaded();
|
|
1227
1244
|
if (!strategyConfigs.length) return;
|
|
1228
1245
|
const businessData = (0, _utils.buildItemRuleBusinessData)({
|
|
1229
|
-
tempOrder: this.
|
|
1246
|
+
tempOrder: this.ensureScanOrderTempOrder(),
|
|
1230
1247
|
runtimeConfig: this.getItemRuleRuntimeConfig(),
|
|
1231
1248
|
itemRuleConfigs: this.itemRuleConfigs
|
|
1232
1249
|
});
|
|
@@ -1236,7 +1253,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1236
1253
|
return;
|
|
1237
1254
|
}
|
|
1238
1255
|
const productSourceMap = await this.buildPrefillProductSourceMap();
|
|
1239
|
-
const tempOrder = this.
|
|
1256
|
+
const tempOrder = this.ensureScanOrderTempOrder();
|
|
1240
1257
|
let hasChanges = false;
|
|
1241
1258
|
for (const prefillItem of prefillItems) {
|
|
1242
1259
|
const productId = Number(prefillItem.product_id);
|
|
@@ -1329,7 +1346,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1329
1346
|
};
|
|
1330
1347
|
}
|
|
1331
1348
|
const businessData = (0, _utils.buildItemRuleBusinessData)({
|
|
1332
|
-
tempOrder: this.
|
|
1349
|
+
tempOrder: this.ensureScanOrderTempOrder(),
|
|
1333
1350
|
runtimeConfig: this.getItemRuleRuntimeConfig(),
|
|
1334
1351
|
itemRuleConfigs: this.itemRuleConfigs
|
|
1335
1352
|
});
|
|
@@ -1614,7 +1631,7 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1614
1631
|
|
|
1615
1632
|
// Step1: 先加载预约规则商品,拿到 enabledReservationRuleProducts 与容量附加信息
|
|
1616
1633
|
// (resourceSelectType 需要基于这些商品 + 占用接口的 form_id 计算,故必须前置)
|
|
1617
|
-
const tempOrder = this.
|
|
1634
|
+
const tempOrder = this.ensureScanOrderTempOrder();
|
|
1618
1635
|
const reservationLinkIds = (0, _utils.collectLinkProductIdsFromReservationRules)(dineInConfig['fulfillment.enabled_resource_rules']);
|
|
1619
1636
|
if (!normalizedResourceId || reservationLinkIds.length === 0) {
|
|
1620
1637
|
return await this.prepareRetailAvailability({
|
|
@@ -1676,6 +1693,29 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1676
1693
|
scheduleDatetime,
|
|
1677
1694
|
cacheId: this.cacheId
|
|
1678
1695
|
});
|
|
1696
|
+
if (Array.isArray(loaded)) {
|
|
1697
|
+
this.enabledReservationRuleProducts = loaded;
|
|
1698
|
+
const occupancyMinutes = (0, _utils.pickFirstDurationMinutesFromProducts)(loaded);
|
|
1699
|
+
if (occupancyMinutes !== undefined) {
|
|
1700
|
+
tempOrder.metadata.table_occupancy_duration = occupancyMinutes;
|
|
1701
|
+
}
|
|
1702
|
+
if ((0, _utils.hasCustomCapacityProduct)(loaded)) {
|
|
1703
|
+
pendingRequestEntryPax = 1;
|
|
1704
|
+
const paxBounds = (0, _utils.pickFirstCustomCapacityPaxBounds)(loaded);
|
|
1705
|
+
if (paxBounds?.min !== undefined) pendingRequestPaxMin = paxBounds.min;
|
|
1706
|
+
if (paxBounds?.max !== undefined) pendingRequestPaxMax = paxBounds.max;
|
|
1707
|
+
}
|
|
1708
|
+
} else {
|
|
1709
|
+
this.enabledReservationRuleProducts = [];
|
|
1710
|
+
const error = loaded instanceof Error ? loaded : new Error('预约规则商品列表接口返回异常');
|
|
1711
|
+
this.logMethodError('loadReservationRuleProducts', error, {
|
|
1712
|
+
resourceId,
|
|
1713
|
+
reservationLinkIds,
|
|
1714
|
+
scheduleDate,
|
|
1715
|
+
scheduleDatetime,
|
|
1716
|
+
cacheId: this.cacheId
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1679
1719
|
}
|
|
1680
1720
|
|
|
1681
1721
|
// Step2: 请求新的资源占用详情接口。occupy_details 第一维是资源,不是订单。
|
|
@@ -1753,9 +1793,6 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1753
1793
|
requestPaxMax: this.store.resource.requestPaxMax
|
|
1754
1794
|
} : {})
|
|
1755
1795
|
};
|
|
1756
|
-
tempOrder.relation_id = normalizedResourceId || this.otherParams?.relation_id;
|
|
1757
|
-
tempOrder.table_form_id = resourceState.tableFormId;
|
|
1758
|
-
tempOrder.resource_id = normalizedResourceId;
|
|
1759
1796
|
this.store.order?.persistTempOrder();
|
|
1760
1797
|
|
|
1761
1798
|
// 空闲状态下自动准备本地临时订单,供后续“购物车式”商品操作使用
|
|
@@ -1800,8 +1837,8 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1800
1837
|
orderId: availabilityInfo.order_id,
|
|
1801
1838
|
relationId: availabilityInfo.relation_id,
|
|
1802
1839
|
tableFormId: availabilityInfo.table_form_id,
|
|
1803
|
-
persistedRelationId:
|
|
1804
|
-
persistedResourceId:
|
|
1840
|
+
persistedRelationId: this.store.resource?.relationId,
|
|
1841
|
+
persistedResourceId: this.store.resource?.relationId,
|
|
1805
1842
|
deskmateValid: availabilityInfo.deskmate_valid,
|
|
1806
1843
|
resourceSelectType: resourceState.resourceSelectType,
|
|
1807
1844
|
isExclusive: resourceState.isExclusive,
|
|
@@ -1818,9 +1855,11 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1818
1855
|
|
|
1819
1856
|
// 恢复之前订单的数据,读取 entrypax
|
|
1820
1857
|
async restorePreviousOrderData() {
|
|
1821
|
-
const
|
|
1858
|
+
const orderModule = this.store.order;
|
|
1859
|
+
if (!orderModule) return;
|
|
1860
|
+
const tempOrder = orderModule.ensureTempOrder();
|
|
1822
1861
|
if (tempOrder.order_id) {
|
|
1823
|
-
const res = await
|
|
1862
|
+
const res = await orderModule.getOrderInfo(tempOrder.order_id);
|
|
1824
1863
|
// 找到下单的时候输入的 entryPaxNumber
|
|
1825
1864
|
const entryPaxNumber = res?.data?.bookings?.find(p => p.metadata?.collect_pax)?.metadata?.collect_pax;
|
|
1826
1865
|
if (entryPaxNumber) {
|
|
@@ -1850,7 +1889,8 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1850
1889
|
async getProductList() {
|
|
1851
1890
|
this.logMethodStart('getProductList');
|
|
1852
1891
|
// 可以直接通过配置里的 menu 读取
|
|
1853
|
-
const
|
|
1892
|
+
const associatedMenus = this.otherParams?.dineInConfig?.['menu.associated_menus'];
|
|
1893
|
+
const menu_list_ids = associatedMenus.map(n => Number(n.value)) || [];
|
|
1854
1894
|
try {
|
|
1855
1895
|
if (!this.store.products) throw new Error('products 模块未初始化');
|
|
1856
1896
|
const res = await this.store.products.loadProducts({
|
|
@@ -1991,7 +2031,8 @@ class ScanOrderImpl extends _BaseModule.BaseModule {
|
|
|
1991
2031
|
return this.store.entryPaxNumber;
|
|
1992
2032
|
}
|
|
1993
2033
|
async syncAdditionalOrderFromResource(resourceId) {
|
|
1994
|
-
|
|
2034
|
+
if (!this.store.order) throw new Error('order 模块未初始化');
|
|
2035
|
+
const tempOrder = this.store.order.ensureTempOrder();
|
|
1995
2036
|
const normalizedResourceId = String(resourceId ?? tempOrder.resource_id ?? this.store.resource?.relationId ?? this.store.resource?.relation_id ?? '').trim();
|
|
1996
2037
|
this.logMethodStart('syncAdditionalOrderFromResource', {
|
|
1997
2038
|
resourceId: normalizedResourceId
|
|
@@ -10,8 +10,8 @@ export declare enum ScanOrderHooks {
|
|
|
10
10
|
onRefresh = "scanOrder:onRefresh",
|
|
11
11
|
onCartValidationChanged = "scanOrder:onCartValidationChanged"
|
|
12
12
|
}
|
|
13
|
-
export type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
|
|
14
|
-
export type ScanOrderEntryContext = {
|
|
13
|
+
export declare type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
|
|
14
|
+
export declare type ScanOrderEntryContext = {
|
|
15
15
|
biz: string;
|
|
16
16
|
mode: 'scan' | 'append';
|
|
17
17
|
resourceId?: string;
|
|
@@ -31,15 +31,20 @@ export interface ScanOrderOrderProductIdentity {
|
|
|
31
31
|
product_id: number | null;
|
|
32
32
|
product_variant_id: number;
|
|
33
33
|
identity_key?: string;
|
|
34
|
+
unique_identification_number?: string;
|
|
34
35
|
/** 参与合并/匹配;与 remove 通配语义见 isSkuOnlyDeleteIdentity */
|
|
35
|
-
|
|
36
|
+
product_sku?: ScanOrderProductSku;
|
|
36
37
|
product_bundle?: any[];
|
|
37
38
|
shop_id?: number | string;
|
|
38
39
|
}
|
|
40
|
+
export interface ScanOrderProductSku {
|
|
41
|
+
option: any[];
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}
|
|
39
44
|
export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
40
45
|
order_detail_id: number | null;
|
|
41
46
|
num: number;
|
|
42
|
-
|
|
47
|
+
product_sku: ScanOrderProductSku;
|
|
43
48
|
/**
|
|
44
49
|
* 券后 **行 composite 单价** = `metadata.main_product_selling_price`
|
|
45
50
|
* + Σ((bundle.bundle_selling_price ?? bundle.price) × (bundle.num ?? 1))
|
|
@@ -61,6 +66,8 @@ export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
|
61
66
|
is_charge_tax: number;
|
|
62
67
|
discount_list: any[];
|
|
63
68
|
product_bundle: any[];
|
|
69
|
+
/** 关联 booking.metadata.unique_identification_number */
|
|
70
|
+
booking_uid?: string;
|
|
64
71
|
/**
|
|
65
72
|
* 行级扩展 metadata。价格相关的权威字段:
|
|
66
73
|
*
|
|
@@ -76,19 +83,19 @@ export interface ScanOrderOrderProduct extends ScanOrderOrderProductIdentity {
|
|
|
76
83
|
metadata: Record<string, any>;
|
|
77
84
|
/** 商品行备注(如顾客对单品的特殊要求) */
|
|
78
85
|
note?: string;
|
|
86
|
+
/** @deprecated UI/SDK 运行态数据迁移到 tempOrder._extend */
|
|
79
87
|
_origin?: Record<string, any>;
|
|
80
88
|
}
|
|
81
89
|
/**
|
|
82
90
|
* 出站 payload 版本的商品行。
|
|
83
91
|
*
|
|
84
92
|
* 与 tempOrder 内部 `ScanOrderOrderProduct` 的字段差异:
|
|
85
|
-
* - `
|
|
86
|
-
*
|
|
87
|
-
* (后端 checkout 协议;丢弃 `price` 等运行时辅助字段)。
|
|
93
|
+
* - `product_sku.option[*]`:内部直接维护统一 Sales 协议字段;
|
|
94
|
+
* 提交时仅规范 `add_price`,保留传入/恢复得到的展示字段。
|
|
88
95
|
* - `product_bundle[*].option[*]`:同上重命名规则。
|
|
89
96
|
*
|
|
90
|
-
* 运行时(UI
|
|
91
|
-
*
|
|
97
|
+
* 运行时(UI 显示、加购合并、指纹、持久化)与提交边界统一消费字段名
|
|
98
|
+
* `option_group_item_id`,保持 tempOrder 与后端协议一致。
|
|
92
99
|
*/
|
|
93
100
|
export interface ScanOrderSubmitProduct extends Omit<ScanOrderOrderProduct, '_origin' | 'identity_key'> {
|
|
94
101
|
/**
|
|
@@ -109,6 +116,7 @@ export interface ScanOrderSummary {
|
|
|
109
116
|
shipping_tax_fee: string;
|
|
110
117
|
tax_fee: string;
|
|
111
118
|
surcharge_fee: string;
|
|
119
|
+
surcharges: any[];
|
|
112
120
|
discount_amount: string;
|
|
113
121
|
deposit_amount: string;
|
|
114
122
|
deposit?: {
|
|
@@ -118,6 +126,9 @@ export interface ScanOrderSummary {
|
|
|
118
126
|
};
|
|
119
127
|
expect_amount: string;
|
|
120
128
|
total_amount: string;
|
|
129
|
+
total_refund_amount: string;
|
|
130
|
+
customer_paid_amount: string;
|
|
131
|
+
order_paid_amount: string;
|
|
121
132
|
amount_gap: string;
|
|
122
133
|
rounding_amount: string;
|
|
123
134
|
pay_service_charge_amount: string;
|
|
@@ -130,11 +141,15 @@ export interface ScanOrderSummary {
|
|
|
130
141
|
*/
|
|
131
142
|
export interface ScanOrderTempOrder {
|
|
132
143
|
order_id: number | null;
|
|
144
|
+
/** @deprecated 资源运行态迁移到 ScanOrder store;仅旧缓存兼容 */
|
|
133
145
|
relation_id?: string;
|
|
146
|
+
/** @deprecated 资源运行态迁移到 ScanOrder store;仅旧缓存兼容 */
|
|
134
147
|
table_form_id?: string;
|
|
148
|
+
/** @deprecated 资源运行态迁移到 ScanOrder store;仅旧缓存兼容 */
|
|
135
149
|
resource_id?: string;
|
|
136
150
|
order_number: string;
|
|
137
151
|
shop_order_number: string;
|
|
152
|
+
shop_full_order_number: string;
|
|
138
153
|
type: string;
|
|
139
154
|
business_code: string;
|
|
140
155
|
platform: string;
|
|
@@ -164,6 +179,7 @@ export interface ScanOrderTempOrder {
|
|
|
164
179
|
table_number?: Record<string, any>;
|
|
165
180
|
schedule_date: string;
|
|
166
181
|
created_at: string;
|
|
182
|
+
request_unique_idempotency_token?: string;
|
|
167
183
|
products: ScanOrderOrderProduct[];
|
|
168
184
|
bookings: any[];
|
|
169
185
|
payments: any[];
|
|
@@ -171,14 +187,20 @@ export interface ScanOrderTempOrder {
|
|
|
171
187
|
discount_list: any[];
|
|
172
188
|
relation_forms: any[];
|
|
173
189
|
contacts: any[];
|
|
174
|
-
contacts_info: any
|
|
190
|
+
contacts_info: Record<string, any> | null;
|
|
175
191
|
holder: Record<string, any> | null;
|
|
176
|
-
summary: ScanOrderSummary;
|
|
177
192
|
metadata: Record<string, any>;
|
|
193
|
+
_extend?: {
|
|
194
|
+
productsByUid?: Record<string, Record<string, any>>;
|
|
195
|
+
[key: string]: any;
|
|
196
|
+
};
|
|
197
|
+
/** @deprecated summary 是 OrderState 派生状态,不属于可提交 tempOrder */
|
|
198
|
+
summary?: ScanOrderSummary;
|
|
199
|
+
/** @deprecated lastOrderInfo 迁移到 OrderState 同层级 */
|
|
178
200
|
lastOrderInfo?: Record<string, any>;
|
|
179
201
|
}
|
|
180
|
-
export interface ScanOrderSubmitPayload extends Omit<ScanOrderTempOrder, 'platform' | 'products' | '
|
|
181
|
-
platform:
|
|
202
|
+
export interface ScanOrderSubmitPayload extends Omit<ScanOrderTempOrder, 'platform' | 'products' | 'summary' | 'surcharges'> {
|
|
203
|
+
platform: string;
|
|
182
204
|
request_unique_idempotency_token?: string;
|
|
183
205
|
form_record_ids?: Array<{
|
|
184
206
|
form_id: number | string;
|
|
@@ -186,7 +208,7 @@ export interface ScanOrderSubmitPayload extends Omit<ScanOrderTempOrder, 'platfo
|
|
|
186
208
|
}>;
|
|
187
209
|
products: ScanOrderSubmitProduct[];
|
|
188
210
|
}
|
|
189
|
-
export type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
|
|
211
|
+
export declare type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
|
|
190
212
|
export interface ScanOrderTableFormRecord {
|
|
191
213
|
policy?: string | null;
|
|
192
214
|
partyroom_booking?: string | null;
|
|
@@ -245,7 +267,7 @@ export interface ScanOrderResourceOccupyDetailApiResponse {
|
|
|
245
267
|
occupy_details?: ScanOrderResourceOccupyDetail[] | null;
|
|
246
268
|
} | null;
|
|
247
269
|
}
|
|
248
|
-
export type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
|
|
270
|
+
export declare type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
|
|
249
271
|
export interface ScanOrderReservationResourceSelectInfo {
|
|
250
272
|
resourceSelectType?: ScanOrderResourceSelectType;
|
|
251
273
|
isSingleReservation: boolean;
|
|
@@ -255,7 +277,7 @@ export interface ScanOrderReservationResourceSelectInfo {
|
|
|
255
277
|
export interface ScanOrderAllowAddItemsInfo {
|
|
256
278
|
enabled: boolean;
|
|
257
279
|
}
|
|
258
|
-
export type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
|
|
280
|
+
export declare type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
|
|
259
281
|
export interface ScanOrderSyncAdditionalOrderResult {
|
|
260
282
|
matched: boolean;
|
|
261
283
|
order_id?: string;
|
|
@@ -19,13 +19,12 @@ let ScanOrderHooks = exports.ScanOrderHooks = /*#__PURE__*/function (ScanOrderHo
|
|
|
19
19
|
* 出站 payload 版本的商品行。
|
|
20
20
|
*
|
|
21
21
|
* 与 tempOrder 内部 `ScanOrderOrderProduct` 的字段差异:
|
|
22
|
-
* - `
|
|
23
|
-
*
|
|
24
|
-
* (后端 checkout 协议;丢弃 `price` 等运行时辅助字段)。
|
|
22
|
+
* - `product_sku.option[*]`:内部直接维护统一 Sales 协议字段;
|
|
23
|
+
* 提交时仅规范 `add_price`,保留传入/恢复得到的展示字段。
|
|
25
24
|
* - `product_bundle[*].option[*]`:同上重命名规则。
|
|
26
25
|
*
|
|
27
|
-
* 运行时(UI
|
|
28
|
-
*
|
|
26
|
+
* 运行时(UI 显示、加购合并、指纹、持久化)与提交边界统一消费字段名
|
|
27
|
+
* `option_group_item_id`,保持 tempOrder 与后端协议一致。
|
|
29
28
|
*/
|
|
30
29
|
/**
|
|
31
30
|
* ScanOrder 临时订单(runtime-clean 版本)
|