@pisell/private-materials 6.8.7 → 6.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +16 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +34 -16
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +67 -35
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +66 -42
- package/es/components/booking/components/voucher/index.js +58 -14
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +8 -2
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +21 -0
- package/es/components/booking/info/service2/Group/utils.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -33
- package/es/components/booking/info/service2/utils.js +84 -36
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +23 -5
- package/es/components/booking/info2/service/addService/index.js +146 -88
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +78 -9
- package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
- package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/es/components/booking/info2/service/editService/index.js +332 -76
- package/es/components/booking/info2/utilsByBooking.js +14 -5
- package/es/components/booking/locales.d.ts +30 -0
- package/es/components/booking/locales.js +39 -3
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/es/components/booking/utils/confirmHolderModal.js +318 -0
- package/es/components/booking/utils/confirmHolderModal.less +40 -0
- package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/es/components/booking/utils/selectHolderModal.js +407 -0
- package/es/components/booking/utils.d.ts +11 -3
- package/es/components/booking/utils.js +24 -1
- package/es/components/checkout/PaymentModal.js +15 -10
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/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 +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/{wallet/Detail/serve.js → ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js} +112 -57
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +19 -15
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +14 -11
- package/es/components/ticketBooking/utils/index.d.ts +10 -2
- package/es/components/ticketBooking/utils/index.js +37 -7
- package/es/components/walletList/index.d.ts +0 -24
- 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/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +273 -0
- package/es/plus/selectHolder/index.less +137 -0
- package/es/plus/selectHolder/locales.d.ts +24 -0
- package/es/plus/selectHolder/locales.js +29 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- 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/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.js +17 -5
- package/es/plus/walletPassGallery/index.js +223 -41
- 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/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +355 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/es/pro/multiDayTimeSelect/index.js +1 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/multiDayTimeSelect/types.js +1 -0
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +17 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +11 -0
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +25 -4
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +41 -29
- package/lib/components/booking/components/voucher/index.js +48 -6
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +4 -2
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +5 -0
- package/lib/components/booking/info/service2/Group/utils.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -33
- package/lib/components/booking/info/service2/utils.js +32 -16
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +11 -0
- package/lib/components/booking/info2/service/addService/index.js +22 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +47 -9
- package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
- package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/lib/components/booking/info2/service/editService/index.js +273 -38
- package/lib/components/booking/info2/utilsByBooking.js +19 -8
- package/lib/components/booking/locales.d.ts +30 -0
- package/lib/components/booking/locales.js +33 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/lib/components/booking/utils/confirmHolderModal.js +253 -0
- package/lib/components/booking/utils/confirmHolderModal.less +40 -0
- package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/lib/components/booking/utils/selectHolderModal.js +319 -0
- package/lib/components/booking/utils.d.ts +11 -3
- package/lib/components/booking/utils.js +15 -0
- package/lib/components/checkout/PaymentModal.js +5 -2
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/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 +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +10 -9
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +0 -16
- package/lib/components/ticketBooking/utils/index.d.ts +10 -2
- package/lib/components/ticketBooking/utils/index.js +31 -6
- package/lib/components/walletList/index.d.ts +0 -24
- 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/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +223 -0
- package/lib/plus/selectHolder/index.less +137 -0
- package/lib/plus/selectHolder/locales.d.ts +24 -0
- package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +17 -14
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
- 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/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/index.js +154 -27
- 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/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +290 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{components/wallet/components → pro/multiDayTimeSelect}/index.js +6 -16
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/multiDayTimeSelect/types.js +17 -0
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +4 -4
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
- 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/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/serve.js +0 -205
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
- 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/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/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.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
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2
5
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -16,14 +19,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
16
19
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
21
|
import Delete_wght300_24px from '@pisell/icon/es/Delete_wght300_24px';
|
|
19
|
-
import { formatAmount, locales } from '@pisell/utils';
|
|
22
|
+
import { formatAmount, getUniqueId, locales } from '@pisell/utils';
|
|
20
23
|
import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
21
24
|
import Drawer from "../../../components/drawer";
|
|
22
25
|
import { Context } from "../../../info/model";
|
|
23
26
|
import Duration from "../../../materiels/duration";
|
|
24
27
|
import Capacity from "./Capacity";
|
|
25
28
|
import Resources from "./Resources";
|
|
26
|
-
import
|
|
29
|
+
import Holder from "./Holder";
|
|
30
|
+
import { Input, Button, Row, Col, Form, InputNumber, DatePicker } from 'antd';
|
|
27
31
|
import "./index.less";
|
|
28
32
|
import CollapsibleList from "../../../components/collapsibleList";
|
|
29
33
|
import { renderBundles } from "../../../components/collapsibleList/utils";
|
|
@@ -31,18 +35,22 @@ import "./index.less";
|
|
|
31
35
|
import { useUpdateEffect, useMemoizedFn, useDebounceFn } from 'ahooks';
|
|
32
36
|
// import SelectTime from "../../../../../../../materials/src/components/select-time";
|
|
33
37
|
import { ConfigProvider, Iconfont } from '@pisell/materials';
|
|
34
|
-
import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
|
|
35
|
-
import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
|
|
38
|
+
import { addService, genHolderKey, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
|
|
39
|
+
import { disabledDate as _disabledDate, isNormalProductByDurationSchedule } from "../../../info/service2/utils";
|
|
36
40
|
import { editSessionProduct } from "../../../info/utils";
|
|
37
|
-
import { deleteCacheParams, getProductTotalPrice, getServiceTimes, isSessionProduct } from "../../../utils";
|
|
41
|
+
import { deleteCacheParams, getDays, getProductTotalPrice, getServiceTimes, isSessionProduct, isWalkIn } from "../../../utils";
|
|
38
42
|
import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
|
|
39
|
-
import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
|
|
43
|
+
import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj, setDefaultCapacitys } from "../addService/utils";
|
|
40
44
|
import { setProductPrice } from "./utils";
|
|
41
45
|
import NoteModal from "../../../../../plus/noteModal";
|
|
42
46
|
import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
|
|
47
|
+
import EditTabs from "../../../info/service/editService/EditTabs";
|
|
48
|
+
import BookingList from "../../../info/service/editService/BookingList";
|
|
49
|
+
import dayjs from "dayjs";
|
|
50
|
+
import { createBookingItemsByGroup, getGroupTotalPrice } from "../../../info/service2/Group/utils";
|
|
43
51
|
var submitLock = false;
|
|
44
52
|
var Info = function Info(_, ref) {
|
|
45
|
-
var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$
|
|
53
|
+
var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI7, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI12, _state$bookingConfig5, _state$service$cacheI13, _state$service$cacheI14, _state$service9, _state$service$resour2, _state$service$cacheI16, _state$service$cacheI17, _state$client2;
|
|
46
54
|
var _Form$useForm = Form.useForm(),
|
|
47
55
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
48
56
|
form = _Form$useForm2[0];
|
|
@@ -50,7 +58,11 @@ var Info = function Info(_, ref) {
|
|
|
50
58
|
var useResource = Form.useWatch('resource', form);
|
|
51
59
|
var useStartTime = Form.useWatch('start_time', form);
|
|
52
60
|
var useDuration = Form.useWatch('duration', form);
|
|
61
|
+
var useHolder = Form.useWatch('holder', form);
|
|
62
|
+
var useHolderId = Form.useWatch('holder_id', form);
|
|
53
63
|
var useNote = Form.useWatch('note', form);
|
|
64
|
+
var useStartDate = Form.useWatch('start_date', form);
|
|
65
|
+
var useEndDate = Form.useWatch('end_date', form);
|
|
54
66
|
var _useContext = useContext(Context),
|
|
55
67
|
state = _useContext.state,
|
|
56
68
|
dispatch = _useContext.dispatch;
|
|
@@ -64,6 +76,11 @@ var Info = function Info(_, ref) {
|
|
|
64
76
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
77
|
open = _useState4[0],
|
|
66
78
|
setOpen = _useState4[1];
|
|
79
|
+
// 当前tab 跨日预约时展示tabs
|
|
80
|
+
var _useState5 = useState('batch_edit'),
|
|
81
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
82
|
+
currentTab = _useState6[0],
|
|
83
|
+
setCurrentTab = _useState6[1];
|
|
67
84
|
useEffect(function () {
|
|
68
85
|
window.openBookingEditModal = function () {
|
|
69
86
|
setOpen(true);
|
|
@@ -150,6 +167,7 @@ var Info = function Info(_, ref) {
|
|
|
150
167
|
*/
|
|
151
168
|
var timeObj = useMemo(function () {
|
|
152
169
|
var val = getTimeObj({
|
|
170
|
+
cacheItem: getCurrentCacheItem(),
|
|
153
171
|
durationProps: durationProps,
|
|
154
172
|
useStartTime: useStartTime,
|
|
155
173
|
currentResource: currentResource,
|
|
@@ -241,7 +259,7 @@ var Info = function Info(_, ref) {
|
|
|
241
259
|
* @Date: 2024-01-09 14:04
|
|
242
260
|
*/
|
|
243
261
|
var onFinish = function onFinish(values) {
|
|
244
|
-
var _resourcesRef$current, _item$_extend, _item2, _item$
|
|
262
|
+
var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item2, _item3, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
|
|
245
263
|
var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
|
|
246
264
|
if (isShowTimeAndResource && !isSuccess) {
|
|
247
265
|
return;
|
|
@@ -265,46 +283,93 @@ var Info = function Info(_, ref) {
|
|
|
265
283
|
quantity: values.quantity
|
|
266
284
|
})
|
|
267
285
|
}, values);
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
286
|
+
|
|
287
|
+
// 跨日预约商品
|
|
288
|
+
if (isEditGroup) {
|
|
289
|
+
// 更新商品数量和更新日期
|
|
290
|
+
_extend.quantity = 1;
|
|
291
|
+
_extend.startDate = _extend === null || _extend === void 0 ? void 0 : _extend.start_date;
|
|
292
|
+
_extend.endDate = _extend === null || _extend === void 0 ? void 0 : _extend.end_date;
|
|
293
|
+
} else {
|
|
294
|
+
var _getServiceTimes = getServiceTimes({
|
|
295
|
+
_extend: _extend
|
|
296
|
+
}),
|
|
297
|
+
startDate = _getServiceTimes.startDate,
|
|
298
|
+
endDate = _getServiceTimes.endDate;
|
|
299
|
+
_extend.startDate = startDate;
|
|
300
|
+
_extend.endDate = endDate;
|
|
301
|
+
}
|
|
275
302
|
if (_extend.bundle_edit !== undefined) {
|
|
276
303
|
_extend.bundle_edit = 1;
|
|
277
304
|
}
|
|
278
305
|
_item._extend = _extend;
|
|
279
306
|
_item._time = new Date().getTime();
|
|
280
307
|
_item._serviceKey = genServiceKey(_item);
|
|
308
|
+
_item._holderKey = genHolderKey(_item);
|
|
309
|
+
// 如果holder 有多个,则需要拆分多个商品
|
|
310
|
+
// 另外一个情况 如果商品数量有多个,holder 数量小于商品数量也需要拆分
|
|
311
|
+
if (((_item$_extend2 = _item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.holder_id) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.length) > 1 || ((_item$_extend3 = _item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.quantity) > 1 && ((_item$_extend4 = _item._extend) === null || _item$_extend4 === void 0 || (_item$_extend4 = _item$_extend4.holder_id) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.length) >= 1) {
|
|
312
|
+
var holder_ids = _item._extend.holder_id;
|
|
313
|
+
_item._extend.holder_id = holder_ids[0];
|
|
314
|
+
holder_ids = holder_ids.slice(1);
|
|
315
|
+
_item._holderKey = genHolderKey(_item);
|
|
316
|
+
holder_ids.forEach(function (holder_id) {
|
|
317
|
+
var newItem = _objectSpread(_objectSpread({}, _item), {}, {
|
|
318
|
+
_id: getUniqueId(),
|
|
319
|
+
_extend: _objectSpread(_objectSpread({}, _item._extend), {}, {
|
|
320
|
+
holder_id: [holder_id],
|
|
321
|
+
quantity: 1
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
newItem._holderKey = genHolderKey(newItem);
|
|
325
|
+
_list.unshift(newItem);
|
|
326
|
+
// 当前的商品 quantity 需要减去 1
|
|
327
|
+
_item._extend.quantity -= 1;
|
|
328
|
+
});
|
|
329
|
+
// 如果剩余的商品 quantity 依旧大于 1,则超出 1 的部分作为同一个商品,holder_id 为 undefined
|
|
330
|
+
if (_item._extend.quantity > 1) {
|
|
331
|
+
var newItem = _objectSpread(_objectSpread({}, _item), {}, {
|
|
332
|
+
_id: getUniqueId(),
|
|
333
|
+
_extend: _objectSpread(_objectSpread({}, _item._extend), {}, {
|
|
334
|
+
holder_id: undefined,
|
|
335
|
+
quantity: _item._extend.quantity - 1
|
|
336
|
+
})
|
|
337
|
+
});
|
|
338
|
+
newItem._holderKey = genHolderKey(newItem);
|
|
339
|
+
_list.unshift(newItem);
|
|
340
|
+
_item._extend.quantity = 1;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
281
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;
|
|
282
345
|
_item = setProductPrice(_item, {
|
|
283
346
|
newTotal: values.total,
|
|
284
|
-
origin_total: (_item$
|
|
347
|
+
origin_total: (_item$_extend5 = _item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.origin_total
|
|
285
348
|
});
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
_list = detail.list;
|
|
349
|
+
if (groupId) {
|
|
350
|
+
_list = _list.filter(function (d) {
|
|
351
|
+
var _d$_extend;
|
|
352
|
+
return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.groupId) !== groupId;
|
|
353
|
+
});
|
|
354
|
+
_list = _list.concat(createBookingItemsByGroup(_item, true));
|
|
293
355
|
} else {
|
|
294
|
-
//
|
|
295
|
-
if (
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
356
|
+
// 判断是新增还是编辑
|
|
357
|
+
if (!_list.some(function (d) {
|
|
358
|
+
return d._id === _id;
|
|
359
|
+
})) {
|
|
360
|
+
var detail = addService(_list, _item, state);
|
|
361
|
+
_list = detail.list;
|
|
362
|
+
} else {
|
|
363
|
+
// 手动改价时移除优惠券使用
|
|
364
|
+
if (isChangeTotal.current) {
|
|
365
|
+
delete _item.discount_list;
|
|
366
|
+
}
|
|
367
|
+
_list = _list.map(function (d) {
|
|
368
|
+
return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
|
|
369
|
+
new: 0
|
|
370
|
+
}) : d;
|
|
301
371
|
});
|
|
302
372
|
}
|
|
303
|
-
_list = _list.map(function (d) {
|
|
304
|
-
return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
|
|
305
|
-
new: 0
|
|
306
|
-
}) : d;
|
|
307
|
-
});
|
|
308
373
|
}
|
|
309
374
|
deleteCacheParams();
|
|
310
375
|
console.log('_onFinish', _list);
|
|
@@ -317,6 +382,19 @@ var Info = function Info(_, ref) {
|
|
|
317
382
|
}));
|
|
318
383
|
}
|
|
319
384
|
(_window$closeBookingE2 = (_window2 = window).closeBookingEditModal) === null || _window$closeBookingE2 === void 0 || _window$closeBookingE2.call(_window2);
|
|
385
|
+
// 排序:没有 _extend_holder_id 的靠前,有的靠后
|
|
386
|
+
_list.sort(function (a, b) {
|
|
387
|
+
var _a$_extend, _b$_extend;
|
|
388
|
+
var aHasHolderId = ((_a$_extend = a._extend) === null || _a$_extend === void 0 ? void 0 : _a$_extend.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
389
|
+
var bHasHolderId = ((_b$_extend = b._extend) === null || _b$_extend === void 0 ? void 0 : _b$_extend.holder_id) && (Array.isArray(b._extend.holder_id) ? b._extend.holder_id.length > 0 : true);
|
|
390
|
+
|
|
391
|
+
// 如果 a 没有 holder_id,b 有,a 排在前面(返回负数)
|
|
392
|
+
if (!aHasHolderId && bHasHolderId) return -1;
|
|
393
|
+
// 如果 a 有 holder_id,b 没有,a 排在后面(返回正数)
|
|
394
|
+
if (aHasHolderId && !bHasHolderId) return 1;
|
|
395
|
+
// 其他情况保持原顺序
|
|
396
|
+
return 0;
|
|
397
|
+
});
|
|
320
398
|
dispatch({
|
|
321
399
|
type: 'setService',
|
|
322
400
|
payload: {
|
|
@@ -340,13 +418,14 @@ var Info = function Info(_, ref) {
|
|
|
340
418
|
var setEditData = useMemoizedFn(function (_cacheItem, open, openProductDetail) {
|
|
341
419
|
console.timeEnd('handleChange');
|
|
342
420
|
console.log('setEditDatasetEditData', _cacheItem, open);
|
|
421
|
+
setCurrentTab('batch_edit');
|
|
343
422
|
isChangeTotal.current = false;
|
|
344
423
|
var cacheItem = _cacheItem || state.service.cacheItem;
|
|
345
424
|
var values = cacheItem._extend;
|
|
346
425
|
var startTime = performance.now();
|
|
347
426
|
console.log(startTime, 'startTime');
|
|
348
427
|
form.resetFields();
|
|
349
|
-
form.setFieldsValue(values);
|
|
428
|
+
// form.setFieldsValue(values);
|
|
350
429
|
// form.setFieldValue('resource', values.resource)
|
|
351
430
|
|
|
352
431
|
// values.resource[1117][0].times = [];
|
|
@@ -357,19 +436,24 @@ var Info = function Info(_, ref) {
|
|
|
357
436
|
// }
|
|
358
437
|
// };
|
|
359
438
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
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
|
+
});
|
|
373
457
|
var endTime = performance.now();
|
|
374
458
|
console.log(endTime - window.pp1, '打开商品5');
|
|
375
459
|
console.log('执行时间', endTime - startTime, values);
|
|
@@ -397,9 +481,10 @@ var Info = function Info(_, ref) {
|
|
|
397
481
|
return cPrice !== oPrice;
|
|
398
482
|
}, [useTotal, (_state$service$cacheI5 = state.service.cacheItem) === null || _state$service$cacheI5 === void 0 || (_state$service$cacheI5 = _state$service$cacheI5._extend) === null || _state$service$cacheI5 === void 0 ? void 0 : _state$service$cacheI5.origin_total]);
|
|
399
483
|
var getResources = function getResources() {
|
|
484
|
+
var _state$service$cacheI6;
|
|
400
485
|
var res = formatResources({
|
|
401
486
|
cacheItem: getCurrentCacheItem(),
|
|
402
|
-
resourcesOrigin: state.service.cacheItem._data.resourcesOrigin
|
|
487
|
+
resourcesOrigin: (_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 || (_state$service$cacheI6 = _state$service$cacheI6._data) === null || _state$service$cacheI6 === void 0 ? void 0 : _state$service$cacheI6.resourcesOrigin
|
|
403
488
|
});
|
|
404
489
|
dispatch({
|
|
405
490
|
type: 'setService',
|
|
@@ -469,7 +554,7 @@ var Info = function Info(_, ref) {
|
|
|
469
554
|
*/
|
|
470
555
|
useEffect(function () {
|
|
471
556
|
getDiscount();
|
|
472
|
-
}, [useTotal, (_state$service$
|
|
557
|
+
}, [useTotal, (_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total]);
|
|
473
558
|
var bundles = useMemo(function () {
|
|
474
559
|
var _state$service5;
|
|
475
560
|
return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 || (_state$service5 = _state$service5._extend) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.other) === null || _state$service5 === void 0 ? void 0 : _state$service5.bundle) || [];
|
|
@@ -493,11 +578,11 @@ var Info = function Info(_, ref) {
|
|
|
493
578
|
var isSession = isSessionProduct(item);
|
|
494
579
|
var sessionValue = {};
|
|
495
580
|
if (isSession) {
|
|
496
|
-
var _item$
|
|
581
|
+
var _item$_extend6, _item$_extend7, _item$_extend8;
|
|
497
582
|
sessionValue.startEndTime = {
|
|
498
|
-
startDate: item === null || item === void 0 || (_item$
|
|
499
|
-
endDate: item === null || item === void 0 || (_item$
|
|
500
|
-
duration: item === null || item === void 0 || (_item$
|
|
583
|
+
startDate: item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.start_date,
|
|
584
|
+
endDate: item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.end_date,
|
|
585
|
+
duration: item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.duration
|
|
501
586
|
};
|
|
502
587
|
}
|
|
503
588
|
|
|
@@ -624,6 +709,17 @@ var Info = function Info(_, ref) {
|
|
|
624
709
|
}, [state.renderType, isNormalProduct]);
|
|
625
710
|
var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
|
|
626
711
|
var isNoSpecAndPackage = getIsNoSpecAndPackage(state.service.cacheItem);
|
|
712
|
+
|
|
713
|
+
// 商品组数据
|
|
714
|
+
var items = useMemo(function () {
|
|
715
|
+
var _getCurrentCacheItem;
|
|
716
|
+
return ((_getCurrentCacheItem = getCurrentCacheItem()) === null || _getCurrentCacheItem === void 0 || (_getCurrentCacheItem = _getCurrentCacheItem._extend) === null || _getCurrentCacheItem === void 0 ? void 0 : _getCurrentCacheItem.items) || [];
|
|
717
|
+
}, [getCurrentCacheItem(), state.service.cacheItem, currentResource, useTotal]);
|
|
718
|
+
|
|
719
|
+
// 是否是编辑组
|
|
720
|
+
var isEditGroup = useMemo(function () {
|
|
721
|
+
return items.length;
|
|
722
|
+
}, [items]);
|
|
627
723
|
var handleNoteConfirm = function handleNoteConfirm(noteValue) {
|
|
628
724
|
form.setFieldsValue({
|
|
629
725
|
note: noteValue
|
|
@@ -667,7 +763,7 @@ var Info = function Info(_, ref) {
|
|
|
667
763
|
}))));
|
|
668
764
|
}, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 ? void 0 : _state$service8.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
|
|
669
765
|
var price = useMemo(function () {
|
|
670
|
-
var _state$service$
|
|
766
|
+
var _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$service$cacheI11;
|
|
671
767
|
return /*#__PURE__*/React.createElement(Col, {
|
|
672
768
|
span: 24
|
|
673
769
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -676,7 +772,7 @@ var Info = function Info(_, ref) {
|
|
|
676
772
|
rules: [{
|
|
677
773
|
required: true
|
|
678
774
|
}],
|
|
679
|
-
extra: useTotal !== ((_state$service$
|
|
775
|
+
extra: useTotal !== ((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
|
|
680
776
|
}, /*#__PURE__*/React.createElement(DiscountKeyboard.InputNumber, {
|
|
681
777
|
style: {
|
|
682
778
|
width: '100%'
|
|
@@ -686,8 +782,8 @@ var Info = function Info(_, ref) {
|
|
|
686
782
|
prefix: state.amountSymbol,
|
|
687
783
|
onChange: handleTotalChange,
|
|
688
784
|
disabled: state.channelDisabledEdit,
|
|
689
|
-
originalValue: ((_state$service$
|
|
690
|
-
placeholder: ((_state$service$
|
|
785
|
+
originalValue: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || 0,
|
|
786
|
+
placeholder: ((_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total) || '0',
|
|
691
787
|
size: "large",
|
|
692
788
|
keyboardProps: {
|
|
693
789
|
containerProps: {
|
|
@@ -696,7 +792,7 @@ var Info = function Info(_, ref) {
|
|
|
696
792
|
selectType: 'dark'
|
|
697
793
|
}
|
|
698
794
|
})));
|
|
699
|
-
}, [useTotal, (_state$service$
|
|
795
|
+
}, [useTotal, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._extend) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.origin_total, state.amountSymbol, state.channelDisabledEdit]);
|
|
700
796
|
var reason = useMemo(function () {
|
|
701
797
|
return isReason ? /*#__PURE__*/React.createElement(Col, {
|
|
702
798
|
span: 24
|
|
@@ -707,17 +803,30 @@ var Info = function Info(_, ref) {
|
|
|
707
803
|
size: "large"
|
|
708
804
|
}))) : null;
|
|
709
805
|
}, [isReason]);
|
|
806
|
+
var DateCom = function DateCom(position) {
|
|
807
|
+
return /*#__PURE__*/React.createElement(DatePicker, {
|
|
808
|
+
className: "pisell-lowcode__booking-service-select-date",
|
|
809
|
+
disabledDate: function disabledDate(current) {
|
|
810
|
+
return _disabledDate(current, position, state.date.value);
|
|
811
|
+
},
|
|
812
|
+
size: "large",
|
|
813
|
+
style: {
|
|
814
|
+
width: '100%'
|
|
815
|
+
},
|
|
816
|
+
format: state.locale === 'en' ? 'DD/MM/YYYY' : 'YYYY-MM-DD'
|
|
817
|
+
});
|
|
818
|
+
};
|
|
710
819
|
var startTime = useMemo(function () {
|
|
711
820
|
var _state$bookingConfig4;
|
|
712
821
|
return /*#__PURE__*/React.createElement(Col, {
|
|
713
822
|
span: 12
|
|
714
823
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
715
|
-
label: locales.getText('pisell2.text.start_time'),
|
|
716
|
-
name:
|
|
824
|
+
label: locales.getText(isEditGroup ? 'pisell2.text.start_date' : 'pisell2.text.start_time'),
|
|
825
|
+
name: isEditGroup ? 'start_date' : 'start_time',
|
|
717
826
|
rules: [{
|
|
718
827
|
required: true
|
|
719
828
|
}]
|
|
720
|
-
}, SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
|
|
829
|
+
}, isEditGroup ? DateCom('start') : SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
|
|
721
830
|
slice: (_state$bookingConfig4 = state.bookingConfig) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.config) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.basic) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.service_time) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.value,
|
|
722
831
|
timePickerProps: {
|
|
723
832
|
style: {
|
|
@@ -730,11 +839,22 @@ var Info = function Info(_, ref) {
|
|
|
730
839
|
}
|
|
731
840
|
}
|
|
732
841
|
}) : null));
|
|
733
|
-
}, [SelectTime, (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.basic) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.service_time) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.value]);
|
|
842
|
+
}, [SelectTime, (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.basic) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.service_time) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.value, isEditGroup]);
|
|
843
|
+
var endTime = useMemo(function () {
|
|
844
|
+
if (!isEditGroup) {
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
848
|
+
span: 12
|
|
849
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
850
|
+
label: locales.getText('pisell2.text.end_date'),
|
|
851
|
+
name: "end_date"
|
|
852
|
+
}, DateCom('end')));
|
|
853
|
+
}, [isEditGroup]);
|
|
734
854
|
var duration = useMemo(function () {
|
|
735
855
|
console.log('render form duration');
|
|
736
856
|
return /*#__PURE__*/React.createElement(Col, {
|
|
737
|
-
span: 12
|
|
857
|
+
span: isEditGroup ? 24 : 12
|
|
738
858
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
739
859
|
label: locales.getText('pisell2.text.duration'),
|
|
740
860
|
name: "duration",
|
|
@@ -744,7 +864,7 @@ var Info = function Info(_, ref) {
|
|
|
744
864
|
}, /*#__PURE__*/React.createElement(Duration, _extends({}, durationProps, {
|
|
745
865
|
timeObj: timeObj
|
|
746
866
|
}))));
|
|
747
|
-
}, [durationProps, timeObj]);
|
|
867
|
+
}, [durationProps, timeObj, isEditGroup]);
|
|
748
868
|
var resource = useMemo(function () {
|
|
749
869
|
console.log('render form resource');
|
|
750
870
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -760,7 +880,32 @@ var Info = function Info(_, ref) {
|
|
|
760
880
|
// useStartTime={useStartTime}
|
|
761
881
|
}));
|
|
762
882
|
// 只监听内部使用值
|
|
763
|
-
}, [state.renderType, (_state$service$
|
|
883
|
+
}, [state.renderType, (_state$service$cacheI13 = state.service.cacheItem) === null || _state$service$cacheI13 === void 0 || (_state$service$cacheI13 = _state$service$cacheI13._data) === null || _state$service$cacheI13 === void 0 ? void 0 : _state$service$cacheI13.resources, (_state$service$cacheI14 = state.service.cacheItem) === null || _state$service$cacheI14 === void 0 || (_state$service$cacheI14 = _state$service$cacheI14._data) === null || _state$service$cacheI14 === void 0 ? void 0 : _state$service$cacheI14.resourceMaps]);
|
|
884
|
+
var holder = useMemo(function () {
|
|
885
|
+
var _state$bookingConfig6, _state$service$cacheI15, _state$bookingConfig7;
|
|
886
|
+
var showExtra = (state === null || state === void 0 || (_state$bookingConfig6 = state.bookingConfig) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.config) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.basic) === null || _state$bookingConfig6 === void 0 ? void 0 : _state$bookingConfig6.subject_require) === 'require' && (!useHolderId || (useHolderId === null || useHolderId === void 0 ? void 0 : useHolderId.length) < ((_state$service$cacheI15 = state.service.cacheItem) === null || _state$service$cacheI15 === void 0 || (_state$service$cacheI15 = _state$service$cacheI15._extend) === null || _state$service$cacheI15 === void 0 ? void 0 : _state$service$cacheI15.quantity));
|
|
887
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
888
|
+
name: "holder_id",
|
|
889
|
+
style: {
|
|
890
|
+
width: '100%'
|
|
891
|
+
},
|
|
892
|
+
rules: [{
|
|
893
|
+
required: (state === null || state === void 0 || (_state$bookingConfig7 = state.bookingConfig) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.config) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.basic) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.subject_require) === 'require',
|
|
894
|
+
validator: function validator(rule, value, callback) {
|
|
895
|
+
debugger;
|
|
896
|
+
if (showExtra) {
|
|
897
|
+
callback(locales.getText('page.booking.text.holder.length-error'));
|
|
898
|
+
} else {
|
|
899
|
+
callback();
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}]
|
|
903
|
+
}, /*#__PURE__*/React.createElement(Holder, {
|
|
904
|
+
state: state,
|
|
905
|
+
cacheItem: state.service.cacheItem,
|
|
906
|
+
dispatch: dispatch
|
|
907
|
+
})));
|
|
908
|
+
}, [state.pet, state.client, state.service.cacheItem, useHolderId]);
|
|
764
909
|
var capacity = useMemo(function () {
|
|
765
910
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
766
911
|
noStyle: true,
|
|
@@ -847,11 +992,11 @@ var Info = function Info(_, ref) {
|
|
|
847
992
|
}, locales.getText('pisell2.text.apply')));
|
|
848
993
|
}, [(_state$service$resour2 = state.service.resourcesOrigin) === null || _state$service$resour2 === void 0 ? void 0 : _state$service$resour2.length, isNormalProduct]);
|
|
849
994
|
console.log('render edit');
|
|
850
|
-
console.log(state.service.editModal && !((_state$service$
|
|
851
|
-
var
|
|
852
|
-
|
|
853
|
-
val =
|
|
854
|
-
setVal =
|
|
995
|
+
console.log(state.service.editModal && !((_state$service$cacheI16 = state.service.cacheItem) !== null && _state$service$cacheI16 !== void 0 && _state$service$cacheI16.autoClose), performance.now() - window.pp1, '打开商品1');
|
|
996
|
+
var _useState7 = useState(false),
|
|
997
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
998
|
+
val = _useState8[0],
|
|
999
|
+
setVal = _useState8[1];
|
|
855
1000
|
useEffect(function () {
|
|
856
1001
|
if (isShowTimeAndResource) {
|
|
857
1002
|
setTimeout(function () {
|
|
@@ -861,6 +1006,113 @@ var Info = function Info(_, ref) {
|
|
|
861
1006
|
setVal(false);
|
|
862
1007
|
}
|
|
863
1008
|
}, [isShowTimeAndResource]);
|
|
1009
|
+
var groupDom = useMemo(function () {
|
|
1010
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!isEditGroup && /*#__PURE__*/React.createElement(EditTabs, {
|
|
1011
|
+
value: currentTab,
|
|
1012
|
+
onChange: function onChange(e) {
|
|
1013
|
+
console.log(e);
|
|
1014
|
+
setCurrentTab(e);
|
|
1015
|
+
}
|
|
1016
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1017
|
+
className: "",
|
|
1018
|
+
style: {
|
|
1019
|
+
display: currentTab === 'booking_list' ? 'block' : 'none'
|
|
1020
|
+
}
|
|
1021
|
+
}, /*#__PURE__*/React.createElement(BookingList, {
|
|
1022
|
+
items: items
|
|
1023
|
+
})));
|
|
1024
|
+
}, [isEditGroup, currentTab, items]);
|
|
1025
|
+
var updateMultiDay = /*#__PURE__*/function () {
|
|
1026
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
1027
|
+
var start_date, end_date, duration, cacheItem, fieldsValues;
|
|
1028
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1029
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1030
|
+
case 0:
|
|
1031
|
+
start_date = _ref.start_date, end_date = _ref.end_date, duration = _ref.duration;
|
|
1032
|
+
_context.next = 3;
|
|
1033
|
+
return getMultiDay({
|
|
1034
|
+
start_date: start_date,
|
|
1035
|
+
end_date: end_date,
|
|
1036
|
+
state: state,
|
|
1037
|
+
cacheItem: getCurrentCacheItem()
|
|
1038
|
+
});
|
|
1039
|
+
case 3:
|
|
1040
|
+
cacheItem = _context.sent;
|
|
1041
|
+
// 兼容时长为空的情况
|
|
1042
|
+
if (duration !== undefined) {
|
|
1043
|
+
cacheItem._extend.duration = duration;
|
|
1044
|
+
}
|
|
1045
|
+
cacheItem._extend.items = createBookingItemsByGroup(cacheItem);
|
|
1046
|
+
cacheItem._extend = _objectSpread(_objectSpread({}, cacheItem._extend), getGroupTotalPrice(cacheItem._extend.items));
|
|
1047
|
+
// 覆盖商品
|
|
1048
|
+
dispatch({
|
|
1049
|
+
type: 'setService',
|
|
1050
|
+
payload: {
|
|
1051
|
+
cacheItem: cacheItem
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
fieldsValues = {
|
|
1055
|
+
total: cacheItem._extend.total
|
|
1056
|
+
}; // 更新表单内的商品价格
|
|
1057
|
+
form.setFieldsValue(fieldsValues);
|
|
1058
|
+
case 10:
|
|
1059
|
+
case "end":
|
|
1060
|
+
return _context.stop();
|
|
1061
|
+
}
|
|
1062
|
+
}, _callee);
|
|
1063
|
+
}));
|
|
1064
|
+
return function updateMultiDay(_x) {
|
|
1065
|
+
return _ref2.apply(this, arguments);
|
|
1066
|
+
};
|
|
1067
|
+
}();
|
|
1068
|
+
var onValuesChange = function onValuesChange(changedValues) {
|
|
1069
|
+
// 跨日预约
|
|
1070
|
+
if (isEditGroup) {
|
|
1071
|
+
// 根据时长更新结束时间
|
|
1072
|
+
if (changedValues !== null && changedValues !== void 0 && changedValues.duration) {
|
|
1073
|
+
var end_date = dayjs(useStartDate).add(changedValues === null || changedValues === void 0 ? void 0 : changedValues.duration, 'day');
|
|
1074
|
+
form.setFieldsValue({
|
|
1075
|
+
end_date: end_date
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
// 跨日预约报价单
|
|
1079
|
+
return updateMultiDay({
|
|
1080
|
+
start_date: useStartDate,
|
|
1081
|
+
end_date: end_date,
|
|
1082
|
+
duration: changedValues === null || changedValues === void 0 ? void 0 : changedValues.duration
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
// 验证结束日期
|
|
1087
|
+
if (changedValues !== null && changedValues !== void 0 && changedValues.start_date) {
|
|
1088
|
+
var startDate = dayjs(changedValues === null || changedValues === void 0 ? void 0 : changedValues.start_date);
|
|
1089
|
+
var endDate = dayjs(useEndDate);
|
|
1090
|
+
// 如果开始日期大于结束日期,则清空数据
|
|
1091
|
+
if (startDate.isAfter(endDate)) {
|
|
1092
|
+
return form.setFieldsValue({
|
|
1093
|
+
duration: undefined,
|
|
1094
|
+
end_date: undefined
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
// 计算时长
|
|
1100
|
+
if (changedValues !== null && changedValues !== void 0 && changedValues.start_date || changedValues !== null && changedValues !== void 0 && changedValues.end_date) {
|
|
1101
|
+
var _cacheItem2 = getCurrentCacheItem();
|
|
1102
|
+
var _duration = getDays(_cacheItem2, 'days');
|
|
1103
|
+
var start_date = (changedValues === null || changedValues === void 0 ? void 0 : changedValues.start_date) || useStartDate;
|
|
1104
|
+
var _end_date = (changedValues === null || changedValues === void 0 ? void 0 : changedValues.end_date) || useEndDate;
|
|
1105
|
+
updateMultiDay({
|
|
1106
|
+
start_date: start_date,
|
|
1107
|
+
end_date: _end_date,
|
|
1108
|
+
duration: _duration
|
|
1109
|
+
});
|
|
1110
|
+
return form.setFieldsValue({
|
|
1111
|
+
duration: _duration
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
864
1116
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
|
|
865
1117
|
titleNoWrap: true
|
|
866
1118
|
//通过zIndex的方式控制 添加商品 和 编辑服务弹窗的上下层级
|
|
@@ -868,7 +1120,7 @@ var Info = function Info(_, ref) {
|
|
|
868
1120
|
zIndex: state.service.changeService ? 999 : 1000,
|
|
869
1121
|
forceRender: true,
|
|
870
1122
|
mask: state.drawerMask,
|
|
871
|
-
open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$
|
|
1123
|
+
open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$cacheI17 = state.service.cacheItem) !== null && _state$service$cacheI17 !== void 0 && _state$service$cacheI17.autoClose),
|
|
872
1124
|
title: locales.getText('pisell2.text.edit-service'),
|
|
873
1125
|
onClose: function onClose() {
|
|
874
1126
|
var _window$closeBookingE4, _window4;
|
|
@@ -884,16 +1136,20 @@ var Info = function Info(_, ref) {
|
|
|
884
1136
|
}
|
|
885
1137
|
}, /*#__PURE__*/React.createElement("div", {
|
|
886
1138
|
className: "pisell-lowcode__booking-service-body-edit"
|
|
887
|
-
}, /*#__PURE__*/React.createElement(Form, {
|
|
1139
|
+
}, groupDom, /*#__PURE__*/React.createElement(Form, {
|
|
888
1140
|
layout: "vertical",
|
|
889
1141
|
form: form,
|
|
890
|
-
onFinish: onFinish
|
|
1142
|
+
onFinish: onFinish,
|
|
1143
|
+
onValuesChange: onValuesChange,
|
|
1144
|
+
style: {
|
|
1145
|
+
display: currentTab === 'batch_edit' ? 'block' : 'none'
|
|
1146
|
+
}
|
|
891
1147
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
892
1148
|
style: {
|
|
893
1149
|
width: '100%'
|
|
894
1150
|
},
|
|
895
1151
|
gutter: [16, 0]
|
|
896
|
-
}, productName, price, reason, val && isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity), /*#__PURE__*/React.createElement(Form.Item, {
|
|
1152
|
+
}, productName, price, reason, val && isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !isNormalProductByDurationSchedule(state.service.cacheItem) && !isWalkIn((_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id) && holder), /*#__PURE__*/React.createElement(Form.Item, {
|
|
897
1153
|
noStyle: true,
|
|
898
1154
|
name: "note"
|
|
899
1155
|
}, noteModalOpen && /*#__PURE__*/React.createElement(NoteModal, {
|