@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
|
@@ -43,7 +43,7 @@ var ShopDiscountHooks = {
|
|
|
43
43
|
};
|
|
44
44
|
var services = {};
|
|
45
45
|
var VoucherCard = function VoucherCard(props) {
|
|
46
|
-
var _context$appHelper, _state$client$value, _state$service3;
|
|
46
|
+
var _context$appHelper, _state$client$value, _state$pet2, _state$service3;
|
|
47
47
|
var context = useEngineContext();
|
|
48
48
|
var state = props.state,
|
|
49
49
|
dispatch = props.dispatch,
|
|
@@ -70,11 +70,15 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
70
70
|
var shopDiscount = useShopDiscountModule();
|
|
71
71
|
var _useActiveExecute = useActiveExecute(),
|
|
72
72
|
executeIfActive = _useActiveExecute.executeIfActive;
|
|
73
|
+
var holderChangedRef = useRef(false);
|
|
74
|
+
var stateRef = useRef(state);
|
|
75
|
+
stateRef.current = state;
|
|
73
76
|
services = state.service;
|
|
74
77
|
|
|
75
78
|
// 将选中的客户数据传递给状态管理
|
|
76
79
|
var changeCustomerToGlobalState = useMemoizedFn(function (value) {
|
|
77
|
-
var _state$service;
|
|
80
|
+
var _state$client, _state$service;
|
|
81
|
+
var beforeValue = state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
|
|
78
82
|
dispatch({
|
|
79
83
|
type: 'setClient',
|
|
80
84
|
payload: {
|
|
@@ -82,6 +86,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
82
86
|
edit: true
|
|
83
87
|
}
|
|
84
88
|
});
|
|
89
|
+
if ((beforeValue === null || beforeValue === void 0 ? void 0 : beforeValue.id) === (value === null || value === void 0 ? void 0 : value.id)) return;
|
|
85
90
|
if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
|
|
86
91
|
// 还需要清空商品内的 holder 信息
|
|
87
92
|
dispatch({
|
|
@@ -121,7 +126,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
121
126
|
var serviceMemo = useMemo(function () {
|
|
122
127
|
var _ref;
|
|
123
128
|
var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
|
|
124
|
-
var _value$_extend, _value$_extend2;
|
|
129
|
+
var _value$_extend, _value$_extend2, _value$_extend3;
|
|
125
130
|
return {
|
|
126
131
|
booking_id: value.booking_id,
|
|
127
132
|
id: value.id,
|
|
@@ -130,11 +135,17 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
130
135
|
discount_list: value.discount_list,
|
|
131
136
|
origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total,
|
|
132
137
|
quantity: value._extend.quantity,
|
|
133
|
-
startDate: value._extend.startDate
|
|
138
|
+
startDate: value._extend.startDate,
|
|
139
|
+
holder_id: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.holder_id
|
|
134
140
|
};
|
|
135
141
|
});
|
|
136
142
|
return val;
|
|
137
143
|
}, [state.service.value]);
|
|
144
|
+
var serviceTotal = useMemo(function () {
|
|
145
|
+
return serviceMemo.reduce(function (total, item) {
|
|
146
|
+
return total + (item.total || 0);
|
|
147
|
+
}, 0);
|
|
148
|
+
}, [serviceMemo]);
|
|
138
149
|
var onScanWallPassCode = useMemoizedFn(function (e) {
|
|
139
150
|
if (!e.detail.code) {
|
|
140
151
|
return;
|
|
@@ -151,20 +162,37 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
151
162
|
var addonsMemo = useMemo(function () {
|
|
152
163
|
var _ref2;
|
|
153
164
|
var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
|
|
154
|
-
var _value$
|
|
165
|
+
var _value$_extend4, _value$_extend5;
|
|
155
166
|
return {
|
|
156
167
|
booking_id: value.booking_id,
|
|
157
168
|
id: value.id,
|
|
158
169
|
_id: value._id,
|
|
159
170
|
price: value.price,
|
|
160
|
-
total: value === null || value === void 0 || (_value$
|
|
171
|
+
total: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.total,
|
|
161
172
|
discount_list: value.discount_list,
|
|
162
173
|
_key: value._key,
|
|
163
|
-
num: value === null || value === void 0 || (_value$
|
|
174
|
+
num: value === null || value === void 0 || (_value$_extend5 = value._extend) === null || _value$_extend5 === void 0 ? void 0 : _value$_extend5.quantity
|
|
164
175
|
};
|
|
165
176
|
});
|
|
166
177
|
return val;
|
|
167
178
|
}, [state.addons.value]);
|
|
179
|
+
var holdersMemo = useMemo(function () {
|
|
180
|
+
if (isBooking4Shop) {
|
|
181
|
+
var _state$pet;
|
|
182
|
+
var list = [];
|
|
183
|
+
if ((_state$pet = state.pet) !== null && _state$pet !== void 0 && _state$pet.value) {
|
|
184
|
+
var entries = Object.entries(state.pet.value);
|
|
185
|
+
// 多余 1 个表单类型时,无法计算
|
|
186
|
+
// 同一表单多个 holder 时,os内只取第一个
|
|
187
|
+
if (entries.length === 1) {
|
|
188
|
+
list = entries[0][1];
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
shopDiscount.setHolders(list);
|
|
192
|
+
holderChangedRef.current = true;
|
|
193
|
+
return list || [];
|
|
194
|
+
}
|
|
195
|
+
}, [(_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.value, isBooking4Shop]);
|
|
168
196
|
var disabled = useMemo(function () {
|
|
169
197
|
var _state$bookingDetail;
|
|
170
198
|
if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
|
|
@@ -176,14 +204,16 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
176
204
|
}, [state, addonsMemo, serviceMemo]);
|
|
177
205
|
var _useDebounceFn = useDebounceFn(function () {
|
|
178
206
|
var _state$service2;
|
|
179
|
-
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length)) {
|
|
207
|
+
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length)) {
|
|
180
208
|
return;
|
|
181
209
|
}
|
|
182
210
|
if (isBooking4Shop) {
|
|
183
|
-
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(
|
|
211
|
+
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(stateRef.current.service.value), _toConsumableArray(stateRef.current.addons.value)));
|
|
184
212
|
console.log('input: ', state.service.value);
|
|
185
213
|
console.log('output: ', val);
|
|
186
214
|
productListToValue(val.productList);
|
|
215
|
+
// 重置 holder 变化标识,防止重复计算
|
|
216
|
+
holderChangedRef.current = false;
|
|
187
217
|
}
|
|
188
218
|
}, {
|
|
189
219
|
wait: 500
|
|
@@ -193,7 +223,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
193
223
|
// 更新productList
|
|
194
224
|
useEffect(function () {
|
|
195
225
|
run();
|
|
196
|
-
}, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
|
|
226
|
+
}, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), JSON.stringify(holdersMemo), isBooking4Shop]);
|
|
197
227
|
useEffect(function () {
|
|
198
228
|
if (shopDiscount) {
|
|
199
229
|
var wrappedHandler = executeIfActive(fn);
|
|
@@ -244,6 +274,12 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
244
274
|
var _getServiceAddons = getServiceAddons(list),
|
|
245
275
|
serviceList = _getServiceAddons.serviceList,
|
|
246
276
|
addonsList = _getServiceAddons.addonsList;
|
|
277
|
+
var newTotal = serviceList.reduce(function (total, item) {
|
|
278
|
+
return total + (item._extend.total || 0);
|
|
279
|
+
}, 0);
|
|
280
|
+
if (newTotal !== serviceTotal) {
|
|
281
|
+
edit = true;
|
|
282
|
+
}
|
|
247
283
|
serviceValueRef.current = serviceList;
|
|
248
284
|
addonsValueRef.current = addonsList;
|
|
249
285
|
var other = {};
|
|
@@ -261,11 +297,13 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
261
297
|
|
|
262
298
|
// 售票页面暂时不需要
|
|
263
299
|
if (!(props !== null && props !== void 0 && (_props$state = props.state) !== null && _props$state !== void 0 && _props$state.isBookingTicket2)) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
300
|
+
setTimeout(function () {
|
|
301
|
+
dispatch({
|
|
302
|
+
type: 'setAddons',
|
|
303
|
+
payload: _objectSpread({
|
|
304
|
+
value: addonsList
|
|
305
|
+
}, other)
|
|
306
|
+
});
|
|
269
307
|
});
|
|
270
308
|
}
|
|
271
309
|
});
|
|
@@ -93,9 +93,12 @@ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
|
|
|
93
93
|
return item.id === bundle.id;
|
|
94
94
|
});
|
|
95
95
|
var optionPrice = calculateTotalPrice((selectBundleInfo === null || selectBundleInfo === void 0 ? void 0 : selectBundleInfo.option) || []);
|
|
96
|
+
|
|
97
|
+
// 编辑预约时使用折扣卡
|
|
98
|
+
var isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
|
|
96
99
|
return _objectSpread(_objectSpread({}, bundle), {}, {
|
|
97
100
|
base_price: bundleItemMap[bundle.id].base_price,
|
|
98
|
-
price: new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
101
|
+
price: isEditDiscount ? bundle.price : new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
99
102
|
// product_price: bundleItemMap[item.id].product_price,
|
|
100
103
|
});
|
|
101
104
|
});
|
|
@@ -442,6 +442,7 @@ var formatBundle = function formatBundle(bundle) {
|
|
|
442
442
|
num: item === null || item === void 0 ? void 0 : item.num,
|
|
443
443
|
price: item === null || item === void 0 ? void 0 : item.price,
|
|
444
444
|
total: item === null || item === void 0 ? void 0 : item.price,
|
|
445
|
+
origin_total: item.original_total,
|
|
445
446
|
price_type: item === null || item === void 0 ? void 0 : item.price_type,
|
|
446
447
|
bundle_sum_price: item === null || item === void 0 ? void 0 : item.bundle_sum_price,
|
|
447
448
|
bundle_sum_type: item === null || item === void 0 ? void 0 : item.bundle_sum_type,
|
|
@@ -35,7 +35,7 @@ import { useIsActive } from "../../../ticketBooking/context/IsActiveContext";
|
|
|
35
35
|
// 导出类型
|
|
36
36
|
|
|
37
37
|
var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
38
|
-
var _context$appHelper, _state$
|
|
38
|
+
var _context$appHelper, _state$client2;
|
|
39
39
|
var _ref$clientCardProps = _ref.clientCardProps,
|
|
40
40
|
clientCardProps = _ref$clientCardProps === void 0 ? {} : _ref$clientCardProps,
|
|
41
41
|
beforeSwitchModalOpen = _ref.beforeSwitchModalOpen,
|
|
@@ -73,7 +73,8 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
73
73
|
|
|
74
74
|
// 将选中的客户数据传递给状态管理
|
|
75
75
|
var changeCustomerToGlobalState = useMemoizedFn(function (value) {
|
|
76
|
-
var _state$service;
|
|
76
|
+
var _state$client, _state$service;
|
|
77
|
+
var beforeValue = state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
|
|
77
78
|
dispatch({
|
|
78
79
|
type: 'setClient',
|
|
79
80
|
payload: {
|
|
@@ -81,6 +82,7 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
81
82
|
edit: true
|
|
82
83
|
}
|
|
83
84
|
});
|
|
85
|
+
if ((beforeValue === null || beforeValue === void 0 ? void 0 : beforeValue.id) === (value === null || value === void 0 ? void 0 : value.id)) return;
|
|
84
86
|
if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
|
|
85
87
|
// 还需要清空商品内的 holder 信息
|
|
86
88
|
dispatch({
|
|
@@ -109,7 +111,7 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
109
111
|
initLoad = _useCustomer.initLoad,
|
|
110
112
|
hasMore = _useCustomer.hasMore,
|
|
111
113
|
loadMore = _useCustomer.loadMore;
|
|
112
|
-
var selectedCustomer = (_state$
|
|
114
|
+
var selectedCustomer = (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : _state$client2.value;
|
|
113
115
|
|
|
114
116
|
// 点击搜索按钮 重置列表
|
|
115
117
|
var handleSearchClient = /*#__PURE__*/function () {
|
|
@@ -30,7 +30,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
|
30
30
|
import { getProductDetail } from "../../../info/service/serve";
|
|
31
31
|
import { getIsBundleOrCombination } from "../../../info/utils";
|
|
32
32
|
import { getMultiDay, getProductExtend, isMultiDayProduct } from "./utils";
|
|
33
|
-
import { formatProductListByCategory, getIsEject, getIsOnlySession, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
|
|
33
|
+
import { formatProductListByCategory, getIsEject, getIsOnlySession, getMainPrice, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
|
|
34
34
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
35
35
|
import { useUpdateEffect } from 'ahooks';
|
|
36
36
|
import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
|
|
@@ -305,7 +305,6 @@ var Info = function Info(props) {
|
|
|
305
305
|
_extend: {
|
|
306
306
|
start_date: state.date.value,
|
|
307
307
|
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
|
|
308
|
-
price: _detail.price,
|
|
309
308
|
product_name: item.title,
|
|
310
309
|
other: other
|
|
311
310
|
},
|
|
@@ -315,6 +314,7 @@ var Info = function Info(props) {
|
|
|
315
314
|
if (isMultiDay) {
|
|
316
315
|
cacheItem._extend.end_date = state.date.value.add(1, 'day');
|
|
317
316
|
}
|
|
317
|
+
cacheItem._extend.price = getMainPrice(cacheItem, _detail.price);
|
|
318
318
|
_total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
|
|
319
319
|
cacheItem._extend.total = _total;
|
|
320
320
|
// 用于储存原价
|
|
@@ -365,7 +365,7 @@ var Info = function Info(props) {
|
|
|
365
365
|
cacheItem.autoClose = false;
|
|
366
366
|
}
|
|
367
367
|
if (!cacheItem.autoClose) {
|
|
368
|
-
_context4.next =
|
|
368
|
+
_context4.next = 27;
|
|
369
369
|
break;
|
|
370
370
|
}
|
|
371
371
|
cacheItem.autoClose = false;
|
|
@@ -393,17 +393,17 @@ var Info = function Info(props) {
|
|
|
393
393
|
changeService: false
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
|
-
_context4.next =
|
|
396
|
+
_context4.next = 33;
|
|
397
397
|
break;
|
|
398
|
-
case
|
|
398
|
+
case 27:
|
|
399
399
|
(_window$openBookingEd = (_window = window).openBookingEditModal) === null || _window$openBookingEd === void 0 || _window$openBookingEd.call(_window);
|
|
400
400
|
if (!isMultiDay) {
|
|
401
|
-
_context4.next =
|
|
401
|
+
_context4.next = 31;
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
|
-
_context4.next =
|
|
404
|
+
_context4.next = 31;
|
|
405
405
|
return getMultiDayCacheItem(true);
|
|
406
|
-
case
|
|
406
|
+
case 31:
|
|
407
407
|
dispatch({
|
|
408
408
|
type: 'setService',
|
|
409
409
|
payload: {
|
|
@@ -414,7 +414,7 @@ var Info = function Info(props) {
|
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
onEdit === null || onEdit === void 0 || onEdit(cacheItem);
|
|
417
|
-
case
|
|
417
|
+
case 33:
|
|
418
418
|
case "end":
|
|
419
419
|
return _context4.stop();
|
|
420
420
|
}
|
|
@@ -2,6 +2,7 @@ import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'reac
|
|
|
2
2
|
import { useMemoizedFn } from 'ahooks';
|
|
3
3
|
import SkuDetailModal from "../../../../../pro/skuDetailModal";
|
|
4
4
|
import { Context } from "../../../info/model";
|
|
5
|
+
import { setProductPrice } from "../editService/utils";
|
|
5
6
|
var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
6
7
|
var _useContext = useContext(Context),
|
|
7
8
|
state = _useContext.state,
|
|
@@ -33,6 +34,11 @@ var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
33
34
|
var _ref2, _state$service2;
|
|
34
35
|
var newProducts = (_ref2 = (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (item) {
|
|
35
36
|
if (item._id == data._id) {
|
|
37
|
+
var _data$_extend, _data$_extend2;
|
|
38
|
+
data = setProductPrice(data, {
|
|
39
|
+
newTotal: (_data$_extend = data._extend) === null || _data$_extend === void 0 ? void 0 : _data$_extend.total,
|
|
40
|
+
origin_total: (_data$_extend2 = data._extend) === null || _data$_extend2 === void 0 ? void 0 : _data$_extend2.origin_total
|
|
41
|
+
});
|
|
36
42
|
return data;
|
|
37
43
|
}
|
|
38
44
|
return item;
|
|
@@ -41,6 +41,7 @@ import { editSessionProduct } from "../../../info/utils";
|
|
|
41
41
|
import { deleteCacheParams, getDays, getProductTotalPrice, getServiceTimes, isSessionProduct, isWalkIn } from "../../../utils";
|
|
42
42
|
import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
|
|
43
43
|
import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj, setDefaultCapacitys } from "../addService/utils";
|
|
44
|
+
import { setProductPrice } from "./utils";
|
|
44
45
|
import NoteModal from "../../../../../plus/noteModal";
|
|
45
46
|
import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
|
|
46
47
|
import EditTabs from "../../../info/service/editService/EditTabs";
|
|
@@ -258,7 +259,7 @@ var Info = function Info(_, ref) {
|
|
|
258
259
|
* @Date: 2024-01-09 14:04
|
|
259
260
|
*/
|
|
260
261
|
var onFinish = function onFinish(values) {
|
|
261
|
-
var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
|
|
262
|
+
var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item2, _item3, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
|
|
262
263
|
var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
|
|
263
264
|
if (isShowTimeAndResource && !isSuccess) {
|
|
264
265
|
return;
|
|
@@ -339,8 +340,12 @@ var Info = function Info(_, ref) {
|
|
|
339
340
|
_item._extend.quantity = 1;
|
|
340
341
|
}
|
|
341
342
|
}
|
|
342
|
-
var _id = _item === null ||
|
|
343
|
-
var groupId = _item === null ||
|
|
343
|
+
var _id = (_item2 = _item) === null || _item2 === void 0 ? void 0 : _item2._id;
|
|
344
|
+
var groupId = (_item3 = _item) === null || _item3 === void 0 || (_item3 = _item3._extend) === null || _item3 === void 0 ? void 0 : _item3.groupId;
|
|
345
|
+
_item = setProductPrice(_item, {
|
|
346
|
+
newTotal: values.total,
|
|
347
|
+
origin_total: (_item$_extend5 = _item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.origin_total
|
|
348
|
+
});
|
|
344
349
|
if (groupId) {
|
|
345
350
|
_list = _list.filter(function (d) {
|
|
346
351
|
var _d$_extend;
|
|
@@ -420,7 +425,7 @@ var Info = function Info(_, ref) {
|
|
|
420
425
|
var startTime = performance.now();
|
|
421
426
|
console.log(startTime, 'startTime');
|
|
422
427
|
form.resetFields();
|
|
423
|
-
form.setFieldsValue(values);
|
|
428
|
+
// form.setFieldsValue(values);
|
|
424
429
|
// form.setFieldValue('resource', values.resource)
|
|
425
430
|
|
|
426
431
|
// values.resource[1117][0].times = [];
|
|
@@ -431,19 +436,24 @@ var Info = function Info(_, ref) {
|
|
|
431
436
|
// }
|
|
432
437
|
// };
|
|
433
438
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
439
|
+
form.setFieldsValue({
|
|
440
|
+
capacity: values.capacity,
|
|
441
|
+
discount_reason: values.discount_reason,
|
|
442
|
+
duration: values.duration,
|
|
443
|
+
endDate: values.endDate,
|
|
444
|
+
end_date: values.end_date,
|
|
445
|
+
origin_total: values.origin_total,
|
|
446
|
+
price: values.price,
|
|
447
|
+
product_name: values.product_name,
|
|
448
|
+
quantity: values.quantity,
|
|
449
|
+
resource: values.resource,
|
|
450
|
+
startDate: values.startDate,
|
|
451
|
+
start_time: values.start_time,
|
|
452
|
+
start_date: values.start_date,
|
|
453
|
+
total: values.total,
|
|
454
|
+
holder_id: values.holder_id,
|
|
455
|
+
note: values.note
|
|
456
|
+
});
|
|
447
457
|
var endTime = performance.now();
|
|
448
458
|
console.log(endTime - window.pp1, '打开商品5');
|
|
449
459
|
console.log('执行时间', endTime - startTime, values);
|
|
@@ -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;
|
|
@@ -14,7 +14,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
14
14
|
判断是否需要进入编辑服务页
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { isArr } from "@pisell/utils";
|
|
17
18
|
import { isBoolean } from "@pisell/utils";
|
|
19
|
+
import Decimal from "decimal.js";
|
|
18
20
|
var isNewService = function isNewService(service) {
|
|
19
21
|
return !service.new && service._extend.endDate;
|
|
20
22
|
};
|
|
@@ -52,4 +54,68 @@ export var setAutoAllocationStorage = function setAutoAllocationStorage(data) {
|
|
|
52
54
|
} else {
|
|
53
55
|
localStorage.setItem('resource-auto-allocation', JSON.stringify(_objectSpread({}, data)));
|
|
54
56
|
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 手动折扣后给商品价格和子商品价格重新计算
|
|
61
|
+
*
|
|
62
|
+
* 计算逻辑:
|
|
63
|
+
* 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
|
|
64
|
+
* 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
|
|
65
|
+
*
|
|
66
|
+
* @param cacheItem - 缓存的商品项
|
|
67
|
+
* @param newTotal - 折扣后的新总价
|
|
68
|
+
* @param origin_total - 原始总价
|
|
69
|
+
*/
|
|
70
|
+
export var setProductPrice = function setProductPrice(cacheItem, _ref2) {
|
|
71
|
+
var _cacheItem$_extend$ot, _cacheItem$_extend$ot2, _cacheItem$_extend$ot4, _cacheItem$_extend$ot5;
|
|
72
|
+
var newTotal = _ref2.newTotal,
|
|
73
|
+
origin_total = _ref2.origin_total;
|
|
74
|
+
// 计算折扣比例
|
|
75
|
+
var discountRatio = new Decimal(newTotal).div(new Decimal(origin_total));
|
|
76
|
+
|
|
77
|
+
// 用于累加子商品总价c
|
|
78
|
+
var subTotal = new Decimal(0);
|
|
79
|
+
|
|
80
|
+
// 处理 bundle 子商品
|
|
81
|
+
if ((_cacheItem$_extend$ot = cacheItem._extend.other) !== null && _cacheItem$_extend$ot !== void 0 && _cacheItem$_extend$ot.bundle && isArr((_cacheItem$_extend$ot2 = cacheItem._extend.other) === null || _cacheItem$_extend$ot2 === void 0 ? void 0 : _cacheItem$_extend$ot2.bundle)) {
|
|
82
|
+
var _cacheItem$_extend$ot3;
|
|
83
|
+
(_cacheItem$_extend$ot3 = cacheItem._extend.other) === null || _cacheItem$_extend$ot3 === void 0 || (_cacheItem$_extend$ot3 = _cacheItem$_extend$ot3.bundle) === null || _cacheItem$_extend$ot3 === void 0 || _cacheItem$_extend$ot3.forEach(function (bundle) {
|
|
84
|
+
var _ref3, _bundle$num;
|
|
85
|
+
// 计算新价格,直接截取两位小数(不四舍五入)
|
|
86
|
+
var newPrice = new Decimal(bundle.original_price || bundle.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
87
|
+
|
|
88
|
+
// 获取数量,优先取 num,再取 quantity,默认为 1
|
|
89
|
+
var quantity = (_ref3 = (_bundle$num = bundle.num) !== null && _bundle$num !== void 0 ? _bundle$num : bundle.quantity) !== null && _ref3 !== void 0 ? _ref3 : 1;
|
|
90
|
+
|
|
91
|
+
// 累加到子商品总价
|
|
92
|
+
subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
|
|
93
|
+
|
|
94
|
+
// 设置新价格
|
|
95
|
+
bundle.price = newPrice;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 处理 option 子商品
|
|
100
|
+
if ((_cacheItem$_extend$ot4 = cacheItem._extend.other) !== null && _cacheItem$_extend$ot4 !== void 0 && _cacheItem$_extend$ot4.option && isArr((_cacheItem$_extend$ot5 = cacheItem._extend.other) === null || _cacheItem$_extend$ot5 === void 0 ? void 0 : _cacheItem$_extend$ot5.option)) {
|
|
101
|
+
var _cacheItem$_extend$ot6;
|
|
102
|
+
(_cacheItem$_extend$ot6 = cacheItem._extend.other) === null || _cacheItem$_extend$ot6 === void 0 || (_cacheItem$_extend$ot6 = _cacheItem$_extend$ot6.option) === null || _cacheItem$_extend$ot6 === void 0 || _cacheItem$_extend$ot6.forEach(function (option) {
|
|
103
|
+
var _ref4, _option$num;
|
|
104
|
+
// 计算新价格,直接截取两位小数(不四舍五入)
|
|
105
|
+
var newPrice = new Decimal(option.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
106
|
+
|
|
107
|
+
// 获取数量,优先取 num,再取 quantity,默认为 1
|
|
108
|
+
var quantity = (_ref4 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref4 !== void 0 ? _ref4 : 1;
|
|
109
|
+
|
|
110
|
+
// 累加到子商品总价
|
|
111
|
+
subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
|
|
112
|
+
|
|
113
|
+
// 设置新价格
|
|
114
|
+
option.price = newPrice;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// 主商品价格 = newTotal - 子商品总价(让主商品吸收精度误差,确保总价精确)
|
|
119
|
+
cacheItem._extend.price = new Decimal(newTotal).sub(subTotal).toNumber();
|
|
120
|
+
return cacheItem;
|
|
55
121
|
};
|
|
@@ -161,6 +161,7 @@ export declare const getIsOnlySession: (item: any) => boolean;
|
|
|
161
161
|
* @Date: 2024-01-26 14:09
|
|
162
162
|
*/
|
|
163
163
|
export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
|
|
164
|
+
export declare const getMainPrice: (item: any, price?: number) => number;
|
|
164
165
|
export declare const getProductTotalPrice: (item: any) => number;
|
|
165
166
|
/**
|
|
166
167
|
* @title: 判断 duration
|
|
@@ -778,11 +778,24 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
778
778
|
return _extend;
|
|
779
779
|
};
|
|
780
780
|
|
|
781
|
+
// 获取主商品价格 包含组合规格
|
|
782
|
+
export var getMainPrice = function getMainPrice(item, price) {
|
|
783
|
+
var _item$_extend;
|
|
784
|
+
var newPrice = new Decimal(price || item._extend.price || 0);
|
|
785
|
+
var other = (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.other;
|
|
786
|
+
|
|
787
|
+
// 多规格
|
|
788
|
+
if (other !== null && other !== void 0 && other.product_variant_id) {
|
|
789
|
+
newPrice = new Decimal((other === null || other === void 0 ? void 0 : other.price) || 0);
|
|
790
|
+
}
|
|
791
|
+
return newPrice.toNumber();
|
|
792
|
+
};
|
|
793
|
+
|
|
781
794
|
// 商品价格: (商品价格 + (套餐价格 + 单规格价格 * 单规格数量) * 套餐数量 + 单规格价格 * 单规格数量) * 商品数量
|
|
782
795
|
export var getProductTotalPrice = function getProductTotalPrice(item) {
|
|
783
|
-
var _item$
|
|
796
|
+
var _item$_extend2;
|
|
784
797
|
var price = new Decimal(item._extend.price || 0);
|
|
785
|
-
var other = (_item$
|
|
798
|
+
var other = (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.other;
|
|
786
799
|
|
|
787
800
|
// 多规格
|
|
788
801
|
if (other !== null && other !== void 0 && other.product_variant_id) {
|
|
@@ -248,7 +248,6 @@
|
|
|
248
248
|
|
|
249
249
|
.balance-due-label {
|
|
250
250
|
font-size: 16px;
|
|
251
|
-
color: #7f56da;
|
|
252
251
|
font-weight: 400;
|
|
253
252
|
line-height: 1.5;
|
|
254
253
|
margin-bottom: 4px;
|
|
@@ -256,7 +255,7 @@
|
|
|
256
255
|
|
|
257
256
|
.balance-due-amount {
|
|
258
257
|
font-size: 14px;
|
|
259
|
-
font-weight:
|
|
258
|
+
font-weight: 600;
|
|
260
259
|
color: #7f56da;
|
|
261
260
|
line-height: 0.75;
|
|
262
261
|
text-decoration: underline;
|
|
@@ -272,13 +271,13 @@
|
|
|
272
271
|
.pay-text {
|
|
273
272
|
font-size: 16px;
|
|
274
273
|
font-weight: 500;
|
|
275
|
-
color: #7f56da;
|
|
276
274
|
letter-spacing: 0.09375em;
|
|
275
|
+
margin-top: 12px;
|
|
277
276
|
}
|
|
278
277
|
|
|
279
278
|
.pay-amount {
|
|
280
|
-
font-size:
|
|
281
|
-
font-weight:
|
|
279
|
+
font-size: 36px;
|
|
280
|
+
font-weight: 600;
|
|
282
281
|
color: #1e1830;
|
|
283
282
|
line-height: 0.75;
|
|
284
283
|
}
|