@pisell/private-materials 3.2.38 → 3.3.0
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -114
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
- package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/es/components/appointmentBooking/components/Cart/index.js +2 -7
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +76 -9
- package/es/components/appointmentBooking/components/Content/index.less +21 -0
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Date/index.js +131 -38
- package/es/components/appointmentBooking/components/Date/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
- package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.js +8 -2
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/index.js +200 -0
- package/es/components/appointmentBooking/components/Form/index.less +3 -0
- package/es/components/appointmentBooking/components/Guest/index.js +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +53 -19
- package/es/components/appointmentBooking/components/Resource/index.js +67 -12
- package/es/components/appointmentBooking/components/Services/index.js +213 -75
- package/es/components/appointmentBooking/components/Services/index.less +0 -14
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
- package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/es/components/appointmentBooking/context.d.ts +4 -4
- package/es/components/appointmentBooking/context.js +42 -33
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +101 -0
- package/es/components/appointmentBooking/deposit/index.less +57 -0
- package/es/components/appointmentBooking/hooks.d.ts +29 -1
- package/es/components/appointmentBooking/hooks.js +382 -114
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +9 -4
- package/es/components/appointmentBooking/locales.d.ts +51 -3
- package/es/components/appointmentBooking/locales.js +58 -4
- package/es/components/appointmentBooking/utils.d.ts +66 -1
- package/es/components/appointmentBooking/utils.js +226 -33
- package/es/components/booking/addons/index.js +10 -6
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +90 -72
- package/es/components/booking/components/footer/utils.d.ts +11 -0
- package/es/components/booking/components/footer/utils.js +72 -44
- package/es/components/booking/components/voucher/index.js +22 -6
- package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/es/components/booking/info/hooks/useAddHolder.js +70 -0
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
- package/es/components/booking/info/index.js +9 -2
- package/es/components/booking/info/main.js +1 -1
- package/es/components/booking/info/pet/index.js +18 -17
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/Lists.js +119 -0
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.js +7 -5
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.js +7 -5
- package/es/components/booking/info/service/index.js +2 -2
- package/es/components/booking/info/service/serviceList/index.js +1 -0
- package/es/components/booking/info/service/serviceManager/index.js +12 -7
- package/es/components/booking/info/service2/Group/utils.js +2 -1
- package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
- package/es/components/booking/info/service2/utils.d.ts +5 -4
- package/es/components/booking/info/service2/utils.js +356 -88
- package/es/components/booking/info/utils.d.ts +2 -0
- package/es/components/booking/info/utils.js +45 -1
- package/es/components/booking/info2/index.js +9 -6
- package/es/components/booking/info2/serve.d.ts +2 -2
- package/es/components/booking/info2/serve.js +8 -15
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +13 -8
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +49 -14
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
- package/es/components/booking/info2/service/editService/index.js +4 -3
- package/es/components/booking/info2/service/index.js +18 -37
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/info2/utils.js +43 -0
- package/es/components/booking/info2/utilsByBooking.js +17 -4
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.js +2 -2
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/addNote/index.less +3 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +20 -8
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/components/TabProduct/index.js +176 -0
- package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/es/components/productSelect/components/gridLayout/index.js +28 -0
- package/es/components/productSelect/components/gridLayout/index.less +6 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/es/components/productSelect/components/productGroup/index.js +145 -0
- package/es/components/productSelect/components/productGroup/index.less +208 -0
- package/es/components/productSelect/hooks/useToken.d.ts +18 -0
- package/es/components/productSelect/hooks/useToken.js +35 -0
- package/es/components/productSelect/index.d.ts +23 -0
- package/es/components/productSelect/index.js +93 -0
- package/es/components/productSelect/index.less +69 -0
- package/es/components/productSelect/locales.d.ts +18 -0
- package/es/components/productSelect/locales.js +17 -0
- package/es/components/productSelect/mock.d.ts +134 -0
- package/es/components/productSelect/mock.js +202 -0
- package/es/components/productSelect/theme/token.d.ts +17 -0
- package/es/components/productSelect/theme/token.js +19 -0
- package/es/components/shoppingCart/Provider.d.ts +1 -1
- package/es/components/shoppingCart/Provider.js +3 -1
- package/es/components/shoppingCart/components/Cart/Product.js +15 -3
- package/es/components/shoppingCart/components/Cart/index.less +15 -15
- package/es/components/shoppingCart/components/Render/index.less +15 -0
- package/es/components/shoppingCart/hooks/useAddService.js +7 -1
- package/es/components/shoppingCart/index.d.ts +1 -2
- package/es/components/shoppingCart/index.js +3 -1
- package/es/components/shoppingCart/status.js +4 -1
- package/es/components/shoppingCart/type.d.ts +5 -0
- package/es/components/subTotal/index.d.ts +22 -0
- package/es/components/subTotal/index.js +234 -0
- package/es/components/subTotal/index.less +70 -0
- package/es/components/subTotal/locales.d.ts +42 -0
- package/es/components/subTotal/locales.js +41 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/es/components/ticketBooking/components/menuBar/index.js +54 -0
- package/es/components/ticketBooking/components/menuBar/index.less +84 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
- package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/es/components/ticketBooking/components/timeBar/index.js +113 -0
- package/es/components/ticketBooking/components/timeBar/index.less +22 -0
- package/es/components/ticketBooking/data.d.ts +58 -0
- package/es/components/ticketBooking/data.js +58 -58
- package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
- package/es/components/ticketBooking/index.d.ts +3 -3
- package/es/components/ticketBooking/index.js +139 -5
- package/es/components/ticketBooking/index.less +4 -0
- package/es/components/ticketBooking/locales.d.ts +144 -0
- package/es/components/ticketBooking/locales.js +143 -0
- package/es/components/ticketBooking/miniRedux.d.ts +22 -0
- package/es/components/ticketBooking/miniRedux.js +105 -0
- package/es/components/ticketBooking/serve.d.ts +282 -0
- package/es/components/ticketBooking/serve.js +957 -0
- package/es/components/ticketBooking/utils/index.d.ts +14 -0
- package/es/components/ticketBooking/utils/index.js +102 -0
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -73
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +59 -5
- package/lib/components/appointmentBooking/components/Content/index.less +21 -0
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Date/index.js +47 -19
- package/lib/components/appointmentBooking/components/Date/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
- package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/index.js +157 -0
- package/lib/components/appointmentBooking/components/Form/index.less +3 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +31 -13
- package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
- package/lib/components/appointmentBooking/components/Services/index.js +86 -63
- package/lib/components/appointmentBooking/components/Services/index.less +0 -14
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
- package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/lib/components/appointmentBooking/context.d.ts +4 -4
- package/lib/components/appointmentBooking/context.js +15 -10
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +109 -0
- package/lib/components/appointmentBooking/deposit/index.less +57 -0
- package/lib/components/appointmentBooking/hooks.d.ts +29 -1
- package/lib/components/appointmentBooking/hooks.js +148 -22
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +6 -4
- package/lib/components/appointmentBooking/locales.d.ts +51 -3
- package/lib/components/appointmentBooking/locales.js +52 -4
- package/lib/components/appointmentBooking/utils.d.ts +66 -1
- package/lib/components/appointmentBooking/utils.js +158 -33
- package/lib/components/booking/addons/index.js +9 -5
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +94 -32
- package/lib/components/booking/components/footer/utils.d.ts +11 -0
- package/lib/components/booking/components/footer/utils.js +38 -14
- package/lib/components/booking/components/voucher/index.js +18 -2
- package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
- package/lib/components/booking/info/index.js +5 -1
- package/lib/components/booking/info/main.js +1 -1
- package/lib/components/booking/info/pet/index.js +3 -2
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/Lists.js +106 -0
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.js +6 -4
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.js +5 -3
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/serviceList/index.js +1 -0
- package/lib/components/booking/info/service/serviceManager/index.js +6 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -1
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
- package/lib/components/booking/info/service2/utils.d.ts +5 -4
- package/lib/components/booking/info/service2/utils.js +304 -30
- package/lib/components/booking/info/utils.d.ts +2 -0
- package/lib/components/booking/info/utils.js +40 -1
- package/lib/components/booking/info2/index.js +6 -1
- package/lib/components/booking/info2/serve.d.ts +2 -2
- package/lib/components/booking/info2/serve.js +3 -10
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +11 -6
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +50 -17
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
- package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
- package/lib/components/booking/info2/service/editService/index.js +3 -1
- package/lib/components/booking/info2/service/index.js +18 -28
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/info2/utils.js +65 -0
- package/lib/components/booking/info2/utilsByBooking.js +12 -3
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.js +2 -2
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.js +1 -1
- package/lib/components/booking/notes/addNote/index.less +3 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +25 -10
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/components/TabProduct/index.js +172 -0
- package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/lib/components/productSelect/components/gridLayout/index.js +58 -0
- package/lib/components/productSelect/components/gridLayout/index.less +6 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/lib/components/productSelect/components/productGroup/index.js +122 -0
- package/lib/components/productSelect/components/productGroup/index.less +208 -0
- package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/components/productSelect/hooks/useToken.js +51 -0
- package/lib/components/productSelect/index.d.ts +23 -0
- package/lib/components/productSelect/index.js +119 -0
- package/lib/components/productSelect/index.less +69 -0
- package/lib/components/productSelect/locales.d.ts +18 -0
- package/lib/components/productSelect/locales.js +41 -0
- package/lib/components/productSelect/mock.d.ts +134 -0
- package/lib/components/productSelect/mock.js +276 -0
- package/lib/components/productSelect/theme/token.d.ts +17 -0
- package/lib/components/productSelect/theme/token.js +47 -0
- package/lib/components/shoppingCart/Provider.d.ts +1 -1
- package/lib/components/shoppingCart/Provider.js +3 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
- package/lib/components/shoppingCart/components/Cart/index.less +15 -15
- package/lib/components/shoppingCart/components/Render/index.less +15 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
- package/lib/components/shoppingCart/index.d.ts +1 -2
- package/lib/components/shoppingCart/index.js +2 -0
- package/lib/components/shoppingCart/status.js +4 -1
- package/lib/components/shoppingCart/type.d.ts +5 -0
- package/lib/components/subTotal/index.d.ts +22 -0
- package/lib/components/subTotal/index.js +175 -0
- package/lib/components/subTotal/index.less +70 -0
- package/lib/components/subTotal/locales.d.ts +42 -0
- package/lib/components/subTotal/locales.js +65 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
- package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
- package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
- package/lib/components/ticketBooking/data.d.ts +58 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
- package/lib/components/ticketBooking/index.d.ts +3 -3
- package/lib/components/ticketBooking/index.js +159 -3
- package/lib/components/ticketBooking/index.less +4 -0
- package/lib/components/ticketBooking/locales.d.ts +144 -0
- package/lib/components/ticketBooking/locales.js +167 -0
- package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
- package/lib/components/ticketBooking/miniRedux.js +96 -0
- package/lib/components/ticketBooking/serve.d.ts +282 -0
- package/lib/components/ticketBooking/serve.js +214 -0
- package/lib/components/ticketBooking/utils/index.d.ts +14 -0
- package/lib/components/ticketBooking/utils/index.js +131 -0
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lowcode/appointment-deposit/meta.ts +58 -0
- package/lowcode/product-select/meta.ts +217 -0
- package/lowcode/sub-total/meta.ts +134 -0
- package/lowcode/ticket-booking/meta.ts +29 -0
- package/package.json +2 -2
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
|
@@ -36,7 +36,7 @@ import TabProduct from "../components/TabProduct";
|
|
|
36
36
|
import EmptyBooking from "../components/emptyBooking";
|
|
37
37
|
import Footer from "../components/footer";
|
|
38
38
|
import { formatProductBundle } from "../components/footer/utils";
|
|
39
|
-
import { formatProductListByCategory, getProductTotalPrice, request } from "../utils";
|
|
39
|
+
import { formatProductListByCategory, getProductTotalPrice, isSessionProduct, request } from "../utils";
|
|
40
40
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
41
41
|
import "./index.less";
|
|
42
42
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
@@ -281,9 +281,10 @@ var Addons = Provider(function (props) {
|
|
|
281
281
|
*/
|
|
282
282
|
var handleAddProduct = function handleAddProduct(item, type) {
|
|
283
283
|
var _list = _toConsumableArray(state.addons.value);
|
|
284
|
+
var isSession = isSessionProduct(item);
|
|
284
285
|
|
|
285
286
|
// 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
|
|
286
|
-
var isEject = type === 'detail' || item.bundle_group_count > 0;
|
|
287
|
+
var isEject = type === 'detail' || item.bundle_group_count > 0 || isSession;
|
|
287
288
|
state.action({
|
|
288
289
|
type: 'pisell1.handleOpenProductModal',
|
|
289
290
|
data: {
|
|
@@ -291,11 +292,12 @@ var Addons = Provider(function (props) {
|
|
|
291
292
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
292
293
|
showConfig: {
|
|
293
294
|
option: false,
|
|
294
|
-
session:
|
|
295
|
+
session: isSession,
|
|
295
296
|
variant: false,
|
|
296
297
|
package: true
|
|
297
298
|
},
|
|
298
|
-
is_eject: isEject ? 1 : 0
|
|
299
|
+
is_eject: isEject ? 1 : 0,
|
|
300
|
+
isOS: isSession
|
|
299
301
|
},
|
|
300
302
|
callback: function callback(e, extension_type, detail) {
|
|
301
303
|
console.log('e', e);
|
|
@@ -488,6 +490,7 @@ var Addons = Provider(function (props) {
|
|
|
488
490
|
if (state.channelDisabledEdit) {
|
|
489
491
|
return;
|
|
490
492
|
}
|
|
493
|
+
var isSession = isSessionProduct(item);
|
|
491
494
|
state.action({
|
|
492
495
|
type: 'pisell1.handleOpenProductModal',
|
|
493
496
|
data: {
|
|
@@ -495,11 +498,12 @@ var Addons = Provider(function (props) {
|
|
|
495
498
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
496
499
|
showConfig: {
|
|
497
500
|
option: false,
|
|
498
|
-
session:
|
|
501
|
+
session: isSession,
|
|
499
502
|
variant: false,
|
|
500
503
|
package: true
|
|
501
504
|
},
|
|
502
|
-
value: item._extend.other
|
|
505
|
+
value: item._extend.other,
|
|
506
|
+
isOS: isSession
|
|
503
507
|
},
|
|
504
508
|
callback: function callback(e, extension_type, detail) {
|
|
505
509
|
var _product$_extend;
|
|
@@ -35,7 +35,7 @@ import "./index.less";
|
|
|
35
35
|
import { createEventBooking, editEventBooking } from "./serve";
|
|
36
36
|
import { formatValues } from "./utils";
|
|
37
37
|
import VoucherCard from "../voucher";
|
|
38
|
-
|
|
38
|
+
import { SubTotal } from "../../../../index";
|
|
39
39
|
/**
|
|
40
40
|
* @title: 底部
|
|
41
41
|
* @description:
|
|
@@ -45,7 +45,7 @@ import VoucherCard from "../voucher";
|
|
|
45
45
|
* @Date: 2024-01-30 16:51
|
|
46
46
|
*/
|
|
47
47
|
var Footer = function Footer(props) {
|
|
48
|
-
var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _state$addons4, _state$
|
|
48
|
+
var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _state$addons4, _state$bookingDetail12, _state$bookingDetail13;
|
|
49
49
|
var state = props.state,
|
|
50
50
|
buttons = props.buttons,
|
|
51
51
|
dispatch = props.dispatch,
|
|
@@ -1168,6 +1168,82 @@ var Footer = function Footer(props) {
|
|
|
1168
1168
|
break;
|
|
1169
1169
|
}
|
|
1170
1170
|
};
|
|
1171
|
+
var subTotalList = useMemo(function () {
|
|
1172
|
+
var _state$bookingDetail9, _state$bookingDetail10, _state$bookingDetail11;
|
|
1173
|
+
var surcharge = (((_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.surcharge) || []).map(function (d, index) {
|
|
1174
|
+
return {
|
|
1175
|
+
key: "custom_surcharge_".concat(index),
|
|
1176
|
+
label: d.name[state.locale],
|
|
1177
|
+
value: d.amount
|
|
1178
|
+
};
|
|
1179
|
+
});
|
|
1180
|
+
return [
|
|
1181
|
+
// 小计
|
|
1182
|
+
{
|
|
1183
|
+
key: 'sub_total',
|
|
1184
|
+
value: total.productAmount
|
|
1185
|
+
}].concat(_toConsumableArray(surcharge), [
|
|
1186
|
+
// 税费
|
|
1187
|
+
{
|
|
1188
|
+
hidden: !state.bookingId,
|
|
1189
|
+
key: 'tax',
|
|
1190
|
+
value: total.tax,
|
|
1191
|
+
tax: {
|
|
1192
|
+
rate: state === null || state === void 0 || (_state$bookingDetail10 = state.bookingDetail) === null || _state$bookingDetail10 === void 0 ? void 0 : _state$bookingDetail10.tax_rate,
|
|
1193
|
+
is_price_include_tax: is_price_include_tax(state),
|
|
1194
|
+
title: state === null || state === void 0 || (_state$bookingDetail11 = state.bookingDetail) === null || _state$bookingDetail11 === void 0 ? void 0 : _state$bookingDetail11.tax_title
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
// 订单折扣
|
|
1198
|
+
{
|
|
1199
|
+
hidden: !state.bookingId,
|
|
1200
|
+
key: 'discount',
|
|
1201
|
+
value: total.shopDiscount
|
|
1202
|
+
},
|
|
1203
|
+
// 总计
|
|
1204
|
+
{
|
|
1205
|
+
key: 'total',
|
|
1206
|
+
value: total.expectAmount
|
|
1207
|
+
},
|
|
1208
|
+
// 舍入金额
|
|
1209
|
+
{
|
|
1210
|
+
hidden: !total.roundingAmount,
|
|
1211
|
+
key: 'custom_roundingAmount',
|
|
1212
|
+
value: total.roundingAmount,
|
|
1213
|
+
label: locales.getText('pisell1.text.rounding')
|
|
1214
|
+
}]);
|
|
1215
|
+
}, [total, (_state$bookingDetail12 = state.bookingDetail) === null || _state$bookingDetail12 === void 0 ? void 0 : _state$bookingDetail12.surcharge, state, state.bookingId]);
|
|
1216
|
+
var orderTotalList = useMemo(function () {
|
|
1217
|
+
return [
|
|
1218
|
+
// 订单已付金额
|
|
1219
|
+
{
|
|
1220
|
+
hidden: !state.bookingId,
|
|
1221
|
+
key: 'custom_orderPaidAmount',
|
|
1222
|
+
value: total.orderPaidAmount,
|
|
1223
|
+
label: locales.getText('pisell2.text.amount-paid-on-order')
|
|
1224
|
+
},
|
|
1225
|
+
// 支付手续费
|
|
1226
|
+
{
|
|
1227
|
+
hidden: !state.bookingId,
|
|
1228
|
+
key: 'custom_paySurchargeFee',
|
|
1229
|
+
value: total.paySurchargeFee,
|
|
1230
|
+
label: locales.getText('pisell1.text.payment-fee')
|
|
1231
|
+
},
|
|
1232
|
+
// 客户实付金额
|
|
1233
|
+
{
|
|
1234
|
+
hidden: !state.bookingId,
|
|
1235
|
+
key: 'custom_actualPaidAmount',
|
|
1236
|
+
value: total.actualPaidAmount,
|
|
1237
|
+
label: locales.getText('pisell2.text.amount-actually-paid-by-the-customer')
|
|
1238
|
+
},
|
|
1239
|
+
// 退款金额
|
|
1240
|
+
{
|
|
1241
|
+
hidden: !state.bookingId || !total.totalRefundAmount,
|
|
1242
|
+
key: 'custom_totalRefundAmount',
|
|
1243
|
+
value: total.totalRefundAmount,
|
|
1244
|
+
label: locales.getText('pisell2.text.refunded-amount')
|
|
1245
|
+
}];
|
|
1246
|
+
}, [total, (_state$bookingDetail13 = state.bookingDetail) === null || _state$bookingDetail13 === void 0 ? void 0 : _state$bookingDetail13.surcharge, state, state.bookingId]);
|
|
1171
1247
|
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
1172
1248
|
title: false,
|
|
1173
1249
|
round: true,
|
|
@@ -1199,79 +1275,21 @@ var Footer = function Footer(props) {
|
|
|
1199
1275
|
})
|
|
1200
1276
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1201
1277
|
className: "order-total-item-border"
|
|
1202
|
-
}), /*#__PURE__*/React.createElement(
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
className: "order-total-item-label"
|
|
1206
|
-
}, locales.getText('pisell1.text.subtotal')), /*#__PURE__*/React.createElement("span", {
|
|
1207
|
-
className: "order-total-item-value"
|
|
1208
|
-
}, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), (((_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.surcharge) || []).map(function (d) {
|
|
1209
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1210
|
-
className: "order-total-item",
|
|
1211
|
-
key: d.id
|
|
1212
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1213
|
-
className: "order-total-item-label"
|
|
1214
|
-
}, d.name[state.locale]), /*#__PURE__*/React.createElement("span", {
|
|
1215
|
-
className: "order-total-item-value"
|
|
1216
|
-
}, formatAmount(d.amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$')));
|
|
1217
|
-
}), state.bookingId ? /*#__PURE__*/React.createElement("div", {
|
|
1218
|
-
className: "order-total-item"
|
|
1219
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1220
|
-
className: "order-total-item-label"
|
|
1221
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1222
|
-
className: ""
|
|
1223
|
-
}, locales.getText('pisell1.text.tax')), /*#__PURE__*/React.createElement("div", {
|
|
1224
|
-
className: "",
|
|
1278
|
+
}), /*#__PURE__*/React.createElement(SubTotal, {
|
|
1279
|
+
mode: "column1",
|
|
1280
|
+
list: subTotalList,
|
|
1225
1281
|
style: {
|
|
1226
|
-
|
|
1282
|
+
padding: "0"
|
|
1227
1283
|
}
|
|
1228
|
-
}, taxText)), /*#__PURE__*/React.createElement("span", {
|
|
1229
|
-
className: "order-total-item-value"
|
|
1230
|
-
}, formatAmount(total.tax, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null, state.bookingId ? /*#__PURE__*/React.createElement("div", {
|
|
1231
|
-
className: "order-total-item"
|
|
1232
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1233
|
-
className: "order-total-item-label"
|
|
1234
|
-
}, locales.getText('pisell2.text.order-discount')), /*#__PURE__*/React.createElement("span", {
|
|
1235
|
-
className: "order-total-item-value"
|
|
1236
|
-
}, formatAmount(total.shopDiscount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null, /*#__PURE__*/React.createElement("div", {
|
|
1237
|
-
className: "order-total-item"
|
|
1238
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1239
|
-
className: "order-total-item-label order-total-item-label-bold"
|
|
1240
|
-
}, locales.getText('pisell1.text.total')), /*#__PURE__*/React.createElement("span", {
|
|
1241
|
-
className: "order-total-item-value"
|
|
1242
|
-
}, formatAmount(total.expectAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), !!total.roundingAmount && /*#__PURE__*/React.createElement("div", {
|
|
1243
|
-
className: "order-total-item"
|
|
1244
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1245
|
-
className: "order-total-item-label"
|
|
1246
|
-
}, locales.getText('pisell1.text.rounding')), /*#__PURE__*/React.createElement("span", {
|
|
1247
|
-
className: "order-total-item-value"
|
|
1248
|
-
}, formatAmount(total.roundingAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), state.bookingId ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1249
|
-
className: "order-total-item-border"
|
|
1250
1284
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1251
|
-
className: "order-total-item"
|
|
1252
|
-
}, /*#__PURE__*/React.createElement(
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
}, /*#__PURE__*/React.createElement("
|
|
1259
|
-
className: "order-total-item-label"
|
|
1260
|
-
}, locales.getText('pisell1.text.payment-fee')), /*#__PURE__*/React.createElement("span", {
|
|
1261
|
-
className: "order-total-item-value"
|
|
1262
|
-
}, formatAmount(total.paySurchargeFee, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), /*#__PURE__*/React.createElement("div", {
|
|
1263
|
-
className: "order-total-item"
|
|
1264
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1265
|
-
className: "order-total-item-label order-total-item-label-bold"
|
|
1266
|
-
}, locales.getText('pisell2.text.amount-actually-paid-by-the-customer')), /*#__PURE__*/React.createElement("span", {
|
|
1267
|
-
className: "order-total-item-value"
|
|
1268
|
-
}, formatAmount(total.actualPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), total.totalRefundAmount > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
1269
|
-
className: "order-total-item"
|
|
1270
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1271
|
-
className: "order-total-item-label order-total-item-label-bold"
|
|
1272
|
-
}, locales.getText('pisell2.text.refunded-amount')), /*#__PURE__*/React.createElement("span", {
|
|
1273
|
-
className: "order-total-item-value"
|
|
1274
|
-
}, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null) : null), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
|
|
1285
|
+
className: state.bookingId ? "order-total-item-border" : ""
|
|
1286
|
+
}), !!state.bookingId && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubTotal, {
|
|
1287
|
+
mode: "column1",
|
|
1288
|
+
list: orderTotalList,
|
|
1289
|
+
style: {
|
|
1290
|
+
padding: " 0 0 16px"
|
|
1291
|
+
}
|
|
1292
|
+
}))), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
|
|
1275
1293
|
className: "pisell-lowcode__booking-footer-buttons"
|
|
1276
1294
|
}, /*#__PURE__*/React.createElement(FooterMenus, {
|
|
1277
1295
|
items: moreButton,
|
|
@@ -16,4 +16,15 @@ export declare const formatProductOption: (option: any) => any;
|
|
|
16
16
|
* @Date: 2024-02-19 09:26
|
|
17
17
|
*/
|
|
18
18
|
export declare const formatProductBundle: (bundle: any) => any;
|
|
19
|
+
export interface ResourceItem {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
|
|
24
|
+
* @description:
|
|
25
|
+
* @param {object} resource
|
|
26
|
+
* @return {*}
|
|
27
|
+
* @Author: jinglin.tan
|
|
28
|
+
*/
|
|
29
|
+
export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
|
|
19
30
|
export declare const formatValues: (state: any) => any;
|
|
@@ -131,24 +131,54 @@ var formatRelationDetails = function formatRelationDetails(list) {
|
|
|
131
131
|
};
|
|
132
132
|
});
|
|
133
133
|
};
|
|
134
|
+
/**
|
|
135
|
+
* @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
|
|
136
|
+
* @description:
|
|
137
|
+
* @param {object} resource
|
|
138
|
+
* @return {*}
|
|
139
|
+
* @Author: jinglin.tan
|
|
140
|
+
*/
|
|
141
|
+
export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resource) {
|
|
142
|
+
if (resource.children && resource.children.length) {
|
|
143
|
+
var countCapacity = resource.capacity;
|
|
144
|
+
resource.children.forEach(function (child) {
|
|
145
|
+
if (child.capacity <= countCapacity) {
|
|
146
|
+
countCapacity -= child.capacity;
|
|
147
|
+
} else {
|
|
148
|
+
child.capacity = countCapacity;
|
|
149
|
+
countCapacity = 0;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
var checkResourcesFormat = function checkResourcesFormat(resources, service, isChild) {
|
|
155
|
+
return resources.map(function (resource) {
|
|
156
|
+
var _resource$children;
|
|
157
|
+
if (!isChild) {
|
|
158
|
+
resource.capacity = getSumCapacity({
|
|
159
|
+
cacheItem: service
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
checkSubResourcesCapacity(resource);
|
|
163
|
+
return {
|
|
164
|
+
children: (_resource$children = resource.children) !== null && _resource$children !== void 0 && _resource$children.length ? checkResourcesFormat(resource.children, service, true) : undefined,
|
|
165
|
+
form_id: resource.form_id,
|
|
166
|
+
relation_type: resource.relation_type || 'form',
|
|
167
|
+
relation_id: resource.relation_id || resource.id || 0,
|
|
168
|
+
capacity: resource.capacity,
|
|
169
|
+
like_status: resource.like_status || 'common',
|
|
170
|
+
metadata: resource.metadata || {}
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
};
|
|
134
174
|
var formatResource = function formatResource(service) {
|
|
135
175
|
if (!service._extend.resource) {
|
|
136
176
|
return undefined;
|
|
137
177
|
}
|
|
138
178
|
try {
|
|
139
179
|
return Object.values(service._extend.resource).reduce(function (pre, cur) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
form_id: d.form_id,
|
|
143
|
-
relation_type: d.relation_type || 'form',
|
|
144
|
-
relation_id: d.relation_id || 0,
|
|
145
|
-
capacity: getSumCapacity({
|
|
146
|
-
cacheItem: service
|
|
147
|
-
}),
|
|
148
|
-
like_status: d.like_status,
|
|
149
|
-
metadata: d.metadata
|
|
150
|
-
};
|
|
151
|
-
}));
|
|
180
|
+
var newList = checkResourcesFormat(cur, service);
|
|
181
|
+
pre = pre.concat(newList);
|
|
152
182
|
return pre;
|
|
153
183
|
}, []);
|
|
154
184
|
} catch (err) {
|
|
@@ -167,12 +197,12 @@ var formatResource = function formatResource(service) {
|
|
|
167
197
|
* @Date: 2024-12-07 14:52
|
|
168
198
|
*/
|
|
169
199
|
var formatHolders = function formatHolders(state, item, values) {
|
|
170
|
-
var _state$bookingConfig, _item$_extend;
|
|
200
|
+
var _state$bookingConfig, _item$_extend, _item$_extend2;
|
|
171
201
|
var form_id = (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id) || 0;
|
|
172
202
|
var obj = {
|
|
173
203
|
customer_id: values.customer_id,
|
|
174
204
|
form_id: form_id,
|
|
175
|
-
form_record:
|
|
205
|
+
form_record: (_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.holder_id ? [(_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.holder_id] : []
|
|
176
206
|
};
|
|
177
207
|
|
|
178
208
|
// 连锁加盟子店铺 增加参数
|
|
@@ -191,9 +221,9 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
191
221
|
* @Date: 2024-12-23 12:05
|
|
192
222
|
*/
|
|
193
223
|
var formatProductPrice = function formatProductPrice(item) {
|
|
194
|
-
var _item$
|
|
195
|
-
var other = (_item$
|
|
196
|
-
var price = Number((_item$
|
|
224
|
+
var _item$_extend3, _item$_extend4;
|
|
225
|
+
var other = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.other;
|
|
226
|
+
var price = Number((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.price);
|
|
197
227
|
// 单规格, 单价 + 单规格价格
|
|
198
228
|
if (other !== null && other !== void 0 && other.option) {
|
|
199
229
|
var _other$option;
|
|
@@ -204,21 +234,21 @@ var formatProductPrice = function formatProductPrice(item) {
|
|
|
204
234
|
return price;
|
|
205
235
|
};
|
|
206
236
|
var formatMetaData = function formatMetaData(item) {
|
|
207
|
-
var _item$
|
|
237
|
+
var _item$_extend5, _item$_extend6, _item$_extend8;
|
|
208
238
|
var metadata = {};
|
|
209
|
-
if ((_item$
|
|
239
|
+
if ((_item$_extend5 = item._extend) !== null && _item$_extend5 !== void 0 && _item$_extend5.capacity) {
|
|
210
240
|
metadata.capacity = item._extend.capacity;
|
|
211
241
|
}
|
|
212
242
|
if (item._extend.groupId) {
|
|
213
243
|
metadata.groupId = item._extend.groupId;
|
|
214
244
|
}
|
|
215
|
-
if ((_item$
|
|
216
|
-
var _item$
|
|
217
|
-
metadata.holder_id = (_item$
|
|
245
|
+
if ((_item$_extend6 = item._extend) !== null && _item$_extend6 !== void 0 && _item$_extend6.holder_id) {
|
|
246
|
+
var _item$_extend7;
|
|
247
|
+
metadata.holder_id = (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.holder_id;
|
|
218
248
|
}
|
|
219
|
-
if ((_item$
|
|
220
|
-
var _item$
|
|
221
|
-
metadata.multiDayPrices = (_item$
|
|
249
|
+
if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.multiDayPrices) {
|
|
250
|
+
var _item$_extend9;
|
|
251
|
+
metadata.multiDayPrices = (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.multiDayPrices;
|
|
222
252
|
}
|
|
223
253
|
return metadata;
|
|
224
254
|
};
|
|
@@ -246,7 +276,7 @@ var formatMetaData = function formatMetaData(item) {
|
|
|
246
276
|
* @Date: 2024-12-07 14:21
|
|
247
277
|
*/
|
|
248
278
|
var formatProducts = function formatProducts(item) {
|
|
249
|
-
var _item$
|
|
279
|
+
var _item$_extend10, _item$_extend11, _item$_extend12;
|
|
250
280
|
var total = Number(item._extend.total);
|
|
251
281
|
var origin_total = Number(item._extend.origin_total);
|
|
252
282
|
var discount_amount = origin_total - total;
|
|
@@ -271,10 +301,10 @@ var formatProducts = function formatProducts(item) {
|
|
|
271
301
|
"discount_per": item._extend.discount_per,
|
|
272
302
|
"discount_type": item._extend.discount_type || discount_type,
|
|
273
303
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
274
|
-
"product_bundle": formatProductBundle((_item$
|
|
304
|
+
"product_bundle": formatProductBundle((_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 || (_item$_extend10 = _item$_extend10.other) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.bundle),
|
|
275
305
|
"bundle_edit": item._extend.bundle_edit,
|
|
276
|
-
"product_option_item": formatProductOption((_item$
|
|
277
|
-
"product_variant_id": ((_item$
|
|
306
|
+
"product_option_item": formatProductOption((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.option),
|
|
307
|
+
"product_variant_id": ((_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.product_variant_id) || 0,
|
|
278
308
|
"discount_list": notManualDiscount,
|
|
279
309
|
metadata: formatMetaData(item)
|
|
280
310
|
};
|
|
@@ -294,8 +324,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
294
324
|
|
|
295
325
|
// 过滤出卡片中的普通商品
|
|
296
326
|
var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
|
|
297
|
-
var _item$
|
|
298
|
-
var holderId = (_item$
|
|
327
|
+
var _item$_extend13;
|
|
328
|
+
var holderId = (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.holder_id;
|
|
299
329
|
var bookingHolderId = booking_item._extend.holder_id;
|
|
300
330
|
var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
|
|
301
331
|
return holderId && holderId === bookingHolderId && !isDayBookingProduct;
|
|
@@ -321,15 +351,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
|
|
|
321
351
|
|
|
322
352
|
// 找出预约商品
|
|
323
353
|
list = list.filter(function (item) {
|
|
324
|
-
var _item$
|
|
325
|
-
return ((_item$
|
|
354
|
+
var _item$_extend14;
|
|
355
|
+
return ((_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.holder_id) && appointmentTypes.includes(item.extension_type);
|
|
326
356
|
});
|
|
327
357
|
|
|
328
358
|
// 对预约商品列表根据holder_id进行分组
|
|
329
359
|
var groupMap = new Map();
|
|
330
360
|
list.forEach(function (item) {
|
|
331
|
-
var _item$
|
|
332
|
-
var key = (_item$
|
|
361
|
+
var _item$_extend15;
|
|
362
|
+
var key = (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.holder_id; // 分组键
|
|
333
363
|
if (!groupMap.has(key)) {
|
|
334
364
|
groupMap.set(key, []);
|
|
335
365
|
}
|
|
@@ -387,12 +417,13 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
387
417
|
if (isNowTime(item._extend.start_time)) {
|
|
388
418
|
start_time = getNowTime();
|
|
389
419
|
}
|
|
420
|
+
dayParams.holder = formatHolders(data, item, values);
|
|
390
421
|
|
|
391
422
|
// 跨日预约下的普通商品
|
|
392
423
|
if (isDay) {
|
|
393
|
-
var _item$
|
|
394
|
-
var startDate = ((_item$
|
|
395
|
-
var endDate = ((_item$
|
|
424
|
+
var _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19;
|
|
425
|
+
var startDate = ((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.startDate) || ((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.start_date);
|
|
426
|
+
var endDate = ((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.endDate) || ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.end_date);
|
|
396
427
|
var _formatDayTime = formatDayTime({
|
|
397
428
|
startDate: startDate,
|
|
398
429
|
endDate: endDate
|
|
@@ -414,9 +445,6 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
414
445
|
}
|
|
415
446
|
}, 'minutes');
|
|
416
447
|
}
|
|
417
|
-
if (isEvent) {
|
|
418
|
-
dayParams.holder = formatHolders(data, item, values);
|
|
419
|
-
}
|
|
420
448
|
return _objectSpread(_objectSpread({
|
|
421
449
|
"product": formatProducts(item),
|
|
422
450
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
@@ -457,8 +485,8 @@ var formatRelationProducts = function formatRelationProducts(data) {
|
|
|
457
485
|
var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
|
|
458
486
|
// open items 下的商品
|
|
459
487
|
list = list.filter(function (item) {
|
|
460
|
-
var _item$
|
|
461
|
-
return !((_item$
|
|
488
|
+
var _item$_extend20;
|
|
489
|
+
return !((_item$_extend20 = item._extend) !== null && _item$_extend20 !== void 0 && _item$_extend20.holder_id);
|
|
462
490
|
});
|
|
463
491
|
var relationProducts = [];
|
|
464
492
|
relationProducts = list.map(function (item) {
|
|
@@ -532,7 +560,7 @@ export var formatValues = function formatValues(state) {
|
|
|
532
560
|
// 客户
|
|
533
561
|
var customer = formatCustomer(state);
|
|
534
562
|
values = _objectSpread(_objectSpread({}, values), customer);
|
|
535
|
-
|
|
563
|
+
|
|
536
564
|
// 主体
|
|
537
565
|
values.holder = formatHolder(state, values);
|
|
538
566
|
if (isDay) {
|
|
@@ -36,12 +36,12 @@ var services = {};
|
|
|
36
36
|
var VoucherCard = function VoucherCard(props) {
|
|
37
37
|
var _context$appHelper, _state$client$value;
|
|
38
38
|
var context = useEngineContext();
|
|
39
|
-
var
|
|
39
|
+
var state = props.state,
|
|
40
|
+
dispatch = props.dispatch;
|
|
41
|
+
var _useState = useState(!state.bookingId),
|
|
40
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
41
43
|
showDetail = _useState2[0],
|
|
42
44
|
setShowDetail = _useState2[1];
|
|
43
|
-
var state = props.state,
|
|
44
|
-
dispatch = props.dispatch;
|
|
45
45
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
46
46
|
pisellos = _context$appHelper$ut.pisellos;
|
|
47
47
|
var _useState3 = useState(''),
|
|
@@ -81,6 +81,22 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
81
81
|
shopDiscount.setProductList(state.service.value);
|
|
82
82
|
}
|
|
83
83
|
}, [state.service.value, isBooking4Shop]);
|
|
84
|
+
var serviceMemo = useMemo(function () {
|
|
85
|
+
var _ref;
|
|
86
|
+
var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
|
|
87
|
+
var _value$_extend, _value$_extend2;
|
|
88
|
+
return {
|
|
89
|
+
booking_id: value.booking_id,
|
|
90
|
+
id: value.id,
|
|
91
|
+
_id: value._id,
|
|
92
|
+
price: value.price,
|
|
93
|
+
total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
|
|
94
|
+
discount_list: value.discount_list,
|
|
95
|
+
origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
return val;
|
|
99
|
+
}, [state.service.value]);
|
|
84
100
|
|
|
85
101
|
// 更新productList
|
|
86
102
|
useEffect(function () {
|
|
@@ -99,7 +115,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
99
115
|
})
|
|
100
116
|
});
|
|
101
117
|
}
|
|
102
|
-
}, [
|
|
118
|
+
}, [JSON.stringify(serviceMemo), isBooking4Shop]);
|
|
103
119
|
var fn = useMemoizedFn(function (result) {
|
|
104
120
|
if (result.productList.some(function (item) {
|
|
105
121
|
return !item;
|
|
@@ -140,7 +156,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
140
156
|
|
|
141
157
|
// apply code
|
|
142
158
|
var onScanCode = /*#__PURE__*/function () {
|
|
143
|
-
var
|
|
159
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
144
160
|
var val;
|
|
145
161
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
146
162
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -170,7 +186,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
170
186
|
}, _callee);
|
|
171
187
|
}));
|
|
172
188
|
return function onScanCode() {
|
|
173
|
-
return
|
|
189
|
+
return _ref2.apply(this, arguments);
|
|
174
190
|
};
|
|
175
191
|
}();
|
|
176
192
|
if (!isBooking4Shop) return null;
|
|
@@ -2,6 +2,9 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { locales } from '@pisell/utils';
|
|
3
3
|
var useCreateBookingPageHeader = function useCreateBookingPageHeader(state) {
|
|
4
4
|
var createHeader = useMemo(function () {
|
|
5
|
+
if (state.hideCreateText) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
5
8
|
return state.isBookingCreatePage && !state.bookingId && /*#__PURE__*/React.createElement("div", {
|
|
6
9
|
className: "booking-info-create-new"
|
|
7
10
|
}, locales.getText('pisell2.booking.info.text.create-new'));
|
|
@@ -0,0 +1,70 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
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."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
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); }
|
|
14
|
+
import { isWalkIn } from "../../utils";
|
|
15
|
+
import { useMemo } from 'react';
|
|
16
|
+
var useAddHolder = function useAddHolder(state, dispatch) {
|
|
17
|
+
var _state$bookingConfig2;
|
|
18
|
+
var formDataConfig = useMemo(function () {
|
|
19
|
+
var _state$bookingConfig, _holder$form, _holder$form2;
|
|
20
|
+
var _holder = (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.holder;
|
|
21
|
+
if (!_holder) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return _objectSpread(_objectSpread(_objectSpread({}, _holder), _holder === null || _holder === void 0 ? void 0 : _holder.form), {}, {
|
|
25
|
+
options: [],
|
|
26
|
+
form_id: _holder === null || _holder === void 0 || (_holder$form = _holder.form) === null || _holder$form === void 0 ? void 0 : _holder$form.id,
|
|
27
|
+
field: _holder === null || _holder === void 0 || (_holder$form2 = _holder.form) === null || _holder$form2 === void 0 ? void 0 : _holder$form2.form_field,
|
|
28
|
+
relation_type: 'appointment_booking',
|
|
29
|
+
form_record: []
|
|
30
|
+
});
|
|
31
|
+
}, [(_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.holder]);
|
|
32
|
+
var handleAddHolder = function handleAddHolder() {
|
|
33
|
+
var _state$client;
|
|
34
|
+
var _data = {
|
|
35
|
+
formDataConfig: _objectSpread({}, formDataConfig)
|
|
36
|
+
};
|
|
37
|
+
var isWalkInBol = isWalkIn((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id);
|
|
38
|
+
if (formDataConfig.data_range === 'customer' && !isWalkInBol) {
|
|
39
|
+
var _state$client2;
|
|
40
|
+
_data.customerId = (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : _state$client2.value.id;
|
|
41
|
+
}
|
|
42
|
+
state.action({
|
|
43
|
+
type: 'pisell1.goCustomFormAddData',
|
|
44
|
+
data: _data,
|
|
45
|
+
callback: function callback(res) {
|
|
46
|
+
var obj = {};
|
|
47
|
+
var _iterator = _createForOfIteratorHelper(res),
|
|
48
|
+
_step;
|
|
49
|
+
try {
|
|
50
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
51
|
+
var item = _step.value;
|
|
52
|
+
obj[item.key] = item.value;
|
|
53
|
+
}
|
|
54
|
+
} catch (err) {
|
|
55
|
+
_iterator.e(err);
|
|
56
|
+
} finally {
|
|
57
|
+
_iterator.f();
|
|
58
|
+
}
|
|
59
|
+
dispatch({
|
|
60
|
+
type: 'setPet',
|
|
61
|
+
payload: {
|
|
62
|
+
holders: !isWalkInBol ? [obj].concat(_toConsumableArray(state.pet.holders)) : state.pet.holders
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
return handleAddHolder;
|
|
69
|
+
};
|
|
70
|
+
export default useAddHolder;
|