@pisell/private-materials 6.6.4 → 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 -0
- package/es/components/ticketBooking/utils/index.js +38 -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 -0
- package/lib/components/ticketBooking/utils/index.js +22 -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 +4 -4
- 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
|
@@ -16,6 +16,11 @@ 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[];
|
|
19
24
|
export interface ResourceItem {
|
|
20
25
|
[key: string]: any;
|
|
21
26
|
}
|
|
@@ -37,6 +42,20 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
|
|
|
37
42
|
* @Date: 2024-12-23 12:05
|
|
38
43
|
*/
|
|
39
44
|
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;
|
|
40
59
|
/**
|
|
41
60
|
* @title: 是否包含跨日预约商品
|
|
42
61
|
* @description:
|
|
@@ -32,11 +32,16 @@ __export(utils_exports, {
|
|
|
32
32
|
checkHolderIsError: () => checkHolderIsError,
|
|
33
33
|
checkResourcesFormat: () => checkResourcesFormat,
|
|
34
34
|
checkSubResourcesCapacity: () => checkSubResourcesCapacity,
|
|
35
|
+
formatOriginalPrice: () => formatOriginalPrice,
|
|
35
36
|
formatProductBundle: () => formatProductBundle,
|
|
36
37
|
formatProductOption: () => formatProductOption,
|
|
37
38
|
formatProductPrice: () => formatProductPrice,
|
|
39
|
+
formatSellingPrice: () => formatSellingPrice,
|
|
38
40
|
formatValues: () => formatValues,
|
|
39
|
-
|
|
41
|
+
getBundleDiscountList: () => getBundleDiscountList,
|
|
42
|
+
getHasMultiDayProduct: () => getHasMultiDayProduct,
|
|
43
|
+
getMainProductSellingPrice: () => getMainProductSellingPrice,
|
|
44
|
+
getSourceProductPrice: () => getSourceProductPrice
|
|
40
45
|
});
|
|
41
46
|
module.exports = __toCommonJS(utils_exports);
|
|
42
47
|
var import_dayjs = __toESM(require("dayjs"));
|
|
@@ -110,6 +115,8 @@ var formatProductBundle = (bundle) => {
|
|
|
110
115
|
return temp + Number(item.num) * item.custom_add_price;
|
|
111
116
|
}, 0);
|
|
112
117
|
return {
|
|
118
|
+
"is_charge_tax": d.is_charge_tax,
|
|
119
|
+
"tax_fee": d.tax_fee,
|
|
113
120
|
"bundle_group_id": d.group_id,
|
|
114
121
|
"bundle_id": d.id,
|
|
115
122
|
"bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
|
|
@@ -117,16 +124,37 @@ var formatProductBundle = (bundle) => {
|
|
|
117
124
|
"num": d.num,
|
|
118
125
|
"extension_id": d.extension_id,
|
|
119
126
|
"extension_type": d.extension_type,
|
|
120
|
-
"price": Number(d == null ? void 0 : d.
|
|
121
|
-
// checkout 2.0 新增
|
|
127
|
+
"price": Number(d == null ? void 0 : d.product_price),
|
|
122
128
|
"price_type": d == null ? void 0 : d.price_type,
|
|
123
|
-
|
|
124
|
-
"custom_price": Math.abs(new import_decimal.default(d == null ? void 0 : d.
|
|
129
|
+
"price_type_ext": d == null ? void 0 : d.price_type_ext,
|
|
130
|
+
"custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
|
|
125
131
|
"custom_price_type": d == null ? void 0 : d.price_type,
|
|
126
|
-
"option": option
|
|
132
|
+
"option": option,
|
|
133
|
+
"bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
|
|
134
|
+
// "bundle_sum_price": d?.original_price || d?.original_total,
|
|
135
|
+
"metadata": {
|
|
136
|
+
custom_product_bundle_map_id: d._id,
|
|
137
|
+
// 子商品单数量附加费
|
|
138
|
+
"surcharge_fee": d.surcharge_fee,
|
|
139
|
+
// 可选,附加费均摊舍入金额
|
|
140
|
+
"surcharge_rounding_remainder": d.surcharge_rounding_remainder,
|
|
141
|
+
relation_surcharge_ids: d.relation_surcharge_ids || []
|
|
142
|
+
}
|
|
127
143
|
};
|
|
128
144
|
});
|
|
129
145
|
};
|
|
146
|
+
var getBundleDiscountList = (bundle) => {
|
|
147
|
+
if (!bundle) {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
let discountList = [];
|
|
151
|
+
bundle.forEach((d) => {
|
|
152
|
+
if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
|
|
153
|
+
discountList.push(...d.discount_list.filter((item) => !item.id));
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
return discountList;
|
|
157
|
+
};
|
|
130
158
|
var getSubType = (item) => {
|
|
131
159
|
var _a;
|
|
132
160
|
const _type = (_a = item.duration) == null ? void 0 : _a.type;
|
|
@@ -214,7 +242,7 @@ var formatHolders = (state, item, values) => {
|
|
|
214
242
|
var formatProductPrice = (item) => {
|
|
215
243
|
var _a, _b, _c, _d;
|
|
216
244
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
217
|
-
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
245
|
+
let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
|
|
218
246
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
219
247
|
const variant = item.variant.find(
|
|
220
248
|
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
@@ -258,6 +286,23 @@ var formatMetaData = (item, isMultiDayPrices) => {
|
|
|
258
286
|
}
|
|
259
287
|
return metadata;
|
|
260
288
|
};
|
|
289
|
+
var formatProductMetadata = (item) => {
|
|
290
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
291
|
+
let metadata = {};
|
|
292
|
+
if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
|
|
293
|
+
metadata.main_product_attached_bundle_surcharge_fee = (_b = item._extend) == null ? void 0 : _b.surcharge_fee;
|
|
294
|
+
}
|
|
295
|
+
if ((_c = item._extend) == null ? void 0 : _c.main_product_attached_bundle_tax_fee) {
|
|
296
|
+
metadata.main_product_attached_bundle_tax_fee = (_d = item._extend) == null ? void 0 : _d.main_product_attached_bundle_tax_fee;
|
|
297
|
+
}
|
|
298
|
+
if ((_e = item._extend) == null ? void 0 : _e.surcharge_rounding_remainder) {
|
|
299
|
+
metadata.surcharge_rounding_remainder = (_f = item._extend) == null ? void 0 : _f.surcharge_rounding_remainder;
|
|
300
|
+
}
|
|
301
|
+
if ((_g = item._extend) == null ? void 0 : _g.relation_surcharge_ids) {
|
|
302
|
+
metadata.relation_surcharge_ids = (_h = item._extend) == null ? void 0 : _h.relation_surcharge_ids;
|
|
303
|
+
}
|
|
304
|
+
return metadata;
|
|
305
|
+
};
|
|
261
306
|
var getSourceProductPrice = (item) => {
|
|
262
307
|
var _a, _b, _c;
|
|
263
308
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
@@ -272,12 +317,29 @@ var getSourceProductPrice = (item) => {
|
|
|
272
317
|
}
|
|
273
318
|
return price;
|
|
274
319
|
};
|
|
320
|
+
var getMainProductSellingPrice = (item) => {
|
|
321
|
+
var _a, _b, _c, _d, _e, _f;
|
|
322
|
+
if (!(0, import_utils5.isNumber)((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) && !(0, import_utils5.isString)((_b = item._extend) == null ? void 0 : _b.main_product_selling_price)) {
|
|
323
|
+
return void 0;
|
|
324
|
+
}
|
|
325
|
+
let optionPrice = new import_decimal.default(0);
|
|
326
|
+
if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
|
|
327
|
+
optionPrice = (_e = item._extend.other) == null ? void 0 : _e.option.reduce((accumulator, currentValue) => {
|
|
328
|
+
const currentPrice = new import_decimal.default(currentValue.price || 0);
|
|
329
|
+
const currentNum = new import_decimal.default(currentValue.num || 0);
|
|
330
|
+
return accumulator.add(currentPrice.mul(currentNum));
|
|
331
|
+
}, optionPrice);
|
|
332
|
+
}
|
|
333
|
+
return new import_decimal.default((_f = item._extend) == null ? void 0 : _f.main_product_selling_price).add(optionPrice).toNumber();
|
|
334
|
+
};
|
|
275
335
|
var formatProducts = (item, quantity) => {
|
|
276
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
336
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
277
337
|
const total = Number(item._extend.total);
|
|
278
338
|
const origin_total = Number(item._extend.origin_total);
|
|
279
339
|
const discount_amount = origin_total - total;
|
|
280
|
-
const
|
|
340
|
+
const bundleDiscountList = getBundleDiscountList(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
|
|
341
|
+
const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
|
|
342
|
+
discount_list.push(...bundleDiscountList);
|
|
281
343
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
282
344
|
discount_list.forEach((d) => {
|
|
283
345
|
d.metadata = {
|
|
@@ -292,30 +354,31 @@ var formatProducts = (item, quantity) => {
|
|
|
292
354
|
item.product_id = 0;
|
|
293
355
|
}
|
|
294
356
|
return {
|
|
295
|
-
name: item.name,
|
|
296
|
-
num: quantity || item._extend.quantity,
|
|
297
|
-
price: formatProductPrice(item),
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
357
|
+
"name": item.name,
|
|
358
|
+
"num": quantity || item._extend.quantity,
|
|
359
|
+
"price": formatProductPrice(item),
|
|
360
|
+
"main_product_selling_price": getMainProductSellingPrice(item) ?? formatProductPrice(item),
|
|
361
|
+
"source_product_price": getSourceProductPrice(item),
|
|
362
|
+
"product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
|
|
363
|
+
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
364
|
+
"product_discount_reason": item._extend.discount_reason || "",
|
|
365
|
+
"is_charge_tax": item.is_charge_tax,
|
|
366
|
+
"note": ((_c = item._extend) == null ? void 0 : _c.note) || "",
|
|
367
|
+
"discountway": item._extend.discountway || "num",
|
|
368
|
+
"discount_per": item._extend.discount_per,
|
|
369
|
+
"discount_type": item._extend.discount_type || discount_type,
|
|
370
|
+
"order_detail_id": item._extend.order_detail_id || 0,
|
|
371
|
+
"product_bundle": formatProductBundle((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
|
|
372
|
+
"bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
|
|
373
|
+
"product_option_item": formatProductOption((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
|
|
374
|
+
"product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
|
|
375
|
+
"discount_list": notManualDiscount,
|
|
376
|
+
metadata: formatProductMetadata(item),
|
|
314
377
|
// checkout 需求新增字段
|
|
315
|
-
calculated_original_price: formatOriginalPrice(item),
|
|
316
|
-
calculated_selling_price: formatSellingPrice(item),
|
|
317
|
-
tax_fee: item._extend.tax_fee,
|
|
318
|
-
custom_deposit_data: item.custom_deposit_data
|
|
378
|
+
"calculated_original_price": formatOriginalPrice(item),
|
|
379
|
+
"calculated_selling_price": formatSellingPrice(item),
|
|
380
|
+
"tax_fee": item._extend.tax_fee,
|
|
381
|
+
"custom_deposit_data": item.custom_deposit_data
|
|
319
382
|
};
|
|
320
383
|
};
|
|
321
384
|
var formatAppointmentProductLists = (data) => {
|
|
@@ -381,7 +444,7 @@ var formatBookings = (data, values) => {
|
|
|
381
444
|
let bookings = [];
|
|
382
445
|
let obj = {};
|
|
383
446
|
list.forEach((item) => {
|
|
384
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
447
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
385
448
|
if (item.isCustomItem) {
|
|
386
449
|
bookings.push({
|
|
387
450
|
...item._extend,
|
|
@@ -455,12 +518,20 @@ var formatBookings = (data, values) => {
|
|
|
455
518
|
for (let i = 0; i < (item._extend.quantity || 1); i++) {
|
|
456
519
|
const newItem = (0, import_lodash.cloneDeep)(item);
|
|
457
520
|
newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
|
|
521
|
+
if (i > 0) {
|
|
522
|
+
newItem._extend.surcharge_rounding_remainder = void 0;
|
|
523
|
+
if (((_j = (_i = (_h = newItem._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle) == null ? void 0 : _j.length) > 0) {
|
|
524
|
+
newItem._extend.other.bundle.forEach((bundleItem) => {
|
|
525
|
+
bundleItem.surcharge_rounding_remainder = void 0;
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
}
|
|
458
529
|
bookings.push({
|
|
459
530
|
...booking,
|
|
460
531
|
product: formatProducts(newItem, 1),
|
|
461
532
|
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
|
|
462
533
|
holder: getHolderByIndex(booking.holder, i),
|
|
463
|
-
metadata: formatMetaData(newItem)
|
|
534
|
+
metadata: formatMetaData(newItem, false)
|
|
464
535
|
});
|
|
465
536
|
}
|
|
466
537
|
});
|
|
@@ -620,9 +691,14 @@ var checkHolderIsError = (state) => {
|
|
|
620
691
|
checkHolderIsError,
|
|
621
692
|
checkResourcesFormat,
|
|
622
693
|
checkSubResourcesCapacity,
|
|
694
|
+
formatOriginalPrice,
|
|
623
695
|
formatProductBundle,
|
|
624
696
|
formatProductOption,
|
|
625
697
|
formatProductPrice,
|
|
698
|
+
formatSellingPrice,
|
|
626
699
|
formatValues,
|
|
627
|
-
|
|
700
|
+
getBundleDiscountList,
|
|
701
|
+
getHasMultiDayProduct,
|
|
702
|
+
getMainProductSellingPrice,
|
|
703
|
+
getSourceProductPrice
|
|
628
704
|
});
|
|
@@ -48,7 +48,7 @@ var import_utils3 = require("../../info/clientVariant/utils");
|
|
|
48
48
|
var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
49
49
|
var services = {};
|
|
50
50
|
var VoucherCard = (props) => {
|
|
51
|
-
var _a, _b, _c, _d;
|
|
51
|
+
var _a, _b, _c, _d, _e;
|
|
52
52
|
const context = (0, import_useEngineContext.default)();
|
|
53
53
|
const { state, dispatch, source, isInModal = false } = props;
|
|
54
54
|
const [showDetail, setShowDetail] = (0, import_react.useState)(isInModal ? true : false);
|
|
@@ -60,9 +60,13 @@ var VoucherCard = (props) => {
|
|
|
60
60
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
61
61
|
const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
|
|
62
62
|
const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
|
|
63
|
+
const holderChangedRef = (0, import_react.useRef)(false);
|
|
64
|
+
const stateRef = (0, import_react.useRef)(state);
|
|
65
|
+
stateRef.current = state;
|
|
63
66
|
services = state.service;
|
|
64
67
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
65
|
-
var _a2, _b2;
|
|
68
|
+
var _a2, _b2, _c2;
|
|
69
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
66
70
|
dispatch({
|
|
67
71
|
type: "setClient",
|
|
68
72
|
payload: {
|
|
@@ -70,7 +74,8 @@ var VoucherCard = (props) => {
|
|
|
70
74
|
edit: true
|
|
71
75
|
}
|
|
72
76
|
});
|
|
73
|
-
if ((
|
|
77
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
78
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
74
79
|
dispatch({
|
|
75
80
|
type: "setService",
|
|
76
81
|
payload: {
|
|
@@ -104,7 +109,7 @@ var VoucherCard = (props) => {
|
|
|
104
109
|
const serviceMemo = (0, import_react.useMemo)(() => {
|
|
105
110
|
var _a2;
|
|
106
111
|
const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
|
|
107
|
-
var _a3, _b2;
|
|
112
|
+
var _a3, _b2, _c2;
|
|
108
113
|
return {
|
|
109
114
|
booking_id: value.booking_id,
|
|
110
115
|
id: value.id,
|
|
@@ -113,11 +118,17 @@ var VoucherCard = (props) => {
|
|
|
113
118
|
discount_list: value.discount_list,
|
|
114
119
|
origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
|
|
115
120
|
quantity: value._extend.quantity,
|
|
116
|
-
startDate: value._extend.startDate
|
|
121
|
+
startDate: value._extend.startDate,
|
|
122
|
+
holder_id: (_c2 = value == null ? void 0 : value._extend) == null ? void 0 : _c2.holder_id
|
|
117
123
|
};
|
|
118
124
|
});
|
|
119
125
|
return val;
|
|
120
126
|
}, [state.service.value]);
|
|
127
|
+
const serviceTotal = (0, import_react.useMemo)(() => {
|
|
128
|
+
return serviceMemo.reduce((total, item) => {
|
|
129
|
+
return total + (item.total || 0);
|
|
130
|
+
}, 0);
|
|
131
|
+
}, [serviceMemo]);
|
|
121
132
|
const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
122
133
|
if (!e.detail.code) {
|
|
123
134
|
return;
|
|
@@ -148,6 +159,21 @@ var VoucherCard = (props) => {
|
|
|
148
159
|
});
|
|
149
160
|
return val;
|
|
150
161
|
}, [state.addons.value]);
|
|
162
|
+
const holdersMemo = (0, import_react.useMemo)(() => {
|
|
163
|
+
var _a2;
|
|
164
|
+
if (isBooking4Shop) {
|
|
165
|
+
let list = [];
|
|
166
|
+
if ((_a2 = state.pet) == null ? void 0 : _a2.value) {
|
|
167
|
+
let entries = Object.entries(state.pet.value);
|
|
168
|
+
if (entries.length === 1) {
|
|
169
|
+
list = entries[0][1];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
shopDiscount.setHolders(list);
|
|
173
|
+
holderChangedRef.current = true;
|
|
174
|
+
return list || [];
|
|
175
|
+
}
|
|
176
|
+
}, [(_c = state.pet) == null ? void 0 : _c.value, isBooking4Shop]);
|
|
151
177
|
const disabled = (0, import_react.useMemo)(() => {
|
|
152
178
|
var _a2;
|
|
153
179
|
if (["paid", "partially_paid"].includes(
|
|
@@ -160,24 +186,30 @@ var VoucherCard = (props) => {
|
|
|
160
186
|
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
161
187
|
() => {
|
|
162
188
|
var _a2, _b2;
|
|
163
|
-
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
189
|
+
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
164
190
|
return;
|
|
165
191
|
}
|
|
166
192
|
if (isBooking4Shop) {
|
|
167
193
|
const val = shopDiscount.calcDiscount([
|
|
168
|
-
...
|
|
169
|
-
...
|
|
194
|
+
...stateRef.current.service.value,
|
|
195
|
+
...stateRef.current.addons.value
|
|
170
196
|
]);
|
|
171
197
|
console.log("input: ", state.service.value);
|
|
172
198
|
console.log("output: ", val);
|
|
173
199
|
productListToValue(val.productList);
|
|
200
|
+
holderChangedRef.current = false;
|
|
174
201
|
}
|
|
175
202
|
},
|
|
176
203
|
{ wait: 500 }
|
|
177
204
|
);
|
|
178
205
|
(0, import_react.useEffect)(() => {
|
|
179
206
|
run();
|
|
180
|
-
}, [
|
|
207
|
+
}, [
|
|
208
|
+
JSON.stringify(serviceMemo),
|
|
209
|
+
JSON.stringify(addonsMemo),
|
|
210
|
+
JSON.stringify(holdersMemo),
|
|
211
|
+
isBooking4Shop
|
|
212
|
+
]);
|
|
181
213
|
(0, import_react.useEffect)(() => {
|
|
182
214
|
if (shopDiscount) {
|
|
183
215
|
const wrappedHandler = executeIfActive(fn);
|
|
@@ -237,6 +269,12 @@ var VoucherCard = (props) => {
|
|
|
237
269
|
const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
|
|
238
270
|
var _a2;
|
|
239
271
|
const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
|
|
272
|
+
const newTotal = serviceList.reduce((total, item) => {
|
|
273
|
+
return total + (item._extend.total || 0);
|
|
274
|
+
}, 0);
|
|
275
|
+
if (newTotal !== serviceTotal) {
|
|
276
|
+
edit = true;
|
|
277
|
+
}
|
|
240
278
|
serviceValueRef.current = serviceList;
|
|
241
279
|
addonsValueRef.current = addonsList;
|
|
242
280
|
let other = {};
|
|
@@ -253,12 +291,14 @@ var VoucherCard = (props) => {
|
|
|
253
291
|
}
|
|
254
292
|
});
|
|
255
293
|
if (!((_a2 = props == null ? void 0 : props.state) == null ? void 0 : _a2.isBookingTicket2)) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
294
|
+
setTimeout(() => {
|
|
295
|
+
dispatch({
|
|
296
|
+
type: "setAddons",
|
|
297
|
+
payload: {
|
|
298
|
+
value: addonsList,
|
|
299
|
+
...other
|
|
300
|
+
}
|
|
301
|
+
});
|
|
262
302
|
});
|
|
263
303
|
}
|
|
264
304
|
});
|
|
@@ -322,7 +362,7 @@ var VoucherCard = (props) => {
|
|
|
322
362
|
{
|
|
323
363
|
style: { width: "100%" },
|
|
324
364
|
isInModal: isInModal || false,
|
|
325
|
-
dataSource: ((
|
|
365
|
+
dataSource: ((_e = (_d = state.service) == null ? void 0 : _d.value) == null ? void 0 : _e.length) ? availableData : [],
|
|
326
366
|
mixedSort,
|
|
327
367
|
onChange: (val) => {
|
|
328
368
|
const detail = shopDiscount.setDiscountSelected({
|
|
@@ -100,10 +100,11 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
100
100
|
}
|
|
101
101
|
const selectBundleInfo = item._extend.other.bundle.find((item2) => item2.id === bundle.id);
|
|
102
102
|
const optionPrice = calculateTotalPrice((selectBundleInfo == null ? void 0 : selectBundleInfo.option) || []);
|
|
103
|
+
const isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
|
|
103
104
|
return {
|
|
104
105
|
...bundle,
|
|
105
106
|
base_price: bundleItemMap[bundle.id].base_price,
|
|
106
|
-
price: new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
107
|
+
price: isEditDiscount ? bundle.price : new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
107
108
|
// product_price: bundleItemMap[item.id].product_price,
|
|
108
109
|
};
|
|
109
110
|
});
|
|
@@ -378,6 +378,7 @@ var formatBundle = (bundle) => {
|
|
|
378
378
|
num: item == null ? void 0 : item.num,
|
|
379
379
|
price: item == null ? void 0 : item.price,
|
|
380
380
|
total: item == null ? void 0 : item.price,
|
|
381
|
+
origin_total: item.original_total,
|
|
381
382
|
price_type: item == null ? void 0 : item.price_type,
|
|
382
383
|
bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
|
|
383
384
|
bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
|
|
@@ -76,7 +76,8 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
76
76
|
((_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en"
|
|
77
77
|
);
|
|
78
78
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
79
|
-
var _a2, _b2;
|
|
79
|
+
var _a2, _b2, _c2;
|
|
80
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
80
81
|
dispatch({
|
|
81
82
|
type: "setClient",
|
|
82
83
|
payload: {
|
|
@@ -84,7 +85,8 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
84
85
|
edit: true
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
|
-
if ((
|
|
88
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
89
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
88
90
|
dispatch({
|
|
89
91
|
type: "setService",
|
|
90
92
|
payload: {
|
|
@@ -244,7 +244,6 @@ var Info = (props) => {
|
|
|
244
244
|
_extend: {
|
|
245
245
|
start_date: state.date.value,
|
|
246
246
|
quantity: (e == null ? void 0 : e.quantity) || 1,
|
|
247
|
-
price: _detail.price,
|
|
248
247
|
product_name: item.title,
|
|
249
248
|
other
|
|
250
249
|
},
|
|
@@ -254,6 +253,7 @@ var Info = (props) => {
|
|
|
254
253
|
if (isMultiDay) {
|
|
255
254
|
cacheItem._extend.end_date = state.date.value.add(1, "day");
|
|
256
255
|
}
|
|
256
|
+
cacheItem._extend.price = (0, import_utils3.getMainPrice)(cacheItem, _detail.price);
|
|
257
257
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
258
258
|
cacheItem._extend.total = _total;
|
|
259
259
|
cacheItem._extend.origin_total = _total;
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_ahooks = require("ahooks");
|
|
37
37
|
var import_skuDetailModal = __toESM(require("../../../../../pro/skuDetailModal"));
|
|
38
38
|
var import_model = require("../../../info/model");
|
|
39
|
+
var import_utils = require("../editService/utils");
|
|
39
40
|
var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
|
|
40
41
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
41
42
|
const modalRef = (0, import_react.useRef)(null);
|
|
@@ -62,7 +63,12 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
|
|
|
62
63
|
const handleConfirm = (0, import_ahooks.useMemoizedFn)((data) => {
|
|
63
64
|
var _a, _b;
|
|
64
65
|
const newProducts = (_b = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || []) == null ? void 0 : _b.map((item) => {
|
|
66
|
+
var _a2, _b2;
|
|
65
67
|
if (item._id == data._id) {
|
|
68
|
+
data = (0, import_utils.setProductPrice)(data, {
|
|
69
|
+
newTotal: (_a2 = data._extend) == null ? void 0 : _a2.total,
|
|
70
|
+
origin_total: (_b2 = data._extend) == null ? void 0 : _b2.origin_total
|
|
71
|
+
});
|
|
66
72
|
return data;
|
|
67
73
|
}
|
|
68
74
|
return item;
|
|
@@ -54,12 +54,13 @@ var import_utils5 = require("../../../info/utils");
|
|
|
54
54
|
var import_utils6 = require("../../../utils");
|
|
55
55
|
var import_utilsByBooking = require("../../utilsByBooking");
|
|
56
56
|
var import_utils7 = require("../addService/utils");
|
|
57
|
+
var import_utils8 = require("./utils");
|
|
57
58
|
var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
|
|
58
59
|
var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
|
|
59
60
|
var import_EditTabs = __toESM(require("../../../info/service/editService/EditTabs"));
|
|
60
61
|
var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
|
|
61
62
|
var import_dayjs = __toESM(require("dayjs"));
|
|
62
|
-
var
|
|
63
|
+
var import_utils9 = require("../../../info/service2/Group/utils");
|
|
63
64
|
var submitLock = false;
|
|
64
65
|
var Info = (_, ref) => {
|
|
65
66
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
@@ -198,7 +199,7 @@ var Info = (_, ref) => {
|
|
|
198
199
|
form.setFieldsValue({ discount });
|
|
199
200
|
};
|
|
200
201
|
const onFinish = (values) => {
|
|
201
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
202
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
202
203
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
203
204
|
if (isShowTimeAndResource && !isSuccess) {
|
|
204
205
|
return;
|
|
@@ -259,12 +260,16 @@ var Info = (_, ref) => {
|
|
|
259
260
|
}
|
|
260
261
|
let _id = _item == null ? void 0 : _item._id;
|
|
261
262
|
let groupId = (_h2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _h2.groupId;
|
|
263
|
+
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
264
|
+
newTotal: values.total,
|
|
265
|
+
origin_total: (_i2 = _item._extend) == null ? void 0 : _i2.origin_total
|
|
266
|
+
});
|
|
262
267
|
if (groupId) {
|
|
263
268
|
_list = _list.filter((d) => {
|
|
264
269
|
var _a3;
|
|
265
270
|
return ((_a3 = d._extend) == null ? void 0 : _a3.groupId) !== groupId;
|
|
266
271
|
});
|
|
267
|
-
_list = _list.concat((0,
|
|
272
|
+
_list = _list.concat((0, import_utils9.createBookingItemsByGroup)(_item, true));
|
|
268
273
|
} else {
|
|
269
274
|
if (!_list.some((d) => d._id === _id)) {
|
|
270
275
|
const detail = (0, import_utils3.addService)(_list, _item, state);
|
|
@@ -279,7 +284,7 @@ var Info = (_, ref) => {
|
|
|
279
284
|
(0, import_utils6.deleteCacheParams)();
|
|
280
285
|
console.log("_onFinish", _list);
|
|
281
286
|
form.resetFields();
|
|
282
|
-
if (!!((
|
|
287
|
+
if (!!((_j2 = state.service.cacheItem) == null ? void 0 : _j2.new)) {
|
|
283
288
|
window.dispatchEvent(
|
|
284
289
|
new CustomEvent("onAddNewService", {
|
|
285
290
|
detail: {
|
|
@@ -288,7 +293,7 @@ var Info = (_, ref) => {
|
|
|
288
293
|
})
|
|
289
294
|
);
|
|
290
295
|
}
|
|
291
|
-
(
|
|
296
|
+
(_k2 = window.closeBookingEditModal) == null ? void 0 : _k2.call(window);
|
|
292
297
|
_list.sort((a, b) => {
|
|
293
298
|
var _a3, _b3;
|
|
294
299
|
const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
@@ -330,7 +335,24 @@ var Info = (_, ref) => {
|
|
|
330
335
|
const startTime2 = performance.now();
|
|
331
336
|
console.log(startTime2, "startTime");
|
|
332
337
|
form.resetFields();
|
|
333
|
-
form.setFieldsValue(
|
|
338
|
+
form.setFieldsValue({
|
|
339
|
+
capacity: values.capacity,
|
|
340
|
+
discount_reason: values.discount_reason,
|
|
341
|
+
duration: values.duration,
|
|
342
|
+
endDate: values.endDate,
|
|
343
|
+
end_date: values.end_date,
|
|
344
|
+
origin_total: values.origin_total,
|
|
345
|
+
price: values.price,
|
|
346
|
+
product_name: values.product_name,
|
|
347
|
+
quantity: values.quantity,
|
|
348
|
+
resource: values.resource,
|
|
349
|
+
startDate: values.startDate,
|
|
350
|
+
start_time: values.start_time,
|
|
351
|
+
start_date: values.start_date,
|
|
352
|
+
total: values.total,
|
|
353
|
+
holder_id: values.holder_id,
|
|
354
|
+
note: values.note
|
|
355
|
+
});
|
|
334
356
|
const endTime2 = performance.now();
|
|
335
357
|
console.log(endTime2 - window.pp1, "打开商品5");
|
|
336
358
|
console.log("执行时间", endTime2 - startTime2, values);
|
|
@@ -872,10 +894,10 @@ var Info = (_, ref) => {
|
|
|
872
894
|
if (duration2 !== void 0) {
|
|
873
895
|
cacheItem._extend.duration = duration2;
|
|
874
896
|
}
|
|
875
|
-
cacheItem._extend.items = (0,
|
|
897
|
+
cacheItem._extend.items = (0, import_utils9.createBookingItemsByGroup)(cacheItem);
|
|
876
898
|
cacheItem._extend = {
|
|
877
899
|
...cacheItem._extend,
|
|
878
|
-
...(0,
|
|
900
|
+
...(0, import_utils9.getGroupTotalPrice)(cacheItem._extend.items)
|
|
879
901
|
};
|
|
880
902
|
dispatch({
|
|
881
903
|
type: "setService",
|
|
@@ -11,3 +11,18 @@ export declare const getAutoAllocationStorage: (id: string | number) => any;
|
|
|
11
11
|
export declare const setAutoAllocationStorage: (data: {
|
|
12
12
|
[key: string]: boolean;
|
|
13
13
|
}) => void;
|
|
14
|
+
/**
|
|
15
|
+
* 手动折扣后给商品价格和子商品价格重新计算
|
|
16
|
+
*
|
|
17
|
+
* 计算逻辑:
|
|
18
|
+
* 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
|
|
19
|
+
* 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
|
|
20
|
+
*
|
|
21
|
+
* @param cacheItem - 缓存的商品项
|
|
22
|
+
* @param newTotal - 折扣后的新总价
|
|
23
|
+
* @param origin_total - 原始总价
|
|
24
|
+
*/
|
|
25
|
+
export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total }: {
|
|
26
|
+
newTotal: number;
|
|
27
|
+
origin_total: number;
|
|
28
|
+
}) => any;
|