@pisell/private-materials 3.0.214 → 3.1.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 +1 -1
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +27 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +33 -18
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -46
- package/es/components/booking/components/footer/index.js +79 -116
- package/es/components/booking/components/footer/serve.d.ts +0 -2
- package/es/components/booking/components/footer/serve.js +0 -44
- package/es/components/booking/components/footer/utils.js +68 -282
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +15 -131
- package/es/components/booking/info/main.js +28 -44
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.d.ts +1 -1
- package/es/components/booking/info/pet/index.js +35 -94
- package/es/components/booking/info/service/addService/index.js +104 -195
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -12
- package/es/components/booking/info/service/addService/utils.js +26 -103
- package/es/components/booking/info/service/editService/index.js +142 -450
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/service/serve.d.ts +0 -10
- package/es/components/booking/info/service/serve.js +0 -28
- package/es/components/booking/info/utils.d.ts +0 -20
- package/es/components/booking/info/utils.js +1 -38
- package/es/components/booking/info2/utilsByBooking.js +1 -0
- package/es/components/booking/locales.d.ts +0 -66
- package/es/components/booking/locales.js +3 -81
- package/es/components/booking/model.d.ts +1 -5
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +26 -143
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/eftposPay/windcave/windcave.js +60 -27
- package/es/components/tabProduct/tabs/index.less +3 -13
- package/es/index.d.ts +0 -13
- package/es/index.js +1 -14
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -27
- package/lib/components/booking/components/footer/index.js +55 -50
- package/lib/components/booking/components/footer/serve.d.ts +0 -2
- package/lib/components/booking/components/footer/serve.js +0 -12
- package/lib/components/booking/components/footer/utils.js +53 -167
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +20 -97
- package/lib/components/booking/info/main.js +21 -32
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.d.ts +1 -1
- package/lib/components/booking/info/pet/index.js +44 -91
- package/lib/components/booking/info/service/addService/index.js +101 -132
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -12
- package/lib/components/booking/info/service/addService/utils.js +10 -58
- package/lib/components/booking/info/service/editService/index.js +197 -447
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/service/serve.d.ts +0 -10
- package/lib/components/booking/info/service/serve.js +2 -7
- package/lib/components/booking/info/utils.d.ts +0 -20
- package/lib/components/booking/info/utils.js +1 -42
- package/lib/components/booking/locales.d.ts +0 -66
- package/lib/components/booking/locales.js +3 -69
- package/lib/components/booking/model.d.ts +1 -5
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +18 -89
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/eftposPay/windcave/windcave.js +28 -11
- package/lib/components/tabProduct/tabs/index.less +3 -13
- package/lib/index.d.ts +0 -13
- package/lib/index.js +0 -39
- package/package.json +4 -4
- package/es/businessModel/SalesModel/Sales/index.d.ts +0 -24
- package/es/businessModel/SalesModel/Sales/index.js +0 -69
- package/es/businessModel/SalesModel/hooks/index.d.ts +0 -1
- package/es/businessModel/SalesModel/hooks/index.js +0 -7
- package/es/businessModel/SalesModel/index.d.ts +0 -4
- package/es/businessModel/SalesModel/index.js +0 -18
- package/es/businessModel/index.d.ts +0 -0
- package/es/businessModel/index.js +0 -0
- package/es/components/Sales/Cart/index.d.ts +0 -53
- package/es/components/Sales/Cart/index.js +0 -591
- package/es/components/Sales/Cart/serve.d.ts +0 -2
- package/es/components/Sales/Cart/serve.js +0 -11
- package/es/components/Sales/Cart/types.d.ts +0 -19
- package/es/components/Sales/Cart/types.js +0 -1
- package/es/components/Sales/Checkout/index.d.ts +0 -33
- package/es/components/Sales/Checkout/index.js +0 -149
- package/es/components/Sales/Checkout/serve.d.ts +0 -2
- package/es/components/Sales/Checkout/serve.js +0 -11
- package/es/components/Sales/Checkout/utils.d.ts +0 -27
- package/es/components/Sales/Checkout/utils.js +0 -104
- package/es/components/Sales/Customer/index.d.ts +0 -24
- package/es/components/Sales/Customer/index.js +0 -56
- package/es/components/Sales/Event/Detail.d.ts +0 -27
- package/es/components/Sales/Event/Detail.js +0 -244
- package/es/components/Sales/Event/index.d.ts +0 -30
- package/es/components/Sales/Event/index.js +0 -121
- package/es/components/Sales/Event/serve.d.ts +0 -26
- package/es/components/Sales/Event/serve.js +0 -33
- package/es/components/Sales/Holder/index.d.ts +0 -33
- package/es/components/Sales/Holder/index.js +0 -226
- package/es/components/Sales/Holder/serve.d.ts +0 -8
- package/es/components/Sales/Holder/serve.js +0 -20
- package/es/components/Sales/Init/index.d.ts +0 -24
- package/es/components/Sales/Init/index.js +0 -114
- package/es/components/Sales/Init/serve.d.ts +0 -3
- package/es/components/Sales/Init/serve.js +0 -11
- package/es/components/Sales/Resource/index.d.ts +0 -26
- package/es/components/Sales/Resource/index.js +0 -126
- package/es/components/Sales/Resource/serve.d.ts +0 -5
- package/es/components/Sales/Resource/serve.js +0 -8
- package/es/components/Sales/Step/index.d.ts +0 -37
- package/es/components/Sales/Step/index.js +0 -189
- package/es/components/Sales/Summary/index.d.ts +0 -25
- package/es/components/Sales/Summary/index.js +0 -47
- package/es/components/Sales/Summary/serve.d.ts +0 -0
- package/es/components/Sales/Summary/serve.js +0 -0
- package/es/components/Sales/Summary/utils.d.ts +0 -36
- package/es/components/Sales/Summary/utils.js +0 -63
- package/es/components/Sales/hooks/index.d.ts +0 -1
- package/es/components/Sales/hooks/index.js +0 -3
- package/es/components/Sales/index.d.ts +0 -20
- package/es/components/Sales/index.js +0 -26
- package/es/components/Sales/utils/index.d.ts +0 -1
- package/es/components/Sales/utils/index.js +0 -18
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +0 -54
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -134
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/es/components/booking/info/service/editService/BookingList/index.js +0 -39
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/es/components/booking/info/service/editService/EditTabs/index.js +0 -35
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +0 -55
- package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceManager/index.js +0 -281
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/es/components/booking/info/service2/Group/utils.js +0 -146
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -153
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -6
- package/es/components/booking/info/service2/index.js +0 -57
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -240
- package/es/components/booking/info/service2/utils.js +0 -1077
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/eventBooking/assets/alert-circle.png +0 -0
- package/es/components/eventBooking/assets/calendar-heart.svg +0 -5
- package/es/components/eventBooking/assets/compass.svg +0 -13
- package/es/components/eventBooking/assets/image.svg +0 -5
- package/es/components/eventBooking/assets/phone.svg +0 -5
- package/es/components/eventBooking/assets/shopping-cart.svg +0 -10
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -4
- package/es/components/eventBooking/components/ErrorTip/index.js +0 -14
- package/es/components/eventBooking/components/ErrorTip/index.less +0 -51
- package/es/components/eventBooking/components/OpenCard/index.d.ts +0 -4
- package/es/components/eventBooking/components/OpenCard/index.js +0 -65
- package/es/components/eventBooking/components/OpenCard/index.less +0 -52
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +0 -274
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +0 -46
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +0 -63
- package/es/components/eventBooking/components/Provider/Cart/Item/index.less +0 -87
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Cart/index.js +0 -30
- package/es/components/eventBooking/components/Provider/Cart/index.less +0 -2
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Content/index.js +0 -65
- package/es/components/eventBooking/components/Provider/Content/index.less +0 -31
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.js +0 -34
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Event/index.js +0 -93
- package/es/components/eventBooking/components/Provider/Event/index.less +0 -20
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Footer/index.js +0 -76
- package/es/components/eventBooking/components/Provider/Footer/index.less +0 -64
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Header/index.js +0 -75
- package/es/components/eventBooking/components/Provider/Header/index.less +0 -2
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Information/index.js +0 -178
- package/es/components/eventBooking/components/Provider/Information/index.less +0 -92
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.js +0 -34
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.js +0 -27
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +0 -31
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/Resource/index.js +0 -79
- package/es/components/eventBooking/components/Provider/Resource/index.less +0 -46
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/SelectHolderModal.js +0 -90
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +0 -26
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +0 -25
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -11
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +0 -65
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +0 -32
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +0 -69
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +0 -12
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -13
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +0 -152
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +0 -35
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +0 -20
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +0 -28
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -5
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +0 -38
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +0 -87
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +0 -28
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +0 -25
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +0 -269
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +0 -119
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +0 -63
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +0 -257
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +0 -174
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +0 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +0 -14
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.js +0 -36
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/index.less +0 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +0 -34
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +0 -70
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -3
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +0 -38
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -3
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.js +0 -33
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -3
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +0 -30
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
- package/es/components/eventBooking/components/bookingDetailModal/index.js +0 -355
- package/es/components/eventBooking/components/bookingDetailModal/index.less +0 -83
- package/es/components/eventBooking/components/bookingServiceList/index.d.ts +0 -17
- package/es/components/eventBooking/components/bookingServiceList/index.js +0 -52
- package/es/components/eventBooking/components/bookingServiceList/index.less +0 -6
- package/es/components/eventBooking/components/eventCard/index.d.ts +0 -14
- package/es/components/eventBooking/components/eventCard/index.js +0 -116
- package/es/components/eventBooking/components/eventCard/index.less +0 -81
- package/es/components/eventBooking/components/productCard/index.d.ts +0 -16
- package/es/components/eventBooking/components/productCard/index.js +0 -79
- package/es/components/eventBooking/components/productCard/index.less +0 -60
- package/es/components/eventBooking/components/progressBar/index.d.ts +0 -16
- package/es/components/eventBooking/components/progressBar/index.js +0 -93
- package/es/components/eventBooking/components/progressBar/index.less +0 -15
- package/es/components/eventBooking/components/resourceDisplay/index.d.ts +0 -23
- package/es/components/eventBooking/components/resourceDisplay/index.js +0 -148
- package/es/components/eventBooking/components/resourceDisplay/index.less +0 -95
- package/es/components/eventBooking/components/resourceUsability/index.d.ts +0 -12
- package/es/components/eventBooking/components/resourceUsability/index.js +0 -44
- package/es/components/eventBooking/components/resourceUsability/index.less +0 -40
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -10
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +0 -37
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +0 -58
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -12
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +0 -127
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +0 -13
- package/es/components/eventBooking/components/scheduleCalendar/index.js +0 -142
- package/es/components/eventBooking/components/scheduleCalendar/index.less +0 -222
- package/es/components/eventBooking/components/selectHolder/index.d.ts +0 -22
- package/es/components/eventBooking/components/selectHolder/index.js +0 -118
- package/es/components/eventBooking/components/selectHolder/index.less +0 -70
- package/es/components/eventBooking/components/timeResourceSelector/index.d.ts +0 -20
- package/es/components/eventBooking/components/timeResourceSelector/index.js +0 -168
- package/es/components/eventBooking/components/timeResourceSelector/index.less +0 -74
- package/es/components/eventBooking/index.d.ts +0 -4
- package/es/components/eventBooking/index.js +0 -58
- package/es/components/eventBooking/index.less +0 -22
- package/es/components/eventBooking/locales.d.ts +0 -216
- package/es/components/eventBooking/locales.js +0 -251
- package/es/components/eventBooking/mock.d.ts +0 -627
- package/es/components/eventBooking/mock.js +0 -1172
- package/es/components/eventBooking/status.d.ts +0 -21
- package/es/components/eventBooking/status.js +0 -51
- package/es/components/eventBooking/type.d.ts +0 -17
- package/es/components/eventBooking/type.js +0 -1
- package/es/components/eventBooking/utils.d.ts +0 -45
- package/es/components/eventBooking/utils.js +0 -99
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -71
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -73
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -15
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -70
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -132
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -60
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -40
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -116
- package/lib/businessModel/SalesModel/Sales/index.d.ts +0 -24
- package/lib/businessModel/SalesModel/Sales/index.js +0 -104
- package/lib/businessModel/SalesModel/hooks/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/hooks/index.js +0 -34
- package/lib/businessModel/SalesModel/index.d.ts +0 -4
- package/lib/businessModel/SalesModel/index.js +0 -51
- package/lib/businessModel/index.d.ts +0 -0
- package/lib/businessModel/index.js +0 -0
- package/lib/components/Sales/Cart/index.d.ts +0 -53
- package/lib/components/Sales/Cart/index.js +0 -500
- package/lib/components/Sales/Cart/serve.d.ts +0 -2
- package/lib/components/Sales/Cart/serve.js +0 -37
- package/lib/components/Sales/Cart/types.d.ts +0 -19
- package/lib/components/Sales/Cart/types.js +0 -17
- package/lib/components/Sales/Checkout/index.d.ts +0 -33
- package/lib/components/Sales/Checkout/index.js +0 -130
- package/lib/components/Sales/Checkout/serve.d.ts +0 -2
- package/lib/components/Sales/Checkout/serve.js +0 -37
- package/lib/components/Sales/Checkout/utils.d.ts +0 -27
- package/lib/components/Sales/Checkout/utils.js +0 -88
- package/lib/components/Sales/Customer/index.d.ts +0 -24
- package/lib/components/Sales/Customer/index.js +0 -90
- package/lib/components/Sales/Event/Detail.d.ts +0 -27
- package/lib/components/Sales/Event/Detail.js +0 -224
- package/lib/components/Sales/Event/index.d.ts +0 -30
- package/lib/components/Sales/Event/index.js +0 -136
- package/lib/components/Sales/Event/serve.d.ts +0 -26
- package/lib/components/Sales/Event/serve.js +0 -54
- package/lib/components/Sales/Holder/index.d.ts +0 -33
- package/lib/components/Sales/Holder/index.js +0 -210
- package/lib/components/Sales/Holder/serve.d.ts +0 -8
- package/lib/components/Sales/Holder/serve.js +0 -37
- package/lib/components/Sales/Init/index.d.ts +0 -24
- package/lib/components/Sales/Init/index.js +0 -128
- package/lib/components/Sales/Init/serve.d.ts +0 -3
- package/lib/components/Sales/Init/serve.js +0 -34
- package/lib/components/Sales/Resource/index.d.ts +0 -26
- package/lib/components/Sales/Resource/index.js +0 -133
- package/lib/components/Sales/Resource/serve.d.ts +0 -5
- package/lib/components/Sales/Resource/serve.js +0 -32
- package/lib/components/Sales/Step/index.d.ts +0 -37
- package/lib/components/Sales/Step/index.js +0 -170
- package/lib/components/Sales/Summary/index.d.ts +0 -25
- package/lib/components/Sales/Summary/index.js +0 -83
- package/lib/components/Sales/Summary/serve.d.ts +0 -0
- package/lib/components/Sales/Summary/serve.js +0 -0
- package/lib/components/Sales/Summary/utils.d.ts +0 -36
- package/lib/components/Sales/Summary/utils.js +0 -80
- package/lib/components/Sales/hooks/index.d.ts +0 -1
- package/lib/components/Sales/hooks/index.js +0 -31
- package/lib/components/Sales/index.d.ts +0 -20
- package/lib/components/Sales/index.js +0 -79
- package/lib/components/Sales/utils/index.d.ts +0 -1
- package/lib/components/Sales/utils/index.js +0 -43
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -121
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/lib/components/booking/info/service/editService/BookingList/index.js +0 -55
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/lib/components/booking/info/service/editService/EditTabs/index.js +0 -75
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +0 -70
- package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceManager/index.js +0 -211
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/lib/components/booking/info/service2/Group/utils.js +0 -142
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -116
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -6
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -240
- package/lib/components/booking/info/service2/utils.js +0 -695
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/eventBooking/assets/alert-circle.png +0 -0
- package/lib/components/eventBooking/assets/calendar-heart.svg +0 -5
- package/lib/components/eventBooking/assets/compass.svg +0 -13
- package/lib/components/eventBooking/assets/image.svg +0 -5
- package/lib/components/eventBooking/assets/phone.svg +0 -5
- package/lib/components/eventBooking/assets/shopping-cart.svg +0 -10
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -4
- package/lib/components/eventBooking/components/ErrorTip/index.js +0 -30
- package/lib/components/eventBooking/components/ErrorTip/index.less +0 -51
- package/lib/components/eventBooking/components/OpenCard/index.d.ts +0 -4
- package/lib/components/eventBooking/components/OpenCard/index.js +0 -90
- package/lib/components/eventBooking/components/OpenCard/index.less +0 -52
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +0 -159
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +0 -82
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +0 -92
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +0 -87
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Cart/index.js +0 -59
- package/lib/components/eventBooking/components/Provider/Cart/index.less +0 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Content/index.js +0 -91
- package/lib/components/eventBooking/components/Provider/Content/index.less +0 -31
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.js +0 -60
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +0 -101
- package/lib/components/eventBooking/components/Provider/Event/index.less +0 -20
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Footer/index.js +0 -87
- package/lib/components/eventBooking/components/Provider/Footer/index.less +0 -64
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Header/index.js +0 -80
- package/lib/components/eventBooking/components/Provider/Header/index.less +0 -2
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Information/index.js +0 -151
- package/lib/components/eventBooking/components/Provider/Information/index.less +0 -92
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.js +0 -67
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.js +0 -57
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.js +0 -62
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/Resource/index.js +0 -90
- package/lib/components/eventBooking/components/Provider/Resource/index.less +0 -46
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.js +0 -97
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +0 -55
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +0 -25
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -11
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +0 -78
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +0 -32
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +0 -86
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +0 -12
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -13
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +0 -121
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +0 -35
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +0 -37
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +0 -28
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -5
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +0 -58
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +0 -87
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +0 -55
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +0 -25
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +0 -198
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +0 -119
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +0 -63
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +0 -198
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +0 -122
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +0 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.d.ts +0 -14
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.js +0 -70
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/index.less +0 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.d.ts +0 -34
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/utils.js +0 -71
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +0 -75
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.js +0 -66
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -3
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +0 -70
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +0 -272
- package/lib/components/eventBooking/components/bookingDetailModal/index.less +0 -83
- package/lib/components/eventBooking/components/bookingServiceList/index.d.ts +0 -17
- package/lib/components/eventBooking/components/bookingServiceList/index.js +0 -79
- package/lib/components/eventBooking/components/bookingServiceList/index.less +0 -6
- package/lib/components/eventBooking/components/eventCard/index.d.ts +0 -14
- package/lib/components/eventBooking/components/eventCard/index.js +0 -124
- package/lib/components/eventBooking/components/eventCard/index.less +0 -81
- package/lib/components/eventBooking/components/productCard/index.d.ts +0 -16
- package/lib/components/eventBooking/components/productCard/index.js +0 -78
- package/lib/components/eventBooking/components/productCard/index.less +0 -60
- package/lib/components/eventBooking/components/progressBar/index.d.ts +0 -16
- package/lib/components/eventBooking/components/progressBar/index.js +0 -100
- package/lib/components/eventBooking/components/progressBar/index.less +0 -15
- package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +0 -23
- package/lib/components/eventBooking/components/resourceDisplay/index.js +0 -117
- package/lib/components/eventBooking/components/resourceDisplay/index.less +0 -95
- package/lib/components/eventBooking/components/resourceUsability/index.d.ts +0 -12
- package/lib/components/eventBooking/components/resourceUsability/index.js +0 -76
- package/lib/components/eventBooking/components/resourceUsability/index.less +0 -40
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -10
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.js +0 -73
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.less +0 -58
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -12
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +0 -135
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +0 -13
- package/lib/components/eventBooking/components/scheduleCalendar/index.js +0 -125
- package/lib/components/eventBooking/components/scheduleCalendar/index.less +0 -222
- package/lib/components/eventBooking/components/selectHolder/index.d.ts +0 -22
- package/lib/components/eventBooking/components/selectHolder/index.js +0 -106
- package/lib/components/eventBooking/components/selectHolder/index.less +0 -70
- package/lib/components/eventBooking/components/timeResourceSelector/index.d.ts +0 -20
- package/lib/components/eventBooking/components/timeResourceSelector/index.js +0 -146
- package/lib/components/eventBooking/components/timeResourceSelector/index.less +0 -74
- package/lib/components/eventBooking/index.d.ts +0 -4
- package/lib/components/eventBooking/index.js +0 -79
- package/lib/components/eventBooking/index.less +0 -22
- package/lib/components/eventBooking/locales.d.ts +0 -216
- package/lib/components/eventBooking/locales.js +0 -239
- package/lib/components/eventBooking/mock.d.ts +0 -627
- package/lib/components/eventBooking/mock.js +0 -1352
- package/lib/components/eventBooking/status.d.ts +0 -21
- package/lib/components/eventBooking/status.js +0 -70
- package/lib/components/eventBooking/type.d.ts +0 -17
- package/lib/components/eventBooking/type.js +0 -17
- package/lib/components/eventBooking/utils.d.ts +0 -45
- package/lib/components/eventBooking/utils.js +0 -90
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -73
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -85
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -75
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -66
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -40
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -86
- package/lowcode/event-booking/meta.ts +0 -69
- package/lowcode/event-booking-availability-calendar/meta.ts +0 -53
- package/lowcode/event-booking-detail-modal/meta.ts +0 -39
- package/lowcode/event-booking-service-list/meta.ts +0 -77
- package/lowcode/event-card/meta.ts +0 -77
- package/lowcode/event-product-card/meta.ts +0 -79
- package/lowcode/event-progress-bar/meta.ts +0 -65
- package/lowcode/event-resource-display/meta.ts +0 -169
- package/lowcode/event-resource-usability/meta.ts +0 -67
- package/lowcode/event-schedule-calendar/meta.ts +0 -56
- package/lowcode/event-select-holder/meta.ts +0 -84
- package/lowcode/event-time-resource-selector/meta.ts +0 -69
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -1,1077 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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 _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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
7
|
-
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); } }
|
|
8
|
-
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); }); }; }
|
|
9
|
-
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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
10
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
15
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
-
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; }
|
|
19
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
import { getNoResource } from "../../mock";
|
|
22
|
-
import { getErrorList, getProductTotalPrice } from "../../utils";
|
|
23
|
-
import { locales } from "@pisell/utils";
|
|
24
|
-
import dayjs from 'dayjs';
|
|
25
|
-
import { appointmentTypes, openingTime } from "./status";
|
|
26
|
-
import { postMultiDay } from "../service/serve";
|
|
27
|
-
import localeTexts from "../../locales";
|
|
28
|
-
import { concatBookings, isGroupBooking, getProductByGroupId } from "./Group/utils";
|
|
29
|
-
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
30
|
-
export var formatActiveKey = function formatActiveKey(lists, platform, isEdit) {
|
|
31
|
-
if (!(lists !== null && lists !== void 0 && lists.length)) return [];
|
|
32
|
-
|
|
33
|
-
// 编辑时,必须有两个holder, 避免闪动问题
|
|
34
|
-
if (lists.length === 1 && isEdit) {
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
// 管理端默认打开最后一个holder
|
|
38
|
-
if (platform === 'shop') {
|
|
39
|
-
var _lists2;
|
|
40
|
-
return [(_lists2 = lists[lists.length - 1]) === null || _lists2 === void 0 ? void 0 : _lists2.key];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// 其他端默认打开所有
|
|
44
|
-
return lists === null || lists === void 0 ? void 0 : lists.map(function (cart) {
|
|
45
|
-
return cart === null || cart === void 0 ? void 0 : cart.key;
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @title: 获取资源名称
|
|
51
|
-
* @description:
|
|
52
|
-
* @param {any} id
|
|
53
|
-
* @param {any} state
|
|
54
|
-
* @return {*}
|
|
55
|
-
* @Author: WangHan
|
|
56
|
-
* @Date: 2024-11-29 18:02
|
|
57
|
-
*/
|
|
58
|
-
export var getResourceItem = function getResourceItem(id, state) {
|
|
59
|
-
var _state$service$resour;
|
|
60
|
-
if (id === 0) {
|
|
61
|
-
return getNoResource();
|
|
62
|
-
}
|
|
63
|
-
return (_state$service$resour = state.service.resources) === null || _state$service$resour === void 0 ? void 0 : _state$service$resour.find(function (d) {
|
|
64
|
-
return d.form_record_id === id;
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
var errorTypes = {
|
|
68
|
-
product: locales.getText('pisell2.text.status.service-error-1'),
|
|
69
|
-
time: locales.getText('pisell2.text.status.service-error-2'),
|
|
70
|
-
maxLimit: locales.getText('pisell2.text.status.service-error-3'),
|
|
71
|
-
limit: locales.getText('pisell2.text.status.service-error-3')
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @title: 错误提示
|
|
76
|
-
* @description:
|
|
77
|
-
* @param {any} service
|
|
78
|
-
* @param {any} resourceItem
|
|
79
|
-
* @return {*}
|
|
80
|
-
* @Author: WangHan
|
|
81
|
-
* @Date: 2024-11-29 18:41
|
|
82
|
-
*/
|
|
83
|
-
export var getErrorMessage = function getErrorMessage(service, resourceItem, isDay) {
|
|
84
|
-
var errorList = getErrorList(resourceItem, service, isDay);
|
|
85
|
-
var errorMessage = '';
|
|
86
|
-
if (!service.id) {
|
|
87
|
-
return errorList[0].label;
|
|
88
|
-
}
|
|
89
|
-
if (errorList.length) {
|
|
90
|
-
if (errorList.length > 1) {
|
|
91
|
-
errorMessage = "".concat(errorList.length, " ").concat(locales.getText('pisell2.text.warnings'));
|
|
92
|
-
} else {
|
|
93
|
-
errorMessage = (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.labelText) + ' ' + errorTypes[errorList[0].type];
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return errorMessage;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @title: 格式化主体列表
|
|
101
|
-
* @description:
|
|
102
|
-
* @param {any} lists
|
|
103
|
-
* @param {boolean} isOpenGroup
|
|
104
|
-
* @return {*}
|
|
105
|
-
* @Author: WangHan
|
|
106
|
-
* @Date: 2024-12-04 11:27
|
|
107
|
-
*/
|
|
108
|
-
export var formatHolderLists = function formatHolderLists(lists) {
|
|
109
|
-
var isOpenGroup = true;
|
|
110
|
-
var _lists = lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
|
|
111
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
112
|
-
id: (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id),
|
|
113
|
-
key: (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id),
|
|
114
|
-
label: locales.getText('pisell2.text.cart.of')(item === null || item === void 0 ? void 0 : item.main_field)
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
// 开启了分组并且是管理端,则增加open items分组
|
|
119
|
-
if (isOpenGroup) {
|
|
120
|
-
var defaults = [{
|
|
121
|
-
key: 0,
|
|
122
|
-
id: 0,
|
|
123
|
-
label: locales.getText('pisell2.text.open.items'),
|
|
124
|
-
main_field: locales.getText('pisell2.text.open.items')
|
|
125
|
-
}];
|
|
126
|
-
return defaults.concat(_lists);
|
|
127
|
-
}
|
|
128
|
-
return _lists;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @title: pets数据加 open items
|
|
133
|
-
* @description:
|
|
134
|
-
* @param {any} state
|
|
135
|
-
* @return {*}
|
|
136
|
-
* @Author: WangHan
|
|
137
|
-
* @Date: 2024-12-03 11:40
|
|
138
|
-
*/
|
|
139
|
-
var getHolderLists = function getHolderLists(state) {
|
|
140
|
-
var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2, _state$bookingConfig$3, _state$pet, _state$pet$value;
|
|
141
|
-
var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : (_state$bookingConfig$3 = _state$bookingConfig$2.appointment_subject) === null || _state$bookingConfig$3 === void 0 ? void 0 : _state$bookingConfig$3.form_id) || 0;
|
|
142
|
-
var petLists = (state === null || state === void 0 ? void 0 : (_state$pet = state.pet) === null || _state$pet === void 0 ? void 0 : (_state$pet$value = _state$pet.value) === null || _state$pet$value === void 0 ? void 0 : _state$pet$value[form_id]) || [];
|
|
143
|
-
var _lists = formatHolderLists(petLists);
|
|
144
|
-
return _lists;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @title: 获取pet名称
|
|
149
|
-
* @description:
|
|
150
|
-
* @param {any} state
|
|
151
|
-
* @param {number} id
|
|
152
|
-
* @return {*}
|
|
153
|
-
* @Author: WangHan
|
|
154
|
-
* @Date: 2024-12-03 11:42
|
|
155
|
-
*/
|
|
156
|
-
var getHolderName = function getHolderName(state, id) {
|
|
157
|
-
var holderLists = getHolderLists(state);
|
|
158
|
-
if (!holderLists.length || !id) return '';
|
|
159
|
-
var resource = holderLists.find(function (d) {
|
|
160
|
-
return (d === null || d === void 0 ? void 0 : d.id) === id;
|
|
161
|
-
});
|
|
162
|
-
return resource === null || resource === void 0 ? void 0 : resource.main_field;
|
|
163
|
-
};
|
|
164
|
-
export var isBookingProduct = function isBookingProduct(extension_type, bol) {
|
|
165
|
-
return appointmentTypes.includes(extension_type) || bol;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* @title: 是否是预约商品
|
|
170
|
-
* @description:
|
|
171
|
-
* @return {*}
|
|
172
|
-
* @Author: WangHan
|
|
173
|
-
* @Date: 2024-12-06 11:24
|
|
174
|
-
*/
|
|
175
|
-
export var isDayBookingProduct = function isDayBookingProduct(item, state) {
|
|
176
|
-
return isBookingProduct(item === null || item === void 0 ? void 0 : item.extension_type) && state.renderType === 'dayBooking';
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* @title: 更新商品数据
|
|
181
|
-
* @description:
|
|
182
|
-
* @param {any} state
|
|
183
|
-
* @param {string} type
|
|
184
|
-
* @param {any} _id // 商品id
|
|
185
|
-
* @param {any} other
|
|
186
|
-
* @return {*}
|
|
187
|
-
* @Author: WangHan
|
|
188
|
-
* @Date: 2025-01-03 15:00
|
|
189
|
-
*/
|
|
190
|
-
export var updateServices = function updateServices(state, currentItem, type, other) {
|
|
191
|
-
var _state$service;
|
|
192
|
-
var products = (state === null || state === void 0 ? void 0 : (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [];
|
|
193
|
-
// currentItem 可能是单个 也可能是数组
|
|
194
|
-
var isGroup = isGroupBooking(currentItem._id);
|
|
195
|
-
// 删除
|
|
196
|
-
if (type === 'delete') {
|
|
197
|
-
var _products;
|
|
198
|
-
var deleteIds = [];
|
|
199
|
-
if (isGroup) {
|
|
200
|
-
// 删除分组
|
|
201
|
-
deleteIds = getProductByGroupId(currentItem._id, products);
|
|
202
|
-
} else {
|
|
203
|
-
// 删除单个
|
|
204
|
-
deleteIds = [currentItem._id];
|
|
205
|
-
}
|
|
206
|
-
products = (_products = products) === null || _products === void 0 ? void 0 : _products.filter(function (item) {
|
|
207
|
-
return !deleteIds.includes(item === null || item === void 0 ? void 0 : item._id);
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// 删除购物车
|
|
212
|
-
if (type === 'delete_holders') {
|
|
213
|
-
var _products2;
|
|
214
|
-
products = (_products2 = products) === null || _products2 === void 0 ? void 0 : _products2.filter(function (item) {
|
|
215
|
-
var _item$_extend;
|
|
216
|
-
return (item === null || item === void 0 ? void 0 : (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.holder_id) !== other;
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// 更新商品的holder_id
|
|
221
|
-
if (type === 'update_holders') {
|
|
222
|
-
var _products3;
|
|
223
|
-
products = (_products3 = products) === null || _products3 === void 0 ? void 0 : _products3.map(function (item) {
|
|
224
|
-
var ids = currentItem.map(function (d) {
|
|
225
|
-
return d._id;
|
|
226
|
-
});
|
|
227
|
-
if (ids !== null && ids !== void 0 && ids.includes(item === null || item === void 0 ? void 0 : item._id)) {
|
|
228
|
-
var _extend = item._extend || {};
|
|
229
|
-
// 数组的话则是批量更新
|
|
230
|
-
if (Array.isArray(other)) {
|
|
231
|
-
var _other$find;
|
|
232
|
-
_extend.holder_id = (_other$find = other.find(function (other) {
|
|
233
|
-
return (other === null || other === void 0 ? void 0 : other._id) === (item === null || item === void 0 ? void 0 : item._id);
|
|
234
|
-
})) === null || _other$find === void 0 ? void 0 : _other$find.holder_id;
|
|
235
|
-
} else {
|
|
236
|
-
_extend.holder_id = other;
|
|
237
|
-
}
|
|
238
|
-
return item;
|
|
239
|
-
}
|
|
240
|
-
return item;
|
|
241
|
-
});
|
|
242
|
-
} else {
|
|
243
|
-
var _products4;
|
|
244
|
-
// 更新数据
|
|
245
|
-
products = (_products4 = products) === null || _products4 === void 0 ? void 0 : _products4.map(function (item) {
|
|
246
|
-
var updateIds = [];
|
|
247
|
-
if (isGroup) {
|
|
248
|
-
// 更新分组
|
|
249
|
-
updateIds = getProductByGroupId(currentItem._id, products);
|
|
250
|
-
} else {
|
|
251
|
-
// 更新单个
|
|
252
|
-
updateIds = [currentItem._id];
|
|
253
|
-
}
|
|
254
|
-
if (updateIds.includes(item._id)) {
|
|
255
|
-
if (type === 'like') {
|
|
256
|
-
var _extend = item._extend || {};
|
|
257
|
-
_extend.like_status = other === null || other === void 0 ? void 0 : other.like_status;
|
|
258
|
-
} else {
|
|
259
|
-
item = _objectSpread(_objectSpread({}, item), other);
|
|
260
|
-
}
|
|
261
|
-
return item;
|
|
262
|
-
}
|
|
263
|
-
return item;
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
return products;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* @title: 格式化套餐
|
|
271
|
-
* @description:
|
|
272
|
-
* @param {any} bundle
|
|
273
|
-
* @return {*}
|
|
274
|
-
* @Author: WangHan
|
|
275
|
-
* @Date: 2025-01-03 00:03
|
|
276
|
-
*/
|
|
277
|
-
var formatBundle = function formatBundle(bundle) {
|
|
278
|
-
if (!(bundle !== null && bundle !== void 0 && bundle.length)) return [];
|
|
279
|
-
return bundle.map(function (item) {
|
|
280
|
-
return {
|
|
281
|
-
id: item === null || item === void 0 ? void 0 : item.id,
|
|
282
|
-
title: item === null || item === void 0 ? void 0 : item.title,
|
|
283
|
-
num: item === null || item === void 0 ? void 0 : item.num,
|
|
284
|
-
price: item === null || item === void 0 ? void 0 : item.price,
|
|
285
|
-
total: item === null || item === void 0 ? void 0 : item.price,
|
|
286
|
-
price_type: item === null || item === void 0 ? void 0 : item.price_type,
|
|
287
|
-
bundle_sum_price: item === null || item === void 0 ? void 0 : item.bundle_sum_price,
|
|
288
|
-
bundle_sum_type: item === null || item === void 0 ? void 0 : item.bundle_sum_type,
|
|
289
|
-
options: formatOptions(item === null || item === void 0 ? void 0 : item.option)
|
|
290
|
-
};
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* @title: 格式化单规格
|
|
296
|
-
* @description:
|
|
297
|
-
* @param {any} options
|
|
298
|
-
* @return {*}
|
|
299
|
-
* @Author: WangHan
|
|
300
|
-
* @Date: 2025-01-02 23:58
|
|
301
|
-
*/
|
|
302
|
-
var formatOptions = function formatOptions(options) {
|
|
303
|
-
if (!(options !== null && options !== void 0 && options.length)) return [];
|
|
304
|
-
return options.map(function (item) {
|
|
305
|
-
return {
|
|
306
|
-
id: item === null || item === void 0 ? void 0 : item.id,
|
|
307
|
-
name: item === null || item === void 0 ? void 0 : item.name,
|
|
308
|
-
num: item === null || item === void 0 ? void 0 : item.num,
|
|
309
|
-
price: item === null || item === void 0 ? void 0 : item.price,
|
|
310
|
-
total: item === null || item === void 0 ? void 0 : item.price,
|
|
311
|
-
origin_total: item === null || item === void 0 ? void 0 : item.original_price
|
|
312
|
-
};
|
|
313
|
-
});
|
|
314
|
-
};
|
|
315
|
-
export var formItems = function formItems(items) {
|
|
316
|
-
return items.map(function (d) {
|
|
317
|
-
return _objectSpread(_objectSpread({}, d), {}, {
|
|
318
|
-
start_date: d._extend.start_date,
|
|
319
|
-
end_date: d._extend.end_date,
|
|
320
|
-
num: d === null || d === void 0 ? void 0 : d._extend.quantity,
|
|
321
|
-
total: d._extend.total,
|
|
322
|
-
origin_total: d._extend.origin_total
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* @title: 格式化商品数据
|
|
329
|
-
* @description:
|
|
330
|
-
* @param {any} lists
|
|
331
|
-
* @return {*}
|
|
332
|
-
* @Author: WangHan
|
|
333
|
-
* @Date: 2024-11-29 17:36
|
|
334
|
-
*/
|
|
335
|
-
export var formatProducts = function formatProducts(lists, state) {
|
|
336
|
-
var isRenderGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
337
|
-
if (!(lists !== null && lists !== void 0 && lists.length)) return [];
|
|
338
|
-
var normalList = [];
|
|
339
|
-
var groupList = [];
|
|
340
|
-
var formItem = function formItem(item) {
|
|
341
|
-
var _item$_extend2, _item$_extend3, _item$_extend3$other, _item$_extend4, _item$_extend4$other, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9, _item$_extend10, _item$_extend10$other, _item$_extend11, _item$_extend12, _resourceItem, _item$_extend13, _item$_extend14, _item$_extend15, _item$_extend16;
|
|
342
|
-
var _isDayBookingProduct = isDayBookingProduct(item, state);
|
|
343
|
-
var clientTitle = getHolderName(state, item === null || item === void 0 ? void 0 : (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.holder_id);
|
|
344
|
-
var options = formatOptions(item === null || item === void 0 ? void 0 : (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : (_item$_extend3$other = _item$_extend3.other) === null || _item$_extend3$other === void 0 ? void 0 : _item$_extend3$other.option);
|
|
345
|
-
var bundle = formatBundle(item === null || item === void 0 ? void 0 : (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : (_item$_extend4$other = _item$_extend4.other) === null || _item$_extend4$other === void 0 ? void 0 : _item$_extend4$other.bundle);
|
|
346
|
-
// 是否是普通商品
|
|
347
|
-
var isNormalProduct = !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
|
|
348
|
-
var resourceItem = {};
|
|
349
|
-
var errorMessage = '';
|
|
350
|
-
if (_isDayBookingProduct) {
|
|
351
|
-
var _item$_extend5;
|
|
352
|
-
resourceItem = getResourceItem(item === null || item === void 0 ? void 0 : (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.resource, state);
|
|
353
|
-
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
id: item === null || item === void 0 ? void 0 : item.id,
|
|
357
|
-
_id: item === null || item === void 0 ? void 0 : item._id,
|
|
358
|
-
name: item === null || item === void 0 ? void 0 : item.title,
|
|
359
|
-
price: item === null || item === void 0 ? void 0 : (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.price,
|
|
360
|
-
total: item === null || item === void 0 ? void 0 : (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.total,
|
|
361
|
-
origin_total: item === null || item === void 0 ? void 0 : (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.origin_total,
|
|
362
|
-
num: item === null || item === void 0 ? void 0 : item._extend.quantity,
|
|
363
|
-
image: item === null || item === void 0 ? void 0 : item.cover,
|
|
364
|
-
isShowNote: true,
|
|
365
|
-
note: item === null || item === void 0 ? void 0 : item.note,
|
|
366
|
-
like_status: item === null || item === void 0 ? void 0 : (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.like_status,
|
|
367
|
-
bundle: bundle,
|
|
368
|
-
options: options,
|
|
369
|
-
errorMessage: errorMessage,
|
|
370
|
-
product_option_string: item === null || item === void 0 ? void 0 : (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : (_item$_extend10$other = _item$_extend10.other) === null || _item$_extend10$other === void 0 ? void 0 : _item$_extend10$other.product_option_string,
|
|
371
|
-
discount_reason: item === null || item === void 0 ? void 0 : (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.discount_reason,
|
|
372
|
-
resource_id: isNormalProduct ? 0 : item === null || item === void 0 ? void 0 : (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.resource,
|
|
373
|
-
relation_form_name: isNormalProduct ? '' : ((_resourceItem = resourceItem) === null || _resourceItem === void 0 ? void 0 : _resourceItem.labelText) || item.relation_form_name,
|
|
374
|
-
holder_title: clientTitle,
|
|
375
|
-
start_date: !isNormalProduct ? item === null || item === void 0 ? void 0 : (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.start_date : '',
|
|
376
|
-
end_date: !isNormalProduct ? item === null || item === void 0 ? void 0 : (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.end_date : '',
|
|
377
|
-
holder_id: (item === null || item === void 0 ? void 0 : (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.holder_id) || 0,
|
|
378
|
-
isNormalProduct: isNormalProduct,
|
|
379
|
-
locale: state.locale,
|
|
380
|
-
symbol: state.amountSymbol,
|
|
381
|
-
items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 ? void 0 : (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.items) || []),
|
|
382
|
-
_origin: item
|
|
383
|
-
};
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
// 将商品分为组商品和非组商品
|
|
387
|
-
lists.forEach(function (item) {
|
|
388
|
-
var _item$_extend17;
|
|
389
|
-
if (!(item !== null && item !== void 0 && (_item$_extend17 = item._extend) !== null && _item$_extend17 !== void 0 && _item$_extend17.groupId)) {
|
|
390
|
-
normalList.push(formItem(item));
|
|
391
|
-
} else {
|
|
392
|
-
groupList.push(item);
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
// 根据item._extend.groupId 进行分组
|
|
397
|
-
var groups = groupList.reduce(function (prev, item) {
|
|
398
|
-
var _item$_extend18;
|
|
399
|
-
var groupId = item === null || item === void 0 ? void 0 : (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.groupId;
|
|
400
|
-
if (!prev[groupId]) {
|
|
401
|
-
prev[groupId] = [];
|
|
402
|
-
}
|
|
403
|
-
prev[groupId].push(item);
|
|
404
|
-
return prev;
|
|
405
|
-
}, {});
|
|
406
|
-
if (isRenderGroup) {
|
|
407
|
-
return Object.values(groups).map(function (d) {
|
|
408
|
-
return formItem(concatBookings(d));
|
|
409
|
-
}).concat(normalList);
|
|
410
|
-
} else {
|
|
411
|
-
return lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
|
|
412
|
-
return formItem(item);
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* @title: 禁用日期
|
|
419
|
-
* @description:
|
|
420
|
-
* @param {any} current
|
|
421
|
-
* @param {string} position
|
|
422
|
-
* @param {any} startDate
|
|
423
|
-
* @return {*}
|
|
424
|
-
* @Author: WangHan
|
|
425
|
-
* @Date: 2024-12-03 17:51
|
|
426
|
-
*/
|
|
427
|
-
export var disabledDate = function disabledDate(current, position, currentDate) {
|
|
428
|
-
if (!dayjs(currentDate).isValid()) return;
|
|
429
|
-
if (position === 'start') {
|
|
430
|
-
return false;
|
|
431
|
-
}
|
|
432
|
-
if (position === 'end' && current.endOf('day') && currentDate) {
|
|
433
|
-
// 结束日期最大 = 开始日期 + 8个月
|
|
434
|
-
var endDisabled = currentDate.add(8, 'months').format('YYYY-MM-DD');
|
|
435
|
-
return dayjs(endDisabled) < current.startOf('day') || current.startOf('day') <= currentDate;
|
|
436
|
-
}
|
|
437
|
-
return current && current <= currentDate;
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* @title: 是否是跨日预约
|
|
442
|
-
* @description:
|
|
443
|
-
* @param {any} state
|
|
444
|
-
* @return {*}
|
|
445
|
-
* @Author: WangHan
|
|
446
|
-
* @Date: 2024-12-04 09:49
|
|
447
|
-
*/
|
|
448
|
-
export var isDayBooking = function isDayBooking(state) {
|
|
449
|
-
return (state === null || state === void 0 ? void 0 : state.renderType) === 'dayBooking' || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
|
|
450
|
-
};
|
|
451
|
-
export var isDaysBooking = function isDaysBooking(state) {
|
|
452
|
-
return (state === null || state === void 0 ? void 0 : state.renderType) === 'dayBooking';
|
|
453
|
-
};
|
|
454
|
-
export var isEventBooking = function isEventBooking(state) {
|
|
455
|
-
return state.renderType === 'eventBooking';
|
|
456
|
-
};
|
|
457
|
-
export var isAppointmentProduct = function isAppointmentProduct(item) {
|
|
458
|
-
return appointmentTypes.includes(item.extension_type);
|
|
459
|
-
};
|
|
460
|
-
/**
|
|
461
|
-
* @title: 是否是terminal上的跨日预约
|
|
462
|
-
* @description:
|
|
463
|
-
* @param {any} state
|
|
464
|
-
* @return {*}
|
|
465
|
-
* @Author: WangHan
|
|
466
|
-
* @Date: 2024-12-04 15:31
|
|
467
|
-
*/
|
|
468
|
-
export var isTerminalDayBooking = function isTerminalDayBooking(state) {
|
|
469
|
-
return state.isTerminalDayBookingPage;
|
|
470
|
-
};
|
|
471
|
-
export var formatDayDate = function formatDayDate(_extend) {
|
|
472
|
-
// 默认选择的日期
|
|
473
|
-
var startDate = dayjs(_extend === null || _extend === void 0 ? void 0 : _extend.start_date).startOf('day');
|
|
474
|
-
var endDate = dayjs(_extend === null || _extend === void 0 ? void 0 : _extend.end_date).startOf('day');
|
|
475
|
-
return _objectSpread(_objectSpread({}, _extend), {}, {
|
|
476
|
-
start_date: startDate,
|
|
477
|
-
end_date: endDate
|
|
478
|
-
});
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* @title: 根据营业日时间格式化时间
|
|
483
|
-
* @description:
|
|
484
|
-
* @param {any} state
|
|
485
|
-
* @return {*}
|
|
486
|
-
* @Author: WangHan
|
|
487
|
-
* @Date: 2024-12-04 12:07
|
|
488
|
-
*/
|
|
489
|
-
export var formatDayTime = function formatDayTime(_ref) {
|
|
490
|
-
var startDate = _ref.startDate,
|
|
491
|
-
endDate = _ref.endDate;
|
|
492
|
-
// 营业日时间
|
|
493
|
-
var shopOpeningTime = localStorage.getItem('shopOpeningHours') || '00:00';
|
|
494
|
-
|
|
495
|
-
// 默认选择的日期
|
|
496
|
-
var start_date = dayjs(startDate).format('YYYY-MM-DD');
|
|
497
|
-
var end_date = dayjs(endDate).format('YYYY-MM-DD');
|
|
498
|
-
|
|
499
|
-
// 更新后的日期
|
|
500
|
-
var result = {
|
|
501
|
-
startDateTime: dayjs("".concat(start_date, "T").concat(shopOpeningTime, ":00")),
|
|
502
|
-
// 结束日期根据营业日时间减去一分钟
|
|
503
|
-
endDateTime: dayjs("".concat(end_date, "T").concat(shopOpeningTime, ":00")).subtract(1, 'minute')
|
|
504
|
-
};
|
|
505
|
-
return result;
|
|
506
|
-
};
|
|
507
|
-
export var formatDateTime = function formatDateTime(start_date, end_date) {
|
|
508
|
-
var _openingTime = openingTime();
|
|
509
|
-
|
|
510
|
-
// 开始时间 + 营业日时间
|
|
511
|
-
var startDate = "".concat(start_date, " ").concat(_openingTime);
|
|
512
|
-
var endDate = "".concat(end_date, " ").concat(_openingTime);
|
|
513
|
-
var date = {
|
|
514
|
-
value: dayjs(startDate),
|
|
515
|
-
end_date: dayjs(endDate).subtract(1, 'minute')
|
|
516
|
-
};
|
|
517
|
-
return date;
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* @title: 初始化日期
|
|
522
|
-
* @description:
|
|
523
|
-
* @return {*}
|
|
524
|
-
* @Author: WangHan
|
|
525
|
-
* @Date: 2024-12-06 17:24
|
|
526
|
-
*/
|
|
527
|
-
export var initDate = function initDate() {
|
|
528
|
-
var startDate = dayjs().format('YYYY-MM-DD');
|
|
529
|
-
var endDate = dayjs().add(1, 'days').format('YYYY-MM-DD');
|
|
530
|
-
var date = formatDateTime(startDate, endDate);
|
|
531
|
-
return date;
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* @title: 是否有预约商品
|
|
536
|
-
* @description:
|
|
537
|
-
* @return {*}
|
|
538
|
-
* @Author: WangHan
|
|
539
|
-
* @Date: 2024-12-12 15:47
|
|
540
|
-
*/
|
|
541
|
-
export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(state) {
|
|
542
|
-
var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$bookingConfig5, _state$service2, _state$pet2, _state$pet2$value;
|
|
543
|
-
var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : (_state$bookingConfig3 = _state$bookingConfig2.config) === null || _state$bookingConfig3 === void 0 ? void 0 : (_state$bookingConfig4 = _state$bookingConfig3.basic) === null || _state$bookingConfig4 === void 0 ? void 0 : (_state$bookingConfig5 = _state$bookingConfig4.appointment_subject) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.form_id) || 0;
|
|
544
|
-
var services = ((_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || [];
|
|
545
|
-
var pets = ((_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : (_state$pet2$value = _state$pet2.value) === null || _state$pet2$value === void 0 ? void 0 : _state$pet2$value[form_id]) || [];
|
|
546
|
-
|
|
547
|
-
// 没选择表单,则直接提示
|
|
548
|
-
if (!pets.length) return true;
|
|
549
|
-
var checkType = function checkType(extension_type) {
|
|
550
|
-
if (isEventBooking(state)) {
|
|
551
|
-
return true;
|
|
552
|
-
}
|
|
553
|
-
return appointmentTypes.includes(extension_type);
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
// 没有任何一个预约商品则提示
|
|
557
|
-
var appointmentServices = services.filter(function (d) {
|
|
558
|
-
return checkType(d.extension_type);
|
|
559
|
-
});
|
|
560
|
-
if (!appointmentServices.length) return true;
|
|
561
|
-
var _pets = pets === null || pets === void 0 ? void 0 : pets.map(function (d) {
|
|
562
|
-
// const holderProducts = services.filter((d: any) => d._extend?.holder_id == d.form_record_id)
|
|
563
|
-
|
|
564
|
-
return _objectSpread(_objectSpread({}, d), {}, {
|
|
565
|
-
// 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
|
|
566
|
-
// services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
|
|
567
|
-
services: services.filter(function (item) {
|
|
568
|
-
var _item$_extend19;
|
|
569
|
-
return ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.holder_id) == d.form_record_id && checkType(item.extension_type);
|
|
570
|
-
})
|
|
571
|
-
});
|
|
572
|
-
});
|
|
573
|
-
_pets = _pets.filter(function (d) {
|
|
574
|
-
return !d.services.length;
|
|
575
|
-
});
|
|
576
|
-
return _pets.length > 0;
|
|
577
|
-
};
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* @title: 过滤出如果是预约商品,则只获取跨日的预约商品
|
|
581
|
-
* @description:
|
|
582
|
-
* @param {any} lists
|
|
583
|
-
* @return {*}
|
|
584
|
-
* @Author: WangHan
|
|
585
|
-
* @Date: 2024-12-13 16:44
|
|
586
|
-
*/
|
|
587
|
-
export var getDayProducts = function getDayProducts(holderId, lists, isTerminal) {
|
|
588
|
-
var _lists = lists || [];
|
|
589
|
-
|
|
590
|
-
// 普通商品列表, terminal进入页面直接获取了商品列表数据,所以选择了表单之后不会再次触发该方法
|
|
591
|
-
if (!holderId && !isTerminal) {
|
|
592
|
-
_lists = _lists.filter(function (item) {
|
|
593
|
-
return !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type);
|
|
594
|
-
});
|
|
595
|
-
} else {
|
|
596
|
-
// 普通商品 + 跨日预约商品列表
|
|
597
|
-
_lists = _lists.filter(function (item) {
|
|
598
|
-
var _item$duration;
|
|
599
|
-
return !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) && ((_item$duration = item.duration) === null || _item$duration === void 0 ? void 0 : _item$duration.type) === 'days';
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
return _lists;
|
|
603
|
-
};
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* @title: 格式化表单数据
|
|
607
|
-
* @description:
|
|
608
|
-
* @param {any} state
|
|
609
|
-
* @return {*}
|
|
610
|
-
* @Author: WangHan
|
|
611
|
-
* @Date: 2024-12-30 22:19
|
|
612
|
-
*/
|
|
613
|
-
export var getPets = function getPets(state) {
|
|
614
|
-
var _state$bookingConfig6, _state$bookingConfig7, _state$bookingConfig8, _state$bookingConfig9, _state$pet3, _state$pet3$value;
|
|
615
|
-
var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig6 = state.bookingConfig) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.config) === null || _state$bookingConfig7 === void 0 ? void 0 : (_state$bookingConfig8 = _state$bookingConfig7.basic) === null || _state$bookingConfig8 === void 0 ? void 0 : (_state$bookingConfig9 = _state$bookingConfig8.appointment_subject) === null || _state$bookingConfig9 === void 0 ? void 0 : _state$bookingConfig9.form_id) || 0;
|
|
616
|
-
var pets = (state === null || state === void 0 ? void 0 : (_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : (_state$pet3$value = _state$pet3.value) === null || _state$pet3$value === void 0 ? void 0 : _state$pet3$value[form_id]) || [];
|
|
617
|
-
return pets;
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* @title: 得出预约商品
|
|
622
|
-
* @description:
|
|
623
|
-
* @param {any} state
|
|
624
|
-
* @return {*}
|
|
625
|
-
* @Author: WangHan
|
|
626
|
-
* @Date: 2024-12-30 22:26
|
|
627
|
-
*/
|
|
628
|
-
export var getAppointmentService = function getAppointmentService(state) {
|
|
629
|
-
var _state$service3;
|
|
630
|
-
var services = ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value) || [];
|
|
631
|
-
var lists = services.filter(function (item) {
|
|
632
|
-
return appointmentTypes.includes(item.extension_type);
|
|
633
|
-
});
|
|
634
|
-
return lists;
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* @title: 判断是否打开删除宠物弹窗
|
|
639
|
-
* @description:
|
|
640
|
-
* @param {any} state
|
|
641
|
-
* @param {any} newVal
|
|
642
|
-
* @return {*}
|
|
643
|
-
* @Author: WangHan
|
|
644
|
-
* @Date: 2024-12-16 16:12
|
|
645
|
-
*/
|
|
646
|
-
export var isOpenDeletePet = function isOpenDeletePet(state, newVal) {
|
|
647
|
-
var _state$bookingConfig10, _state$bookingConfig11, _state$bookingConfig12, _state$bookingConfig13, _state$pet4, _state$pet4$value;
|
|
648
|
-
var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig10 = state.bookingConfig) === null || _state$bookingConfig10 === void 0 ? void 0 : (_state$bookingConfig11 = _state$bookingConfig10.config) === null || _state$bookingConfig11 === void 0 ? void 0 : (_state$bookingConfig12 = _state$bookingConfig11.basic) === null || _state$bookingConfig12 === void 0 ? void 0 : (_state$bookingConfig13 = _state$bookingConfig12.appointment_subject) === null || _state$bookingConfig13 === void 0 ? void 0 : _state$bookingConfig13.form_id) || 0;
|
|
649
|
-
var oldPets = (state === null || state === void 0 ? void 0 : (_state$pet4 = state.pet) === null || _state$pet4 === void 0 ? void 0 : (_state$pet4$value = _state$pet4.value) === null || _state$pet4$value === void 0 ? void 0 : _state$pet4$value[form_id]) || [];
|
|
650
|
-
var newPets = (newVal === null || newVal === void 0 ? void 0 : newVal[form_id]) || [];
|
|
651
|
-
|
|
652
|
-
// 被删除的表单
|
|
653
|
-
var deletePets = oldPets.filter(function (item) {
|
|
654
|
-
return !newPets.some(function (newItem) {
|
|
655
|
-
return newItem.form_record_id === item.form_record_id;
|
|
656
|
-
});
|
|
657
|
-
});
|
|
658
|
-
|
|
659
|
-
// 被删除的表单中是否有预约商品
|
|
660
|
-
var servicePets = deletePets.map(function (item) {
|
|
661
|
-
var _state$service4, _state$service4$value;
|
|
662
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
663
|
-
services: (_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : (_state$service4$value = _state$service4.value) === null || _state$service4$value === void 0 ? void 0 : _state$service4$value.filter(function (d) {
|
|
664
|
-
var _d$_extend;
|
|
665
|
-
return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.holder_id) == item.form_record_id;
|
|
666
|
-
})
|
|
667
|
-
});
|
|
668
|
-
});
|
|
669
|
-
|
|
670
|
-
// 查找被删除的表单中是否有对应的商品数据
|
|
671
|
-
var lists = servicePets.filter(function (item) {
|
|
672
|
-
var _item$services;
|
|
673
|
-
return ((_item$services = item.services) === null || _item$services === void 0 ? void 0 : _item$services.length) > 0;
|
|
674
|
-
});
|
|
675
|
-
return {
|
|
676
|
-
ids: lists.map(function (item) {
|
|
677
|
-
return item.form_record_id;
|
|
678
|
-
}),
|
|
679
|
-
lists: lists
|
|
680
|
-
};
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* @title: 当前选中的表单id
|
|
685
|
-
* @description:
|
|
686
|
-
* @param {any} state
|
|
687
|
-
* @return {*}
|
|
688
|
-
* @Author: WangHan
|
|
689
|
-
* @Date: 2024-12-17 14:40
|
|
690
|
-
*/
|
|
691
|
-
export var holderId = function holderId(state) {
|
|
692
|
-
var _state$activeCartId;
|
|
693
|
-
return Number((state === null || state === void 0 ? void 0 : (_state$activeCartId = state.activeCartId) === null || _state$activeCartId === void 0 ? void 0 : _state$activeCartId[0]) || 0);
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* @title: 计算总价
|
|
698
|
-
* @description:
|
|
699
|
-
* @param {any} data
|
|
700
|
-
* @return {*}
|
|
701
|
-
* @Author: WangHan
|
|
702
|
-
* @Date: 2024-12-31 15:18
|
|
703
|
-
*/
|
|
704
|
-
function calculateTotalPrice(data) {
|
|
705
|
-
var _price = data === null || data === void 0 ? void 0 : data.reduce(function (total, item) {
|
|
706
|
-
return total + ((item === null || item === void 0 ? void 0 : item.price) || (item === null || item === void 0 ? void 0 : item.add_price)) * item.num;
|
|
707
|
-
}, 0);
|
|
708
|
-
return parseFloat(_price);
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* @title: 更新单规格价格
|
|
713
|
-
* @description:
|
|
714
|
-
* @param {any} currentValue
|
|
715
|
-
* @param {any} single
|
|
716
|
-
* @return {*}
|
|
717
|
-
* @Author: WangHan
|
|
718
|
-
* @Date: 2024-12-31 15:18
|
|
719
|
-
*/
|
|
720
|
-
function updateSinglePrice(currentValue, single) {
|
|
721
|
-
var _single = [];
|
|
722
|
-
var _loop = function _loop() {
|
|
723
|
-
var item = currentValue[index];
|
|
724
|
-
var currentIndex = single.findIndex(function (_single) {
|
|
725
|
-
return _single.id === item.id;
|
|
726
|
-
});
|
|
727
|
-
if (currentIndex !== -1) {
|
|
728
|
-
item.add_price = single[currentIndex].add_price;
|
|
729
|
-
item.name = single[currentIndex].name;
|
|
730
|
-
_single.push(item);
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
for (var index = 0; index < currentValue.length; index++) {
|
|
734
|
-
_loop();
|
|
735
|
-
}
|
|
736
|
-
return _single;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* @title: 更新套餐价格
|
|
741
|
-
* @description:
|
|
742
|
-
* @param {any} currentValue
|
|
743
|
-
* @param {any} param2
|
|
744
|
-
* @return {*}
|
|
745
|
-
* @Author: WangHan
|
|
746
|
-
* @Date: 2024-12-31 15:17
|
|
747
|
-
*/
|
|
748
|
-
function updateBundlePrice(currentValue, _ref2) {
|
|
749
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
750
|
-
bundle = _ref3[0],
|
|
751
|
-
single = _ref3[1];
|
|
752
|
-
var _bundle = [];
|
|
753
|
-
var _loop2 = function _loop2() {
|
|
754
|
-
var item = currentValue[index];
|
|
755
|
-
var currentIndex = bundle.findIndex(function (_bundle) {
|
|
756
|
-
return _bundle.id === item.id;
|
|
757
|
-
});
|
|
758
|
-
if (currentIndex !== -1 && bundle[currentIndex]) {
|
|
759
|
-
var _item$option;
|
|
760
|
-
// currentValue.splice(index, 1);
|
|
761
|
-
item.title = bundle[currentIndex].title;
|
|
762
|
-
item.price_type = bundle[currentIndex].price_type;
|
|
763
|
-
item._price = bundle[currentIndex].price;
|
|
764
|
-
var bundle_sum_price = parseFloat(bundle[currentIndex].price_type === 'markdown' ? bundle[currentIndex].price * -1 : bundle[currentIndex].price).toFixed(2);
|
|
765
|
-
item.price = bundle_sum_price;
|
|
766
|
-
item.bundle_sum_price = bundle_sum_price;
|
|
767
|
-
// 如果有单规格
|
|
768
|
-
if (item !== null && item !== void 0 && (_item$option = item.option) !== null && _item$option !== void 0 && _item$option.length) {
|
|
769
|
-
var _option = JSON.parse(JSON.stringify(item.option));
|
|
770
|
-
item.option = updateSinglePrice(_option, single);
|
|
771
|
-
var optionPrice = 0;
|
|
772
|
-
optionPrice = calculateTotalPrice(item.option);
|
|
773
|
-
var _bundle_sum_price = (parseFloat(bundle[currentIndex].price_type === 'markdown' ? bundle[currentIndex].price * -1 : bundle[currentIndex].price) + optionPrice).toFixed(2);
|
|
774
|
-
item.price = _bundle_sum_price;
|
|
775
|
-
item.bundle_sum_price = _bundle_sum_price;
|
|
776
|
-
}
|
|
777
|
-
_bundle.push(item);
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
for (var index = 0; index < currentValue.length; index++) {
|
|
781
|
-
_loop2();
|
|
782
|
-
}
|
|
783
|
-
return _bundle;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* @title: 平铺套餐数据
|
|
788
|
-
* @description:
|
|
789
|
-
* @param {any} newPackageData
|
|
790
|
-
* @return {*}
|
|
791
|
-
* @Author: WangHan
|
|
792
|
-
* @Date: 2024-12-31 15:17
|
|
793
|
-
*/
|
|
794
|
-
function flatData(newPackageData) {
|
|
795
|
-
var bundle = [];
|
|
796
|
-
var single = [];
|
|
797
|
-
// 获取所有的套餐
|
|
798
|
-
var _iterator = _createForOfIteratorHelper(newPackageData),
|
|
799
|
-
_step;
|
|
800
|
-
try {
|
|
801
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
802
|
-
var _group$bundle_item;
|
|
803
|
-
var _group = _step.value;
|
|
804
|
-
if (_group !== null && _group !== void 0 && (_group$bundle_item = _group.bundle_item) !== null && _group$bundle_item !== void 0 && _group$bundle_item.length) {
|
|
805
|
-
var _iterator4 = _createForOfIteratorHelper(_group.bundle_item),
|
|
806
|
-
_step4;
|
|
807
|
-
try {
|
|
808
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
809
|
-
var _item = _step4.value;
|
|
810
|
-
bundle.push(_item);
|
|
811
|
-
}
|
|
812
|
-
} catch (err) {
|
|
813
|
-
_iterator4.e(err);
|
|
814
|
-
} finally {
|
|
815
|
-
_iterator4.f();
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
// 获取到所有的规格
|
|
821
|
-
} catch (err) {
|
|
822
|
-
_iterator.e(err);
|
|
823
|
-
} finally {
|
|
824
|
-
_iterator.f();
|
|
825
|
-
}
|
|
826
|
-
for (var _i2 = 0, _bundle2 = bundle; _i2 < _bundle2.length; _i2++) {
|
|
827
|
-
var _bundleItem$option_gr;
|
|
828
|
-
var bundleItem = _bundle2[_i2];
|
|
829
|
-
if (bundleItem !== null && bundleItem !== void 0 && (_bundleItem$option_gr = bundleItem.option_group) !== null && _bundleItem$option_gr !== void 0 && _bundleItem$option_gr.length) {
|
|
830
|
-
var _iterator2 = _createForOfIteratorHelper(bundleItem.option_group),
|
|
831
|
-
_step2;
|
|
832
|
-
try {
|
|
833
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
834
|
-
var _group$option_item;
|
|
835
|
-
var group = _step2.value;
|
|
836
|
-
if (group !== null && group !== void 0 && (_group$option_item = group.option_item) !== null && _group$option_item !== void 0 && _group$option_item.length) {
|
|
837
|
-
var _iterator3 = _createForOfIteratorHelper(group.option_item),
|
|
838
|
-
_step3;
|
|
839
|
-
try {
|
|
840
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
841
|
-
var item = _step3.value;
|
|
842
|
-
single.push(item);
|
|
843
|
-
}
|
|
844
|
-
} catch (err) {
|
|
845
|
-
_iterator3.e(err);
|
|
846
|
-
} finally {
|
|
847
|
-
_iterator3.f();
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
} catch (err) {
|
|
852
|
-
_iterator2.e(err);
|
|
853
|
-
} finally {
|
|
854
|
-
_iterator2.f();
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
return [bundle, single];
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
/**
|
|
862
|
-
* @title: 更新套餐的价格
|
|
863
|
-
* @description:
|
|
864
|
-
* @param {any} currentValue
|
|
865
|
-
* @param {any} newBundleData
|
|
866
|
-
* @return {*}
|
|
867
|
-
* @Author: WangHan
|
|
868
|
-
* @Date: 2024-12-31 15:16
|
|
869
|
-
*/
|
|
870
|
-
export function updateNormalBundlePrice(currentValue, newBundleData) {
|
|
871
|
-
var _currentValue = JSON.parse(JSON.stringify(currentValue));
|
|
872
|
-
var _flatData = flatData(newBundleData);
|
|
873
|
-
var newValue = updateBundlePrice(_currentValue, _flatData);
|
|
874
|
-
return newValue;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
* @title: 更新普通商品价格
|
|
879
|
-
* @description:
|
|
880
|
-
* @param {any} ids
|
|
881
|
-
* @param {any} state
|
|
882
|
-
* @return {*}
|
|
883
|
-
* @Author: WangHan
|
|
884
|
-
* @Date: 2024-12-31 15:15
|
|
885
|
-
*/
|
|
886
|
-
var normalServicePrice = /*#__PURE__*/function () {
|
|
887
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ids, state) {
|
|
888
|
-
var _state$service5, _state$client, _state$client$value, _data$list;
|
|
889
|
-
var services, customerId, data, _lists;
|
|
890
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
891
|
-
while (1) switch (_context.prev = _context.next) {
|
|
892
|
-
case 0:
|
|
893
|
-
services = ((_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : _state$service5.value) || [];
|
|
894
|
-
customerId = (state === null || state === void 0 ? void 0 : (_state$client = state.client) === null || _state$client === void 0 ? void 0 : (_state$client$value = _state$client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id) || 0;
|
|
895
|
-
_context.next = 4;
|
|
896
|
-
return state.apis.getServices({
|
|
897
|
-
skip: 1,
|
|
898
|
-
num: 500,
|
|
899
|
-
ids: ids,
|
|
900
|
-
customer_id: customerId,
|
|
901
|
-
open_quotation: 1,
|
|
902
|
-
open_bundle: 1,
|
|
903
|
-
with: ['bundleGroup.bundleItem', 'optionGroup.optionItem'],
|
|
904
|
-
_config: {
|
|
905
|
-
abort: true
|
|
906
|
-
}
|
|
907
|
-
});
|
|
908
|
-
case 4:
|
|
909
|
-
data = _context.sent;
|
|
910
|
-
if (data !== null && data !== void 0 && (_data$list = data.list) !== null && _data$list !== void 0 && _data$list.length) {
|
|
911
|
-
_context.next = 7;
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
return _context.abrupt("return");
|
|
915
|
-
case 7:
|
|
916
|
-
_lists = services.map(function (item) {
|
|
917
|
-
var obj = _objectSpread({}, item);
|
|
918
|
-
if (!appointmentTypes.includes(obj.extension_type)) {
|
|
919
|
-
// 在商品列表中根据商品id找到对应的商品数据
|
|
920
|
-
var product = data.list.find(function (p) {
|
|
921
|
-
return p.id === (item === null || item === void 0 ? void 0 : item.product_id);
|
|
922
|
-
});
|
|
923
|
-
var _extend = (obj === null || obj === void 0 ? void 0 : obj._extend) || {};
|
|
924
|
-
var other = (_extend === null || _extend === void 0 ? void 0 : _extend.other) || {};
|
|
925
|
-
if (product) {
|
|
926
|
-
var _product$variant, _other$bundle, _product$bundle_group;
|
|
927
|
-
// 如果有多规格的话则更新价格为多规格的价格
|
|
928
|
-
if (product !== null && product !== void 0 && (_product$variant = product.variant) !== null && _product$variant !== void 0 && _product$variant.length && other !== null && other !== void 0 && other.product_variant_id) {
|
|
929
|
-
var _product$variant2;
|
|
930
|
-
var _variant = product === null || product === void 0 ? void 0 : (_product$variant2 = product.variant) === null || _product$variant2 === void 0 ? void 0 : _product$variant2.find(function (v) {
|
|
931
|
-
return v.id === (other === null || other === void 0 ? void 0 : other.product_variant_id);
|
|
932
|
-
});
|
|
933
|
-
obj._extend.price = Number(_variant === null || _variant === void 0 ? void 0 : _variant.price);
|
|
934
|
-
obj._extend.other.price = Number(_variant === null || _variant === void 0 ? void 0 : _variant.price);
|
|
935
|
-
} else {
|
|
936
|
-
obj._extend.price = Number(product === null || product === void 0 ? void 0 : product.price);
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
// 更新套餐的价格
|
|
940
|
-
if (other !== null && other !== void 0 && (_other$bundle = other.bundle) !== null && _other$bundle !== void 0 && _other$bundle.length && product !== null && product !== void 0 && (_product$bundle_group = product.bundle_group) !== null && _product$bundle_group !== void 0 && _product$bundle_group.length) {
|
|
941
|
-
var _bundle = updateNormalBundlePrice(other.bundle, product === null || product === void 0 ? void 0 : product.bundle_group);
|
|
942
|
-
obj._extend.other = _objectSpread(_objectSpread({}, other), {}, {
|
|
943
|
-
bundle: _bundle
|
|
944
|
-
});
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
// 更新总计
|
|
948
|
-
obj._extend.total = getProductTotalPrice(obj);
|
|
949
|
-
obj._extend.origin_total = getProductTotalPrice(obj);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
return obj;
|
|
953
|
-
});
|
|
954
|
-
return _context.abrupt("return", _lists);
|
|
955
|
-
case 9:
|
|
956
|
-
case "end":
|
|
957
|
-
return _context.stop();
|
|
958
|
-
}
|
|
959
|
-
}, _callee);
|
|
960
|
-
}));
|
|
961
|
-
return function normalServicePrice(_x2, _x3) {
|
|
962
|
-
return _ref4.apply(this, arguments);
|
|
963
|
-
};
|
|
964
|
-
}();
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* @title: 更新预约商品报价单
|
|
968
|
-
* @description:
|
|
969
|
-
* @param {any} state
|
|
970
|
-
* @param {any} cacheItem
|
|
971
|
-
* @return {*}
|
|
972
|
-
* @Author: WangHan
|
|
973
|
-
* @Date: 2024-12-25 16:41
|
|
974
|
-
*/
|
|
975
|
-
export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
976
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(state, _ref5) {
|
|
977
|
-
var _state$service6, _state$service6$cache, _state$service6$cache2;
|
|
978
|
-
var start_date, end_date, product_id, defaultReturn, _state$client2, _state$client2$value, _state$service$cacheI, _res$data, _res$data2, format, customer_id, _product_id, multi_day_price, startDate, endDate, params, res, _prices;
|
|
979
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
980
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
981
|
-
case 0:
|
|
982
|
-
start_date = _ref5.start_date, end_date = _ref5.end_date, product_id = _ref5.product_id;
|
|
983
|
-
defaultReturn = {
|
|
984
|
-
multiDayPrices: [],
|
|
985
|
-
price: Number(state === null || state === void 0 ? void 0 : (_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : (_state$service6$cache = _state$service6.cacheItem) === null || _state$service6$cache === void 0 ? void 0 : (_state$service6$cache2 = _state$service6$cache._extend) === null || _state$service6$cache2 === void 0 ? void 0 : _state$service6$cache2.price) || 0
|
|
986
|
-
};
|
|
987
|
-
_context2.prev = 2;
|
|
988
|
-
format = 'YYYY-MM-DD';
|
|
989
|
-
customer_id = (state === null || state === void 0 ? void 0 : (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : (_state$client2$value = _state$client2.value) === null || _state$client2$value === void 0 ? void 0 : _state$client2$value.id) || 1;
|
|
990
|
-
_product_id = product_id || ((_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI.product_id) || 0;
|
|
991
|
-
multi_day_price = null;
|
|
992
|
-
if (product_id) {
|
|
993
|
-
_context2.next = 10;
|
|
994
|
-
break;
|
|
995
|
-
}
|
|
996
|
-
console.log('updateAppointmentServicePrice', product_id);
|
|
997
|
-
return _context2.abrupt("return", defaultReturn);
|
|
998
|
-
case 10:
|
|
999
|
-
startDate = dayjs(start_date).format(format);
|
|
1000
|
-
endDate = dayjs(end_date).subtract(1, 'days').format(format);
|
|
1001
|
-
params = {
|
|
1002
|
-
customer_id: customer_id,
|
|
1003
|
-
multi_day: {
|
|
1004
|
-
start: startDate,
|
|
1005
|
-
end: endDate
|
|
1006
|
-
}
|
|
1007
|
-
};
|
|
1008
|
-
_context2.next = 15;
|
|
1009
|
-
return postMultiDay(_product_id, params);
|
|
1010
|
-
case 15:
|
|
1011
|
-
res = _context2.sent;
|
|
1012
|
-
_prices = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.multi_day_price) || []; // 如果接口返回的有报价单,则分割商品数据
|
|
1013
|
-
multi_day_price = _prices === null || _prices === void 0 ? void 0 : _prices.map(function (p) {
|
|
1014
|
-
var _p$multi_day, _p$multi_day2;
|
|
1015
|
-
var startDate = dayjs(p === null || p === void 0 ? void 0 : (_p$multi_day = p.multi_day) === null || _p$multi_day === void 0 ? void 0 : _p$multi_day.start);
|
|
1016
|
-
// 将返回的结束日期+1天,(前端计算得出的两个日期之间的天数是按照中间的间隔来计算的,而后端返回的报价单的日期是按照当天来计算的)
|
|
1017
|
-
var endDate = dayjs(p === null || p === void 0 ? void 0 : (_p$multi_day2 = p.multi_day) === null || _p$multi_day2 === void 0 ? void 0 : _p$multi_day2.end).add(1, 'day');
|
|
1018
|
-
var duration = (endDate === null || endDate === void 0 ? void 0 : endDate.diff(startDate, 'day')) || 1;
|
|
1019
|
-
return {
|
|
1020
|
-
total: Number(p === null || p === void 0 ? void 0 : p.price),
|
|
1021
|
-
origin_total: Number(p === null || p === void 0 ? void 0 : p.price),
|
|
1022
|
-
num: duration,
|
|
1023
|
-
quotation_id: (p === null || p === void 0 ? void 0 : p.quotation_id) || 0,
|
|
1024
|
-
start_date: startDate === null || startDate === void 0 ? void 0 : startDate.format(format),
|
|
1025
|
-
end_date: endDate === null || endDate === void 0 ? void 0 : endDate.format(format)
|
|
1026
|
-
};
|
|
1027
|
-
});
|
|
1028
|
-
return _context2.abrupt("return", {
|
|
1029
|
-
multiDayPrices: multi_day_price,
|
|
1030
|
-
price: Number(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.price) || 0
|
|
1031
|
-
});
|
|
1032
|
-
case 21:
|
|
1033
|
-
_context2.prev = 21;
|
|
1034
|
-
_context2.t0 = _context2["catch"](2);
|
|
1035
|
-
console.log('updateAppointmentServicePrice', _context2.t0);
|
|
1036
|
-
case 24:
|
|
1037
|
-
return _context2.abrupt("return", defaultReturn);
|
|
1038
|
-
case 25:
|
|
1039
|
-
case "end":
|
|
1040
|
-
return _context2.stop();
|
|
1041
|
-
}
|
|
1042
|
-
}, _callee2, null, [[2, 21]]);
|
|
1043
|
-
}));
|
|
1044
|
-
return function updateAppointmentServicePrice(_x4, _x5) {
|
|
1045
|
-
return _ref6.apply(this, arguments);
|
|
1046
|
-
};
|
|
1047
|
-
}();
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* @title: 更新普通商品报价单价格
|
|
1051
|
-
* @description:
|
|
1052
|
-
* @param {any} state
|
|
1053
|
-
* @return {*}
|
|
1054
|
-
* @Author: WangHan
|
|
1055
|
-
* @Date: 2024-12-24 11:32
|
|
1056
|
-
*/
|
|
1057
|
-
export var updateServicePrice = function updateServicePrice(state) {
|
|
1058
|
-
var _state$service7, _newNormalIds;
|
|
1059
|
-
var services = ((_state$service7 = state.service) === null || _state$service7 === void 0 ? void 0 : _state$service7.value) || [];
|
|
1060
|
-
|
|
1061
|
-
// 普通商品
|
|
1062
|
-
var normalServices = services === null || services === void 0 ? void 0 : services.filter(function (item) {
|
|
1063
|
-
return isEventBooking(state) ? true : !appointmentTypes.includes(item.extension_type);
|
|
1064
|
-
});
|
|
1065
|
-
|
|
1066
|
-
// 普通商品ids去重
|
|
1067
|
-
var newNormalIds = normalServices === null || normalServices === void 0 ? void 0 : normalServices.map(function (item) {
|
|
1068
|
-
return (item === null || item === void 0 ? void 0 : item.product_id) || (item === null || item === void 0 ? void 0 : item.id);
|
|
1069
|
-
});
|
|
1070
|
-
|
|
1071
|
-
// ids去重
|
|
1072
|
-
newNormalIds = _toConsumableArray(new Set(newNormalIds));
|
|
1073
|
-
if ((_newNormalIds = newNormalIds) !== null && _newNormalIds !== void 0 && _newNormalIds.length) {
|
|
1074
|
-
return normalServicePrice(newNormalIds, state);
|
|
1075
|
-
}
|
|
1076
|
-
return [];
|
|
1077
|
-
};
|