@pisell/private-materials 6.4.62 → 6.4.64
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 +2 -2
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +267 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +80 -77
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +30 -1
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- 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/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/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/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/list/styles/header.less +1 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.js +63 -5
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
- package/es/components/ticketBooking/index.js +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +40 -0
- package/es/plus/contactInfoModal/index.js +154 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +151 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +93 -67
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +25 -0
- package/lib/components/booking/info2/index.js +11 -5
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- 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/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/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/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/list/styles/header.less +1 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +21 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
- package/lib/components/ticketBooking/index.js +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +40 -0
- package/lib/plus/contactInfoModal/index.js +138 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/package.json +5 -3
|
@@ -14,7 +14,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
14
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
16
|
import { useState, useEffect, useMemo } from 'react';
|
|
17
|
-
import { locales } from
|
|
17
|
+
import { locales } from '@pisell/utils';
|
|
18
18
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
19
19
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
20
20
|
import { sortResources, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatHolder, Toast } from "./utils";
|
|
@@ -37,7 +37,7 @@ export var contextUtils = function contextUtils() {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @title: 监听步骤发生变化
|
|
40
|
-
* @description:
|
|
40
|
+
* @description:
|
|
41
41
|
* @return {*}
|
|
42
42
|
* @Author: WangHan
|
|
43
43
|
* @Date: 2025-04-15 11:11
|
|
@@ -143,56 +143,56 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
143
143
|
var currentSelectedResources = appointmentBooking.getOtherData('current_selected_resources');
|
|
144
144
|
|
|
145
145
|
// 先确定点击时的步骤,如果当前步骤是选择服务
|
|
146
|
-
if (!isRetailTemplate && currentKey ===
|
|
146
|
+
if (!isRetailTemplate && currentKey === 'select-service') {
|
|
147
147
|
var _appointmentBooking$o, _stepList, _stepList2;
|
|
148
148
|
var _ref3 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
|
|
149
149
|
bookingProcess = _ref3.bookingProcess;
|
|
150
|
-
var isDateSelectedFirst = bookingProcess ===
|
|
150
|
+
var isDateSelectedFirst = bookingProcess === 'date_first';
|
|
151
151
|
var hasResourceStep = (_stepList = stepList) === null || _stepList === void 0 ? void 0 : _stepList.find(function (item) {
|
|
152
|
-
return (item === null || item === void 0 ? void 0 : item.key) ===
|
|
152
|
+
return (item === null || item === void 0 ? void 0 : item.key) === 'select-resource';
|
|
153
153
|
});
|
|
154
154
|
var hasSelectGuestStep = (_stepList2 = stepList) === null || _stepList2 === void 0 || (_stepList2 = _stepList2.find(function (item) {
|
|
155
|
-
return (item === null || item === void 0 ? void 0 : item.key) ===
|
|
155
|
+
return (item === null || item === void 0 ? void 0 : item.key) === 'select-guest';
|
|
156
156
|
})) === null || _stepList2 === void 0 ? void 0 : _stepList2.key;
|
|
157
157
|
// 判断购物车里是否全是是普通商品
|
|
158
158
|
var isAllNormalProduct = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.isCartAllNormalProducts();
|
|
159
159
|
if (isAllNormalProduct) {
|
|
160
|
-
removeStep(
|
|
161
|
-
removeStep(
|
|
160
|
+
removeStep('select-resource');
|
|
161
|
+
removeStep('select-time');
|
|
162
162
|
removeStep('fill-form');
|
|
163
163
|
if (!isDateSelectedFirst) {
|
|
164
|
-
removeStep(
|
|
164
|
+
removeStep('select-date');
|
|
165
165
|
}
|
|
166
166
|
} else if (!hasResourceStep) {
|
|
167
167
|
// 如果不全是普通商品,并且还没有选择资源步骤,证明之前被删除过,要给她加回来
|
|
168
168
|
// 判断当前步骤里有没有添加预约人,如果有的话则应该是在添加预约人之后添加步骤
|
|
169
|
-
var targetKey = hasSelectGuestStep ? hasSelectGuestStep :
|
|
169
|
+
var targetKey = hasSelectGuestStep ? hasSelectGuestStep : 'select-service';
|
|
170
170
|
var isHasDurationProduct = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.isCartHasDurationProduct();
|
|
171
171
|
// 如果购物车里有 duration 商品(目前来说,只能是纯 duration 商品)
|
|
172
172
|
if (isHasDurationProduct) {
|
|
173
173
|
// 如果是先选商品,则添加日期、资源、时间步骤
|
|
174
174
|
if (!isDateSelectedFirst) {
|
|
175
175
|
appointmentBooking.addStep({
|
|
176
|
-
key:
|
|
177
|
-
description: locales.getText(
|
|
176
|
+
key: 'select-date',
|
|
177
|
+
description: locales.getText('pisell2.appointment.select.date')
|
|
178
178
|
}, targetKey);
|
|
179
|
-
targetKey =
|
|
179
|
+
targetKey = 'select-date';
|
|
180
180
|
}
|
|
181
181
|
// 如果是先选日期,则添加资源、时间
|
|
182
182
|
appointmentBooking.addStep({
|
|
183
|
-
key:
|
|
184
|
-
description: locales.getText(
|
|
183
|
+
key: 'select-resource',
|
|
184
|
+
description: locales.getText('pisell2.appointment.select.resource')
|
|
185
185
|
}, targetKey);
|
|
186
|
-
targetKey =
|
|
186
|
+
targetKey = 'select-resource';
|
|
187
187
|
appointmentBooking.addStep({
|
|
188
|
-
key:
|
|
189
|
-
description: locales.getText(
|
|
188
|
+
key: 'select-time',
|
|
189
|
+
description: locales.getText('pisell2.appointment.select.time')
|
|
190
190
|
}, targetKey);
|
|
191
191
|
} else {
|
|
192
192
|
// 如果购物车里是session 商品,则只添加选择资源步骤
|
|
193
193
|
appointmentBooking.addStep({
|
|
194
|
-
key:
|
|
195
|
-
description: locales.getText(
|
|
194
|
+
key: 'select-resource',
|
|
195
|
+
description: locales.getText('pisell2.appointment.select.resource')
|
|
196
196
|
}, targetKey);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
@@ -381,7 +381,6 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
381
381
|
// // getHolders();
|
|
382
382
|
// // }
|
|
383
383
|
// // }
|
|
384
|
-
|
|
385
384
|
// // 继续后续流程
|
|
386
385
|
// checkHolder()
|
|
387
386
|
// }
|
|
@@ -434,7 +433,7 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
434
433
|
|
|
435
434
|
/**
|
|
436
435
|
* @title: 获取商品数据
|
|
437
|
-
* @description:
|
|
436
|
+
* @description:
|
|
438
437
|
* @return {*}
|
|
439
438
|
* @Author: WangHan
|
|
440
439
|
* @Date: 2025-04-15 11:12
|
|
@@ -525,7 +524,7 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
|
|
|
525
524
|
|
|
526
525
|
/**
|
|
527
526
|
* @title: 更新购物车数据
|
|
528
|
-
* @description:
|
|
527
|
+
* @description:
|
|
529
528
|
* @return {*}
|
|
530
529
|
* @Author: WangHan
|
|
531
530
|
* @Date: 2025-04-15 11:12
|
|
@@ -612,7 +611,7 @@ export var useAppointmentBookingCart = function useAppointmentBookingCart() {
|
|
|
612
611
|
|
|
613
612
|
/**
|
|
614
613
|
* @title: 获取登录状态
|
|
615
|
-
* @description:
|
|
614
|
+
* @description:
|
|
616
615
|
* @return {*}
|
|
617
616
|
* @Author: WangHan
|
|
618
617
|
* @Date: 2025-04-15 11:14
|
|
@@ -640,7 +639,7 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
|
|
|
640
639
|
|
|
641
640
|
/**
|
|
642
641
|
* @title: 获取账户
|
|
643
|
-
* @description:
|
|
642
|
+
* @description:
|
|
644
643
|
* @return {*}
|
|
645
644
|
* @Author: WangHan
|
|
646
645
|
* @Date: 2025-04-15 11:15
|
|
@@ -790,7 +789,7 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
790
789
|
|
|
791
790
|
/**
|
|
792
791
|
* @title: 获取资源数据
|
|
793
|
-
* @description:
|
|
792
|
+
* @description:
|
|
794
793
|
* @return {*}
|
|
795
794
|
* @Author: WangHan
|
|
796
795
|
* @Date: 2025-04-15 11:29
|
|
@@ -855,7 +854,7 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
|
|
|
855
854
|
|
|
856
855
|
/**
|
|
857
856
|
* @title: 是否跳过资源选择步骤
|
|
858
|
-
* @description:
|
|
857
|
+
* @description:
|
|
859
858
|
* @return {*}
|
|
860
859
|
* @Author: WangHan
|
|
861
860
|
* @Date: 2025-04-21 11:47
|
|
@@ -937,13 +936,13 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
|
|
|
937
936
|
|
|
938
937
|
/**
|
|
939
938
|
* @title: 获取预约配置
|
|
940
|
-
* @description:
|
|
939
|
+
* @description:
|
|
941
940
|
* @return {*}
|
|
942
941
|
* @Author: WangHan
|
|
943
942
|
* @Date: 2025-04-24 18:15
|
|
944
943
|
*/
|
|
945
944
|
export var useAppointmentBookingSetting = function useAppointmentBookingSetting() {
|
|
946
|
-
var _appointmentBooking$o4, _appointmentBooking$o5;
|
|
945
|
+
var _appointmentBooking$o4, _appointmentBooking$o5, _appointmentBooking$o6;
|
|
947
946
|
var utils = contextUtils();
|
|
948
947
|
var _ref28 = useAppointmentBookingContext(),
|
|
949
948
|
appointmentBooking = _ref28.appointmentBooking;
|
|
@@ -977,6 +976,7 @@ export var useAppointmentBookingSetting = function useAppointmentBookingSetting(
|
|
|
977
976
|
bookingSubject: bookingSubject,
|
|
978
977
|
setOtherData: setOtherData,
|
|
979
978
|
getOtherData: getOtherData,
|
|
980
|
-
formName: formName
|
|
979
|
+
formName: formName,
|
|
980
|
+
bookingSetting: (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o6 = appointmentBooking.otherParams) === null || _appointmentBooking$o6 === void 0 ? void 0 : _appointmentBooking$o6.bookingSetting) || {}
|
|
981
981
|
};
|
|
982
982
|
};
|
|
@@ -117,6 +117,7 @@ declare const _default: {
|
|
|
117
117
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
118
118
|
'pisell2.text.goodpass.login': string;
|
|
119
119
|
'pisell2.text.goodpass.login-tip': string;
|
|
120
|
+
'pisell2.text.contact-info.title': string;
|
|
120
121
|
};
|
|
121
122
|
'zh-CN': {
|
|
122
123
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -236,6 +237,7 @@ declare const _default: {
|
|
|
236
237
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
237
238
|
'pisell2.text.goodpass.login': string;
|
|
238
239
|
'pisell2.text.goodpass.login-tip': string;
|
|
240
|
+
'pisell2.text.contact-info.title': string;
|
|
239
241
|
};
|
|
240
242
|
'zh-HK': {
|
|
241
243
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -355,6 +357,7 @@ declare const _default: {
|
|
|
355
357
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
356
358
|
'pisell2.text.goodpass.login': string;
|
|
357
359
|
'pisell2.text.goodpass.login-tip': string;
|
|
360
|
+
'pisell2.text.contact-info.title': string;
|
|
358
361
|
};
|
|
359
362
|
};
|
|
360
363
|
export default _default;
|
|
@@ -132,9 +132,10 @@ export default {
|
|
|
132
132
|
'pisell2.text.goodpass.code': 'Code',
|
|
133
133
|
'pisell2.text.goodpass.enter-code': 'Enter Code',
|
|
134
134
|
'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
|
|
135
|
-
'pisell2.text.goodpass.code-invalid-cart':
|
|
135
|
+
'pisell2.text.goodpass.code-invalid-cart': 'No eligible items in the cart',
|
|
136
136
|
'pisell2.text.goodpass.login': 'Login',
|
|
137
|
-
'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit'
|
|
137
|
+
'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit',
|
|
138
|
+
'pisell2.text.contact-info.title': 'Contact info'
|
|
138
139
|
},
|
|
139
140
|
'zh-CN': {
|
|
140
141
|
'pisell2.event.calendar.limit.unavailable': '不可预约',
|
|
@@ -269,9 +270,10 @@ export default {
|
|
|
269
270
|
'pisell2.text.goodpass.code': '券码',
|
|
270
271
|
'pisell2.text.goodpass.enter-code': '请输入券码',
|
|
271
272
|
'pisell2.text.goodpass.code-invalid': '当前券码不可用',
|
|
272
|
-
'pisell2.text.goodpass.code-invalid-cart':
|
|
273
|
+
'pisell2.text.goodpass.code-invalid-cart': '当前购物车中无可用商品',
|
|
273
274
|
'pisell2.text.goodpass.login': '登录',
|
|
274
|
-
'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分'
|
|
275
|
+
'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分',
|
|
276
|
+
'pisell2.text.contact-info.title': '联系信息'
|
|
275
277
|
},
|
|
276
278
|
'zh-HK': {
|
|
277
279
|
'pisell2.event.calendar.limit.unavailable': '不可預約',
|
|
@@ -406,8 +408,9 @@ export default {
|
|
|
406
408
|
'pisell2.text.goodpass.code': '券碼',
|
|
407
409
|
'pisell2.text.goodpass.enter-code': '請輸入券碼',
|
|
408
410
|
'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
|
|
409
|
-
'pisell2.text.goodpass.code-invalid-cart':
|
|
411
|
+
'pisell2.text.goodpass.code-invalid-cart': '當前購物車中無可用商品',
|
|
410
412
|
'pisell2.text.goodpass.login': '登錄',
|
|
411
|
-
'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分'
|
|
413
|
+
'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分',
|
|
414
|
+
'pisell2.text.contact-info.title': '聯繫信息'
|
|
412
415
|
}
|
|
413
416
|
};
|
|
@@ -261,7 +261,7 @@ var Footer = function Footer(props) {
|
|
|
261
261
|
|
|
262
262
|
// info 是否有编辑
|
|
263
263
|
var infoEdit = useMemo(function () {
|
|
264
|
-
var _state$client, _state$date, _state$pet, _state$service3, _state$notes, _state$contacts;
|
|
264
|
+
var _state$client, _state$date, _state$pet, _state$service3, _state$notes, _state$contacts, _state$contacts_info;
|
|
265
265
|
if (!state.bookingId) {
|
|
266
266
|
return true;
|
|
267
267
|
}
|
|
@@ -283,6 +283,9 @@ var Footer = function Footer(props) {
|
|
|
283
283
|
if ((_state$contacts = state.contacts) !== null && _state$contacts !== void 0 && _state$contacts.edit) {
|
|
284
284
|
return true;
|
|
285
285
|
}
|
|
286
|
+
if ((_state$contacts_info = state.contacts_info) !== null && _state$contacts_info !== void 0 && _state$contacts_info.edit) {
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
286
289
|
return false;
|
|
287
290
|
}, [state]);
|
|
288
291
|
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import dayjs from
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
8
|
import { flexibleObj, isNowTime, getNowTime } from "../../utils";
|
|
9
9
|
import { isWalkIn } from "../../utils";
|
|
10
10
|
import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
@@ -12,13 +12,13 @@ import { getDays } from "../../utils";
|
|
|
12
12
|
import { appointmentTypes } from "../../info/service2/status";
|
|
13
13
|
import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule, genRowKey } from "../../info/service2/utils";
|
|
14
14
|
import { isArr, locales, sendWarningLog, getUniqueId } from '@pisell/utils';
|
|
15
|
-
import { PisellToast } from
|
|
15
|
+
import { PisellToast } from '@pisell/materials';
|
|
16
16
|
import { getClientName } from "../../../../plus/clientName/utils";
|
|
17
17
|
import { cloneDeep } from 'lodash';
|
|
18
18
|
import Decimal from 'decimal.js';
|
|
19
19
|
var formatNote = function formatNote(data) {
|
|
20
20
|
var _data$notes;
|
|
21
|
-
return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) ||
|
|
21
|
+
return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || '';
|
|
22
22
|
};
|
|
23
23
|
var formatCustomer = function formatCustomer(data) {
|
|
24
24
|
var _data$client, _data$client2, _data$client3, _data$client4, _data$client5, _data$client6;
|
|
@@ -37,7 +37,7 @@ var formatCustomer = function formatCustomer(data) {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @title: 套餐单规格信息
|
|
40
|
-
* @description:
|
|
40
|
+
* @description:
|
|
41
41
|
* @param {any} option
|
|
42
42
|
* @return {*}
|
|
43
43
|
* @Author: zhiwei.Wang
|
|
@@ -49,17 +49,17 @@ export var formatProductOption = function formatProductOption(option) {
|
|
|
49
49
|
}
|
|
50
50
|
return option.map(function (d) {
|
|
51
51
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
num: d.num,
|
|
53
|
+
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
54
|
+
option_group_id: d.option_group_id,
|
|
55
|
+
custom_add_price: Number(d === null || d === void 0 ? void 0 : d.add_price)
|
|
56
56
|
};
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* @title: 添加套餐警告
|
|
62
|
-
* @description:
|
|
62
|
+
* @description:
|
|
63
63
|
* @param {any} data
|
|
64
64
|
* @return {*}
|
|
65
65
|
* @Author: WangHan
|
|
@@ -80,7 +80,7 @@ var log = function log(data) {
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* @title: 套餐信息
|
|
83
|
-
* @description:
|
|
83
|
+
* @description:
|
|
84
84
|
* @param {any} bundle
|
|
85
85
|
* @return {*}
|
|
86
86
|
* @Author: zhiwei.Wang
|
|
@@ -200,7 +200,7 @@ var formatResource = function formatResource(service) {
|
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* @title: 格式化子预约的holder数据
|
|
203
|
-
* @description:
|
|
203
|
+
* @description:
|
|
204
204
|
* @param {any} state
|
|
205
205
|
* @param {any} item
|
|
206
206
|
* @param {any} values
|
|
@@ -231,7 +231,7 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
233
|
* @title: 格式化商品单价
|
|
234
|
-
* @description:
|
|
234
|
+
* @description:
|
|
235
235
|
* @param {any} item
|
|
236
236
|
* @return {*}
|
|
237
237
|
* @Author: WangHan
|
|
@@ -264,8 +264,8 @@ export var formatProductPrice = function formatProductPrice(item) {
|
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
|
|
267
|
-
* @param item
|
|
268
|
-
* @returns
|
|
267
|
+
* @param item
|
|
268
|
+
* @returns
|
|
269
269
|
*/
|
|
270
270
|
var formatOriginalPrice = function formatOriginalPrice(item) {
|
|
271
271
|
var _item$_extend8;
|
|
@@ -274,8 +274,8 @@ var formatOriginalPrice = function formatOriginalPrice(item) {
|
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
276
|
* checkout2.0: 商品维度折扣后价格, original_price - 商品折扣金额(商品手动折扣等等)
|
|
277
|
-
* @param item
|
|
278
|
-
* @returns
|
|
277
|
+
* @param item
|
|
278
|
+
* @returns
|
|
279
279
|
*/
|
|
280
280
|
var formatSellingPrice = function formatSellingPrice(item) {
|
|
281
281
|
var _item$_extend9;
|
|
@@ -339,7 +339,7 @@ var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
|
339
339
|
|
|
340
340
|
/**
|
|
341
341
|
* @title: 格式化商品数据
|
|
342
|
-
* @description:
|
|
342
|
+
* @description:
|
|
343
343
|
* @param {any} item
|
|
344
344
|
* @return {*}
|
|
345
345
|
* @Author: WangHan
|
|
@@ -368,36 +368,36 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
368
368
|
item.product_id = 0;
|
|
369
369
|
}
|
|
370
370
|
return {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
371
|
+
name: item.name,
|
|
372
|
+
num: quantity || item._extend.quantity,
|
|
373
|
+
price: formatProductPrice(item),
|
|
374
|
+
source_product_price: getSourceProductPrice(item),
|
|
375
|
+
product_id: item !== null && item !== void 0 && item.product_id || item.product_id === 0 ? item.product_id : item.id,
|
|
376
|
+
discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
377
|
+
product_discount_reason: item._extend.discount_reason || '',
|
|
378
|
+
is_charge_tax: item.is_charge_tax,
|
|
379
|
+
note: ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.note) || '',
|
|
380
|
+
discountway: item._extend.discountway || 'num',
|
|
381
|
+
discount_per: item._extend.discount_per,
|
|
382
|
+
discount_type: item._extend.discount_type || discount_type,
|
|
383
|
+
order_detail_id: item._extend.order_detail_id || 0,
|
|
384
|
+
product_bundle: formatProductBundle((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.bundle),
|
|
385
|
+
bundle_edit: item._extend.bundle_edit,
|
|
386
|
+
product_option_item: formatProductOption((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.option),
|
|
387
|
+
product_variant_id: ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 || (_item$_extend22 = _item$_extend22.other) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.product_variant_id) || 0,
|
|
388
|
+
discount_list: notManualDiscount,
|
|
389
389
|
metadata: formatMetaData(item),
|
|
390
390
|
// checkout 需求新增字段
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
calculated_original_price: formatOriginalPrice(item),
|
|
392
|
+
calculated_selling_price: formatSellingPrice(item),
|
|
393
|
+
tax_fee: item._extend.tax_fee,
|
|
394
|
+
custom_deposit_data: item.custom_deposit_data
|
|
395
395
|
};
|
|
396
396
|
};
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
399
|
* @title: 格式化跨日预约下的普通商品
|
|
400
|
-
* @description:
|
|
400
|
+
* @description:
|
|
401
401
|
* @param {any} data
|
|
402
402
|
* @param {any} booking_item
|
|
403
403
|
* @return {*}
|
|
@@ -423,7 +423,7 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
423
423
|
|
|
424
424
|
/**
|
|
425
425
|
* @title: 格式化跨日预约商品列表
|
|
426
|
-
* @description:
|
|
426
|
+
* @description:
|
|
427
427
|
* @param {any} data
|
|
428
428
|
* @return {*}
|
|
429
429
|
* @Author: WangHan
|
|
@@ -473,7 +473,7 @@ var getHolderByIndex = function getHolderByIndex(holder, index) {
|
|
|
473
473
|
|
|
474
474
|
/**
|
|
475
475
|
* @title: 预约商品信息
|
|
476
|
-
* @description:
|
|
476
|
+
* @description:
|
|
477
477
|
* @param {any} data
|
|
478
478
|
* @return {*}
|
|
479
479
|
* @Author: zhiwei.Wang
|
|
@@ -515,8 +515,8 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
515
515
|
}
|
|
516
516
|
var start_date = item._extend.startDate.format('YYYY-MM-DD');
|
|
517
517
|
var end_date = item._extend.endDate.format('YYYY-MM-DD');
|
|
518
|
-
var end_time = item._extend.endDate.format(
|
|
519
|
-
var start_time = item._extend.startDate.format(
|
|
518
|
+
var end_time = item._extend.endDate.format('HH:mm');
|
|
519
|
+
var start_time = item._extend.startDate.format('HH:mm');
|
|
520
520
|
|
|
521
521
|
// 更新当前时间
|
|
522
522
|
if (isNowTime(item._extend.start_time)) {
|
|
@@ -555,27 +555,27 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
555
555
|
item._extend.unique_identification_number = unique_identification_number;
|
|
556
556
|
}
|
|
557
557
|
var booking = _objectSpread(_objectSpread({
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
558
|
+
product: formatProducts(item),
|
|
559
|
+
metadata: formatMetaData(item),
|
|
560
|
+
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
561
|
+
id: item.booking_id || 0,
|
|
562
|
+
relation_id: item._extend.relation_id || 0,
|
|
563
|
+
like_status: item._extend.like_status || 'common',
|
|
564
|
+
relation_type: item._extend.relation_type || '',
|
|
565
|
+
is_all: false,
|
|
566
|
+
schedule_id: item._extend.schedule_id || 0,
|
|
567
|
+
end_time: end_time,
|
|
568
|
+
sub_type: isDay ? 'days' : getSubType(item),
|
|
569
|
+
select_date: start_date,
|
|
570
|
+
start_time: start_time,
|
|
571
|
+
end_date: end_date,
|
|
572
|
+
start_date: start_date,
|
|
573
|
+
duration: isDay ? 0 : flexibleObj.getValue(item._extend.duration),
|
|
574
|
+
number: item._extend.capacity ? getSumCapacity({
|
|
575
575
|
cacheItem: item
|
|
576
576
|
}) : item._extend.number || 1,
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
resources: formatResource(item),
|
|
578
|
+
note: item._extend.note
|
|
579
579
|
}, eventOtherParams || {}), dayParams);
|
|
580
580
|
if (isDay) {
|
|
581
581
|
bookings.push(booking);
|
|
@@ -585,12 +585,12 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
585
585
|
var newItem = cloneDeep(item);
|
|
586
586
|
newItem._extend.unique_identification_number = "".concat(item._extend.unique_identification_number, "_").concat(i);
|
|
587
587
|
bookings.push(_objectSpread(_objectSpread({}, booking), {}, {
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
product: formatProducts(newItem, 1),
|
|
589
|
+
number: item._extend.capacity ? getSumCapacity({
|
|
590
590
|
cacheItem: newItem
|
|
591
591
|
}, false) : newItem._extend.number || 1,
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
holder: getHolderByIndex(booking.holder, i),
|
|
593
|
+
metadata: formatMetaData(newItem)
|
|
594
594
|
}));
|
|
595
595
|
}
|
|
596
596
|
});
|
|
@@ -599,7 +599,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
601
|
* @title: 普通商品
|
|
602
|
-
* @description:
|
|
602
|
+
* @description:
|
|
603
603
|
* @param {any} data
|
|
604
604
|
* @return {*}
|
|
605
605
|
* @Author: WangHan
|
|
@@ -650,7 +650,7 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
650
650
|
|
|
651
651
|
/**
|
|
652
652
|
* @title: 预约主体信息
|
|
653
|
-
* @description:
|
|
653
|
+
* @description:
|
|
654
654
|
* @param {any} state
|
|
655
655
|
* @param {any} values
|
|
656
656
|
* @return {*}
|
|
@@ -683,15 +683,15 @@ var formatHolder = function formatHolder(state, values) {
|
|
|
683
683
|
|
|
684
684
|
// https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/2778666/detail/53001549?spaceKey=menutech
|
|
685
685
|
export var formatValues = function formatValues(state) {
|
|
686
|
-
var _values, _values3;
|
|
686
|
+
var _values, _values3, _state$contacts_info;
|
|
687
687
|
var values = {
|
|
688
|
-
type: state.renderType === 'eventBooking' ?
|
|
689
|
-
platform: state.isBookingTicket2 ?
|
|
690
|
-
sales_channel:
|
|
691
|
-
order_sales_channel: state.isBookingTicket2 ?
|
|
688
|
+
type: state.renderType === 'eventBooking' ? 'event_booking_v2' : 'appointment_booking',
|
|
689
|
+
platform: state.isBookingTicket2 ? 'pos' : 'shop',
|
|
690
|
+
sales_channel: 'my_pisel',
|
|
691
|
+
order_sales_channel: state.isBookingTicket2 ? 'pos' : 'online_store',
|
|
692
692
|
bookings: [],
|
|
693
693
|
customer_id: 1,
|
|
694
|
-
customer_name:
|
|
694
|
+
customer_name: '',
|
|
695
695
|
holder: {},
|
|
696
696
|
relation_products: [],
|
|
697
697
|
metadata: {}
|
|
@@ -720,7 +720,7 @@ export var formatValues = function formatValues(state) {
|
|
|
720
720
|
values.holder = formatHolder(state, values);
|
|
721
721
|
// todo
|
|
722
722
|
if (isDay || isEvent) {
|
|
723
|
-
values.relation_products = formatRelationProducts(state, isDay ?
|
|
723
|
+
values.relation_products = formatRelationProducts(state, isDay ? 'day' : 'event');
|
|
724
724
|
} else {
|
|
725
725
|
var _values$relation_prod;
|
|
726
726
|
values.relation_products = formatNormalProducts(state);
|
|
@@ -749,13 +749,16 @@ export var formatValues = function formatValues(state) {
|
|
|
749
749
|
if (!((_values3 = values) !== null && _values3 !== void 0 && (_values3 = _values3.bookings) !== null && _values3 !== void 0 && _values3.length)) {
|
|
750
750
|
values.type = 'virtual';
|
|
751
751
|
}
|
|
752
|
+
|
|
753
|
+
// 联系信息
|
|
754
|
+
values.contacts_info = ((_state$contacts_info = state.contacts_info) === null || _state$contacts_info === void 0 ? void 0 : _state$contacts_info.value) || null;
|
|
752
755
|
return values;
|
|
753
756
|
};
|
|
754
757
|
|
|
755
758
|
// 检测预约主体是否为空
|
|
756
759
|
export var checkHolderIsError = function checkHolderIsError(state) {
|
|
757
760
|
var _state$client;
|
|
758
|
-
var errorRowKey =
|
|
761
|
+
var errorRowKey = '';
|
|
759
762
|
var holderError = state.service.value.some(function (item) {
|
|
760
763
|
var _item$_extend35;
|
|
761
764
|
// 普通商品不需要检测holder
|
|
@@ -52,7 +52,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
52
52
|
num: 5,
|
|
53
53
|
total: 0,
|
|
54
54
|
search: '',
|
|
55
|
-
with: ['formRecord'],
|
|
55
|
+
with: ['formRecord', 'contactsInfo'],
|
|
56
56
|
relation_form_id: state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id
|
|
57
57
|
}),
|
|
58
58
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
@@ -294,7 +294,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
294
294
|
if (getIsWalkIn(item === null || item === void 0 ? void 0 : item.id)) {
|
|
295
295
|
return locales.getText('pisell2.text.select-a-customer');
|
|
296
296
|
}
|
|
297
|
-
var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) :
|
|
297
|
+
var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) : '';
|
|
298
298
|
return item.name || (item.display_name || '').trim() || (item.nickname || '').trim() || firstLastName.trim() || '';
|
|
299
299
|
}, [locales.localeMap]);
|
|
300
300
|
useEffect(function () {
|
|
@@ -262,7 +262,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
262
262
|
case 7:
|
|
263
263
|
_context.next = 9;
|
|
264
264
|
return getClients({
|
|
265
|
-
with: ['formRecord'],
|
|
265
|
+
with: ['formRecord', 'contactsInfo'],
|
|
266
266
|
relation_form_id: boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.form_id,
|
|
267
267
|
skip: 1,
|
|
268
268
|
num: 20,
|