@pisell/private-materials 6.2.15 → 6.2.17
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/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/Sales/Checkout/utils.d.ts +40 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- 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/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/es/components/appointmentBooking/hooks.d.ts +106 -0
- package/es/components/appointmentBooking/index.d.ts +3 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/customSelect/index.js +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -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/forms/table/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.js +11 -8
- 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.js +3 -2
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +16 -9
- package/es/components/booking/info/index.d.ts +4 -0
- package/es/components/booking/info/service/Lists.js +36 -26
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +20 -21
- package/es/components/booking/info/utils.d.ts +50 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/index.js +1 -0
- 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 +6 -3
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +3 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
- package/es/components/booking/info2/service/editService/index.js +258 -165
- package/es/components/booking/info2/service/index.js +19 -15
- package/es/components/booking/locales.d.ts +828 -0
- package/es/components/booking/materiels/duration/index.js +9 -2
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +108 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- 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/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/index.d.ts +26 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.js +48 -41
- package/es/components/shoppingCart/components/Cart/index.js +21 -18
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +177 -157
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +78 -71
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/walletList/index.d.ts +28 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/utils/index.d.ts +23 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/Sales/Checkout/utils.d.ts +40 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- 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/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/lib/components/appointmentBooking/hooks.d.ts +106 -0
- package/lib/components/appointmentBooking/index.d.ts +3 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/customSelect/index.js +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -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/forms/table/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.js +16 -13
- 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.js +5 -4
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +10 -9
- package/lib/components/booking/info/index.d.ts +4 -0
- package/lib/components/booking/info/service/Lists.js +35 -23
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +17 -17
- package/lib/components/booking/info/utils.d.ts +50 -0
- 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 +4 -2
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +3 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
- package/lib/components/booking/info2/service/editService/index.js +132 -70
- package/lib/components/booking/info2/service/index.js +13 -9
- package/lib/components/booking/locales.d.ts +828 -0
- package/lib/components/booking/materiels/duration/index.js +7 -2
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +108 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- 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/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/index.d.ts +26 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +31 -21
- package/lib/components/shoppingCart/components/Cart/index.js +18 -15
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +145 -127
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/walletList/index.d.ts +28 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/utils/index.d.ts +23 -0
- package/package.json +2 -2
@@ -0,0 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* @title: 套餐单规格信息
|
3
|
+
* @description:
|
4
|
+
* @param {any} option
|
5
|
+
* @return {*}
|
6
|
+
* @Author: zhiwei.Wang
|
7
|
+
* @Date: 2024-02-19 09:26
|
8
|
+
*/
|
9
|
+
export declare const formatProductOption: (option: any) => any;
|
10
|
+
/**
|
11
|
+
* @title: 套餐信息
|
12
|
+
* @description:
|
13
|
+
* @param {any} bundle
|
14
|
+
* @return {*}
|
15
|
+
* @Author: zhiwei.Wang
|
16
|
+
* @Date: 2024-02-19 09:26
|
17
|
+
*/
|
18
|
+
export declare const formatProductBundle: (bundle: any) => any;
|
19
|
+
/**
|
20
|
+
* @title: 格式化下单接口数据
|
21
|
+
* @description:
|
22
|
+
* @param {any} state saledModel数据源
|
23
|
+
* @param {boolean} excludeDisabled 是否需要排除购物车中失效商品
|
24
|
+
* @Author: xiangfeng.xue
|
25
|
+
* @Date: 2025-01-21 17:57
|
26
|
+
*/
|
27
|
+
export declare const formatValues: (params: {
|
28
|
+
state: any;
|
29
|
+
platform: 'h5' | 'pc';
|
30
|
+
excludeDisabled?: boolean;
|
31
|
+
extra?: Record<string, any>;
|
32
|
+
}) => any;
|
33
|
+
/**
|
34
|
+
* @title: 获取拉开表单弹窗参数
|
35
|
+
* @param state
|
36
|
+
*/
|
37
|
+
export declare const getFormParams: (state: any) => {
|
38
|
+
product_id: any;
|
39
|
+
appointment_type: string;
|
40
|
+
};
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
30
30
|
* @return {*}
|
31
31
|
* @Author: xiangfeng.xue
|
32
32
|
*/
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
34
34
|
/**
|
35
35
|
* 计算所有价格明细
|
36
36
|
* @param items - 购物车商品数组
|
@@ -0,0 +1,56 @@
|
|
1
|
+
interface CheckLoginParams {
|
2
|
+
isLogin: boolean;
|
3
|
+
openLoginModal: (params: {
|
4
|
+
callback: (status: string) => void;
|
5
|
+
}) => void;
|
6
|
+
isFormSubject: boolean;
|
7
|
+
utils: any;
|
8
|
+
accountLists: any[];
|
9
|
+
appointmentBooking: any;
|
10
|
+
getHolders: () => void;
|
11
|
+
}
|
12
|
+
export declare const checkLogin: ({ isLogin, openLoginModal, isFormSubject, utils, accountLists, appointmentBooking, getHolders, }: CheckLoginParams) => Promise<boolean>;
|
13
|
+
interface CheckHolderParams {
|
14
|
+
isFormSubject: boolean;
|
15
|
+
checkAccount: (type: string) => boolean;
|
16
|
+
carts: any[];
|
17
|
+
}
|
18
|
+
export declare const checkHolder: ({ isFormSubject, checkAccount, carts }: CheckHolderParams) => false | any[];
|
19
|
+
interface CheckResourceParams {
|
20
|
+
carts: any[];
|
21
|
+
resources: any[];
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* @title: 检测资源数据
|
25
|
+
* @description:
|
26
|
+
* @param {CheckResourceParams} param1
|
27
|
+
* @return {*}
|
28
|
+
* @Author: WangHan
|
29
|
+
* @Date: 2025-04-29 18:02
|
30
|
+
*/
|
31
|
+
export declare const checkResource: ({ carts, resources }: CheckResourceParams) => false | any[];
|
32
|
+
interface CheckResourceParams {
|
33
|
+
carts: any[];
|
34
|
+
}
|
35
|
+
export declare type StepKey = 'select-resource' | 'fill-form' | 'select-time' | 'confirm-information' | 'select-service' | 'select-date' | 'select-guest';
|
36
|
+
interface AddHolderParams {
|
37
|
+
res: any;
|
38
|
+
bookingSubject: any;
|
39
|
+
accountLists: any[];
|
40
|
+
cartItem: any;
|
41
|
+
getHolders: () => void;
|
42
|
+
appointmentBooking: any;
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* @title: 添加holder
|
46
|
+
* @description:
|
47
|
+
* @param {any} res
|
48
|
+
* @param {any} bookingSubject
|
49
|
+
* @param {any} accountLists
|
50
|
+
* @param {any} e
|
51
|
+
* @return {*}
|
52
|
+
* @Author: WangHan
|
53
|
+
* @Date: 2025-05-10 18:25
|
54
|
+
*/
|
55
|
+
export declare const handleAddHolder: ({ res, bookingSubject, accountLists, cartItem, getHolders, appointmentBooking }: AddHolderParams) => Promise<any>;
|
56
|
+
export {};
|
@@ -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
|
+
};
|
@@ -74,6 +74,7 @@ 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');
|
77
78
|
var searchRef = useRef();
|
78
79
|
|
79
80
|
// 当前选择的值
|
@@ -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 from 'react';
|
5
|
+
import React, { useMemo } 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$service3;
|
11
11
|
var handleClear = function handleClear() {
|
12
12
|
// 清除购物车
|
13
13
|
dispatch({
|
@@ -17,11 +17,14 @@ var useClearCart = function useClearCart(state, dispatch) {
|
|
17
17
|
}
|
18
18
|
});
|
19
19
|
};
|
20
|
-
return
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
return useMemo(function () {
|
21
|
+
var _state$service, _state$service2;
|
22
|
+
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", {
|
23
|
+
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))),
|
24
|
+
onClick: handleClear
|
25
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
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]);
|
26
29
|
};
|
27
30
|
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$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;
|
39
|
+
var _state$client$value2, _state$client4, _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,6 +397,7 @@ 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');
|
400
401
|
return /*#__PURE__*/React.createElement(CustomSelect, {
|
401
402
|
autoFocus: !state.isTerminal,
|
402
403
|
modalOpen: state.modalOpen,
|
@@ -459,7 +460,7 @@ var Client = function Client() {
|
|
459
460
|
return true;
|
460
461
|
}
|
461
462
|
});
|
462
|
-
}, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
|
463
|
+
}, [state.isTerminal, state.modalOpen, (_state$client4 = state.client) === null || _state$client4 === void 0 ? void 0 : _state$client4.value, state.drawerMask, renderList, loading, franchiseeLoading, params.search, loadMore]);
|
463
464
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
464
465
|
className: "pisell-lowcode__booking-client",
|
465
466
|
onClick: function onClick() {
|
@@ -4,6 +4,7 @@ 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";
|
7
8
|
import { useEffect, useMemo, useRef } from "react";
|
8
9
|
import useHolderConfig from "./useHolderConfig";
|
9
10
|
import { isOpenAddTime } from "../utils";
|
@@ -29,21 +30,27 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
|
|
29
30
|
};
|
30
31
|
}, [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]);
|
31
32
|
var showAddTimeModal = useMemo(function () {
|
32
|
-
return isOpenAddTime(state);
|
33
|
+
return isOpenAddTime(state) && !state.isBookingTicket2;
|
33
34
|
}, [state, appointment_card.quick_time]);
|
34
|
-
var handleEdit = function
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
var handleEdit = useMemoizedFn(function (cacheItem, type) {
|
36
|
+
var _detailRef$current, _detailRef$current$in;
|
37
|
+
// console.timeEnd('handleChange');
|
38
|
+
console.time('handleEdit');
|
39
|
+
console.log(performance.now() - window.pp1, '打开商品4');
|
40
|
+
(_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');
|
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
|
+
});
|
40
47
|
var dispatchService = function dispatchService(type, payload) {
|
41
48
|
dispatch({
|
42
49
|
type: type,
|
43
50
|
payload: _objectSpread({}, payload)
|
44
51
|
});
|
45
52
|
};
|
46
|
-
var handleAction = function
|
53
|
+
var handleAction = useMemoizedFn(function (dataSource) {
|
47
54
|
var cacheItem = getProductExtend({
|
48
55
|
cacheItem: _objectSpread(_objectSpread({}, dataSource._origin), {}, {
|
49
56
|
new: 0
|
@@ -57,7 +64,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
|
|
57
64
|
cacheItem: cacheItem
|
58
65
|
}
|
59
66
|
});
|
60
|
-
};
|
67
|
+
});
|
61
68
|
return {
|
62
69
|
detailRef: detailRef,
|
63
70
|
handleEdit: handleEdit,
|
@@ -14,7 +14,7 @@ import { useMemoizedFn } from 'ahooks';
|
|
14
14
|
import { getProductExtend } from "../../info2/service/addService/utils";
|
15
15
|
import useAddHolder from "../hooks/useAddHolder";
|
16
16
|
var Lists = function Lists(_ref) {
|
17
|
-
var _state$
|
17
|
+
var _state$service2;
|
18
18
|
var onEdit = _ref.onEdit,
|
19
19
|
onChange = _ref.onChange,
|
20
20
|
onAction = _ref.onAction,
|
@@ -36,6 +36,8 @@ var Lists = function Lists(_ref) {
|
|
36
36
|
* @Date: 2024-11-29 16:35
|
37
37
|
*/
|
38
38
|
var handleChange = useMemoizedFn(function (currentItem, type, other) {
|
39
|
+
console.time('handleChange');
|
40
|
+
console.log(window.pp1 = performance.now(), '打开商品');
|
39
41
|
if (state.disabledEdit || state.disableEventBookingEdit) {
|
40
42
|
return;
|
41
43
|
}
|
@@ -59,9 +61,7 @@ var Lists = function Lists(_ref) {
|
|
59
61
|
editModal: true,
|
60
62
|
cacheItem: cacheItem
|
61
63
|
});
|
62
|
-
return onEdit === null || onEdit === void 0 ? void 0 : onEdit(
|
63
|
-
new: 0
|
64
|
-
}), type);
|
64
|
+
return onEdit === null || onEdit === void 0 ? void 0 : onEdit(cacheItem, type);
|
65
65
|
}
|
66
66
|
var params = {
|
67
67
|
editModal: false,
|
@@ -95,27 +95,37 @@ var Lists = function Lists(_ref) {
|
|
95
95
|
isShowEditProduct: !state.isBookingCreatePage
|
96
96
|
};
|
97
97
|
}, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
98
|
+
var products = useMemo(function () {
|
99
|
+
var _state$service;
|
100
|
+
console.time('products');
|
101
|
+
var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource);
|
102
|
+
console.timeEnd('products');
|
103
|
+
return p;
|
104
|
+
}, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value]);
|
105
|
+
return useMemo(function () {
|
106
|
+
console.log('render List');
|
107
|
+
return /*#__PURE__*/React.createElement(CartContext.Provider, {
|
108
|
+
value: {
|
109
|
+
state: state
|
110
|
+
}
|
111
|
+
}, /*#__PURE__*/React.createElement(ShoppingCart, {
|
112
|
+
isParallelResource: isParallelResource,
|
113
|
+
onAction: onAction,
|
114
|
+
onChange: handleChange,
|
115
|
+
isOpenGroup: false,
|
116
|
+
isHideClearCart: true,
|
117
|
+
onAddProduct: function onAddProduct() {
|
118
|
+
return onChange({
|
119
|
+
addModal: true
|
120
|
+
});
|
121
|
+
}
|
122
|
+
// onActiveKey={handleActiveKey}
|
123
|
+
// collapseParams={CollapseParams}
|
124
|
+
,
|
125
|
+
productParams: _objectSpread(_objectSpread({}, productParams), {}, {
|
126
|
+
products: products
|
127
|
+
})
|
128
|
+
}));
|
129
|
+
}, [products, state, productParams]);
|
120
130
|
};
|
121
131
|
export default Lists;
|
@@ -691,29 +691,28 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
691
691
|
_origin: item
|
692
692
|
});
|
693
693
|
};
|
694
|
-
|
695
|
-
// 将商品分为组商品和非组商品
|
696
|
-
lists.forEach(function (item) {
|
697
|
-
var _item$_extend28;
|
698
|
-
if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
|
699
|
-
normalList.push(formItem(item));
|
700
|
-
} else {
|
701
|
-
groupList.push(item);
|
702
|
-
}
|
703
|
-
});
|
704
|
-
|
705
|
-
// 根据item._extend.groupId 进行分组
|
706
|
-
var groups = groupList.reduce(function (prev, item) {
|
707
|
-
var _item$_extend29;
|
708
|
-
var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
|
709
|
-
if (!prev[groupId]) {
|
710
|
-
prev[groupId] = [];
|
711
|
-
}
|
712
|
-
prev[groupId].push(item);
|
713
|
-
return prev;
|
714
|
-
}, {});
|
715
694
|
console.log(normalList, 'normalList');
|
716
695
|
if (isRenderGroup) {
|
696
|
+
// 将商品分为组商品和非组商品
|
697
|
+
lists.forEach(function (item) {
|
698
|
+
var _item$_extend28;
|
699
|
+
if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
|
700
|
+
normalList.push(formItem(item));
|
701
|
+
} else {
|
702
|
+
groupList.push(item);
|
703
|
+
}
|
704
|
+
});
|
705
|
+
|
706
|
+
// 根据item._extend.groupId 进行分组
|
707
|
+
var groups = groupList.reduce(function (prev, item) {
|
708
|
+
var _item$_extend29;
|
709
|
+
var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
|
710
|
+
if (!prev[groupId]) {
|
711
|
+
prev[groupId] = [];
|
712
|
+
}
|
713
|
+
prev[groupId].push(item);
|
714
|
+
return prev;
|
715
|
+
}, {});
|
717
716
|
return Object.values(groups).map(function (d) {
|
718
717
|
return formItem(concatBookings(d));
|
719
718
|
}).concat(normalList);
|