@pisell/private-materials 3.3.43 → 3.3.44
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.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -25
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +31 -16
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +39 -20
- package/es/components/appointmentBooking/components/Date/index.js +2 -13
- 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/Form/index.js +76 -167
- package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/es/components/appointmentBooking/components/Form/utils.js +36 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +78 -46
- package/es/components/appointmentBooking/components/Resource/index.js +92 -115
- package/es/components/appointmentBooking/components/Services/index.js +19 -4
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +20 -27
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/context.js +50 -3
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +1 -2
- package/es/components/appointmentBooking/hooks.js +377 -269
- package/es/components/appointmentBooking/utils.d.ts +91 -2
- package/es/components/appointmentBooking/utils.js +350 -61
- package/es/components/booking/components/footer/amount.d.ts +24 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +11 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -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/service2/utils.d.ts +244 -0
- package/es/components/booking/info/utils.d.ts +50 -0
- package/es/components/booking/info2/service/addService/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/index.d.ts +7 -0
- 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/utils.d.ts +172 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.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/Event/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/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/Resource/index.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 +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +11 -7
- package/es/components/productSelect/components/productGroup/index.js +32 -19
- package/es/components/productSelect/components/productGroup/index.less +17 -3
- package/es/components/productSelect/index.d.ts +3 -2
- package/es/components/productSelect/index.js +20 -6
- package/es/components/productSelect/index.less +7 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/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/shoppingCart/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +11 -3
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +14 -0
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +0 -5
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +35 -16
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +37 -21
- package/lib/components/appointmentBooking/components/Date/index.js +0 -6
- 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 +56 -108
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/lib/components/appointmentBooking/components/Form/utils.js +49 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +49 -19
- package/lib/components/appointmentBooking/components/Resource/index.js +51 -69
- package/lib/components/appointmentBooking/components/Services/index.js +16 -3
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -7
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/context.js +52 -4
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +1 -2
- package/lib/components/appointmentBooking/hooks.js +153 -57
- package/lib/components/appointmentBooking/utils.d.ts +91 -2
- package/lib/components/appointmentBooking/utils.js +210 -50
- package/lib/components/booking/components/footer/amount.d.ts +24 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +11 -0
- 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/service2/utils.d.ts +244 -0
- package/lib/components/booking/info/utils.d.ts +50 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
- 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/utils.d.ts +172 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.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/Event/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/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/Resource/index.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 +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/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/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/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/productGroup/index.d.ts +11 -7
- package/lib/components/productSelect/components/productGroup/index.js +12 -10
- package/lib/components/productSelect/components/productGroup/index.less +17 -3
- package/lib/components/productSelect/index.d.ts +3 -2
- package/lib/components/productSelect/index.js +17 -3
- package/lib/components/productSelect/index.less +7 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/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/shoppingCart/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +14 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lowcode/product-select/meta.ts +18 -34
- package/package.json +2 -2
|
@@ -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, newData: any) => any;
|
|
104
|
+
export declare const updateBookingFormStorage: (bookingForm: any, id: number | string, newData: any) => any;
|
|
105
105
|
export declare const Toast: (text: string) => void;
|
|
106
106
|
/**
|
|
107
107
|
* @title: 添加或移除表单步骤
|
|
@@ -111,4 +111,93 @@ 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: ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) =>
|
|
114
|
+
export declare const checkHasFormStep: ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => void;
|
|
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, currentSelectedResource: 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
|
+
hasError?: undefined;
|
|
148
|
+
updatedCartList?: undefined;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* @title: 查表表单步骤插入到哪个步骤的后面的key
|
|
152
|
+
* @description:
|
|
153
|
+
* @param {string} currentKey
|
|
154
|
+
* @param {any} stepList
|
|
155
|
+
* @return {*}
|
|
156
|
+
* @Author: WangHan
|
|
157
|
+
* @Date: 2025-05-24 19:05
|
|
158
|
+
*/
|
|
159
|
+
export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[]) => any;
|
|
160
|
+
/**
|
|
161
|
+
* @title: 监测holder数据
|
|
162
|
+
* @description:
|
|
163
|
+
* @param {any} isFormSubject
|
|
164
|
+
* @param {any} checkAccount
|
|
165
|
+
* @param {any} carts
|
|
166
|
+
* @return {*}
|
|
167
|
+
* @Author: WangHan
|
|
168
|
+
* @Date: 2025-05-24 22:46
|
|
169
|
+
*/
|
|
170
|
+
export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
|
|
171
|
+
hasError: boolean;
|
|
172
|
+
updatedCartList: any[];
|
|
173
|
+
};
|
|
174
|
+
export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
|
|
175
|
+
isRequired: boolean;
|
|
176
|
+
isSystem: boolean;
|
|
177
|
+
isSkip: boolean;
|
|
178
|
+
form_id: number;
|
|
179
|
+
form_code: any;
|
|
180
|
+
cart_id: string;
|
|
181
|
+
resource_form_id: string;
|
|
182
|
+
policy_id: string;
|
|
183
|
+
} | {
|
|
184
|
+
isRequired?: undefined;
|
|
185
|
+
isSystem?: undefined;
|
|
186
|
+
isSkip?: undefined;
|
|
187
|
+
form_id?: undefined;
|
|
188
|
+
form_code?: undefined;
|
|
189
|
+
cart_id?: undefined;
|
|
190
|
+
resource_form_id?: undefined;
|
|
191
|
+
policy_id?: undefined;
|
|
192
|
+
};
|
|
193
|
+
export declare const currentRenderLists: (resources: any[], code: any) => any;
|
|
194
|
+
/**
|
|
195
|
+
* @title: 更新购物车
|
|
196
|
+
* @description:
|
|
197
|
+
* @param {any} carts
|
|
198
|
+
* @param {any} value
|
|
199
|
+
* @return {*}
|
|
200
|
+
* @Author: WangHan
|
|
201
|
+
* @Date: 2025-05-25 23:17
|
|
202
|
+
*/
|
|
203
|
+
export declare const updateCartResources: (item: any, value?: any, currentSelectedResources?: any) => any;
|
|
@@ -20,7 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
Toast: () => Toast,
|
|
23
|
+
checkAndGoNext: () => checkAndGoNext,
|
|
24
|
+
checkAndMarkCartRenderError: () => checkAndMarkCartRenderError,
|
|
23
25
|
checkHasFormStep: () => checkHasFormStep,
|
|
26
|
+
currentAppointmentBoard: () => currentAppointmentBoard,
|
|
27
|
+
currentRenderLists: () => currentRenderLists,
|
|
24
28
|
formatCarts: () => formatCarts,
|
|
25
29
|
formatCartsResources: () => formatCartsResources,
|
|
26
30
|
formatCurrentUser: () => formatCurrentUser,
|
|
@@ -28,13 +32,19 @@ __export(utils_exports, {
|
|
|
28
32
|
formatForms: () => formatForms,
|
|
29
33
|
formatGuest: () => formatGuest,
|
|
30
34
|
formatHolder: () => formatHolder,
|
|
35
|
+
getCartCurrentResourceData: () => getCartCurrentResourceData,
|
|
36
|
+
getCurrentBoard: () => getCurrentBoard,
|
|
31
37
|
getCustomer: () => getCustomer,
|
|
38
|
+
getFormInsertBeforeKey: () => getFormInsertBeforeKey,
|
|
32
39
|
getMeAccount: () => getMeAccount,
|
|
40
|
+
getMultiResources: () => getMultiResources,
|
|
33
41
|
getPunctuationMark: () => getPunctuationMark,
|
|
42
|
+
getResourceTitle: () => getResourceTitle,
|
|
34
43
|
hasResourceFormId: () => hasResourceFormId,
|
|
35
44
|
openForm: () => openForm,
|
|
36
45
|
sortResources: () => sortResources,
|
|
37
46
|
updateBookingFormStorage: () => updateBookingFormStorage,
|
|
47
|
+
updateCartResources: () => updateCartResources,
|
|
38
48
|
updateLists: () => updateLists
|
|
39
49
|
});
|
|
40
50
|
module.exports = __toCommonJS(utils_exports);
|
|
@@ -276,69 +286,213 @@ var Toast = (text) => {
|
|
|
276
286
|
var checkHasFormStep = ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
|
|
277
287
|
var _a, _b, _c;
|
|
278
288
|
let isNext = false;
|
|
279
|
-
if (hasResourceFormId2) {
|
|
280
|
-
const index = (currentStep == null ? void 0 : currentStep.index) + 1;
|
|
281
|
-
const description = locales2.getText("pisell2.appointment.fill-form");
|
|
282
|
-
const isExist = stepList == null ? void 0 : stepList.some((item) => (item == null ? void 0 : item.key) === "select-time");
|
|
283
|
-
appointmentBooking.addStep({ index, key: "fill-form", description }, isExist ? "select-time" : void 0);
|
|
284
|
-
} else {
|
|
285
|
-
appointmentBooking.removeStep("fill-form");
|
|
286
|
-
}
|
|
287
289
|
const stepLists = (_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
290
|
+
};
|
|
291
|
+
var getCartCurrentResourceData = (cart, currentKey, resources) => {
|
|
292
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
293
|
+
try {
|
|
294
|
+
const currentFormId = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
|
|
295
|
+
const form_id = Number((currentFormId == null ? void 0 : currentFormId[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
|
|
296
|
+
if (!form_id || !resources.length) return;
|
|
297
|
+
const cartId = cart._id;
|
|
298
|
+
const cartOriginResources = ((_f = cart._origin) == null ? void 0 : _f.resources) || [];
|
|
299
|
+
const resourceData = resources.find((r) => String(r._id) === String(cartId));
|
|
300
|
+
if (!resourceData) return;
|
|
301
|
+
let resourceItem = (resourceData.resources || []).find((r) => Number(r.id) === form_id);
|
|
302
|
+
if (!resourceItem) return;
|
|
303
|
+
resourceItem = {
|
|
304
|
+
...resourceItem,
|
|
305
|
+
renderList: ((_g = resourceItem == null ? void 0 : resourceItem.renderList) == null ? void 0 : _g.map((r) => {
|
|
306
|
+
return {
|
|
307
|
+
...r,
|
|
308
|
+
label: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id)
|
|
309
|
+
};
|
|
310
|
+
})) || []
|
|
300
311
|
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
312
|
+
const cartResource = cartOriginResources.find((r) => Number(r.form_id) === form_id);
|
|
313
|
+
const renderId = (cartResource == null ? void 0 : cartResource.id) || 0;
|
|
314
|
+
const renderItem = ((resourceItem == null ? void 0 : resourceItem.renderList) || []).find((r) => Number(r == null ? void 0 : r.id) === Number(renderId));
|
|
315
|
+
return {
|
|
316
|
+
cartItem: cart,
|
|
317
|
+
resourceItem: {
|
|
318
|
+
...resourceItem,
|
|
319
|
+
originRenderLists: resourceData.resources
|
|
320
|
+
},
|
|
321
|
+
renderItem
|
|
322
|
+
};
|
|
323
|
+
} catch (error) {
|
|
324
|
+
return cart;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
var getMultiResources = (cart, currentSelectedResource, currentKey) => {
|
|
328
|
+
var _a;
|
|
329
|
+
const resourceItem = currentSelectedResource == null ? void 0 : currentSelectedResource.resourceItem;
|
|
330
|
+
if (!resourceItem || !cart) return [];
|
|
331
|
+
const isCurrentResourceStep = currentKey.startsWith("select-resource");
|
|
332
|
+
let resources = ((_a = cart == null ? void 0 : cart._origin) == null ? void 0 : _a.resources) || [];
|
|
333
|
+
let selectedResources = isCurrentResourceStep ? resources.filter((r) => (r == null ? void 0 : r.form_id) !== (resourceItem == null ? void 0 : resourceItem.form_id)) : resources;
|
|
334
|
+
selectedResources = selectedResources.map((r) => {
|
|
335
|
+
return {
|
|
336
|
+
...r,
|
|
337
|
+
name: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id),
|
|
338
|
+
isShowChangeResource: false,
|
|
339
|
+
is_hide_like: true
|
|
340
|
+
};
|
|
341
|
+
});
|
|
342
|
+
let currentResources = resources.find((r) => (r == null ? void 0 : r.form_id) === (resourceItem == null ? void 0 : resourceItem.form_id));
|
|
343
|
+
const errorTip = (currentSelectedResource == null ? void 0 : currentSelectedResource.errorTip) || {};
|
|
344
|
+
let currentResource = isCurrentResourceStep ? [{
|
|
345
|
+
allowClearResource: true,
|
|
346
|
+
lists: (resourceItem == null ? void 0 : resourceItem.renderList) || [],
|
|
347
|
+
is_hide_like: true,
|
|
348
|
+
id: currentResources == null ? void 0 : currentResources.id,
|
|
349
|
+
isErrorResource: (errorTip == null ? void 0 : errorTip.isErrorResource) || false,
|
|
350
|
+
resourceErrorText: (errorTip == null ? void 0 : errorTip.resourceErrorText) || ""
|
|
351
|
+
}] : [];
|
|
352
|
+
return [...selectedResources, ...currentResource];
|
|
353
|
+
};
|
|
354
|
+
var getCurrentBoard = (appointmentBooking, code) => {
|
|
355
|
+
var _a;
|
|
356
|
+
const { appointmentBoard } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
357
|
+
const resourceConfig = (_a = appointmentBoard == null ? void 0 : appointmentBoard.resource_tab) == null ? void 0 : _a[code];
|
|
358
|
+
return resourceConfig;
|
|
359
|
+
};
|
|
360
|
+
var getResourceTitle = (appointmentBooking, code, utils, originResource) => {
|
|
361
|
+
const resourceConfig = getCurrentBoard(appointmentBooking, code);
|
|
362
|
+
let name = "";
|
|
363
|
+
if (resourceConfig == null ? void 0 : resourceConfig.resource_type_title) {
|
|
364
|
+
name = utils.translation(resourceConfig == null ? void 0 : resourceConfig.resource_type_title);
|
|
365
|
+
} else {
|
|
366
|
+
name = (originResource == null ? void 0 : originResource.title) || "";
|
|
367
|
+
}
|
|
368
|
+
return name;
|
|
369
|
+
};
|
|
370
|
+
var checkAndMarkCartRenderError = (carts, appointmentBooking, utils) => {
|
|
371
|
+
try {
|
|
372
|
+
let hasError = false;
|
|
373
|
+
const updatedCartList = carts == null ? void 0 : carts.map((cart) => {
|
|
374
|
+
const currentResource = cart == null ? void 0 : cart.currentSelectedResource;
|
|
375
|
+
if (!(currentResource == null ? void 0 : currentResource.renderItem)) {
|
|
376
|
+
hasError = true;
|
|
377
|
+
const resourceItem = (currentResource == null ? void 0 : currentResource.resourceItem) || {};
|
|
378
|
+
const name = getResourceTitle(appointmentBooking, resourceItem == null ? void 0 : resourceItem.code, utils, resourceItem);
|
|
379
|
+
return {
|
|
380
|
+
...cart,
|
|
381
|
+
currentSelectedResource: {
|
|
382
|
+
...currentResource,
|
|
383
|
+
errorTip: {
|
|
384
|
+
isErrorResource: true,
|
|
385
|
+
resourceErrorText: name
|
|
320
386
|
}
|
|
321
387
|
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
return cart;
|
|
391
|
+
});
|
|
392
|
+
return {
|
|
393
|
+
hasError,
|
|
394
|
+
updatedCartList
|
|
395
|
+
};
|
|
396
|
+
} catch (error) {
|
|
397
|
+
return {};
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
var getFormInsertBeforeKey = (currentKey, stepList) => {
|
|
401
|
+
const isFirstResource = currentKey === "select-resource";
|
|
402
|
+
const timeStep = stepList.find((item) => item.key.startsWith("select-time"));
|
|
403
|
+
if (isFirstResource && timeStep) {
|
|
404
|
+
return timeStep.key;
|
|
405
|
+
} else {
|
|
406
|
+
return currentKey;
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
|
|
410
|
+
let hasError = false;
|
|
411
|
+
let updatedCartList = [...carts];
|
|
412
|
+
if (isFormSubject && !checkAccount("holder")) {
|
|
413
|
+
updatedCartList = carts == null ? void 0 : carts.map((item) => {
|
|
414
|
+
if (!(item == null ? void 0 : item.holder_id)) {
|
|
415
|
+
hasError = true;
|
|
416
|
+
return {
|
|
417
|
+
...item,
|
|
418
|
+
isErrorHolder: true
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
return item;
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
hasError,
|
|
426
|
+
updatedCartList
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
|
|
430
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
431
|
+
try {
|
|
432
|
+
const currentStepKey = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
|
|
433
|
+
const form_id = Number((currentStepKey == null ? void 0 : currentStepKey[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
|
|
434
|
+
const form_code = (currentStepKey == null ? void 0 : currentStepKey[1]) || ((_h = (_g = (_f = resources == null ? void 0 : resources[0]) == null ? void 0 : _f.resources) == null ? void 0 : _g[0]) == null ? void 0 : _h.code);
|
|
435
|
+
const cart_id = currentStepKey == null ? void 0 : currentStepKey[2];
|
|
436
|
+
const resource_form_id = currentStepKey == null ? void 0 : currentStepKey[3];
|
|
437
|
+
const policy_id = currentStepKey == null ? void 0 : currentStepKey[4];
|
|
438
|
+
const resource_tab = (_j = (_i = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _i.appointmentBoard) == null ? void 0 : _j.resource_tab;
|
|
439
|
+
const config = resource_tab == null ? void 0 : resource_tab[form_code];
|
|
440
|
+
const isRequired = (config == null ? void 0 : config.customer_resource) === "customer_resource_required";
|
|
441
|
+
const isSystem = (config == null ? void 0 : config.customer_resource) === "customer_resource_system";
|
|
442
|
+
const isSkip = (config == null ? void 0 : config.hasOwnProperty("resource_skip_select")) ? !!(config == null ? void 0 : config.resource_skip_select) : true;
|
|
443
|
+
return {
|
|
444
|
+
isRequired,
|
|
445
|
+
isSystem,
|
|
446
|
+
isSkip,
|
|
447
|
+
form_id,
|
|
448
|
+
form_code,
|
|
449
|
+
cart_id,
|
|
450
|
+
resource_form_id,
|
|
451
|
+
policy_id
|
|
452
|
+
};
|
|
453
|
+
} catch (error) {
|
|
454
|
+
return {};
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
var currentRenderLists = (resources, code) => {
|
|
458
|
+
var _a;
|
|
459
|
+
if (!(resources == null ? void 0 : resources.length) || !code) return [];
|
|
460
|
+
const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
|
|
461
|
+
const currentResource = _resources == null ? void 0 : _resources.find((item) => item.code === code);
|
|
462
|
+
return (currentResource == null ? void 0 : currentResource.renderList) || [];
|
|
463
|
+
};
|
|
464
|
+
var updateCartResources = (item, value, currentSelectedResources) => {
|
|
465
|
+
var _a, _b, _c;
|
|
466
|
+
let newResource = [];
|
|
467
|
+
let resources = ((_a = item == null ? void 0 : item._origin) == null ? void 0 : _a.resources) || [];
|
|
468
|
+
if (value) {
|
|
469
|
+
const currentResourceIndex = resources.findIndex(
|
|
470
|
+
(item2) => item2.form_id === value.form_id
|
|
471
|
+
);
|
|
472
|
+
if (currentResourceIndex > -1) {
|
|
473
|
+
newResource = resources.map(
|
|
474
|
+
(item2) => item2.form_id === value.form_id ? value : item2
|
|
475
|
+
);
|
|
329
476
|
} else {
|
|
330
|
-
|
|
477
|
+
newResource = [...resources, value];
|
|
331
478
|
}
|
|
332
479
|
} else {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
480
|
+
const currentResource = currentSelectedResources == null ? void 0 : currentSelectedResources.find(
|
|
481
|
+
(resource) => (resource == null ? void 0 : resource._id) === (item == null ? void 0 : item._id)
|
|
482
|
+
);
|
|
483
|
+
const form_id = (_c = (_b = currentResource == null ? void 0 : currentResource.currentSelectedResource) == null ? void 0 : _b.renderItem) == null ? void 0 : _c.form_id;
|
|
484
|
+
newResource = resources.filter((item2) => item2.form_id !== form_id);
|
|
336
485
|
}
|
|
486
|
+
return newResource || [];
|
|
337
487
|
};
|
|
338
488
|
// Annotate the CommonJS export names for ESM import in node:
|
|
339
489
|
0 && (module.exports = {
|
|
340
490
|
Toast,
|
|
491
|
+
checkAndGoNext,
|
|
492
|
+
checkAndMarkCartRenderError,
|
|
341
493
|
checkHasFormStep,
|
|
494
|
+
currentAppointmentBoard,
|
|
495
|
+
currentRenderLists,
|
|
342
496
|
formatCarts,
|
|
343
497
|
formatCartsResources,
|
|
344
498
|
formatCurrentUser,
|
|
@@ -346,12 +500,18 @@ var checkHasFormStep = ({ setIsErrorHolder, nextStep, isSkip, checkHolder, check
|
|
|
346
500
|
formatForms,
|
|
347
501
|
formatGuest,
|
|
348
502
|
formatHolder,
|
|
503
|
+
getCartCurrentResourceData,
|
|
504
|
+
getCurrentBoard,
|
|
349
505
|
getCustomer,
|
|
506
|
+
getFormInsertBeforeKey,
|
|
350
507
|
getMeAccount,
|
|
508
|
+
getMultiResources,
|
|
351
509
|
getPunctuationMark,
|
|
510
|
+
getResourceTitle,
|
|
352
511
|
hasResourceFormId,
|
|
353
512
|
openForm,
|
|
354
513
|
sortResources,
|
|
355
514
|
updateBookingFormStorage,
|
|
515
|
+
updateCartResources,
|
|
356
516
|
updateLists
|
|
357
517
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const getRelationDetailsTotal: (relation_details: any) => number;
|
|
2
|
+
export declare const is_price_include_tax: (state: any) => any;
|
|
3
|
+
/**
|
|
4
|
+
* 总金额
|
|
5
|
+
* @param state
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const getSumTotal: (state: any, isEdit: boolean) => {
|
|
9
|
+
productAmount: number;
|
|
10
|
+
duration: string;
|
|
11
|
+
tax: number;
|
|
12
|
+
shopDiscount: number;
|
|
13
|
+
otherAmount: number;
|
|
14
|
+
sumTotalAmount: number;
|
|
15
|
+
paidAmount: number;
|
|
16
|
+
notPaidAmount: number;
|
|
17
|
+
paySurchargeFee: number;
|
|
18
|
+
expectAmount: number;
|
|
19
|
+
actualPaidAmount: number;
|
|
20
|
+
orderPaidAmount: number;
|
|
21
|
+
totalRefundAmount: number;
|
|
22
|
+
dueAmount: number;
|
|
23
|
+
roundingAmount: number;
|
|
24
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PisellDrawerProps } from '../../../components/drawer';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface AddServiceProps {
|
|
4
|
+
onEdit?: any;
|
|
5
|
+
dispatch?: any;
|
|
6
|
+
state?: any;
|
|
7
|
+
drawerProps?: PisellDrawerProps;
|
|
8
|
+
renderMode?: 'current' | 'drawer';
|
|
9
|
+
}
|
|
10
|
+
declare const Info: (props: AddServiceProps) => JSX.Element;
|
|
11
|
+
export default Info;
|