@pisell/private-materials 6.6.5 → 6.6.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 +1 -1
- package/build/lowcode/preview.js +7 -7
- 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/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +25 -22
- package/es/components/appointmentBooking/components/Voucher/index.js +15 -1
- package/es/components/booking/addons/index.js +25 -17
- package/es/components/booking/components/actionButtons/index.js +3 -1
- 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.js +36 -33
- package/es/components/booking/components/footer/utils.d.ts +19 -0
- package/es/components/booking/components/footer/utils.js +166 -67
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +53 -15
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +4 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +5 -3
- package/es/components/booking/info2/service/addService/index.js +9 -9
- package/es/components/booking/info2/service/editNormalService/index.js +6 -0
- package/es/components/booking/info2/service/editService/index.js +27 -17
- 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/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +15 -2
- package/es/components/checkout/components/AmountSummary/index.less +4 -5
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
- 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 +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/utils/log/index.js +371 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +2 -2
- package/es/components/index.js +2 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/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 +0 -1
- 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/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/es/components/{wallet/serve.js → systemSettings/registry/components/GroupModal.js} +145 -190
- 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/ticketBooking/components/addServiceVariant/addService.js +7 -5
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +37 -17
- package/es/components/walletList/index.d.ts +0 -25
- package/es/components/walletList/index.js +173 -41
- package/es/components/walletList/locales.d.ts +9 -0
- package/es/components/walletList/locales.js +12 -3
- package/es/components/walletList/serve.d.ts +19 -0
- package/es/components/walletList/serve.js +94 -5
- package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/es/components/walletList/tempHolderSelector/index.js +196 -0
- package/es/components/walletList/tempHolderSelector/index.less +63 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +4 -3
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/walletEditor/WalletEditor.js +60 -2
- package/es/plus/walletEditor/locales.d.ts +9 -0
- package/es/plus/walletEditor/locales.js +12 -3
- 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.js +5 -1
- 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/passList/index.js +17 -5
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/index.js +226 -42
- package/es/plus/walletPassGallery/locales.d.ts +15 -0
- package/es/plus/walletPassGallery/locales.js +29 -5
- package/es/plus/walletPassGallery/serve.d.ts +15 -1
- package/es/plus/walletPassGallery/serve.js +59 -2
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/plus/walletPassGallery/utils.js +342 -0
- package/es/pro/Login2.0/index.less +15 -8
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +35 -30
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +5 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +13 -1
- package/lib/components/booking/addons/index.js +15 -7
- package/lib/components/booking/components/actionButtons/index.js +4 -2
- 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.js +5 -2
- package/lib/components/booking/components/footer/utils.d.ts +19 -0
- package/lib/components/booking/components/footer/utils.js +111 -35
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +56 -16
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +2 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +4 -2
- package/lib/components/booking/info2/service/addService/index.js +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
- package/lib/components/booking/info2/service/editService/index.js +30 -8
- 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/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +11 -0
- package/lib/components/checkout/components/AmountSummary/index.less +4 -5
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
- 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 +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/utils/log/index.js +294 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +2 -2
- package/lib/components/index.js +3 -3
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/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 +0 -1
- 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/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- 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/{wallet → systemSettings/registry}/components/index.js +13 -10
- 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/{wallet/RechargeableCard/serve.js → systemSettings/registry/types.js} +3 -19
- 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/ticketBooking/components/addServiceVariant/addService.js +9 -7
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +21 -6
- package/lib/components/walletList/index.d.ts +0 -25
- package/lib/components/walletList/index.js +100 -4
- package/lib/components/walletList/locales.d.ts +9 -0
- package/lib/components/walletList/locales.js +12 -3
- package/lib/components/walletList/serve.d.ts +19 -0
- package/lib/components/walletList/serve.js +26 -3
- package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/lib/components/walletList/tempHolderSelector/index.js +166 -0
- package/lib/components/walletList/tempHolderSelector/index.less +63 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +5 -2
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/walletEditor/WalletEditor.js +53 -0
- package/lib/plus/walletEditor/locales.d.ts +9 -0
- package/lib/plus/walletEditor/locales.js +12 -3
- 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.js +4 -1
- 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/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/index.js +157 -28
- package/lib/plus/walletPassGallery/locales.d.ts +15 -0
- package/lib/plus/walletPassGallery/locales.js +32 -5
- package/lib/plus/walletPassGallery/serve.d.ts +15 -1
- package/lib/plus/walletPassGallery/serve.js +17 -5
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/plus/walletPassGallery/utils.js +287 -0
- package/lib/pro/Login2.0/index.less +15 -8
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +34 -39
- package/lowcode/settings-registry/meta.ts +29 -0
- package/package.json +3 -3
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/index.js +0 -1182
- package/es/components/wallet/Detail/index.less +0 -386
- package/es/components/wallet/Detail/locales.d.ts +0 -153
- package/es/components/wallet/Detail/locales.js +0 -170
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/model.js +0 -22
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/Detail/serve.js +0 -64
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DetailContext.js +0 -162
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/index.js +0 -218
- package/es/components/wallet/DiscountCard/index.less +0 -9
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/DiscountCard/model.js +0 -22
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/index.js +0 -169
- package/es/components/wallet/PointCard/index.less +0 -9
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/PointCard/model.js +0 -22
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.js +0 -463
- package/es/components/wallet/RechargeableCard/index.less +0 -108
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/model.js +0 -28
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/RechargeableCard/serve.js +0 -32
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/index.js +0 -131
- package/es/components/wallet/Voucher/index.less +0 -9
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/locales.js +0 -20
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/Voucher/model.js +0 -22
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/FooterButtons/index.js +0 -81
- package/es/components/wallet/components/FooterButtons/index.less +0 -91
- package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/es/components/wallet/components/UsageRules/index.js +0 -147
- package/es/components/wallet/components/UsageRules/index.less +0 -157
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletBar/index.js +0 -19
- package/es/components/wallet/components/WalletBar/index.less +0 -36
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/WalletCard.js +0 -91
- package/es/components/wallet/components/index.d.ts +0 -3
- package/es/components/wallet/components/index.js +0 -4
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/es/components/wallet/hooks/useWalletCard.js +0 -147
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/index.js +0 -807
- package/es/components/wallet/index.less +0 -151
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/locales.js +0 -139
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/model.js +0 -86
- package/es/components/wallet/serve.d.ts +0 -150
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/index.js +0 -874
- package/lib/components/wallet/Detail/index.less +0 -386
- package/lib/components/wallet/Detail/locales.d.ts +0 -153
- package/lib/components/wallet/Detail/locales.js +0 -194
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/model.js +0 -43
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/Detail/serve.js +0 -44
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DetailContext.js +0 -118
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/index.js +0 -209
- package/lib/components/wallet/DiscountCard/index.less +0 -9
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/DiscountCard/model.js +0 -43
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/index.js +0 -190
- package/lib/components/wallet/PointCard/index.less +0 -9
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/PointCard/model.js +0 -43
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.js +0 -380
- package/lib/components/wallet/RechargeableCard/index.less +0 -108
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/model.js +0 -49
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/index.js +0 -146
- package/lib/components/wallet/Voucher/index.less +0 -9
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/locales.js +0 -44
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/Voucher/model.js +0 -43
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/FooterButtons/index.js +0 -109
- package/lib/components/wallet/components/FooterButtons/index.less +0 -91
- package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/lib/components/wallet/components/UsageRules/index.js +0 -113
- package/lib/components/wallet/components/UsageRules/index.less +0 -157
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletBar/index.js +0 -49
- package/lib/components/wallet/components/WalletBar/index.less +0 -36
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/WalletCard.js +0 -97
- package/lib/components/wallet/components/index.d.ts +0 -3
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/lib/components/wallet/hooks/useWalletCard.js +0 -111
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/index.js +0 -580
- package/lib/components/wallet/index.less +0 -151
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/locales.js +0 -163
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/model.js +0 -91
- package/lib/components/wallet/serve.d.ts +0 -150
- package/lib/components/wallet/serve.js +0 -85
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/wallet/utils/formatUtils.js +0 -73
|
@@ -87,11 +87,14 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
87
87
|
setting: { can_input: true, item_max_length: isShowProductDetailStepper, is_detail_open: clickType === "cover" }
|
|
88
88
|
},
|
|
89
89
|
callback: async (data) => {
|
|
90
|
-
var _a, _b;
|
|
90
|
+
var _a, _b, _c, _d, _e;
|
|
91
91
|
if (data.isCancel) {
|
|
92
92
|
appointmentBooking.closeProductDetail();
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
+
if (data == null ? void 0 : data.origin) {
|
|
96
|
+
data.origin.isFormSubject = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.bookingSetting) == null ? void 0 : _b.bookingSubject) == null ? void 0 : _c.type) === "form";
|
|
97
|
+
}
|
|
95
98
|
const product = {
|
|
96
99
|
...data,
|
|
97
100
|
options: (data == null ? void 0 : data.option) || []
|
|
@@ -125,7 +128,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
125
128
|
endDate
|
|
126
129
|
});
|
|
127
130
|
} else {
|
|
128
|
-
const resources = ((
|
|
131
|
+
const resources = ((_e = (_d = data == null ? void 0 : data.origin) == null ? void 0 : _d.product_resource) == null ? void 0 : _e.resources) || [];
|
|
129
132
|
const activeStatus = resources.find((item2) => item2.status === 1);
|
|
130
133
|
if (!activeStatus && !appointmentBooking.isTargetNormalProduct(data == null ? void 0 : data.origin)) {
|
|
131
134
|
return (0, import_utils2.Toast)(
|
|
@@ -96,7 +96,7 @@ var VoucherCard = (props) => {
|
|
|
96
96
|
return {
|
|
97
97
|
_id: item._id,
|
|
98
98
|
quantity: item.num,
|
|
99
|
-
bundle: item.
|
|
99
|
+
bundle: item.bundle,
|
|
100
100
|
options: item._optionsOrigin,
|
|
101
101
|
product: {
|
|
102
102
|
...item._productOrigin
|
|
@@ -111,6 +111,18 @@ var VoucherCard = (props) => {
|
|
|
111
111
|
const val = shopDiscount.calcDiscount(products2);
|
|
112
112
|
batchUpdateCart(val.productList);
|
|
113
113
|
};
|
|
114
|
+
const stringifiedHolders = (0, import_react.useMemo)(() => {
|
|
115
|
+
let _ret;
|
|
116
|
+
try {
|
|
117
|
+
_ret = JSON.stringify(products.map((item) => (item == null ? void 0 : item.holder_id) || ""));
|
|
118
|
+
} catch (error) {
|
|
119
|
+
_ret = "";
|
|
120
|
+
}
|
|
121
|
+
return _ret;
|
|
122
|
+
}, [products]);
|
|
123
|
+
(0, import_react.useEffect)(() => {
|
|
124
|
+
onCartChange();
|
|
125
|
+
}, [stringifiedHolders]);
|
|
114
126
|
(0, import_react.useEffect)(() => {
|
|
115
127
|
const val = shopDiscount.getDiscountList();
|
|
116
128
|
setDisCountList(val);
|
|
@@ -51,23 +51,31 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
|
|
|
51
51
|
var formatProducts = (values) => {
|
|
52
52
|
let arr = [];
|
|
53
53
|
arr = values.map((item) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
55
|
+
const bundleDiscountList = (0, import_utils.getBundleDiscountList)(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
|
|
56
|
+
const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
|
|
57
|
+
discount_list.push(...bundleDiscountList);
|
|
55
58
|
return {
|
|
56
59
|
order_detail_id: item.order_detail_id || 0,
|
|
57
60
|
num: item._extend.quantity,
|
|
58
61
|
price: (0, import_utils.formatProductPrice)(item),
|
|
59
62
|
product_id: item.id,
|
|
60
|
-
discount_list:
|
|
63
|
+
discount_list: discount_list || [],
|
|
61
64
|
discount_amount: 0,
|
|
62
65
|
product_discount_reason: "",
|
|
63
66
|
is_charge_tax: item.is_charge_tax,
|
|
64
67
|
note: "",
|
|
65
68
|
discountway: "num",
|
|
66
69
|
discount_type: "discount",
|
|
67
|
-
bundle_edit: (
|
|
68
|
-
product_bundle: (0, import_utils.formatProductBundle)((
|
|
69
|
-
"product_option_item": (0, import_utils.formatProductOption)((
|
|
70
|
-
"product_variant_id": ((
|
|
70
|
+
bundle_edit: (_c = item._extend) == null ? void 0 : _c.bundle_edit,
|
|
71
|
+
product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
|
|
72
|
+
"product_option_item": (0, import_utils.formatProductOption)((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
|
|
73
|
+
"product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
|
|
74
|
+
"source_product_price": (0, import_utils.getSourceProductPrice)(item),
|
|
75
|
+
"main_product_selling_price": (0, import_utils.getMainProductSellingPrice)(item) ?? (0, import_utils.formatProductPrice)(item),
|
|
76
|
+
"calculated_original_price": (0, import_utils.formatOriginalPrice)(item),
|
|
77
|
+
"calculated_selling_price": (0, import_utils.formatSellingPrice)(item),
|
|
78
|
+
"tax_fee": item._extend.tax_fee
|
|
71
79
|
};
|
|
72
80
|
});
|
|
73
81
|
return arr;
|
|
@@ -241,12 +249,12 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
241
249
|
isAddons: true,
|
|
242
250
|
_key: e.key,
|
|
243
251
|
_extend: {
|
|
244
|
-
price: _detail.price,
|
|
245
252
|
other: e,
|
|
246
253
|
quantity: (e == null ? void 0 : e.quantity) || 1
|
|
247
254
|
},
|
|
248
255
|
quantity: (e == null ? void 0 : e.quantity) || 1
|
|
249
256
|
};
|
|
257
|
+
product._extend.price = (0, import_utils2.getMainPrice)(product, _detail.price);
|
|
250
258
|
let _total = (0, import_utils2.getProductTotalPrice)(product);
|
|
251
259
|
product._extend.total = _total;
|
|
252
260
|
product._extend.origin_total = _total;
|
|
@@ -72,7 +72,8 @@ var ActionButtons = ({
|
|
|
72
72
|
const { ScheduleModule } = pisellosAllModule;
|
|
73
73
|
const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
|
|
74
74
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
75
|
-
var _a2, _b2;
|
|
75
|
+
var _a2, _b2, _c2;
|
|
76
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
76
77
|
dispatch({
|
|
77
78
|
type: "setClient",
|
|
78
79
|
payload: {
|
|
@@ -80,7 +81,8 @@ var ActionButtons = ({
|
|
|
80
81
|
edit: true
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
|
-
if ((
|
|
84
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
85
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
84
86
|
dispatch({
|
|
85
87
|
type: "setService",
|
|
86
88
|
payload: {
|
|
@@ -48,7 +48,7 @@ var getRelationDetailsTotal = (relation_details) => {
|
|
|
48
48
|
}
|
|
49
49
|
return total.toNumber();
|
|
50
50
|
};
|
|
51
|
-
var getProductExpectAmount = (state, isEdit) => {
|
|
51
|
+
var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
|
|
52
52
|
var _a, _b, _c, _d;
|
|
53
53
|
let price = new import_decimal.default(0);
|
|
54
54
|
let duration = new import_decimal.default(0);
|
|
@@ -62,7 +62,8 @@ var getProductExpectAmount = (state, isEdit) => {
|
|
|
62
62
|
if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item) || (0, import_utils4.isMultiDayProduct)(item)) {
|
|
63
63
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
64
64
|
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
|
65
|
-
|
|
65
|
+
const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
|
|
66
|
+
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
66
67
|
const _duration = !(0, import_utils3.isNormalProductByDurationSchedule)(item) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
|
|
67
68
|
if (isDay || (0, import_utils4.isMultiDayProduct)(item)) {
|
|
68
69
|
dayDuration = dayDuration.add(_duration);
|
|
@@ -72,7 +73,8 @@ var getProductExpectAmount = (state, isEdit) => {
|
|
|
72
73
|
} else {
|
|
73
74
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
74
75
|
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
|
75
|
-
|
|
76
|
+
const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
|
|
77
|
+
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
76
78
|
const relationTotal = new import_decimal.default(getRelationDetailsTotal(
|
|
77
79
|
item._extend.relation_details || []
|
|
78
80
|
));
|
|
@@ -91,7 +93,8 @@ var getProductExpectAmount = (state, isEdit) => {
|
|
|
91
93
|
for (let item of state.addons.value) {
|
|
92
94
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
93
95
|
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
|
94
|
-
|
|
96
|
+
const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
|
|
97
|
+
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
}
|
|
@@ -147,9 +150,10 @@ var getProductItemTax = (item, state, options) => {
|
|
|
147
150
|
}
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
|
-
return singleItemTax.times(quantity);
|
|
153
|
+
return singleItemTax.times(quantity).toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
|
|
151
154
|
};
|
|
152
155
|
var processItemsTax = (items, state, options) => {
|
|
156
|
+
var _a, _b, _c;
|
|
153
157
|
const { tax_rate, is_price_include_tax, computed } = options;
|
|
154
158
|
const { shopDiscount, productExpectAmount } = computed;
|
|
155
159
|
let originTax = new import_decimal.default(0);
|
|
@@ -157,10 +161,11 @@ var processItemsTax = (items, state, options) => {
|
|
|
157
161
|
for (let item of items) {
|
|
158
162
|
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
|
159
163
|
const unitPrice = new import_decimal.default(item._extend.total || 0);
|
|
160
|
-
const
|
|
164
|
+
const mainProductPrice = new import_decimal.default(getMainProductTotal(item) || 0);
|
|
165
|
+
let originalTaxPerItem = getProductItemTax(
|
|
161
166
|
{
|
|
162
167
|
...item,
|
|
163
|
-
total:
|
|
168
|
+
total: mainProductPrice.add(((_a = item._extend) == null ? void 0 : _a.surcharge_fee) || 0).toNumber(),
|
|
164
169
|
quantity: 1
|
|
165
170
|
},
|
|
166
171
|
state,
|
|
@@ -170,19 +175,22 @@ var processItemsTax = (items, state, options) => {
|
|
|
170
175
|
if (productExpectAmount > 0) {
|
|
171
176
|
itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
172
177
|
}
|
|
173
|
-
|
|
174
|
-
|
|
178
|
+
let mainItemDiscount = new import_decimal.default(0);
|
|
179
|
+
if (unitPrice.greaterThan(0)) {
|
|
180
|
+
mainItemDiscount = mainProductPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
181
|
+
}
|
|
182
|
+
const mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_b = item._extend) == null ? void 0 : _b.surcharge_fee) || 0);
|
|
183
|
+
const maxDiscountedTaxPerItem = getProductItemTax(
|
|
175
184
|
{
|
|
176
185
|
...item,
|
|
177
|
-
total:
|
|
186
|
+
total: mainItemDiscountedUnitPrice.toNumber(),
|
|
178
187
|
price: item._extend.total,
|
|
179
188
|
quantity: 1
|
|
180
189
|
},
|
|
181
190
|
state,
|
|
182
191
|
{ tax_rate, is_price_include_tax }
|
|
183
192
|
);
|
|
184
|
-
item._extend.
|
|
185
|
-
item._extend.tax_fee = discountedTaxPerItem.toNumber();
|
|
193
|
+
item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItem.toNumber();
|
|
186
194
|
let addTimeTotalTax = new import_decimal.default(0);
|
|
187
195
|
if (Array.isArray(item._extend.relation_details)) {
|
|
188
196
|
for (let atItem of item._extend.relation_details) {
|
|
@@ -198,8 +206,7 @@ var processItemsTax = (items, state, options) => {
|
|
|
198
206
|
const addTimeTaxPerItem = getProductItemTax(
|
|
199
207
|
{
|
|
200
208
|
...atItem,
|
|
201
|
-
total: _discountedTotal,
|
|
202
|
-
// 可能包含原有数据,或前端临时数据
|
|
209
|
+
total: _discountedTotal.add((atItem == null ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
|
|
203
210
|
quantity: atItem.product_quantity || atItem.num || 1
|
|
204
211
|
},
|
|
205
212
|
state,
|
|
@@ -208,8 +215,51 @@ var processItemsTax = (items, state, options) => {
|
|
|
208
215
|
addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
|
|
209
216
|
}
|
|
210
217
|
}
|
|
211
|
-
|
|
212
|
-
|
|
218
|
+
let bundleTotalOriginTax = new import_decimal.default(0);
|
|
219
|
+
let bundleTotalTax = new import_decimal.default(0);
|
|
220
|
+
if (Array.isArray((_c = item._extend.other) == null ? void 0 : _c.bundle)) {
|
|
221
|
+
for (let bundleItem of item._extend.other.bundle) {
|
|
222
|
+
if (getBundleItemIsOriginalPrice(bundleItem)) {
|
|
223
|
+
const bundleQuantity = new import_decimal.default(bundleItem.quantity || 1);
|
|
224
|
+
const bundleUnitPrice = new import_decimal.default(
|
|
225
|
+
bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
|
|
226
|
+
);
|
|
227
|
+
const bundleOriginalTaxPerItem = getProductItemTax(
|
|
228
|
+
{
|
|
229
|
+
...bundleItem,
|
|
230
|
+
total: bundleUnitPrice.add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
|
|
231
|
+
quantity: 1
|
|
232
|
+
},
|
|
233
|
+
state,
|
|
234
|
+
{ tax_rate, is_price_include_tax }
|
|
235
|
+
);
|
|
236
|
+
let bundleItemDiscount = new import_decimal.default(0);
|
|
237
|
+
if (productExpectAmount > 0) {
|
|
238
|
+
bundleItemDiscount = bundleUnitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
239
|
+
}
|
|
240
|
+
const bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0);
|
|
241
|
+
const bundleDiscountedTaxPerItem = getProductItemTax(
|
|
242
|
+
{
|
|
243
|
+
...bundleItem,
|
|
244
|
+
total: bundleDiscountedUnitPrice.toNumber(),
|
|
245
|
+
quantity: 1
|
|
246
|
+
},
|
|
247
|
+
state,
|
|
248
|
+
{ tax_rate, is_price_include_tax }
|
|
249
|
+
);
|
|
250
|
+
bundleItem.original_tax_fee = new import_decimal.default(bundleOriginalTaxPerItem).toNumber();
|
|
251
|
+
bundleItem.tax_fee = new import_decimal.default(bundleDiscountedTaxPerItem).toNumber();
|
|
252
|
+
bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
|
|
253
|
+
bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
const original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
|
|
258
|
+
const tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
|
|
259
|
+
item._extend.original_tax_fee = original_tax_fee.toNumber();
|
|
260
|
+
item._extend.tax_fee = tax_fee.toNumber();
|
|
261
|
+
originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
262
|
+
tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
213
263
|
}
|
|
214
264
|
return { originTax, tax };
|
|
215
265
|
};
|
|
@@ -270,7 +320,7 @@ var isProductMatchSurchargeCondition = (item, options) => {
|
|
|
270
320
|
}
|
|
271
321
|
const isInScheduleByDate = (_a = options.ScheduleModule) == null ? void 0 : _a.isInScheduleByDate;
|
|
272
322
|
const { surchargeConfig, scheduleById = {} } = options;
|
|
273
|
-
const { startDate,
|
|
323
|
+
const { startDate, product_id, isCustomItem } = item;
|
|
274
324
|
const {
|
|
275
325
|
open_product = 0,
|
|
276
326
|
// 1 | 0
|
|
@@ -294,7 +344,6 @@ var isProductMatchSurchargeCondition = (item, options) => {
|
|
|
294
344
|
if (isCustomItem) {
|
|
295
345
|
isProductMatch = false;
|
|
296
346
|
} else {
|
|
297
|
-
const product_id = other == null ? void 0 : other.product_id;
|
|
298
347
|
isProductMatch = available_product_ids.includes(product_id);
|
|
299
348
|
}
|
|
300
349
|
}
|
|
@@ -324,8 +373,71 @@ var isProductMatchSurchargeCondition = (item, options) => {
|
|
|
324
373
|
}
|
|
325
374
|
return isProductMatch && isScheduleMatch;
|
|
326
375
|
};
|
|
376
|
+
var getBundleItemIsOriginalPrice = (item) => {
|
|
377
|
+
return (item == null ? void 0 : item.price_type) === "markup" && (item == null ? void 0 : item.price_type_ext) === "product_price";
|
|
378
|
+
};
|
|
379
|
+
var getBundleItemIsMarkupPrice = (item) => {
|
|
380
|
+
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));
|
|
381
|
+
};
|
|
382
|
+
var getBundleItemIsDiscountPrice = (item) => {
|
|
383
|
+
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));
|
|
384
|
+
};
|
|
385
|
+
var getBundleItemIsMarkupOrDiscountPrice = (item) => {
|
|
386
|
+
return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
|
|
387
|
+
};
|
|
388
|
+
var getDiscountAmount = (discounts) => {
|
|
389
|
+
return (discounts || []).reduce((total, discount) => {
|
|
390
|
+
return total.add(new import_decimal.default(discount.amount || 0));
|
|
391
|
+
}, new import_decimal.default(0)).toNumber();
|
|
392
|
+
};
|
|
393
|
+
var getMainProductTotal = (item) => {
|
|
394
|
+
var _a, _b, _c, _d, _e, _f;
|
|
395
|
+
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);
|
|
396
|
+
if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
|
|
397
|
+
total = total.add((_e = item._extend.other) == null ? void 0 : _e.option.reduce((t, option) => {
|
|
398
|
+
return t.add(new import_decimal.default(option.price || 0).mul(option.num || 1));
|
|
399
|
+
}, new import_decimal.default(0)));
|
|
400
|
+
}
|
|
401
|
+
for (let bundleItem of ((_f = item._extend.other) == null ? void 0 : _f.bundle) || []) {
|
|
402
|
+
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
403
|
+
const discountAmount = getDiscountAmount(bundleItem.discount_list);
|
|
404
|
+
const bundleItemPrice = new import_decimal.default(bundleItem.bundle_selling_price ?? bundleItem.price ?? 0);
|
|
405
|
+
const bundleItemTotal = bundleItemPrice.minus(discountAmount);
|
|
406
|
+
total = total.add(bundleItemTotal);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return total.toNumber();
|
|
410
|
+
};
|
|
411
|
+
var clearSurchargeFee = (state) => {
|
|
412
|
+
var _a, _b;
|
|
413
|
+
const { service, addons } = state;
|
|
414
|
+
if (Array.isArray(service == null ? void 0 : service.value)) {
|
|
415
|
+
for (let item of service.value) {
|
|
416
|
+
item._extend.surcharge_fee = 0;
|
|
417
|
+
item._extend.relation_surcharge_ids = [];
|
|
418
|
+
for (let bundleItem of ((_a = item._extend.other) == null ? void 0 : _a.bundle) || []) {
|
|
419
|
+
bundleItem.surcharge_fee = 0;
|
|
420
|
+
bundleItem.relation_surcharge_ids = [];
|
|
421
|
+
}
|
|
422
|
+
for (let relationDetail of item._extend.relation_details || []) {
|
|
423
|
+
relationDetail.surcharge_fee = 0;
|
|
424
|
+
relationDetail.relation_surcharge_ids = [];
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (Array.isArray(addons == null ? void 0 : addons.value)) {
|
|
429
|
+
for (let item of addons.value) {
|
|
430
|
+
item._extend.surcharge_fee = 0;
|
|
431
|
+
item._extend.relation_surcharge_ids = [];
|
|
432
|
+
for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
|
|
433
|
+
bundleItem.surcharge_fee = 0;
|
|
434
|
+
bundleItem.relation_surcharge_ids = [];
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
};
|
|
327
439
|
var getSurcharge = (state, options) => {
|
|
328
|
-
var _a;
|
|
440
|
+
var _a, _b, _c, _d, _e;
|
|
329
441
|
const { isEdit, ScheduleModule, surcharge_list, scheduleById } = options;
|
|
330
442
|
const { bookingDetail, bookingId } = state;
|
|
331
443
|
if (!isEdit && bookingId) {
|
|
@@ -350,6 +462,7 @@ var getSurcharge = (state, options) => {
|
|
|
350
462
|
}
|
|
351
463
|
return [];
|
|
352
464
|
}
|
|
465
|
+
clearSurchargeFee(state);
|
|
353
466
|
const { service, addons } = state;
|
|
354
467
|
if (!Array.isArray(surcharge_list) || !(surcharge_list == null ? void 0 : surcharge_list.length)) return [];
|
|
355
468
|
const surchargeWithAmount = [];
|
|
@@ -360,24 +473,89 @@ var getSurcharge = (state, options) => {
|
|
|
360
473
|
fixed = "0",
|
|
361
474
|
id,
|
|
362
475
|
type,
|
|
363
|
-
description
|
|
476
|
+
description,
|
|
477
|
+
open_product
|
|
364
478
|
} = surchargeConfig;
|
|
365
479
|
const matchedItems = [];
|
|
366
480
|
if (Array.isArray(service == null ? void 0 : service.value)) {
|
|
367
481
|
for (let item of service.value) {
|
|
368
|
-
if (isProductMatchSurchargeCondition(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
482
|
+
if (isProductMatchSurchargeCondition(
|
|
483
|
+
{
|
|
484
|
+
isCustomItem: item.isCustomItem,
|
|
485
|
+
startDate: item._extend.startDate,
|
|
486
|
+
product_id: item.product_id
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
surchargeConfig,
|
|
490
|
+
scheduleById: scheduleById || {},
|
|
491
|
+
ScheduleModule
|
|
492
|
+
}
|
|
493
|
+
)) {
|
|
494
|
+
const total = getMainProductTotal(item);
|
|
495
|
+
const mainQuantity = item._extend.quantity || 1;
|
|
373
496
|
matchedItems.push({
|
|
374
|
-
total
|
|
375
|
-
addTimeTotal: getRelationDetailsTotal(
|
|
376
|
-
|
|
377
|
-
),
|
|
378
|
-
|
|
497
|
+
total,
|
|
498
|
+
// addTimeTotal: getRelationDetailsTotal(
|
|
499
|
+
// item._extend.relation_details || []
|
|
500
|
+
// ),
|
|
501
|
+
isMain: true,
|
|
502
|
+
quantity: mainQuantity,
|
|
503
|
+
item,
|
|
504
|
+
mainQuantity
|
|
505
|
+
// 主商品的mainQuantity等于自己的quantity
|
|
379
506
|
});
|
|
380
507
|
}
|
|
508
|
+
for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
|
|
509
|
+
if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition(
|
|
510
|
+
{
|
|
511
|
+
isCustomItem: false,
|
|
512
|
+
startDate: item._extend.startDate,
|
|
513
|
+
product_id: bundleItem._bundle_product_id
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
surchargeConfig,
|
|
517
|
+
scheduleById: scheduleById || {},
|
|
518
|
+
ScheduleModule
|
|
519
|
+
}
|
|
520
|
+
)) {
|
|
521
|
+
const mainQuantity = item._extend.quantity || 1;
|
|
522
|
+
matchedItems.push({
|
|
523
|
+
isMain: false,
|
|
524
|
+
total: Number(
|
|
525
|
+
bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
|
|
526
|
+
),
|
|
527
|
+
quantity: bundleItem.num || bundleItem.quantity || 1,
|
|
528
|
+
item: bundleItem,
|
|
529
|
+
mainQuantity
|
|
530
|
+
// 子商品的mainQuantity是所属主商品的quantity
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
for (let relationDetail of item._extend.relation_details || []) {
|
|
535
|
+
if (isProductMatchSurchargeCondition(
|
|
536
|
+
{
|
|
537
|
+
isCustomItem: false,
|
|
538
|
+
startDate: item._extend.startDate,
|
|
539
|
+
product_id: relationDetail.product_id
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
surchargeConfig,
|
|
543
|
+
scheduleById: scheduleById || {},
|
|
544
|
+
ScheduleModule
|
|
545
|
+
}
|
|
546
|
+
)) {
|
|
547
|
+
matchedItems.push({
|
|
548
|
+
isMain: false,
|
|
549
|
+
total: Number(
|
|
550
|
+
(relationDetail == null ? void 0 : relationDetail.price) || ((_c = relationDetail == null ? void 0 : relationDetail.metadata) == null ? void 0 : _c.main_product_attached_bundle_selling_price)
|
|
551
|
+
),
|
|
552
|
+
quantity: relationDetail.num || relationDetail.quantity || 1,
|
|
553
|
+
item: relationDetail,
|
|
554
|
+
mainQuantity: 1
|
|
555
|
+
// 加时商品不受主商品数量影响
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
}
|
|
381
559
|
}
|
|
382
560
|
}
|
|
383
561
|
if (Array.isArray(addons == null ? void 0 : addons.value)) {
|
|
@@ -388,28 +566,84 @@ var getSurcharge = (state, options) => {
|
|
|
388
566
|
ScheduleModule
|
|
389
567
|
})) {
|
|
390
568
|
matchedItems.push({
|
|
569
|
+
isMain: true,
|
|
391
570
|
total: Number(item._extend.total),
|
|
392
|
-
quantity: item._extend.quantity || 1
|
|
571
|
+
quantity: item._extend.quantity || 1,
|
|
572
|
+
item,
|
|
573
|
+
mainQuantity: 1
|
|
574
|
+
// addons独立商品,mainQuantity为1
|
|
393
575
|
});
|
|
394
576
|
}
|
|
395
577
|
}
|
|
396
578
|
}
|
|
397
579
|
let finalAmount = 0;
|
|
580
|
+
const productCount = matchedItems.reduce((total, item) => {
|
|
581
|
+
if (item.isMain) {
|
|
582
|
+
return total + (item.quantity || 1);
|
|
583
|
+
} else {
|
|
584
|
+
return total + (item.quantity || 1) * (item.mainQuantity || 1);
|
|
585
|
+
}
|
|
586
|
+
}, 0);
|
|
587
|
+
let fixedTotal = new import_decimal.default(0);
|
|
588
|
+
let productTotalSurcharge = new import_decimal.default(0);
|
|
398
589
|
if (matchedItems.length > 0) {
|
|
399
590
|
let configTotal = new import_decimal.default(0);
|
|
400
|
-
if (
|
|
591
|
+
if (fixed && new import_decimal.default(fixed).gt(0)) {
|
|
592
|
+
configTotal = configTotal.plus(fixed);
|
|
593
|
+
}
|
|
594
|
+
if (percentage && new import_decimal.default(percentage).gt(0) || fixed) {
|
|
401
595
|
const percentageRate = new import_decimal.default(percentage);
|
|
402
|
-
for (let item of matchedItems) {
|
|
596
|
+
for (let [index, item] of matchedItems.entries()) {
|
|
597
|
+
const isLast = index === matchedItems.length - 1;
|
|
403
598
|
const itemPrice = new import_decimal.default(Math.max(0, item.total || 0));
|
|
404
|
-
const itemQuantity = new import_decimal.default(item.quantity || 1);
|
|
599
|
+
const itemQuantity = new import_decimal.default(item.isMain ? item.quantity || 1 : item.quantity * item.mainQuantity || 1);
|
|
405
600
|
const addTimeTotal = new import_decimal.default(item.addTimeTotal || 0);
|
|
406
|
-
const
|
|
407
|
-
configTotal = configTotal.plus(
|
|
601
|
+
const itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
|
|
602
|
+
configTotal = configTotal.plus(itemTotalSurcharge);
|
|
603
|
+
const itemSurcharge = itemPrice.times(percentageRate);
|
|
604
|
+
const fixedSurcharge = new import_decimal.default(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
|
|
605
|
+
const quantity = item.isMain ? item.quantity : item.quantity * item.mainQuantity;
|
|
606
|
+
fixedTotal = fixedTotal.plus(new import_decimal.default(fixedSurcharge).times(quantity).toNumber());
|
|
607
|
+
if (isLast && fixedTotal.gt(0)) {
|
|
608
|
+
const remaining = new import_decimal.default(fixed).minus(fixedTotal).toNumber();
|
|
609
|
+
if (remaining > 0) {
|
|
610
|
+
productTotalSurcharge = productTotalSurcharge.plus(remaining);
|
|
611
|
+
if (item.isMain) {
|
|
612
|
+
item.item._extend.surcharge_rounding_remainder = remaining;
|
|
613
|
+
} else {
|
|
614
|
+
item.item.surcharge_rounding_remainder = remaining;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if (open_product !== 0) {
|
|
619
|
+
if (item.isMain) {
|
|
620
|
+
const originSurchargeFee = new import_decimal.default(item.item._extend.surcharge_fee || 0);
|
|
621
|
+
const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
|
|
622
|
+
productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
|
|
623
|
+
item.item._extend.surcharge_fee = surchargeFee;
|
|
624
|
+
item.item._extend.relation_surcharge_ids = [...((_d = item.item._extend) == null ? void 0 : _d.relation_surcharge_ids) || [], id];
|
|
625
|
+
} else {
|
|
626
|
+
const originSurchargeFee = new import_decimal.default(item.item.surcharge_fee || 0);
|
|
627
|
+
const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
|
|
628
|
+
productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
|
|
629
|
+
item.item.surcharge_fee = surchargeFee;
|
|
630
|
+
item.item.relation_surcharge_ids = [...((_e = item.item) == null ? void 0 : _e.relation_surcharge_ids) || [], id];
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
|
|
634
|
+
const configTotalRounded = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
|
|
635
|
+
if (item.isMain) {
|
|
636
|
+
let newRoundingRemainder = new import_decimal.default(item.item._extend.surcharge_rounding_remainder || 0);
|
|
637
|
+
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
638
|
+
item.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
639
|
+
} else {
|
|
640
|
+
let newRoundingRemainder = new import_decimal.default(item.item.surcharge_rounding_remainder || 0);
|
|
641
|
+
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
642
|
+
item.item.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
643
|
+
}
|
|
644
|
+
}
|
|
408
645
|
}
|
|
409
646
|
}
|
|
410
|
-
if (fixed && new import_decimal.default(fixed).gt(0)) {
|
|
411
|
-
configTotal = configTotal.plus(fixed);
|
|
412
|
-
}
|
|
413
647
|
finalAmount = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP).toNumber();
|
|
414
648
|
}
|
|
415
649
|
const name = surchargeConfig.name || {};
|
|
@@ -427,7 +661,10 @@ var getSurcharge = (state, options) => {
|
|
|
427
661
|
type: "default",
|
|
428
662
|
fixed,
|
|
429
663
|
amount: finalAmount,
|
|
430
|
-
percentage
|
|
664
|
+
percentage,
|
|
665
|
+
metadata: {
|
|
666
|
+
open_product
|
|
667
|
+
}
|
|
431
668
|
});
|
|
432
669
|
}
|
|
433
670
|
return surchargeWithAmount;
|
|
@@ -537,6 +774,19 @@ var getSumTotal = (state, options) => {
|
|
|
537
774
|
state,
|
|
538
775
|
options
|
|
539
776
|
});
|
|
777
|
+
const { productExpectAmount: productExpectAmountWithoutDiscount } = getProductExpectAmount(
|
|
778
|
+
state,
|
|
779
|
+
options.isEdit,
|
|
780
|
+
true
|
|
781
|
+
);
|
|
782
|
+
const originExpectAmountWithoutDiscount = getExpectAmount({
|
|
783
|
+
price: productExpectAmountWithoutDiscount,
|
|
784
|
+
tax: originTax,
|
|
785
|
+
surchargeAmount,
|
|
786
|
+
shopDiscount: 0,
|
|
787
|
+
state,
|
|
788
|
+
options
|
|
789
|
+
});
|
|
540
790
|
const sumTotalAmount = getSumTotalAmount({ expectAmount, roundingAmount });
|
|
541
791
|
const sumTotalAmountDecimal = new import_decimal.default((0, import_utils2.formatAmount)(sumTotalAmount, 2, "") || 0);
|
|
542
792
|
const orderPaidAmountDecimal = new import_decimal.default(orderPaidAmount || 0);
|
|
@@ -563,7 +813,9 @@ var getSumTotal = (state, options) => {
|
|
|
563
813
|
totalRefundAmount,
|
|
564
814
|
dueAmount,
|
|
565
815
|
roundingAmount,
|
|
566
|
-
originExpectAmount
|
|
816
|
+
originExpectAmount,
|
|
817
|
+
// 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
|
|
818
|
+
originExpectAmountWithoutDiscount
|
|
567
819
|
};
|
|
568
820
|
};
|
|
569
821
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -611,6 +611,7 @@ var Footer = (props) => {
|
|
|
611
611
|
const isHasDayProducts = handleDaySubmit();
|
|
612
612
|
if (isHasDayProducts) return;
|
|
613
613
|
}
|
|
614
|
+
debugger;
|
|
614
615
|
const hasUnspecifiedHolderProduct = (_d2 = state.service.value) == null ? void 0 : _d2.some((item) => {
|
|
615
616
|
var _a3, _b3, _c3;
|
|
616
617
|
return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
|
|
@@ -1260,7 +1261,8 @@ var Footer = (props) => {
|
|
|
1260
1261
|
}
|
|
1261
1262
|
};
|
|
1262
1263
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
1263
|
-
var _a2, _b2;
|
|
1264
|
+
var _a2, _b2, _c2;
|
|
1265
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
1264
1266
|
dispatch({
|
|
1265
1267
|
type: "setClient",
|
|
1266
1268
|
payload: {
|
|
@@ -1268,7 +1270,8 @@ var Footer = (props) => {
|
|
|
1268
1270
|
edit: true
|
|
1269
1271
|
}
|
|
1270
1272
|
});
|
|
1271
|
-
if ((
|
|
1273
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
1274
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
1272
1275
|
dispatch({
|
|
1273
1276
|
type: "setService",
|
|
1274
1277
|
payload: {
|