@pisell/private-materials 3.3.46 → 3.3.48
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -0
- package/es/components/appointmentBooking/components/Resource/index.js +19 -7
- package/es/components/appointmentBooking/components/Services/index.js +1 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +7 -4
- package/es/components/appointmentBooking/components/Voucher/index.js +2 -0
- package/es/components/appointmentBooking/context.js +7 -3
- package/es/components/appointmentBooking/hooks.js +126 -67
- package/es/components/appointmentBooking/utils.js +6 -1
- package/es/components/booking/addons/index.js +31 -26
- package/es/components/booking/components/footer/amount.js +2 -2
- package/es/components/booking/components/footer/utils.d.ts +9 -0
- package/es/components/booking/components/footer/utils.js +32 -10
- package/es/components/booking/info/service/addService/index.js +2 -2
- package/es/components/booking/info/service2/utils.d.ts +4 -1
- package/es/components/booking/info/service2/utils.js +21 -2
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +9 -6
- package/es/components/booking/info2/service/editService/index.js +56 -18
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +5 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +75 -26
- package/es/components/ticketBooking/components/notAvailable/index.js +39 -0
- package/es/components/ticketBooking/index.js +1 -1
- package/es/components/ticketBooking/locales.d.ts +6 -0
- package/es/components/ticketBooking/locales.js +9 -3
- package/es/components/ticketBooking/serve.js +98 -92
- package/es/components/ticketBooking/utils/index.d.ts +1 -0
- package/es/components/ticketBooking/utils/index.js +33 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +3 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +7 -4
- package/lib/components/appointmentBooking/components/Services/index.js +1 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +4 -3
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -0
- package/lib/components/appointmentBooking/context.js +7 -3
- package/lib/components/appointmentBooking/hooks.js +70 -11
- package/lib/components/appointmentBooking/utils.js +2 -0
- package/lib/components/booking/addons/index.js +27 -21
- package/lib/components/booking/components/footer/amount.js +1 -1
- package/lib/components/booking/components/footer/utils.d.ts +9 -0
- package/lib/components/booking/components/footer/utils.js +24 -7
- package/lib/components/booking/info/service/addService/index.js +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +4 -1
- package/lib/components/booking/info/service2/utils.js +21 -2
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/addService/index.js +8 -5
- package/lib/components/booking/info2/service/editService/index.js +59 -23
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +6 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +74 -20
- package/lib/components/ticketBooking/components/notAvailable/index.js +61 -0
- package/lib/components/ticketBooking/index.js +1 -1
- package/lib/components/ticketBooking/locales.d.ts +6 -0
- package/lib/components/ticketBooking/locales.js +9 -3
- package/lib/components/ticketBooking/serve.js +6 -2
- package/lib/components/ticketBooking/utils/index.d.ts +1 -0
- package/lib/components/ticketBooking/utils/index.js +33 -0
- package/package.json +4 -4
- package/es/businessModel/SalesModel/Sales/index.d.ts +0 -24
- package/es/businessModel/SalesModel/hooks/index.d.ts +0 -1
- package/es/businessModel/SalesModel/index.d.ts +0 -3
- package/es/businessModel/index.d.ts +0 -0
- package/es/components/Sales/Cart/index.d.ts +0 -53
- package/es/components/Sales/Cart/serve.d.ts +0 -2
- package/es/components/Sales/Cart/types.d.ts +0 -31
- package/es/components/Sales/Cart/utils.d.ts +0 -23
- package/es/components/Sales/Checkout/index.d.ts +0 -33
- package/es/components/Sales/Checkout/serve.d.ts +0 -2
- package/es/components/Sales/Checkout/utils.d.ts +0 -35
- package/es/components/Sales/Customer/index.d.ts +0 -24
- package/es/components/Sales/Event/Detail.d.ts +0 -29
- package/es/components/Sales/Event/index.d.ts +0 -30
- package/es/components/Sales/Event/serve.d.ts +0 -39
- package/es/components/Sales/Holder/index.d.ts +0 -33
- package/es/components/Sales/Holder/serve.d.ts +0 -8
- package/es/components/Sales/Init/index.d.ts +0 -25
- package/es/components/Sales/Init/serve.d.ts +0 -3
- package/es/components/Sales/Resource/index.d.ts +0 -26
- package/es/components/Sales/Resource/serve.d.ts +0 -5
- package/es/components/Sales/Step/index.d.ts +0 -39
- package/es/components/Sales/Summary/index.d.ts +0 -25
- package/es/components/Sales/Summary/serve.d.ts +0 -0
- package/es/components/Sales/Summary/utils.d.ts +0 -36
- package/es/components/Sales/hooks/index.d.ts +0 -1
- package/es/components/Sales/index.d.ts +0 -20
- package/es/components/Sales/utils/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +0 -7
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +0 -12
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Date/state.d.ts +0 -63
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Form/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Form/utils.d.ts +0 -8
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Guest/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Resource/utils.d.ts +0 -5
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -3
- package/es/components/appointmentBooking/index.d.ts +0 -3
- package/es/components/appointmentBooking/locales.d.ts +0 -354
- package/es/components/appointmentBooking/mock.d.ts +0 -627
- package/es/components/appointmentBooking/status.d.ts +0 -21
- package/es/components/appointmentBooking/type.d.ts +0 -17
- package/es/components/booking/components/customSelect/index.d.ts +0 -38
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/deposit/DepositItem/index.d.ts +0 -25
- package/es/components/booking/forms/footer.d.ts +0 -6
- package/es/components/booking/forms/sendModal/index.d.ts +0 -27
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -9
- package/es/components/booking/forms/single/index.d.ts +0 -10
- package/es/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -6
- package/es/components/booking/info/clientVariant/utils.d.ts +0 -1
- package/es/components/booking/info/hooks/useGetHolderList.d.ts +0 -2
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -9
- package/es/components/booking/info/index.d.ts +0 -3
- package/es/components/booking/info/model.d.ts +0 -14
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/es/components/booking/info/service/index.d.ts +0 -4
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service2/index.d.ts +0 -6
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
- package/es/components/booking/info2/service/editService/utils.d.ts +0 -13
- package/es/components/booking/info2/service/index.d.ts +0 -4
- package/es/components/booking/info2/utils.d.ts +0 -4
- package/es/components/booking/locales.d.ts +0 -813
- package/es/components/booking/materiels/contacts/index.d.ts +0 -15
- package/es/components/booking/materiels/holder/index.d.ts +0 -6
- package/es/components/booking/model.d.ts +0 -115
- package/es/components/booking/notes/addNote/index.d.ts +0 -3
- package/es/components/booking/payments/index.d.ts +0 -9
- package/es/components/eftpos/index.d.ts +0 -46
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -3
- package/es/components/eftposPay/component/fail/index.d.ts +0 -3
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -9
- package/es/components/eftposPay/hooks.d.ts +0 -35
- package/es/components/eftposPay/index.d.ts +0 -4
- package/es/components/eftposPay/locales.d.ts +0 -330
- package/es/components/eftposPay/pay.d.ts +0 -20
- package/es/components/eftposPay/payo/config.d.ts +0 -12
- package/es/components/eftposPay/payo/hooks.d.ts +0 -10
- package/es/components/eftposPay/tyro/index.d.ts +0 -9
- package/es/components/eftposPay/windcave/helper.d.ts +0 -23
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -6
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -3
- package/es/components/eventBooking/components/OpenCard/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -3
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -10
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -3
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -12
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -3
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -3
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +0 -63
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +0 -14
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +0 -34
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -2
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
- package/es/components/eventBooking/components/bookingServiceList/index.d.ts +0 -17
- package/es/components/eventBooking/components/eventCard/index.d.ts +0 -14
- package/es/components/eventBooking/components/productCard/index.d.ts +0 -16
- package/es/components/eventBooking/components/progressBar/index.d.ts +0 -16
- package/es/components/eventBooking/components/resourceDisplay/index.d.ts +0 -23
- package/es/components/eventBooking/components/resourceUsability/index.d.ts +0 -12
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -9
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -12
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -3
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +0 -9
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +0 -14
- package/es/components/eventBooking/components/selectHolder/index.d.ts +0 -22
- package/es/components/eventBooking/components/timeResourceSelector/index.d.ts +0 -20
- package/es/components/eventBooking/index.d.ts +0 -3
- package/es/components/eventBooking/locales.d.ts +0 -222
- package/es/components/eventBooking/mock.d.ts +0 -627
- package/es/components/eventBooking/status.d.ts +0 -21
- package/es/components/eventBooking/type.d.ts +0 -17
- package/es/components/eventBooking/utils.d.ts +0 -45
- package/es/components/index.d.ts +0 -18
- package/es/components/login/index.d.ts +0 -8
- package/es/components/login/locales.d.ts +0 -24
- package/es/components/pay/toC/PaymentList/index.d.ts +0 -19
- package/es/components/pay/toC/PaymentList/serve.d.ts +0 -28
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +0 -18
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -25
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -113
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
- package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +0 -16
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +0 -17
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -7
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +0 -21
- package/es/components/pay/toC/index.d.ts +0 -3
- package/es/components/pay/toC/locales.d.ts +0 -286
- package/es/components/pay/toC/model.d.ts +0 -39
- package/es/components/pay/toC/serve.d.ts +0 -57
- package/es/components/pay/toC/utils.d.ts +0 -51
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -2
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -15
- package/es/components/productExtension/index.d.ts +0 -7
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
- package/es/components/productSelect/components/gridLayout/index.d.ts +0 -9
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -38
- package/es/components/productSelect/hooks/useToken.d.ts +0 -18
- package/es/components/productSelect/locales.d.ts +0 -18
- package/es/components/productSelect/mock.d.ts +0 -134
- package/es/components/productSelect/theme/token.d.ts +0 -17
- package/es/components/ruleSetting/index.d.ts +0 -9
- package/es/components/ruleSetting/server.d.ts +0 -4
- package/es/components/schedules/index.d.ts +0 -3
- package/es/components/schedules/schedules/utils.d.ts +0 -72
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -3
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -3
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -3
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -3
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -2
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -3
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/type.d.ts +0 -48
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/subTotal/index.d.ts +0 -22
- package/es/components/subTotal/locales.d.ts +0 -42
- package/es/components/taxSelect/index.d.ts +0 -11
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -3
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
- package/es/components/ticketBooking/data.d.ts +0 -58
- package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +0 -11
- package/es/components/ticketBooking/miniRedux.d.ts +0 -22
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/locales.d.ts +0 -96
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/index.d.ts +0 -2
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/serve.d.ts +0 -143
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/walletList/index.d.ts +0 -28
- package/es/components/walletList/model.d.ts +0 -6
- package/es/components/walletList/serve.d.ts +0 -12
- package/es/components/walletList/types/index.d.ts +0 -194
- package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/es/components/workSpaceList/components/EditableString/index.d.ts +0 -21
- package/es/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
- package/es/components/workSpaceList/components/Sort/index.d.ts +0 -7
- package/es/components/workSpaceList/components/WorkspaceItem/index.d.ts +0 -22
- package/es/hooks/useEngineContext.d.ts +0 -10
- package/es/hooks/useLocale.d.ts +0 -2
- package/es/hooks/useLoginUser.d.ts +0 -2
- package/es/index.d.ts +0 -45
- package/es/utils/date.d.ts +0 -11
- package/es/utils/index.d.ts +0 -23
- package/es/utils/locales.d.ts +0 -1
- package/es/utils/tasks/index.d.ts +0 -16
- package/es/utils/tasks/type.d.ts +0 -4
- package/lib/businessModel/SalesModel/Sales/index.d.ts +0 -24
- package/lib/businessModel/SalesModel/hooks/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -3
- package/lib/businessModel/index.d.ts +0 -0
- package/lib/components/Sales/Cart/index.d.ts +0 -53
- package/lib/components/Sales/Cart/serve.d.ts +0 -2
- package/lib/components/Sales/Cart/types.d.ts +0 -31
- package/lib/components/Sales/Cart/utils.d.ts +0 -23
- package/lib/components/Sales/Checkout/index.d.ts +0 -33
- package/lib/components/Sales/Checkout/serve.d.ts +0 -2
- package/lib/components/Sales/Checkout/utils.d.ts +0 -35
- package/lib/components/Sales/Customer/index.d.ts +0 -24
- package/lib/components/Sales/Event/Detail.d.ts +0 -29
- package/lib/components/Sales/Event/index.d.ts +0 -30
- package/lib/components/Sales/Event/serve.d.ts +0 -39
- package/lib/components/Sales/Holder/index.d.ts +0 -33
- package/lib/components/Sales/Holder/serve.d.ts +0 -8
- package/lib/components/Sales/Init/index.d.ts +0 -25
- package/lib/components/Sales/Init/serve.d.ts +0 -3
- package/lib/components/Sales/Resource/index.d.ts +0 -26
- package/lib/components/Sales/Resource/serve.d.ts +0 -5
- package/lib/components/Sales/Step/index.d.ts +0 -39
- package/lib/components/Sales/Summary/index.d.ts +0 -25
- package/lib/components/Sales/Summary/serve.d.ts +0 -0
- package/lib/components/Sales/Summary/utils.d.ts +0 -36
- package/lib/components/Sales/hooks/index.d.ts +0 -1
- package/lib/components/Sales/index.d.ts +0 -20
- package/lib/components/Sales/utils/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +0 -7
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +0 -12
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Date/state.d.ts +0 -63
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Form/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +0 -8
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Guest/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Resource/utils.d.ts +0 -5
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -3
- package/lib/components/appointmentBooking/index.d.ts +0 -3
- package/lib/components/appointmentBooking/locales.d.ts +0 -354
- package/lib/components/appointmentBooking/mock.d.ts +0 -627
- package/lib/components/appointmentBooking/status.d.ts +0 -21
- package/lib/components/appointmentBooking/type.d.ts +0 -17
- package/lib/components/booking/components/customSelect/index.d.ts +0 -38
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/deposit/DepositItem/index.d.ts +0 -25
- package/lib/components/booking/forms/footer.d.ts +0 -6
- package/lib/components/booking/forms/sendModal/index.d.ts +0 -27
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -9
- package/lib/components/booking/forms/single/index.d.ts +0 -10
- package/lib/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -6
- package/lib/components/booking/info/clientVariant/utils.d.ts +0 -1
- package/lib/components/booking/info/hooks/useGetHolderList.d.ts +0 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -9
- package/lib/components/booking/info/index.d.ts +0 -3
- package/lib/components/booking/info/model.d.ts +0 -14
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/lib/components/booking/info/service/index.d.ts +0 -4
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service2/index.d.ts +0 -6
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
- package/lib/components/booking/info2/service/editService/utils.d.ts +0 -13
- package/lib/components/booking/info2/service/index.d.ts +0 -4
- package/lib/components/booking/info2/utils.d.ts +0 -4
- package/lib/components/booking/locales.d.ts +0 -813
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -15
- package/lib/components/booking/materiels/holder/index.d.ts +0 -6
- package/lib/components/booking/model.d.ts +0 -115
- package/lib/components/booking/notes/addNote/index.d.ts +0 -3
- package/lib/components/booking/payments/index.d.ts +0 -9
- package/lib/components/eftpos/index.d.ts +0 -46
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -3
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -9
- package/lib/components/eftposPay/hooks.d.ts +0 -35
- package/lib/components/eftposPay/index.d.ts +0 -4
- package/lib/components/eftposPay/locales.d.ts +0 -330
- package/lib/components/eftposPay/pay.d.ts +0 -20
- package/lib/components/eftposPay/payo/config.d.ts +0 -12
- package/lib/components/eftposPay/payo/hooks.d.ts +0 -10
- package/lib/components/eftposPay/tyro/index.d.ts +0 -9
- package/lib/components/eftposPay/windcave/helper.d.ts +0 -23
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -6
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -3
- package/lib/components/eventBooking/components/OpenCard/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -10
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -12
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +0 -63
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +0 -14
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +0 -34
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -2
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
- package/lib/components/eventBooking/components/bookingServiceList/index.d.ts +0 -17
- package/lib/components/eventBooking/components/eventCard/index.d.ts +0 -14
- package/lib/components/eventBooking/components/productCard/index.d.ts +0 -16
- package/lib/components/eventBooking/components/progressBar/index.d.ts +0 -16
- package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +0 -23
- package/lib/components/eventBooking/components/resourceUsability/index.d.ts +0 -12
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -9
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -12
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -3
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +0 -9
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +0 -14
- package/lib/components/eventBooking/components/selectHolder/index.d.ts +0 -22
- package/lib/components/eventBooking/components/timeResourceSelector/index.d.ts +0 -20
- package/lib/components/eventBooking/index.d.ts +0 -3
- package/lib/components/eventBooking/locales.d.ts +0 -222
- package/lib/components/eventBooking/mock.d.ts +0 -627
- package/lib/components/eventBooking/status.d.ts +0 -21
- package/lib/components/eventBooking/type.d.ts +0 -17
- package/lib/components/eventBooking/utils.d.ts +0 -45
- package/lib/components/index.d.ts +0 -18
- package/lib/components/login/index.d.ts +0 -8
- package/lib/components/login/locales.d.ts +0 -24
- package/lib/components/pay/toC/PaymentList/index.d.ts +0 -19
- package/lib/components/pay/toC/PaymentList/serve.d.ts +0 -28
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +0 -18
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -25
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -113
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +0 -16
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +0 -17
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -7
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +0 -21
- package/lib/components/pay/toC/index.d.ts +0 -3
- package/lib/components/pay/toC/locales.d.ts +0 -286
- package/lib/components/pay/toC/model.d.ts +0 -39
- package/lib/components/pay/toC/serve.d.ts +0 -57
- package/lib/components/pay/toC/utils.d.ts +0 -51
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -2
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -15
- package/lib/components/productExtension/index.d.ts +0 -7
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
- package/lib/components/productSelect/components/gridLayout/index.d.ts +0 -9
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -38
- package/lib/components/productSelect/hooks/useToken.d.ts +0 -18
- package/lib/components/productSelect/locales.d.ts +0 -18
- package/lib/components/productSelect/mock.d.ts +0 -134
- package/lib/components/productSelect/theme/token.d.ts +0 -17
- package/lib/components/ruleSetting/index.d.ts +0 -9
- package/lib/components/ruleSetting/server.d.ts +0 -4
- package/lib/components/schedules/index.d.ts +0 -3
- package/lib/components/schedules/schedules/utils.d.ts +0 -72
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -3
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -3
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -3
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -3
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -2
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -3
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/type.d.ts +0 -48
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/subTotal/index.d.ts +0 -22
- package/lib/components/subTotal/locales.d.ts +0 -42
- package/lib/components/taxSelect/index.d.ts +0 -11
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -3
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
- package/lib/components/ticketBooking/data.d.ts +0 -58
- package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +0 -11
- package/lib/components/ticketBooking/miniRedux.d.ts +0 -22
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/locales.d.ts +0 -96
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/index.d.ts +0 -2
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/serve.d.ts +0 -143
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/walletList/index.d.ts +0 -28
- package/lib/components/walletList/model.d.ts +0 -6
- package/lib/components/walletList/serve.d.ts +0 -12
- package/lib/components/walletList/types/index.d.ts +0 -194
- package/lib/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/lib/components/workSpaceList/components/EditableString/index.d.ts +0 -21
- package/lib/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
- package/lib/components/workSpaceList/components/Sort/index.d.ts +0 -7
- package/lib/components/workSpaceList/components/WorkspaceItem/index.d.ts +0 -22
- package/lib/hooks/useEngineContext.d.ts +0 -10
- package/lib/hooks/useLocale.d.ts +0 -2
- package/lib/hooks/useLoginUser.d.ts +0 -2
- package/lib/index.d.ts +0 -45
- package/lib/utils/date.d.ts +0 -11
- package/lib/utils/index.d.ts +0 -23
- package/lib/utils/locales.d.ts +0 -1
- package/lib/utils/tasks/index.d.ts +0 -16
- package/lib/utils/tasks/type.d.ts +0 -4
- /package/es/components/{booking/components/footer/AppointmentProductModal → ticketBooking/components/notAvailable}/index.d.ts +0 -0
- /package/lib/components/{booking/components/footer/AppointmentProductModal → ticketBooking/components/notAvailable}/index.d.ts +0 -0
|
@@ -35,20 +35,21 @@ import ProductItem from "../components/TabProduct/selectProductItem";
|
|
|
35
35
|
import TabProduct from "../components/TabProduct";
|
|
36
36
|
import EmptyBooking from "../components/emptyBooking";
|
|
37
37
|
import Footer from "../components/footer";
|
|
38
|
-
import { formatProductBundle } from "../components/footer/utils";
|
|
39
|
-
import { formatProductListByCategory, getProductTotalPrice, isSessionProduct, request } from "../utils";
|
|
38
|
+
import { formatProductBundle, formatProductOption, formatProductPrice } from "../components/footer/utils";
|
|
39
|
+
import { formatProductListByCategory, getIsEject, getProductTotalPrice, isSessionProduct, request } from "../utils";
|
|
40
40
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
41
41
|
import "./index.less";
|
|
42
42
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
43
43
|
export var formatProducts = function formatProducts(values) {
|
|
44
44
|
var arr = [];
|
|
45
45
|
arr = values.map(function (item) {
|
|
46
|
-
var _item$_extend, _item$_extend2;
|
|
46
|
+
var _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4;
|
|
47
47
|
return {
|
|
48
48
|
order_detail_id: item.order_detail_id || 0,
|
|
49
49
|
num: item._extend.quantity,
|
|
50
|
-
price: item
|
|
50
|
+
price: formatProductPrice(item),
|
|
51
51
|
product_id: item.id,
|
|
52
|
+
discount_list: (item === null || item === void 0 ? void 0 : item.discount_list) || [],
|
|
52
53
|
discount_amount: 0,
|
|
53
54
|
product_discount_reason: '',
|
|
54
55
|
is_charge_tax: item.is_charge_tax,
|
|
@@ -56,7 +57,9 @@ export var formatProducts = function formatProducts(values) {
|
|
|
56
57
|
discountway: 'num',
|
|
57
58
|
discount_type: 'discount',
|
|
58
59
|
bundle_edit: (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle_edit,
|
|
59
|
-
product_bundle: formatProductBundle((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.other) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.bundle)
|
|
60
|
+
product_bundle: formatProductBundle((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.other) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.bundle),
|
|
61
|
+
"product_option_item": formatProductOption((_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 || (_item$_extend3 = _item$_extend3.other) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.option),
|
|
62
|
+
"product_variant_id": ((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 || (_item$_extend4 = _item$_extend4.other) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.product_variant_id) || 0
|
|
60
63
|
};
|
|
61
64
|
});
|
|
62
65
|
return arr;
|
|
@@ -83,7 +86,7 @@ var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
|
83
86
|
})
|
|
84
87
|
});
|
|
85
88
|
}),
|
|
86
|
-
product_variant_id: 0,
|
|
89
|
+
product_variant_id: detail.product_variant_id || 0,
|
|
87
90
|
quantity: Number(detail.product_quantity)
|
|
88
91
|
};
|
|
89
92
|
};
|
|
@@ -284,23 +287,23 @@ var Addons = Provider(function (props) {
|
|
|
284
287
|
var isSession = isSessionProduct(item);
|
|
285
288
|
|
|
286
289
|
// 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
|
|
287
|
-
var isEject =
|
|
290
|
+
var isEject = getIsEject(item, type);
|
|
288
291
|
state.action({
|
|
289
292
|
type: 'pisell1.handleOpenProductModal',
|
|
290
293
|
data: {
|
|
291
294
|
id: item.id,
|
|
292
295
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
293
296
|
showConfig: {
|
|
294
|
-
option:
|
|
297
|
+
option: true,
|
|
295
298
|
session: isSession,
|
|
296
|
-
variant:
|
|
297
|
-
package: true
|
|
299
|
+
variant: true,
|
|
300
|
+
package: true,
|
|
301
|
+
number: true
|
|
298
302
|
},
|
|
299
303
|
is_eject: isEject ? 1 : 0,
|
|
300
304
|
isOS: isSession
|
|
301
305
|
},
|
|
302
306
|
callback: function callback(e, extension_type, detail) {
|
|
303
|
-
console.log('e', e);
|
|
304
307
|
var _detail = detail || item;
|
|
305
308
|
var product = _objectSpread(_objectSpread({}, _detail), {}, {
|
|
306
309
|
_id: getUniqueId(),
|
|
@@ -308,19 +311,19 @@ var Addons = Provider(function (props) {
|
|
|
308
311
|
_extend: {
|
|
309
312
|
price: _detail.price,
|
|
310
313
|
other: e,
|
|
311
|
-
quantity: 1
|
|
314
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1
|
|
312
315
|
},
|
|
313
|
-
quantity: 1
|
|
316
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1
|
|
314
317
|
});
|
|
315
318
|
var _total = getProductTotalPrice(product);
|
|
316
319
|
product._extend.total = _total;
|
|
317
320
|
var _item = _list.find(function (d) {
|
|
318
|
-
return d._extend.other.
|
|
321
|
+
return d._extend.other.rowKey === e.rowKey;
|
|
319
322
|
});
|
|
320
323
|
|
|
321
324
|
// 如果已添加, 则数量+1
|
|
322
325
|
if (_item) {
|
|
323
|
-
_item._extend.quantity = _item.quantity +
|
|
326
|
+
_item._extend.quantity = _item._extend.quantity + product.quantity;
|
|
324
327
|
} else {
|
|
325
328
|
// 否则 push
|
|
326
329
|
_list.push(product);
|
|
@@ -353,22 +356,20 @@ var Addons = Provider(function (props) {
|
|
|
353
356
|
// 0 则移除
|
|
354
357
|
if (quantity == 0) {
|
|
355
358
|
_list = _list.filter(function (d) {
|
|
356
|
-
return d.
|
|
359
|
+
return d._id !== item._id;
|
|
357
360
|
});
|
|
358
361
|
} else {
|
|
359
|
-
var _item$
|
|
362
|
+
var _item$_extend5;
|
|
360
363
|
var _item = _objectSpread(_objectSpread({}, item), {}, {
|
|
361
364
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
362
365
|
quantity: Number(e.target.value)
|
|
363
366
|
})
|
|
364
367
|
});
|
|
365
|
-
|
|
366
|
-
_item._extend.total = _total;
|
|
367
|
-
if (((_item$_extend3 = _item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.bundle_edit) !== undefined) {
|
|
368
|
+
if (((_item$_extend5 = _item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.bundle_edit) !== undefined) {
|
|
368
369
|
_item._extend.bundle_edit = 1;
|
|
369
370
|
}
|
|
370
371
|
_list = _list.map(function (d) {
|
|
371
|
-
return d.
|
|
372
|
+
return d._id === item._id ? _item : d;
|
|
372
373
|
});
|
|
373
374
|
}
|
|
374
375
|
dispatch({
|
|
@@ -497,10 +498,11 @@ var Addons = Provider(function (props) {
|
|
|
497
498
|
id: item.id,
|
|
498
499
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
499
500
|
showConfig: {
|
|
500
|
-
option:
|
|
501
|
+
option: true,
|
|
501
502
|
session: isSession,
|
|
502
|
-
variant:
|
|
503
|
-
package: true
|
|
503
|
+
variant: true,
|
|
504
|
+
package: true,
|
|
505
|
+
number: true
|
|
504
506
|
},
|
|
505
507
|
value: item._extend.other,
|
|
506
508
|
isOS: isSession
|
|
@@ -508,9 +510,12 @@ var Addons = Provider(function (props) {
|
|
|
508
510
|
callback: function callback(e, extension_type, detail) {
|
|
509
511
|
var _product$_extend;
|
|
510
512
|
var _detail = detail || item;
|
|
511
|
-
var product = _objectSpread(_objectSpread({}, _detail), {}, {
|
|
513
|
+
var product = _objectSpread(_objectSpread(_objectSpread({}, item), _detail), {}, {
|
|
514
|
+
// 编辑商品时清除折扣信息
|
|
515
|
+
discount_list: [],
|
|
512
516
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
513
|
-
other: e
|
|
517
|
+
other: e,
|
|
518
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1
|
|
514
519
|
})
|
|
515
520
|
});
|
|
516
521
|
if (((_product$_extend = product._extend) === null || _product$_extend === void 0 ? void 0 : _product$_extend.bundle_edit) !== undefined) {
|
|
@@ -9,7 +9,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
9
9
|
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; }
|
|
10
10
|
import { getDiscountTime, flexibleObj } from "../../utils";
|
|
11
11
|
import { formatAmount } from '@pisell/utils';
|
|
12
|
-
import { isDayBooking, isDayBookingProduct } from "../../info/service2/utils";
|
|
12
|
+
import { isDayBooking, isDayBookingProduct, isNormalProductByDurationSchedule } from "../../info/service2/utils";
|
|
13
13
|
export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_details) {
|
|
14
14
|
var total = 0;
|
|
15
15
|
var _iterator = _createForOfIteratorHelper(relation_details),
|
|
@@ -47,7 +47,7 @@ var getProductAmount = function getProductAmount(state, isEdit) {
|
|
|
47
47
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
48
48
|
var _item = _step2.value;
|
|
49
49
|
// 跨日预约
|
|
50
|
-
if (isDay) {
|
|
50
|
+
if (isDay || isNormalProductByDurationSchedule(_item)) {
|
|
51
51
|
var quantity = _item._extend.quantity || 1;
|
|
52
52
|
price += Number(_item._extend.total) * Number(quantity);
|
|
53
53
|
|
|
@@ -27,5 +27,14 @@ export interface ResourceItem {
|
|
|
27
27
|
* @Author: jinglin.tan
|
|
28
28
|
*/
|
|
29
29
|
export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
|
|
30
|
+
/**
|
|
31
|
+
* @title: 格式化商品单价
|
|
32
|
+
* @description:
|
|
33
|
+
* @param {any} item
|
|
34
|
+
* @return {*}
|
|
35
|
+
* @Author: WangHan
|
|
36
|
+
* @Date: 2024-12-23 12:05
|
|
37
|
+
*/
|
|
38
|
+
export declare const formatProductPrice: (item: any) => number;
|
|
30
39
|
export declare const formatValues: (state: any) => any;
|
|
31
40
|
export declare const checkHolderIsError: (state: any) => any;
|
|
@@ -10,7 +10,7 @@ import { isWalkIn } from "../../utils";
|
|
|
10
10
|
import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
11
11
|
import { getDays } from "../../utils";
|
|
12
12
|
import { appointmentTypes } from "../../info/service2/status";
|
|
13
|
-
import { isDaysBooking, formatDayTime, isEventBooking } from "../../info/service2/utils";
|
|
13
|
+
import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule } from "../../info/service2/utils";
|
|
14
14
|
import { locales, sendWarningLog } from '@pisell/utils';
|
|
15
15
|
import { PisellToast } from "@pisell/materials";
|
|
16
16
|
var formatNote = function formatNote(data) {
|
|
@@ -47,7 +47,7 @@ export var formatProductOption = function formatProductOption(option) {
|
|
|
47
47
|
return option.map(function (d) {
|
|
48
48
|
return {
|
|
49
49
|
"num": d.num,
|
|
50
|
-
"option_group_item_id": d.product_option_item_id,
|
|
50
|
+
"option_group_item_id": d.product_option_item_id || d.option_group_item_id,
|
|
51
51
|
"option_group_id": d.option_group_id
|
|
52
52
|
// "add_price": Number(d?.add_price),
|
|
53
53
|
};
|
|
@@ -221,7 +221,7 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
221
221
|
* @Author: WangHan
|
|
222
222
|
* @Date: 2024-12-23 12:05
|
|
223
223
|
*/
|
|
224
|
-
var formatProductPrice = function formatProductPrice(item) {
|
|
224
|
+
export var formatProductPrice = function formatProductPrice(item) {
|
|
225
225
|
var _item$_extend3, _item$_extend4;
|
|
226
226
|
var other = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.other;
|
|
227
227
|
var price = Number((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.price);
|
|
@@ -406,6 +406,11 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
406
406
|
return (_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.holder_id;
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
|
+
if (!isDay && !isEvent) {
|
|
410
|
+
list = list.filter(function (item) {
|
|
411
|
+
return !isNormalProductByDurationSchedule(item);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
409
414
|
var dayParams = {};
|
|
410
415
|
var eventOtherParams = data.eventOtherParams;
|
|
411
416
|
var bookings = [];
|
|
@@ -496,6 +501,21 @@ var formatRelationProducts = function formatRelationProducts(data) {
|
|
|
496
501
|
return relationProducts || [];
|
|
497
502
|
};
|
|
498
503
|
|
|
504
|
+
// 非预约商品格式化
|
|
505
|
+
var formatNormalProducts = function formatNormalProducts(data) {
|
|
506
|
+
var _data$service2;
|
|
507
|
+
var list = ((_data$service2 = data.service) === null || _data$service2 === void 0 ? void 0 : _data$service2.value) || [];
|
|
508
|
+
// 非预约的商品
|
|
509
|
+
list = list.filter(function (item) {
|
|
510
|
+
return isNormalProductByDurationSchedule(item);
|
|
511
|
+
});
|
|
512
|
+
var relationProducts = [];
|
|
513
|
+
relationProducts = list.map(function (item) {
|
|
514
|
+
return formatProducts(item);
|
|
515
|
+
});
|
|
516
|
+
return relationProducts || [];
|
|
517
|
+
};
|
|
518
|
+
|
|
499
519
|
/**
|
|
500
520
|
* @title: 预约主体信息
|
|
501
521
|
* @description:
|
|
@@ -531,7 +551,7 @@ var formatHolder = function formatHolder(state, values) {
|
|
|
531
551
|
|
|
532
552
|
// https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/2778666/detail/53001549?spaceKey=menutech
|
|
533
553
|
export var formatValues = function formatValues(state) {
|
|
534
|
-
var _values;
|
|
554
|
+
var _values, _values3;
|
|
535
555
|
var values = {
|
|
536
556
|
type: state.renderType === 'eventBooking' ? "event_booking_v2" : "appointment_booking",
|
|
537
557
|
platform: "shop",
|
|
@@ -564,13 +584,11 @@ export var formatValues = function formatValues(state) {
|
|
|
564
584
|
|
|
565
585
|
// 主体
|
|
566
586
|
values.holder = formatHolder(state, values);
|
|
567
|
-
if (isDay) {
|
|
587
|
+
if (isDay || isEvent) {
|
|
568
588
|
values.relation_products = formatRelationProducts(state);
|
|
589
|
+
} else {
|
|
590
|
+
values.relation_products = formatNormalProducts(state);
|
|
569
591
|
}
|
|
570
|
-
if (isEvent) {
|
|
571
|
-
values.relation_products = formatRelationProducts(state);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
592
|
// 服务
|
|
575
593
|
values.bookings = formatBookings(state, values);
|
|
576
594
|
|
|
@@ -589,6 +607,9 @@ export var formatValues = function formatValues(state) {
|
|
|
589
607
|
// is_bundle_price_calculated 用于区分商品的price是总价,还是商品的单价
|
|
590
608
|
// values.is_bundle_price_calculated = 1
|
|
591
609
|
}
|
|
610
|
+
if (!((_values3 = values) !== null && _values3 !== void 0 && (_values3 = _values3.bookings) !== null && _values3 !== void 0 && _values3.length)) {
|
|
611
|
+
values.type = 'virtual';
|
|
612
|
+
}
|
|
592
613
|
return values;
|
|
593
614
|
};
|
|
594
615
|
|
|
@@ -596,7 +617,8 @@ export var formatValues = function formatValues(state) {
|
|
|
596
617
|
export var checkHolderIsError = function checkHolderIsError(state) {
|
|
597
618
|
var _state$client;
|
|
598
619
|
var holderError = state.service.value.some(function (item) {
|
|
599
|
-
|
|
620
|
+
// 普通商品不需要检测holder
|
|
621
|
+
return !item._extend.holder_id && !isNormalProductByDurationSchedule(item);
|
|
600
622
|
});
|
|
601
623
|
var clientId = (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id;
|
|
602
624
|
if (holderError && (!clientId || clientId === 0 || clientId === 1)) {
|
|
@@ -28,7 +28,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
|
28
28
|
import TabProduct from "../../../components/TabProduct";
|
|
29
29
|
import AddButton from "../../../components/addButton";
|
|
30
30
|
import Drawer from "../../../components/drawer";
|
|
31
|
-
import { formatProductListByCategory, isSessionProduct, request } from "../../../utils";
|
|
31
|
+
import { formatProductListByCategory, getIsEject, isSessionProduct, request } from "../../../utils";
|
|
32
32
|
import DateRange from "../../dateRange";
|
|
33
33
|
import { Context } from "../../model";
|
|
34
34
|
import { appointmentTypes, inputDateCol } from "../../service2/status";
|
|
@@ -310,7 +310,7 @@ var Info = function Info(props) {
|
|
|
310
310
|
var handleSelectProduct = useMemoizedFn(function (item, type) {
|
|
311
311
|
var isSession = isSessionProduct(item);
|
|
312
312
|
// 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
|
|
313
|
-
var isEject =
|
|
313
|
+
var isEject = getIsEject(item, type);
|
|
314
314
|
|
|
315
315
|
// 跨日预约开启单规格 组合规格 套餐
|
|
316
316
|
if (isDay) {
|
|
@@ -55,6 +55,9 @@ export declare const handleChangeHolder: (products: any[], currentItem: any, oth
|
|
|
55
55
|
export declare const updateServices: (state: any, currentItem: any, type?: string, other?: any, actions?: any) => any;
|
|
56
56
|
export declare const formItems: (items: any[]) => any[];
|
|
57
57
|
export declare const getIsSubjectRequire: (state: any) => boolean;
|
|
58
|
+
export declare const isNormalProductByDurationSchedule: (item: any) => boolean;
|
|
59
|
+
export declare const isAllNormalProduct: (items: any[]) => boolean;
|
|
60
|
+
export declare const isAllNormalProductByState: (state: any) => boolean;
|
|
58
61
|
/**
|
|
59
62
|
* @title: 格式化商品数据
|
|
60
63
|
* @description:
|
|
@@ -241,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
241
244
|
* @Author: WangHan
|
|
242
245
|
* @Date: 2024-12-24 11:32
|
|
243
246
|
*/
|
|
244
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
247
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -523,6 +523,22 @@ export var getIsSubjectRequire = function getIsSubjectRequire(state) {
|
|
|
523
523
|
var _state$bookingConfig2, _state$bookingConfig3;
|
|
524
524
|
return (state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.appointment_subject) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.type) === 'form' && (state === null || state === void 0 || (_state$bookingConfig3 = state.bookingConfig) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.config) === null || _state$bookingConfig3 === void 0 || (_state$bookingConfig3 = _state$bookingConfig3.basic) === null || _state$bookingConfig3 === void 0 ? void 0 : _state$bookingConfig3.subject_require) === 'require';
|
|
525
525
|
};
|
|
526
|
+
|
|
527
|
+
// 非预约商品 通过时长和日程判断是否是普通商品
|
|
528
|
+
export var isNormalProductByDurationSchedule = function isNormalProductByDurationSchedule(item) {
|
|
529
|
+
var _item$schedules, _item$scheduleIds;
|
|
530
|
+
return !(item !== null && item !== void 0 && item.duration) && !(item !== null && item !== void 0 && (_item$schedules = item.schedules) !== null && _item$schedules !== void 0 && _item$schedules.length) && !((_item$scheduleIds = item['schedule.ids']) !== null && _item$scheduleIds !== void 0 && _item$scheduleIds.length);
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
// 是否全部是普通商品
|
|
534
|
+
export var isAllNormalProduct = function isAllNormalProduct(items) {
|
|
535
|
+
return items.every(function (item) {
|
|
536
|
+
return isNormalProductByDurationSchedule(item);
|
|
537
|
+
});
|
|
538
|
+
};
|
|
539
|
+
export var isAllNormalProductByState = function isAllNormalProductByState(state) {
|
|
540
|
+
return isAllNormalProduct(state.service.value);
|
|
541
|
+
};
|
|
526
542
|
var getGeneralParams = function getGeneralParams(item, state, isParallelResource) {
|
|
527
543
|
var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8;
|
|
528
544
|
var pet = state.pet,
|
|
@@ -582,12 +598,14 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
582
598
|
lists: mapListItems(resource)
|
|
583
599
|
}];
|
|
584
600
|
}
|
|
601
|
+
var isNormalProduct = isNormalProductByDurationSchedule(item);
|
|
585
602
|
return _objectSpread({
|
|
586
603
|
format: ['HH:mm', 'HH:mm'],
|
|
587
604
|
show_time: true,
|
|
588
605
|
duration_type: 'minutes',
|
|
589
606
|
// 当前可选择holder列表
|
|
590
607
|
holders: formatHolders(holders),
|
|
608
|
+
isShowChangeHolder: !isNormalProduct,
|
|
591
609
|
isShowAction: isShowAddTime(state, item),
|
|
592
610
|
actionText: locales.getText('page.booking.text.add-time'),
|
|
593
611
|
isMultipleResource: true,
|
|
@@ -595,8 +613,8 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
595
613
|
isErrorHolder: getIsSubjectRequire(state),
|
|
596
614
|
addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
|
|
597
615
|
holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
|
|
598
|
-
start_date: item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate,
|
|
599
|
-
end_date: (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date)
|
|
616
|
+
start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate : "",
|
|
617
|
+
end_date: !isNormalProduct ? (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date) : ""
|
|
600
618
|
}, parallelResourceOtherParams);
|
|
601
619
|
};
|
|
602
620
|
var calcAddTimeTotalPrice = function calcAddTimeTotalPrice(total, addTimeProducts) {
|
|
@@ -634,6 +652,7 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
634
652
|
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
635
653
|
}
|
|
636
654
|
var generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
|
|
655
|
+
console.log(isNormalProduct, 'isNormalProduct');
|
|
637
656
|
return _objectSpread(_objectSpread({
|
|
638
657
|
id: item === null || item === void 0 ? void 0 : item.id,
|
|
639
658
|
_id: item === null || item === void 0 ? void 0 : item._id,
|
|
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
|
95
95
|
if (renderType === 'eventBooking') {
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
|
-
var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285, 6124, 8727, 5538];
|
|
98
|
+
var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
|
|
99
99
|
return booking4Shops.includes(shopId);
|
|
100
100
|
};
|
|
101
101
|
function generateDateRange(start, end) {
|
|
@@ -30,9 +30,10 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
|
30
30
|
import { getProductDetail } from "../../../info/service/serve";
|
|
31
31
|
import { getIsBundleOrCombination } from "../../../info/utils";
|
|
32
32
|
import { getProductExtend } from "./utils";
|
|
33
|
-
import { formatProductListByCategory, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
|
|
33
|
+
import { formatProductListByCategory, getIsEject, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
|
|
34
34
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
35
35
|
import { useUpdateEffect } from 'ahooks';
|
|
36
|
+
import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
|
|
36
37
|
var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
|
|
37
38
|
var Info = function Info(props) {
|
|
38
39
|
var _state$client2, _state$service2, _state$service4, _state$service5;
|
|
@@ -241,7 +242,7 @@ var Info = function Info(props) {
|
|
|
241
242
|
var _state$client3;
|
|
242
243
|
var isSession = isSessionProduct(item);
|
|
243
244
|
// 是否有单规格 组合规格 套餐, 或者session商品 如果没有不需要打开弹窗
|
|
244
|
-
var isEject =
|
|
245
|
+
var isEject = getIsEject(item, type);
|
|
245
246
|
var lock = false;
|
|
246
247
|
state.action({
|
|
247
248
|
type: 'pisell1.handleOpenProductModal',
|
|
@@ -249,10 +250,11 @@ var Info = function Info(props) {
|
|
|
249
250
|
id: item.id,
|
|
250
251
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
251
252
|
showConfig: {
|
|
252
|
-
option:
|
|
253
|
+
option: true,
|
|
253
254
|
session: isSession,
|
|
254
|
-
variant:
|
|
255
|
-
package: true
|
|
255
|
+
variant: true,
|
|
256
|
+
package: true,
|
|
257
|
+
number: isNormalProductByDurationSchedule(item)
|
|
256
258
|
},
|
|
257
259
|
is_eject: isEject ? 1 : 0,
|
|
258
260
|
isOS: isSession,
|
|
@@ -278,13 +280,14 @@ var Info = function Info(props) {
|
|
|
278
280
|
_key: e.key,
|
|
279
281
|
_extend: {
|
|
280
282
|
start_date: state.date.value,
|
|
281
|
-
quantity: 1,
|
|
283
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
|
|
282
284
|
price: _detail.price,
|
|
283
285
|
product_name: item.title,
|
|
284
286
|
other: other
|
|
285
287
|
},
|
|
286
288
|
new: 1
|
|
287
289
|
});
|
|
290
|
+
console.log(cacheItem, 'cacheItem', e);
|
|
288
291
|
var _total = getProductTotalPrice(cacheItem);
|
|
289
292
|
// 用于折扣 可修改
|
|
290
293
|
cacheItem._extend.total = _total;
|
|
@@ -34,9 +34,10 @@ import { getErrorList } from "../../utilsByBooking";
|
|
|
34
34
|
import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
|
|
35
35
|
import { PisellAdjustPriceInputNumber } from '@pisell/materials';
|
|
36
36
|
import { editSessionProduct } from "../../../info/utils";
|
|
37
|
+
import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
|
|
37
38
|
var submitLock = false;
|
|
38
39
|
var Info = function Info(_, ref) {
|
|
39
|
-
var _state$bookingConfig2, _state$service$cacheI4, _state$service$cacheI5, _state$
|
|
40
|
+
var _state$service3, _state$bookingConfig2, _state$service$cacheI4, _state$service$cacheI5, _state$service6, _state$service8, _window$BaseMaterials, _state$service$cacheI6, _state$service9, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$bookingConfig3, _state$service$resour;
|
|
40
41
|
var _Form$useForm = Form.useForm(),
|
|
41
42
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
42
43
|
form = _Form$useForm2[0];
|
|
@@ -49,6 +50,10 @@ var Info = function Info(_, ref) {
|
|
|
49
50
|
dispatch = _useContext.dispatch;
|
|
50
51
|
var resourcesRef = useRef(null);
|
|
51
52
|
var isChangeTotal = useRef(false);
|
|
53
|
+
var isNormalProduct = useMemo(function () {
|
|
54
|
+
var _state$service, _state$service2;
|
|
55
|
+
return (state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.cacheItem) && isNormalProductByDurationSchedule(state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.cacheItem);
|
|
56
|
+
}, [state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.cacheItem]);
|
|
52
57
|
|
|
53
58
|
// 当前商品信息+ 表单信息
|
|
54
59
|
var getCurrentCacheItem = function getCurrentCacheItem(_cacheItem) {
|
|
@@ -205,7 +210,7 @@ var Info = function Info(_, ref) {
|
|
|
205
210
|
var onFinish = function onFinish(values) {
|
|
206
211
|
var _resourcesRef$current;
|
|
207
212
|
var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
|
|
208
|
-
if (!isSuccess) {
|
|
213
|
+
if (isShowTimeAndResource && !isSuccess) {
|
|
209
214
|
return;
|
|
210
215
|
}
|
|
211
216
|
// 防止多次提交, 增加锁
|
|
@@ -371,16 +376,16 @@ var Info = function Info(_, ref) {
|
|
|
371
376
|
getDiscount();
|
|
372
377
|
}, [useTotal, (_state$service$cacheI5 = state.service.cacheItem) === null || _state$service$cacheI5 === void 0 || (_state$service$cacheI5 = _state$service$cacheI5._extend) === null || _state$service$cacheI5 === void 0 ? void 0 : _state$service$cacheI5.origin_total]);
|
|
373
378
|
var isDiscount = useMemo(function () {
|
|
374
|
-
var _state$
|
|
375
|
-
if (!((_state$
|
|
379
|
+
var _state$service4, _state$service5;
|
|
380
|
+
if (!((_state$service4 = state.service) !== null && _state$service4 !== void 0 && _state$service4.cacheItem)) {
|
|
376
381
|
return false;
|
|
377
382
|
}
|
|
378
|
-
return useTotal != ((_state$
|
|
379
|
-
}, [useTotal, (_state$
|
|
383
|
+
return useTotal != ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 ? void 0 : _state$service5._extend.origin_total);
|
|
384
|
+
}, [useTotal, (_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.cacheItem) === null || _state$service6 === void 0 ? void 0 : _state$service6._extend.origin_total]);
|
|
380
385
|
var bundles = useMemo(function () {
|
|
381
|
-
var _state$
|
|
382
|
-
return ((_state$
|
|
383
|
-
}, [(_state$
|
|
386
|
+
var _state$service7;
|
|
387
|
+
return ((_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.other) === null || _state$service7 === void 0 ? void 0 : _state$service7.bundle) || [];
|
|
388
|
+
}, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.other) === null || _state$service8 === void 0 ? void 0 : _state$service8.bundle]);
|
|
384
389
|
|
|
385
390
|
/**
|
|
386
391
|
* @title: 编辑商品
|
|
@@ -415,14 +420,17 @@ var Info = function Info(_, ref) {
|
|
|
415
420
|
id: item.id,
|
|
416
421
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
417
422
|
showConfig: {
|
|
418
|
-
option:
|
|
423
|
+
option: true,
|
|
419
424
|
session: isSession,
|
|
420
|
-
variant:
|
|
421
|
-
package: true
|
|
425
|
+
variant: true,
|
|
426
|
+
package: true,
|
|
427
|
+
number: isNormalProductByDurationSchedule(item)
|
|
422
428
|
},
|
|
423
429
|
isOS: isSession,
|
|
424
430
|
customer_id: (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id,
|
|
425
|
-
value: _objectSpread(_objectSpread({
|
|
431
|
+
value: _objectSpread(_objectSpread({
|
|
432
|
+
quantity: item._extend.quantity
|
|
433
|
+
}, item._extend.other), sessionValue)
|
|
426
434
|
},
|
|
427
435
|
callback: function callback(e, extension_type, detail) {
|
|
428
436
|
var _cacheItem$_extend;
|
|
@@ -436,6 +444,7 @@ var Info = function Info(_, ref) {
|
|
|
436
444
|
_id: item === null || item === void 0 ? void 0 : item._id,
|
|
437
445
|
_key: e.key,
|
|
438
446
|
_extend: _objectSpread(_objectSpread(_objectSpread({}, item._extend), values), {}, {
|
|
447
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || (values === null || values === void 0 ? void 0 : values.quantity) || 1,
|
|
439
448
|
// 覆盖选择的规格和套餐
|
|
440
449
|
other: other
|
|
441
450
|
}),
|
|
@@ -477,7 +486,8 @@ var Info = function Info(_, ref) {
|
|
|
477
486
|
// 更新表单内的商品价格
|
|
478
487
|
form.setFieldsValue({
|
|
479
488
|
total: _total,
|
|
480
|
-
capacity: (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.capacity
|
|
489
|
+
capacity: (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.capacity,
|
|
490
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || (values === null || values === void 0 ? void 0 : values.quantity) || 1
|
|
481
491
|
});
|
|
482
492
|
}
|
|
483
493
|
});
|
|
@@ -515,7 +525,13 @@ var Info = function Info(_, ref) {
|
|
|
515
525
|
var handleTotalChange = function handleTotalChange(number) {
|
|
516
526
|
isChangeTotal.current = true;
|
|
517
527
|
};
|
|
518
|
-
|
|
528
|
+
var isShowTimeAndResource = useMemo(function () {
|
|
529
|
+
// 非活动预约 非普通商品时展示
|
|
530
|
+
if (state.renderType !== 'eventBooking' && !isNormalProduct) {
|
|
531
|
+
return true;
|
|
532
|
+
}
|
|
533
|
+
return false;
|
|
534
|
+
}, [state.renderType, isNormalProduct]);
|
|
519
535
|
var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
|
|
520
536
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
|
|
521
537
|
titleNoWrap: true
|
|
@@ -556,7 +572,7 @@ var Info = function Info(_, ref) {
|
|
|
556
572
|
className: "current-service-info-name-wrap"
|
|
557
573
|
}, /*#__PURE__*/React.createElement("div", {
|
|
558
574
|
className: "current-service-info-name"
|
|
559
|
-
}, ((_state$
|
|
575
|
+
}, ((_state$service9 = state.service) === null || _state$service9 === void 0 || (_state$service9 = _state$service9.cacheItem) === null || _state$service9 === void 0 || (_state$service9 = _state$service9._extend) === null || _state$service9 === void 0 ? void 0 : _state$service9.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
|
|
560
576
|
onClick: handleEdit
|
|
561
577
|
}, locales.getText('pisell2.text.edit')), !state.isBookingCreatePage && /*#__PURE__*/React.createElement(Button, {
|
|
562
578
|
onClick: handleChange
|
|
@@ -595,7 +611,7 @@ var Info = function Info(_, ref) {
|
|
|
595
611
|
name: "discount_reason"
|
|
596
612
|
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
597
613
|
size: "large"
|
|
598
|
-
}))) : null,
|
|
614
|
+
}))) : null, isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, {
|
|
599
615
|
span: 12
|
|
600
616
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
601
617
|
label: locales.getText('pisell2.text.start_time'),
|
|
@@ -644,7 +660,29 @@ var Info = function Info(_, ref) {
|
|
|
644
660
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
645
661
|
hidden: true,
|
|
646
662
|
name: "quantity"
|
|
647
|
-
}, /*#__PURE__*/React.createElement(InputNumber, null)))
|
|
663
|
+
}, /*#__PURE__*/React.createElement(InputNumber, null))), isNormalProduct && /*#__PURE__*/React.createElement(Col, {
|
|
664
|
+
span: 24
|
|
665
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
666
|
+
label: locales.getText('pisell2.text.quantity'),
|
|
667
|
+
name: "quantity",
|
|
668
|
+
rules: [{
|
|
669
|
+
required: true
|
|
670
|
+
}]
|
|
671
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
672
|
+
size: "large",
|
|
673
|
+
style: {
|
|
674
|
+
width: '100%'
|
|
675
|
+
},
|
|
676
|
+
min: 1,
|
|
677
|
+
max: 999999,
|
|
678
|
+
formatter: function formatter(value) {
|
|
679
|
+
if (value !== undefined) {
|
|
680
|
+
// 向下取整
|
|
681
|
+
return Math.floor(value);
|
|
682
|
+
}
|
|
683
|
+
return value;
|
|
684
|
+
}
|
|
685
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
648
686
|
className: "pisell-lowcode__booking-service-body-edit-footer"
|
|
649
687
|
}, /*#__PURE__*/React.createElement("div", {
|
|
650
688
|
className: "pisell-lowcode__booking-service-delete-wrap",
|
|
@@ -141,6 +141,7 @@ export declare const deleteCacheParams: () => void;
|
|
|
141
141
|
*/
|
|
142
142
|
export declare const getDays: (cacheItem: any, type: 'minutes' | 'days') => any;
|
|
143
143
|
export declare const isSessionProduct: (cacheItem: any) => boolean;
|
|
144
|
+
export declare const getIsEject: (item: any, type: 'select' | 'detail') => boolean;
|
|
144
145
|
/**
|
|
145
146
|
* @title: 创建一个服务商品
|
|
146
147
|
* @description:
|
|
@@ -635,6 +635,11 @@ export var getDays = function getDays(cacheItem, type) {
|
|
|
635
635
|
export var isSessionProduct = function isSessionProduct(cacheItem) {
|
|
636
636
|
return ['session_product', 'session_ticket'].includes(cacheItem.extension_type);
|
|
637
637
|
};
|
|
638
|
+
export var getIsEject = function getIsEject(item, type) {
|
|
639
|
+
var isSession = isSessionProduct(item);
|
|
640
|
+
// 是否有单规格 组合规格 套餐, 或者session商品 如果没有不需要打开弹窗
|
|
641
|
+
return type === 'detail' || item.bundle_group_count > 0 || item.option_group_count > 0 || item.is_variant > 0 || isSession;
|
|
642
|
+
};
|
|
638
643
|
|
|
639
644
|
/**
|
|
640
645
|
* @title: 创建一个服务商品
|