@pisell/private-materials 6.7.4 → 6.7.6
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/booking/addons/index.js +25 -17
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +548 -84
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +77 -56
- package/es/components/booking/components/footer/utils.d.ts +19 -0
- package/es/components/booking/components/footer/utils.js +153 -54
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +23 -7
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +2 -1
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.js +4 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +30 -6
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +2 -3
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/editNormalService/index.js +6 -0
- package/es/components/booking/info2/service/editService/index.js +16 -6
- package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/es/components/booking/info2/service/editService/utils.js +66 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +3 -2
- package/es/components/booking/utils.js +16 -3
- package/es/components/checkout/PaymentModal.d.ts +7 -5
- package/es/components/checkout/PaymentModal.js +257 -213
- package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/es/components/checkout/components/AdditionalModule/index.js +52 -12
- package/es/components/checkout/components/AmountSummary/index.js +9 -76
- package/es/components/checkout/components/AmountSummary/index.less +5 -6
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +6 -0
- package/es/components/checkout/locales.js +6 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/payo/config.js +70 -32
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/payo/payment.js +579 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/utils/log/index.js +371 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/list/List.js +56 -40
- package/es/components/list/hooks/useListState.d.ts +5 -3
- package/es/components/list/hooks/useListState.js +17 -2
- package/es/components/list/styles/header.less +3 -3
- package/es/components/list/utils/index.d.ts +13 -1
- package/es/components/list/utils/index.js +43 -1
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/Card/index.d.ts +1 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Footer.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/index.js +7 -4
- package/es/components/pay/toC/locales.d.ts +3 -0
- package/es/components/pay/toC/locales.js +6 -3
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/subTotal/index.js +1 -1
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
- package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SectionList.js +174 -0
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
- package/es/components/systemSettings/registry/components/index.d.ts +4 -0
- package/es/components/systemSettings/registry/components/index.js +4 -0
- package/es/components/systemSettings/registry/index.d.ts +5 -0
- package/es/components/systemSettings/registry/index.js +1059 -0
- package/es/components/systemSettings/registry/index.less +410 -0
- package/es/components/systemSettings/registry/locales.d.ts +272 -0
- package/es/components/systemSettings/registry/locales.js +300 -0
- package/es/components/systemSettings/registry/services.d.ts +77 -0
- package/es/components/systemSettings/registry/services.js +472 -0
- package/es/components/systemSettings/registry/types.d.ts +126 -0
- package/es/components/systemSettings/registry/types.js +1 -0
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
- package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/es/components/systemSettings/registry/utils/validators.js +44 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +33 -2
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +139 -36
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +112 -7
- package/es/components/ticketBooking/components/timeBar/index.less +59 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +6 -0
- package/es/components/ticketBooking/locales.js +9 -3
- package/es/components/ticketBooking/utils/index.d.ts +4 -1
- package/es/components/ticketBooking/utils/index.js +36 -13
- package/es/components/wallet/Detail/index.js +34 -2
- package/es/components/wallet/Detail/index.less +11 -0
- package/es/components/wallet/Detail/locales.d.ts +6 -0
- package/es/components/wallet/Detail/locales.js +14 -2
- 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/index.js +11 -10
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/components/WalletCard.js +5 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/index.js +4 -2
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/wallet/serve.d.ts +7 -0
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/wallet/utils.js +342 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/es/plus/noteModal/AddTempModal.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/plus/walletPassGallery/index.d.ts +1 -0
- package/es/plus/walletPassGallery/index.js +7 -3
- package/es/plus/walletPassGallery/serve.d.ts +3 -0
- package/es/plus/walletPassGallery/serve.js +4 -2
- package/es/pro/Login2.0/index.less +15 -8
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +2 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
- package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/booking/addons/index.js +15 -7
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +293 -41
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +30 -11
- package/lib/components/booking/components/footer/utils.d.ts +19 -0
- package/lib/components/booking/components/footer/utils.js +98 -22
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +25 -9
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +2 -1
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.js +2 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +25 -5
- package/lib/components/booking/info2/index.js +7 -2
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
- package/lib/components/booking/info2/service/editService/index.js +12 -3
- package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/lib/components/booking/info2/service/editService/utils.js +40 -3
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +3 -2
- package/lib/components/booking/utils.js +11 -0
- package/lib/components/checkout/PaymentModal.d.ts +7 -5
- package/lib/components/checkout/PaymentModal.js +171 -135
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
- package/lib/components/checkout/components/AmountSummary/index.js +5 -46
- package/lib/components/checkout/components/AmountSummary/index.less +5 -6
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +6 -0
- package/lib/components/checkout/locales.js +6 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.js +98 -73
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/payo/payment.js +357 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/utils/log/index.js +294 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/list/List.js +34 -16
- package/lib/components/list/hooks/useListState.d.ts +5 -3
- package/lib/components/list/hooks/useListState.js +14 -1
- package/lib/components/list/styles/header.less +3 -3
- package/lib/components/list/utils/index.d.ts +13 -1
- package/lib/components/list/utils/index.js +27 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Card/index.d.ts +1 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Footer.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/index.js +4 -1
- package/lib/components/pay/toC/locales.d.ts +3 -0
- package/lib/components/pay/toC/locales.js +6 -3
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
- package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/index.js +48 -0
- package/lib/components/systemSettings/registry/index.d.ts +5 -0
- package/lib/components/systemSettings/registry/index.js +529 -0
- package/lib/components/systemSettings/registry/index.less +410 -0
- package/lib/components/systemSettings/registry/locales.d.ts +272 -0
- package/lib/components/systemSettings/registry/locales.js +324 -0
- package/lib/components/systemSettings/registry/services.d.ts +77 -0
- package/lib/components/systemSettings/registry/services.js +290 -0
- package/lib/components/systemSettings/registry/types.d.ts +126 -0
- package/lib/components/systemSettings/registry/types.js +17 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
- package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/lib/components/systemSettings/registry/utils/validators.js +54 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +33 -2
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +84 -24
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
- package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +6 -0
- package/lib/components/ticketBooking/locales.js +9 -3
- package/lib/components/ticketBooking/utils/index.d.ts +4 -1
- package/lib/components/ticketBooking/utils/index.js +20 -6
- package/lib/components/wallet/Detail/index.js +31 -3
- package/lib/components/wallet/Detail/index.less +11 -0
- package/lib/components/wallet/Detail/locales.d.ts +6 -0
- package/lib/components/wallet/Detail/locales.js +14 -2
- 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/index.js +8 -8
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/components/WalletCard.js +4 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/wallet/serve.d.ts +7 -0
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/wallet/utils.js +287 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/lib/plus/noteModal/AddTempModal.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/index.js +7 -3
- package/lib/plus/walletPassGallery/serve.d.ts +3 -0
- package/lib/plus/walletPassGallery/serve.js +3 -2
- package/lib/pro/Login2.0/index.less +15 -8
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +2 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/lowcode/settings-registry/meta.ts +29 -0
- package/lowcode/wallet-pass-detail/meta.ts +89 -0
- package/package.json +4 -4
- package/es/components/checkout/PaymentPlugin.d.ts +0 -2
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -2
- package/lib/components/checkout/PaymentPlugin.js +0 -181
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -34,7 +42,7 @@ export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_d
|
|
|
34
42
|
* @param state
|
|
35
43
|
* @returns
|
|
36
44
|
*/
|
|
37
|
-
var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
|
|
45
|
+
var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOriginTotal) {
|
|
38
46
|
var price = new Decimal(0);
|
|
39
47
|
var duration = new Decimal(0);
|
|
40
48
|
// 是否是跨日预约
|
|
@@ -54,7 +62,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
|
|
|
54
62
|
if (isDay || isNormalProductByDurationSchedule(item)) {
|
|
55
63
|
var quantity = new Decimal(item._extend.quantity || 1);
|
|
56
64
|
var itemTotal = new Decimal(item._extend.total || 0);
|
|
57
|
-
|
|
65
|
+
var itemOriginTotal = new Decimal(item._extend.origin_total || 0);
|
|
66
|
+
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
58
67
|
|
|
59
68
|
// 普通商品不能加到时长上
|
|
60
69
|
var _duration = isDayBookingProduct(item, state) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
|
|
@@ -62,7 +71,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
|
|
|
62
71
|
} else {
|
|
63
72
|
var _quantity = new Decimal(item._extend.quantity || 1);
|
|
64
73
|
var _itemTotal = new Decimal(item._extend.total || 0);
|
|
65
|
-
|
|
74
|
+
var _itemOriginTotal = new Decimal(item._extend.origin_total || 0);
|
|
75
|
+
price = price.add((isOriginTotal ? _itemOriginTotal : _itemTotal).mul(_quantity));
|
|
66
76
|
|
|
67
77
|
// 附加商品
|
|
68
78
|
var relationTotal = new Decimal(getRelationDetailsTotal(item._extend.relation_details || []));
|
|
@@ -87,7 +97,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
|
|
|
87
97
|
var _item = _step3.value;
|
|
88
98
|
var _quantity2 = new Decimal(_item._extend.quantity || 1);
|
|
89
99
|
var _itemTotal2 = new Decimal(_item._extend.total || 0);
|
|
90
|
-
|
|
100
|
+
var _itemOriginTotal2 = new Decimal(_item._extend.origin_total || 0);
|
|
101
|
+
price = price.add((isOriginTotal ? _itemOriginTotal2 : _itemTotal2).mul(_quantity2));
|
|
91
102
|
}
|
|
92
103
|
} catch (err) {
|
|
93
104
|
_iterator3.e(err);
|
|
@@ -164,7 +175,52 @@ var getProductItemTax = function getProductItemTax(item, state, options) {
|
|
|
164
175
|
}
|
|
165
176
|
|
|
166
177
|
// 结果 = 单个商品税费 × 数量
|
|
167
|
-
return singleItemTax.times(quantity);
|
|
178
|
+
return singleItemTax.times(quantity).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 计算商品附加费 包含子商品的总附加费
|
|
183
|
+
*/
|
|
184
|
+
var getProductSurchargeFee = function getProductSurchargeFee(product) {
|
|
185
|
+
var _extend = product._extend;
|
|
186
|
+
if (!_extend) {
|
|
187
|
+
return 0;
|
|
188
|
+
}
|
|
189
|
+
var surcharge_fee = _extend.surcharge_fee,
|
|
190
|
+
relation_details = _extend.relation_details,
|
|
191
|
+
other = _extend.other,
|
|
192
|
+
surcharge_rounding_remainder = _extend.surcharge_rounding_remainder;
|
|
193
|
+
var totalSurchargeFee = new Decimal(0);
|
|
194
|
+
if (surcharge_fee) {
|
|
195
|
+
totalSurchargeFee = totalSurchargeFee.plus(surcharge_fee);
|
|
196
|
+
}
|
|
197
|
+
if (surcharge_rounding_remainder) {
|
|
198
|
+
totalSurchargeFee = totalSurchargeFee.plus(surcharge_rounding_remainder);
|
|
199
|
+
}
|
|
200
|
+
if (relation_details) {
|
|
201
|
+
var _iterator4 = _createForOfIteratorHelper(relation_details),
|
|
202
|
+
_step4;
|
|
203
|
+
try {
|
|
204
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
205
|
+
var item = _step4.value;
|
|
206
|
+
totalSurchargeFee = totalSurchargeFee.plus(getProductSurchargeFee(item));
|
|
207
|
+
}
|
|
208
|
+
} catch (err) {
|
|
209
|
+
_iterator4.e(err);
|
|
210
|
+
} finally {
|
|
211
|
+
_iterator4.f();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (other !== null && other !== void 0 && other.bundle) {
|
|
215
|
+
totalSurchargeFee = totalSurchargeFee.plus(other.bundle.reduce(function (total, item) {
|
|
216
|
+
var surchargeFee = new Decimal(item.surcharge_fee || 0).times(item.num || item.quantity || 1);
|
|
217
|
+
if (item.surcharge_rounding_remainder) {
|
|
218
|
+
surchargeFee = surchargeFee.plus(item.surcharge_rounding_remainder);
|
|
219
|
+
}
|
|
220
|
+
return total.plus(surchargeFee);
|
|
221
|
+
}, new Decimal(0)));
|
|
222
|
+
}
|
|
223
|
+
return totalSurchargeFee.toNumber();
|
|
168
224
|
};
|
|
169
225
|
|
|
170
226
|
/**
|
|
@@ -183,17 +239,21 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
183
239
|
productExpectAmount = computed.productExpectAmount;
|
|
184
240
|
var originTax = new Decimal(0);
|
|
185
241
|
var tax = new Decimal(0);
|
|
186
|
-
var
|
|
187
|
-
|
|
242
|
+
var _iterator5 = _createForOfIteratorHelper(items),
|
|
243
|
+
_step5;
|
|
188
244
|
try {
|
|
189
|
-
for (
|
|
190
|
-
var
|
|
245
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
246
|
+
var _item$_extend, _item$_extend2, _item$_extend$other;
|
|
247
|
+
var item = _step5.value;
|
|
191
248
|
var quantity = new Decimal(item._extend.quantity || 1);
|
|
192
249
|
var unitPrice = new Decimal(item._extend.total || 0);
|
|
250
|
+
var mainProductPrice = new Decimal(getMainProductTotal(item) || 0);
|
|
251
|
+
|
|
252
|
+
// const surchargeFee = getProductSurchargeFee(item);
|
|
193
253
|
|
|
194
254
|
// 计算原始税费(折扣前)- 单个商品
|
|
195
255
|
var originalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
196
|
-
total:
|
|
256
|
+
total: mainProductPrice.add(((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.surcharge_fee) || 0).toNumber(),
|
|
197
257
|
quantity: 1
|
|
198
258
|
}), state, {
|
|
199
259
|
tax_rate: tax_rate,
|
|
@@ -206,12 +266,31 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
206
266
|
itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
207
267
|
}
|
|
208
268
|
|
|
209
|
-
// 商品折后单价 = 商品单价 - 商品折后单价
|
|
210
|
-
|
|
269
|
+
// // 商品折后单价 = 商品单价 - 商品折后单价
|
|
270
|
+
// const itemDiscountedUnitPrice = unitPrice.minus(itemDiscount).add(surchargeFee);
|
|
271
|
+
|
|
272
|
+
// // 计算折后税费(折扣后)- 单个商品 加子商品的税费
|
|
273
|
+
// const discountedTaxPerItem = getProductItemTax(
|
|
274
|
+
// {
|
|
275
|
+
// ...item,
|
|
276
|
+
// total: itemDiscountedUnitPrice.toNumber(),
|
|
277
|
+
// price: item._extend.total,
|
|
278
|
+
// quantity: 1,
|
|
279
|
+
// },
|
|
280
|
+
// state,
|
|
281
|
+
// { tax_rate, is_price_include_tax }
|
|
282
|
+
// );
|
|
211
283
|
|
|
212
|
-
//
|
|
213
|
-
var
|
|
214
|
-
|
|
284
|
+
// 按比例计算主商品应分摊的折扣
|
|
285
|
+
var mainItemDiscount = new Decimal(0);
|
|
286
|
+
if (unitPrice.greaterThan(0)) {
|
|
287
|
+
mainItemDiscount = mainProductPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
288
|
+
}
|
|
289
|
+
var mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.surcharge_fee) || 0);
|
|
290
|
+
|
|
291
|
+
// 计算折后税费(折扣后)- 主商品的税费
|
|
292
|
+
var maxDiscountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
293
|
+
total: mainItemDiscountedUnitPrice.toNumber(),
|
|
215
294
|
price: item._extend.total,
|
|
216
295
|
quantity: 1
|
|
217
296
|
}), state, {
|
|
@@ -219,18 +298,20 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
219
298
|
is_price_include_tax: is_price_include_tax
|
|
220
299
|
});
|
|
221
300
|
|
|
222
|
-
//
|
|
223
|
-
|
|
224
|
-
item._extend.
|
|
301
|
+
// item._extend.payment_price = itemDiscountedUnitPrice;
|
|
302
|
+
// 保存到商品扩展信息中(保留两位小数)
|
|
303
|
+
// item._extend.original_tax_fee = originalTaxPerItem.toNumber();
|
|
304
|
+
// item._extend.tax_fee = discountedTaxPerItem.toNumber();
|
|
305
|
+
item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItem.toNumber();
|
|
225
306
|
|
|
226
307
|
// 注意:加时商品独立计算,不考虑主商品数量
|
|
227
308
|
var addTimeTotalTax = new Decimal(0);
|
|
228
309
|
if (Array.isArray(item._extend.relation_details)) {
|
|
229
|
-
var
|
|
230
|
-
|
|
310
|
+
var _iterator6 = _createForOfIteratorHelper(item._extend.relation_details),
|
|
311
|
+
_step6;
|
|
231
312
|
try {
|
|
232
|
-
for (
|
|
233
|
-
var atItem =
|
|
313
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
314
|
+
var atItem = _step6.value;
|
|
234
315
|
// 计算单件加时商品折扣后价格
|
|
235
316
|
var _originTotal = new Decimal(atItem.selling_price || atItem.price || 0);
|
|
236
317
|
var _discountedTotal = _originTotal;
|
|
@@ -238,8 +319,7 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
238
319
|
_discountedTotal = _originTotal.minus(_originTotal.dividedBy(productExpectAmount).times(shopDiscount));
|
|
239
320
|
}
|
|
240
321
|
var addTimeTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, atItem), {}, {
|
|
241
|
-
total: _discountedTotal,
|
|
242
|
-
// 可能包含原有数据,或前端临时数据
|
|
322
|
+
total: _discountedTotal.add((atItem === null || atItem === void 0 ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
|
|
243
323
|
quantity: atItem.product_quantity || atItem.num || 1
|
|
244
324
|
}), state, {
|
|
245
325
|
tax_rate: tax_rate,
|
|
@@ -248,20 +328,84 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
248
328
|
addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
|
|
249
329
|
}
|
|
250
330
|
} catch (err) {
|
|
251
|
-
|
|
331
|
+
_iterator6.e(err);
|
|
252
332
|
} finally {
|
|
253
|
-
|
|
333
|
+
_iterator6.f();
|
|
254
334
|
}
|
|
255
335
|
}
|
|
256
336
|
|
|
337
|
+
// 处理 bundle 子商品(仅原价子商品)
|
|
338
|
+
var bundleTotalOriginTax = new Decimal(0);
|
|
339
|
+
var bundleTotalTax = new Decimal(0);
|
|
340
|
+
if (Array.isArray((_item$_extend$other = item._extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle)) {
|
|
341
|
+
var _iterator7 = _createForOfIteratorHelper(item._extend.other.bundle),
|
|
342
|
+
_step7;
|
|
343
|
+
try {
|
|
344
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
345
|
+
var bundleItem = _step7.value;
|
|
346
|
+
// 只处理原价的子商品
|
|
347
|
+
if (getBundleItemIsOriginalPrice(bundleItem)) {
|
|
348
|
+
var _ref2, _bundleItem$bundle_se;
|
|
349
|
+
var bundleQuantity = new Decimal(bundleItem.quantity || 1);
|
|
350
|
+
var bundleUnitPrice = new Decimal((_ref2 = (_bundleItem$bundle_se = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se !== void 0 ? _bundleItem$bundle_se : bundleItem.price) !== null && _ref2 !== void 0 ? _ref2 : 0);
|
|
351
|
+
|
|
352
|
+
// 计算原始税费(折扣前)- 单个商品
|
|
353
|
+
var bundleOriginalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
354
|
+
total: bundleUnitPrice.add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
|
|
355
|
+
quantity: 1
|
|
356
|
+
}), state, {
|
|
357
|
+
tax_rate: tax_rate,
|
|
358
|
+
is_price_include_tax: is_price_include_tax
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
// 计算平摊到该bundle商品的折扣
|
|
362
|
+
var bundleItemDiscount = new Decimal(0);
|
|
363
|
+
if (productExpectAmount > 0) {
|
|
364
|
+
bundleItemDiscount = bundleUnitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// bundle商品折后单价
|
|
368
|
+
var bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0);
|
|
369
|
+
|
|
370
|
+
// 计算折后税费(折扣后)- 单个商品
|
|
371
|
+
var bundleDiscountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
372
|
+
total: bundleDiscountedUnitPrice.toNumber(),
|
|
373
|
+
quantity: 1
|
|
374
|
+
}), state, {
|
|
375
|
+
tax_rate: tax_rate,
|
|
376
|
+
is_price_include_tax: is_price_include_tax
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// bundle商品折后单价
|
|
380
|
+
// bundleItem.bundle_payment_price = bundleDiscountedUnitPrice;
|
|
381
|
+
// 保存到bundle商品上(单个商品的税费,保留两位小数)
|
|
382
|
+
bundleItem.original_tax_fee = new Decimal(bundleOriginalTaxPerItem).toNumber();
|
|
383
|
+
bundleItem.tax_fee = new Decimal(bundleDiscountedTaxPerItem).toNumber();
|
|
384
|
+
|
|
385
|
+
// 累加bundle税费(需要乘以bundle数量和主商品数量)
|
|
386
|
+
bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
|
|
387
|
+
bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
} catch (err) {
|
|
391
|
+
_iterator7.e(err);
|
|
392
|
+
} finally {
|
|
393
|
+
_iterator7.f();
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
var original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
|
|
397
|
+
var tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
|
|
398
|
+
item._extend.original_tax_fee = original_tax_fee.toNumber();
|
|
399
|
+
item._extend.tax_fee = tax_fee.toNumber();
|
|
400
|
+
|
|
257
401
|
// 累加到总税费(乘以数量)
|
|
258
|
-
originTax = originTax.plus(
|
|
259
|
-
tax = tax.plus(
|
|
402
|
+
originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
403
|
+
tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
260
404
|
}
|
|
261
405
|
} catch (err) {
|
|
262
|
-
|
|
406
|
+
_iterator5.e(err);
|
|
263
407
|
} finally {
|
|
264
|
-
|
|
408
|
+
_iterator5.f();
|
|
265
409
|
}
|
|
266
410
|
return {
|
|
267
411
|
originTax: originTax,
|
|
@@ -361,10 +505,9 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
|
|
|
361
505
|
var surchargeConfig = options.surchargeConfig,
|
|
362
506
|
_options$scheduleById = options.scheduleById,
|
|
363
507
|
scheduleById = _options$scheduleById === void 0 ? {} : _options$scheduleById;
|
|
364
|
-
var
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
isCustomItem = _item$_extend.isCustomItem;
|
|
508
|
+
var startDate = item.startDate,
|
|
509
|
+
product_id = item.product_id,
|
|
510
|
+
isCustomItem = item.isCustomItem;
|
|
368
511
|
var _surchargeConfig$open = surchargeConfig.open_product,
|
|
369
512
|
open_product = _surchargeConfig$open === void 0 ? 0 : _surchargeConfig$open,
|
|
370
513
|
_surchargeConfig$is_a = surchargeConfig.is_all,
|
|
@@ -395,7 +538,6 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
|
|
|
395
538
|
isProductMatch = false;
|
|
396
539
|
} else {
|
|
397
540
|
// 普通商品:检查是否在指定商品列表中
|
|
398
|
-
var product_id = other === null || other === void 0 ? void 0 : other.product_id;
|
|
399
541
|
isProductMatch = available_product_ids.includes(product_id);
|
|
400
542
|
}
|
|
401
543
|
}
|
|
@@ -434,6 +576,148 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
|
|
|
434
576
|
return isProductMatch && isScheduleMatch;
|
|
435
577
|
};
|
|
436
578
|
|
|
579
|
+
// bundle商品是否是原价
|
|
580
|
+
var getBundleItemIsOriginalPrice = function getBundleItemIsOriginalPrice(item) {
|
|
581
|
+
return (item === null || item === void 0 ? void 0 : item.price_type) === 'markup' && (item === null || item === void 0 ? void 0 : item.price_type_ext) === 'product_price';
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
// bundle商品是否是加价
|
|
585
|
+
var getBundleItemIsMarkupPrice = function getBundleItemIsMarkupPrice(item) {
|
|
586
|
+
return (item === null || item === void 0 ? void 0 : item.price_type) === 'markup' && ((item === null || item === void 0 ? void 0 : item.price_type_ext) === '' || !(item !== null && item !== void 0 && item.price_type_ext));
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
// bundle商品是否是减价
|
|
590
|
+
var getBundleItemIsDiscountPrice = function getBundleItemIsDiscountPrice(item) {
|
|
591
|
+
return (item === null || item === void 0 ? void 0 : item.price_type) === 'markdown' && ((item === null || item === void 0 ? void 0 : item.price_type_ext) === '' || !(item !== null && item !== void 0 && item.price_type_ext));
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
// bundle商品是否是加价或减价
|
|
595
|
+
var getBundleItemIsMarkupOrDiscountPrice = function getBundleItemIsMarkupOrDiscountPrice(item) {
|
|
596
|
+
return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
|
|
597
|
+
};
|
|
598
|
+
var getDiscountAmount = function getDiscountAmount(discounts) {
|
|
599
|
+
return (discounts || []).reduce(function (total, discount) {
|
|
600
|
+
return total.add(new Decimal(discount.amount || 0));
|
|
601
|
+
}, new Decimal(0)).toNumber();
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
606
|
+
*/
|
|
607
|
+
var getMainProductTotal = function getMainProductTotal(item) {
|
|
608
|
+
var _ref3, _ref4, _item$_extend$main_pr, _item$_extend3, _item$metadata, _item$_extend$other2, _item$_extend$other3, _item$_extend$other5;
|
|
609
|
+
var total = new Decimal((_ref3 = (_ref4 = (_item$_extend$main_pr = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.main_product_selling_price) !== null && _item$_extend$main_pr !== void 0 ? _item$_extend$main_pr : item === null || item === void 0 || (_item$metadata = item.metadata) === null || _item$metadata === void 0 ? void 0 : _item$metadata.main_product_selling_price) !== null && _ref4 !== void 0 ? _ref4 : item._extend.price) !== null && _ref3 !== void 0 ? _ref3 : 0);
|
|
610
|
+
|
|
611
|
+
// 单规格
|
|
612
|
+
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)) {
|
|
613
|
+
var _item$_extend$other4;
|
|
614
|
+
total = total.add((_item$_extend$other4 = item._extend.other) === null || _item$_extend$other4 === void 0 ? void 0 : _item$_extend$other4.option.reduce(function (t, option) {
|
|
615
|
+
return t.add(new Decimal(option.price || 0).mul(option.num || 1));
|
|
616
|
+
}, new Decimal(0)));
|
|
617
|
+
}
|
|
618
|
+
var _iterator8 = _createForOfIteratorHelper(((_item$_extend$other5 = item._extend.other) === null || _item$_extend$other5 === void 0 ? void 0 : _item$_extend$other5.bundle) || []),
|
|
619
|
+
_step8;
|
|
620
|
+
try {
|
|
621
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
622
|
+
var bundleItem = _step8.value;
|
|
623
|
+
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
624
|
+
var _ref5, _bundleItem$bundle_se2;
|
|
625
|
+
// 子商品折扣金额
|
|
626
|
+
var discountAmount = getDiscountAmount(bundleItem.discount_list);
|
|
627
|
+
// 子商品价格
|
|
628
|
+
var bundleItemPrice = new Decimal((_ref5 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
629
|
+
// todo: 套餐子商品后不需要处理 子商品价格 - 子商品折扣金额
|
|
630
|
+
var bundleItemTotal = bundleItemPrice.minus(discountAmount);
|
|
631
|
+
total = total.add(bundleItemTotal);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
} catch (err) {
|
|
635
|
+
_iterator8.e(err);
|
|
636
|
+
} finally {
|
|
637
|
+
_iterator8.f();
|
|
638
|
+
}
|
|
639
|
+
return total.toNumber();
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* 清除附加费
|
|
644
|
+
*/
|
|
645
|
+
var clearSurchargeFee = function clearSurchargeFee(state) {
|
|
646
|
+
var service = state.service,
|
|
647
|
+
addons = state.addons;
|
|
648
|
+
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
649
|
+
var _iterator9 = _createForOfIteratorHelper(service.value),
|
|
650
|
+
_step9;
|
|
651
|
+
try {
|
|
652
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
653
|
+
var _item$_extend$other6;
|
|
654
|
+
var item = _step9.value;
|
|
655
|
+
item._extend.surcharge_fee = 0;
|
|
656
|
+
item._extend.relation_surcharge_ids = [];
|
|
657
|
+
var _iterator10 = _createForOfIteratorHelper(((_item$_extend$other6 = item._extend.other) === null || _item$_extend$other6 === void 0 ? void 0 : _item$_extend$other6.bundle) || []),
|
|
658
|
+
_step10;
|
|
659
|
+
try {
|
|
660
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
661
|
+
var bundleItem = _step10.value;
|
|
662
|
+
bundleItem.surcharge_fee = 0;
|
|
663
|
+
bundleItem.relation_surcharge_ids = [];
|
|
664
|
+
}
|
|
665
|
+
} catch (err) {
|
|
666
|
+
_iterator10.e(err);
|
|
667
|
+
} finally {
|
|
668
|
+
_iterator10.f();
|
|
669
|
+
}
|
|
670
|
+
var _iterator11 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
671
|
+
_step11;
|
|
672
|
+
try {
|
|
673
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
674
|
+
var relationDetail = _step11.value;
|
|
675
|
+
relationDetail.surcharge_fee = 0;
|
|
676
|
+
relationDetail.relation_surcharge_ids = [];
|
|
677
|
+
}
|
|
678
|
+
} catch (err) {
|
|
679
|
+
_iterator11.e(err);
|
|
680
|
+
} finally {
|
|
681
|
+
_iterator11.f();
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
} catch (err) {
|
|
685
|
+
_iterator9.e(err);
|
|
686
|
+
} finally {
|
|
687
|
+
_iterator9.f();
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
691
|
+
var _iterator12 = _createForOfIteratorHelper(addons.value),
|
|
692
|
+
_step12;
|
|
693
|
+
try {
|
|
694
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
695
|
+
var _item2$_extend$other;
|
|
696
|
+
var _item2 = _step12.value;
|
|
697
|
+
_item2._extend.surcharge_fee = 0;
|
|
698
|
+
_item2._extend.relation_surcharge_ids = [];
|
|
699
|
+
var _iterator13 = _createForOfIteratorHelper(((_item2$_extend$other = _item2._extend.other) === null || _item2$_extend$other === void 0 ? void 0 : _item2$_extend$other.bundle) || []),
|
|
700
|
+
_step13;
|
|
701
|
+
try {
|
|
702
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
703
|
+
var _bundleItem = _step13.value;
|
|
704
|
+
_bundleItem.surcharge_fee = 0;
|
|
705
|
+
_bundleItem.relation_surcharge_ids = [];
|
|
706
|
+
}
|
|
707
|
+
} catch (err) {
|
|
708
|
+
_iterator13.e(err);
|
|
709
|
+
} finally {
|
|
710
|
+
_iterator13.f();
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
} catch (err) {
|
|
714
|
+
_iterator12.e(err);
|
|
715
|
+
} finally {
|
|
716
|
+
_iterator12.f();
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
|
|
437
721
|
/**
|
|
438
722
|
* 订单附加费各项信息
|
|
439
723
|
* @param state
|
|
@@ -470,6 +754,8 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
470
754
|
}
|
|
471
755
|
return [];
|
|
472
756
|
}
|
|
757
|
+
// 清除附加费
|
|
758
|
+
clearSurchargeFee(state);
|
|
473
759
|
|
|
474
760
|
// 新增状态
|
|
475
761
|
var service = state.service,
|
|
@@ -489,93 +775,252 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
489
775
|
fixed = _surchargeConfig$fixe === void 0 ? '0' : _surchargeConfig$fixe,
|
|
490
776
|
id = surchargeConfig.id,
|
|
491
777
|
type = surchargeConfig.type,
|
|
492
|
-
description = surchargeConfig.description
|
|
778
|
+
description = surchargeConfig.description,
|
|
779
|
+
open_product = surchargeConfig.open_product;
|
|
493
780
|
|
|
494
781
|
// 收集所有符合条件的商品
|
|
495
782
|
var matchedItems = [];
|
|
496
783
|
|
|
497
784
|
// 检查service中符合条件的商品
|
|
498
785
|
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
499
|
-
var
|
|
500
|
-
|
|
786
|
+
var _iterator14 = _createForOfIteratorHelper(service.value),
|
|
787
|
+
_step14;
|
|
501
788
|
try {
|
|
502
|
-
for (
|
|
503
|
-
var
|
|
504
|
-
|
|
789
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
790
|
+
var _item$_extend$other7;
|
|
791
|
+
var item = _step14.value;
|
|
792
|
+
// 主商品符合附加费条件
|
|
793
|
+
if (isProductMatchSurchargeCondition({
|
|
794
|
+
isCustomItem: item.isCustomItem,
|
|
795
|
+
startDate: item._extend.startDate,
|
|
796
|
+
product_id: item.product_id
|
|
797
|
+
}, {
|
|
505
798
|
surchargeConfig: surchargeConfig,
|
|
506
799
|
scheduleById: scheduleById || {},
|
|
507
800
|
ScheduleModule: ScheduleModule
|
|
508
801
|
})) {
|
|
802
|
+
// 主商品加价减价后的总价
|
|
803
|
+
var total = getMainProductTotal(item);
|
|
804
|
+
var mainQuantity = item._extend.quantity || 1;
|
|
509
805
|
matchedItems.push({
|
|
510
|
-
total:
|
|
511
|
-
addTimeTotal: getRelationDetailsTotal(
|
|
512
|
-
|
|
806
|
+
total: total,
|
|
807
|
+
// addTimeTotal: getRelationDetailsTotal(
|
|
808
|
+
// item._extend.relation_details || []
|
|
809
|
+
// ),
|
|
810
|
+
isMain: true,
|
|
811
|
+
quantity: mainQuantity,
|
|
812
|
+
item: item,
|
|
813
|
+
mainQuantity: mainQuantity // 主商品的mainQuantity等于自己的quantity
|
|
513
814
|
});
|
|
514
815
|
}
|
|
816
|
+
// 遍历子商品 原价商品符合附加费条件
|
|
817
|
+
var _iterator15 = _createForOfIteratorHelper(((_item$_extend$other7 = item._extend.other) === null || _item$_extend$other7 === void 0 ? void 0 : _item$_extend$other7.bundle) || []),
|
|
818
|
+
_step15;
|
|
819
|
+
try {
|
|
820
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
821
|
+
var bundleItem = _step15.value;
|
|
822
|
+
// bundle商品是原价且符合附加费条件
|
|
823
|
+
if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition({
|
|
824
|
+
isCustomItem: false,
|
|
825
|
+
startDate: item._extend.startDate,
|
|
826
|
+
product_id: bundleItem._bundle_product_id
|
|
827
|
+
}, {
|
|
828
|
+
surchargeConfig: surchargeConfig,
|
|
829
|
+
scheduleById: scheduleById || {},
|
|
830
|
+
ScheduleModule: ScheduleModule
|
|
831
|
+
})) {
|
|
832
|
+
var _ref6, _bundleItem$bundle_se3;
|
|
833
|
+
var _mainQuantity = item._extend.quantity || 1;
|
|
834
|
+
matchedItems.push({
|
|
835
|
+
isMain: false,
|
|
836
|
+
total: Number((_ref6 = (_bundleItem$bundle_se3 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se3 !== void 0 ? _bundleItem$bundle_se3 : bundleItem.price) !== null && _ref6 !== void 0 ? _ref6 : 0),
|
|
837
|
+
quantity: bundleItem.num || bundleItem.quantity || 1,
|
|
838
|
+
item: bundleItem,
|
|
839
|
+
mainQuantity: _mainQuantity // 子商品的mainQuantity是所属主商品的quantity
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// 加时商品符合附加费条件
|
|
845
|
+
} catch (err) {
|
|
846
|
+
_iterator15.e(err);
|
|
847
|
+
} finally {
|
|
848
|
+
_iterator15.f();
|
|
849
|
+
}
|
|
850
|
+
var _iterator16 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
851
|
+
_step16;
|
|
852
|
+
try {
|
|
853
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
854
|
+
var relationDetail = _step16.value;
|
|
855
|
+
if (isProductMatchSurchargeCondition({
|
|
856
|
+
isCustomItem: false,
|
|
857
|
+
startDate: item._extend.startDate,
|
|
858
|
+
product_id: relationDetail.product_id
|
|
859
|
+
}, {
|
|
860
|
+
surchargeConfig: surchargeConfig,
|
|
861
|
+
scheduleById: scheduleById || {},
|
|
862
|
+
ScheduleModule: ScheduleModule
|
|
863
|
+
})) {
|
|
864
|
+
var _relationDetail$metad;
|
|
865
|
+
matchedItems.push({
|
|
866
|
+
isMain: false,
|
|
867
|
+
total: Number((relationDetail === null || relationDetail === void 0 ? void 0 : relationDetail.price) || (relationDetail === null || relationDetail === void 0 || (_relationDetail$metad = relationDetail.metadata) === null || _relationDetail$metad === void 0 ? void 0 : _relationDetail$metad.main_product_attached_bundle_selling_price)),
|
|
868
|
+
quantity: relationDetail.num || relationDetail.quantity || 1,
|
|
869
|
+
item: relationDetail,
|
|
870
|
+
mainQuantity: 1 // 加时商品不受主商品数量影响
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
} catch (err) {
|
|
875
|
+
_iterator16.e(err);
|
|
876
|
+
} finally {
|
|
877
|
+
_iterator16.f();
|
|
878
|
+
}
|
|
515
879
|
}
|
|
516
880
|
} catch (err) {
|
|
517
|
-
|
|
881
|
+
_iterator14.e(err);
|
|
518
882
|
} finally {
|
|
519
|
-
|
|
883
|
+
_iterator14.f();
|
|
520
884
|
}
|
|
521
885
|
}
|
|
522
886
|
|
|
523
887
|
// 检查addons中符合条件的商品
|
|
524
888
|
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
525
|
-
var
|
|
526
|
-
|
|
889
|
+
var _iterator17 = _createForOfIteratorHelper(addons.value),
|
|
890
|
+
_step17;
|
|
527
891
|
try {
|
|
528
|
-
for (
|
|
529
|
-
var
|
|
530
|
-
if (isProductMatchSurchargeCondition(
|
|
892
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
893
|
+
var _item3 = _step17.value;
|
|
894
|
+
if (isProductMatchSurchargeCondition(_item3, {
|
|
531
895
|
surchargeConfig: surchargeConfig,
|
|
532
896
|
scheduleById: scheduleById || {},
|
|
533
897
|
ScheduleModule: ScheduleModule
|
|
534
898
|
})) {
|
|
535
899
|
matchedItems.push({
|
|
536
|
-
|
|
537
|
-
|
|
900
|
+
isMain: true,
|
|
901
|
+
total: Number(_item3._extend.total),
|
|
902
|
+
quantity: _item3._extend.quantity || 1,
|
|
903
|
+
item: _item3,
|
|
904
|
+
mainQuantity: 1 // addons独立商品,mainQuantity为1
|
|
538
905
|
});
|
|
539
906
|
}
|
|
540
907
|
}
|
|
541
908
|
} catch (err) {
|
|
542
|
-
|
|
909
|
+
_iterator17.e(err);
|
|
543
910
|
} finally {
|
|
544
|
-
|
|
911
|
+
_iterator17.f();
|
|
545
912
|
}
|
|
546
913
|
}
|
|
547
914
|
var finalAmount = 0;
|
|
915
|
+
|
|
916
|
+
// 计算商品总数:主商品和addons按quantity计算,子商品(bundle item)需要乘以主商品数量
|
|
917
|
+
var productCount = matchedItems.reduce(function (total, item) {
|
|
918
|
+
if (item.isMain) {
|
|
919
|
+
// 主商品和addons商品
|
|
920
|
+
return total + (item.quantity || 1);
|
|
921
|
+
} else {
|
|
922
|
+
// 子商品(bundle item)和加时商品
|
|
923
|
+
// 加时商品的 mainQuantity = 1,所以不受影响
|
|
924
|
+
// bundle item 的 mainQuantity = 主商品数量,需要乘以实际数量
|
|
925
|
+
return total + (item.quantity || 1) * (item.mainQuantity || 1);
|
|
926
|
+
}
|
|
927
|
+
}, 0);
|
|
928
|
+
|
|
929
|
+
// 追加进入的固定附加费总值
|
|
930
|
+
var fixedTotal = new Decimal(0);
|
|
931
|
+
// 追加到商品的附加费总值 用于追加抹平字段
|
|
932
|
+
var productTotalSurcharge = new Decimal(0);
|
|
548
933
|
if (matchedItems.length > 0) {
|
|
549
934
|
// 基于每个商品计算附加费:max(0, 商品价格) * rate + fixed
|
|
550
935
|
var configTotal = new Decimal(0);
|
|
551
936
|
|
|
937
|
+
// 计算固定附加费 - 只加一次
|
|
938
|
+
if (fixed && new Decimal(fixed).gt(0)) {
|
|
939
|
+
configTotal = configTotal.plus(fixed);
|
|
940
|
+
}
|
|
941
|
+
|
|
552
942
|
// 计算百分比附加费 - 对每个商品单独计算
|
|
553
|
-
if (percentage && new Decimal(percentage).gt(0)) {
|
|
943
|
+
if (percentage && new Decimal(percentage).gt(0) || fixed) {
|
|
554
944
|
var percentageRate = new Decimal(percentage);
|
|
555
|
-
var
|
|
556
|
-
|
|
945
|
+
var _iterator18 = _createForOfIteratorHelper(matchedItems.entries()),
|
|
946
|
+
_step18;
|
|
557
947
|
try {
|
|
558
|
-
for (
|
|
559
|
-
var
|
|
948
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
949
|
+
var _step18$value = _slicedToArray(_step18.value, 2),
|
|
950
|
+
index = _step18$value[0],
|
|
951
|
+
_item4 = _step18$value[1];
|
|
952
|
+
var isLast = index === matchedItems.length - 1;
|
|
560
953
|
// 对每个商品:max(0, 价格) * 数量 * 费率
|
|
561
|
-
var itemPrice = new Decimal(Math.max(0,
|
|
562
|
-
var itemQuantity = new Decimal(
|
|
563
|
-
var addTimeTotal = new Decimal(
|
|
564
|
-
|
|
565
|
-
|
|
954
|
+
var itemPrice = new Decimal(Math.max(0, _item4.total || 0));
|
|
955
|
+
var itemQuantity = new Decimal(_item4.isMain ? _item4.quantity || 1 : _item4.quantity * _item4.mainQuantity || 1);
|
|
956
|
+
var addTimeTotal = new Decimal(_item4.addTimeTotal || 0);
|
|
957
|
+
// 单个商品总附加费
|
|
958
|
+
var itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
|
|
959
|
+
configTotal = configTotal.plus(itemTotalSurcharge);
|
|
960
|
+
|
|
961
|
+
// 单个商品单数量附加费
|
|
962
|
+
var itemSurcharge = itemPrice.times(percentageRate);
|
|
963
|
+
|
|
964
|
+
// 固定附加费 = 1 / 商品数量 * 固定附加费(向下取整保留两位小数)
|
|
965
|
+
var fixedSurcharge = new Decimal(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
|
|
966
|
+
var quantity = _item4.isMain ? _item4.quantity : _item4.quantity * _item4.mainQuantity;
|
|
967
|
+
fixedTotal = fixedTotal.plus(new Decimal(fixedSurcharge).times(quantity).toNumber());
|
|
968
|
+
|
|
969
|
+
// 如果是最后一个商品 判断fixed - fixedTotal 是否有剩余小数 如果有的话,追加抹平字段
|
|
970
|
+
if (isLast && fixedTotal.gt(0)) {
|
|
971
|
+
var remaining = new Decimal(fixed).minus(fixedTotal).toNumber();
|
|
972
|
+
if (remaining > 0) {
|
|
973
|
+
productTotalSurcharge = productTotalSurcharge.plus(remaining);
|
|
974
|
+
if (_item4.isMain) {
|
|
975
|
+
_item4.item._extend.surcharge_rounding_remainder = remaining;
|
|
976
|
+
} else {
|
|
977
|
+
_item4.item.surcharge_rounding_remainder = remaining;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
// 只有当 open_product !== 0 时,才将附加费追加到商品身上
|
|
982
|
+
// open_product === 0 表示商品未开启该附加费,只在订单级别累加
|
|
983
|
+
if (open_product !== 0) {
|
|
984
|
+
if (_item4.isMain) {
|
|
985
|
+
var _item4$item$_extend;
|
|
986
|
+
var originSurchargeFee = new Decimal(_item4.item._extend.surcharge_fee || 0);
|
|
987
|
+
// 保留两位小数
|
|
988
|
+
var surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
989
|
+
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(surchargeFee).times(itemQuantity).toNumber());
|
|
990
|
+
_item4.item._extend.surcharge_fee = surchargeFee;
|
|
991
|
+
_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
|
+
} else {
|
|
993
|
+
var _item4$item;
|
|
994
|
+
var _originSurchargeFee = new Decimal(_item4.item.surcharge_fee || 0);
|
|
995
|
+
// 保留两位小数
|
|
996
|
+
var _surchargeFee = _originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
997
|
+
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(_surchargeFee).times(itemQuantity).toNumber());
|
|
998
|
+
_item4.item.surcharge_fee = _surchargeFee;
|
|
999
|
+
_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
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
// 最后一个商品 判断configTotal - productTotalSurcharge 是否有剩余小数 如果有的话,追加抹平字段
|
|
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
|
+
}
|
|
566
1016
|
}
|
|
567
1017
|
} catch (err) {
|
|
568
|
-
|
|
1018
|
+
_iterator18.e(err);
|
|
569
1019
|
} finally {
|
|
570
|
-
|
|
1020
|
+
_iterator18.f();
|
|
571
1021
|
}
|
|
572
1022
|
}
|
|
573
1023
|
|
|
574
|
-
// 计算固定附加费 - 只加一次
|
|
575
|
-
if (fixed && new Decimal(fixed).gt(0)) {
|
|
576
|
-
configTotal = configTotal.plus(fixed);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
1024
|
// 如果该配置有金额,则添加到结果中
|
|
580
1025
|
finalAmount = configTotal.toDecimalPlaces(2, Decimal.ROUND_HALF_UP).toNumber();
|
|
581
1026
|
}
|
|
@@ -594,7 +1039,10 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
594
1039
|
type: 'default',
|
|
595
1040
|
fixed: fixed,
|
|
596
1041
|
amount: finalAmount,
|
|
597
|
-
percentage: percentage
|
|
1042
|
+
percentage: percentage,
|
|
1043
|
+
metadata: {
|
|
1044
|
+
open_product: open_product
|
|
1045
|
+
}
|
|
598
1046
|
});
|
|
599
1047
|
}
|
|
600
1048
|
return surchargeWithAmount;
|
|
@@ -665,13 +1113,13 @@ export var getIsPriceIncludeTax = function getIsPriceIncludeTax(state) {
|
|
|
665
1113
|
var _state$bookingDetail$, _state$bookingDetail6;
|
|
666
1114
|
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;
|
|
667
1115
|
};
|
|
668
|
-
var getExpectAmount = function getExpectAmount(
|
|
669
|
-
var price =
|
|
670
|
-
tax =
|
|
671
|
-
surchargeAmount =
|
|
672
|
-
shopDiscount =
|
|
673
|
-
state =
|
|
674
|
-
options =
|
|
1116
|
+
var getExpectAmount = function getExpectAmount(_ref7) {
|
|
1117
|
+
var price = _ref7.price,
|
|
1118
|
+
tax = _ref7.tax,
|
|
1119
|
+
surchargeAmount = _ref7.surchargeAmount,
|
|
1120
|
+
shopDiscount = _ref7.shopDiscount,
|
|
1121
|
+
state = _ref7.state,
|
|
1122
|
+
options = _ref7.options;
|
|
675
1123
|
var _tax = tax;
|
|
676
1124
|
// 如果价格含税, 则将税费改为0
|
|
677
1125
|
if (getIsPriceIncludeTax(state) || options !== null && options !== void 0 && options.is_price_include_tax) {
|
|
@@ -693,9 +1141,9 @@ var getRoundingAmount = function getRoundingAmount(state) {
|
|
|
693
1141
|
var _state$bookingDetail9;
|
|
694
1142
|
return Number(state === null || state === void 0 || (_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.rounding_amount) || 0;
|
|
695
1143
|
};
|
|
696
|
-
var getSumTotalAmount = function getSumTotalAmount(
|
|
697
|
-
var expectAmount =
|
|
698
|
-
roundingAmount =
|
|
1144
|
+
var getSumTotalAmount = function getSumTotalAmount(_ref8) {
|
|
1145
|
+
var expectAmount = _ref8.expectAmount,
|
|
1146
|
+
roundingAmount = _ref8.roundingAmount;
|
|
699
1147
|
return expectAmount + roundingAmount;
|
|
700
1148
|
};
|
|
701
1149
|
|
|
@@ -767,6 +1215,20 @@ export var getSumTotal = function getSumTotal(state, options) {
|
|
|
767
1215
|
options: options
|
|
768
1216
|
});
|
|
769
1217
|
|
|
1218
|
+
// 商品原价 不包含折扣
|
|
1219
|
+
var _getProductExpectAmou2 = getProductExpectAmount(state, options.isEdit, true),
|
|
1220
|
+
productExpectAmountWithoutDiscount = _getProductExpectAmou2.productExpectAmount;
|
|
1221
|
+
|
|
1222
|
+
// 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
|
|
1223
|
+
var originExpectAmountWithoutDiscount = getExpectAmount({
|
|
1224
|
+
price: productExpectAmountWithoutDiscount,
|
|
1225
|
+
tax: originTax,
|
|
1226
|
+
surchargeAmount: surchargeAmount,
|
|
1227
|
+
shopDiscount: 0,
|
|
1228
|
+
state: state,
|
|
1229
|
+
options: options
|
|
1230
|
+
});
|
|
1231
|
+
|
|
770
1232
|
// 总支付金额 总计
|
|
771
1233
|
var sumTotalAmount = getSumTotalAmount({
|
|
772
1234
|
expectAmount: expectAmount,
|
|
@@ -803,6 +1265,8 @@ export var getSumTotal = function getSumTotal(state, options) {
|
|
|
803
1265
|
totalRefundAmount: totalRefundAmount,
|
|
804
1266
|
dueAmount: dueAmount,
|
|
805
1267
|
roundingAmount: roundingAmount,
|
|
806
|
-
originExpectAmount: originExpectAmount
|
|
1268
|
+
originExpectAmount: originExpectAmount,
|
|
1269
|
+
// 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
|
|
1270
|
+
originExpectAmountWithoutDiscount: originExpectAmountWithoutDiscount
|
|
807
1271
|
};
|
|
808
1272
|
};
|