@pisell/private-materials 6.7.7 → 6.7.9
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 +17 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/es/components/booking/addons/index.js +17 -25
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/amount.d.ts +0 -1
- package/es/components/booking/components/footer/amount.js +84 -548
- package/es/components/booking/components/footer/index.js +56 -77
- package/es/components/booking/components/footer/utils.d.ts +0 -19
- package/es/components/booking/components/footer/utils.js +73 -194
- package/es/components/booking/components/voucher/index.js +7 -23
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/hooks/useQuotation.js +1 -4
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +6 -30
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editNormalService/index.js +0 -6
- package/es/components/booking/info2/service/editService/index.js +6 -16
- package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/es/components/booking/info2/service/editService/utils.js +0 -66
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +0 -1
- package/es/components/booking/utils.js +3 -16
- package/es/components/checkout/PaymentModal.d.ts +5 -13
- package/es/components/checkout/PaymentModal.js +252 -304
- package/es/components/checkout/PaymentPlugin.d.ts +3 -0
- package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/es/components/checkout/components/AdditionalModule/index.js +12 -52
- package/es/components/checkout/components/AmountSummary/index.js +76 -9
- package/es/components/checkout/components/AmountSummary/index.less +6 -5
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
- package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/hooks/useWalletPass.js +1 -1
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +0 -6
- package/es/components/checkout/locales.js +0 -6
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
- package/es/components/eftposPay/payo/config.js +32 -70
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/index.js +0 -12
- package/es/components/eventBooking/components/ErrorTip/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/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/list/List.js +40 -56
- package/es/components/list/hooks/useListState.d.ts +3 -5
- package/es/components/list/hooks/useListState.js +2 -17
- package/es/components/list/styles/header.less +3 -3
- package/es/components/list/utils/index.d.ts +1 -13
- package/es/components/list/utils/index.js +1 -43
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/es/components/pay/toC/index.js +4 -7
- package/es/components/pay/toC/locales.d.ts +0 -3
- package/es/components/pay/toC/locales.js +3 -6
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/status.d.ts +0 -1
- package/es/components/pay/toC/status.js +0 -3
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
- package/es/components/ticketBooking/components/menuBar/index.js +12 -109
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +7 -112
- package/es/components/ticketBooking/components/timeBar/index.less +0 -59
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
- package/es/components/ticketBooking/locales.d.ts +0 -6
- package/es/components/ticketBooking/locales.js +3 -9
- package/es/components/ticketBooking/utils/index.d.ts +0 -3
- package/es/components/ticketBooking/utils/index.js +13 -36
- package/es/components/wallet/Detail/index.js +2 -34
- package/es/components/wallet/Detail/index.less +0 -11
- package/es/components/wallet/Detail/locales.d.ts +0 -6
- package/es/components/wallet/Detail/locales.js +2 -14
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/index.js +10 -11
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +1 -5
- package/es/components/wallet/index.js +2 -4
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/wallet/serve.d.ts +0 -7
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +1 -5
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +30 -28
- package/es/plus/clinetSearch/locales.d.ts +0 -3
- package/es/plus/clinetSearch/locales.js +4 -7
- package/es/plus/clinetSearch/types.d.ts +0 -12
- package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
- package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
- package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
- package/es/plus/walletPassGallery/index.js +3 -7
- package/es/plus/walletPassGallery/serve.d.ts +0 -3
- package/es/plus/walletPassGallery/serve.js +2 -4
- package/es/pro/Login2.0/index.less +8 -15
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -45
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
- package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/lib/components/booking/addons/index.js +7 -15
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/amount.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.js +41 -293
- package/lib/components/booking/components/footer/index.js +11 -30
- package/lib/components/booking/components/footer/utils.d.ts +0 -19
- package/lib/components/booking/components/footer/utils.js +41 -138
- package/lib/components/booking/components/voucher/index.js +9 -25
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +5 -25
- package/lib/components/booking/info2/index.js +2 -7
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
- package/lib/components/booking/info2/service/editService/index.js +3 -12
- package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/lib/components/booking/info2/service/editService/utils.js +3 -40
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +0 -1
- package/lib/components/booking/utils.js +0 -11
- package/lib/components/checkout/PaymentModal.d.ts +5 -13
- package/lib/components/checkout/PaymentModal.js +147 -190
- package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
- package/lib/components/checkout/PaymentPlugin.js +181 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
- package/lib/components/checkout/components/AmountSummary/index.js +46 -5
- package/lib/components/checkout/components/AmountSummary/index.less +6 -5
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/hooks/useWalletPass.js +1 -1
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +0 -6
- package/lib/components/checkout/locales.js +0 -6
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
- package/lib/components/eftposPay/payo/config.js +73 -98
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/index.js +0 -12
- package/lib/components/eventBooking/components/ErrorTip/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/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/list/List.js +16 -34
- package/lib/components/list/hooks/useListState.d.ts +3 -5
- package/lib/components/list/hooks/useListState.js +1 -14
- package/lib/components/list/styles/header.less +3 -3
- package/lib/components/list/utils/index.d.ts +1 -13
- package/lib/components/list/utils/index.js +0 -27
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/lib/components/pay/toC/index.js +1 -4
- package/lib/components/pay/toC/locales.d.ts +0 -3
- package/lib/components/pay/toC/locales.js +3 -6
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/status.d.ts +0 -1
- package/lib/components/pay/toC/status.js +0 -5
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
- package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
- package/lib/components/ticketBooking/locales.d.ts +0 -6
- package/lib/components/ticketBooking/locales.js +3 -9
- package/lib/components/ticketBooking/utils/index.d.ts +0 -3
- package/lib/components/ticketBooking/utils/index.js +6 -20
- package/lib/components/wallet/Detail/index.js +3 -31
- package/lib/components/wallet/Detail/index.less +0 -11
- package/lib/components/wallet/Detail/locales.d.ts +0 -6
- package/lib/components/wallet/Detail/locales.js +2 -14
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +0 -4
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/wallet/serve.d.ts +0 -7
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -12
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +8 -17
- package/lib/plus/clinetSearch/locales.d.ts +0 -3
- package/lib/plus/clinetSearch/locales.js +4 -7
- package/lib/plus/clinetSearch/types.d.ts +0 -12
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
- package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
- package/lib/plus/walletPassGallery/index.js +3 -7
- package/lib/plus/walletPassGallery/serve.d.ts +0 -3
- package/lib/plus/walletPassGallery/serve.js +2 -3
- package/lib/pro/Login2.0/index.less +8 -15
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +43 -42
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/checkout/plugin.d.ts +0 -2
- package/es/components/checkout/plugin.js +0 -303
- package/es/components/eftposPay/payo/payment.d.ts +0 -66
- package/es/components/eftposPay/payo/payment.js +0 -579
- package/es/components/eftposPay/utils/log/index.d.ts +0 -110
- package/es/components/eftposPay/utils/log/index.js +0 -371
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
- package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SectionList.js +0 -174
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
- package/es/components/systemSettings/registry/components/index.d.ts +0 -4
- package/es/components/systemSettings/registry/components/index.js +0 -4
- package/es/components/systemSettings/registry/index.d.ts +0 -5
- package/es/components/systemSettings/registry/index.js +0 -1059
- package/es/components/systemSettings/registry/index.less +0 -410
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/locales.js +0 -300
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/services.js +0 -472
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/types.js +0 -1
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/systemSettings/registry/utils/validators.js +0 -44
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/wallet/utils.js +0 -342
- package/lib/components/checkout/plugin.d.ts +0 -2
- package/lib/components/checkout/plugin.js +0 -263
- package/lib/components/eftposPay/payo/payment.d.ts +0 -66
- package/lib/components/eftposPay/payo/payment.js +0 -357
- package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
- package/lib/components/eftposPay/utils/log/index.js +0 -294
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
- package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/index.js +0 -48
- package/lib/components/systemSettings/registry/index.d.ts +0 -5
- package/lib/components/systemSettings/registry/index.js +0 -529
- package/lib/components/systemSettings/registry/index.less +0 -410
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/locales.js +0 -324
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/services.js +0 -290
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/types.js +0 -17
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/systemSettings/registry/utils/validators.js +0 -54
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/wallet/utils.js +0 -287
- package/lowcode/payment-modal/meta.ts +0 -135
- package/lowcode/settings-registry/meta.ts +0 -29
- package/lowcode/wallet-pass-detail/meta.ts +0 -89
|
@@ -47,7 +47,7 @@ var getRelationDetailsTotal = (relation_details) => {
|
|
|
47
47
|
}
|
|
48
48
|
return total.toNumber();
|
|
49
49
|
};
|
|
50
|
-
var getProductExpectAmount = (state, isEdit
|
|
50
|
+
var getProductExpectAmount = (state, isEdit) => {
|
|
51
51
|
var _a, _b, _c, _d;
|
|
52
52
|
let price = new import_decimal.default(0);
|
|
53
53
|
let duration = new import_decimal.default(0);
|
|
@@ -59,15 +59,13 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
|
|
|
59
59
|
if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item)) {
|
|
60
60
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
61
61
|
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
|
62
|
-
|
|
63
|
-
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
62
|
+
price = price.add(itemTotal.mul(quantity));
|
|
64
63
|
const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
|
|
65
64
|
duration = duration.add(_duration);
|
|
66
65
|
} else {
|
|
67
66
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
68
67
|
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
|
69
|
-
|
|
70
|
-
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
68
|
+
price = price.add(itemTotal.mul(quantity));
|
|
71
69
|
const relationTotal = new import_decimal.default(getRelationDetailsTotal(
|
|
72
70
|
item._extend.relation_details || []
|
|
73
71
|
));
|
|
@@ -81,8 +79,7 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
|
|
|
81
79
|
for (let item of state.addons.value) {
|
|
82
80
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
83
81
|
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
|
84
|
-
|
|
85
|
-
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
82
|
+
price = price.add(itemTotal.mul(quantity));
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
}
|
|
@@ -133,10 +130,9 @@ var getProductItemTax = (item, state, options) => {
|
|
|
133
130
|
}
|
|
134
131
|
}
|
|
135
132
|
}
|
|
136
|
-
return singleItemTax.times(quantity)
|
|
133
|
+
return singleItemTax.times(quantity);
|
|
137
134
|
};
|
|
138
135
|
var processItemsTax = (items, state, options) => {
|
|
139
|
-
var _a, _b, _c;
|
|
140
136
|
const { tax_rate, is_price_include_tax, computed } = options;
|
|
141
137
|
const { shopDiscount, productExpectAmount } = computed;
|
|
142
138
|
let originTax = new import_decimal.default(0);
|
|
@@ -144,11 +140,10 @@ var processItemsTax = (items, state, options) => {
|
|
|
144
140
|
for (let item of items) {
|
|
145
141
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
146
142
|
const unitPrice = new import_decimal.default(item._extend.total || 0);
|
|
147
|
-
const
|
|
148
|
-
let originalTaxPerItem = getProductItemTax(
|
|
143
|
+
const originalTaxPerItem = getProductItemTax(
|
|
149
144
|
{
|
|
150
145
|
...item,
|
|
151
|
-
total:
|
|
146
|
+
total: unitPrice.toNumber(),
|
|
152
147
|
quantity: 1
|
|
153
148
|
},
|
|
154
149
|
state,
|
|
@@ -158,22 +153,19 @@ var processItemsTax = (items, state, options) => {
|
|
|
158
153
|
if (productExpectAmount > 0) {
|
|
159
154
|
itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
160
155
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
mainItemDiscount = mainProductPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
164
|
-
}
|
|
165
|
-
const mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_b = item._extend) == null ? void 0 : _b.surcharge_fee) || 0);
|
|
166
|
-
const maxDiscountedTaxPerItem = getProductItemTax(
|
|
156
|
+
const itemDiscountedUnitPrice = unitPrice.minus(itemDiscount);
|
|
157
|
+
const discountedTaxPerItem = getProductItemTax(
|
|
167
158
|
{
|
|
168
159
|
...item,
|
|
169
|
-
total:
|
|
160
|
+
total: itemDiscountedUnitPrice.toNumber(),
|
|
170
161
|
price: item._extend.total,
|
|
171
162
|
quantity: 1
|
|
172
163
|
},
|
|
173
164
|
state,
|
|
174
165
|
{ tax_rate, is_price_include_tax }
|
|
175
166
|
);
|
|
176
|
-
item._extend.
|
|
167
|
+
item._extend.original_tax_fee = originalTaxPerItem.toNumber();
|
|
168
|
+
item._extend.tax_fee = discountedTaxPerItem.toNumber();
|
|
177
169
|
let addTimeTotalTax = new import_decimal.default(0);
|
|
178
170
|
if (Array.isArray(item._extend.relation_details)) {
|
|
179
171
|
for (let atItem of item._extend.relation_details) {
|
|
@@ -189,7 +181,8 @@ var processItemsTax = (items, state, options) => {
|
|
|
189
181
|
const addTimeTaxPerItem = getProductItemTax(
|
|
190
182
|
{
|
|
191
183
|
...atItem,
|
|
192
|
-
total: _discountedTotal
|
|
184
|
+
total: _discountedTotal,
|
|
185
|
+
// 可能包含原有数据,或前端临时数据
|
|
193
186
|
quantity: atItem.product_quantity || atItem.num || 1
|
|
194
187
|
},
|
|
195
188
|
state,
|
|
@@ -198,51 +191,8 @@ var processItemsTax = (items, state, options) => {
|
|
|
198
191
|
addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
|
|
199
192
|
}
|
|
200
193
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if (Array.isArray((_c = item._extend.other) == null ? void 0 : _c.bundle)) {
|
|
204
|
-
for (let bundleItem of item._extend.other.bundle) {
|
|
205
|
-
if (getBundleItemIsOriginalPrice(bundleItem)) {
|
|
206
|
-
const bundleQuantity = new import_decimal.default(bundleItem.quantity || 1);
|
|
207
|
-
const bundleUnitPrice = new import_decimal.default(
|
|
208
|
-
bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
|
|
209
|
-
);
|
|
210
|
-
const bundleOriginalTaxPerItem = getProductItemTax(
|
|
211
|
-
{
|
|
212
|
-
...bundleItem,
|
|
213
|
-
total: bundleUnitPrice.add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
|
|
214
|
-
quantity: 1
|
|
215
|
-
},
|
|
216
|
-
state,
|
|
217
|
-
{ tax_rate, is_price_include_tax }
|
|
218
|
-
);
|
|
219
|
-
let bundleItemDiscount = new import_decimal.default(0);
|
|
220
|
-
if (productExpectAmount > 0) {
|
|
221
|
-
bundleItemDiscount = bundleUnitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
222
|
-
}
|
|
223
|
-
const bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0);
|
|
224
|
-
const bundleDiscountedTaxPerItem = getProductItemTax(
|
|
225
|
-
{
|
|
226
|
-
...bundleItem,
|
|
227
|
-
total: bundleDiscountedUnitPrice.toNumber(),
|
|
228
|
-
quantity: 1
|
|
229
|
-
},
|
|
230
|
-
state,
|
|
231
|
-
{ tax_rate, is_price_include_tax }
|
|
232
|
-
);
|
|
233
|
-
bundleItem.original_tax_fee = new import_decimal.default(bundleOriginalTaxPerItem).toNumber();
|
|
234
|
-
bundleItem.tax_fee = new import_decimal.default(bundleDiscountedTaxPerItem).toNumber();
|
|
235
|
-
bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
|
|
236
|
-
bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
const original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
|
|
241
|
-
const tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
|
|
242
|
-
item._extend.original_tax_fee = original_tax_fee.toNumber();
|
|
243
|
-
item._extend.tax_fee = tax_fee.toNumber();
|
|
244
|
-
originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
245
|
-
tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
194
|
+
originTax = originTax.plus(originalTaxPerItem.times(quantity)).plus(addTimeTotalTax);
|
|
195
|
+
tax = tax.plus(discountedTaxPerItem.times(quantity)).plus(addTimeTotalTax);
|
|
246
196
|
}
|
|
247
197
|
return { originTax, tax };
|
|
248
198
|
};
|
|
@@ -303,7 +253,7 @@ var isProductMatchSurchargeCondition = (item, options) => {
|
|
|
303
253
|
}
|
|
304
254
|
const isInScheduleByDate = (_a = options.ScheduleModule) == null ? void 0 : _a.isInScheduleByDate;
|
|
305
255
|
const { surchargeConfig, scheduleById = {} } = options;
|
|
306
|
-
const { startDate,
|
|
256
|
+
const { startDate, other, isCustomItem } = item._extend;
|
|
307
257
|
const {
|
|
308
258
|
open_product = 0,
|
|
309
259
|
// 1 | 0
|
|
@@ -327,6 +277,7 @@ var isProductMatchSurchargeCondition = (item, options) => {
|
|
|
327
277
|
if (isCustomItem) {
|
|
328
278
|
isProductMatch = false;
|
|
329
279
|
} else {
|
|
280
|
+
const product_id = other == null ? void 0 : other.product_id;
|
|
330
281
|
isProductMatch = available_product_ids.includes(product_id);
|
|
331
282
|
}
|
|
332
283
|
}
|
|
@@ -356,71 +307,8 @@ var isProductMatchSurchargeCondition = (item, options) => {
|
|
|
356
307
|
}
|
|
357
308
|
return isProductMatch && isScheduleMatch;
|
|
358
309
|
};
|
|
359
|
-
var getBundleItemIsOriginalPrice = (item) => {
|
|
360
|
-
return (item == null ? void 0 : item.price_type) === "markup" && (item == null ? void 0 : item.price_type_ext) === "product_price";
|
|
361
|
-
};
|
|
362
|
-
var getBundleItemIsMarkupPrice = (item) => {
|
|
363
|
-
return (item == null ? void 0 : item.price_type) === "markup" && ((item == null ? void 0 : item.price_type_ext) === "" || !(item == null ? void 0 : item.price_type_ext));
|
|
364
|
-
};
|
|
365
|
-
var getBundleItemIsDiscountPrice = (item) => {
|
|
366
|
-
return (item == null ? void 0 : item.price_type) === "markdown" && ((item == null ? void 0 : item.price_type_ext) === "" || !(item == null ? void 0 : item.price_type_ext));
|
|
367
|
-
};
|
|
368
|
-
var getBundleItemIsMarkupOrDiscountPrice = (item) => {
|
|
369
|
-
return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
|
|
370
|
-
};
|
|
371
|
-
var getDiscountAmount = (discounts) => {
|
|
372
|
-
return (discounts || []).reduce((total, discount) => {
|
|
373
|
-
return total.add(new import_decimal.default(discount.amount || 0));
|
|
374
|
-
}, new import_decimal.default(0)).toNumber();
|
|
375
|
-
};
|
|
376
|
-
var getMainProductTotal = (item) => {
|
|
377
|
-
var _a, _b, _c, _d, _e, _f;
|
|
378
|
-
let total = new import_decimal.default(((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) ?? ((_b = item == null ? void 0 : item.metadata) == null ? void 0 : _b.main_product_selling_price) ?? item._extend.price ?? 0);
|
|
379
|
-
if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
|
|
380
|
-
total = total.add((_e = item._extend.other) == null ? void 0 : _e.option.reduce((t, option) => {
|
|
381
|
-
return t.add(new import_decimal.default(option.price || 0).mul(option.num || 1));
|
|
382
|
-
}, new import_decimal.default(0)));
|
|
383
|
-
}
|
|
384
|
-
for (let bundleItem of ((_f = item._extend.other) == null ? void 0 : _f.bundle) || []) {
|
|
385
|
-
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
386
|
-
const discountAmount = getDiscountAmount(bundleItem.discount_list);
|
|
387
|
-
const bundleItemPrice = new import_decimal.default(bundleItem.bundle_selling_price ?? bundleItem.price ?? 0);
|
|
388
|
-
const bundleItemTotal = bundleItemPrice.minus(discountAmount);
|
|
389
|
-
total = total.add(bundleItemTotal);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return total.toNumber();
|
|
393
|
-
};
|
|
394
|
-
var clearSurchargeFee = (state) => {
|
|
395
|
-
var _a, _b;
|
|
396
|
-
const { service, addons } = state;
|
|
397
|
-
if (Array.isArray(service == null ? void 0 : service.value)) {
|
|
398
|
-
for (let item of service.value) {
|
|
399
|
-
item._extend.surcharge_fee = 0;
|
|
400
|
-
item._extend.relation_surcharge_ids = [];
|
|
401
|
-
for (let bundleItem of ((_a = item._extend.other) == null ? void 0 : _a.bundle) || []) {
|
|
402
|
-
bundleItem.surcharge_fee = 0;
|
|
403
|
-
bundleItem.relation_surcharge_ids = [];
|
|
404
|
-
}
|
|
405
|
-
for (let relationDetail of item._extend.relation_details || []) {
|
|
406
|
-
relationDetail.surcharge_fee = 0;
|
|
407
|
-
relationDetail.relation_surcharge_ids = [];
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
if (Array.isArray(addons == null ? void 0 : addons.value)) {
|
|
412
|
-
for (let item of addons.value) {
|
|
413
|
-
item._extend.surcharge_fee = 0;
|
|
414
|
-
item._extend.relation_surcharge_ids = [];
|
|
415
|
-
for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
|
|
416
|
-
bundleItem.surcharge_fee = 0;
|
|
417
|
-
bundleItem.relation_surcharge_ids = [];
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
310
|
var getSurcharge = (state, options) => {
|
|
423
|
-
var _a
|
|
311
|
+
var _a;
|
|
424
312
|
const { isEdit, ScheduleModule, surcharge_list, scheduleById } = options;
|
|
425
313
|
const { bookingDetail, bookingId } = state;
|
|
426
314
|
if (!isEdit && bookingId) {
|
|
@@ -445,7 +333,6 @@ var getSurcharge = (state, options) => {
|
|
|
445
333
|
}
|
|
446
334
|
return [];
|
|
447
335
|
}
|
|
448
|
-
clearSurchargeFee(state);
|
|
449
336
|
const { service, addons } = state;
|
|
450
337
|
if (!Array.isArray(surcharge_list) || !(surcharge_list == null ? void 0 : surcharge_list.length)) return [];
|
|
451
338
|
const surchargeWithAmount = [];
|
|
@@ -456,89 +343,24 @@ var getSurcharge = (state, options) => {
|
|
|
456
343
|
fixed = "0",
|
|
457
344
|
id,
|
|
458
345
|
type,
|
|
459
|
-
description
|
|
460
|
-
open_product
|
|
346
|
+
description
|
|
461
347
|
} = surchargeConfig;
|
|
462
348
|
const matchedItems = [];
|
|
463
349
|
if (Array.isArray(service == null ? void 0 : service.value)) {
|
|
464
350
|
for (let item of service.value) {
|
|
465
|
-
if (isProductMatchSurchargeCondition(
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
surchargeConfig,
|
|
473
|
-
scheduleById: scheduleById || {},
|
|
474
|
-
ScheduleModule
|
|
475
|
-
}
|
|
476
|
-
)) {
|
|
477
|
-
const total = getMainProductTotal(item);
|
|
478
|
-
const mainQuantity = item._extend.quantity || 1;
|
|
351
|
+
if (isProductMatchSurchargeCondition(item, {
|
|
352
|
+
surchargeConfig,
|
|
353
|
+
scheduleById: scheduleById || {},
|
|
354
|
+
ScheduleModule
|
|
355
|
+
})) {
|
|
479
356
|
matchedItems.push({
|
|
480
|
-
total,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
quantity: mainQuantity,
|
|
486
|
-
item,
|
|
487
|
-
mainQuantity
|
|
488
|
-
// 主商品的mainQuantity等于自己的quantity
|
|
357
|
+
total: Number(item._extend.total),
|
|
358
|
+
addTimeTotal: getRelationDetailsTotal(
|
|
359
|
+
item._extend.relation_details || []
|
|
360
|
+
),
|
|
361
|
+
quantity: item._extend.quantity || 1
|
|
489
362
|
});
|
|
490
363
|
}
|
|
491
|
-
for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
|
|
492
|
-
if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition(
|
|
493
|
-
{
|
|
494
|
-
isCustomItem: false,
|
|
495
|
-
startDate: item._extend.startDate,
|
|
496
|
-
product_id: bundleItem._bundle_product_id
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
surchargeConfig,
|
|
500
|
-
scheduleById: scheduleById || {},
|
|
501
|
-
ScheduleModule
|
|
502
|
-
}
|
|
503
|
-
)) {
|
|
504
|
-
const mainQuantity = item._extend.quantity || 1;
|
|
505
|
-
matchedItems.push({
|
|
506
|
-
isMain: false,
|
|
507
|
-
total: Number(
|
|
508
|
-
bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
|
|
509
|
-
),
|
|
510
|
-
quantity: bundleItem.num || bundleItem.quantity || 1,
|
|
511
|
-
item: bundleItem,
|
|
512
|
-
mainQuantity
|
|
513
|
-
// 子商品的mainQuantity是所属主商品的quantity
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
for (let relationDetail of item._extend.relation_details || []) {
|
|
518
|
-
if (isProductMatchSurchargeCondition(
|
|
519
|
-
{
|
|
520
|
-
isCustomItem: false,
|
|
521
|
-
startDate: item._extend.startDate,
|
|
522
|
-
product_id: relationDetail.product_id
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
surchargeConfig,
|
|
526
|
-
scheduleById: scheduleById || {},
|
|
527
|
-
ScheduleModule
|
|
528
|
-
}
|
|
529
|
-
)) {
|
|
530
|
-
matchedItems.push({
|
|
531
|
-
isMain: false,
|
|
532
|
-
total: Number(
|
|
533
|
-
(relationDetail == null ? void 0 : relationDetail.price) || ((_c = relationDetail == null ? void 0 : relationDetail.metadata) == null ? void 0 : _c.main_product_attached_bundle_selling_price)
|
|
534
|
-
),
|
|
535
|
-
quantity: relationDetail.num || relationDetail.quantity || 1,
|
|
536
|
-
item: relationDetail,
|
|
537
|
-
mainQuantity: 1
|
|
538
|
-
// 加时商品不受主商品数量影响
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
364
|
}
|
|
543
365
|
}
|
|
544
366
|
if (Array.isArray(addons == null ? void 0 : addons.value)) {
|
|
@@ -549,84 +371,28 @@ var getSurcharge = (state, options) => {
|
|
|
549
371
|
ScheduleModule
|
|
550
372
|
})) {
|
|
551
373
|
matchedItems.push({
|
|
552
|
-
isMain: true,
|
|
553
374
|
total: Number(item._extend.total),
|
|
554
|
-
quantity: item._extend.quantity || 1
|
|
555
|
-
item,
|
|
556
|
-
mainQuantity: 1
|
|
557
|
-
// addons独立商品,mainQuantity为1
|
|
375
|
+
quantity: item._extend.quantity || 1
|
|
558
376
|
});
|
|
559
377
|
}
|
|
560
378
|
}
|
|
561
379
|
}
|
|
562
380
|
let finalAmount = 0;
|
|
563
|
-
const productCount = matchedItems.reduce((total, item) => {
|
|
564
|
-
if (item.isMain) {
|
|
565
|
-
return total + (item.quantity || 1);
|
|
566
|
-
} else {
|
|
567
|
-
return total + (item.quantity || 1) * (item.mainQuantity || 1);
|
|
568
|
-
}
|
|
569
|
-
}, 0);
|
|
570
|
-
let fixedTotal = new import_decimal.default(0);
|
|
571
|
-
let productTotalSurcharge = new import_decimal.default(0);
|
|
572
381
|
if (matchedItems.length > 0) {
|
|
573
382
|
let configTotal = new import_decimal.default(0);
|
|
574
|
-
if (
|
|
575
|
-
configTotal = configTotal.plus(fixed);
|
|
576
|
-
}
|
|
577
|
-
if (percentage && new import_decimal.default(percentage).gt(0) || fixed) {
|
|
383
|
+
if (percentage && new import_decimal.default(percentage).gt(0)) {
|
|
578
384
|
const percentageRate = new import_decimal.default(percentage);
|
|
579
|
-
for (let
|
|
580
|
-
const isLast = index === matchedItems.length - 1;
|
|
385
|
+
for (let item of matchedItems) {
|
|
581
386
|
const itemPrice = new import_decimal.default(Math.max(0, item.total || 0));
|
|
582
|
-
const itemQuantity = new import_decimal.default(item.
|
|
387
|
+
const itemQuantity = new import_decimal.default(item.quantity || 1);
|
|
583
388
|
const addTimeTotal = new import_decimal.default(item.addTimeTotal || 0);
|
|
584
|
-
const
|
|
585
|
-
configTotal = configTotal.plus(
|
|
586
|
-
const itemSurcharge = itemPrice.times(percentageRate);
|
|
587
|
-
const fixedSurcharge = new import_decimal.default(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
|
|
588
|
-
const quantity = item.isMain ? item.quantity : item.quantity * item.mainQuantity;
|
|
589
|
-
fixedTotal = fixedTotal.plus(new import_decimal.default(fixedSurcharge).times(quantity).toNumber());
|
|
590
|
-
if (isLast && fixedTotal.gt(0)) {
|
|
591
|
-
const remaining = new import_decimal.default(fixed).minus(fixedTotal).toNumber();
|
|
592
|
-
if (remaining > 0) {
|
|
593
|
-
productTotalSurcharge = productTotalSurcharge.plus(remaining);
|
|
594
|
-
if (item.isMain) {
|
|
595
|
-
item.item._extend.surcharge_rounding_remainder = remaining;
|
|
596
|
-
} else {
|
|
597
|
-
item.item.surcharge_rounding_remainder = remaining;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
if (open_product !== 0) {
|
|
602
|
-
if (item.isMain) {
|
|
603
|
-
const originSurchargeFee = new import_decimal.default(item.item._extend.surcharge_fee || 0);
|
|
604
|
-
const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
|
|
605
|
-
productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
|
|
606
|
-
item.item._extend.surcharge_fee = surchargeFee;
|
|
607
|
-
item.item._extend.relation_surcharge_ids = [...((_d = item.item._extend) == null ? void 0 : _d.relation_surcharge_ids) || [], id];
|
|
608
|
-
} else {
|
|
609
|
-
const originSurchargeFee = new import_decimal.default(item.item.surcharge_fee || 0);
|
|
610
|
-
const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
|
|
611
|
-
productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
|
|
612
|
-
item.item.surcharge_fee = surchargeFee;
|
|
613
|
-
item.item.relation_surcharge_ids = [...((_e = item.item) == null ? void 0 : _e.relation_surcharge_ids) || [], id];
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
|
|
617
|
-
const configTotalRounded = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
|
|
618
|
-
if (item.isMain) {
|
|
619
|
-
let newRoundingRemainder = new import_decimal.default(item.item._extend.surcharge_rounding_remainder || 0);
|
|
620
|
-
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
621
|
-
item.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
622
|
-
} else {
|
|
623
|
-
let newRoundingRemainder = new import_decimal.default(item.item.surcharge_rounding_remainder || 0);
|
|
624
|
-
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
625
|
-
item.item.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
626
|
-
}
|
|
627
|
-
}
|
|
389
|
+
const itemSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
|
|
390
|
+
configTotal = configTotal.plus(itemSurcharge);
|
|
628
391
|
}
|
|
629
392
|
}
|
|
393
|
+
if (fixed && new import_decimal.default(fixed).gt(0)) {
|
|
394
|
+
configTotal = configTotal.plus(fixed);
|
|
395
|
+
}
|
|
630
396
|
finalAmount = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP).toNumber();
|
|
631
397
|
}
|
|
632
398
|
const name = surchargeConfig.name || {};
|
|
@@ -644,10 +410,7 @@ var getSurcharge = (state, options) => {
|
|
|
644
410
|
type: "default",
|
|
645
411
|
fixed,
|
|
646
412
|
amount: finalAmount,
|
|
647
|
-
percentage
|
|
648
|
-
metadata: {
|
|
649
|
-
open_product
|
|
650
|
-
}
|
|
413
|
+
percentage
|
|
651
414
|
});
|
|
652
415
|
}
|
|
653
416
|
return surchargeWithAmount;
|
|
@@ -757,19 +520,6 @@ var getSumTotal = (state, options) => {
|
|
|
757
520
|
state,
|
|
758
521
|
options
|
|
759
522
|
});
|
|
760
|
-
const { productExpectAmount: productExpectAmountWithoutDiscount } = getProductExpectAmount(
|
|
761
|
-
state,
|
|
762
|
-
options.isEdit,
|
|
763
|
-
true
|
|
764
|
-
);
|
|
765
|
-
const originExpectAmountWithoutDiscount = getExpectAmount({
|
|
766
|
-
price: productExpectAmountWithoutDiscount,
|
|
767
|
-
tax: originTax,
|
|
768
|
-
surchargeAmount,
|
|
769
|
-
shopDiscount: 0,
|
|
770
|
-
state,
|
|
771
|
-
options
|
|
772
|
-
});
|
|
773
523
|
const sumTotalAmount = getSumTotalAmount({ expectAmount, roundingAmount });
|
|
774
524
|
const sumTotalAmountDecimal = new import_decimal.default((0, import_utils2.formatAmount)(sumTotalAmount, 2, "") || 0);
|
|
775
525
|
const orderPaidAmountDecimal = new import_decimal.default(orderPaidAmount || 0);
|
|
@@ -796,9 +546,7 @@ var getSumTotal = (state, options) => {
|
|
|
796
546
|
totalRefundAmount,
|
|
797
547
|
dueAmount,
|
|
798
548
|
roundingAmount,
|
|
799
|
-
originExpectAmount
|
|
800
|
-
// 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
|
|
801
|
-
originExpectAmountWithoutDiscount
|
|
549
|
+
originExpectAmount
|
|
802
550
|
};
|
|
803
551
|
};
|
|
804
552
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -62,7 +62,7 @@ var import_ahooks = require("ahooks");
|
|
|
62
62
|
var import_lodash = require("lodash");
|
|
63
63
|
var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
64
64
|
var Footer = (props) => {
|
|
65
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p
|
|
65
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
66
66
|
const { state, buttons, dispatch, source } = props;
|
|
67
67
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
68
68
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
@@ -467,11 +467,7 @@ var Footer = (props) => {
|
|
|
467
467
|
(_l = (_k = state.client) == null ? void 0 : _k.value) == null ? void 0 : _l.id
|
|
468
468
|
]);
|
|
469
469
|
const handleCheckoutInternal = async () => {
|
|
470
|
-
|
|
471
|
-
const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
|
|
472
|
-
if (isToastMode) {
|
|
473
|
-
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
|
474
|
-
}
|
|
470
|
+
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
|
475
471
|
const isNewOrder = !state.bookingId;
|
|
476
472
|
if (isEdit) {
|
|
477
473
|
if ((0, import_utils2.isDayBooking)(state)) {
|
|
@@ -498,18 +494,18 @@ var Footer = (props) => {
|
|
|
498
494
|
setIsPaymentModalOpen(true);
|
|
499
495
|
setCheckoutLoading(false);
|
|
500
496
|
setPaymentCallback(() => (paymentResult) => {
|
|
501
|
-
var
|
|
497
|
+
var _a2, _b2, _c2, _d2;
|
|
502
498
|
console.log("Payment result:", paymentResult);
|
|
503
499
|
setIsPaymentModalOpen(false);
|
|
504
500
|
if ((paymentResult == null ? void 0 : paymentResult.status) === "success") {
|
|
505
501
|
console.log("Payment completed successfully");
|
|
506
|
-
(
|
|
502
|
+
(_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
|
|
507
503
|
setPaymentModalData(null);
|
|
508
504
|
setPaymentCallback(null);
|
|
509
505
|
} else if ((paymentResult == null ? void 0 : paymentResult.status) === "cancelled") {
|
|
510
506
|
console.log("Payment cancelled");
|
|
511
507
|
if (res == null ? void 0 : res.order_id) {
|
|
512
|
-
(_d2 = (
|
|
508
|
+
(_d2 = (_c2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _c2.booking) == null ? void 0 : _d2.voidBooking(res.order_id);
|
|
513
509
|
}
|
|
514
510
|
setPaymentModalData(null);
|
|
515
511
|
setPaymentCallback(null);
|
|
@@ -600,11 +596,8 @@ var Footer = (props) => {
|
|
|
600
596
|
messageShow = true,
|
|
601
597
|
noSubmit = false
|
|
602
598
|
}) => {
|
|
603
|
-
var _a2, _b2, _c2, _d2, _e2
|
|
604
|
-
|
|
605
|
-
if (isToastMode) {
|
|
606
|
-
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
|
607
|
-
}
|
|
599
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
600
|
+
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
|
608
601
|
if ((0, import_utils2.isDayBooking)(state)) {
|
|
609
602
|
const isHasDayProducts = handleDaySubmit();
|
|
610
603
|
if (isHasDayProducts) return;
|
|
@@ -619,7 +612,7 @@ var Footer = (props) => {
|
|
|
619
612
|
const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
|
|
620
613
|
let saveOtherValue = {};
|
|
621
614
|
if (type === "save") {
|
|
622
|
-
saveOtherValue = await ((
|
|
615
|
+
saveOtherValue = await ((_a2 = state == null ? void 0 : state.onSave) == null ? void 0 : _a2.call(state, state.client)) || {};
|
|
623
616
|
}
|
|
624
617
|
try {
|
|
625
618
|
let callbackData = null;
|
|
@@ -665,7 +658,7 @@ var Footer = (props) => {
|
|
|
665
658
|
{ key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
|
|
666
659
|
{
|
|
667
660
|
key: "店铺id",
|
|
668
|
-
value: (
|
|
661
|
+
value: (_e2 = (_d2 = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
|
|
669
662
|
},
|
|
670
663
|
{
|
|
671
664
|
key: "shopApi",
|
|
@@ -1420,20 +1413,8 @@ var Footer = (props) => {
|
|
|
1420
1413
|
data: paymentModalData,
|
|
1421
1414
|
callback: paymentCallback || void 0,
|
|
1422
1415
|
setEditCartMode,
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
client: (_t = state.client) == null ? void 0 : _t.value,
|
|
1426
|
-
currentTotalPrice: total.productAmount,
|
|
1427
|
-
onChangeShopDiscount: (discount) => {
|
|
1428
|
-
dispatch({
|
|
1429
|
-
type: "setState",
|
|
1430
|
-
payload: {
|
|
1431
|
-
shop_discount: discount
|
|
1432
|
-
}
|
|
1433
|
-
});
|
|
1434
|
-
},
|
|
1435
|
-
onChangeOrderNote: handleNoteConfirm,
|
|
1436
|
-
onDeleteOrderNote: handleNoteDelete,
|
|
1416
|
+
state,
|
|
1417
|
+
dispatch,
|
|
1437
1418
|
onClose: (reset) => {
|
|
1438
1419
|
setIsPaymentModalOpen(false);
|
|
1439
1420
|
setPaymentModalData(null);
|
|
@@ -16,11 +16,6 @@ export declare const formatProductOption: (option: any) => any;
|
|
|
16
16
|
* @Date: 2024-02-19 09:26
|
|
17
17
|
*/
|
|
18
18
|
export declare const formatProductBundle: (bundle: any) => any;
|
|
19
|
-
/**
|
|
20
|
-
* 获取子商品折扣信息
|
|
21
|
-
* @param item
|
|
22
|
-
*/
|
|
23
|
-
export declare const getBundleDiscountList: (bundle: any[]) => any[];
|
|
24
19
|
export interface ResourceItem {
|
|
25
20
|
[key: string]: any;
|
|
26
21
|
}
|
|
@@ -42,19 +37,5 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
|
|
|
42
37
|
* @Date: 2024-12-23 12:05
|
|
43
38
|
*/
|
|
44
39
|
export declare const formatProductPrice: (item: any) => number;
|
|
45
|
-
/**
|
|
46
|
-
* checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
|
|
47
|
-
* @param item
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
export declare const formatOriginalPrice: (item: any) => number;
|
|
51
|
-
/**
|
|
52
|
-
* checkout2.0: 商品维度折扣后价格, original_price - 商品折扣金额(商品手动折扣等等)
|
|
53
|
-
* @param item
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
export declare const formatSellingPrice: (item: any) => number;
|
|
57
|
-
export declare const getSourceProductPrice: (item: any) => number;
|
|
58
|
-
export declare const getMainProductSellingPrice: (item: any) => number | undefined;
|
|
59
40
|
export declare const formatValues: (state: any) => any;
|
|
60
41
|
export declare const checkHolderIsError: (state: any) => any;
|