@pisell/private-materials 6.2.24 → 6.2.26
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 +9 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Cart/index.js +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/addons/index.js +4 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/actionButtons/index.js +395 -0
- package/es/components/booking/components/actionButtons/index.less +148 -0
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/clearCartModal/index.js +50 -0
- package/es/components/booking/components/clearCartModal/index.less +109 -0
- package/es/components/booking/components/customSelect/index.js +1 -0
- package/es/components/booking/components/customiseItemModal/index.js +294 -0
- package/es/components/booking/components/customiseItemModal/index.less +606 -0
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +15 -3
- package/es/components/booking/components/footer/index.js +106 -39
- package/es/components/booking/components/footer/utils.js +52 -24
- package/es/components/booking/components/tabPane/index.js +86 -5
- package/es/components/booking/components/tabPane/index.less +75 -1
- package/es/components/booking/components/voucher/index.js +19 -8
- package/es/components/booking/components/voucher/index.less +1 -1
- package/es/components/booking/dashboard/index.js +10 -3
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/hooks/useClearCart.js +11 -8
- package/es/components/booking/hooks/useQuotation.js +17 -7
- package/es/components/booking/info/client/index.js +3 -2
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +15 -7
- package/es/components/booking/info/index.less +18 -2
- package/es/components/booking/info/main.js +14 -15
- package/es/components/booking/info/service/Lists.js +41 -28
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.js +3 -0
- package/es/components/booking/info/service/editService/index.js +15 -10
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.js +2 -2
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +4 -0
- package/es/components/booking/info/service2/utils.js +32 -23
- package/es/components/booking/info2/cartClientCard/index.js +343 -0
- package/es/components/booking/info2/cartClientCard/index.less +6 -0
- package/es/components/booking/info2/cartClientCard/locales.js +26 -0
- package/es/components/booking/info2/cartClientCard/types.js +1 -0
- package/es/components/booking/info2/cartClientCard/utils.js +7 -0
- package/es/components/booking/info2/index.js +41 -18
- package/es/components/booking/info2/service/addService/utils.js +6 -3
- package/es/components/booking/info2/service/addTimeModal/index.js +5 -1
- package/es/components/booking/info2/service/editNormalService/index.js +67 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
- package/es/components/booking/info2/service/editService/index.js +267 -171
- package/es/components/booking/info2/service/index.js +27 -18
- package/es/components/booking/info2/service/serviceItem/index.js +2 -2
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +26 -3
- package/es/components/booking/locales.js +99 -3
- package/es/components/booking/materiels/duration/index.js +9 -2
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.js +52 -32
- package/es/components/booking/notes/addNote/index.less +53 -0
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +62 -41
- package/es/components/shoppingCart/components/Cart/index.js +21 -18
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/subTotal/index.less +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +309 -351
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
- package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +208 -33
- package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +79 -68
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
- package/es/components/ticketBooking/index.js +21 -3
- package/es/components/ticketBooking/locales.js +6 -3
- package/es/components/ticketBooking/serve.js +11 -11
- package/es/components/ticketBooking/utils/index.d.ts +39 -2
- package/es/components/ticketBooking/utils/index.js +104 -11
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useToast.js +9 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/index.js +452 -0
- package/es/plus/clientCard/index.less +539 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.js +212 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.js +214 -0
- package/es/plus/clinetSearch/index.less +91 -0
- package/es/plus/clinetSearch/locales.js +101 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/noteModal/AddTempModal.js +64 -0
- package/es/plus/noteModal/index.js +199 -0
- package/es/plus/noteModal/index.less +168 -0
- package/es/plus/noteModal/locales.js +32 -0
- package/es/plus/noteModal/types.js +1 -0
- package/es/pro/comprehensiveSearch/camera.svg +4 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.js +342 -0
- package/es/pro/comprehensiveSearch/index.less +323 -0
- package/es/pro/comprehensiveSearch/locales.js +17 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.js +231 -0
- package/es/pro/pisellNumberSelector/index.less +193 -0
- package/es/pro/pisellPhoneKeyboard/index.js +211 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
- package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
- package/es/pro/pisellPriceRadio/index.js +113 -0
- package/es/pro/pisellPriceRadio/index.less +158 -0
- package/es/pro/skuDetailModal/index.js +352 -0
- package/es/pro/skuDetailModal/index.less +236 -0
- package/es/pro/skuDetailModal/locales.js +47 -0
- package/es/pro/skuDetailModal/types.js +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Cart/index.js +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/addons/index.js +4 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/actionButtons/index.js +325 -0
- package/lib/components/booking/components/actionButtons/index.less +148 -0
- package/lib/components/booking/components/clearCartModal/index.js +80 -0
- package/lib/components/booking/components/clearCartModal/index.less +109 -0
- package/lib/components/booking/components/customSelect/index.js +1 -0
- package/lib/components/booking/components/customiseItemModal/index.js +279 -0
- package/lib/components/booking/components/customiseItemModal/index.less +606 -0
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +5 -3
- package/lib/components/booking/components/footer/index.js +93 -23
- package/lib/components/booking/components/footer/utils.js +38 -13
- package/lib/components/booking/components/tabPane/index.js +78 -4
- package/lib/components/booking/components/tabPane/index.less +75 -1
- package/lib/components/booking/components/voucher/index.js +18 -7
- package/lib/components/booking/components/voucher/index.less +1 -1
- package/lib/components/booking/dashboard/index.js +7 -2
- package/lib/components/booking/hooks/useClearCart.js +16 -13
- package/lib/components/booking/hooks/useQuotation.js +3 -1
- package/lib/components/booking/info/client/index.js +5 -4
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +16 -9
- package/lib/components/booking/info/index.less +18 -2
- package/lib/components/booking/info/main.js +12 -5
- package/lib/components/booking/info/service/Lists.js +41 -25
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.js +31 -0
- package/lib/components/booking/info/service/editService/index.js +7 -1
- package/lib/components/booking/info/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +4 -0
- package/lib/components/booking/info/service2/utils.js +31 -19
- package/lib/components/booking/info2/cartClientCard/index.js +298 -0
- package/lib/components/booking/info2/cartClientCard/index.less +6 -0
- package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
- package/lib/components/booking/info2/cartClientCard/types.js +17 -0
- package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
- package/lib/components/booking/info2/index.js +30 -9
- package/lib/components/booking/info2/service/addService/utils.js +4 -2
- package/lib/components/booking/info2/service/addTimeModal/index.js +4 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
- package/lib/components/booking/info2/service/editService/index.js +139 -74
- package/lib/components/booking/info2/service/index.js +16 -12
- package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +23 -4
- package/lib/components/booking/locales.js +93 -3
- package/lib/components/booking/materiels/duration/index.js +7 -2
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.js +41 -23
- package/lib/components/booking/notes/addNote/index.less +53 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +42 -21
- package/lib/components/shoppingCart/components/Cart/index.js +18 -15
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/subTotal/index.less +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +176 -248
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
- package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +228 -80
- package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +100 -86
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
- package/lib/components/ticketBooking/index.js +31 -4
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/serve.js +11 -11
- package/lib/components/ticketBooking/utils/index.d.ts +39 -2
- package/lib/components/ticketBooking/utils/index.js +71 -10
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/hooks/useToast.js +42 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/index.js +442 -0
- package/lib/plus/clientCard/index.less +539 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.js +243 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.js +205 -0
- package/lib/plus/clinetSearch/index.less +91 -0
- package/lib/plus/clinetSearch/locales.js +125 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/noteModal/AddTempModal.js +95 -0
- package/lib/plus/noteModal/index.js +199 -0
- package/lib/plus/noteModal/index.less +168 -0
- package/lib/plus/noteModal/locales.js +56 -0
- package/lib/plus/noteModal/types.js +17 -0
- package/lib/pro/comprehensiveSearch/camera.svg +4 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.js +259 -0
- package/lib/pro/comprehensiveSearch/index.less +323 -0
- package/lib/pro/comprehensiveSearch/locales.js +41 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.js +260 -0
- package/lib/pro/pisellNumberSelector/index.less +193 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
- package/lib/pro/pisellPriceRadio/index.js +130 -0
- package/lib/pro/pisellPriceRadio/index.less +158 -0
- package/lib/pro/skuDetailModal/index.js +311 -0
- package/lib/pro/skuDetailModal/index.less +236 -0
- package/lib/pro/skuDetailModal/locales.js +71 -0
- package/lib/pro/skuDetailModal/types.js +17 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +337 -0
- package/lowcode/comprehensive-search/meta.ts +261 -0
- package/package.json +26 -26
- package/es/components/Sales/Cart/index.d.ts +0 -53
- package/es/components/booking/addons/index.d.ts +0 -17
- package/es/components/booking/components/tabPane/index.d.ts +0 -4
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -3
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -3
- package/es/components/booking/locales.d.ts +0 -828
- package/es/components/booking/notes/addNote/index.d.ts +0 -3
- package/es/components/shoppingCart/type.d.ts +0 -48
- package/es/components/ticketBooking/locales.d.ts +0 -174
- package/es/components/ticketBooking/serve.d.ts +0 -287
- package/es/index.d.ts +0 -47
- package/lib/components/Sales/Cart/index.d.ts +0 -53
- package/lib/components/booking/addons/index.d.ts +0 -17
- package/lib/components/booking/components/tabPane/index.d.ts +0 -4
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -3
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -3
- package/lib/components/booking/locales.d.ts +0 -828
- package/lib/components/booking/notes/addNote/index.d.ts +0 -3
- package/lib/components/shoppingCart/type.d.ts +0 -48
- package/lib/components/ticketBooking/locales.d.ts +0 -174
- package/lib/components/ticketBooking/serve.d.ts +0 -287
- package/lib/index.d.ts +0 -47
@@ -508,6 +508,7 @@ export var CartProvider = function CartProvider(_ref) {
|
|
508
508
|
var productId = (_item$_originData = item._originData) === null || _item$_originData === void 0 || (_item$_originData = _item$_originData.product) === null || _item$_originData === void 0 ? void 0 : _item$_originData.product_id;
|
509
509
|
var relationId = (_item$_originData2 = item._originData) === null || _item$_originData2 === void 0 ? void 0 : _item$_originData2.relation_id;
|
510
510
|
var eventUniqueIdentifier = (_item$_originData3 = item._originData) === null || _item$_originData3 === void 0 ? void 0 : _item$_originData3.event_unique_identifier;
|
511
|
+
debugger;
|
511
512
|
// 根据检测项过滤检测结果
|
512
513
|
return list.find(function (res) {
|
513
514
|
var _res$details;
|
@@ -552,7 +552,10 @@ var Addons = Provider(function (props) {
|
|
552
552
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TabPane, {
|
553
553
|
loading: loading,
|
554
554
|
header: locales.getText('pisell2.text.addons'),
|
555
|
-
footer: footer
|
555
|
+
footer: footer,
|
556
|
+
state: state,
|
557
|
+
dispatch: dispatch,
|
558
|
+
source: "addons"
|
556
559
|
}, !state.bookingId ? /*#__PURE__*/React.createElement(EmptyBooking, null) : /*#__PURE__*/React.createElement(React.Fragment, null, state.addons.value.length ? /*#__PURE__*/React.createElement("div", {
|
557
560
|
className: "",
|
558
561
|
style: {
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
|
-
function _iterableToArrayLimit(
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
7
|
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
|
8
8
|
import classNames from "classnames";
|
@@ -13,6 +13,10 @@ import "./index.less";
|
|
13
13
|
|
14
14
|
// tabs 子组件定义
|
15
15
|
|
16
|
+
// 定义主键类型
|
17
|
+
|
18
|
+
// Tabs 可传递的参数
|
19
|
+
|
16
20
|
var Tabs = function Tabs(_ref, ref) {
|
17
21
|
var renderTab = _ref.renderTab,
|
18
22
|
rowKey = _ref.rowKey,
|
@@ -0,0 +1,395 @@
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
+
import React, { useMemo, useState, useEffect } from 'react';
|
12
|
+
import { createPortal } from 'react-dom';
|
13
|
+
import { Button } from 'antd';
|
14
|
+
import { Trash01, Calculator, PlusCircle } from '@pisell/icon';
|
15
|
+
import { locales } from '@pisell/utils';
|
16
|
+
import { PisellAdjustPrice } from '@pisell/materials';
|
17
|
+
import dayjs from 'dayjs';
|
18
|
+
import ClearCartModal from "../clearCartModal";
|
19
|
+
import CustomiseItemModal from "../customiseItemModal";
|
20
|
+
import { getSumTotal } from "../footer/amount";
|
21
|
+
import { formatAmount } from '@pisell/utils';
|
22
|
+
import "./index.less";
|
23
|
+
import { useCustomer } from "../../../ticketBooking/hooks/pisellos/useCustomer";
|
24
|
+
import { useMemoizedFn } from 'ahooks';
|
25
|
+
import useEngineContext, { usePisellOS } from "../../../../hooks/useEngineContext";
|
26
|
+
// Toast 内容包装器,统一设置行高
|
27
|
+
var createToastContent = function createToastContent(text) {
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
29
|
+
className: "action-buttons-toast-content"
|
30
|
+
}, text);
|
31
|
+
};
|
32
|
+
var ActionButtons = function ActionButtons(_ref) {
|
33
|
+
var _context$appHelper, _state$service2, _state$addons2, _context$appHelper2, _context$appHelper2$g;
|
34
|
+
var state = _ref.state,
|
35
|
+
dispatch = _ref.dispatch,
|
36
|
+
_ref$disabled = _ref.disabled,
|
37
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
38
|
+
var _useState = useState(false),
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
40
|
+
showClearModal = _useState2[0],
|
41
|
+
setShowClearModal = _useState2[1];
|
42
|
+
var _useState3 = useState(false),
|
43
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
44
|
+
showPriceAdjustModal = _useState4[0],
|
45
|
+
setShowPriceAdjustModal = _useState4[1];
|
46
|
+
var _useState5 = useState(false),
|
47
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
48
|
+
showCustomiseModal = _useState6[0],
|
49
|
+
setShowCustomiseModal = _useState6[1];
|
50
|
+
var context = useEngineContext();
|
51
|
+
var Toast = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.Toast;
|
52
|
+
var pisellOS = usePisellOS();
|
53
|
+
|
54
|
+
// 将选中的客户数据传递给状态管理
|
55
|
+
var changeCustomerToGlobalState = useMemoizedFn(function (value) {
|
56
|
+
dispatch({
|
57
|
+
type: 'setClient',
|
58
|
+
payload: {
|
59
|
+
value: value,
|
60
|
+
edit: true
|
61
|
+
}
|
62
|
+
});
|
63
|
+
});
|
64
|
+
var _useCustomer = useCustomer({
|
65
|
+
changeCustomerToGlobalState: changeCustomerToGlobalState
|
66
|
+
}),
|
67
|
+
selectCustomer = _useCustomer.selectCustomer;
|
68
|
+
|
69
|
+
// 监听客户选择变化,清空手动折扣
|
70
|
+
useEffect(function () {
|
71
|
+
if (!pisellOS) return;
|
72
|
+
var handleCustomerSelected = function handleCustomerSelected() {
|
73
|
+
// 当客户选择改变时,清空 shop_discount
|
74
|
+
dispatch({
|
75
|
+
type: 'setState',
|
76
|
+
payload: {
|
77
|
+
shop_discount: '0'
|
78
|
+
}
|
79
|
+
});
|
80
|
+
};
|
81
|
+
|
82
|
+
// 监听客户选择事件
|
83
|
+
pisellOS.effects.on('bookingTicket:onCustomerSelected', handleCustomerSelected);
|
84
|
+
|
85
|
+
// 清理函数
|
86
|
+
return function () {
|
87
|
+
pisellOS.effects.off('bookingTicket:onCustomerSelected', handleCustomerSelected);
|
88
|
+
};
|
89
|
+
}, [dispatch, pisellOS]);
|
90
|
+
|
91
|
+
// 检查是否有购物车内容
|
92
|
+
var hasCartItems = useMemo(function () {
|
93
|
+
var _state$service, _state$addons;
|
94
|
+
return ((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 || (_state$service = _state$service.value) === null || _state$service === void 0 ? void 0 : _state$service.length) || 0) + ((state === null || state === void 0 || (_state$addons = state.addons) === null || _state$addons === void 0 || (_state$addons = _state$addons.value) === null || _state$addons === void 0 ? void 0 : _state$addons.length) || 0) > 0;
|
95
|
+
}, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value, state === null || state === void 0 || (_state$addons2 = state.addons) === null || _state$addons2 === void 0 ? void 0 : _state$addons2.value]);
|
96
|
+
|
97
|
+
// 检查是否禁用编辑
|
98
|
+
var isDisabledEdit = useMemo(function () {
|
99
|
+
return disabled || (state === null || state === void 0 ? void 0 : state.disabledEdit) || (state === null || state === void 0 ? void 0 : state.channelDisabledEdit);
|
100
|
+
}, [disabled, state === null || state === void 0 ? void 0 : state.disabledEdit, state === null || state === void 0 ? void 0 : state.channelDisabledEdit]);
|
101
|
+
|
102
|
+
// 计算当前订单总价
|
103
|
+
var currentTotalPrice = useMemo(function () {
|
104
|
+
if (!hasCartItems) return 0;
|
105
|
+
try {
|
106
|
+
var _getSumTotal = getSumTotal(state, true),
|
107
|
+
expectAmount = _getSumTotal.expectAmount;
|
108
|
+
return expectAmount;
|
109
|
+
} catch (error) {
|
110
|
+
console.error('计算总价失败:', error);
|
111
|
+
return 0;
|
112
|
+
}
|
113
|
+
}, [state, hasCartItems]);
|
114
|
+
|
115
|
+
// 计算出订单原价
|
116
|
+
var currentOriginTotalPrice = useMemo(function () {
|
117
|
+
if (!hasCartItems) return 0;
|
118
|
+
var _getSumTotal2 = getSumTotal(state, true),
|
119
|
+
originExpectAmount = _getSumTotal2.originExpectAmount;
|
120
|
+
return originExpectAmount;
|
121
|
+
}, [state, hasCartItems]);
|
122
|
+
|
123
|
+
// 清空购物车按钮点击
|
124
|
+
var handleClear = function handleClear() {
|
125
|
+
setShowClearModal(true);
|
126
|
+
};
|
127
|
+
|
128
|
+
// 仅清空商品
|
129
|
+
var handleClearItemsOnly = function handleClearItemsOnly() {
|
130
|
+
if (!hasCartItems) {
|
131
|
+
// 购物车为空时显示Toast提示
|
132
|
+
Toast === null || Toast === void 0 || Toast.info(createToastContent(locales.getText('pisell2.clear-cart-modal.empty-cart-tip')));
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
// 清空服务项目
|
136
|
+
dispatch({
|
137
|
+
type: 'setService',
|
138
|
+
payload: {
|
139
|
+
value: []
|
140
|
+
}
|
141
|
+
});
|
142
|
+
|
143
|
+
// 清空附加服务
|
144
|
+
dispatch({
|
145
|
+
type: 'setAddons',
|
146
|
+
payload: {
|
147
|
+
value: []
|
148
|
+
}
|
149
|
+
});
|
150
|
+
|
151
|
+
// 清空 shop_discount 手动折扣
|
152
|
+
dispatch({
|
153
|
+
type: 'setState',
|
154
|
+
payload: {
|
155
|
+
shop_discount: '0'
|
156
|
+
}
|
157
|
+
});
|
158
|
+
setShowClearModal(false);
|
159
|
+
Toast === null || Toast === void 0 || Toast.success(createToastContent(locales.getText('pisell2.action-buttons.clear-success')));
|
160
|
+
};
|
161
|
+
|
162
|
+
// 清空所有内容并重置购物车
|
163
|
+
var handleClearAllAndReset = function handleClearAllAndReset() {
|
164
|
+
// 清空服务项目
|
165
|
+
dispatch({
|
166
|
+
type: 'setService',
|
167
|
+
payload: {
|
168
|
+
value: []
|
169
|
+
}
|
170
|
+
});
|
171
|
+
|
172
|
+
// 清空附加服务
|
173
|
+
dispatch({
|
174
|
+
type: 'setAddons',
|
175
|
+
payload: {
|
176
|
+
value: []
|
177
|
+
}
|
178
|
+
});
|
179
|
+
|
180
|
+
// // 重置客户信息(与 clientCard 的 onRemoveClient 保持一致)
|
181
|
+
// dispatch({
|
182
|
+
// type: 'setClient',
|
183
|
+
// payload: {
|
184
|
+
// value: null, // 传递 null 而不是 walkInData
|
185
|
+
// edit: true, // 添加 edit: true 标识
|
186
|
+
// },
|
187
|
+
// });
|
188
|
+
selectCustomer(null);
|
189
|
+
|
190
|
+
// 重置时间为当前时间(使用dayjs默认值)
|
191
|
+
dispatch({
|
192
|
+
type: 'setDate',
|
193
|
+
payload: {
|
194
|
+
value: dayjs(),
|
195
|
+
// 当前时间
|
196
|
+
end_date: dayjs().add(1, 'days') // 明天
|
197
|
+
}
|
198
|
+
});
|
199
|
+
|
200
|
+
// 重置表单数据
|
201
|
+
dispatch({
|
202
|
+
type: 'setPet',
|
203
|
+
payload: {
|
204
|
+
holders: [],
|
205
|
+
value: {}
|
206
|
+
}
|
207
|
+
});
|
208
|
+
|
209
|
+
// 重置备注
|
210
|
+
dispatch({
|
211
|
+
type: 'setNotes',
|
212
|
+
payload: {
|
213
|
+
value: '',
|
214
|
+
orderNote: ''
|
215
|
+
}
|
216
|
+
});
|
217
|
+
|
218
|
+
// TODO: 如果需要重置更多信息,可以在这里添加
|
219
|
+
// 比如重置优惠券、表单数据、宠物信息等
|
220
|
+
|
221
|
+
setShowClearModal(false);
|
222
|
+
Toast === null || Toast === void 0 || Toast.success(createToastContent(locales.getText('pisell2.action-buttons.clear-success')));
|
223
|
+
};
|
224
|
+
|
225
|
+
// 手动订单 - 价格调整
|
226
|
+
var handleManuelOrder = function handleManuelOrder() {
|
227
|
+
if (!hasCartItems) {
|
228
|
+
Toast === null || Toast === void 0 || Toast.info(createToastContent(locales.getText('pisell2.action-buttons.no-items-to-adjust')));
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
setShowPriceAdjustModal(true);
|
232
|
+
};
|
233
|
+
|
234
|
+
// 处理价格调整完成
|
235
|
+
var handlePriceAdjustConfirm = function handlePriceAdjustConfirm(newPrice) {
|
236
|
+
// 使用 getSumTotal 计算商品总金额
|
237
|
+
var _getSumTotal3 = getSumTotal(state, true),
|
238
|
+
productAmount = _getSumTotal3.productAmount;
|
239
|
+
|
240
|
+
// 计算折扣金额(商品总金额 - 新价格)
|
241
|
+
// 存储正数:正数表示折扣,0表示无折扣
|
242
|
+
var discountAmount = Math.max(0, productAmount - newPrice);
|
243
|
+
|
244
|
+
// 转换为金额字符串格式(2位小数)
|
245
|
+
var discountAmountStr = formatAmount(discountAmount, 2, '');
|
246
|
+
|
247
|
+
// console.log('=== 价格调整调试信息 ===');
|
248
|
+
// console.log('商品总金额 (productAmount):', productAmount);
|
249
|
+
// console.log('用户输入新价格 (newPrice):', newPrice);
|
250
|
+
// console.log('折扣金额 (discountAmount):', discountAmount);
|
251
|
+
// console.log('折扣金额字符串 (discountAmountStr):', discountAmountStr);
|
252
|
+
// console.log('当前 state.shop_discount:', state.shop_discount);
|
253
|
+
|
254
|
+
// 更新 shop_discount 到 state 根级别(存储为字符串)
|
255
|
+
dispatch({
|
256
|
+
type: 'setState',
|
257
|
+
payload: {
|
258
|
+
shop_discount: discountAmountStr
|
259
|
+
}
|
260
|
+
});
|
261
|
+
|
262
|
+
// console.log('dispatch 已调用');
|
263
|
+
|
264
|
+
setShowPriceAdjustModal(false);
|
265
|
+
|
266
|
+
// 显示成功提示
|
267
|
+
Toast === null || Toast === void 0 || Toast.success(createToastContent(locales.getText('pisell2.action-buttons.price-adjusted-success')));
|
268
|
+
};
|
269
|
+
|
270
|
+
// 自定义商品
|
271
|
+
var handleCustomiseItem = function handleCustomiseItem() {
|
272
|
+
setShowCustomiseModal(true);
|
273
|
+
};
|
274
|
+
|
275
|
+
// 处理自定义商品保存
|
276
|
+
var handleCustomiseItemSave = function handleCustomiseItemSave(data) {
|
277
|
+
var _state$service3;
|
278
|
+
console.log('保存自定义商品:', data);
|
279
|
+
|
280
|
+
// 创建自定义商品项,按照标准商品结构
|
281
|
+
var customItem = {
|
282
|
+
// 基础商品信息(按照 service2/utils.ts 693-730 行格式,但简化)
|
283
|
+
id: "custom_".concat(Date.now(), "_").concat(Math.random().toString(36).substr(2, 9)),
|
284
|
+
// 前端使用 UUID,避免 React diff key 重复
|
285
|
+
_id: "custom_".concat(Date.now(), "_").concat(Math.random().toString(36).substr(2, 9)),
|
286
|
+
// 生成唯一ID
|
287
|
+
title: data.productName,
|
288
|
+
name: data.productName,
|
289
|
+
price: parseFloat(data.priceValue) * (data.priceType === 'deduction' ? -1 : 1),
|
290
|
+
total: parseFloat(data.priceValue) * (data.priceType === 'deduction' ? -1 : 1),
|
291
|
+
num: data.quantity,
|
292
|
+
is_bundle: 0,
|
293
|
+
// 自定义商品特殊标识
|
294
|
+
isCustomItem: true,
|
295
|
+
vouchersApplicable: data.vouchersApplicable,
|
296
|
+
// 是否适用优惠券/折扣
|
297
|
+
|
298
|
+
// 后端需要的完整格式存储在 _extend 中
|
299
|
+
_extend: {
|
300
|
+
num: data.quantity,
|
301
|
+
price: parseFloat(data.priceValue) * (data.priceType === 'deduction' ? -1 : 1),
|
302
|
+
product_id: 0,
|
303
|
+
discount_amount: 0,
|
304
|
+
product_discount_reason: "",
|
305
|
+
name: data.productName,
|
306
|
+
note: "",
|
307
|
+
discountway: "num",
|
308
|
+
discount_type: data.priceType === 'deduction' ? "discount" : "normal",
|
309
|
+
order_detail_id: 0,
|
310
|
+
startDate: dayjs(),
|
311
|
+
endDate: dayjs(),
|
312
|
+
// 保留一些必要的购物车字段
|
313
|
+
quantity: data.quantity,
|
314
|
+
total: parseFloat(data.priceValue) * (data.priceType === 'deduction' ? -1 : 1),
|
315
|
+
origin_total: parseFloat(data.priceValue) * (data.priceType === 'deduction' ? -1 : 1)
|
316
|
+
},
|
317
|
+
new: 1
|
318
|
+
};
|
319
|
+
|
320
|
+
// 添加到购物车(使用 service 来存储自定义商品)
|
321
|
+
var currentServices = (state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value) || [];
|
322
|
+
|
323
|
+
// 直接添加自定义商品,不检查重复
|
324
|
+
var updatedServices = [customItem].concat(_toConsumableArray(currentServices));
|
325
|
+
|
326
|
+
// 更新状态,参考 addService.tsx 的 331-339 行
|
327
|
+
dispatch({
|
328
|
+
type: 'setService',
|
329
|
+
payload: {
|
330
|
+
value: updatedServices,
|
331
|
+
changeService: false
|
332
|
+
}
|
333
|
+
});
|
334
|
+
setShowCustomiseModal(false);
|
335
|
+
Toast === null || Toast === void 0 || Toast.success(createToastContent(locales.getText('pisell2.customise-item.save-success')));
|
336
|
+
};
|
337
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
338
|
+
className: "pisell-lowcode__action-buttons"
|
339
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
340
|
+
className: "action-button clear-button",
|
341
|
+
icon: /*#__PURE__*/React.createElement(Trash01, {
|
342
|
+
size: 22
|
343
|
+
}),
|
344
|
+
onClick: handleClear,
|
345
|
+
type: "text",
|
346
|
+
disabled: isDisabledEdit
|
347
|
+
}, locales.getText('pisell2.action-buttons.clear')), /*#__PURE__*/React.createElement(Button, {
|
348
|
+
className: "action-button manuel-button",
|
349
|
+
icon: /*#__PURE__*/React.createElement(Calculator, {
|
350
|
+
size: 22
|
351
|
+
}),
|
352
|
+
onClick: handleManuelOrder,
|
353
|
+
type: "text",
|
354
|
+
disabled: isDisabledEdit
|
355
|
+
}, locales.getText('pisell2.action-buttons.manuel-order')), /*#__PURE__*/React.createElement(Button, {
|
356
|
+
className: "action-button customise-button",
|
357
|
+
icon: /*#__PURE__*/React.createElement(PlusCircle, {
|
358
|
+
size: 22
|
359
|
+
}),
|
360
|
+
onClick: handleCustomiseItem,
|
361
|
+
type: "text",
|
362
|
+
disabled: isDisabledEdit
|
363
|
+
}, locales.getText('pisell2.action-buttons.customise-item'))), /*#__PURE__*/React.createElement(ClearCartModal, {
|
364
|
+
visible: showClearModal,
|
365
|
+
onCancel: function onCancel() {
|
366
|
+
return setShowClearModal(false);
|
367
|
+
},
|
368
|
+
onClearItemsOnly: handleClearItemsOnly,
|
369
|
+
onClearAllAndReset: handleClearAllAndReset
|
370
|
+
}), showPriceAdjustModal && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
|
371
|
+
className: "pisell-price-adjust-overlay"
|
372
|
+
}, /*#__PURE__*/React.createElement("div", {
|
373
|
+
className: "pisell-price-adjust-backdrop",
|
374
|
+
onMouseDown: function onMouseDown(e) {
|
375
|
+
e.preventDefault();
|
376
|
+
setShowPriceAdjustModal(false);
|
377
|
+
}
|
378
|
+
}), /*#__PURE__*/React.createElement("div", {
|
379
|
+
className: "pisell-price-adjust-container"
|
380
|
+
}, /*#__PURE__*/React.createElement(PisellAdjustPrice, {
|
381
|
+
selectType: "dark",
|
382
|
+
originValue: currentOriginTotalPrice,
|
383
|
+
value: currentTotalPrice,
|
384
|
+
onChange: handlePriceAdjustConfirm
|
385
|
+
}))), document.body), /*#__PURE__*/React.createElement(CustomiseItemModal, {
|
386
|
+
visible: showCustomiseModal,
|
387
|
+
onClose: function onClose() {
|
388
|
+
return setShowCustomiseModal(false);
|
389
|
+
},
|
390
|
+
onSave: handleCustomiseItemSave,
|
391
|
+
currencySymbol: ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2$g = _context$appHelper2.getSymbolic) === null || _context$appHelper2$g === void 0 ? void 0 : _context$appHelper2$g.call(_context$appHelper2)) || "$",
|
392
|
+
disabled: isDisabledEdit
|
393
|
+
}));
|
394
|
+
};
|
395
|
+
export default ActionButtons;
|
@@ -0,0 +1,148 @@
|
|
1
|
+
.pisell-lowcode__action-buttons {
|
2
|
+
display: flex;
|
3
|
+
justify-content: space-between;
|
4
|
+
align-items: center;
|
5
|
+
gap: 6px;
|
6
|
+
margin-top: 8px;
|
7
|
+
padding: 0;
|
8
|
+
|
9
|
+
.action-button {
|
10
|
+
display: flex;
|
11
|
+
justify-content: center;
|
12
|
+
align-items: center;
|
13
|
+
gap: 4px;
|
14
|
+
flex: 1 0 0;
|
15
|
+
height: 44px;
|
16
|
+
align-self: stretch;
|
17
|
+
padding: 0 8px;
|
18
|
+
color: white;
|
19
|
+
background: #2C2C2C;
|
20
|
+
border: 1px solid #2C2C2C;
|
21
|
+
border-radius: 4px;
|
22
|
+
font-size: 12px;
|
23
|
+
font-weight: 500;
|
24
|
+
transition: all 0.2s ease;
|
25
|
+
|
26
|
+
&:hover:not(:disabled) {
|
27
|
+
background: #404040;
|
28
|
+
border-color: #404040;
|
29
|
+
color: white;
|
30
|
+
}
|
31
|
+
|
32
|
+
&:disabled {
|
33
|
+
opacity: 0.5;
|
34
|
+
cursor: not-allowed;
|
35
|
+
background: #2C2C2C;
|
36
|
+
border-color: #2C2C2C;
|
37
|
+
color: white;
|
38
|
+
|
39
|
+
&:hover {
|
40
|
+
background: #2C2C2C !important;
|
41
|
+
border-color: #2C2C2C !important;
|
42
|
+
color: white !important;
|
43
|
+
opacity: 0.5 !important;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
// Clear 按钮更小
|
48
|
+
&.clear-button {
|
49
|
+
flex: 0.8;
|
50
|
+
border-color: #FF4D4F;
|
51
|
+
|
52
|
+
&:hover:not(:disabled) {
|
53
|
+
border-color: #FF7875;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
// Manuel 按钮正常大小,支持换行
|
58
|
+
&.manuel-button {
|
59
|
+
flex: 1;
|
60
|
+
border-color: #CC8E50;
|
61
|
+
align-items: center;
|
62
|
+
|
63
|
+
&:hover:not(:disabled) {
|
64
|
+
border-color: #CC8E50;
|
65
|
+
}
|
66
|
+
|
67
|
+
// 图标保持居中
|
68
|
+
.anticon {
|
69
|
+
align-self: center;
|
70
|
+
}
|
71
|
+
|
72
|
+
// Manuel按钮文本支持换行,保持与图标水平对齐
|
73
|
+
span {
|
74
|
+
white-space: pre-line !important;
|
75
|
+
line-height: 1.15;
|
76
|
+
text-align: center;
|
77
|
+
display: flex;
|
78
|
+
align-items: center;
|
79
|
+
justify-content: center;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
// Customise 按钮更大一些
|
84
|
+
&.customise-button {
|
85
|
+
flex: 1.3;
|
86
|
+
border-color: #8157D5;
|
87
|
+
|
88
|
+
&:hover:not(:disabled) {
|
89
|
+
border-color: #8157D5;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
// 图标样式
|
94
|
+
.anticon {
|
95
|
+
font-size: 22px;
|
96
|
+
}
|
97
|
+
|
98
|
+
// 文字样式和溢出处理
|
99
|
+
span {
|
100
|
+
overflow: hidden;
|
101
|
+
text-overflow: ellipsis;
|
102
|
+
white-space: nowrap;
|
103
|
+
text-align: center;
|
104
|
+
font-weight: 600;
|
105
|
+
}
|
106
|
+
|
107
|
+
.pisell-lowcode-btn-icon {
|
108
|
+
margin-right: 0;
|
109
|
+
font-size: 22px;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
// Toast 内容样式 - 确保行高和字体大小正确显示
|
115
|
+
.action-buttons-toast-content {
|
116
|
+
line-height: 1.8 !important;
|
117
|
+
font-size: 14px !important;
|
118
|
+
font-weight: 400 !important;
|
119
|
+
color: inherit !important;
|
120
|
+
}
|
121
|
+
|
122
|
+
// 价格调整覆盖层样式 - 现在通过 Portal 渲染到 document.body
|
123
|
+
.pisell-price-adjust-overlay {
|
124
|
+
position: fixed;
|
125
|
+
top: 0;
|
126
|
+
left: 0;
|
127
|
+
right: 0;
|
128
|
+
bottom: 0;
|
129
|
+
z-index: 9999; // 由于现在渲染到 document.body,使用更高的 z-index
|
130
|
+
display: flex;
|
131
|
+
align-items: center;
|
132
|
+
justify-content: center;
|
133
|
+
}
|
134
|
+
|
135
|
+
.pisell-price-adjust-backdrop {
|
136
|
+
position: absolute;
|
137
|
+
top: 0;
|
138
|
+
left: 0;
|
139
|
+
right: 0;
|
140
|
+
bottom: 0;
|
141
|
+
background: transparent; // 纯透明遮罩
|
142
|
+
cursor: pointer; // 显示点击手势
|
143
|
+
}
|
144
|
+
|
145
|
+
.pisell-price-adjust-container {
|
146
|
+
position: relative;
|
147
|
+
z-index: 10000; // 确保键盘在遮罩之上
|
148
|
+
}
|
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
|
|
29
29
|
onChange: function onChange(e) {
|
30
30
|
var _resetProps$onChange;
|
31
31
|
e.persist();
|
32
|
-
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0
|
32
|
+
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
|
33
33
|
}
|
34
34
|
}), _options);
|
35
35
|
};
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Modal } from 'antd';
|
3
|
+
import { Trash01 } from '@pisell/icon';
|
4
|
+
import { Iconfont } from '@pisell/materials';
|
5
|
+
import { locales } from '@pisell/utils';
|
6
|
+
import "./index.less";
|
7
|
+
var ClearCartModal = function ClearCartModal(_ref) {
|
8
|
+
var visible = _ref.visible,
|
9
|
+
onCancel = _ref.onCancel,
|
10
|
+
onClearItemsOnly = _ref.onClearItemsOnly,
|
11
|
+
onClearAllAndReset = _ref.onClearAllAndReset;
|
12
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
13
|
+
open: visible,
|
14
|
+
onCancel: onCancel,
|
15
|
+
footer: null,
|
16
|
+
width: 520,
|
17
|
+
centered: true,
|
18
|
+
className: "pisell-clear-cart-modal",
|
19
|
+
title: null,
|
20
|
+
closable: true
|
21
|
+
}, /*#__PURE__*/React.createElement("div", {
|
22
|
+
className: "pisell-clear-cart-modal-content"
|
23
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
24
|
+
className: "pisell-clear-cart-modal-title"
|
25
|
+
}, locales.getText('pisell2.clear-cart-modal.title')), /*#__PURE__*/React.createElement("div", {
|
26
|
+
className: "pisell-clear-cart-modal-options"
|
27
|
+
}, /*#__PURE__*/React.createElement("button", {
|
28
|
+
type: "button",
|
29
|
+
className: "pisell-clear-cart-option purple-option",
|
30
|
+
onClick: onClearItemsOnly
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
32
|
+
className: "option-icon"
|
33
|
+
}, /*#__PURE__*/React.createElement(Trash01, {
|
34
|
+
size: 32
|
35
|
+
})), /*#__PURE__*/React.createElement("div", {
|
36
|
+
className: "option-text"
|
37
|
+
}, locales.getText('pisell2.clear-cart-modal.clear-items-only'))), /*#__PURE__*/React.createElement("button", {
|
38
|
+
type: "button",
|
39
|
+
className: "pisell-clear-cart-option red-option",
|
40
|
+
onClick: onClearAllAndReset
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
42
|
+
className: "option-icon"
|
43
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
44
|
+
type: "pisell2-log-out-04",
|
45
|
+
size: 32
|
46
|
+
})), /*#__PURE__*/React.createElement("div", {
|
47
|
+
className: "option-text"
|
48
|
+
}, locales.getText('pisell2.clear-cart-modal.clear-all-reset'))))));
|
49
|
+
};
|
50
|
+
export default ClearCartModal;
|