@pisell/private-materials 6.4.82 → 6.4.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +164 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- 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 +1 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/footer/amount.js +34 -48
- package/es/components/booking/components/footer/index.js +15 -3
- package/es/components/booking/components/footer/utils.js +60 -42
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +1 -3
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +1 -4
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/es/components/booking/info2/service/editNormalService/index.js +0 -6
- package/es/components/booking/info2/service/editService/index.js +6 -16
- package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/es/components/booking/info2/service/editService/utils.js +0 -66
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/checkout/PaymentModal.d.ts +13 -5
- package/es/components/checkout/PaymentModal.js +93 -149
- package/es/components/checkout/components/AmountSummary/index.less +5 -4
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/plugin.d.ts +2 -0
- package/es/components/checkout/plugin.js +303 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- 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/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/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/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- 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/pay/toC/model.d.ts +1 -9
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- 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/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +30 -35
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- 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/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.js +15 -29
- package/lib/components/booking/components/footer/index.js +15 -3
- package/lib/components/booking/components/footer/utils.js +26 -9
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +2 -4
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -2
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
- package/lib/components/booking/info2/service/editService/index.js +3 -12
- package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/lib/components/booking/info2/service/editService/utils.js +3 -40
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/checkout/PaymentModal.d.ts +13 -5
- package/lib/components/checkout/PaymentModal.js +92 -139
- package/lib/components/checkout/components/AmountSummary/index.less +5 -4
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/plugin.d.ts +2 -0
- package/lib/components/checkout/plugin.js +263 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- 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/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/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/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.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/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- 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/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +39 -34
- package/lowcode/payment-modal/meta.ts +135 -0
- package/package.json +3 -3
- package/es/components/checkout/PaymentPlugin.d.ts +0 -2
- package/es/components/checkout/PaymentPlugin.js +0 -199
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -2
- package/lib/components/checkout/PaymentPlugin.js +0 -181
|
@@ -35,7 +35,7 @@ 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 { formatOriginalPrice, formatProductBundle, formatProductOption, formatProductPrice, formatSellingPrice, getBundleDiscountList,
|
|
38
|
+
import { formatOriginalPrice, formatProductBundle, formatProductOption, formatProductPrice, formatSellingPrice, getBundleDiscountList, getMainProductSellingPrice, getSourceProductPrice } from "../components/footer/utils";
|
|
39
39
|
import { formatProductListByCategory, getIsEject, getIsOnlySession, getMainPrice, getProductTotalPrice, isSessionProduct, request } from "../utils";
|
|
40
40
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
41
41
|
import "./index.less";
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -605,8 +605,16 @@ var getDiscountAmount = function getDiscountAmount(discounts) {
|
|
|
605
605
|
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
606
606
|
*/
|
|
607
607
|
var getMainProductTotal = function getMainProductTotal(item) {
|
|
608
|
-
var
|
|
609
|
-
var total = new Decimal(
|
|
608
|
+
var _item$_extend$other2, _item$_extend$other3, _item$_extend$other5;
|
|
609
|
+
var total = new Decimal(item._extend.main_product_selling_price || item._extend.price || 0);
|
|
610
|
+
|
|
611
|
+
// 如果主商品没有main_product_selling_price 则通过discount_list计算
|
|
612
|
+
if (!item._extend.main_product_selling_price) {
|
|
613
|
+
// 主商品折扣金额
|
|
614
|
+
var discountAmount = getDiscountAmount(item.discount_list);
|
|
615
|
+
// 主商品总价 - 主商品折扣金额
|
|
616
|
+
total = total.minus(discountAmount);
|
|
617
|
+
}
|
|
610
618
|
|
|
611
619
|
// 单规格
|
|
612
620
|
if ((_item$_extend$other2 = item._extend.other) !== null && _item$_extend$other2 !== void 0 && _item$_extend$other2.option && Array.isArray((_item$_extend$other3 = item._extend.other) === null || _item$_extend$other3 === void 0 ? void 0 : _item$_extend$other3.option)) {
|
|
@@ -621,13 +629,13 @@ var getMainProductTotal = function getMainProductTotal(item) {
|
|
|
621
629
|
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
622
630
|
var bundleItem = _step8.value;
|
|
623
631
|
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
624
|
-
var
|
|
632
|
+
var _ref3, _bundleItem$bundle_se2;
|
|
625
633
|
// 子商品折扣金额
|
|
626
|
-
var
|
|
634
|
+
var _discountAmount = getDiscountAmount(bundleItem.discount_list);
|
|
627
635
|
// 子商品价格
|
|
628
|
-
var bundleItemPrice = new Decimal((
|
|
636
|
+
var bundleItemPrice = new Decimal((_ref3 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref3 !== void 0 ? _ref3 : 0);
|
|
629
637
|
// todo: 套餐子商品后不需要处理 子商品价格 - 子商品折扣金额
|
|
630
|
-
var bundleItemTotal = bundleItemPrice.minus(
|
|
638
|
+
var bundleItemTotal = bundleItemPrice.minus(_discountAmount);
|
|
631
639
|
total = total.add(bundleItemTotal);
|
|
632
640
|
}
|
|
633
641
|
}
|
|
@@ -829,11 +837,11 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
829
837
|
scheduleById: scheduleById || {},
|
|
830
838
|
ScheduleModule: ScheduleModule
|
|
831
839
|
})) {
|
|
832
|
-
var
|
|
840
|
+
var _ref4, _bundleItem$bundle_se3;
|
|
833
841
|
var _mainQuantity = item._extend.quantity || 1;
|
|
834
842
|
matchedItems.push({
|
|
835
843
|
isMain: false,
|
|
836
|
-
total: Number((
|
|
844
|
+
total: Number((_ref4 = (_bundleItem$bundle_se3 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se3 !== void 0 ? _bundleItem$bundle_se3 : bundleItem.price) !== null && _ref4 !== void 0 ? _ref4 : 0),
|
|
837
845
|
quantity: bundleItem.num || bundleItem.quantity || 1,
|
|
838
846
|
item: bundleItem,
|
|
839
847
|
mainQuantity: _mainQuantity // 子商品的mainQuantity是所属主商品的quantity
|
|
@@ -928,17 +936,10 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
928
936
|
|
|
929
937
|
// 追加进入的固定附加费总值
|
|
930
938
|
var fixedTotal = new Decimal(0);
|
|
931
|
-
// 追加到商品的附加费总值 用于追加抹平字段
|
|
932
|
-
var productTotalSurcharge = new Decimal(0);
|
|
933
939
|
if (matchedItems.length > 0) {
|
|
934
940
|
// 基于每个商品计算附加费:max(0, 商品价格) * rate + fixed
|
|
935
941
|
var configTotal = new Decimal(0);
|
|
936
942
|
|
|
937
|
-
// 计算固定附加费 - 只加一次
|
|
938
|
-
if (fixed && new Decimal(fixed).gt(0)) {
|
|
939
|
-
configTotal = configTotal.plus(fixed);
|
|
940
|
-
}
|
|
941
|
-
|
|
942
943
|
// 计算百分比附加费 - 对每个商品单独计算
|
|
943
944
|
if (percentage && new Decimal(percentage).gt(0) || fixed) {
|
|
944
945
|
var percentageRate = new Decimal(percentage);
|
|
@@ -956,7 +957,6 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
956
957
|
var addTimeTotal = new Decimal(_item4.addTimeTotal || 0);
|
|
957
958
|
// 单个商品总附加费
|
|
958
959
|
var itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
|
|
959
|
-
configTotal = configTotal.plus(itemTotalSurcharge);
|
|
960
960
|
|
|
961
961
|
// 单个商品单数量附加费
|
|
962
962
|
var itemSurcharge = itemPrice.times(percentageRate);
|
|
@@ -965,12 +965,10 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
965
965
|
var fixedSurcharge = new Decimal(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
|
|
966
966
|
var quantity = _item4.isMain ? _item4.quantity : _item4.quantity * _item4.mainQuantity;
|
|
967
967
|
fixedTotal = fixedTotal.plus(new Decimal(fixedSurcharge).times(quantity).toNumber());
|
|
968
|
-
|
|
969
968
|
// 如果是最后一个商品 判断fixed - fixedTotal 是否有剩余小数 如果有的话,追加抹平字段
|
|
970
969
|
if (isLast && fixedTotal.gt(0)) {
|
|
971
970
|
var remaining = new Decimal(fixed).minus(fixedTotal).toNumber();
|
|
972
971
|
if (remaining > 0) {
|
|
973
|
-
productTotalSurcharge = productTotalSurcharge.plus(remaining);
|
|
974
972
|
if (_item4.isMain) {
|
|
975
973
|
_item4.item._extend.surcharge_rounding_remainder = remaining;
|
|
976
974
|
} else {
|
|
@@ -985,34 +983,17 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
985
983
|
var _item4$item$_extend;
|
|
986
984
|
var originSurchargeFee = new Decimal(_item4.item._extend.surcharge_fee || 0);
|
|
987
985
|
// 保留两位小数
|
|
988
|
-
|
|
989
|
-
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(surchargeFee).times(itemQuantity).toNumber());
|
|
990
|
-
_item4.item._extend.surcharge_fee = surchargeFee;
|
|
986
|
+
_item4.item._extend.surcharge_fee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toNumber();
|
|
991
987
|
_item4.item._extend.relation_surcharge_ids = [].concat(_toConsumableArray(((_item4$item$_extend = _item4.item._extend) === null || _item4$item$_extend === void 0 ? void 0 : _item4$item$_extend.relation_surcharge_ids) || []), [id]);
|
|
992
988
|
} else {
|
|
993
989
|
var _item4$item;
|
|
994
990
|
var _originSurchargeFee = new Decimal(_item4.item.surcharge_fee || 0);
|
|
995
991
|
// 保留两位小数
|
|
996
|
-
|
|
997
|
-
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(_surchargeFee).times(itemQuantity).toNumber());
|
|
998
|
-
_item4.item.surcharge_fee = _surchargeFee;
|
|
992
|
+
_item4.item.surcharge_fee = _originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toNumber();
|
|
999
993
|
_item4.item.relation_surcharge_ids = [].concat(_toConsumableArray(((_item4$item = _item4.item) === null || _item4$item === void 0 ? void 0 : _item4$item.relation_surcharge_ids) || []), [id]);
|
|
1000
994
|
}
|
|
1001
995
|
}
|
|
1002
|
-
|
|
1003
|
-
if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
|
|
1004
|
-
// 四舍五入configTotal
|
|
1005
|
-
var configTotalRounded = configTotal.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
1006
|
-
if (_item4.isMain) {
|
|
1007
|
-
var newRoundingRemainder = new Decimal(_item4.item._extend.surcharge_rounding_remainder || 0);
|
|
1008
|
-
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
1009
|
-
_item4.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
1010
|
-
} else {
|
|
1011
|
-
var _newRoundingRemainder = new Decimal(_item4.item.surcharge_rounding_remainder || 0);
|
|
1012
|
-
_newRoundingRemainder = _newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
1013
|
-
_item4.item.surcharge_rounding_remainder = _newRoundingRemainder.toNumber();
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
996
|
+
configTotal = configTotal.plus(itemTotalSurcharge);
|
|
1016
997
|
}
|
|
1017
998
|
} catch (err) {
|
|
1018
999
|
_iterator18.e(err);
|
|
@@ -1021,6 +1002,11 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1021
1002
|
}
|
|
1022
1003
|
}
|
|
1023
1004
|
|
|
1005
|
+
// 计算固定附加费 - 只加一次
|
|
1006
|
+
if (fixed && new Decimal(fixed).gt(0)) {
|
|
1007
|
+
configTotal = configTotal.plus(fixed);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1024
1010
|
// 如果该配置有金额,则添加到结果中
|
|
1025
1011
|
finalAmount = configTotal.toDecimalPlaces(2, Decimal.ROUND_HALF_UP).toNumber();
|
|
1026
1012
|
}
|
|
@@ -1113,13 +1099,13 @@ export var getIsPriceIncludeTax = function getIsPriceIncludeTax(state) {
|
|
|
1113
1099
|
var _state$bookingDetail$, _state$bookingDetail6;
|
|
1114
1100
|
return (_state$bookingDetail$ = (_state$bookingDetail6 = state.bookingDetail) === null || _state$bookingDetail6 === void 0 ? void 0 : _state$bookingDetail6.is_price_include_tax) !== null && _state$bookingDetail$ !== void 0 ? _state$bookingDetail$ : 0;
|
|
1115
1101
|
};
|
|
1116
|
-
var getExpectAmount = function getExpectAmount(
|
|
1117
|
-
var price =
|
|
1118
|
-
tax =
|
|
1119
|
-
surchargeAmount =
|
|
1120
|
-
shopDiscount =
|
|
1121
|
-
state =
|
|
1122
|
-
options =
|
|
1102
|
+
var getExpectAmount = function getExpectAmount(_ref5) {
|
|
1103
|
+
var price = _ref5.price,
|
|
1104
|
+
tax = _ref5.tax,
|
|
1105
|
+
surchargeAmount = _ref5.surchargeAmount,
|
|
1106
|
+
shopDiscount = _ref5.shopDiscount,
|
|
1107
|
+
state = _ref5.state,
|
|
1108
|
+
options = _ref5.options;
|
|
1123
1109
|
var _tax = tax;
|
|
1124
1110
|
// 如果价格含税, 则将税费改为0
|
|
1125
1111
|
if (getIsPriceIncludeTax(state) || options !== null && options !== void 0 && options.is_price_include_tax) {
|
|
@@ -1141,9 +1127,9 @@ var getRoundingAmount = function getRoundingAmount(state) {
|
|
|
1141
1127
|
var _state$bookingDetail9;
|
|
1142
1128
|
return Number(state === null || state === void 0 || (_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.rounding_amount) || 0;
|
|
1143
1129
|
};
|
|
1144
|
-
var getSumTotalAmount = function getSumTotalAmount(
|
|
1145
|
-
var expectAmount =
|
|
1146
|
-
roundingAmount =
|
|
1130
|
+
var getSumTotalAmount = function getSumTotalAmount(_ref6) {
|
|
1131
|
+
var expectAmount = _ref6.expectAmount,
|
|
1132
|
+
roundingAmount = _ref6.roundingAmount;
|
|
1147
1133
|
return expectAmount + roundingAmount;
|
|
1148
1134
|
};
|
|
1149
1135
|
|
|
@@ -57,7 +57,7 @@ import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/use
|
|
|
57
57
|
* @Date: 2024-01-30 16:51
|
|
58
58
|
*/
|
|
59
59
|
var Footer = function Footer(props) {
|
|
60
|
-
var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4;
|
|
60
|
+
var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4, _state$bookingConfig7, _state$client3;
|
|
61
61
|
var state = props.state,
|
|
62
62
|
buttons = props.buttons,
|
|
63
63
|
dispatch = props.dispatch,
|
|
@@ -1941,8 +1941,20 @@ var Footer = function Footer(props) {
|
|
|
1941
1941
|
data: paymentModalData,
|
|
1942
1942
|
callback: paymentCallback || undefined,
|
|
1943
1943
|
setEditCartMode: setEditCartMode,
|
|
1944
|
-
state:
|
|
1945
|
-
|
|
1944
|
+
paymentResultDisplayMode: state === null || state === void 0 || (_state$bookingConfig7 = state.bookingConfig) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.config) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.payment_setting) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.payment_result_display_mode,
|
|
1945
|
+
shopDiscount: state.shop_discount,
|
|
1946
|
+
client: (_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.value,
|
|
1947
|
+
currentTotalPrice: total.productAmount,
|
|
1948
|
+
onChangeShopDiscount: function onChangeShopDiscount(discount) {
|
|
1949
|
+
dispatch({
|
|
1950
|
+
type: 'setState',
|
|
1951
|
+
payload: {
|
|
1952
|
+
shop_discount: discount
|
|
1953
|
+
}
|
|
1954
|
+
});
|
|
1955
|
+
},
|
|
1956
|
+
onChangeOrderNote: handleNoteConfirm,
|
|
1957
|
+
onDeleteOrderNote: handleNoteDelete,
|
|
1946
1958
|
onClose: function onClose(reset) {
|
|
1947
1959
|
// console.log('🔄 Footer: Closing PaymentModal');
|
|
1948
1960
|
setIsPaymentModalOpen(false);
|
|
@@ -17,7 +17,7 @@ import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
|
17
17
|
import { getDays } from "../../utils";
|
|
18
18
|
import { appointmentTypes } from "../../info/service2/status";
|
|
19
19
|
import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule, genRowKey } from "../../info/service2/utils";
|
|
20
|
-
import { isArr, locales, sendWarningLog, getUniqueId, isNumber
|
|
20
|
+
import { isArr, locales, sendWarningLog, getUniqueId, isNumber } from '@pisell/utils';
|
|
21
21
|
import { PisellToast } from '@pisell/materials';
|
|
22
22
|
import { getClientName } from "../../../../plus/clientName/utils";
|
|
23
23
|
import { cloneDeep } from 'lodash';
|
|
@@ -127,8 +127,8 @@ export var formatProductBundle = function formatProductBundle(bundle) {
|
|
|
127
127
|
"custom_price": (d === null || d === void 0 ? void 0 : d.custom_price) || Math.abs(new Decimal((d === null || d === void 0 ? void 0 : d.original_price) || (d === null || d === void 0 ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
|
|
128
128
|
"custom_price_type": d === null || d === void 0 ? void 0 : d.price_type,
|
|
129
129
|
"option": option,
|
|
130
|
-
"bundle_selling_price":
|
|
131
|
-
|
|
130
|
+
"bundle_selling_price": d === null || d === void 0 ? void 0 : d.price,
|
|
131
|
+
"bundle_sum_price": (d === null || d === void 0 ? void 0 : d.original_price) || (d === null || d === void 0 ? void 0 : d.original_total),
|
|
132
132
|
"metadata": {
|
|
133
133
|
custom_product_bundle_map_id: d._id,
|
|
134
134
|
// 子商品单数量附加费
|
|
@@ -152,6 +152,11 @@ export var getBundleDiscountList = function getBundleDiscountList(bundle) {
|
|
|
152
152
|
var discountList = [];
|
|
153
153
|
bundle.forEach(function (d) {
|
|
154
154
|
if (d.discount_list && isArr(d.discount_list)) {
|
|
155
|
+
d.discount_list.forEach(function (item) {
|
|
156
|
+
if (item !== null && item !== void 0 && item.id) {
|
|
157
|
+
item.order_discount_id = item.id;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
155
160
|
discountList.push.apply(discountList, _toConsumableArray(d.discount_list.filter(function (item) {
|
|
156
161
|
return !item.id;
|
|
157
162
|
})));
|
|
@@ -274,9 +279,9 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
274
279
|
* @Date: 2024-12-23 12:05
|
|
275
280
|
*/
|
|
276
281
|
export var formatProductPrice = function formatProductPrice(item) {
|
|
277
|
-
var _item$_extend6, _item$
|
|
282
|
+
var _item$_extend6, _item$_extend7, _item$variant;
|
|
278
283
|
var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
|
|
279
|
-
var price = Number((_item$
|
|
284
|
+
var price = Number((_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
|
|
280
285
|
|
|
281
286
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
282
287
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant = item.variant) === null || _item$variant === void 0 ? void 0 : _item$variant.length) > 0) {
|
|
@@ -341,7 +346,7 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
|
|
|
341
346
|
return metadata;
|
|
342
347
|
};
|
|
343
348
|
var formatProductMetadata = function formatProductMetadata(item) {
|
|
344
|
-
var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23;
|
|
349
|
+
var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23, _item$_extend25;
|
|
345
350
|
var metadata = {};
|
|
346
351
|
|
|
347
352
|
// 主商品+非原价(加减价)子商品附加费
|
|
@@ -367,6 +372,10 @@ var formatProductMetadata = function formatProductMetadata(item) {
|
|
|
367
372
|
var _item$_extend24;
|
|
368
373
|
metadata.relation_surcharge_ids = (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.relation_surcharge_ids;
|
|
369
374
|
}
|
|
375
|
+
if ((_item$_extend25 = item._extend) !== null && _item$_extend25 !== void 0 && _item$_extend25.unique_identification_number) {
|
|
376
|
+
var _item$_extend26;
|
|
377
|
+
metadata.unique_identification_number = (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.unique_identification_number;
|
|
378
|
+
}
|
|
370
379
|
return metadata;
|
|
371
380
|
};
|
|
372
381
|
|
|
@@ -386,9 +395,9 @@ var formatProductMetadata = function formatProductMetadata(item) {
|
|
|
386
395
|
|
|
387
396
|
// 获取商品价格 包含组合规格
|
|
388
397
|
export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
389
|
-
var _item$
|
|
390
|
-
var other = (_item$
|
|
391
|
-
var price = Number((_item$
|
|
398
|
+
var _item$_extend27, _item$_extend28, _item$variant2;
|
|
399
|
+
var other = (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.other;
|
|
400
|
+
var price = Number((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.price);
|
|
392
401
|
|
|
393
402
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
394
403
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
|
|
@@ -404,8 +413,8 @@ export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
|
404
413
|
|
|
405
414
|
// 获取主商品价格 要增加option
|
|
406
415
|
export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
|
|
407
|
-
var _item$
|
|
408
|
-
if (!isNumber((_item$
|
|
416
|
+
var _item$_extend29, _item$_extend$other, _item$_extend$other2, _item$_extend30;
|
|
417
|
+
if (!isNumber((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.main_product_selling_price)) {
|
|
409
418
|
return undefined;
|
|
410
419
|
}
|
|
411
420
|
var optionPrice = new Decimal(0);
|
|
@@ -418,7 +427,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
418
427
|
return accumulator.add(currentPrice.mul(currentNum));
|
|
419
428
|
}, optionPrice);
|
|
420
429
|
}
|
|
421
|
-
return new Decimal((_item$
|
|
430
|
+
return new Decimal((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.main_product_selling_price).add(optionPrice).toNumber();
|
|
422
431
|
};
|
|
423
432
|
|
|
424
433
|
/**
|
|
@@ -430,11 +439,18 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
430
439
|
* @Date: 2024-12-07 14:21
|
|
431
440
|
*/
|
|
432
441
|
var formatProducts = function formatProducts(item, quantity) {
|
|
433
|
-
var _item$
|
|
442
|
+
var _item$_extend31, _getMainProductSellin, _item$_extend32, _item$_extend33, _item$_extend34, _item$_extend35;
|
|
443
|
+
if (item !== null && item !== void 0 && item.discount_list) {
|
|
444
|
+
item === null || item === void 0 || item.discount_list.forEach(function (d) {
|
|
445
|
+
if (d !== null && d !== void 0 && d.id) {
|
|
446
|
+
d.order_discount_id = d.id;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
}
|
|
434
450
|
var total = Number(item._extend.total);
|
|
435
451
|
var origin_total = Number(item._extend.origin_total);
|
|
436
452
|
var discount_amount = origin_total - total;
|
|
437
|
-
var bundleDiscountList = getBundleDiscountList(((_item$
|
|
453
|
+
var bundleDiscountList = getBundleDiscountList(((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 || (_item$_extend31 = _item$_extend31.other) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.bundle) || []);
|
|
438
454
|
var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
|
|
439
455
|
discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
|
|
440
456
|
|
|
@@ -463,15 +479,15 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
463
479
|
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
464
480
|
"product_discount_reason": item._extend.discount_reason || '',
|
|
465
481
|
"is_charge_tax": item.is_charge_tax,
|
|
466
|
-
"note": ((_item$
|
|
482
|
+
"note": ((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.note) || '',
|
|
467
483
|
"discountway": item._extend.discountway || "num",
|
|
468
484
|
"discount_per": item._extend.discount_per,
|
|
469
485
|
"discount_type": item._extend.discount_type || discount_type,
|
|
470
486
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
471
|
-
"product_bundle": formatProductBundle((_item$
|
|
487
|
+
"product_bundle": formatProductBundle((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 || (_item$_extend33 = _item$_extend33.other) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.bundle),
|
|
472
488
|
"bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
|
|
473
|
-
"product_option_item": formatProductOption((_item$
|
|
474
|
-
"product_variant_id": ((_item$
|
|
489
|
+
"product_option_item": formatProductOption((_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 || (_item$_extend34 = _item$_extend34.other) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.option),
|
|
490
|
+
"product_variant_id": ((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 || (_item$_extend35 = _item$_extend35.other) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.product_variant_id) || 0,
|
|
475
491
|
"discount_list": notManualDiscount,
|
|
476
492
|
metadata: formatProductMetadata(item),
|
|
477
493
|
// checkout 需求新增字段
|
|
@@ -496,8 +512,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
496
512
|
|
|
497
513
|
// 过滤出卡片中的普通商品
|
|
498
514
|
var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
|
|
499
|
-
var _item$
|
|
500
|
-
var holderId = (_item$
|
|
515
|
+
var _item$_extend36;
|
|
516
|
+
var holderId = (_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.holder_id;
|
|
501
517
|
var bookingHolderId = booking_item._extend.holder_id;
|
|
502
518
|
var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
|
|
503
519
|
return holderId && holderId === bookingHolderId && !isDayBookingProduct;
|
|
@@ -523,15 +539,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
|
|
|
523
539
|
|
|
524
540
|
// 找出预约商品
|
|
525
541
|
list = list.filter(function (item) {
|
|
526
|
-
var _item$
|
|
527
|
-
return ((_item$
|
|
542
|
+
var _item$_extend37;
|
|
543
|
+
return ((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.holder_id) && !isNormalProductByDurationSchedule(item);
|
|
528
544
|
});
|
|
529
545
|
|
|
530
546
|
// 对预约商品列表根据holder_id进行分组
|
|
531
547
|
var groupMap = new Map();
|
|
532
548
|
list.forEach(function (item) {
|
|
533
|
-
var _item$
|
|
534
|
-
var key = (_item$
|
|
549
|
+
var _item$_extend38;
|
|
550
|
+
var key = (_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.holder_id; // 分组键
|
|
535
551
|
if (!groupMap.has(key)) {
|
|
536
552
|
groupMap.set(key, []);
|
|
537
553
|
}
|
|
@@ -593,7 +609,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
593
609
|
var bookings = [];
|
|
594
610
|
var obj = {};
|
|
595
611
|
list.forEach(function (item) {
|
|
596
|
-
var _item$
|
|
612
|
+
var _item$_extend43, _item$_extend44;
|
|
597
613
|
// 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
|
|
598
614
|
if (item.isCustomItem) {
|
|
599
615
|
bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
|
|
@@ -614,9 +630,9 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
614
630
|
|
|
615
631
|
// 跨日预约下的普通商品
|
|
616
632
|
if (isDay) {
|
|
617
|
-
var _item$
|
|
618
|
-
var startDate = ((_item$
|
|
619
|
-
var endDate = ((_item$
|
|
633
|
+
var _item$_extend39, _item$_extend40, _item$_extend41, _item$_extend42;
|
|
634
|
+
var startDate = ((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.startDate) || ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.start_date);
|
|
635
|
+
var endDate = ((_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.endDate) || ((_item$_extend42 = item._extend) === null || _item$_extend42 === void 0 ? void 0 : _item$_extend42.end_date);
|
|
620
636
|
var _formatDayTime = formatDayTime({
|
|
621
637
|
startDate: startDate,
|
|
622
638
|
endDate: endDate
|
|
@@ -642,12 +658,14 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
642
658
|
// 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
|
|
643
659
|
// 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
|
|
644
660
|
// 后续出现不需要设置 metadata.multiDayPrices. 节省体积
|
|
645
|
-
var isSetGroupId = obj[item === null || item === void 0 || (_item$
|
|
646
|
-
if (!((_item$
|
|
661
|
+
var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.groupId];
|
|
662
|
+
if (!((_item$_extend44 = item._extend) !== null && _item$_extend44 !== void 0 && _item$_extend44.unique_identification_number)) {
|
|
647
663
|
var unique_identification_number = getUniqueId();
|
|
648
664
|
item._extend.unique_identification_number = unique_identification_number;
|
|
649
665
|
}
|
|
666
|
+
debugger;
|
|
650
667
|
var booking = _objectSpread(_objectSpread({
|
|
668
|
+
schedule_event_id: item === null || item === void 0 ? void 0 : item.booking_id,
|
|
651
669
|
product: formatProducts(item),
|
|
652
670
|
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
653
671
|
id: item.booking_id || 0,
|
|
@@ -720,16 +738,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
|
|
|
720
738
|
var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
|
|
721
739
|
// open items 下的商品
|
|
722
740
|
list = list.filter(function (item) {
|
|
723
|
-
var _item$
|
|
741
|
+
var _item$_extend45;
|
|
724
742
|
return (
|
|
725
743
|
// 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
|
|
726
|
-
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$
|
|
744
|
+
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend45 = item._extend) === null || _item$_extend45 === void 0 ? void 0 : _item$_extend45.holder_id) && appointmentTypes.includes(item.extension_type)
|
|
727
745
|
);
|
|
728
746
|
});
|
|
729
747
|
var relationProducts = [];
|
|
730
748
|
relationProducts = list.map(function (item) {
|
|
731
|
-
var _item$
|
|
732
|
-
if (!((_item$
|
|
749
|
+
var _item$_extend46;
|
|
750
|
+
if (!((_item$_extend46 = item._extend) !== null && _item$_extend46 !== void 0 && _item$_extend46.unique_identification_number)) {
|
|
733
751
|
var unique_identification_number = getUniqueId();
|
|
734
752
|
item._extend.unique_identification_number = unique_identification_number;
|
|
735
753
|
}
|
|
@@ -748,8 +766,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
748
766
|
});
|
|
749
767
|
var relationProducts = [];
|
|
750
768
|
relationProducts = list.map(function (item) {
|
|
751
|
-
var _item$
|
|
752
|
-
if (!((_item$
|
|
769
|
+
var _item$_extend47;
|
|
770
|
+
if (!((_item$_extend47 = item._extend) !== null && _item$_extend47 !== void 0 && _item$_extend47.unique_identification_number)) {
|
|
753
771
|
var unique_identification_number = getUniqueId();
|
|
754
772
|
item._extend.unique_identification_number = unique_identification_number;
|
|
755
773
|
}
|
|
@@ -870,19 +888,19 @@ export var checkHolderIsError = function checkHolderIsError(state) {
|
|
|
870
888
|
var _state$client;
|
|
871
889
|
var errorRowKey = '';
|
|
872
890
|
var holderError = state.service.value.some(function (item) {
|
|
873
|
-
var _item$
|
|
891
|
+
var _item$_extend49;
|
|
874
892
|
// 普通商品不需要检测holder
|
|
875
893
|
if (isNormalProductByDurationSchedule(item)) {
|
|
876
894
|
return false;
|
|
877
895
|
}
|
|
878
896
|
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
879
|
-
var _item$
|
|
880
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$
|
|
897
|
+
var _item$_extend48;
|
|
898
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend48 = item._extend) === null || _item$_extend48 === void 0 || (_item$_extend48 = _item$_extend48.other) === null || _item$_extend48 === void 0 ? void 0 : _item$_extend48.rowKey);
|
|
881
899
|
return true;
|
|
882
900
|
}
|
|
883
|
-
if (item._extend.quantity > 1 && ((_item$
|
|
884
|
-
var _item$
|
|
885
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$
|
|
901
|
+
if (item._extend.quantity > 1 && ((_item$_extend49 = item._extend) === null || _item$_extend49 === void 0 || (_item$_extend49 = _item$_extend49.holder_id) === null || _item$_extend49 === void 0 ? void 0 : _item$_extend49.length) !== item._extend.quantity) {
|
|
902
|
+
var _item$_extend50;
|
|
903
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend50 = item._extend) === null || _item$_extend50 === void 0 || (_item$_extend50 = _item$_extend50.other) === null || _item$_extend50 === void 0 ? void 0 : _item$_extend50.rowKey);
|
|
886
904
|
return true;
|
|
887
905
|
}
|
|
888
906
|
return false;
|
|
@@ -70,8 +70,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
70
70
|
var shopDiscount = useShopDiscountModule();
|
|
71
71
|
var _useActiveExecute = useActiveExecute(),
|
|
72
72
|
executeIfActive = _useActiveExecute.executeIfActive;
|
|
73
|
-
var stateRef = useRef(state);
|
|
74
|
-
stateRef.current = state;
|
|
75
73
|
services = state.service;
|
|
76
74
|
|
|
77
75
|
// 将选中的客户数据传递给状态管理
|
|
@@ -171,7 +169,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
171
169
|
return;
|
|
172
170
|
}
|
|
173
171
|
if (isBooking4Shop) {
|
|
174
|
-
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(
|
|
172
|
+
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
|
|
175
173
|
console.log('input: ', state.service.value);
|
|
176
174
|
console.log('output: ', val);
|
|
177
175
|
productListToValue(val.productList);
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SendModalValues } from './index';
|
|
3
2
|
declare const useSendModal: (bookingId?: number) => {
|
|
4
3
|
open: boolean;
|
|
5
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
6
5
|
handleOpen: () => void;
|
|
7
6
|
handleValuesChange: (val: any) => void;
|
|
8
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
9
8
|
};
|
|
10
9
|
export default useSendModal;
|