@pisell/private-materials 3.3.16 → 3.3.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.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -16
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +40 -13
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +20 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +67 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +2 -3
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +50 -7
- package/es/components/appointmentBooking/components/Date/index.js +10 -2
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Form/index.js +61 -49
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +5 -4
- package/es/components/appointmentBooking/components/Services/index.js +2 -4
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/context.d.ts +5 -1
- package/es/components/appointmentBooking/context.js +37 -14
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +7 -19
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +196 -193
- package/es/components/appointmentBooking/utils.js +21 -13
- package/es/components/booking/components/customSelect/index.js +2 -0
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +27 -22
- package/es/components/booking/components/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +17 -2
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/forms.d.ts +4 -0
- package/es/components/booking/forms/forms.js +14 -3
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -2
- package/es/components/booking/forms/single/index.js +33 -26
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/client/index.js +24 -3
- package/es/components/booking/info/client/index.less +39 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +10 -1
- package/es/components/booking/info/clientVariant/utils.d.ts +1 -0
- package/es/components/booking/info/clientVariant/utils.js +6 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +17 -2
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +29 -4
- package/es/components/booking/info/clientVariant/vertical/index.less +18 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useAddHolder.d.ts +8 -1
- package/es/components/booking/info/hooks/useAddHolder.js +131 -31
- package/es/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
- package/es/components/booking/info/hooks/useGetHolderList.js +48 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +2 -2
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.js +4 -41
- package/es/components/booking/info/pet/index.js +83 -8
- package/es/components/booking/info/pet/serve.d.ts +1 -0
- package/es/components/booking/info/pet/serve.js +27 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/Lists.js +2 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +2 -0
- package/es/components/booking/info/service2/utils.js +20 -10
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +9 -1
- package/es/components/booking/locales.d.ts +21 -0
- package/es/components/booking/locales.js +42 -3
- package/es/components/booking/utils.js +3 -1
- 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 +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/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/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/shoppingCart/Provider.js +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.js +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -3
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +5 -6
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/index.d.ts +5 -2
- package/es/components/ticketBooking/index.js +20 -5
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -8
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +27 -11
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +20 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +32 -2
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +3 -3
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +26 -1
- package/lib/components/appointmentBooking/components/Date/index.js +4 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Form/index.js +48 -36
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +5 -4
- package/lib/components/appointmentBooking/components/Services/index.js +4 -6
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -4
- package/lib/components/appointmentBooking/context.d.ts +5 -1
- package/lib/components/appointmentBooking/context.js +17 -5
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +1 -12
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +4 -1
- package/lib/components/appointmentBooking/utils.js +19 -13
- package/lib/components/booking/components/customSelect/index.js +2 -0
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +3 -1
- package/lib/components/booking/components/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +16 -1
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/forms.d.ts +4 -0
- package/lib/components/booking/forms/forms.js +13 -3
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -2
- package/lib/components/booking/forms/single/index.js +13 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/client/index.js +20 -3
- package/lib/components/booking/info/client/index.less +39 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +8 -1
- package/lib/components/booking/info/clientVariant/utils.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/utils.js +34 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -3
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
- package/lib/components/booking/info/clientVariant/vertical/index.js +31 -6
- package/lib/components/booking/info/clientVariant/vertical/index.less +18 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useAddHolder.d.ts +8 -1
- package/lib/components/booking/info/hooks/useAddHolder.js +88 -16
- package/lib/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
- package/lib/components/booking/info/hooks/useGetHolderList.js +61 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +2 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.js +2 -21
- package/lib/components/booking/info/pet/index.js +57 -10
- package/lib/components/booking/info/pet/serve.d.ts +1 -0
- package/lib/components/booking/info/pet/serve.js +33 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +2 -0
- package/lib/components/booking/info/service2/utils.js +17 -7
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +8 -1
- package/lib/components/booking/locales.d.ts +21 -0
- package/lib/components/booking/locales.js +42 -3
- package/lib/components/booking/utils.js +3 -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 +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/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/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/shoppingCart/Provider.js +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.js +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +1 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -3
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +4 -3
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.d.ts +5 -2
- package/lib/components/ticketBooking/index.js +13 -4
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lowcode/ticket-booking/meta.ts +26 -0
- package/package.json +2 -2
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "success" | "loading" | "warn" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -303,12 +303,12 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
305
305
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
306
|
+
type?: "unset" | "step" | undefined;
|
|
307
307
|
render?: boolean | undefined;
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -71,7 +71,6 @@ export var CartProvider = function CartProvider(_ref) {
|
|
|
71
71
|
}
|
|
72
72
|
var params = _objectSpread(_objectSpread({}, defaultState), newState);
|
|
73
73
|
var result = _objectSpread(_objectSpread({}, params), formatState(params));
|
|
74
|
-
console.log(result, params, 'result');
|
|
75
74
|
setState(result);
|
|
76
75
|
}, [props === null || props === void 0 ? void 0 : props.platform, props === null || props === void 0 ? void 0 : props.isOpenGroup, props === null || props === void 0 ? void 0 : props.emptyText, props === null || props === void 0 ? void 0 : props.productParams, props === null || props === void 0 ? void 0 : props.collapseParams]);
|
|
77
76
|
return /*#__PURE__*/React.createElement(CartContext.Provider, {
|
|
@@ -39,7 +39,6 @@ var Content = function Content() {
|
|
|
39
39
|
var _holders = holders === null || holders === void 0 ? void 0 : holders.filter(function (item) {
|
|
40
40
|
return (item === null || item === void 0 ? void 0 : item.key) > 0;
|
|
41
41
|
});
|
|
42
|
-
console.log(isEdit, products, _holders, pet, 'wh_holder');
|
|
43
42
|
|
|
44
43
|
// 不是编辑页面,有选择的holder,没有记录的holder,并且有商品数据
|
|
45
44
|
if (_holders !== null && _holders !== void 0 && _holders.length && !(pet !== null && pet !== void 0 && pet.length) && products !== null && products !== void 0 && products.length && !isEdit && platform !== 'h5') {
|
|
@@ -12,13 +12,11 @@ import { locales } from '@pisell/utils';
|
|
|
12
12
|
var useClearCart = function useClearCart(key) {
|
|
13
13
|
var _useContext = useContext(),
|
|
14
14
|
state = _useContext.state,
|
|
15
|
-
updateState = _useContext.updateState,
|
|
16
15
|
onChange = _useContext.onChange;
|
|
17
16
|
var isProductList = state.isProductList,
|
|
18
17
|
disabledEdit = state.disabledEdit,
|
|
19
18
|
holders = state.holders,
|
|
20
19
|
isHideClearCart = state.isHideClearCart;
|
|
21
|
-
console.log(state, 'wh978968');
|
|
22
20
|
/**
|
|
23
21
|
* @title: 清空购物车
|
|
24
22
|
* @description:
|
|
@@ -152,7 +152,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
152
152
|
}();
|
|
153
153
|
var getServices = /*#__PURE__*/function () {
|
|
154
154
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
155
|
-
var _state$eventOtherPara
|
|
155
|
+
var _state$eventOtherPara;
|
|
156
156
|
var data;
|
|
157
157
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
158
158
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -176,9 +176,8 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
176
176
|
return state.apis.getServices(_objectSpread({
|
|
177
177
|
skip: 1,
|
|
178
178
|
num: 500,
|
|
179
|
-
extension_type: state.
|
|
179
|
+
extension_type: state.productExtensionType,
|
|
180
180
|
with: ['category'],
|
|
181
|
-
ids: state.renderType === 'eventBooking' ? (_state$eventOtherPara2 = state.eventOtherParams) === null || _state$eventOtherPara2 === void 0 ? void 0 : _state$eventOtherPara2.productIds : undefined,
|
|
182
181
|
open_quotation: 1,
|
|
183
182
|
with_schedule: 1,
|
|
184
183
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
@@ -206,15 +206,13 @@ var TicketBooking = function TicketBooking() {
|
|
|
206
206
|
var _getBoardConfig = /*#__PURE__*/function () {
|
|
207
207
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
208
208
|
var _data$config;
|
|
209
|
-
var
|
|
209
|
+
var bookingConfigParams, data;
|
|
210
210
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
211
211
|
while (1) switch (_context2.prev = _context2.next) {
|
|
212
212
|
case 0:
|
|
213
|
-
|
|
213
|
+
bookingConfigParams = state.bookingConfigParams; // 获取board设置
|
|
214
214
|
_context2.next = 3;
|
|
215
|
-
return getBookingConfig({
|
|
216
|
-
item_type: renderType === 'eventBooking' ? 'event_booking_v2' : 'appointment_booking'
|
|
217
|
-
});
|
|
215
|
+
return getBookingConfig(_objectSpread({}, bookingConfigParams));
|
|
218
216
|
case 3:
|
|
219
217
|
data = _context2.sent;
|
|
220
218
|
if (data !== null && data !== void 0 && (_data$config = data.config) !== null && _data$config !== void 0 && (_data$config = _data$config.information_tab) !== null && _data$config !== void 0 && (_data$config = _data$config.appointment_card) !== null && _data$config !== void 0 && _data$config.quick_time) {
|
|
@@ -766,7 +764,8 @@ var TicketBooking = function TicketBooking() {
|
|
|
766
764
|
setActiveTab: _setActiveTab,
|
|
767
765
|
addTimeProducts: state.addTimeProducts,
|
|
768
766
|
isBookingCreatePage: true,
|
|
769
|
-
closeAutoOpenService: true
|
|
767
|
+
closeAutoOpenService: true,
|
|
768
|
+
productExtensionType: state.productExtensionType
|
|
770
769
|
}),
|
|
771
770
|
setGlobalState: _setModalState
|
|
772
771
|
})), /*#__PURE__*/React.createElement(TimeBar, {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './index.less';
|
|
3
|
-
|
|
2
|
+
interface TicketBookingProps {
|
|
3
|
+
productExtensionType: string[];
|
|
4
|
+
bookingConfigParams: Record<string, any>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: (props: TicketBookingProps) => JSX.Element;
|
|
4
7
|
export default _default;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
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; }
|
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
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); }
|
|
5
|
-
import React, { useLayoutEffect } from 'react';
|
|
7
|
+
import React, { useLayoutEffect, useMemo, useRef } from 'react';
|
|
6
8
|
import { Provider, createStore } from "./miniRedux";
|
|
7
9
|
import { locales } from '@pisell/utils';
|
|
8
10
|
import dayjs from 'dayjs';
|
|
@@ -122,19 +124,32 @@ var initialState = {
|
|
|
122
124
|
confirmOpen: false,
|
|
123
125
|
createCount: 0,
|
|
124
126
|
verticalAddServiceKey: 0,
|
|
125
|
-
currentProduct: null
|
|
127
|
+
currentProduct: null,
|
|
128
|
+
bookingConfigParams: {
|
|
129
|
+
item_type: 'appointment_booking'
|
|
130
|
+
},
|
|
131
|
+
productExtensionType: ['appointment_ticket', 'session_ticket']
|
|
126
132
|
};
|
|
127
|
-
|
|
128
|
-
export default (function () {
|
|
133
|
+
export default (function (props) {
|
|
129
134
|
var _context$appHelper$ut;
|
|
135
|
+
var productExtensionType = props.productExtensionType,
|
|
136
|
+
bookingConfigParams = props.bookingConfigParams;
|
|
137
|
+
var storeRef = useRef(null);
|
|
130
138
|
var context = useEngineContext();
|
|
131
139
|
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
|
|
132
140
|
useLayoutEffect(function () {
|
|
133
141
|
request.setRequest(context.appHelper.utils.request);
|
|
134
142
|
}, []);
|
|
143
|
+
useMemo(function () {
|
|
144
|
+
var store = createStore(_objectSpread(_objectSpread({}, initialState), {}, {
|
|
145
|
+
bookingConfigParams: bookingConfigParams,
|
|
146
|
+
productExtensionType: productExtensionType
|
|
147
|
+
}));
|
|
148
|
+
storeRef.current = store;
|
|
149
|
+
}, []);
|
|
135
150
|
return /*#__PURE__*/React.createElement("div", {
|
|
136
151
|
className: "pisell-ticket-booking-wrapper"
|
|
137
152
|
}, /*#__PURE__*/React.createElement(MenuBar, null), /*#__PURE__*/React.createElement(Provider, {
|
|
138
|
-
store:
|
|
153
|
+
store: storeRef.current
|
|
139
154
|
}, /*#__PURE__*/React.createElement(TicketBooking, null)));
|
|
140
155
|
});
|
|
@@ -25,7 +25,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
25
25
|
* @return {*}
|
|
26
26
|
* @Author: xiangfeng.xue
|
|
27
27
|
*/
|
|
28
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
|
28
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
|
29
29
|
/**
|
|
30
30
|
* 计算所有价格明细
|
|
31
31
|
* @param items - 购物车商品数组
|
|
@@ -53,18 +53,14 @@ var ContinueButton = ({ onNext }) => {
|
|
|
53
53
|
appointmentBooking,
|
|
54
54
|
setCarts,
|
|
55
55
|
loading,
|
|
56
|
-
setIsErrorHolder
|
|
56
|
+
setIsErrorHolder,
|
|
57
|
+
isLastStep
|
|
57
58
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
58
59
|
const { isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
59
60
|
const stepList = (0, import_react.useMemo)(() => {
|
|
60
61
|
var _a2, _b2, _c2;
|
|
61
62
|
return (_c2 = (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.step) == null ? void 0 : _b2.store) == null ? void 0 : _c2.stepList;
|
|
62
63
|
}, [(_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList]);
|
|
63
|
-
const clearData = () => {
|
|
64
|
-
var _a2;
|
|
65
|
-
appointmentBooking.destroy();
|
|
66
|
-
(_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
|
|
67
|
-
};
|
|
68
64
|
const handleCheckAccount = () => {
|
|
69
65
|
const result = (0, import_utils2.checkHolder)({
|
|
70
66
|
isFormSubject,
|
|
@@ -101,12 +97,12 @@ var ContinueButton = ({ onNext }) => {
|
|
|
101
97
|
}
|
|
102
98
|
};
|
|
103
99
|
const continueText = (0, import_react.useMemo)(() => {
|
|
104
|
-
if (
|
|
100
|
+
if (isLastStep) {
|
|
105
101
|
return import_utils.locales.getText("pisell2.event.checkout");
|
|
106
102
|
} else {
|
|
107
103
|
return import_utils.locales.getText("pisell2.event.close.continue");
|
|
108
104
|
}
|
|
109
|
-
}, [
|
|
105
|
+
}, [isLastStep]);
|
|
110
106
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
111
107
|
import_materials.Button,
|
|
112
108
|
{
|
|
@@ -41,7 +41,6 @@ var import_context = require("../../../context");
|
|
|
41
41
|
var Total = ({ className, isFooter }) => {
|
|
42
42
|
const { summary, symbolic } = (0, import_context.useAppointmentBookingContext)();
|
|
43
43
|
const { taxTitle, totalTaxFee, isPriceIncludeTax, total, deposit } = summary;
|
|
44
|
-
console.log(summary, "summarysummary");
|
|
45
44
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
45
|
"div",
|
|
47
46
|
{
|
|
@@ -44,9 +44,10 @@ var import_Voucher = __toESM(require("../../Voucher"));
|
|
|
44
44
|
var import_Total = __toESM(require("./Total"));
|
|
45
45
|
var import_Deposit = __toESM(require("../../Deposit"));
|
|
46
46
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
47
|
+
var import_utils3 = require("../utils");
|
|
47
48
|
var import_index = require("./index.less");
|
|
48
49
|
var CartItem = ({ onNext }) => {
|
|
49
|
-
var _a, _b, _c, _d
|
|
50
|
+
var _a, _b, _c, _d;
|
|
50
51
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
51
52
|
const {
|
|
52
53
|
carts,
|
|
@@ -55,11 +56,11 @@ var CartItem = ({ onNext }) => {
|
|
|
55
56
|
setResourceOtherParams,
|
|
56
57
|
resourceOtherParams,
|
|
57
58
|
summary,
|
|
58
|
-
|
|
59
|
+
isLastStep
|
|
59
60
|
} = (0, import_context.useAppointmentBookingContext)();
|
|
60
61
|
const { accountLists, getHolders, form_id, addAccount } = (0, import_hooks2.useAppointmentBookingAccount)();
|
|
61
62
|
const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
|
|
62
|
-
const { isFormSubject } = (0, import_hooks2.useAppointmentBookingSetting)();
|
|
63
|
+
const { isFormSubject, bookingSubject } = (0, import_hooks2.useAppointmentBookingSetting)();
|
|
63
64
|
const { isLogin } = (0, import_hooks2.useAppointmentBookingLogin)();
|
|
64
65
|
const context = (0, import_useEngineContext.default)();
|
|
65
66
|
const utils = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
@@ -117,17 +118,32 @@ var CartItem = ({ onNext }) => {
|
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
120
|
if (type === "add_holder") {
|
|
121
|
+
const relationShipFormId = bookingSubject == null ? void 0 : bookingSubject.relationship_form_id;
|
|
120
122
|
return (0, import_utils2.openForm)({
|
|
121
|
-
form_id,
|
|
123
|
+
form_id: relationShipFormId || (bookingSubject == null ? void 0 : bookingSubject.form_id),
|
|
122
124
|
title: import_utils.locales.getText("pisell2.event.create.form"),
|
|
123
125
|
utils,
|
|
124
126
|
callback: async (res) => {
|
|
125
127
|
if ((res == null ? void 0 : res.status) === "success") {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
let result = void 0;
|
|
129
|
+
if (!relationShipFormId) {
|
|
130
|
+
result = await addAccount(res == null ? void 0 : res.values, "holder");
|
|
131
|
+
} else {
|
|
132
|
+
result = await (0, import_utils3.handleAddHolder)({
|
|
133
|
+
res,
|
|
134
|
+
bookingSubject,
|
|
135
|
+
accountLists,
|
|
136
|
+
cartItem: e,
|
|
137
|
+
getHolders,
|
|
138
|
+
appointmentBooking
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (result) {
|
|
142
|
+
appointmentBooking.updateCart({
|
|
143
|
+
_id: e == null ? void 0 : e._id,
|
|
144
|
+
account: result
|
|
145
|
+
});
|
|
146
|
+
}
|
|
131
147
|
}
|
|
132
148
|
}
|
|
133
149
|
});
|
|
@@ -145,11 +161,11 @@ var CartItem = ({ onNext }) => {
|
|
|
145
161
|
products: (0, import_utils2.formatCarts)(carts, resources, accountLists),
|
|
146
162
|
hideAddBtn: false,
|
|
147
163
|
holders,
|
|
148
|
-
disabledEdit:
|
|
164
|
+
disabledEdit: isLastStep,
|
|
149
165
|
isShowChangeResource: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-resource",
|
|
150
166
|
isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
|
|
151
167
|
isShowPackageNote: false,
|
|
152
|
-
isShowChangeHolder:
|
|
168
|
+
isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
|
|
153
169
|
isShowHolder: isFormSubject,
|
|
154
170
|
isShowAddHolderButton: true
|
|
155
171
|
},
|
|
@@ -33,4 +33,24 @@ interface CheckResourceParams {
|
|
|
33
33
|
carts: any[];
|
|
34
34
|
}
|
|
35
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>;
|
|
36
56
|
export {};
|
|
@@ -21,7 +21,8 @@ var utils_exports = {};
|
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
checkHolder: () => checkHolder,
|
|
23
23
|
checkLogin: () => checkLogin,
|
|
24
|
-
checkResource: () => checkResource
|
|
24
|
+
checkResource: () => checkResource,
|
|
25
|
+
handleAddHolder: () => handleAddHolder
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(utils_exports);
|
|
27
28
|
var import_utils = require("../../utils");
|
|
@@ -87,9 +88,38 @@ var checkResource = ({ carts, resources }) => {
|
|
|
87
88
|
}
|
|
88
89
|
return false;
|
|
89
90
|
};
|
|
91
|
+
var handleAddHolder = async ({ res, bookingSubject, accountLists, cartItem, getHolders, appointmentBooking }) => {
|
|
92
|
+
var _a;
|
|
93
|
+
try {
|
|
94
|
+
let result = void 0;
|
|
95
|
+
const relationShipForms = ((_a = res == null ? void 0 : res.values) == null ? void 0 : _a.form_to_form_value) || [];
|
|
96
|
+
const currentForm = relationShipForms.find(
|
|
97
|
+
(item) => item.form_id === (bookingSubject == null ? void 0 : bookingSubject.form_id)
|
|
98
|
+
);
|
|
99
|
+
const form_record_id = Math.max(
|
|
100
|
+
...(currentForm == null ? void 0 : currentForm.form_data_value) || []
|
|
101
|
+
);
|
|
102
|
+
const oldAccount = accountLists.find(
|
|
103
|
+
(item) => item.id === form_record_id
|
|
104
|
+
);
|
|
105
|
+
await getHolders();
|
|
106
|
+
const newAccountLists = await appointmentBooking.getAccounts();
|
|
107
|
+
if (oldAccount) {
|
|
108
|
+
result = !(cartItem == null ? void 0 : cartItem.holder_id) ? { ...accountLists == null ? void 0 : accountLists[0] } : void 0;
|
|
109
|
+
} else {
|
|
110
|
+
const newAccount = newAccountLists.find(
|
|
111
|
+
(item) => item.id === form_record_id
|
|
112
|
+
);
|
|
113
|
+
result = { ...newAccount || (newAccountLists == null ? void 0 : newAccountLists[0]) };
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
} catch (error) {
|
|
117
|
+
}
|
|
118
|
+
};
|
|
90
119
|
// Annotate the CommonJS export names for ESM import in node:
|
|
91
120
|
0 && (module.exports = {
|
|
92
121
|
checkHolder,
|
|
93
122
|
checkLogin,
|
|
94
|
-
checkResource
|
|
123
|
+
checkResource,
|
|
124
|
+
handleAddHolder
|
|
95
125
|
});
|
|
@@ -58,7 +58,6 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
|
|
|
58
58
|
amount
|
|
59
59
|
)}`;
|
|
60
60
|
(_a2 = utils == null ? void 0 : utils.history) == null ? void 0 : _a2.replace(url);
|
|
61
|
-
clearData();
|
|
62
61
|
setLoading(false);
|
|
63
62
|
};
|
|
64
63
|
const handleNext = async () => {
|
|
@@ -75,10 +74,11 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
|
|
|
75
74
|
if (_total > 0) {
|
|
76
75
|
utils.action({
|
|
77
76
|
type: "pisell1.payment",
|
|
78
|
-
data: { ...data, total_amount: _total }
|
|
77
|
+
data: { ...data, total_amount: _total },
|
|
78
|
+
callback: (e) => {
|
|
79
|
+
}
|
|
79
80
|
});
|
|
80
81
|
setTimeout(() => {
|
|
81
|
-
clearData();
|
|
82
82
|
setLoading(false);
|
|
83
83
|
}, 200);
|
|
84
84
|
} else {
|