@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
|
@@ -44,7 +44,8 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
44
44
|
// 非表单类型 holder 视为匹配
|
|
45
45
|
if (discount.holder?.holder_type !== 'form') return true;
|
|
46
46
|
// 主预约holder, 目前(20251124)默认只考虑单个holder的情况
|
|
47
|
-
|
|
47
|
+
// 旧版 holders[0].form_record_id 新版 holders[0]
|
|
48
|
+
const orderHolderId = Array.isArray(holders) && holders.length > 0 ? holders[0].form_record_id || holders[0] : undefined;
|
|
48
49
|
const productHolderId = Array.isArray(product.holder_id) ? product.holder_id[0] : product.holder_id;
|
|
49
50
|
// 商品不需要选holder,则不对比holder,直接返回true,
|
|
50
51
|
if (!product.isNeedHolder) return true;
|
|
@@ -92,8 +93,8 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
92
93
|
const result = this.calcDiscount({
|
|
93
94
|
discountList: mergedDiscountList,
|
|
94
95
|
productList: [...productList],
|
|
95
|
-
holders,
|
|
96
96
|
orderTotalAmount,
|
|
97
|
+
holders,
|
|
97
98
|
isFormSubject
|
|
98
99
|
}, {
|
|
99
100
|
scan: true
|
|
@@ -138,6 +139,15 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
138
139
|
return (discountList || []).filter(item => item.type === type || item.tag === type);
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
/** 剔除指定 type/tag 的折扣项,保留手动改价(type=product) / 券等 */
|
|
143
|
+
excludeDiscountListByType(discountList, type) {
|
|
144
|
+
return (discountList || []).filter(item => item.type !== type && item.tag !== type);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** 手动改价场景:去掉 promotion,保留 type=product 等行内折扣 */
|
|
148
|
+
resolveDiscountListForManualOverride(discountList) {
|
|
149
|
+
return this.excludeDiscountListByType(discountList, 'promotion');
|
|
150
|
+
}
|
|
141
151
|
// 获取券不可用的原因
|
|
142
152
|
getUnavailableReason(discountList, productList) {
|
|
143
153
|
// 检查时间限制
|
|
@@ -179,6 +189,33 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
179
189
|
isFormSubject,
|
|
180
190
|
orderTotalAmount
|
|
181
191
|
}, options) {
|
|
192
|
+
const resolveIsFormSubject = product => typeof isFormSubject === 'function' ? Boolean(isFormSubject(product)) : Boolean(isFormSubject);
|
|
193
|
+
|
|
194
|
+
// 识别出来是不是在编辑的界面里又新增了商品
|
|
195
|
+
// 这种情况下,如果有可用的优惠券,也会自动勾选上
|
|
196
|
+
const isEditModeAddNewProduct = productList.find(n => n.booking_id) && productList.find(n => !n.booking_id);
|
|
197
|
+
const reapplyBookingDiscountProductUids = new Set((options?.reapplyBookingDiscountProductUids || []).filter(uid => uid !== undefined && uid !== null && uid !== '').map(String));
|
|
198
|
+
const getOriginProductUid = originProduct => {
|
|
199
|
+
const uid = originProduct?.metadata?.unique_identification_number ?? originProduct?.unique_identification_number;
|
|
200
|
+
if (uid === undefined || uid === null || uid === '') return undefined;
|
|
201
|
+
return String(uid);
|
|
202
|
+
};
|
|
203
|
+
const shouldReapplyBookingDiscount = (originProduct, selectedDiscount) => {
|
|
204
|
+
if (!selectedDiscount) return false;
|
|
205
|
+
const uid = getOriginProductUid(originProduct);
|
|
206
|
+
if (!uid || !reapplyBookingDiscountProductUids.has(uid)) return false;
|
|
207
|
+
const discountType = selectedDiscount.tag || selectedDiscount.type;
|
|
208
|
+
return selectedDiscount.isEditMode === true && selectedDiscount.isSelected === true && ['good_pass', 'discount_card', 'product_discount_card'].includes(discountType);
|
|
209
|
+
};
|
|
210
|
+
const resolveReapplyEditModeDiscountPercent = (originProduct, selectedDiscount) => {
|
|
211
|
+
if (!shouldReapplyBookingDiscount(originProduct, selectedDiscount)) return undefined;
|
|
212
|
+
const discountType = selectedDiscount?.tag || selectedDiscount?.type;
|
|
213
|
+
if (discountType !== 'discount_card' && discountType !== 'product_discount_card') {
|
|
214
|
+
return undefined;
|
|
215
|
+
}
|
|
216
|
+
const percent = Number(selectedDiscount.discount?.percent);
|
|
217
|
+
return Number.isFinite(percent) ? percent : undefined;
|
|
218
|
+
};
|
|
182
219
|
const editModeDiscount = [];
|
|
183
220
|
const addModeDiscount = [];
|
|
184
221
|
discountList.forEach(discount => {
|
|
@@ -205,11 +242,21 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
205
242
|
}
|
|
206
243
|
});
|
|
207
244
|
}
|
|
245
|
+
const hasDiscountInput = editModeDiscount.length > 0 || addModeDiscount.length > 0 || Boolean(options?.discountId) || Boolean(options?.selectedList?.length) || Boolean(options?.scan);
|
|
246
|
+
if (!hasDiscountInput) {
|
|
247
|
+
return {
|
|
248
|
+
discountList,
|
|
249
|
+
productList
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const canUseEditModeDiscountForReapply = discount => {
|
|
253
|
+
const discountType = discount.tag || discount.type;
|
|
254
|
+
return reapplyBookingDiscountProductUids.size > 0 && discount.isEditMode === true && discount.isSelected === true && ['good_pass', 'discount_card', 'product_discount_card'].includes(discountType);
|
|
255
|
+
};
|
|
208
256
|
|
|
209
|
-
// 过滤掉手动取消false
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
257
|
+
// 过滤掉手动取消false的优惠券,但仅用于应用优惠逻辑。
|
|
258
|
+
// Change time 重报价需要把已选编辑态折扣卡重新放入候选,再由目标 uid 限定作用范围。
|
|
259
|
+
const filteredDiscountList = [...addModeDiscount.filter(discount => !discount.isManualSelect), ...editModeDiscount.filter(canUseEditModeDiscountForReapply)];
|
|
213
260
|
|
|
214
261
|
// 🔥 扁平化商品列表:将 bundle 子商品展开为虚拟商品
|
|
215
262
|
const flattenProductsWithBundle = productList => {
|
|
@@ -378,10 +425,6 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
378
425
|
// 🔥 扁平化商品列表(包含主商品和bundle子商品)
|
|
379
426
|
const flattenedList = flattenProductsWithBundle(productList);
|
|
380
427
|
|
|
381
|
-
// 识别出来是不是在编辑的界面里又新增了商品
|
|
382
|
-
// 这种情况下,如果有可用的优惠券,也会自动勾选上
|
|
383
|
-
const isEditModeAddNewProduct = flattenedList.find(n => n.booking_id) && flattenedList.find(n => !n.booking_id);
|
|
384
|
-
|
|
385
428
|
// 对扁平化后的列表按价格降序排序(用于应用优惠券时优先选择高价商品)
|
|
386
429
|
const sortedFlattenedList = flattenedList.sort((a, b) => {
|
|
387
430
|
// 子商品优先使用 original_price,主商品使用 price
|
|
@@ -625,6 +668,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
625
668
|
}
|
|
626
669
|
}
|
|
627
670
|
});
|
|
671
|
+
|
|
628
672
|
// 🔥 第三步:识别 order_level 折扣卡并预计算分摊(排除被其他专属折扣卡占用的商品)
|
|
629
673
|
sortedDiscountList.forEach(discount => {
|
|
630
674
|
if (!(0, _utils.isOrderLevelFixedAmountDiscount)(discount)) {
|
|
@@ -719,7 +763,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
719
763
|
// 拿到discount配置的holder信息 product信息 product.holder 加在 isLimitedProduct
|
|
720
764
|
const _tempVar = flatItem?.type === 'bundle' ? flatItem?.parentProduct : flatItem?.product;
|
|
721
765
|
const isHolderMatch = this.checkHolderMatch(discount, {
|
|
722
|
-
isNeedHolder:
|
|
766
|
+
isNeedHolder: resolveIsFormSubject(_tempVar) && !_tempVar?.isNormalProduct,
|
|
723
767
|
holder_id: _tempVar?.holder_id || product.holder_id
|
|
724
768
|
}, holders);
|
|
725
769
|
let timeLimit = true;
|
|
@@ -757,7 +801,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
757
801
|
title: discount.format_title,
|
|
758
802
|
original_amount: product.price || product.origin_total,
|
|
759
803
|
pre_value: discount.par_value,
|
|
760
|
-
product_id: originProduct.id,
|
|
804
|
+
product_id: originProduct.id || originProduct.product_id,
|
|
761
805
|
discount_product_id: discount.product_id
|
|
762
806
|
},
|
|
763
807
|
metadata: {
|
|
@@ -858,9 +902,15 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
858
902
|
};
|
|
859
903
|
originProduct = flatItem.originProduct;
|
|
860
904
|
}
|
|
905
|
+
const isPersistedProduct = product?.booking_id || originProduct?.order_detail_id || originProduct?.orderDetailId || originProduct?.booking_id;
|
|
906
|
+
const hasExistingWalletDiscount = product.discount_list?.length && product?.discount_list?.every(discount => {
|
|
907
|
+
const discountIdentity = discount.id ?? discount.discount?.resource_id;
|
|
908
|
+
const discountType = discount.tag || discount.type;
|
|
909
|
+
return Boolean(discountIdentity && ['good_pass', 'discount_card', 'product_discount_card'].includes(discountType));
|
|
910
|
+
});
|
|
861
911
|
|
|
862
|
-
//
|
|
863
|
-
if (
|
|
912
|
+
// 已持久化且已有钱包券/折扣卡的商品行跳过,保留后端历史折扣结果。
|
|
913
|
+
if (isPersistedProduct && hasExistingWalletDiscount) {
|
|
864
914
|
if (flatItem.type === 'main') {
|
|
865
915
|
processedProductsMap.set(product._id, [originProduct]);
|
|
866
916
|
} else {
|
|
@@ -876,7 +926,14 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
876
926
|
const applicableDiscounts = sortedDiscountList.filter(discount => {
|
|
877
927
|
// 🔥 检查策略可用性(针对 good_pass 和折扣卡)
|
|
878
928
|
const discountType = discount.tag || discount.type;
|
|
879
|
-
|
|
929
|
+
const currentOriginUid = getOriginProductUid(originProduct);
|
|
930
|
+
const isReapplyEditModeDiscountForProduct = discount.isEditMode && reapplyBookingDiscountProductUids.size > 0 && currentOriginUid && reapplyBookingDiscountProductUids.has(String(currentOriginUid)) && discount.isSelected === true;
|
|
931
|
+
if (discount.isEditMode && reapplyBookingDiscountProductUids.size > 0) {
|
|
932
|
+
const uid = currentOriginUid;
|
|
933
|
+
if (!uid || !reapplyBookingDiscountProductUids.has(uid)) return false;
|
|
934
|
+
if (!discount.isSelected) return false;
|
|
935
|
+
}
|
|
936
|
+
if (['good_pass', 'discount_card', 'product_discount_card'].includes(discountType) && !isReapplyEditModeDiscountForProduct) {
|
|
880
937
|
// 如果策略检查后没有config,说明不可用
|
|
881
938
|
if (discount.config === undefined || !discount?.config?.isAvailable) {
|
|
882
939
|
return false;
|
|
@@ -920,7 +977,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
920
977
|
// 拿到discount配置的holder信息 product信息 product.holder 不可用return false
|
|
921
978
|
const _tempVar = flatItem?.type === 'bundle' ? flatItem?.parentProduct : flatItem?.product;
|
|
922
979
|
const isHolderMatch = this.checkHolderMatch(discount, {
|
|
923
|
-
isNeedHolder:
|
|
980
|
+
isNeedHolder: resolveIsFormSubject(_tempVar) && !_tempVar?.isNormalProduct,
|
|
924
981
|
holder_id: _tempVar?.holder_id || product.holder_id
|
|
925
982
|
}, holders);
|
|
926
983
|
// 如果 holder 不匹配,则不适用
|
|
@@ -962,7 +1019,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
962
1019
|
let isManualDiscount = false;
|
|
963
1020
|
if (flatItem.type === 'main') {
|
|
964
1021
|
// 主商品:判断自身是否手动折扣
|
|
965
|
-
isManualDiscount = typeof product.isManualDiscount === 'boolean' ? product.isManualDiscount : product.total != product.origin_total && (product.bundle || []).every(item => !(item.discount_list || [])?.length) && (!product.discount_list?.length || product?.discount_list?.every?.(item => item.type === 'product'));
|
|
1022
|
+
isManualDiscount = typeof product.isManualDiscount === 'boolean' ? product.isManualDiscount : product.discount_list?.some(item => item.type === 'product') || product.total != product.origin_total && (product.bundle || []).every(item => !(item.discount_list || [])?.length) && (!product.discount_list?.length || product?.discount_list?.every?.(item => item.type === 'product'));
|
|
966
1023
|
if (product.inPromotion) {
|
|
967
1024
|
isManualDiscount = false;
|
|
968
1025
|
}
|
|
@@ -970,7 +1027,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
970
1027
|
// bundle子商品:判断父主商品是否手动折扣
|
|
971
1028
|
const parentProduct = flatItem.parentProduct;
|
|
972
1029
|
if (parentProduct) {
|
|
973
|
-
isManualDiscount = typeof parentProduct.isManualDiscount === 'boolean' ? parentProduct.isManualDiscount : parentProduct.total != parentProduct.origin_total && (parentProduct.bundle || []).every(item => !(item.discount_list || [])?.length) && (!parentProduct.discount_list?.length || parentProduct?.discount_list?.every?.(item => item.type === 'product'));
|
|
1030
|
+
isManualDiscount = typeof parentProduct.isManualDiscount === 'boolean' ? parentProduct.isManualDiscount : parentProduct.discount_list?.some(item => item.type === 'product') || parentProduct.total != parentProduct.origin_total && (parentProduct.bundle || []).every(item => !(item.discount_list || [])?.length) && (!parentProduct.discount_list?.length || parentProduct?.discount_list?.every?.(item => item.type === 'product'));
|
|
974
1031
|
}
|
|
975
1032
|
}
|
|
976
1033
|
|
|
@@ -1027,7 +1084,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1027
1084
|
price: product.price,
|
|
1028
1085
|
options: restoredOptions
|
|
1029
1086
|
}),
|
|
1030
|
-
discount_list: this.filterDiscountListByType(product.discount_list, 'promotion')
|
|
1087
|
+
discount_list: isManualDiscount ? this.resolveDiscountListForManualOverride(product.discount_list) : this.filterDiscountListByType(product.discount_list, 'promotion')
|
|
1031
1088
|
})]);
|
|
1032
1089
|
} else {
|
|
1033
1090
|
let total = product.inPromotion ? product?._promotion?.finalPrice ?? product.origin_total ?? product.total : product.origin_total ?? product.total;
|
|
@@ -1042,26 +1099,26 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1042
1099
|
} : {
|
|
1043
1100
|
_id: product._id.split('___')[0] + '___' + index,
|
|
1044
1101
|
total,
|
|
1045
|
-
original_price: product.original_price,
|
|
1046
1102
|
price: product.price,
|
|
1047
1103
|
main_product_selling_price,
|
|
1048
1104
|
options: restoredOptions
|
|
1049
1105
|
}),
|
|
1050
|
-
discount_list: this.filterDiscountListByType(product.discount_list, 'promotion')
|
|
1106
|
+
discount_list: isManualDiscount ? this.resolveDiscountListForManualOverride(product.discount_list) : this.filterDiscountListByType(product.discount_list, 'promotion')
|
|
1051
1107
|
})]);
|
|
1052
1108
|
}
|
|
1053
1109
|
} else {
|
|
1054
1110
|
// bundle子商品:保存到扁平化Map
|
|
1055
1111
|
processedFlatItemsMap.set(flatItem._id, [{
|
|
1056
1112
|
...flatItem,
|
|
1057
|
-
discount_list: this.filterDiscountListByType(flatItem.bundleItem?.discount_list || [], 'promotion'),
|
|
1113
|
+
discount_list: isManualDiscount ? this.resolveDiscountListForManualOverride(flatItem.bundleItem?.discount_list || []) : this.filterDiscountListByType(flatItem.bundleItem?.discount_list || [], 'promotion'),
|
|
1058
1114
|
price: isManualDiscount ? flatItem.bundleItem.price : flatItem.bundleItem.original_price,
|
|
1059
1115
|
processed: true
|
|
1060
1116
|
}]);
|
|
1061
1117
|
}
|
|
1062
1118
|
return;
|
|
1063
1119
|
}
|
|
1064
|
-
|
|
1120
|
+
const shouldReapplyBookingDiscountForProduct = shouldReapplyBookingDiscount(originProduct, selectedDiscount);
|
|
1121
|
+
if (applicableDiscounts.length && product.booking_id && typeof selectedDiscount.isManualSelect === 'undefined' && !options?.scan && !isEditModeAddNewProduct && !shouldReapplyBookingDiscountForProduct) {
|
|
1065
1122
|
return;
|
|
1066
1123
|
}
|
|
1067
1124
|
|
|
@@ -1158,18 +1215,25 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1158
1215
|
let productDiscountDifference;
|
|
1159
1216
|
let discountedOptions = product.options;
|
|
1160
1217
|
let optionDiscountAmount = 0;
|
|
1218
|
+
let reapplyDiscountPercent;
|
|
1161
1219
|
if (isOrderLevel && productAllocation) {
|
|
1162
1220
|
// order_level:使用预计算的分摊金额
|
|
1163
1221
|
amount = productAllocation.discountAmount;
|
|
1164
1222
|
productDiscountDifference = productAllocation.difference;
|
|
1165
1223
|
mainProductSellingPrice = Math.max(new _decimal.default(product.price).minus(amount).toNumber(), 0);
|
|
1224
|
+
} else if (resolveReapplyEditModeDiscountPercent(originProduct, selectedDiscount) !== undefined) {
|
|
1225
|
+
// Change time 重套编辑态折扣卡时,历史 par_value 不是运行时折扣口径,优先使用后端快照里的 percent。
|
|
1226
|
+
const percent = resolveReapplyEditModeDiscountPercent(originProduct, selectedDiscount);
|
|
1227
|
+
reapplyDiscountPercent = new _decimal.default(percent).toFixed(2);
|
|
1228
|
+
mainProductSellingPrice = new _decimal.default(product.price || 0).mul(new _decimal.default(100).minus(percent)).div(100).toDecimalPlaces(2).toNumber();
|
|
1229
|
+
amount = new _decimal.default(product.price).minus(mainProductSellingPrice).toNumber();
|
|
1166
1230
|
} else {
|
|
1167
1231
|
// item_level 或其他类型:使用原有逻辑
|
|
1168
|
-
mainProductSellingPrice = (0, _utils.getDiscountAmount)(
|
|
1232
|
+
mainProductSellingPrice = (0, _utils.getDiscountAmount)(selectedDiscount, product.price, product.price);
|
|
1169
1233
|
amount = new _decimal.default(product.price).minus(new _decimal.default(mainProductSellingPrice)).toNumber();
|
|
1170
1234
|
}
|
|
1171
1235
|
if (isDeductOptionPrice && product.options?.length) {
|
|
1172
|
-
const optionResult = applyDiscountToOptions(product.options,
|
|
1236
|
+
const optionResult = applyDiscountToOptions(product.options, selectedDiscount);
|
|
1173
1237
|
discountedOptions = optionResult.discountedOptions;
|
|
1174
1238
|
optionDiscountAmount = optionResult.optionDiscountAmount;
|
|
1175
1239
|
}
|
|
@@ -1182,9 +1246,8 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1182
1246
|
// discount_list.amount / fixed_amount:行级总优惠 = 主商品优惠 + option 优惠(与 total 变化一致)
|
|
1183
1247
|
const mainProductDiscountAmount = amount;
|
|
1184
1248
|
const lineDiscountAmount = new _decimal.default(mainProductDiscountAmount).plus(optionDiscountAmount).toNumber();
|
|
1185
|
-
const currentDiscountType = currentSelectedDiscount.tag === 'product_discount_card' ? 'discount_card' : currentSelectedDiscount.tag;
|
|
1186
1249
|
const discountType = selectedDiscount.tag || selectedDiscount.type;
|
|
1187
|
-
const currentIsGoodPass =
|
|
1250
|
+
const currentIsGoodPass = discountType === 'good_pass';
|
|
1188
1251
|
const discountDetail = {
|
|
1189
1252
|
amount: lineDiscountAmount,
|
|
1190
1253
|
type: selectedDiscount.tag === 'product_discount_card' ? 'discount_card' : discountType,
|
|
@@ -1195,9 +1258,9 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1195
1258
|
resource_id: selectedDiscount.id,
|
|
1196
1259
|
title: selectedDiscount.format_title,
|
|
1197
1260
|
original_amount: product.price,
|
|
1198
|
-
product_id: originProduct.id,
|
|
1199
|
-
percent:
|
|
1200
|
-
discount_product_id:
|
|
1261
|
+
product_id: originProduct.id || originProduct.product_id,
|
|
1262
|
+
percent: reapplyDiscountPercent ?? selectedDiscount.par_value,
|
|
1263
|
+
discount_product_id: selectedDiscount.product_id
|
|
1201
1264
|
},
|
|
1202
1265
|
// 前端使用的num数量,为了计算优惠金额(拆分时为1)
|
|
1203
1266
|
_num: isNeedSplit ? 1 : product.num,
|
|
@@ -1215,7 +1278,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1215
1278
|
}
|
|
1216
1279
|
};
|
|
1217
1280
|
appliedProducts.push(discountDetail);
|
|
1218
|
-
appliedDiscountProducts.set(
|
|
1281
|
+
appliedDiscountProducts.set(selectedDiscount.id, appliedProducts);
|
|
1219
1282
|
|
|
1220
1283
|
// 记录应用了优惠券的商品
|
|
1221
1284
|
// 后续更新价格改为 getProductTotalPrice getProductOriginTotalPrice逻辑
|
|
@@ -1223,7 +1286,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1223
1286
|
arr.push(this.hooks.setProduct(originProduct, {
|
|
1224
1287
|
discount_list: [discountDetail],
|
|
1225
1288
|
// good_pass:主商品价以折后价为准;勿用 product.price - amount(amount 含 option 优惠时会算错)
|
|
1226
|
-
price:
|
|
1289
|
+
price: isGoodPass ? mainProductSellingPrice : product.price,
|
|
1227
1290
|
quantity: isNeedSplit ? 1 : product.quantity,
|
|
1228
1291
|
origin_total: (0, _utils2.getProductOriginTotalPrice)({
|
|
1229
1292
|
product: {
|
|
@@ -1283,6 +1346,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1283
1346
|
// 计算折扣后的价格(使用 getDiscountAmount,内部已处理 maxDeductionAmount)
|
|
1284
1347
|
const discountedPrice = (0, _utils.getDiscountAmount)(currentBundleDiscount, product.origin_total, product.origin_total);
|
|
1285
1348
|
const bundleDiscountAmount = new _decimal.default(product.origin_total || 0).minus(discountedPrice).toNumber();
|
|
1349
|
+
debugger;
|
|
1286
1350
|
|
|
1287
1351
|
// 确定折扣类型
|
|
1288
1352
|
const bundleDiscountType = currentBundleDiscount.tag === 'product_discount_card' ? 'discount_card' : currentBundleDiscount.tag;
|
|
@@ -1296,9 +1360,8 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1296
1360
|
resource_id: currentBundleDiscount.id,
|
|
1297
1361
|
title: currentBundleDiscount.format_title,
|
|
1298
1362
|
original_amount: product.origin_total,
|
|
1299
|
-
product_id: product.id,
|
|
1300
|
-
|
|
1301
|
-
discount_product_id: currentBundleDiscount.product_id
|
|
1363
|
+
product_id: product.id || product.product_id,
|
|
1364
|
+
discount_product_id: selectedDiscount.product_id
|
|
1302
1365
|
},
|
|
1303
1366
|
metadata: {
|
|
1304
1367
|
// 🔥 使用拆分后的唯一 _id
|
|
@@ -1590,6 +1653,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1590
1653
|
|
|
1591
1654
|
// 🔥 使用当前的 _id 作为唯一标识
|
|
1592
1655
|
const uniqueId = flatItem._id;
|
|
1656
|
+
debugger;
|
|
1593
1657
|
const discountDetail = {
|
|
1594
1658
|
amount: bundleActualDiscountAmount * (product.num || 1),
|
|
1595
1659
|
type: currentBundleDiscount.tag === 'product_discount_card' ? 'discount_card' : currentBundleDiscount.tag,
|
|
@@ -1600,9 +1664,9 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1600
1664
|
resource_id: currentBundleDiscount.id,
|
|
1601
1665
|
title: currentBundleDiscount.format_title,
|
|
1602
1666
|
original_amount: product.original_price,
|
|
1603
|
-
product_id: product.id,
|
|
1604
|
-
percent:
|
|
1605
|
-
discount_product_id:
|
|
1667
|
+
product_id: product.id || product.product_id,
|
|
1668
|
+
percent: selectedDiscount.par_value,
|
|
1669
|
+
discount_product_id: selectedDiscount.product_id
|
|
1606
1670
|
},
|
|
1607
1671
|
metadata: {
|
|
1608
1672
|
// 🔥 使用唯一的 _id
|
|
@@ -1927,6 +1991,8 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1927
1991
|
} else {
|
|
1928
1992
|
// 🔥 关键:拆分后的bundle item
|
|
1929
1993
|
processedBundleItems.forEach(item => {
|
|
1994
|
+
const nextBundlePrice = item.price ?? bundleItem.price;
|
|
1995
|
+
const nextBundleSellingPrice = item.bundle_selling_price ?? item.price ?? bundleItem.bundle_selling_price;
|
|
1930
1996
|
// 🔥 更新 discount_list 中的 num,使其与拆分后的 item.num 一致
|
|
1931
1997
|
const updatedDiscountList = (item.discount_list || []).map(discount => ({
|
|
1932
1998
|
...discount,
|
|
@@ -1941,18 +2007,20 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1941
2007
|
...bundleItem,
|
|
1942
2008
|
_id: item._id,
|
|
1943
2009
|
product_id: bundleItem.product_id,
|
|
1944
|
-
price:
|
|
2010
|
+
price: nextBundlePrice,
|
|
1945
2011
|
num: item.num,
|
|
1946
2012
|
discount_list: updatedDiscountList,
|
|
1947
|
-
bundle_selling_price: bundleItem.bundle_selling_price !== undefined ?
|
|
2013
|
+
bundle_selling_price: bundleItem.bundle_selling_price !== undefined ? nextBundleSellingPrice : undefined
|
|
1948
2014
|
});
|
|
1949
2015
|
});
|
|
1950
2016
|
}
|
|
1951
2017
|
});
|
|
1952
2018
|
}
|
|
1953
2019
|
|
|
1954
|
-
//
|
|
1955
|
-
|
|
2020
|
+
// 主商品已经在前面的 setProduct 中应用过折扣;这里只替换 bundle,
|
|
2021
|
+
// 避免把主商品 discount_list 再扣一次。
|
|
2022
|
+
const mainSellingPrice = mainProductData.main_product_selling_price ?? mainProductData.price ?? 0;
|
|
2023
|
+
let newTotal = Number(mainSellingPrice || 0);
|
|
1956
2024
|
let newOriginTotal = Number(mainProductData.original_price || mainProductData.price || 0);
|
|
1957
2025
|
|
|
1958
2026
|
// 判断是否是手动折扣
|
|
@@ -1963,23 +2031,18 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
1963
2031
|
newTotal = mainProductData.total ?? newTotal;
|
|
1964
2032
|
newOriginTotal = mainProductData.origin_total ?? newOriginTotal;
|
|
1965
2033
|
} else {
|
|
1966
|
-
//
|
|
1967
|
-
const mainDiscountList = mainProductData.discount_list.filter(item => !item?.metadata?.custom_product_bundle_map_id);
|
|
1968
|
-
|
|
1969
|
-
// 如果主商品本身有折扣,需要重新计算主商品价格
|
|
1970
|
-
if (mainDiscountList && mainDiscountList.length > 0) {
|
|
1971
|
-
const allDiscountAmount = (0, _utils.getDiscountListAmount)(mainDiscountList);
|
|
1972
|
-
newTotal = new _decimal.default(mainProductData.price || 0).minus(allDiscountAmount).toNumber() ?? newTotal;
|
|
1973
|
-
newOriginTotal = mainProductData.origin_total ?? newOriginTotal;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
// 累加bundle的价格(只累加一次)
|
|
2034
|
+
// 累加bundle的折后价格(只累加一次)
|
|
1977
2035
|
if (newBundle.length > 0) {
|
|
1978
2036
|
newBundle.forEach(item => {
|
|
1979
2037
|
newTotal += Number(item.price) * Number(item.num);
|
|
1980
2038
|
const originalPrice = item.discount_list?.[0]?.discount?.original_amount || item.price;
|
|
1981
2039
|
newOriginTotal += Number(originalPrice) * Number(item.num);
|
|
1982
2040
|
});
|
|
2041
|
+
// 计算原始总价(不考虑折扣)
|
|
2042
|
+
newBundle.forEach(item => {
|
|
2043
|
+
const originalPrice = item.discount_list?.[0]?.discount?.original_amount || item.price;
|
|
2044
|
+
newOriginTotal += Number(originalPrice) * Number(item.num);
|
|
2045
|
+
});
|
|
1983
2046
|
}
|
|
1984
2047
|
}
|
|
1985
2048
|
|
|
@@ -2102,13 +2165,14 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
2102
2165
|
// 套餐适用范围配置
|
|
2103
2166
|
const packageScope = usageRules?.package_scope;
|
|
2104
2167
|
const {
|
|
2105
|
-
type: scopeType,
|
|
2168
|
+
type: scopeType = 'product_all',
|
|
2106
2169
|
exclude_bundle_product_ids = [],
|
|
2107
2170
|
include_bundle_product_ids = [],
|
|
2108
2171
|
filter = 0
|
|
2109
2172
|
} = packageScope || {};
|
|
2110
2173
|
const isMainProduct = flatItem.type === 'main'; // 单独购买
|
|
2111
2174
|
const isBundleItem = flatItem.type === 'bundle'; // 套餐中购买
|
|
2175
|
+
const bundleMainProductId = flatItem.product?.product_id;
|
|
2112
2176
|
|
|
2113
2177
|
// 主商品直接可用
|
|
2114
2178
|
if (isMainProduct) {
|
|
@@ -2150,13 +2214,13 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
2150
2214
|
if (!filter) {
|
|
2151
2215
|
isScopeValid = true;
|
|
2152
2216
|
} else {
|
|
2153
|
-
isScopeValid = !exclude_bundle_product_ids.includes(Number(
|
|
2217
|
+
isScopeValid = !exclude_bundle_product_ids.includes(Number(bundleMainProductId));
|
|
2154
2218
|
}
|
|
2155
2219
|
}
|
|
2156
2220
|
|
|
2157
2221
|
// 包含套餐判断, products值兼容旧数据
|
|
2158
2222
|
if (scopeType === 'specific_packages' || scopeType === 'products') {
|
|
2159
|
-
isScopeValid = include_bundle_product_ids.includes(Number(
|
|
2223
|
+
isScopeValid = include_bundle_product_ids.includes(Number(bundleMainProductId));
|
|
2160
2224
|
}
|
|
2161
2225
|
|
|
2162
2226
|
// 价格和套餐适用范围都符合,则可用
|
|
@@ -2205,16 +2269,43 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
2205
2269
|
|
|
2206
2270
|
// 检查 rules
|
|
2207
2271
|
if (rules.length > 0) {
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2272
|
+
const _isOriginalPrice = isOriginalPrice && rules.includes('original_price');
|
|
2273
|
+
const _isMarkupPrice = isMarkupPrice && rules.includes('markup_price');
|
|
2274
|
+
// 价格是否符合规则:原价或加价
|
|
2275
|
+
const isPriceValid = _isOriginalPrice || _isMarkupPrice;
|
|
2276
|
+
// 套餐适用范围校验
|
|
2277
|
+
let isScopeValid = false;
|
|
2278
|
+
|
|
2279
|
+
// 排除套餐判断, product_all值兼容旧数据
|
|
2280
|
+
if (scopeType === 'all_packages' || scopeType === 'product_all') {
|
|
2281
|
+
// 所有套餐可用
|
|
2282
|
+
if (!filter) {
|
|
2283
|
+
isScopeValid = true;
|
|
2284
|
+
} else {
|
|
2285
|
+
isScopeValid = !exclude_bundle_product_ids.includes(Number(bundleMainProductId));
|
|
2286
|
+
}
|
|
2211
2287
|
}
|
|
2212
2288
|
|
|
2213
|
-
//
|
|
2214
|
-
if (
|
|
2289
|
+
// 包含套餐判断, products值兼容旧数据
|
|
2290
|
+
if (scopeType === 'specific_packages' || scopeType === 'products') {
|
|
2291
|
+
isScopeValid = include_bundle_product_ids.includes(Number(bundleMainProductId));
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
// 价格和套餐适用范围都符合,则可用
|
|
2295
|
+
if (isPriceValid && isScopeValid) {
|
|
2215
2296
|
return true;
|
|
2216
2297
|
}
|
|
2217
2298
|
|
|
2299
|
+
// 检查原价
|
|
2300
|
+
// if (isOriginalPrice && rules.includes('original_price')) {
|
|
2301
|
+
// return true;
|
|
2302
|
+
// }
|
|
2303
|
+
|
|
2304
|
+
// 检查加价
|
|
2305
|
+
// if (isMarkupPrice && rules.includes('markup_price')) {
|
|
2306
|
+
// return true;
|
|
2307
|
+
// }
|
|
2308
|
+
|
|
2218
2309
|
// 如果都不匹配,则不可用
|
|
2219
2310
|
return false;
|
|
2220
2311
|
}
|
|
@@ -2283,6 +2374,7 @@ class RulesModule extends _BaseModule.BaseModule {
|
|
|
2283
2374
|
async destroy() {
|
|
2284
2375
|
this.core.effects.offByModuleDestroy(this.name);
|
|
2285
2376
|
await this.core.effects.emit(`${this.name}:onDestroy`, {});
|
|
2377
|
+
super.destroy();
|
|
2286
2378
|
}
|
|
2287
2379
|
async clear() {}
|
|
2288
2380
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Discount } from '../Discount/types';
|
|
2
|
+
import { SetDiscountSelectedParams } from '../../solution/ShopDiscount/types';
|
|
2
3
|
export declare enum UnavailableReason {
|
|
3
4
|
TimeLimit = "time_limit",
|
|
4
5
|
ProductNotApplicable = "product_not_applicable",
|
|
@@ -22,6 +23,15 @@ export interface DiscountResult {
|
|
|
22
23
|
productList: any[];
|
|
23
24
|
discountList: any[];
|
|
24
25
|
}
|
|
26
|
+
export declare type RulesFormSubject = boolean | ((product: any) => boolean);
|
|
27
|
+
export interface RulesCalcDiscountOptions {
|
|
28
|
+
isSelected?: boolean;
|
|
29
|
+
discountId?: number;
|
|
30
|
+
selectedList?: SetDiscountSelectedParams[];
|
|
31
|
+
scan?: boolean;
|
|
32
|
+
/** Change time 重报价目标行:允许已选编辑态折扣卡重新应用到这些 booking 商品。 */
|
|
33
|
+
reapplyBookingDiscountProductUids?: string[];
|
|
34
|
+
}
|
|
25
35
|
export interface RulesModuleAPI {
|
|
26
36
|
setRulesList: (rulesList: Rules[]) => Promise<void>;
|
|
27
37
|
clear: () => Promise<void>;
|
|
@@ -31,11 +41,11 @@ export interface RulesModuleAPI {
|
|
|
31
41
|
holders: {
|
|
32
42
|
form_record_id: number;
|
|
33
43
|
}[];
|
|
34
|
-
isFormSubject:
|
|
44
|
+
isFormSubject: RulesFormSubject;
|
|
35
45
|
orderTotalAmount: number;
|
|
36
|
-
}) => DiscountResult;
|
|
46
|
+
}, options?: RulesCalcDiscountOptions) => DiscountResult;
|
|
37
47
|
}
|
|
38
|
-
type ProductDetail = {
|
|
48
|
+
declare type ProductDetail = {
|
|
39
49
|
isClient?: boolean;
|
|
40
50
|
isManualDiscount?: boolean;
|
|
41
51
|
booking_id: any;
|
|
@@ -51,8 +61,9 @@ type ProductDetail = {
|
|
|
51
61
|
num?: number;
|
|
52
62
|
quantity: number;
|
|
53
63
|
vouchersApplicable?: boolean;
|
|
54
|
-
holder_id?: number
|
|
64
|
+
holder_id?: number;
|
|
55
65
|
startDate?: any;
|
|
66
|
+
main_product_selling_price?: number | string;
|
|
56
67
|
};
|
|
57
68
|
export interface RulesParamsHooks {
|
|
58
69
|
getProduct: (product: Record<string, any>) => ProductDetail;
|
|
@@ -5,19 +5,35 @@ export * from './types';
|
|
|
5
5
|
export declare class SalesSummaryModule extends BaseModule implements Module, SalesSummaryModuleAPI {
|
|
6
6
|
protected defaultName: string;
|
|
7
7
|
protected defaultVersion: string;
|
|
8
|
-
private
|
|
8
|
+
private appPlugin;
|
|
9
9
|
private store;
|
|
10
10
|
private request;
|
|
11
|
+
private surchargeListModuleName;
|
|
12
|
+
private otherParams;
|
|
13
|
+
private surchargeListChannel;
|
|
11
14
|
constructor(name?: string, version?: string);
|
|
12
15
|
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
13
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 更新父级解决方案透传的运行态参数,并在 surcharge 模块名或渠道变化时刷新附加费列表。
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* await salesSummaryModule.updateOtherParams({ channel: 'pos', surchargeListModuleName: 'custom_surchargeList' });
|
|
21
|
+
*/
|
|
22
|
+
updateOtherParams(params: Record<string, any>): Promise<void>;
|
|
23
|
+
private resolveChannel;
|
|
24
|
+
getSurchargeList(channel?: string): Promise<void>;
|
|
25
|
+
private getAppData;
|
|
26
|
+
private getTaxConfig;
|
|
14
27
|
getSummary(params: {
|
|
15
28
|
products: any[];
|
|
16
29
|
isPriceIncludeTax?: number;
|
|
17
30
|
taxRate?: number;
|
|
31
|
+
shopDiscount?: string | number;
|
|
32
|
+
channel?: string;
|
|
18
33
|
}): Promise<{
|
|
19
|
-
tax_title:
|
|
20
|
-
tax_rate:
|
|
34
|
+
tax_title: string;
|
|
35
|
+
tax_rate: number | undefined;
|
|
36
|
+
tax_country_code: string;
|
|
21
37
|
product_quantity: number;
|
|
22
38
|
product_original_amount: string;
|
|
23
39
|
product_amount: string;
|
|
@@ -33,31 +49,12 @@ export declare class SalesSummaryModule extends BaseModule implements Module, Sa
|
|
|
33
49
|
deposit?: import("./types").DepositInfo | undefined;
|
|
34
50
|
expect_amount: string;
|
|
35
51
|
total_amount: string;
|
|
52
|
+
total_refund_amount: string;
|
|
53
|
+
customer_paid_amount: string;
|
|
54
|
+
order_paid_amount: string;
|
|
36
55
|
amount_gap: string;
|
|
37
56
|
rounding_amount: string;
|
|
38
57
|
pay_service_charge_amount: string;
|
|
39
58
|
is_price_include_tax?: number | undefined;
|
|
40
|
-
} | {
|
|
41
|
-
tax_title: any;
|
|
42
|
-
tax_rate: any;
|
|
43
|
-
product_quantity: number;
|
|
44
|
-
product_original_amount: string;
|
|
45
|
-
product_amount: string;
|
|
46
|
-
product_expect_amount: string;
|
|
47
|
-
product_tax_fee: string;
|
|
48
|
-
shipping_fee: string;
|
|
49
|
-
shipping_tax_fee: string;
|
|
50
|
-
tax_fee: string;
|
|
51
|
-
surcharge_fee: string;
|
|
52
|
-
surcharges: any;
|
|
53
|
-
discount_amount: string;
|
|
54
|
-
deposit_amount: string;
|
|
55
|
-
deposit: import("./types").DepositInfo | undefined;
|
|
56
|
-
expect_amount: string;
|
|
57
|
-
total_amount: string;
|
|
58
|
-
amount_gap: string;
|
|
59
|
-
rounding_amount: string;
|
|
60
|
-
pay_service_charge_amount: string;
|
|
61
|
-
is_price_include_tax: number;
|
|
62
59
|
}>;
|
|
63
60
|
}
|