@pisell/private-materials 6.5.27 → 6.6.2
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 +146 -165
- 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/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/actionButtons/index.js +34 -20
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +66 -33
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +126 -99
- package/es/components/booking/components/voucher/index.js +25 -9
- package/es/components/booking/dashboard/serve.js +1 -6
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/serve.js +2 -12
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/client/serve.js +2 -11
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -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/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/pet/serve.js +1 -6
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +10 -4
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +25 -18
- 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 +92 -56
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +49 -9
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/serve.js +1 -6
- package/es/components/booking/info2/service/addService/index.js +146 -89
- package/es/components/booking/info2/service/addService/utils.d.ts +9 -1
- package/es/components/booking/info2/service/addService/utils.js +83 -14
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- 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 +313 -57
- package/es/components/booking/info2/utilsByBooking.js +19 -14
- package/es/components/booking/locales.d.ts +36 -0
- package/es/components/booking/locales.js +48 -3
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- 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 +16 -7
- package/es/components/booking/utils.js +26 -37
- package/es/components/checkout/PaymentModal.js +61 -30
- package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/es/components/checkout/components/ScrollableList/index.js +0 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/eftposPay/linkly/index.js +64 -2
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/list/List.js +3 -0
- package/es/components/pay/toB/components/MX51/index.js +14 -44
- package/es/components/pay/toB/types/index.d.ts +0 -12
- package/es/components/pay/toB/types/index.js +0 -4
- package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +421 -794
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +1 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.js +0 -2
- package/es/components/ticketBooking/serve.js +17 -119
- package/es/components/ticketBooking/utils/index.d.ts +7 -1
- package/es/components/ticketBooking/utils/index.js +44 -28
- package/es/hooks/useEngineContext.d.ts +0 -1
- package/es/hooks/useEngineContext.js +0 -7
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/es/plus/productSelect/ProductCard/index.js +1 -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/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -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.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/actionButtons/index.js +11 -2
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +26 -5
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +120 -82
- package/lib/components/booking/components/voucher/index.js +10 -1
- package/lib/components/booking/dashboard/serve.js +1 -6
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/serve.js +2 -12
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/client/serve.js +2 -13
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- 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/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/pet/serve.js +1 -6
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +5 -3
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +8 -17
- 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 +38 -29
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +34 -5
- package/lib/components/booking/info2/index.js +11 -5
- package/lib/components/booking/info2/serve.js +1 -6
- package/lib/components/booking/info2/service/addService/index.js +22 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +9 -1
- package/lib/components/booking/info2/service/addService/utils.js +48 -11
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- 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 +254 -32
- package/lib/components/booking/info2/utilsByBooking.js +26 -19
- package/lib/components/booking/locales.d.ts +36 -0
- package/lib/components/booking/locales.js +42 -3
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- 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 +16 -7
- package/lib/components/booking/utils.js +18 -21
- package/lib/components/checkout/PaymentModal.js +41 -18
- package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/lib/components/checkout/components/ScrollableList/index.js +0 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/eftposPay/linkly/index.js +31 -1
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/list/List.js +3 -0
- package/lib/components/pay/toB/components/MX51/index.js +12 -37
- package/lib/components/pay/toB/types/index.d.ts +0 -12
- package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- 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.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +281 -313
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.js +0 -2
- package/lib/components/ticketBooking/serve.js +15 -117
- package/lib/components/ticketBooking/utils/index.d.ts +7 -1
- package/lib/components/ticketBooking/utils/index.js +29 -23
- package/lib/hooks/useEngineContext.d.ts +0 -1
- package/lib/hooks/useEngineContext.js +2 -10
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/lib/plus/productSelect/ProductCard/index.js +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
- 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/plus/selectHolder/components/HolderList/index.js +63 -0
- 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/plus/selectHolder/locales.js +47 -0
- 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/plus/selectHolder/utils.js +34 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
- 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/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -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 +13 -11
- package/es/hooks/printer.d.ts +0 -4
- package/es/hooks/printer.js +0 -35
- package/lib/hooks/printer.d.ts +0 -4
|
@@ -8,7 +8,7 @@ import React, { useContext, useMemo } from 'react';
|
|
|
8
8
|
import ShoppingCart from "../../../shoppingCart";
|
|
9
9
|
import { CartContext } from "../../../shoppingCart/Provider";
|
|
10
10
|
import { Context } from "../model";
|
|
11
|
-
import { formatProducts, isEventBooking,
|
|
11
|
+
import { formatProducts, isEventBooking, updateServices } from "../service2/utils";
|
|
12
12
|
import useHolderConfig from "../hooks/useHolderConfig";
|
|
13
13
|
import { useMemoizedFn } from 'ahooks';
|
|
14
14
|
import { getProductExtend } from "../../info2/service/addService/utils";
|
|
@@ -18,7 +18,11 @@ var Lists = function Lists(_ref) {
|
|
|
18
18
|
var onEdit = _ref.onEdit,
|
|
19
19
|
onChange = _ref.onChange,
|
|
20
20
|
onAction = _ref.onAction,
|
|
21
|
-
isParallelResource = _ref.isParallelResource
|
|
21
|
+
isParallelResource = _ref.isParallelResource,
|
|
22
|
+
_ref$isShowDelete = _ref.isShowDelete,
|
|
23
|
+
isShowDelete = _ref$isShowDelete === void 0 ? true : _ref$isShowDelete,
|
|
24
|
+
_ref$isShowAmountFoot = _ref.isShowAmountFooter,
|
|
25
|
+
isShowAmountFooter = _ref$isShowAmountFoot === void 0 ? true : _ref$isShowAmountFoot;
|
|
22
26
|
var _useContext = useContext(Context),
|
|
23
27
|
state = _useContext.state,
|
|
24
28
|
dispatch = _useContext.dispatch;
|
|
@@ -53,7 +57,7 @@ var Lists = function Lists(_ref) {
|
|
|
53
57
|
var cacheItem = _objectSpread(_objectSpread({}, product), {}, {
|
|
54
58
|
new: 0
|
|
55
59
|
});
|
|
56
|
-
if (isParallelResource
|
|
60
|
+
if (isParallelResource) {
|
|
57
61
|
cacheItem = getProductExtend({
|
|
58
62
|
cacheItem: cacheItem,
|
|
59
63
|
state: state
|
|
@@ -89,6 +93,8 @@ var Lists = function Lists(_ref) {
|
|
|
89
93
|
return {
|
|
90
94
|
hideAddBtn: state.isTerminalDayBookingPage || state.isBookingCreatePage,
|
|
91
95
|
isShowNote: state.isBookingTicket2 ? true : isEventBooking(state),
|
|
96
|
+
isShowDelete: isShowDelete,
|
|
97
|
+
isShowAmountFooter: isShowAmountFooter,
|
|
92
98
|
isShowPackageNote: false,
|
|
93
99
|
accounts: [],
|
|
94
100
|
isEdit: !!(state !== null && state !== void 0 && state.bookingId),
|
|
@@ -104,7 +110,7 @@ var Lists = function Lists(_ref) {
|
|
|
104
110
|
var products = useMemo(function () {
|
|
105
111
|
var _state$service;
|
|
106
112
|
console.time('products');
|
|
107
|
-
var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state,
|
|
113
|
+
var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, true, true, isParallelResource);
|
|
108
114
|
console.timeEnd('products');
|
|
109
115
|
return p;
|
|
110
116
|
}, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value, state]);
|
|
@@ -1,10 +1,5 @@
|
|
|
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
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
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); } }
|
|
9
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); }); }; }
|
|
10
5
|
import { request } from "../../../utils";
|
|
@@ -15,12 +10,7 @@ export var getAddTimeProducts = /*#__PURE__*/function () {
|
|
|
15
10
|
while (1) switch (_context.prev = _context.next) {
|
|
16
11
|
case 0:
|
|
17
12
|
_context.next = 2;
|
|
18
|
-
return request.getRequest().post("/shop/product/query", params,
|
|
19
|
-
cache: {
|
|
20
|
-
mode: "remote_local",
|
|
21
|
-
type: "indexDB"
|
|
22
|
-
}
|
|
23
|
-
}));
|
|
13
|
+
return request.getRequest().post("/shop/product/query", params, config);
|
|
24
14
|
case 2:
|
|
25
15
|
_yield$request$getReq = _context.sent;
|
|
26
16
|
data = _yield$request$getReq.data;
|
|
@@ -18,3 +18,17 @@ export declare const getProductPrice: (params: {
|
|
|
18
18
|
customer_id: number;
|
|
19
19
|
schedule_date: string;
|
|
20
20
|
}) => Promise<any>;
|
|
21
|
+
declare type MultiDayProductPriceParams = {
|
|
22
|
+
customer_id: number;
|
|
23
|
+
data: {
|
|
24
|
+
product_id: number;
|
|
25
|
+
schedule_date: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 获取普通商品和跨日预约的价格
|
|
30
|
+
* @param params
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export declare const getNormalAndMultiDayProductPrice: (params: MultiDayProductPriceParams) => Promise<any>;
|
|
34
|
+
export {};
|
|
@@ -8,12 +8,7 @@ export var getProductDetail = /*#__PURE__*/function () {
|
|
|
8
8
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9
9
|
while (1) switch (_context.prev = _context.next) {
|
|
10
10
|
case 0:
|
|
11
|
-
return _context.abrupt("return", request.getRequest().get("/shop/product/query/".concat(id), params
|
|
12
|
-
cache: {
|
|
13
|
-
mode: "remote_local",
|
|
14
|
-
type: "indexDB"
|
|
15
|
-
}
|
|
16
|
-
}));
|
|
11
|
+
return _context.abrupt("return", request.getRequest().get("/shop/product/query/".concat(id), params));
|
|
17
12
|
case 1:
|
|
18
13
|
case "end":
|
|
19
14
|
return _context.stop();
|
|
@@ -27,7 +22,7 @@ export var getProductDetail = /*#__PURE__*/function () {
|
|
|
27
22
|
|
|
28
23
|
/**
|
|
29
24
|
* @title: 跨日预约获取预约商品报价单
|
|
30
|
-
* @description:
|
|
25
|
+
* @description:
|
|
31
26
|
* @param {string} id
|
|
32
27
|
* @param {any} params
|
|
33
28
|
* @return {*}
|
|
@@ -40,11 +35,7 @@ export var postMultiDay = /*#__PURE__*/function () {
|
|
|
40
35
|
while (1) switch (_context2.prev = _context2.next) {
|
|
41
36
|
case 0:
|
|
42
37
|
return _context2.abrupt("return", request.getRequest().post("/shop/product/multi-day/detail/".concat(id), params, {
|
|
43
|
-
useCache: true
|
|
44
|
-
cache: {
|
|
45
|
-
mode: "remote_local",
|
|
46
|
-
type: "indexDB"
|
|
47
|
-
}
|
|
38
|
+
useCache: true
|
|
48
39
|
}));
|
|
49
40
|
case 1:
|
|
50
41
|
case "end":
|
|
@@ -66,12 +57,7 @@ export var getProductPrice = /*#__PURE__*/function () {
|
|
|
66
57
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
67
58
|
while (1) switch (_context3.prev = _context3.next) {
|
|
68
59
|
case 0:
|
|
69
|
-
return _context3.abrupt("return", request.getRequest().post("/shop/product/query/price", params
|
|
70
|
-
cache: {
|
|
71
|
-
mode: "remote_local",
|
|
72
|
-
type: "indexDB"
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
60
|
+
return _context3.abrupt("return", request.getRequest().post("/shop/product/query/price", params));
|
|
75
61
|
case 1:
|
|
76
62
|
case "end":
|
|
77
63
|
return _context3.stop();
|
|
@@ -81,4 +67,25 @@ export var getProductPrice = /*#__PURE__*/function () {
|
|
|
81
67
|
return function getProductPrice(_x5) {
|
|
82
68
|
return _ref3.apply(this, arguments);
|
|
83
69
|
};
|
|
70
|
+
}();
|
|
71
|
+
/**
|
|
72
|
+
* 获取普通商品和跨日预约的价格
|
|
73
|
+
* @param params
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export var getNormalAndMultiDayProductPrice = /*#__PURE__*/function () {
|
|
77
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
78
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
79
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
80
|
+
case 0:
|
|
81
|
+
return _context4.abrupt("return", request.getRequest().post("/shop/product/query/shelf/price", params));
|
|
82
|
+
case 1:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context4.stop();
|
|
85
|
+
}
|
|
86
|
+
}, _callee4);
|
|
87
|
+
}));
|
|
88
|
+
return function getNormalAndMultiDayProductPrice(_x6) {
|
|
89
|
+
return _ref4.apply(this, arguments);
|
|
90
|
+
};
|
|
84
91
|
}();
|
|
@@ -7,6 +7,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { getUniqueId } from "@pisell/utils";
|
|
8
8
|
import { getProductTotalPrice } from "../../../utils";
|
|
9
9
|
import { distributeDiscountOrIncrease } from "../../service/serviceManager/distributeDiscount";
|
|
10
|
+
import { genServiceKey } from "../../../../ticketBooking/utils";
|
|
10
11
|
|
|
11
12
|
// 创建group
|
|
12
13
|
|
|
@@ -107,6 +108,7 @@ export var createBookingItemsByGroup = function createBookingItemsByGroup(item,
|
|
|
107
108
|
cacheItem._extend.total = totalPrice;
|
|
108
109
|
cacheItem._extend.origin_total = totalPrice;
|
|
109
110
|
cacheItem._extend.items = undefined;
|
|
111
|
+
cacheItem._serviceKey = genServiceKey(cacheItem);
|
|
110
112
|
bookings.push(cacheItem);
|
|
111
113
|
}
|
|
112
114
|
if (isBatchEdit) {
|
|
@@ -67,39 +67,7 @@ export declare const genRowKey: (key: string) => string;
|
|
|
67
67
|
* @Author: WangHan
|
|
68
68
|
* @Date: 2024-11-29 17:36
|
|
69
69
|
*/
|
|
70
|
-
export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean) =>
|
|
71
|
-
_origin: any;
|
|
72
|
-
id: any;
|
|
73
|
-
_id: any;
|
|
74
|
-
name: any;
|
|
75
|
-
title: any;
|
|
76
|
-
price: any;
|
|
77
|
-
total: number;
|
|
78
|
-
origin_total: number;
|
|
79
|
-
num: any;
|
|
80
|
-
image: any;
|
|
81
|
-
isShowNote: boolean;
|
|
82
|
-
note: any;
|
|
83
|
-
like_status: any;
|
|
84
|
-
bundle: any;
|
|
85
|
-
options: any;
|
|
86
|
-
errorMessage: string;
|
|
87
|
-
product_option_string: any;
|
|
88
|
-
discount_reason: any;
|
|
89
|
-
resource_id: any;
|
|
90
|
-
relation_form_name: any;
|
|
91
|
-
holder_title: any;
|
|
92
|
-
start_date: any;
|
|
93
|
-
end_date: any;
|
|
94
|
-
holder_id: any;
|
|
95
|
-
isNormalProduct: boolean;
|
|
96
|
-
isCustomItem: any;
|
|
97
|
-
vouchersApplicable: any;
|
|
98
|
-
locale: any;
|
|
99
|
-
symbol: any;
|
|
100
|
-
relation_products: any;
|
|
101
|
-
items: any[];
|
|
102
|
-
}[];
|
|
70
|
+
export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean) => any[];
|
|
103
71
|
/**
|
|
104
72
|
* @title: 禁用日期
|
|
105
73
|
* @description:
|
|
@@ -28,7 +28,7 @@ import localeTexts from "../../locales";
|
|
|
28
28
|
import { concatBookings, isGroupBooking, getProductByGroupId } from "./Group/utils";
|
|
29
29
|
import { isShowAddTime } from "../utils";
|
|
30
30
|
import { formatResources } from "../service/addService/utils";
|
|
31
|
-
import { getProductExtend } from "../../info2/service/addService/utils";
|
|
31
|
+
import { getProductExtend, isMultiDayProduct } from "../../info2/service/addService/utils";
|
|
32
32
|
import { getErrorList as getErrorListInfo2 } from "../../info2/utilsByBooking";
|
|
33
33
|
import { getRelationDetailsTotal } from "../../components/footer/amount";
|
|
34
34
|
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
@@ -557,7 +557,7 @@ export var genRowKey = function genRowKey(key) {
|
|
|
557
557
|
return "rowKey-".concat(key);
|
|
558
558
|
};
|
|
559
559
|
var getGeneralParams = function getGeneralParams(item, state, isParallelResource) {
|
|
560
|
-
var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9;
|
|
560
|
+
var _state$bookingConfig4, _state$bookingConfig5, _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9;
|
|
561
561
|
var pet = state.pet,
|
|
562
562
|
service = state.service;
|
|
563
563
|
var _ref8 = pet || {},
|
|
@@ -567,17 +567,12 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
567
567
|
var parallelResourceOtherParams = {};
|
|
568
568
|
var multiResources;
|
|
569
569
|
if (isParallelResource) {
|
|
570
|
-
var hasDataItem =
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
new: 0
|
|
577
|
-
}),
|
|
578
|
-
state: state
|
|
579
|
-
});
|
|
580
|
-
}
|
|
570
|
+
var hasDataItem = getProductExtend({
|
|
571
|
+
cacheItem: _objectSpread(_objectSpread({}, item), {}, {
|
|
572
|
+
new: 0
|
|
573
|
+
}),
|
|
574
|
+
state: state
|
|
575
|
+
});
|
|
581
576
|
var _ref9 = hasDataItem._data || {},
|
|
582
577
|
resourceMaps = _ref9.resourceMaps,
|
|
583
578
|
resources = _ref9.resources;
|
|
@@ -621,10 +616,11 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
621
616
|
}];
|
|
622
617
|
}
|
|
623
618
|
var isNormalProduct = isNormalProductByDurationSchedule(item);
|
|
619
|
+
var isMultiDay = isMultiDayProduct(item);
|
|
624
620
|
return _objectSpread({
|
|
625
621
|
format: ['HH:mm', 'HH:mm'],
|
|
626
622
|
show_time: true,
|
|
627
|
-
duration_type: 'minutes',
|
|
623
|
+
duration_type: isMultiDay ? 'days' : 'minutes',
|
|
628
624
|
// 当前可选择holder列表
|
|
629
625
|
holders: formatHolders(holders),
|
|
630
626
|
isShowChangeHolder: !isNormalProduct,
|
|
@@ -632,6 +628,8 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
632
628
|
actionText: locales.getText('page.booking.text.add-time'),
|
|
633
629
|
actionIcon: 'pisell2-clock-plus',
|
|
634
630
|
isMultipleResource: true,
|
|
631
|
+
isFormSubject: (state === null || state === void 0 || (_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.appointment_subject) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.type) === 'form',
|
|
632
|
+
holderType: (state === null || state === void 0 || (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.holder) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.form) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.form_type) || 'minors',
|
|
635
633
|
multiResources: multiResources,
|
|
636
634
|
holderMaxCount: item === null || item === void 0 ? void 0 : item._extend.quantity,
|
|
637
635
|
holderMode: (item === null || item === void 0 ? void 0 : item._extend.quantity) > 1 ? 'multiple' : undefined,
|
|
@@ -660,8 +658,6 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
660
658
|
var isGeneral = arguments.length > 3 ? arguments[3] : undefined;
|
|
661
659
|
var isParallelResource = arguments.length > 4 ? arguments[4] : undefined;
|
|
662
660
|
if (!(lists !== null && lists !== void 0 && lists.length)) return [];
|
|
663
|
-
var normalList = [];
|
|
664
|
-
var groupList = [];
|
|
665
661
|
var formItem = function formItem(item) {
|
|
666
662
|
var _item$_extend10, _item$_extend11, _item$_extend12, _item$_extend14, _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20, _item$_extend21, _item$_extend22, _item$_extend23, _resourceItem, _item$_extend24, _item$_extend25, _item$_extend26, _item$_extend27, _item$_extend28;
|
|
667
663
|
var _isDayBookingProduct = isDayBookingProduct(item, state);
|
|
@@ -670,21 +666,14 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
670
666
|
var bundle = formatBundle(item === null || item === void 0 || (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.bundle);
|
|
671
667
|
// 是否是普通商品
|
|
672
668
|
var isNormalProduct = !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
|
|
673
|
-
var isNormalProductByDurationScheduleVal = isNormalProductByDurationSchedule(item);
|
|
674
669
|
var resourceItem = {};
|
|
675
670
|
var errorMessage = '';
|
|
676
|
-
|
|
677
|
-
if ((_isDayBookingProduct || isGeneral) && !isNormalProductByDurationScheduleVal) {
|
|
671
|
+
if (_isDayBookingProduct || isGeneral) {
|
|
678
672
|
var _item$_extend13;
|
|
679
673
|
resourceItem = getResourceItem(item === null || item === void 0 || (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.resource, state);
|
|
680
674
|
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
681
675
|
}
|
|
682
|
-
|
|
683
|
-
// 普通商品没有
|
|
684
|
-
var generalParams = {};
|
|
685
|
-
if (isGeneral && !isNormalProductByDurationScheduleVal) {
|
|
686
|
-
generalParams = getGeneralParams(item, state, !!isParallelResource);
|
|
687
|
-
}
|
|
676
|
+
var generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
|
|
688
677
|
return _objectSpread(_objectSpread({
|
|
689
678
|
id: item === null || item === void 0 ? void 0 : item.id,
|
|
690
679
|
_id: item === null || item === void 0 ? void 0 : item._id,
|
|
@@ -723,31 +712,78 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
723
712
|
_origin: item
|
|
724
713
|
});
|
|
725
714
|
};
|
|
726
|
-
console.log(normalList, 'normalList');
|
|
727
715
|
if (isRenderGroup) {
|
|
728
|
-
//
|
|
729
|
-
|
|
716
|
+
// 记录每个商品在原始列表中的索引
|
|
717
|
+
var normalItemsWithIndex = [];
|
|
718
|
+
var groupItemsWithIndex = [];
|
|
719
|
+
// 记录每个组第一次出现的索引
|
|
720
|
+
var groupFirstIndexMap = {};
|
|
721
|
+
|
|
722
|
+
// 将商品分为组商品和非组商品,并记录索引
|
|
723
|
+
lists.forEach(function (item, index) {
|
|
730
724
|
var _item$_extend29;
|
|
731
725
|
if (!(item !== null && item !== void 0 && (_item$_extend29 = item._extend) !== null && _item$_extend29 !== void 0 && _item$_extend29.groupId)) {
|
|
732
|
-
|
|
726
|
+
normalItemsWithIndex.push({
|
|
727
|
+
item: item,
|
|
728
|
+
index: index
|
|
729
|
+
});
|
|
733
730
|
} else {
|
|
734
|
-
|
|
731
|
+
var _item$_extend30;
|
|
732
|
+
var groupId = item === null || item === void 0 || (_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.groupId;
|
|
733
|
+
groupItemsWithIndex.push({
|
|
734
|
+
item: item,
|
|
735
|
+
index: index
|
|
736
|
+
});
|
|
737
|
+
// 记录组第一次出现的索引
|
|
738
|
+
if (groupFirstIndexMap[groupId] === undefined) {
|
|
739
|
+
groupFirstIndexMap[groupId] = index;
|
|
740
|
+
}
|
|
735
741
|
}
|
|
736
742
|
});
|
|
737
743
|
|
|
738
744
|
// 根据item._extend.groupId 进行分组
|
|
739
|
-
var groups =
|
|
740
|
-
var _item$
|
|
741
|
-
var
|
|
745
|
+
var groups = groupItemsWithIndex.reduce(function (prev, _ref11) {
|
|
746
|
+
var _item$_extend31;
|
|
747
|
+
var item = _ref11.item;
|
|
748
|
+
var groupId = item === null || item === void 0 || (_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.groupId;
|
|
742
749
|
if (!prev[groupId]) {
|
|
743
750
|
prev[groupId] = [];
|
|
744
751
|
}
|
|
745
752
|
prev[groupId].push(item);
|
|
746
753
|
return prev;
|
|
747
754
|
}, {});
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
755
|
+
|
|
756
|
+
// 将分组商品转换为合并后的商品,并记录组第一次出现的索引
|
|
757
|
+
var mergedGroupItems = Object.entries(groups).map(function (_ref12) {
|
|
758
|
+
var _ref13 = _slicedToArray(_ref12, 2),
|
|
759
|
+
groupId = _ref13[0],
|
|
760
|
+
items = _ref13[1];
|
|
761
|
+
return {
|
|
762
|
+
item: formItem(concatBookings(items)),
|
|
763
|
+
index: groupFirstIndexMap[groupId]
|
|
764
|
+
};
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
// 将非组商品格式化
|
|
768
|
+
var formattedNormalItems = normalItemsWithIndex.map(function (_ref14) {
|
|
769
|
+
var item = _ref14.item,
|
|
770
|
+
index = _ref14.index;
|
|
771
|
+
return {
|
|
772
|
+
item: formItem(item),
|
|
773
|
+
index: index
|
|
774
|
+
};
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// 合并分组商品和非组商品,按照原始索引排序
|
|
778
|
+
var allItems = [].concat(_toConsumableArray(mergedGroupItems), _toConsumableArray(formattedNormalItems)).sort(function (a, b) {
|
|
779
|
+
return a.index - b.index;
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
// 返回格式化后的商品列表
|
|
783
|
+
return allItems.map(function (_ref15) {
|
|
784
|
+
var item = _ref15.item;
|
|
785
|
+
return item;
|
|
786
|
+
});
|
|
751
787
|
} else {
|
|
752
788
|
return lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
|
|
753
789
|
return formItem(item);
|
|
@@ -827,9 +863,9 @@ export var formatDayDate = function formatDayDate(_extend) {
|
|
|
827
863
|
* @Author: WangHan
|
|
828
864
|
* @Date: 2024-12-04 12:07
|
|
829
865
|
*/
|
|
830
|
-
export var formatDayTime = function formatDayTime(
|
|
831
|
-
var startDate =
|
|
832
|
-
endDate =
|
|
866
|
+
export var formatDayTime = function formatDayTime(_ref16) {
|
|
867
|
+
var startDate = _ref16.startDate,
|
|
868
|
+
endDate = _ref16.endDate;
|
|
833
869
|
// 营业日时间
|
|
834
870
|
var shopOpeningTime = localStorage.getItem('shopOpeningHours') || '00:00';
|
|
835
871
|
|
|
@@ -880,8 +916,8 @@ export var initDate = function initDate() {
|
|
|
880
916
|
* @Date: 2024-12-12 15:47
|
|
881
917
|
*/
|
|
882
918
|
export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(state) {
|
|
883
|
-
var _state$
|
|
884
|
-
var form_id = (state === null || state === void 0 || (_state$
|
|
919
|
+
var _state$bookingConfig6, _state$service3, _state$pet2;
|
|
920
|
+
var form_id = (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 || (_state$bookingConfig6 = _state$bookingConfig6.appointment_subject) === null || _state$bookingConfig6 === void 0 ? void 0 : _state$bookingConfig6.form_id) || 0;
|
|
885
921
|
var services = ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value) || [];
|
|
886
922
|
var pets = ((_state$pet2 = state.pet) === null || _state$pet2 === void 0 || (_state$pet2 = _state$pet2.value) === null || _state$pet2 === void 0 ? void 0 : _state$pet2[form_id]) || [];
|
|
887
923
|
|
|
@@ -906,8 +942,8 @@ export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(stat
|
|
|
906
942
|
// 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
|
|
907
943
|
// services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
|
|
908
944
|
services: services.filter(function (item) {
|
|
909
|
-
var _item$
|
|
910
|
-
return ((_item$
|
|
945
|
+
var _item$_extend32;
|
|
946
|
+
return ((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.holder_id) == d.form_record_id && checkType(item.extension_type);
|
|
911
947
|
})
|
|
912
948
|
});
|
|
913
949
|
});
|
|
@@ -952,8 +988,8 @@ export var getDayProducts = function getDayProducts(holderId, lists, isTerminal)
|
|
|
952
988
|
* @Date: 2024-12-30 22:19
|
|
953
989
|
*/
|
|
954
990
|
export var getPets = function getPets(state) {
|
|
955
|
-
var _state$
|
|
956
|
-
var form_id = (state === null || state === void 0 || (_state$
|
|
991
|
+
var _state$bookingConfig7, _state$pet3;
|
|
992
|
+
var form_id = (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 || (_state$bookingConfig7 = _state$bookingConfig7.appointment_subject) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.form_id) || 0;
|
|
957
993
|
var pets = (state === null || state === void 0 || (_state$pet3 = state.pet) === null || _state$pet3 === void 0 || (_state$pet3 = _state$pet3.value) === null || _state$pet3 === void 0 ? void 0 : _state$pet3[form_id]) || [];
|
|
958
994
|
return pets;
|
|
959
995
|
};
|
|
@@ -985,8 +1021,8 @@ export var getAppointmentService = function getAppointmentService(state) {
|
|
|
985
1021
|
* @Date: 2024-12-16 16:12
|
|
986
1022
|
*/
|
|
987
1023
|
export var isOpenDeletePet = function isOpenDeletePet(state, newVal) {
|
|
988
|
-
var _state$
|
|
989
|
-
var form_id = (state === null || state === void 0 || (_state$
|
|
1024
|
+
var _state$bookingConfig8, _state$pet4;
|
|
1025
|
+
var form_id = (state === null || state === void 0 || (_state$bookingConfig8 = state.bookingConfig) === null || _state$bookingConfig8 === void 0 || (_state$bookingConfig8 = _state$bookingConfig8.config) === null || _state$bookingConfig8 === void 0 || (_state$bookingConfig8 = _state$bookingConfig8.basic) === null || _state$bookingConfig8 === void 0 || (_state$bookingConfig8 = _state$bookingConfig8.appointment_subject) === null || _state$bookingConfig8 === void 0 ? void 0 : _state$bookingConfig8.form_id) || 0;
|
|
990
1026
|
var oldPets = (state === null || state === void 0 || (_state$pet4 = state.pet) === null || _state$pet4 === void 0 || (_state$pet4 = _state$pet4.value) === null || _state$pet4 === void 0 ? void 0 : _state$pet4[form_id]) || [];
|
|
991
1027
|
var newPets = (newVal === null || newVal === void 0 ? void 0 : newVal[form_id]) || [];
|
|
992
1028
|
|
|
@@ -1086,10 +1122,10 @@ function updateSinglePrice(currentValue, single) {
|
|
|
1086
1122
|
* @Author: WangHan
|
|
1087
1123
|
* @Date: 2024-12-31 15:17
|
|
1088
1124
|
*/
|
|
1089
|
-
function updateBundlePrice(currentValue,
|
|
1090
|
-
var
|
|
1091
|
-
bundle =
|
|
1092
|
-
single =
|
|
1125
|
+
function updateBundlePrice(currentValue, _ref17) {
|
|
1126
|
+
var _ref18 = _slicedToArray(_ref17, 2),
|
|
1127
|
+
bundle = _ref18[0],
|
|
1128
|
+
single = _ref18[1];
|
|
1093
1129
|
var _bundle = [];
|
|
1094
1130
|
var _loop2 = function _loop2() {
|
|
1095
1131
|
var item = currentValue[index];
|
|
@@ -1225,7 +1261,7 @@ export function updateNormalBundlePrice(currentValue, newBundleData) {
|
|
|
1225
1261
|
* @Date: 2024-12-31 15:15
|
|
1226
1262
|
*/
|
|
1227
1263
|
var normalServicePrice = /*#__PURE__*/function () {
|
|
1228
|
-
var
|
|
1264
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ids, state) {
|
|
1229
1265
|
var _state$service6, _state$client, _data$list;
|
|
1230
1266
|
var services, customerId, data, _lists;
|
|
1231
1267
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -1300,7 +1336,7 @@ var normalServicePrice = /*#__PURE__*/function () {
|
|
|
1300
1336
|
}, _callee);
|
|
1301
1337
|
}));
|
|
1302
1338
|
return function normalServicePrice(_x, _x2) {
|
|
1303
|
-
return
|
|
1339
|
+
return _ref19.apply(this, arguments);
|
|
1304
1340
|
};
|
|
1305
1341
|
}();
|
|
1306
1342
|
|
|
@@ -1314,13 +1350,13 @@ var normalServicePrice = /*#__PURE__*/function () {
|
|
|
1314
1350
|
* @Date: 2024-12-25 16:41
|
|
1315
1351
|
*/
|
|
1316
1352
|
export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
1317
|
-
var
|
|
1353
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(state, _ref20) {
|
|
1318
1354
|
var _state$service7;
|
|
1319
1355
|
var start_date, end_date, product_id, defaultReturn, _state$client2, _state$service$cacheI, _res$data, _res$data2, format, customer_id, _product_id, multi_day_price, startDate, endDate, params, res, _prices;
|
|
1320
1356
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1321
1357
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1322
1358
|
case 0:
|
|
1323
|
-
start_date =
|
|
1359
|
+
start_date = _ref20.start_date, end_date = _ref20.end_date, product_id = _ref20.product_id;
|
|
1324
1360
|
defaultReturn = {
|
|
1325
1361
|
multiDayPrices: [],
|
|
1326
1362
|
price: Number(state === null || state === void 0 || (_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 ? void 0 : _state$service7.price) || 0
|
|
@@ -1383,7 +1419,7 @@ export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
|
1383
1419
|
}, _callee2, null, [[2, 21]]);
|
|
1384
1420
|
}));
|
|
1385
1421
|
return function updateAppointmentServicePrice(_x3, _x4) {
|
|
1386
|
-
return
|
|
1422
|
+
return _ref21.apply(this, arguments);
|
|
1387
1423
|
};
|
|
1388
1424
|
}();
|
|
1389
1425
|
|
|
@@ -7,6 +7,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
8
|
import { getDays, getIsEdit, isSessionProduct } from "../utils";
|
|
9
9
|
import { isUsableProduct } from "../info2/service/addTimeModal/utils";
|
|
10
|
+
import { isMultiDayProduct } from "../info2/service/addService/utils";
|
|
10
11
|
// 商品是套餐或单规格多规格
|
|
11
12
|
export var getIsBundleOrCombination = function getIsBundleOrCombination(productDetail) {
|
|
12
13
|
var _productDetail$bundle;
|
|
@@ -161,6 +162,10 @@ export var isOpenAddTime = function isOpenAddTime(state) {
|
|
|
161
162
|
|
|
162
163
|
// 是否展示加时按钮
|
|
163
164
|
export var isShowAddTime = function isShowAddTime(state, currentService) {
|
|
165
|
+
// 跨日预约不显示加时按钮
|
|
166
|
+
if (isMultiDayProduct(currentService)) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
164
169
|
if (!isOpenAddTime(state)) {
|
|
165
170
|
return false;
|
|
166
171
|
}
|