@pisell/private-materials 6.5.12 → 6.5.14
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/actionButtons/index.js +15 -9
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/voucher/index.js +23 -19
- package/es/components/booking/forms/footer.js +4 -13
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/index.js +7 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +17 -12
- package/es/components/checkout/components/CashPaymentModule/index.js +9 -9
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +40 -22
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/list/List.d.ts +5 -0
- package/es/components/list/List.js +957 -0
- package/es/components/list/List.less +2 -0
- package/es/components/list/ResponsiveWrapper.d.ts +16 -0
- package/es/components/list/ResponsiveWrapper.js +130 -0
- package/es/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/es/components/list/TestResponsiveWrapper.js +816 -0
- package/es/components/list/TestResponsiveWrapper.less +968 -0
- package/es/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/es/components/list/components/EmptyState/EmptyState.js +75 -0
- package/es/components/list/components/EmptyState/EmptyState.less +121 -0
- package/es/components/list/components/EmptyState/index.d.ts +2 -0
- package/es/components/list/components/EmptyState/index.js +1 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/es/components/list/components/ListItemSkeleton/index.js +2 -0
- package/es/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/es/components/list/components/Pagination/Pagination.js +240 -0
- package/es/components/list/components/Pagination/Pagination.less +439 -0
- package/es/components/list/components/Pagination/index.d.ts +1 -0
- package/es/components/list/components/Pagination/index.js +1 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/es/components/list/components/ScrollLoader/index.js +1 -0
- package/es/components/list/components/Tab/Tab.d.ts +5 -0
- package/es/components/list/components/Tab/Tab.js +43 -0
- package/es/components/list/components/Tab/Tab.less +139 -0
- package/es/components/list/components/Tab/index.d.ts +2 -0
- package/es/components/list/components/Tab/index.js +1 -0
- package/es/components/list/components/Tab/types.d.ts +14 -0
- package/es/components/list/components/Tab/types.js +1 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/es/components/list/components/TabSkeleton/index.js +2 -0
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
- package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/es/components/list/components/WaterfallList/index.d.ts +2 -0
- package/es/components/list/components/WaterfallList/index.js +1 -0
- package/es/components/list/examples/GroupedListExample.d.ts +3 -0
- package/es/components/list/examples/GroupedListExample.js +207 -0
- package/es/components/list/hooks/index.d.ts +5 -0
- package/es/components/list/hooks/index.js +3 -0
- package/es/components/list/hooks/useDevice.d.ts +24 -0
- package/es/components/list/hooks/useDevice.js +102 -0
- package/es/components/list/hooks/useListState.d.ts +43 -0
- package/es/components/list/hooks/useListState.js +176 -0
- package/es/components/list/hooks/useWaterfall.d.ts +34 -0
- package/es/components/list/hooks/useWaterfall.js +161 -0
- package/es/components/list/index.d.ts +10 -0
- package/es/components/list/index.js +7 -0
- package/es/components/list/locales.d.ts +66 -0
- package/es/components/list/locales.js +107 -0
- package/es/components/list/styles/base.less +39 -0
- package/es/components/list/styles/content.less +415 -0
- package/es/components/list/styles/floatButton.less +107 -0
- package/es/components/list/styles/footer.less +49 -0
- package/es/components/list/styles/header.less +69 -0
- package/es/components/list/styles/responsive.less +166 -0
- package/es/components/list/types.d.ts +177 -0
- package/es/components/list/types.js +1 -0
- package/es/components/list/utils/getText.d.ts +53 -0
- package/es/components/list/utils/getText.js +150 -0
- package/es/components/list/utils/index.d.ts +4 -0
- package/es/components/list/utils/index.js +5 -0
- package/es/components/pay/toB/store/hooks.js +19 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +32 -10
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/es/components/ticketBooking/components/menuBar/index.js +40 -17
- package/es/components/ticketBooking/components/menuBar/index.less +27 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +20 -10
- package/es/components/ticketBooking/components/timeBar/index.less +1 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -0
- package/es/components/ticketBooking/context/index.js +2 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
- package/es/components/ticketBooking/index.d.ts +6 -0
- package/es/components/ticketBooking/index.js +86 -12
- package/es/components/ticketBooking/utils/index.d.ts +28 -1
- package/es/components/ticketBooking/utils/index.js +40 -0
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +20 -10
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/actionButtons/index.js +22 -17
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/voucher/index.js +33 -40
- package/lib/components/booking/forms/footer.js +7 -13
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/index.js +7 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +15 -12
- package/lib/components/checkout/components/CashPaymentModule/index.js +0 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +61 -46
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/list/List.d.ts +5 -0
- package/lib/components/list/List.js +771 -0
- package/lib/components/list/List.less +2 -0
- package/lib/components/list/ResponsiveWrapper.d.ts +16 -0
- package/lib/components/list/ResponsiveWrapper.js +145 -0
- package/lib/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/lib/components/list/TestResponsiveWrapper.js +493 -0
- package/lib/components/list/TestResponsiveWrapper.less +968 -0
- package/lib/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
- package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
- package/lib/components/list/components/EmptyState/index.d.ts +2 -0
- package/lib/components/list/components/EmptyState/index.js +35 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
- package/lib/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/lib/components/list/components/Pagination/Pagination.js +205 -0
- package/lib/components/list/components/Pagination/Pagination.less +439 -0
- package/lib/components/list/components/Pagination/index.d.ts +1 -0
- package/lib/components/list/components/Pagination/index.js +35 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/lib/components/list/components/ScrollLoader/index.js +35 -0
- package/lib/components/list/components/Tab/Tab.d.ts +5 -0
- package/lib/components/list/components/Tab/Tab.js +72 -0
- package/lib/components/list/components/Tab/Tab.less +139 -0
- package/lib/components/list/components/Tab/index.d.ts +2 -0
- package/lib/components/list/components/Tab/index.js +35 -0
- package/lib/components/list/components/Tab/types.d.ts +14 -0
- package/lib/components/list/components/Tab/types.js +17 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/TabSkeleton/index.js +41 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
- package/lib/components/list/components/WaterfallList/index.js +35 -0
- package/lib/components/list/examples/GroupedListExample.d.ts +3 -0
- package/lib/components/list/examples/GroupedListExample.js +210 -0
- package/lib/components/list/hooks/index.d.ts +5 -0
- package/lib/components/list/hooks/index.js +47 -0
- package/lib/components/list/hooks/useDevice.d.ts +24 -0
- package/lib/components/list/hooks/useDevice.js +96 -0
- package/lib/components/list/hooks/useListState.d.ts +43 -0
- package/lib/components/list/hooks/useListState.js +149 -0
- package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
- package/lib/components/list/hooks/useWaterfall.js +124 -0
- package/lib/components/list/index.d.ts +10 -0
- package/lib/components/list/index.js +60 -0
- package/lib/components/list/locales.d.ts +66 -0
- package/lib/components/list/locales.js +113 -0
- package/lib/components/list/styles/base.less +39 -0
- package/lib/components/list/styles/content.less +415 -0
- package/lib/components/list/styles/floatButton.less +107 -0
- package/lib/components/list/styles/footer.less +49 -0
- package/lib/components/list/styles/header.less +69 -0
- package/lib/components/list/styles/responsive.less +166 -0
- package/lib/components/list/types.d.ts +177 -0
- package/lib/components/list/types.js +17 -0
- package/lib/components/list/utils/getText.d.ts +53 -0
- package/lib/components/list/utils/getText.js +95 -0
- package/lib/components/list/utils/index.d.ts +4 -0
- package/lib/components/list/utils/index.js +43 -0
- package/lib/components/pay/toB/store/hooks.js +16 -8
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +36 -10
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
- package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +14 -9
- package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -0
- package/lib/components/ticketBooking/context/index.js +44 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
- package/lib/components/ticketBooking/index.d.ts +6 -0
- package/lib/components/ticketBooking/index.js +69 -7
- package/lib/components/ticketBooking/utils/index.d.ts +28 -1
- package/lib/components/ticketBooking/utils/index.js +45 -2
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +61 -27
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/sku-card/meta.ts +1812 -0
- package/lowcode/sku-card/snippets.ts +372 -0
- package/lowcode/sku-list/meta.ts +410 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -31,8 +31,9 @@ import { useCustomer } from "../../../ticketBooking/hooks/pisellos/useCustomer";
|
|
|
31
31
|
import { useMemoizedFn } from 'ahooks';
|
|
32
32
|
import useEngineContext, { usePisellOS } from "../../../../hooks/useEngineContext";
|
|
33
33
|
import useScanManager from "../../../ticketBooking/hooks/pisellos/useScanManager";
|
|
34
|
-
import { useShopDiscount } from "../../../appointmentBooking/hooks";
|
|
35
34
|
import { DiscountKeyboard } from "../../../../pro/priceKeyboard";
|
|
35
|
+
import { useActiveExecute, useBookingTicket } from "../../../ticketBooking/hooks/pisellos";
|
|
36
|
+
import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/useShopDiscountModule";
|
|
36
37
|
// Toast 内容包装器,统一设置行高
|
|
37
38
|
var createToastContent = function createToastContent(text) {
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -62,14 +63,17 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
62
63
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
63
64
|
showVoucherModal = _useState8[0],
|
|
64
65
|
setShowVoucherModal = _useState8[1];
|
|
65
|
-
var
|
|
66
|
+
var _useActiveExecute = useActiveExecute(),
|
|
67
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
66
68
|
var context = useEngineContext();
|
|
67
69
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
68
70
|
getData = _context$appHelper$ut.getData,
|
|
69
71
|
pisellosAllModule = _context$appHelper$ut.pisellosAllModule;
|
|
70
72
|
var Toast = useToast();
|
|
71
73
|
var pisellOS = usePisellOS();
|
|
74
|
+
var bookingTicket = useBookingTicket();
|
|
72
75
|
var ScheduleModule = pisellosAllModule.ScheduleModule;
|
|
76
|
+
var shopDiscount = useShopDiscountModule();
|
|
73
77
|
|
|
74
78
|
// 将选中的客户数据传递给状态管理
|
|
75
79
|
var changeCustomerToGlobalState = useMemoizedFn(function (value) {
|
|
@@ -90,7 +94,7 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
90
94
|
|
|
91
95
|
// 监听客户选择变化,清空手动折扣
|
|
92
96
|
useEffect(function () {
|
|
93
|
-
if (!
|
|
97
|
+
if (!bookingTicket) return;
|
|
94
98
|
var handleCustomerSelected = function handleCustomerSelected() {
|
|
95
99
|
// 当客户选择改变时,清空 shop_discount
|
|
96
100
|
dispatch({
|
|
@@ -100,15 +104,16 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
100
104
|
}
|
|
101
105
|
});
|
|
102
106
|
};
|
|
107
|
+
var wrappedHandleCustomerSelected = executeIfActive(handleCustomerSelected);
|
|
103
108
|
|
|
104
109
|
// 监听客户选择事件
|
|
105
|
-
|
|
110
|
+
bookingTicket.effectsOn('onCustomerSelected', wrappedHandleCustomerSelected);
|
|
106
111
|
|
|
107
112
|
// 清理函数
|
|
108
113
|
return function () {
|
|
109
|
-
|
|
114
|
+
bookingTicket.effectsOff('onCustomerSelected', wrappedHandleCustomerSelected);
|
|
110
115
|
};
|
|
111
|
-
}, [dispatch,
|
|
116
|
+
}, [dispatch, bookingTicket]);
|
|
112
117
|
|
|
113
118
|
// 同步获取金额计算所需配置
|
|
114
119
|
var getDataFromHost = function getDataFromHost() {
|
|
@@ -224,13 +229,14 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
224
229
|
var _context$appHelper2;
|
|
225
230
|
var _ref2 = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {},
|
|
226
231
|
pisellos = _ref2.pisellos;
|
|
227
|
-
if (!pisellos) return;
|
|
232
|
+
if (!pisellos || !shopDiscount) return;
|
|
228
233
|
var onDiscountListChange = function onDiscountListChange(discount) {
|
|
229
234
|
setDiscountList(discount);
|
|
230
235
|
};
|
|
231
|
-
|
|
236
|
+
var wrappedHandler = executeIfActive(onDiscountListChange);
|
|
237
|
+
shopDiscount.effectsOn('onDiscountListChange', wrappedHandler);
|
|
232
238
|
return function () {
|
|
233
|
-
|
|
239
|
+
shopDiscount.effectsOff('onDiscountListChange', wrappedHandler);
|
|
234
240
|
};
|
|
235
241
|
}, [(_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.utils]);
|
|
236
242
|
|
|
@@ -46,7 +46,7 @@ import { Iconfont } from '@pisell/materials';
|
|
|
46
46
|
import { useCustomer } from "../../../ticketBooking/hooks/pisellos/useCustomer";
|
|
47
47
|
import { useDebounceEffect, useDebounceFn, useMemoizedFn } from 'ahooks';
|
|
48
48
|
import { cloneDeep } from 'lodash';
|
|
49
|
-
import {
|
|
49
|
+
import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/useShopDiscountModule";
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* @title: 底部
|
|
@@ -1734,7 +1734,7 @@ var Footer = function Footer(props) {
|
|
|
1734
1734
|
changeCustomerToGlobalState: changeCustomerToGlobalState
|
|
1735
1735
|
}),
|
|
1736
1736
|
selectCustomer = _useCustomer.selectCustomer;
|
|
1737
|
-
var shopDiscount =
|
|
1737
|
+
var shopDiscount = useShopDiscountModule();
|
|
1738
1738
|
var _useScanManager2 = useScanManager(),
|
|
1739
1739
|
clearAllScanListenersTaskQueue = _useScanManager2.clearAllScanListenersTaskQueue;
|
|
1740
1740
|
// 清空所有内容并重置购物车
|
|
@@ -28,8 +28,9 @@ import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
|
28
28
|
import "./index.less";
|
|
29
29
|
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
|
30
30
|
import { getServiceAddons } from "./utils";
|
|
31
|
-
import { useCustomer } from "../../../ticketBooking/hooks/pisellos";
|
|
31
|
+
import { useActiveExecute, useCustomer } from "../../../ticketBooking/hooks/pisellos";
|
|
32
32
|
import { getClientVariantClose } from "../../info/clientVariant/utils";
|
|
33
|
+
import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/useShopDiscountModule";
|
|
33
34
|
var ShopDiscountHooks = {
|
|
34
35
|
onInited: 'shopDiscount:onInited',
|
|
35
36
|
onDestroy: 'shopDiscount:onDestroy',
|
|
@@ -66,7 +67,9 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
66
67
|
var serviceValueRef = useRef(state.service.value);
|
|
67
68
|
var addonsValueRef = useRef(state.addons.value);
|
|
68
69
|
var isBooking4Shop = useIsBooking4Shop(state);
|
|
69
|
-
var shopDiscount =
|
|
70
|
+
var shopDiscount = useShopDiscountModule();
|
|
71
|
+
var _useActiveExecute = useActiveExecute(),
|
|
72
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
70
73
|
services = state.service;
|
|
71
74
|
|
|
72
75
|
// 将选中的客户数据传递给状态管理
|
|
@@ -95,7 +98,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
95
98
|
|
|
96
99
|
// 设置productList
|
|
97
100
|
useEffect(function () {
|
|
98
|
-
if (isBooking4Shop) {
|
|
101
|
+
if (isBooking4Shop && shopDiscount) {
|
|
99
102
|
shopDiscount.setProductList([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
|
|
100
103
|
}
|
|
101
104
|
}, [state.service.value, state.addons.value, isBooking4Shop]);
|
|
@@ -122,9 +125,10 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
122
125
|
onScanCode(e.detail.code);
|
|
123
126
|
});
|
|
124
127
|
useEffect(function () {
|
|
125
|
-
|
|
128
|
+
var wrappedOnScanWallPassCode = executeIfActive(onScanWallPassCode);
|
|
129
|
+
window.addEventListener('onScanWallPassCode', wrappedOnScanWallPassCode);
|
|
126
130
|
return function () {
|
|
127
|
-
window.removeEventListener('onScanWallPassCode',
|
|
131
|
+
window.removeEventListener('onScanWallPassCode', wrappedOnScanWallPassCode);
|
|
128
132
|
};
|
|
129
133
|
}, []);
|
|
130
134
|
var addonsMemo = useMemo(function () {
|
|
@@ -174,12 +178,11 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
174
178
|
run();
|
|
175
179
|
}, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
|
|
176
180
|
useEffect(function () {
|
|
177
|
-
if (
|
|
178
|
-
var
|
|
179
|
-
|
|
181
|
+
if (shopDiscount) {
|
|
182
|
+
var wrappedHandler = executeIfActive(fn);
|
|
183
|
+
shopDiscount === null || shopDiscount === void 0 || shopDiscount.effectsOn("onSelectedDiscountListChange", wrappedHandler);
|
|
180
184
|
return function () {
|
|
181
|
-
|
|
182
|
-
pisellos === null || pisellos === void 0 || (_pisellos$effects2 = pisellos.effects) === null || _pisellos$effects2 === void 0 || _pisellos$effects2.off("shopDiscount:onSelectedDiscountListChange", fn);
|
|
185
|
+
shopDiscount === null || shopDiscount === void 0 || shopDiscount.effectsOff("onSelectedDiscountListChange", wrappedHandler);
|
|
183
186
|
};
|
|
184
187
|
}
|
|
185
188
|
}, []);
|
|
@@ -195,7 +198,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
195
198
|
|
|
196
199
|
// 监听customer变化
|
|
197
200
|
useEffect(function () {
|
|
198
|
-
if (!isBooking4Shop) return;
|
|
201
|
+
if (!isBooking4Shop || !shopDiscount) return;
|
|
199
202
|
var onScanCustomerChange = function onScanCustomerChange(customer) {
|
|
200
203
|
var clientVariantClose = getClientVariantClose();
|
|
201
204
|
if (clientVariantClose) {
|
|
@@ -206,14 +209,17 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
206
209
|
var onDiscountListChange = function onDiscountListChange(discount) {
|
|
207
210
|
setDisCountList(discount);
|
|
208
211
|
};
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
var wrappedOnScanCustomerChangeHandler = executeIfActive(onScanCustomerChange);
|
|
213
|
+
var wrappedOnDiscountListChangeHandler = executeIfActive(onDiscountListChange);
|
|
214
|
+
var wrappedFn = executeIfActive(fn);
|
|
215
|
+
shopDiscount.effectsOn('onScanCustomerChange', wrappedOnScanCustomerChangeHandler);
|
|
216
|
+
shopDiscount.effectsOn('onLoadPrepareCalcResult', wrappedFn);
|
|
217
|
+
shopDiscount.effectsOn('onDiscountListChange', wrappedOnDiscountListChangeHandler);
|
|
212
218
|
return function () {
|
|
213
219
|
shopDiscount.clear();
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
220
|
+
shopDiscount.effectsOff('onScanCustomerChange', wrappedOnScanCustomerChangeHandler);
|
|
221
|
+
shopDiscount.effectsOff('onLoadPrepareCalcResult', wrappedFn);
|
|
222
|
+
shopDiscount.effectsOff('onDiscountListChange', wrappedOnDiscountListChangeHandler);
|
|
217
223
|
};
|
|
218
224
|
}, [state.bookingId, isBooking4Shop, fn]);
|
|
219
225
|
var productListToValue = useMemoizedFn(function (list, edit) {
|
|
@@ -282,7 +288,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
282
288
|
}();
|
|
283
289
|
var availableData = useMemo(function () {
|
|
284
290
|
if (!isBooking4Shop) return [];
|
|
285
|
-
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
286
291
|
return discountList.filter(function (item) {
|
|
287
292
|
return !!item.isAvailable;
|
|
288
293
|
}).map(function (discount) {
|
|
@@ -325,7 +330,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
325
330
|
dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
|
|
326
331
|
mixedSort: mixedSort,
|
|
327
332
|
onChange: function onChange(val) {
|
|
328
|
-
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
329
333
|
var detail = shopDiscount.setDiscountSelected({
|
|
330
334
|
discountId: val.id,
|
|
331
335
|
isSelected: val.isSelected
|
|
@@ -9,7 +9,7 @@ import useSendModal from "./sendModal/useSendModal";
|
|
|
9
9
|
import SendModal from "./sendModal";
|
|
10
10
|
import { locales } from '@pisell/utils';
|
|
11
11
|
var Footer = function Footer(_ref) {
|
|
12
|
-
var _state$
|
|
12
|
+
var _state$client6, _state$form, _state$client7;
|
|
13
13
|
var state = _ref.state,
|
|
14
14
|
reload = _ref.reload;
|
|
15
15
|
var _useSendModal = useSendModal(state === null || state === void 0 ? void 0 : state.bookingId),
|
|
@@ -37,14 +37,6 @@ var Footer = function Footer(_ref) {
|
|
|
37
37
|
return _ref2.apply(this, arguments);
|
|
38
38
|
};
|
|
39
39
|
}();
|
|
40
|
-
|
|
41
|
-
// 是否都填写完成
|
|
42
|
-
var isAllCompleted = useMemo(function () {
|
|
43
|
-
var _state$form;
|
|
44
|
-
return Object.values((state === null || state === void 0 || (_state$form = state.form) === null || _state$form === void 0 ? void 0 : _state$form.value) || {}).every(function (item) {
|
|
45
|
-
return item.length > 0;
|
|
46
|
-
});
|
|
47
|
-
}, [state === null || state === void 0 || (_state$form2 = state.form) === null || _state$form2 === void 0 ? void 0 : _state$form2.value]);
|
|
48
40
|
var defaultValues = useMemo(function () {
|
|
49
41
|
var _state$client, _state$client2, _state$client3, _state$client4, _state$client5;
|
|
50
42
|
return {
|
|
@@ -57,7 +49,7 @@ var Footer = function Footer(_ref) {
|
|
|
57
49
|
}
|
|
58
50
|
};
|
|
59
51
|
}, [(_state$client6 = state.client) === null || _state$client6 === void 0 ? void 0 : _state$client6.value]);
|
|
60
|
-
if (!state.bookingId || !(state !== null && state !== void 0 && (_state$
|
|
52
|
+
if (!state.bookingId || !(state !== null && state !== void 0 && (_state$form = state.form) !== null && _state$form !== void 0 && _state$form.forms.length)) {
|
|
61
53
|
return null;
|
|
62
54
|
}
|
|
63
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -72,9 +64,8 @@ var Footer = function Footer(_ref) {
|
|
|
72
64
|
size: "large",
|
|
73
65
|
block: true,
|
|
74
66
|
type: "primary",
|
|
75
|
-
onClick: handleOpen
|
|
76
|
-
|
|
77
|
-
}, !isAllCompleted ? locales.getText('pisell2.text.send-form-reminder') : locales.getText('pisell2.text.send-form-reminder-completed')), /*#__PURE__*/React.createElement(SendModal, {
|
|
67
|
+
onClick: handleOpen
|
|
68
|
+
}, locales.getText('pisell2.text.send-form-reminder')), /*#__PURE__*/React.createElement(SendModal, {
|
|
78
69
|
refreshKey: (_state$client7 = state.client) === null || _state$client7 === void 0 || (_state$client7 = _state$client7.value) === null || _state$client7 === void 0 ? void 0 : _state$client7.id,
|
|
79
70
|
open: open,
|
|
80
71
|
onCancel: function onCancel() {
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -29,6 +29,7 @@ import useTranslationOriginal from "../../../../hooks/useTranslationOriginal";
|
|
|
29
29
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
30
30
|
import { Context } from "../../info/model";
|
|
31
31
|
import "./index.less";
|
|
32
|
+
import { useIsActive } from "../../../ticketBooking/context/IsActiveContext";
|
|
32
33
|
|
|
33
34
|
// 导出类型
|
|
34
35
|
|
|
@@ -60,6 +61,7 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
60
61
|
keyword = _useState8[0],
|
|
61
62
|
setKeyword = _useState8[1];
|
|
62
63
|
var keywordRef = useRef('');
|
|
64
|
+
var isActive = useIsActive();
|
|
63
65
|
keywordRef.current = keyword;
|
|
64
66
|
var Toast = useToast();
|
|
65
67
|
var _useScanCustomer = useScanCustomer(),
|
|
@@ -315,13 +317,15 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
315
317
|
setPendingCustomer(null);
|
|
316
318
|
};
|
|
317
319
|
useMemo(function () {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
+
if (isActive) {
|
|
321
|
+
setHandleSetClient(handleSetClient);
|
|
322
|
+
}
|
|
323
|
+
}, [isActive]);
|
|
320
324
|
useEffect(function () {
|
|
321
325
|
return function () {
|
|
322
326
|
setHandleSetClient(null);
|
|
323
327
|
};
|
|
324
|
-
}, []);
|
|
328
|
+
}, [isActive]);
|
|
325
329
|
var tags = useMemo(function () {
|
|
326
330
|
var _latest_wallet_detail;
|
|
327
331
|
if (!selectedCustomer) return;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -105,4 +106,11 @@ export declare const walkInData: {
|
|
|
105
106
|
id: number;
|
|
106
107
|
nickname: string;
|
|
107
108
|
};
|
|
108
|
-
export declare const Provider: any, Context:
|
|
109
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
110
|
+
state: FormState;
|
|
111
|
+
} & {
|
|
112
|
+
dispatch: (params: {
|
|
113
|
+
type: string;
|
|
114
|
+
payload: any;
|
|
115
|
+
}) => void;
|
|
116
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number | {
|
|
168
|
+
}) => number | "flexible" | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
}
|
|
171
|
+
};
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|
|
@@ -48,6 +48,7 @@ import usePaymentLogger from "./hooks/usePaymentLogger";
|
|
|
48
48
|
import { Button } from 'antd';
|
|
49
49
|
import usePrinter from "../../hooks/printer";
|
|
50
50
|
import { DiscountKeyboard } from "../../pro/priceKeyboard";
|
|
51
|
+
import { useActiveExecute } from "../ticketBooking/hooks/pisellos";
|
|
51
52
|
|
|
52
53
|
// Checkout 模块的事件常量
|
|
53
54
|
var CheckoutHooks = {
|
|
@@ -99,6 +100,8 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
99
100
|
pisellosAllModule = utils.pisellosAllModule,
|
|
100
101
|
interaction = utils.interaction;
|
|
101
102
|
var Toast = useToast();
|
|
103
|
+
var _useActiveExecute = useActiveExecute(),
|
|
104
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
102
105
|
// const paymentResultToast = usePaymentResultToast();
|
|
103
106
|
|
|
104
107
|
var checkoutRef = useRef(null);
|
|
@@ -493,7 +496,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
493
496
|
try {
|
|
494
497
|
var core = checkoutModule.core;
|
|
495
498
|
if (core.effects && typeof core.effects.on === 'function') {
|
|
496
|
-
var unsubscribe = core.effects.on(CheckoutHooks.OnStateAmountChanged, /*#__PURE__*/function () {
|
|
499
|
+
var unsubscribe = core.effects.on(CheckoutHooks.OnStateAmountChanged, executeIfActive( /*#__PURE__*/function () {
|
|
497
500
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
|
|
498
501
|
var _Toast$success, _Toast$success2, items;
|
|
499
502
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -523,17 +526,17 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
523
526
|
return function (_x4) {
|
|
524
527
|
return _ref7.apply(this, arguments);
|
|
525
528
|
};
|
|
526
|
-
}());
|
|
527
|
-
var amountChangedUnsubscribe = core.effects.on(CheckoutHooks.OnBalanceDueAmountChanged, function (data) {
|
|
529
|
+
}()));
|
|
530
|
+
var amountChangedUnsubscribe = core.effects.on(CheckoutHooks.OnBalanceDueAmountChanged, executeIfActive(function (data) {
|
|
528
531
|
setBalanceDueAmount(data.newAmount);
|
|
529
532
|
setBalanceDueTotalAmount(data.totalAmount || '0');
|
|
530
|
-
});
|
|
531
|
-
var orderSubmitStartUnsubscribe = core.effects.on(CheckoutHooks.OnOrderSubmitStart, function () {
|
|
533
|
+
}));
|
|
534
|
+
var orderSubmitStartUnsubscribe = core.effects.on(CheckoutHooks.OnOrderSubmitStart, executeIfActive(function () {
|
|
532
535
|
var _Toast$loading;
|
|
533
536
|
setSyncingLock(true);
|
|
534
537
|
Toast === null || Toast === void 0 || (_Toast$loading = Toast.loading) === null || _Toast$loading === void 0 || _Toast$loading.call(Toast);
|
|
535
|
-
});
|
|
536
|
-
var orderSubmitEndUnsubscribe = core.effects.on(CheckoutHooks.OnOrderSubmitEnd, function (res) {
|
|
538
|
+
}));
|
|
539
|
+
var orderSubmitEndUnsubscribe = core.effects.on(CheckoutHooks.OnOrderSubmitEnd, executeIfActive(function (res) {
|
|
537
540
|
setSyncingLock(false);
|
|
538
541
|
if (res.success) {
|
|
539
542
|
var _Toast$hide;
|
|
@@ -549,7 +552,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
549
552
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.order-sync-failed') || 'Order sync failed');
|
|
550
553
|
}
|
|
551
554
|
}
|
|
552
|
-
});
|
|
555
|
+
}));
|
|
553
556
|
|
|
554
557
|
// const orderSyncFailedUnsubscribe = core.effects.on(
|
|
555
558
|
// CheckoutHooks.OnOrderSyncFailed,
|
|
@@ -558,7 +561,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
558
561
|
// Toast?.fail(locales.getText('pisell2.checkout.order-sync-failed') || 'Order sync failed');
|
|
559
562
|
// }
|
|
560
563
|
// );
|
|
561
|
-
var orderPaymentAddedUnsubscribe = core.effects.on(CheckoutHooks.OnOrderPaymentAdded, /*#__PURE__*/function () {
|
|
564
|
+
var orderPaymentAddedUnsubscribe = core.effects.on(CheckoutHooks.OnOrderPaymentAdded, executeIfActive( /*#__PURE__*/function () {
|
|
562
565
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) {
|
|
563
566
|
var orderInfo, balanceDueAmount, autoCloseConfig, _paymentItems, _totalAmount, serviceChargeTotal, paymentMethodName, isCashPayment, _interaction$utils3, _interaction$utils3$p;
|
|
564
567
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -648,7 +651,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
648
651
|
return function (_x5) {
|
|
649
652
|
return _ref8.apply(this, arguments);
|
|
650
653
|
};
|
|
651
|
-
}());
|
|
654
|
+
}()));
|
|
652
655
|
return function () {
|
|
653
656
|
if (unsubscribe && typeof unsubscribe === 'function') {
|
|
654
657
|
unsubscribe();
|
|
@@ -1408,6 +1411,8 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1408
1411
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
1409
1412
|
currentEditOrderId = _useState36[0],
|
|
1410
1413
|
_setCurrentEditOrderId = _useState36[1];
|
|
1414
|
+
var _useActiveExecute2 = useActiveExecute(),
|
|
1415
|
+
executeIfActive = _useActiveExecute2.executeIfActive;
|
|
1411
1416
|
var Toast = useToast();
|
|
1412
1417
|
var _usePrinter2 = usePrinter(),
|
|
1413
1418
|
nativePrint = _usePrinter2.nativePrint;
|
|
@@ -2084,7 +2089,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2084
2089
|
unsubscribeRef.current = undefined;
|
|
2085
2090
|
}
|
|
2086
2091
|
// 监听订单同步完成,同步完成后显示订单完成 toast,关闭当前弹窗
|
|
2087
|
-
unsubscribeRef.current = checkout.core.effects.on('checkout:onOrderSynced', /*#__PURE__*/function () {
|
|
2092
|
+
unsubscribeRef.current = checkout.core.effects.on('checkout:onOrderSynced', executeIfActive( /*#__PURE__*/function () {
|
|
2088
2093
|
var _ref29 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(data) {
|
|
2089
2094
|
var _data$response, _responseData$payment2;
|
|
2090
2095
|
var currentOrderId, responseData, paymentStatus, orderTotalAmount, gapAmount, currentChangeGivenAmount, failureReason, _responseData$payment3, params, statusClassName, autoCloseConfig, enabledAutoPrint, _interaction$utils6, _interaction$utils6$a, _orderInfo3, paymentResult;
|
|
@@ -2230,7 +2235,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2230
2235
|
return function (_x17) {
|
|
2231
2236
|
return _ref29.apply(this, arguments);
|
|
2232
2237
|
};
|
|
2233
|
-
}());
|
|
2238
|
+
}()));
|
|
2234
2239
|
_context23.next = 42;
|
|
2235
2240
|
break;
|
|
2236
2241
|
case 25:
|
|
@@ -127,35 +127,35 @@ export function CashPaymentModule(_ref) {
|
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
129
|
setAmount('');
|
|
130
|
-
_context.next =
|
|
130
|
+
_context.next = 32;
|
|
131
131
|
break;
|
|
132
132
|
case 13:
|
|
133
133
|
// 移除可能的货币符号和多余空格
|
|
134
134
|
cleanValue = finalValue.replace(/[$\s]/g, '');
|
|
135
135
|
numValue = parseFloat(cleanValue); // 检查当前金额是否等于剩余支付金额
|
|
136
|
-
debugger
|
|
136
|
+
// debugger
|
|
137
137
|
// 需要确认当前是否是定金模式,如果是定金模式则 balanceDue 应该为完整订单剩余待付金额
|
|
138
138
|
balanceDue = parseFloat(orderInfo !== null && orderInfo !== void 0 && orderInfo.isDeposit ? balanceDueTotalAmount || '0' : balanceDueAmount);
|
|
139
139
|
shouldApplyRounding = Math.abs(numValue - balanceDue) < 0.01; // 使用小数精度比较
|
|
140
140
|
finalAmount = numValue;
|
|
141
141
|
roundingDiff = 0;
|
|
142
142
|
if (!(shouldApplyRounding && roundingFunction)) {
|
|
143
|
-
_context.next =
|
|
143
|
+
_context.next = 29;
|
|
144
144
|
break;
|
|
145
145
|
}
|
|
146
|
-
_context.next =
|
|
146
|
+
_context.next = 22;
|
|
147
147
|
return roundingFunction(numValue);
|
|
148
|
-
case
|
|
148
|
+
case 22:
|
|
149
149
|
_result = _context.sent;
|
|
150
150
|
_ref3 = _result || {}, _ref3$roundedAmount = _ref3.roundedAmount, roundedAmount = _ref3$roundedAmount === void 0 ? numValue : _ref3$roundedAmount, _ref3$roundingDiffere = _ref3.roundingDifference, roundingDifference = _ref3$roundingDiffere === void 0 ? 0 : _ref3$roundingDiffere;
|
|
151
151
|
finalAmount = roundedAmount;
|
|
152
152
|
roundingDiff = roundingDifference;
|
|
153
153
|
console.log('应用抹零:', numValue, '->', roundedAmount, '差额:', roundingDifference);
|
|
154
|
-
_context.next =
|
|
154
|
+
_context.next = 30;
|
|
155
155
|
break;
|
|
156
|
-
case
|
|
156
|
+
case 29:
|
|
157
157
|
console.log('不应用抹零,用户输入金额:', numValue, '剩余支付金额:', balanceDue);
|
|
158
|
-
case
|
|
158
|
+
case 30:
|
|
159
159
|
setRoundingAmount(roundingDiff);
|
|
160
160
|
if (isNaN(numValue)) {
|
|
161
161
|
setAmount('');
|
|
@@ -163,7 +163,7 @@ export function CashPaymentModule(_ref) {
|
|
|
163
163
|
setAmount(finalAmount.toString());
|
|
164
164
|
console.log('设置金额为:', finalAmount);
|
|
165
165
|
}
|
|
166
|
-
case
|
|
166
|
+
case 32:
|
|
167
167
|
case "end":
|
|
168
168
|
return _context.stop();
|
|
169
169
|
}
|
|
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
|
|
|
17
17
|
cardData: any;
|
|
18
18
|
handleSelectWallet: (value: number[]) => void;
|
|
19
19
|
selectedWalletIds: any[];
|
|
20
|
-
expiredWalletIds: any;
|
|
20
|
+
expiredWalletIds: any[];
|
|
21
21
|
expiredWalletData: any;
|
|
22
22
|
disabledWalletData: any[];
|
|
23
23
|
clearAllSelectedWallet: () => void;
|