@pisell/private-materials 3.3.33 → 3.3.35
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Cart/index.js +26 -13
- package/es/components/Sales/Cart/types.d.ts +12 -0
- package/es/components/Sales/Cart/utils.d.ts +23 -0
- package/es/components/Sales/Cart/utils.js +161 -0
- package/es/components/Sales/Checkout/utils.d.ts +9 -1
- package/es/components/Sales/Checkout/utils.js +25 -3
- package/es/components/Sales/Event/Detail.d.ts +2 -0
- package/es/components/Sales/Event/Detail.js +56 -13
- package/es/components/Sales/Event/serve.d.ts +10 -0
- package/es/components/Sales/Event/serve.js +26 -1
- package/es/components/Sales/Summary/utils.js +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +42 -20
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -29
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +156 -53
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
- package/es/components/appointmentBooking/components/Content/index.js +28 -44
- package/es/components/appointmentBooking/components/Content/index.less +23 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.js +5 -5
- package/es/components/appointmentBooking/components/Form/index.js +161 -61
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +47 -61
- package/es/components/appointmentBooking/components/Resource/index.js +102 -119
- package/es/components/appointmentBooking/components/Services/index.js +50 -25
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/context.js +3 -43
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +3 -1
- package/es/components/appointmentBooking/hooks.js +215 -294
- package/es/components/appointmentBooking/utils.d.ts +2 -88
- package/es/components/appointmentBooking/utils.js +63 -325
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/booking/utils.js +19 -11
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +218 -73
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.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/components/BookingOptions.d.ts +3 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/index.js +70 -13
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.js +4 -2
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Cart/index.js +30 -18
- package/lib/components/Sales/Cart/types.d.ts +12 -0
- package/lib/components/Sales/Cart/utils.d.ts +23 -0
- package/lib/components/Sales/Cart/utils.js +149 -0
- package/lib/components/Sales/Checkout/utils.d.ts +9 -1
- package/lib/components/Sales/Checkout/utils.js +18 -4
- package/lib/components/Sales/Event/Detail.d.ts +2 -0
- package/lib/components/Sales/Event/Detail.js +34 -10
- package/lib/components/Sales/Event/serve.d.ts +10 -0
- package/lib/components/Sales/Event/serve.js +5 -2
- package/lib/components/Sales/Summary/utils.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +7 -2
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +10 -34
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +43 -6
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
- package/lib/components/appointmentBooking/components/Content/index.js +28 -42
- package/lib/components/appointmentBooking/components/Content/index.less +23 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Form/index.js +98 -54
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +19 -36
- package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
- package/lib/components/appointmentBooking/components/Services/index.js +18 -10
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/context.js +4 -48
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +3 -1
- package/lib/components/appointmentBooking/hooks.js +62 -142
- package/lib/components/appointmentBooking/utils.d.ts +2 -88
- package/lib/components/appointmentBooking/utils.js +51 -191
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/booking/utils.js +5 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +128 -42
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.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/components/BookingOptions.d.ts +3 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +79 -24
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.js +6 -2
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +0 -1
- 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 +1 -1
- package/package.json +1 -1
- 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/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
|
@@ -101,7 +101,7 @@ export declare function updateLists<T extends Record<string, any>>(list: T[], ke
|
|
|
101
101
|
* @Author: WangHan
|
|
102
102
|
* @Date: 2025-04-27 17:27
|
|
103
103
|
*/
|
|
104
|
-
export declare const updateBookingFormStorage: (bookingForm: any, id: number
|
|
104
|
+
export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
|
|
105
105
|
export declare const Toast: (text: string) => void;
|
|
106
106
|
/**
|
|
107
107
|
* @title: 添加或移除表单步骤
|
|
@@ -111,90 +111,4 @@ export declare const Toast: (text: string) => void;
|
|
|
111
111
|
* @Author: WangHan
|
|
112
112
|
* @Date: 2025-05-06 21:51
|
|
113
113
|
*/
|
|
114
|
-
export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) =>
|
|
115
|
-
export declare const getCartCurrentResourceData: (cart: any, currentKey: any, resources: any[]) => any;
|
|
116
|
-
/**
|
|
117
|
-
* @title: 获取购物车资源列表
|
|
118
|
-
* @description:
|
|
119
|
-
* @return {*}
|
|
120
|
-
* @Author: WangHan
|
|
121
|
-
* @Date: 2025-05-25 13:56
|
|
122
|
-
*/
|
|
123
|
-
export declare const getMultiResources: (cart: any, resourceItem: any, currentKey: string) => any[];
|
|
124
|
-
export declare const getCurrentBoard: (appointmentBooking: any, code: string) => any;
|
|
125
|
-
/**
|
|
126
|
-
* @title:
|
|
127
|
-
* @description: 根据资源code获取资源标题
|
|
128
|
-
* @param {any} appointmentBooking
|
|
129
|
-
* @param {string} code
|
|
130
|
-
* @return {*}
|
|
131
|
-
* @Author: WangHan
|
|
132
|
-
* @Date: 2025-05-24 18:51
|
|
133
|
-
*/
|
|
134
|
-
export declare const getResourceTitle: (appointmentBooking: any, code: string, utils: any, originResource: any) => string;
|
|
135
|
-
/**
|
|
136
|
-
* @title: 监测购物车中是否有没有选择资源的
|
|
137
|
-
* @description:
|
|
138
|
-
* @param {any} carts
|
|
139
|
-
* @return {*}
|
|
140
|
-
* @Author: WangHan
|
|
141
|
-
* @Date: 2025-05-24 18:47
|
|
142
|
-
*/
|
|
143
|
-
export declare const checkAndMarkCartRenderError: (carts: any, appointmentBooking?: any, utils?: any) => {
|
|
144
|
-
hasError: boolean;
|
|
145
|
-
updatedCartList: any;
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* @title: 查表表单步骤插入到哪个步骤的后面的key
|
|
149
|
-
* @description:
|
|
150
|
-
* @param {string} currentKey
|
|
151
|
-
* @param {any} stepList
|
|
152
|
-
* @return {*}
|
|
153
|
-
* @Author: WangHan
|
|
154
|
-
* @Date: 2025-05-24 19:05
|
|
155
|
-
*/
|
|
156
|
-
export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[]) => any;
|
|
157
|
-
/**
|
|
158
|
-
* @title: 监测holder数据
|
|
159
|
-
* @description:
|
|
160
|
-
* @param {any} isFormSubject
|
|
161
|
-
* @param {any} checkAccount
|
|
162
|
-
* @param {any} carts
|
|
163
|
-
* @return {*}
|
|
164
|
-
* @Author: WangHan
|
|
165
|
-
* @Date: 2025-05-24 22:46
|
|
166
|
-
*/
|
|
167
|
-
export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
|
|
168
|
-
hasError: boolean;
|
|
169
|
-
updatedCartList: any[];
|
|
170
|
-
};
|
|
171
|
-
export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
|
|
172
|
-
isRequired: boolean;
|
|
173
|
-
isSystem: boolean;
|
|
174
|
-
isSkip: boolean;
|
|
175
|
-
form_id: number;
|
|
176
|
-
form_code: any;
|
|
177
|
-
cart_id: string;
|
|
178
|
-
resource_form_id: string;
|
|
179
|
-
policy_id: string;
|
|
180
|
-
} | {
|
|
181
|
-
isRequired?: undefined;
|
|
182
|
-
isSystem?: undefined;
|
|
183
|
-
isSkip?: undefined;
|
|
184
|
-
form_id?: undefined;
|
|
185
|
-
form_code?: undefined;
|
|
186
|
-
cart_id?: undefined;
|
|
187
|
-
resource_form_id?: undefined;
|
|
188
|
-
policy_id?: undefined;
|
|
189
|
-
};
|
|
190
|
-
export declare const currentRenderLists: (resources: any[], code: any) => any;
|
|
191
|
-
/**
|
|
192
|
-
* @title: 更新购物车
|
|
193
|
-
* @description:
|
|
194
|
-
* @param {any} carts
|
|
195
|
-
* @param {any} value
|
|
196
|
-
* @return {*}
|
|
197
|
-
* @Author: WangHan
|
|
198
|
-
* @Date: 2025-05-25 23:17
|
|
199
|
-
*/
|
|
200
|
-
export declare const updateCartResources: (item: any, value: any) => any;
|
|
114
|
+
export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
|
|
@@ -396,339 +396,77 @@ export var checkHasFormStep = function checkHasFormStep(_ref2) {
|
|
|
396
396
|
var isNext = false;
|
|
397
397
|
|
|
398
398
|
// 验证资源是否挂接了表单
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
399
|
+
if (hasResourceFormId) {
|
|
400
|
+
var index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 1;
|
|
401
|
+
var description = locales.getText('pisell2.appointment.fill-form');
|
|
402
402
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
// appointmentBooking.addStep({ index, key: 'fill-form', description }, isExist ? 'select-time' : undefined);
|
|
407
|
-
// } else {
|
|
408
|
-
// appointmentBooking.removeStep('fill-form');
|
|
409
|
-
// }
|
|
410
|
-
|
|
411
|
-
var stepLists = appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList;
|
|
412
|
-
|
|
413
|
-
// 如果当前是倒数第二步,则进行检测登录和账户信息
|
|
414
|
-
// if (currentStep?.index + 2 === stepLists?.length) {
|
|
415
|
-
// // 检测holder表
|
|
416
|
-
// const _checkHolder = () => {
|
|
417
|
-
// const result = checkHolder({
|
|
418
|
-
// isFormSubject,
|
|
419
|
-
// checkAccount,
|
|
420
|
-
// carts,
|
|
421
|
-
// });
|
|
422
|
-
|
|
423
|
-
// // if (result) {
|
|
424
|
-
// // setCarts(result);
|
|
425
|
-
// // }
|
|
426
|
-
|
|
427
|
-
// if (!!result) return true
|
|
428
|
-
// }
|
|
429
|
-
|
|
430
|
-
// if (!isLogin) {
|
|
431
|
-
// utils.action({
|
|
432
|
-
// type: 'pisell1.login',
|
|
433
|
-
// data: {
|
|
434
|
-
// type: 'plugin'
|
|
435
|
-
// },
|
|
436
|
-
// callback: (status: string) => {
|
|
437
|
-
// if (status === 'success') {
|
|
438
|
-
// if (!isFormSubject) {
|
|
439
|
-
// const user = JSON.parse(utils?.storage?.get('customer') || '{}');
|
|
440
|
-
// const currentUser = formatCustomer(user);
|
|
441
|
-
// const meAccount = accountLists?.find((d: any) => !d?.isGuest);
|
|
442
|
-
// appointmentBooking.setLoginAccount(meAccount?.id, currentUser);
|
|
443
|
-
// } else {
|
|
444
|
-
// getHolders();
|
|
445
|
-
// }
|
|
446
|
-
|
|
447
|
-
// // 如果只有一个资源执行跳过
|
|
448
|
-
// if (isSkip) {
|
|
449
|
-
// isNext = true
|
|
450
|
-
// }
|
|
451
|
-
// }
|
|
452
|
-
// },
|
|
453
|
-
// });
|
|
454
|
-
// } else {
|
|
455
|
-
// isNext = true
|
|
456
|
-
// }
|
|
457
|
-
|
|
458
|
-
// if (isNext && !_checkHolder()) {
|
|
459
|
-
// nextStep()
|
|
460
|
-
// } else {
|
|
461
|
-
// return true
|
|
462
|
-
// }
|
|
463
|
-
// } else {
|
|
464
|
-
// // 如果只有一个资源执行跳过
|
|
465
|
-
// if (isSkip) {
|
|
466
|
-
// nextStep()
|
|
467
|
-
// }
|
|
468
|
-
// }
|
|
469
|
-
};
|
|
470
|
-
export var getCartCurrentResourceData = function getCartCurrentResourceData(cart, currentKey, resources) {
|
|
471
|
-
try {
|
|
472
|
-
var _currentKey$split, _resources$, _cart$_origin, _resourceItem, _resourceItem2;
|
|
473
|
-
// const currentKey = currentStep?.current?.currentKey || ''
|
|
474
|
-
var currentFormId = currentKey === null || currentKey === void 0 || (_currentKey$split = currentKey.split('_@')) === null || _currentKey$split === void 0 || (_currentKey$split = _currentKey$split[1]) === null || _currentKey$split === void 0 ? void 0 : _currentKey$split.split('-');
|
|
475
|
-
var form_id = Number((currentFormId === null || currentFormId === void 0 ? void 0 : currentFormId[0]) || (resources === null || resources === void 0 || (_resources$ = resources[0]) === null || _resources$ === void 0 || (_resources$ = _resources$.resources) === null || _resources$ === void 0 || (_resources$ = _resources$[0]) === null || _resources$ === void 0 ? void 0 : _resources$.id));
|
|
476
|
-
if (!form_id || !resources.length) return;
|
|
477
|
-
var cartId = cart._id;
|
|
478
|
-
var cartOriginResources = ((_cart$_origin = cart._origin) === null || _cart$_origin === void 0 ? void 0 : _cart$_origin.resources) || [];
|
|
479
|
-
|
|
480
|
-
// 3. 找到资源数据中与购物车id匹配的资源数据
|
|
481
|
-
var resourceData = resources.find(function (r) {
|
|
482
|
-
return String(r._id) === String(cartId);
|
|
403
|
+
// 判断是否已经存在选择时间步骤
|
|
404
|
+
var isExist = stepList === null || stepList === void 0 ? void 0 : stepList.some(function (item) {
|
|
405
|
+
return (item === null || item === void 0 ? void 0 : item.key) === 'select-time';
|
|
483
406
|
});
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
});
|
|
490
|
-
if (!resourceItem) return;
|
|
491
|
-
resourceItem = _objectSpread(_objectSpread({}, resourceItem), {}, {
|
|
492
|
-
renderList: ((_resourceItem = resourceItem) === null || _resourceItem === void 0 || (_resourceItem = _resourceItem.renderList) === null || _resourceItem === void 0 ? void 0 : _resourceItem.map(function (r) {
|
|
493
|
-
return _objectSpread(_objectSpread({}, r), {}, {
|
|
494
|
-
label: (r === null || r === void 0 ? void 0 : r.main_field) || (r === null || r === void 0 ? void 0 : r.id)
|
|
495
|
-
});
|
|
496
|
-
})) || []
|
|
497
|
-
});
|
|
498
|
-
|
|
499
|
-
// 5. 在购物车的 _origin.resources 里找到当前资源的 render id
|
|
500
|
-
var cartResource = cartOriginResources.find(function (r) {
|
|
501
|
-
return Number(r.form_id) === form_id;
|
|
502
|
-
});
|
|
503
|
-
|
|
504
|
-
// 6. 在 resourceItem.renderList 里找到 render id 匹配的那一项
|
|
505
|
-
var renderId = (cartResource === null || cartResource === void 0 ? void 0 : cartResource.id) || 0;
|
|
506
|
-
|
|
507
|
-
// 7. renderList 里的 id
|
|
508
|
-
var renderItem = (((_resourceItem2 = resourceItem) === null || _resourceItem2 === void 0 ? void 0 : _resourceItem2.renderList) || []).find(function (r) {
|
|
509
|
-
return Number(r === null || r === void 0 ? void 0 : r.id) === Number(renderId);
|
|
510
|
-
});
|
|
511
|
-
return {
|
|
512
|
-
cartItem: cart,
|
|
513
|
-
resourceItem: _objectSpread(_objectSpread({}, resourceItem), {}, {
|
|
514
|
-
originRenderLists: resourceData.resources
|
|
515
|
-
}),
|
|
516
|
-
renderItem: renderItem
|
|
517
|
-
};
|
|
518
|
-
} catch (error) {
|
|
519
|
-
return cart;
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* @title: 获取购物车资源列表
|
|
525
|
-
* @description:
|
|
526
|
-
* @return {*}
|
|
527
|
-
* @Author: WangHan
|
|
528
|
-
* @Date: 2025-05-25 13:56
|
|
529
|
-
*/
|
|
530
|
-
export var getMultiResources = function getMultiResources(cart, resourceItem, currentKey) {
|
|
531
|
-
var _cart$_origin2;
|
|
532
|
-
if (!resourceItem || !cart) return [];
|
|
533
|
-
var isCurrentResourceStep = currentKey.startsWith('select-resource');
|
|
534
|
-
var resources = (cart === null || cart === void 0 || (_cart$_origin2 = cart._origin) === null || _cart$_origin2 === void 0 ? void 0 : _cart$_origin2.resources) || [];
|
|
535
|
-
// 已选择的资源
|
|
536
|
-
var selectedResources = isCurrentResourceStep ? resources.filter(function (r) {
|
|
537
|
-
return (r === null || r === void 0 ? void 0 : r.form_id) !== (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_id);
|
|
538
|
-
}) : resources;
|
|
539
|
-
selectedResources = selectedResources.map(function (r) {
|
|
540
|
-
return _objectSpread(_objectSpread({}, r), {}, {
|
|
541
|
-
name: (r === null || r === void 0 ? void 0 : r.main_field) || (r === null || r === void 0 ? void 0 : r.id),
|
|
542
|
-
isShowChangeResource: false,
|
|
543
|
-
is_hide_like: true
|
|
544
|
-
});
|
|
545
|
-
});
|
|
546
|
-
var currentResources = resources.find(function (r) {
|
|
547
|
-
return (r === null || r === void 0 ? void 0 : r.form_id) === (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_id);
|
|
548
|
-
});
|
|
549
|
-
// 当前的资源
|
|
550
|
-
var currentResource = isCurrentResourceStep ? {
|
|
551
|
-
allowClearResource: true,
|
|
552
|
-
lists: (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.renderList) || [],
|
|
553
|
-
is_hide_like: true,
|
|
554
|
-
id: currentResources === null || currentResources === void 0 ? void 0 : currentResources.id
|
|
555
|
-
} : {};
|
|
556
|
-
return [].concat(_toConsumableArray(selectedResources), [currentResource]);
|
|
557
|
-
};
|
|
558
|
-
export var getCurrentBoard = function getCurrentBoard(appointmentBooking, code) {
|
|
559
|
-
var _appointmentBoard$res;
|
|
560
|
-
var _ref3 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
|
|
561
|
-
appointmentBoard = _ref3.appointmentBoard;
|
|
562
|
-
var resourceConfig = appointmentBoard === null || appointmentBoard === void 0 || (_appointmentBoard$res = appointmentBoard.resource_tab) === null || _appointmentBoard$res === void 0 ? void 0 : _appointmentBoard$res[code];
|
|
563
|
-
return resourceConfig;
|
|
564
|
-
};
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* @title:
|
|
568
|
-
* @description: 根据资源code获取资源标题
|
|
569
|
-
* @param {any} appointmentBooking
|
|
570
|
-
* @param {string} code
|
|
571
|
-
* @return {*}
|
|
572
|
-
* @Author: WangHan
|
|
573
|
-
* @Date: 2025-05-24 18:51
|
|
574
|
-
*/
|
|
575
|
-
export var getResourceTitle = function getResourceTitle(appointmentBooking, code, utils, originResource) {
|
|
576
|
-
var resourceConfig = getCurrentBoard(appointmentBooking, code);
|
|
577
|
-
var name = '';
|
|
578
|
-
|
|
579
|
-
// 如果存在配置,则使用配置的名称
|
|
580
|
-
if (resourceConfig !== null && resourceConfig !== void 0 && resourceConfig.resource_type_title) {
|
|
581
|
-
name = utils.translation(resourceConfig === null || resourceConfig === void 0 ? void 0 : resourceConfig.resource_type_title);
|
|
407
|
+
appointmentBooking.addStep({
|
|
408
|
+
index: index,
|
|
409
|
+
key: 'fill-form',
|
|
410
|
+
description: description
|
|
411
|
+
}, isExist ? 'select-time' : undefined);
|
|
582
412
|
} else {
|
|
583
|
-
|
|
413
|
+
appointmentBooking.removeStep('fill-form');
|
|
584
414
|
}
|
|
585
|
-
|
|
586
|
-
};
|
|
415
|
+
var stepLists = appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList;
|
|
587
416
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
export var checkAndMarkCartRenderError = function checkAndMarkCartRenderError(carts, appointmentBooking, utils) {
|
|
597
|
-
var hasError = false;
|
|
598
|
-
var updatedCartList = carts === null || carts === void 0 ? void 0 : carts.map(function (cart) {
|
|
599
|
-
var currentResource = cart === null || cart === void 0 ? void 0 : cart.currentSelectedResource;
|
|
600
|
-
if (!(currentResource !== null && currentResource !== void 0 && currentResource.renderItem)) {
|
|
601
|
-
hasError = true;
|
|
602
|
-
var resourceItem = (currentResource === null || currentResource === void 0 ? void 0 : currentResource.resourceItem) || {};
|
|
603
|
-
var name = getResourceTitle(appointmentBooking, resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.code, utils, resourceItem);
|
|
604
|
-
return _objectSpread(_objectSpread({}, cart), {}, {
|
|
605
|
-
isErrorResource: true,
|
|
606
|
-
resourceErrorText: name
|
|
417
|
+
// 如果当前是倒数第二步,则进行检测登录和账户信息
|
|
418
|
+
if ((currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2 === (stepLists === null || stepLists === void 0 ? void 0 : stepLists.length)) {
|
|
419
|
+
// 检测holder表
|
|
420
|
+
var _checkHolder = function _checkHolder() {
|
|
421
|
+
var result = checkHolder({
|
|
422
|
+
isFormSubject: isFormSubject,
|
|
423
|
+
checkAccount: checkAccount,
|
|
424
|
+
carts: carts
|
|
607
425
|
});
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
});
|
|
611
|
-
return {
|
|
612
|
-
hasError: hasError,
|
|
613
|
-
updatedCartList: updatedCartList
|
|
614
|
-
};
|
|
615
|
-
};
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
* @title: 查表表单步骤插入到哪个步骤的后面的key
|
|
619
|
-
* @description:
|
|
620
|
-
* @param {string} currentKey
|
|
621
|
-
* @param {any} stepList
|
|
622
|
-
* @return {*}
|
|
623
|
-
* @Author: WangHan
|
|
624
|
-
* @Date: 2025-05-24 19:05
|
|
625
|
-
*/
|
|
626
|
-
export var getFormInsertBeforeKey = function getFormInsertBeforeKey(currentKey, stepList) {
|
|
627
|
-
// 判断是否第一个资源
|
|
628
|
-
var isFirstResource = currentKey === 'select-resource';
|
|
629
|
-
|
|
630
|
-
// 查找“选择时间”步骤
|
|
631
|
-
var timeStep = stepList.find(function (item) {
|
|
632
|
-
return item.key.startsWith('select-time');
|
|
633
|
-
});
|
|
634
|
-
if (isFirstResource && timeStep) {
|
|
635
|
-
// 插入到选择时间后面
|
|
636
|
-
return timeStep.key;
|
|
637
|
-
} else {
|
|
638
|
-
// 插入到当前资源后面
|
|
639
|
-
return currentKey;
|
|
640
|
-
}
|
|
641
|
-
};
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* @title: 监测holder数据
|
|
645
|
-
* @description:
|
|
646
|
-
* @param {any} isFormSubject
|
|
647
|
-
* @param {any} checkAccount
|
|
648
|
-
* @param {any} carts
|
|
649
|
-
* @return {*}
|
|
650
|
-
* @Author: WangHan
|
|
651
|
-
* @Date: 2025-05-24 22:46
|
|
652
|
-
*/
|
|
653
|
-
export var checkAndGoNext = function checkAndGoNext(isFormSubject, checkAccount, carts) {
|
|
654
|
-
var hasError = false;
|
|
655
|
-
var updatedCartList = _toConsumableArray(carts);
|
|
656
|
-
if (isFormSubject && !checkAccount('holder')) {
|
|
657
|
-
updatedCartList = carts === null || carts === void 0 ? void 0 : carts.map(function (item) {
|
|
658
|
-
if (!(item !== null && item !== void 0 && item.holder_id)) {
|
|
659
|
-
hasError = true;
|
|
660
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
661
|
-
isErrorHolder: true
|
|
662
|
-
});
|
|
426
|
+
if (result) {
|
|
427
|
+
setCarts(result);
|
|
663
428
|
}
|
|
664
|
-
return
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
return {
|
|
668
|
-
hasError: hasError,
|
|
669
|
-
updatedCartList: updatedCartList
|
|
670
|
-
};
|
|
671
|
-
};
|
|
672
|
-
export var currentAppointmentBoard = function currentAppointmentBoard(currentKey, resources, appointmentBooking) {
|
|
673
|
-
try {
|
|
674
|
-
var _currentKey$split2, _resources$2, _resources$3, _appointmentBooking$o;
|
|
675
|
-
var currentStepKey = currentKey === null || currentKey === void 0 || (_currentKey$split2 = currentKey.split('_@')) === null || _currentKey$split2 === void 0 || (_currentKey$split2 = _currentKey$split2[1]) === null || _currentKey$split2 === void 0 ? void 0 : _currentKey$split2.split('-');
|
|
676
|
-
var form_id = Number((currentStepKey === null || currentStepKey === void 0 ? void 0 : currentStepKey[0]) || (resources === null || resources === void 0 || (_resources$2 = resources[0]) === null || _resources$2 === void 0 || (_resources$2 = _resources$2.resources) === null || _resources$2 === void 0 || (_resources$2 = _resources$2[0]) === null || _resources$2 === void 0 ? void 0 : _resources$2.id));
|
|
677
|
-
var form_code = (currentStepKey === null || currentStepKey === void 0 ? void 0 : currentStepKey[1]) || (resources === null || resources === void 0 || (_resources$3 = resources[0]) === null || _resources$3 === void 0 || (_resources$3 = _resources$3.resources) === null || _resources$3 === void 0 || (_resources$3 = _resources$3[0]) === null || _resources$3 === void 0 ? void 0 : _resources$3.code);
|
|
678
|
-
var cart_id = currentStepKey === null || currentStepKey === void 0 ? void 0 : currentStepKey[2];
|
|
679
|
-
var resource_form_id = currentStepKey === null || currentStepKey === void 0 ? void 0 : currentStepKey[3];
|
|
680
|
-
var policy_id = currentStepKey === null || currentStepKey === void 0 ? void 0 : currentStepKey[4];
|
|
681
|
-
var resource_tab = appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.appointmentBoard) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.resource_tab;
|
|
682
|
-
var config = resource_tab === null || resource_tab === void 0 ? void 0 : resource_tab[form_code];
|
|
683
|
-
var isRequired = (config === null || config === void 0 ? void 0 : config.customer_resource) === 'customer_resource_required';
|
|
684
|
-
var isSystem = (config === null || config === void 0 ? void 0 : config.customer_resource) === 'customer_resource_system';
|
|
685
|
-
var isSkip = config !== null && config !== void 0 && config.hasOwnProperty('resource_skip_select') ? !!(config !== null && config !== void 0 && config.resource_skip_select) : true;
|
|
686
|
-
return {
|
|
687
|
-
isRequired: isRequired,
|
|
688
|
-
isSystem: isSystem,
|
|
689
|
-
isSkip: isSkip,
|
|
690
|
-
form_id: form_id,
|
|
691
|
-
form_code: form_code,
|
|
692
|
-
cart_id: cart_id,
|
|
693
|
-
resource_form_id: resource_form_id,
|
|
694
|
-
policy_id: policy_id
|
|
429
|
+
if (!!result) return true;
|
|
695
430
|
};
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
431
|
+
if (!isLogin) {
|
|
432
|
+
utils.action({
|
|
433
|
+
type: 'pisell1.login',
|
|
434
|
+
data: {
|
|
435
|
+
type: 'plugin'
|
|
436
|
+
},
|
|
437
|
+
callback: function callback(status) {
|
|
438
|
+
if (status === 'success') {
|
|
439
|
+
if (!isFormSubject) {
|
|
440
|
+
var _utils$storage2;
|
|
441
|
+
var user = JSON.parse((utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('customer')) || '{}');
|
|
442
|
+
var currentUser = formatCustomer(user);
|
|
443
|
+
var meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
|
|
444
|
+
return !(d !== null && d !== void 0 && d.isGuest);
|
|
445
|
+
});
|
|
446
|
+
appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
|
|
447
|
+
} else {
|
|
448
|
+
getHolders();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// 如果只有一个资源执行跳过
|
|
452
|
+
if (isSkip) {
|
|
453
|
+
isNext = true;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
} else {
|
|
459
|
+
isNext = true;
|
|
460
|
+
}
|
|
461
|
+
if (isNext && !_checkHolder()) {
|
|
462
|
+
nextStep();
|
|
463
|
+
} else {
|
|
464
|
+
return true;
|
|
465
|
+
}
|
|
730
466
|
} else {
|
|
731
|
-
|
|
467
|
+
// 如果只有一个资源执行跳过
|
|
468
|
+
if (isSkip) {
|
|
469
|
+
nextStep();
|
|
470
|
+
}
|
|
732
471
|
}
|
|
733
|
-
return newResource || [];
|
|
734
472
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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 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; }
|
|
3
|
+
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; }
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|
|
@@ -6,7 +6,7 @@ import CollapsibleList from "../../collapsibleList";
|
|
|
6
6
|
import { renderBundles } from "../../collapsibleList/utils";
|
|
7
7
|
import "./index.less";
|
|
8
8
|
var SelectProductItem = function SelectProductItem(_ref) {
|
|
9
|
-
var _item$_extend, _item$_extend2;
|
|
9
|
+
var _item$_extend, _item$_extend$other, _item$_extend2, _item$_extend2$other;
|
|
10
10
|
var item = _ref.item,
|
|
11
11
|
_onClick = _ref.onClick,
|
|
12
12
|
onChangeQuantity = _ref.onChangeQuantity,
|
|
@@ -28,7 +28,7 @@ var SelectProductItem = function SelectProductItem(_ref) {
|
|
|
28
28
|
style: style,
|
|
29
29
|
className: classNames("server-select-product", className),
|
|
30
30
|
onClick: function onClick() {
|
|
31
|
-
_onClick === null || _onClick === void 0
|
|
31
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(item);
|
|
32
32
|
}
|
|
33
33
|
}, item.cover ? /*#__PURE__*/React.createElement("img", {
|
|
34
34
|
src: image.ali(item.cover, 100),
|
|
@@ -39,11 +39,11 @@ var SelectProductItem = function SelectProductItem(_ref) {
|
|
|
39
39
|
className: "server-select-product-title"
|
|
40
40
|
}, item.title), /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: "server-select-product-subtitle"
|
|
42
|
-
}, item.subtitle || ""), (((_item$_extend = item._extend) === null || _item$_extend === void 0
|
|
42
|
+
}, item.subtitle || ""), (((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : (_item$_extend$other = _item$_extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle) || []).length ? /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
43
43
|
style: {
|
|
44
44
|
width: "100%"
|
|
45
45
|
},
|
|
46
|
-
list: ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0
|
|
46
|
+
list: ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : (_item$_extend2$other = _item$_extend2.other) === null || _item$_extend2$other === void 0 ? void 0 : _item$_extend2$other.bundle) || [],
|
|
47
47
|
renderItem: function renderItem(item) {
|
|
48
48
|
return renderBundles(item, amountSymbol);
|
|
49
49
|
}
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
2
|
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."); }
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
|
|
8
8
|
import classNames from "classnames";
|
|
@@ -13,10 +13,6 @@ import "./index.less";
|
|
|
13
13
|
|
|
14
14
|
// tabs 子组件定义
|
|
15
15
|
|
|
16
|
-
// 定义主键类型
|
|
17
|
-
|
|
18
|
-
// Tabs 可传递的参数
|
|
19
|
-
|
|
20
16
|
var Tabs = function Tabs(_ref, ref) {
|
|
21
17
|
var renderTab = _ref.renderTab,
|
|
22
18
|
rowKey = _ref.rowKey,
|
|
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
|
|
|
29
29
|
onChange: function onChange(e) {
|
|
30
30
|
var _resetProps$onChange;
|
|
31
31
|
e.persist();
|
|
32
|
-
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0
|
|
32
|
+
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
|
|
33
33
|
}
|
|
34
34
|
}), _options);
|
|
35
35
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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 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; }
|
|
3
|
+
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; }
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|