@pisell/private-materials 6.2.20 → 6.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Cart/utils.d.ts +63 -0
- package/es/components/Sales/Checkout/index.d.ts +37 -0
- package/es/components/Sales/Checkout/serve.d.ts +15 -0
- package/es/components/Sales/Customer/index.d.ts +25 -0
- package/es/components/Sales/Event/Detail.d.ts +30 -0
- package/es/components/Sales/Event/serve.d.ts +49 -0
- package/es/components/Sales/Summary/index.d.ts +35 -0
- package/es/components/Sales/Summary/serve.d.ts +1 -0
- package/es/components/Sales/Summary/utils.d.ts +51 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Content/index.js +19 -12
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +9 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/hooks.d.ts +106 -0
- package/es/components/appointmentBooking/index.d.ts +3 -0
- package/es/components/booking/components/customSelect/index.d.ts +38 -0
- package/es/components/booking/components/customSelect/index.js +0 -1
- package/es/components/booking/components/footer/index.d.ts +11 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/editBookingModal/index.js +58 -29
- package/es/components/booking/editBookingModal/serve.d.ts +1 -0
- package/es/components/booking/editBookingModal/serve.js +19 -11
- package/es/components/booking/hooks/useClearCart.d.ts +2 -0
- package/es/components/booking/hooks/useClearCart.js +8 -11
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
- package/es/components/booking/info/client/index.d.ts +4 -0
- package/es/components/booking/info/client/index.js +2 -3
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
- package/es/components/booking/info/index.d.ts +4 -0
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/Lists.js +26 -36
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/index.js +10 -15
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service2/utils.d.ts +247 -0
- package/es/components/booking/info/service2/utils.js +21 -20
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/index.js +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +11 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/es/components/booking/info2/service/addService/utils.js +4 -7
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/es/components/booking/info2/service/editService/index.js +168 -264
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/service/index.js +15 -19
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +35 -0
- package/es/components/booking/locales.d.ts +828 -0
- package/es/components/booking/materiels/duration/index.d.ts +13 -0
- package/es/components/booking/materiels/duration/index.js +2 -9
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +108 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/const.d.ts +184 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +35 -0
- package/es/components/eftposPay/index.d.ts +4 -0
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/manufacturer.d.ts +7 -0
- package/es/components/eftposPay/pay.d.ts +20 -0
- package/es/components/eftposPay/store/index.d.ts +355 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +3 -0
- package/es/components/eventBooking/locales.d.ts +246 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/pay/toC/locales.d.ts +289 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/index.d.ts +26 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +3 -0
- package/es/components/shoppingCart/components/Cart/Product.js +41 -48
- package/es/components/shoppingCart/components/Cart/index.d.ts +3 -0
- package/es/components/shoppingCart/components/Cart/index.js +18 -21
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -177
- package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/es/components/ticketBooking/components/timeBar/index.js +71 -78
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/ticketBooking/locales.d.ts +174 -0
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/walletList/index.d.ts +28 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/utils/index.d.ts +23 -0
- package/lib/components/Sales/Cart/utils.d.ts +63 -0
- package/lib/components/Sales/Checkout/index.d.ts +37 -0
- package/lib/components/Sales/Checkout/serve.d.ts +15 -0
- package/lib/components/Sales/Customer/index.d.ts +25 -0
- package/lib/components/Sales/Event/Detail.d.ts +30 -0
- package/lib/components/Sales/Event/serve.d.ts +49 -0
- package/lib/components/Sales/Summary/index.d.ts +35 -0
- package/lib/components/Sales/Summary/serve.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +51 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Content/index.js +7 -2
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +9 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/hooks.d.ts +106 -0
- package/lib/components/appointmentBooking/index.d.ts +3 -0
- package/lib/components/booking/components/customSelect/index.d.ts +38 -0
- package/lib/components/booking/components/customSelect/index.js +0 -1
- package/lib/components/booking/components/footer/index.d.ts +11 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/editBookingModal/index.js +56 -21
- package/lib/components/booking/editBookingModal/serve.d.ts +1 -0
- package/lib/components/booking/editBookingModal/serve.js +12 -6
- package/lib/components/booking/hooks/useClearCart.d.ts +2 -0
- package/lib/components/booking/hooks/useClearCart.js +13 -16
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
- package/lib/components/booking/info/client/index.d.ts +4 -0
- package/lib/components/booking/info/client/index.js +4 -5
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
- package/lib/components/booking/info/index.d.ts +4 -0
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/Lists.js +23 -35
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/index.js +1 -7
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service2/utils.d.ts +247 -0
- package/lib/components/booking/info/service2/utils.js +17 -17
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/lib/components/booking/info2/service/addService/utils.js +3 -5
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/lib/components/booking/info2/service/editService/index.js +72 -137
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/service/index.js +9 -13
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +35 -0
- package/lib/components/booking/locales.d.ts +828 -0
- package/lib/components/booking/materiels/duration/index.d.ts +13 -0
- package/lib/components/booking/materiels/duration/index.js +2 -7
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +108 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/const.d.ts +184 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +35 -0
- package/lib/components/eftposPay/index.d.ts +4 -0
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/manufacturer.d.ts +7 -0
- package/lib/components/eftposPay/pay.d.ts +20 -0
- package/lib/components/eftposPay/store/index.d.ts +355 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +3 -0
- package/lib/components/eventBooking/locales.d.ts +246 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/pay/toC/locales.d.ts +289 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/index.d.ts +26 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +3 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
- package/lib/components/shoppingCart/components/Cart/index.d.ts +3 -0
- package/lib/components/shoppingCart/components/Cart/index.js +15 -18
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +127 -145
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/ticketBooking/locales.d.ts +174 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/walletList/index.d.ts +28 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/utils/index.d.ts +23 -0
- package/package.json +3 -3
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.js +0 -3
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.js +0 -31
@@ -0,0 +1,106 @@
|
|
1
|
+
export declare const useAppointmentBooking: () => any;
|
2
|
+
export declare const useShopDiscount: () => any;
|
3
|
+
export declare const contextUtils: () => any;
|
4
|
+
/**
|
5
|
+
* @title: 监听步骤发生变化
|
6
|
+
* @description:
|
7
|
+
* @return {*}
|
8
|
+
* @Author: WangHan
|
9
|
+
* @Date: 2025-04-15 11:11
|
10
|
+
*/
|
11
|
+
export declare const useAppointmentBookingStep: () => {
|
12
|
+
getStepIndex: (type: string, skipNumber?: number) => any;
|
13
|
+
stepList: any;
|
14
|
+
removeStep: (key: string) => any;
|
15
|
+
addStep: (props: any, stepKey?: string) => any;
|
16
|
+
updateStep: (key: string, step: any) => void;
|
17
|
+
nextStep: () => any;
|
18
|
+
};
|
19
|
+
/**
|
20
|
+
* @title: 获取商品数据
|
21
|
+
* @description:
|
22
|
+
* @return {*}
|
23
|
+
* @Author: WangHan
|
24
|
+
* @Date: 2025-04-15 11:12
|
25
|
+
*/
|
26
|
+
export declare const useAppointmentBookingProduct: () => {
|
27
|
+
checkProductType: (productId: number) => Promise<any>;
|
28
|
+
getProducts: () => Promise<any>;
|
29
|
+
};
|
30
|
+
/**
|
31
|
+
* @title: 更新购物车数据
|
32
|
+
* @description:
|
33
|
+
* @return {*}
|
34
|
+
* @Author: WangHan
|
35
|
+
* @Date: 2025-04-15 11:12
|
36
|
+
*/
|
37
|
+
export declare const useAppointmentBookingCart: () => void;
|
38
|
+
/**
|
39
|
+
* @title: 获取登录状态
|
40
|
+
* @description:
|
41
|
+
* @return {*}
|
42
|
+
* @Author: WangHan
|
43
|
+
* @Date: 2025-04-15 11:14
|
44
|
+
*/
|
45
|
+
export declare const useAppointmentBookingLogin: () => {
|
46
|
+
isLogin: boolean;
|
47
|
+
openLoginModal: (params: {
|
48
|
+
callback: any;
|
49
|
+
}) => void;
|
50
|
+
};
|
51
|
+
/**
|
52
|
+
* @title: 获取账户
|
53
|
+
* @description:
|
54
|
+
* @return {*}
|
55
|
+
* @Author: WangHan
|
56
|
+
* @Date: 2025-04-15 11:15
|
57
|
+
*/
|
58
|
+
export declare const useAppointmentBookingAccount: () => {
|
59
|
+
accountLists: any;
|
60
|
+
getHolders: () => Promise<any>;
|
61
|
+
form_id: any;
|
62
|
+
addAccount: (val: any, type?: string) => Promise<any>;
|
63
|
+
checkAccount: (type: any) => any;
|
64
|
+
};
|
65
|
+
/**
|
66
|
+
* @title: 获取资源数据
|
67
|
+
* @description:
|
68
|
+
* @return {*}
|
69
|
+
* @Author: WangHan
|
70
|
+
* @Date: 2025-04-15 11:29
|
71
|
+
*/
|
72
|
+
export declare const useAppointmentBookingResource: () => {
|
73
|
+
getResourceTimeSlot: (index?: number) => Promise<void>;
|
74
|
+
getResourceList: () => {
|
75
|
+
resources: any;
|
76
|
+
resourceCodes: any;
|
77
|
+
};
|
78
|
+
};
|
79
|
+
/**
|
80
|
+
* @title: 是否跳过资源选择步骤
|
81
|
+
* @description:
|
82
|
+
* @return {*}
|
83
|
+
* @Author: WangHan
|
84
|
+
* @Date: 2025-04-21 11:47
|
85
|
+
*/
|
86
|
+
export declare const useIsSkipResourceStep: () => {
|
87
|
+
checkSkipResourceStep: () => Promise<boolean>;
|
88
|
+
};
|
89
|
+
/**
|
90
|
+
* @title: 获取预约配置
|
91
|
+
* @description:
|
92
|
+
* @return {*}
|
93
|
+
* @Author: WangHan
|
94
|
+
* @Date: 2025-04-24 18:15
|
95
|
+
*/
|
96
|
+
export declare const useAppointmentBookingSetting: () => {
|
97
|
+
isDateSelectedFirst: boolean;
|
98
|
+
isFormSubject: boolean;
|
99
|
+
isRetailTemplate: any;
|
100
|
+
customPageId: any;
|
101
|
+
channel: any;
|
102
|
+
bookingSubject: any;
|
103
|
+
setOtherData: (key: string, val: any) => any;
|
104
|
+
getOtherData: (key: string) => any;
|
105
|
+
formName: any;
|
106
|
+
};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.less';
|
3
|
+
interface CustomSelectProps {
|
4
|
+
options: any[];
|
5
|
+
onValueChange: (value: any[]) => void;
|
6
|
+
value: any[];
|
7
|
+
rowKey: string;
|
8
|
+
previewItemRender?: (item: any) => React.ReactNode;
|
9
|
+
previewItemTitleRender?: (item: any, index: number, values: any[]) => React.ReactNode;
|
10
|
+
addButtonRender?: () => React.ReactNode;
|
11
|
+
optionRender: (item: any) => React.ReactNode;
|
12
|
+
addButtonProps?: any;
|
13
|
+
drawerProps?: any;
|
14
|
+
createItemText?: string;
|
15
|
+
loading?: boolean;
|
16
|
+
previewItemClassName?: string;
|
17
|
+
optionClassName?: string;
|
18
|
+
mode?: 'single' | 'multiple' | 'form';
|
19
|
+
filterItem?: (item: any, search: string) => boolean;
|
20
|
+
isPreview?: boolean;
|
21
|
+
name?: string;
|
22
|
+
handleCreateItem?: () => void;
|
23
|
+
handleViewItem?: (item: any) => void;
|
24
|
+
searchChange?: (e: string) => void;
|
25
|
+
loadMore?: any;
|
26
|
+
virtualListHeight?: number;
|
27
|
+
disabled?: boolean;
|
28
|
+
searchValue?: string;
|
29
|
+
onVirtualListScroll?: any;
|
30
|
+
modalOpen?: boolean;
|
31
|
+
closeCallback?: () => any;
|
32
|
+
autoFocus?: boolean;
|
33
|
+
showDropDown?: boolean;
|
34
|
+
handleOpenModal?: () => void;
|
35
|
+
handleDayChange?: (value: any) => void;
|
36
|
+
}
|
37
|
+
declare const _default: React.ForwardRefExoticComponent<CustomSelectProps & React.RefAttributes<unknown>>;
|
38
|
+
export default _default;
|
@@ -74,7 +74,6 @@ var CustomSelect = function CustomSelect(props, ref) {
|
|
74
74
|
showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown,
|
75
75
|
propsHandleOpenModal = props.handleOpenModal,
|
76
76
|
handleDayChange = props.handleDayChange;
|
77
|
-
console.log('custom select');
|
78
77
|
var searchRef = useRef();
|
79
78
|
|
80
79
|
// 当前选择的值
|
@@ -69,8 +69,8 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
69
69
|
});
|
70
70
|
var getInitData = /*#__PURE__*/function () {
|
71
71
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
72
|
-
var _data$toResource;
|
73
|
-
var mockProps, _data, _initResourceVal, toResourceFormId, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx;
|
72
|
+
var _data$fromResource, _data$toResource;
|
73
|
+
var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource;
|
74
74
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
75
75
|
while (1) switch (_context.prev = _context.next) {
|
76
76
|
case 0:
|
@@ -82,20 +82,25 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
82
82
|
setData(_data);
|
83
83
|
|
84
84
|
// 初始预期资源(日历放置点对应的资源)
|
85
|
-
_initResourceVal = _data.childrenBooking._extend.resource; //
|
86
|
-
|
85
|
+
_initResourceVal = _data.childrenBooking._extend.resource; // 源资源所在 from_id
|
86
|
+
fromResourceFormId = (_data$fromResource = _data.fromResource) === null || _data$fromResource === void 0 ? void 0 : _data$fromResource.form_id; // 目标资源所在 form_id
|
87
|
+
toResourceFormId = (_data$toResource = _data.toResource) === null || _data$toResource === void 0 ? void 0 : _data$toResource.form_id; // 若 1. 无资源移入具体资源
|
88
|
+
// 或 2. 具体资源移入无资源
|
89
|
+
// 则其中有一个 form_id 为 0,那么选择不为 0 的那个
|
90
|
+
_form_id = toResourceFormId || fromResourceFormId; // 若 1. 起止资源不同(必有一个不为 ‘no resource’)
|
91
|
+
// 且 2. 能通过目标资源id找到所在资源组
|
87
92
|
// 则查找放置点所对应资源信息
|
88
|
-
if (params.fromResourceId !== params.toResourceId &&
|
93
|
+
if (params.fromResourceId !== params.toResourceId && !!_form_id) {
|
89
94
|
_formatResources = formatResources({
|
90
95
|
cacheItem: _data.childrenBooking,
|
91
96
|
resourcesOrigin: _data.resourcesOrigin
|
92
97
|
}), list = _formatResources.list, maps = _formatResources.maps;
|
93
|
-
currentForm = maps[
|
98
|
+
currentForm = maps[_form_id];
|
94
99
|
relation_id = (_data$toResource2 = _data.toResource) === null || _data$toResource2 === void 0 ? void 0 : _data$toResource2.id;
|
95
|
-
if (currentForm && relation_id) {
|
100
|
+
if (currentForm && (relation_id || relation_id === 0)) {
|
96
101
|
_targetResource = {
|
97
102
|
relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
|
98
|
-
form_id:
|
103
|
+
form_id: _form_id,
|
99
104
|
relation_id: relation_id,
|
100
105
|
like_status: 'common',
|
101
106
|
children: (_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 || (_currentForm$renderLi2 = _currentForm$renderLi2[relation_id]) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2.children,
|
@@ -104,20 +109,31 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
104
109
|
resource_name: (_currentForm$renderLi4 = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.main_field
|
105
110
|
})
|
106
111
|
}; // 同一类型关联多个资源
|
107
|
-
if (Array.isArray(_initResourceVal[
|
108
|
-
_cloned = _toConsumableArray(_initResourceVal[
|
112
|
+
if (Array.isArray(_initResourceVal[_form_id])) {
|
113
|
+
_cloned = _toConsumableArray(_initResourceVal[_form_id]);
|
109
114
|
_idx = _cloned.findIndex(function (rs) {
|
110
|
-
|
115
|
+
var _rs$children;
|
116
|
+
return rs.relation_id == params.fromResourceId || ((_rs$children = rs.children) === null || _rs$children === void 0 ? void 0 : _rs$children.find(function (child) {
|
117
|
+
return child.relation_id == params.fromResourceId;
|
118
|
+
}));
|
111
119
|
});
|
112
120
|
if (_idx !== -1) {
|
113
|
-
|
121
|
+
// 去重: 同一资源类型下,设置了该类型的某个资源 A,以及无资源,当从无资源拖放至 A 上时需要去重
|
122
|
+
_sameResource = _cloned.find(function (_clonedItem) {
|
123
|
+
return _clonedItem.relation_id === (_targetResource === null || _targetResource === void 0 ? void 0 : _targetResource.relation_id);
|
124
|
+
});
|
125
|
+
if (_sameResource) {
|
126
|
+
_cloned.splice(_idx, 1);
|
127
|
+
} else {
|
128
|
+
_cloned[_idx] = _targetResource; // 替换现有对象
|
129
|
+
}
|
114
130
|
} else {
|
115
131
|
_cloned.push(_targetResource); // 添加新对象
|
116
132
|
}
|
117
|
-
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({},
|
133
|
+
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, _cloned));
|
118
134
|
} else {
|
119
135
|
// 单选
|
120
|
-
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({},
|
136
|
+
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, [_targetResource]));
|
121
137
|
}
|
122
138
|
}
|
123
139
|
}
|
@@ -128,7 +144,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
128
144
|
toDate: [dayjs(mockProps.toStartDate), dayjs(mockProps.toEndDate)]
|
129
145
|
});
|
130
146
|
}, 100);
|
131
|
-
case
|
147
|
+
case 11:
|
132
148
|
case "end":
|
133
149
|
return _context.stop();
|
134
150
|
}
|
@@ -218,12 +234,11 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
218
234
|
};
|
219
235
|
var onOk = /*#__PURE__*/function () {
|
220
236
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
221
|
-
var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time;
|
237
|
+
var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time, id, relation_id, like_status, relation_type, is_all, schedule_id, sub_type, select_date, number, metadata;
|
222
238
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
223
239
|
while (1) switch (_context2.prev = _context2.next) {
|
224
240
|
case 0:
|
225
|
-
values = form.getFieldsValue();
|
226
|
-
// return;
|
241
|
+
values = form.getFieldsValue();
|
227
242
|
setUpdating(true);
|
228
243
|
_context2.prev = 2;
|
229
244
|
_data$childrenBooking = data.childrenBooking, _extend = _data$childrenBooking._extend, order_id = _data$childrenBooking.order_id;
|
@@ -231,8 +246,20 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
231
246
|
start_time = values.toDate[0].format('HH:mm');
|
232
247
|
end_date = values.toDate[1].format('YYYY-MM-DD');
|
233
248
|
end_time = values.toDate[1].format('HH:mm');
|
234
|
-
|
235
|
-
|
249
|
+
console.log('extend data', _extend);
|
250
|
+
id = _extend.id, relation_id = _extend.relation_id, like_status = _extend.like_status, relation_type = _extend.relation_type, is_all = _extend.is_all, schedule_id = _extend.schedule_id, sub_type = _extend.sub_type, select_date = _extend.select_date, number = _extend.number, metadata = _extend.metadata;
|
251
|
+
_context2.next = 12;
|
252
|
+
return updateChildBooking(order_id, {
|
253
|
+
id: id,
|
254
|
+
relation_id: relation_id,
|
255
|
+
like_status: like_status,
|
256
|
+
relation_type: relation_type,
|
257
|
+
is_all: is_all,
|
258
|
+
schedule_id: schedule_id,
|
259
|
+
sub_type: sub_type,
|
260
|
+
select_date: select_date,
|
261
|
+
number: number,
|
262
|
+
metadata: metadata,
|
236
263
|
resources: Object.values(values.resource).reduce(function (pre, cur) {
|
237
264
|
var newList = checkResourcesFormat(cur, cacheItem);
|
238
265
|
pre = pre.concat(newList);
|
@@ -243,23 +270,24 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
243
270
|
end_date: end_date,
|
244
271
|
end_time: end_time,
|
245
272
|
duration: values.toDate[1].diff(values.toDate[0], 'minutes')
|
246
|
-
})
|
247
|
-
case
|
248
|
-
|
273
|
+
});
|
274
|
+
case 12:
|
275
|
+
// 清空,防止下次打开时看到残留数据
|
276
|
+
initState();
|
249
277
|
props === null || props === void 0 || props.onOk();
|
250
|
-
_context2.next =
|
278
|
+
_context2.next = 19;
|
251
279
|
break;
|
252
|
-
case
|
253
|
-
_context2.prev =
|
280
|
+
case 16:
|
281
|
+
_context2.prev = 16;
|
254
282
|
_context2.t0 = _context2["catch"](2);
|
255
283
|
console.error(_context2.t0);
|
256
|
-
case
|
284
|
+
case 19:
|
257
285
|
setUpdating(false);
|
258
|
-
case
|
286
|
+
case 20:
|
259
287
|
case "end":
|
260
288
|
return _context2.stop();
|
261
289
|
}
|
262
|
-
}, _callee2, null, [[2,
|
290
|
+
}, _callee2, null, [[2, 16]]);
|
263
291
|
}));
|
264
292
|
return function onOk() {
|
265
293
|
return _ref2.apply(this, arguments);
|
@@ -377,6 +405,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
377
405
|
onClick: onOk,
|
378
406
|
block: true,
|
379
407
|
size: "large",
|
408
|
+
disabled: !data,
|
380
409
|
loading: updating,
|
381
410
|
style: {
|
382
411
|
borderRadius: 20
|
@@ -197,7 +197,8 @@ export var updateResourceErrors = function updateResourceErrors(resourceMaps, ca
|
|
197
197
|
};
|
198
198
|
export var init = /*#__PURE__*/function () {
|
199
199
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
|
200
|
-
var
|
200
|
+
var _childrenBooking$_ext;
|
201
|
+
var toStartDate, toEndDate, event, fromResourceId, toResourceId, bookingOrigin, booking, resources, childrenBooking, fromResource, toResource, extraParams, _eventResources, resourcesOrigin;
|
201
202
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
202
203
|
while (1) switch (_context7.prev = _context7.next) {
|
203
204
|
case 0:
|
@@ -216,19 +217,24 @@ export var init = /*#__PURE__*/function () {
|
|
216
217
|
// 筛选出当前的子预约
|
217
218
|
childrenBooking = getChildrenBookingById(booking.service.value, event.id);
|
218
219
|
console.log('childrenBooking', childrenBooking);
|
219
|
-
|
220
|
-
//
|
220
|
+
fromResource = resources.listMap[fromResourceId];
|
221
|
+
toResource = resources.listMap[toResourceId]; // 默认的资源渲染列表的获取,只会从 product_resource 获取后台配置的资源
|
222
|
+
// 对于没有配置但是有需要被展示的,则需要额外传入
|
221
223
|
extraParams = {
|
222
224
|
extraResources: []
|
223
|
-
};
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
225
|
+
}; // 1. 当某个预约同时设置了A B C 三个资源, 但预约商品本身并未关联B C
|
226
|
+
_eventResources = (_childrenBooking$_ext = childrenBooking._extend) === null || _childrenBooking$_ext === void 0 ? void 0 : _childrenBooking$_ext.event_resources;
|
227
|
+
if (Array.isArray(_eventResources)) {
|
228
|
+
// 简化操作,所有资源全部加入到额外资源中,由接下来的方法内部进行去重
|
229
|
+
_eventResources.forEach(function (item) {
|
230
|
+
extraParams.extraResources.push({
|
231
|
+
id: item.relation_id,
|
232
|
+
form_id: item.form_id
|
233
|
+
});
|
230
234
|
});
|
231
235
|
}
|
236
|
+
|
237
|
+
// 2. 移入未绑定的资源中
|
232
238
|
if (toResource) {
|
233
239
|
extraParams.extraResources.push({
|
234
240
|
form_id: toResource.form_id,
|
@@ -252,10 +258,12 @@ export var init = /*#__PURE__*/function () {
|
|
252
258
|
},
|
253
259
|
// 总资源列表
|
254
260
|
resourcesOrigin: resourcesOrigin,
|
261
|
+
// 源资源
|
262
|
+
fromResource: fromResource,
|
255
263
|
// 目标资源
|
256
264
|
toResource: toResource
|
257
265
|
});
|
258
|
-
case
|
266
|
+
case 18:
|
259
267
|
case "end":
|
260
268
|
return _context7.stop();
|
261
269
|
}
|
@@ -2,12 +2,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
2
2
|
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; }
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
|
-
import React
|
5
|
+
import React from 'react';
|
6
6
|
import classNames from 'classnames';
|
7
7
|
import { Iconfont } from '@pisell/materials';
|
8
8
|
import { locales } from "@pisell/utils";
|
9
9
|
var useClearCart = function useClearCart(state, dispatch) {
|
10
|
-
var _state$
|
10
|
+
var _state$service, _state$service2;
|
11
11
|
var handleClear = function handleClear() {
|
12
12
|
// 清除购物车
|
13
13
|
dispatch({
|
@@ -17,14 +17,11 @@ var useClearCart = function useClearCart(state, dispatch) {
|
|
17
17
|
}
|
18
18
|
});
|
19
19
|
};
|
20
|
-
return
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
type: "pisell2-trash-01"
|
27
|
-
}), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
|
28
|
-
}, [(_state$service3 = state.service) === null || _state$service3 === void 0 || (_state$service3 = _state$service3.value) === null || _state$service3 === void 0 ? void 0 : _state$service3.length, state.channelDisabledEdit]);
|
20
|
+
return !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit && /*#__PURE__*/React.createElement("span", {
|
21
|
+
className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
|
22
|
+
onClick: handleClear
|
23
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
24
|
+
type: "pisell2-trash-01"
|
25
|
+
}), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
|
29
26
|
};
|
30
27
|
export default useClearCart;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useIsBooking4Shop: (state: any) => any;
|
@@ -36,7 +36,7 @@ import { getWaiverTitle } from "../clientVariant/utils";
|
|
36
36
|
import useGetHolderList from "../hooks/useGetHolderList";
|
37
37
|
var isLoadClient = false;
|
38
38
|
var Client = function Client() {
|
39
|
-
var _state$client$value2, _state$
|
39
|
+
var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
|
40
40
|
var modalRef = useRef();
|
41
41
|
var _useState = useState(false),
|
42
42
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -397,7 +397,6 @@ var Client = function Client() {
|
|
397
397
|
}, locales.getText('pisell2.text.load-more'))) : null;
|
398
398
|
}, [loadLoading, params, state.client.clients.length]);
|
399
399
|
var customSelect = useMemo(function () {
|
400
|
-
console.log('render customSelect');
|
401
400
|
return /*#__PURE__*/React.createElement(CustomSelect, {
|
402
401
|
autoFocus: !state.isTerminal,
|
403
402
|
modalOpen: state.modalOpen,
|
@@ -460,7 +459,7 @@ var Client = function Client() {
|
|
460
459
|
return true;
|
461
460
|
}
|
462
461
|
});
|
463
|
-
}, [state
|
462
|
+
}, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
|
464
463
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
465
464
|
className: "pisell-lowcode__booking-client",
|
466
465
|
onClick: function onClick() {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { EditServiceRef } from "../service/editService";
|
2
|
+
declare const useInfoHolder: (state: any, dispatch: any) => {
|
3
|
+
detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
|
4
|
+
handleEdit: (cacheItem: any, type?: string) => void;
|
5
|
+
dispatchService: (type: string, payload: any) => void;
|
6
|
+
handleAction: (dataSource: any) => void;
|
7
|
+
showAddTimeModal: boolean;
|
8
|
+
};
|
9
|
+
export default useInfoHolder;
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
4
4
|
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; }
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
|
-
import { useMemoizedFn } from "ahooks";
|
8
7
|
import { useEffect, useMemo, useRef } from "react";
|
9
8
|
import useHolderConfig from "./useHolderConfig";
|
10
9
|
import { isOpenAddTime } from "../utils";
|
@@ -30,27 +29,21 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
|
|
30
29
|
};
|
31
30
|
}, [state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.information_tab]);
|
32
31
|
var showAddTimeModal = useMemo(function () {
|
33
|
-
return isOpenAddTime(state)
|
32
|
+
return isOpenAddTime(state);
|
34
33
|
}, [state, appointment_card.quick_time]);
|
35
|
-
var handleEdit =
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
// setTimeout(() => {
|
42
|
-
// console.log(performance.now() - window.pp1, '打开商品5');
|
43
|
-
// console.timeEnd('handleEdit')
|
44
|
-
// detailRef.current?.init?.(cacheItem, false, type === 'edit_product');
|
45
|
-
// }, );
|
46
|
-
});
|
34
|
+
var handleEdit = function handleEdit(cacheItem, type) {
|
35
|
+
setTimeout(function () {
|
36
|
+
var _detailRef$current, _detailRef$current$in;
|
37
|
+
(_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
|
38
|
+
}, 100);
|
39
|
+
};
|
47
40
|
var dispatchService = function dispatchService(type, payload) {
|
48
41
|
dispatch({
|
49
42
|
type: type,
|
50
43
|
payload: _objectSpread({}, payload)
|
51
44
|
});
|
52
45
|
};
|
53
|
-
var handleAction =
|
46
|
+
var handleAction = function handleAction(dataSource) {
|
54
47
|
var cacheItem = getProductExtend({
|
55
48
|
cacheItem: _objectSpread(_objectSpread({}, dataSource._origin), {}, {
|
56
49
|
new: 0
|
@@ -64,7 +57,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
|
|
64
57
|
cacheItem: cacheItem
|
65
58
|
}
|
66
59
|
});
|
67
|
-
}
|
60
|
+
};
|
68
61
|
return {
|
69
62
|
detailRef: detailRef,
|
70
63
|
handleEdit: handleEdit,
|