@pisell/private-materials 3.3.21 → 3.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.js +19 -7
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +2 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Content/index.js +0 -1
- package/es/components/appointmentBooking/components/Date/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Date/index.js +1 -5
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/index.js +4 -3
- package/es/components/appointmentBooking/components/Guest/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Services/index.js +21 -11
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
- package/es/components/appointmentBooking/context.d.ts +35 -0
- package/es/components/appointmentBooking/hooks.d.ts +106 -0
- package/es/components/appointmentBooking/hooks.js +12 -18
- package/es/components/appointmentBooking/index.js +3 -5
- package/es/components/appointmentBooking/utils.d.ts +114 -0
- package/es/components/appointmentBooking/utils.js +15 -15
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +4 -2
- package/es/components/booking/deposit/index.d.ts +2 -0
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.js +14 -16
- package/es/components/booking/info/service/addTimeModal/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 +1 -1
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +14 -15
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +12 -9
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +7 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Content/index.js +1 -1
- package/lib/components/appointmentBooking/components/Date/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Date/index.js +1 -1
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/index.js +3 -2
- package/lib/components/appointmentBooking/components/Guest/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Services/index.js +8 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
- package/lib/components/appointmentBooking/context.d.ts +35 -0
- package/lib/components/appointmentBooking/hooks.d.ts +106 -0
- package/lib/components/appointmentBooking/hooks.js +2 -6
- package/lib/components/appointmentBooking/index.js +2 -2
- package/lib/components/appointmentBooking/utils.d.ts +114 -0
- package/lib/components/appointmentBooking/utils.js +14 -23
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +4 -2
- package/lib/components/booking/deposit/index.d.ts +2 -0
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.js +14 -14
- package/lib/components/booking/info/service/addTimeModal/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 +1 -1
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +15 -13
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +1 -0
- package/package.json +3 -3
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
- package/es/components/booking/components/customSelect/index.d.ts +0 -38
- package/es/components/booking/forms/footer.d.ts +0 -6
- package/es/components/booking/forms/sendModal/index.d.ts +0 -27
- package/es/components/booking/info/clientVariant/utils.d.ts +0 -1
- package/es/components/booking/info2/utils.d.ts +0 -4
- package/es/components/booking/locales.d.ts +0 -807
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -3
- package/es/components/eftposPay/component/fail/index.d.ts +0 -3
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -10
- package/es/components/eftposPay/hooks.d.ts +0 -35
- package/es/components/eftposPay/index.d.ts +0 -4
- package/es/components/eftposPay/locales.d.ts +0 -330
- package/es/components/eftposPay/pay.d.ts +0 -20
- package/es/components/eftposPay/tyro/index.d.ts +0 -9
- package/es/components/eftposPay/windcave/helper.d.ts +0 -23
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -111
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
- package/es/components/pay/toC/index.d.ts +0 -3
- package/es/components/pay/toC/utils.d.ts +0 -49
- package/es/components/ruleSetting/index.d.ts +0 -9
- package/es/components/ruleSetting/server.d.ts +0 -4
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -3
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
- package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/es/components/workSpaceList/components/EditableString/index.d.ts +0 -21
- package/es/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
- package/es/components/workSpaceList/components/Sort/index.d.ts +0 -7
- package/es/components/workSpaceList/components/WorkspaceItem/index.d.ts +0 -22
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
- package/lib/components/booking/components/customSelect/index.d.ts +0 -38
- package/lib/components/booking/forms/footer.d.ts +0 -6
- package/lib/components/booking/forms/sendModal/index.d.ts +0 -27
- package/lib/components/booking/info/clientVariant/utils.d.ts +0 -1
- package/lib/components/booking/info2/utils.d.ts +0 -4
- package/lib/components/booking/locales.d.ts +0 -807
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -3
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -10
- package/lib/components/eftposPay/hooks.d.ts +0 -35
- package/lib/components/eftposPay/index.d.ts +0 -4
- package/lib/components/eftposPay/locales.d.ts +0 -330
- package/lib/components/eftposPay/pay.d.ts +0 -20
- package/lib/components/eftposPay/tyro/index.d.ts +0 -9
- package/lib/components/eftposPay/windcave/helper.d.ts +0 -23
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -111
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
- package/lib/components/pay/toC/index.d.ts +0 -3
- package/lib/components/pay/toC/utils.d.ts +0 -49
- package/lib/components/ruleSetting/index.d.ts +0 -9
- package/lib/components/ruleSetting/server.d.ts +0 -4
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -3
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
- package/lib/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/lib/components/workSpaceList/components/EditableString/index.d.ts +0 -21
- package/lib/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
- package/lib/components/workSpaceList/components/Sort/index.d.ts +0 -7
- package/lib/components/workSpaceList/components/WorkspaceItem/index.d.ts +0 -22
|
@@ -13,16 +13,15 @@ import ShoppingCart from "../../../../shoppingCart";
|
|
|
13
13
|
import ContinueButton from "../ContinueButton";
|
|
14
14
|
import { useAppointmentBooking } from "../../../hooks";
|
|
15
15
|
import { useAppointmentBookingContext } from "../../../context";
|
|
16
|
-
import { useAppointmentBookingAccount, useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingLogin } from "../../../hooks";
|
|
16
|
+
import { useAppointmentBookingAccount, useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingLogin, contextUtils } from "../../../hooks";
|
|
17
17
|
import { formatHolder, formatCarts, formatCurrentUser, openForm } from "../../../utils";
|
|
18
18
|
import VoucherCard from "../../Voucher";
|
|
19
19
|
import Total from "./Total";
|
|
20
20
|
import Deposit from "../../Deposit";
|
|
21
|
-
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
22
21
|
import { handleAddHolder } from "../utils";
|
|
23
22
|
import "./index.less";
|
|
24
23
|
var CartItem = function CartItem(_ref) {
|
|
25
|
-
var
|
|
24
|
+
var _businessUtils$getApp, _currentStep$step, _currentStep$step2;
|
|
26
25
|
var onNext = _ref.onNext;
|
|
27
26
|
var appointmentBooking = useAppointmentBooking();
|
|
28
27
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
@@ -45,12 +44,22 @@ var CartItem = function CartItem(_ref) {
|
|
|
45
44
|
bookingSubject = _useAppointmentBookin4.bookingSubject;
|
|
46
45
|
var _useAppointmentBookin5 = useAppointmentBookingLogin(),
|
|
47
46
|
isLogin = _useAppointmentBookin5.isLogin;
|
|
48
|
-
var
|
|
49
|
-
var utils = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
|
|
47
|
+
var utils = contextUtils();
|
|
50
48
|
var businessUtils = utils.businessUtils;
|
|
51
|
-
var currentUser = formatCurrentUser();
|
|
52
49
|
var deposit = summary.deposit;
|
|
53
50
|
|
|
51
|
+
/**
|
|
52
|
+
* @title: 当前客户
|
|
53
|
+
* @description:
|
|
54
|
+
* @param {*} useMemo
|
|
55
|
+
* @return {*}
|
|
56
|
+
* @Author: WangHan
|
|
57
|
+
* @Date: 2025-05-14 14:59
|
|
58
|
+
*/
|
|
59
|
+
var currentUser = useMemo(function () {
|
|
60
|
+
return formatCurrentUser(utils) || {};
|
|
61
|
+
}, []);
|
|
62
|
+
|
|
54
63
|
/**
|
|
55
64
|
* @title: 格式化购物车ids
|
|
56
65
|
* @description:
|
|
@@ -188,13 +197,16 @@ var CartItem = function CartItem(_ref) {
|
|
|
188
197
|
});
|
|
189
198
|
}
|
|
190
199
|
};
|
|
200
|
+
var products = useMemo(function () {
|
|
201
|
+
return formatCarts(carts, resources, utils, accountLists);
|
|
202
|
+
}, [carts, resources, accountLists]);
|
|
191
203
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
192
204
|
className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
|
|
193
205
|
}, /*#__PURE__*/React.createElement("div", {
|
|
194
206
|
className: "content"
|
|
195
207
|
}, /*#__PURE__*/React.createElement(ShoppingCart, {
|
|
196
208
|
productParams: {
|
|
197
|
-
products:
|
|
209
|
+
products: products,
|
|
198
210
|
hideAddBtn: false,
|
|
199
211
|
holders: holders,
|
|
200
212
|
disabledEdit: isLastStep,
|
|
@@ -155,7 +155,8 @@ var ConfirmInformation = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
155
155
|
}, /*#__PURE__*/React.createElement("div", {
|
|
156
156
|
className: "image"
|
|
157
157
|
}, /*#__PURE__*/React.createElement("img", {
|
|
158
|
-
src: "".concat(config === null || config === void 0 ? void 0 : config.awsStatic, "/checkout_confirm.png")
|
|
158
|
+
src: "".concat(config === null || config === void 0 ? void 0 : config.awsStatic, "/checkout_confirm.png"),
|
|
159
|
+
loading: "lazy"
|
|
159
160
|
})), /*#__PURE__*/React.createElement("span", {
|
|
160
161
|
className: "tips"
|
|
161
162
|
}, locales.getText('pisell2.appointment.tips')), /*#__PURE__*/React.createElement("span", {
|
|
@@ -40,7 +40,6 @@ var Layout = function Layout() {
|
|
|
40
40
|
policyParams = _useAppointmentBookin.policyParams,
|
|
41
41
|
closePolicy = _useAppointmentBookin.closePolicy;
|
|
42
42
|
var _useAppointmentBookin2 = useAppointmentBookingSetting(),
|
|
43
|
-
getLoadAllSchedule = _useAppointmentBookin2.getLoadAllSchedule,
|
|
44
43
|
isDateSelectedFirst = _useAppointmentBookin2.isDateSelectedFirst,
|
|
45
44
|
isFormSubject = _useAppointmentBookin2.isFormSubject;
|
|
46
45
|
var _useAppointmentBookin3 = useAppointmentBookingLogin(),
|
|
@@ -52,7 +52,6 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
52
52
|
var _useAppointmentBookin2 = useAppointmentBookingSetting(),
|
|
53
53
|
isDateSelectedFirst = _useAppointmentBookin2.isDateSelectedFirst,
|
|
54
54
|
customPageId = _useAppointmentBookin2.customPageId,
|
|
55
|
-
getLoadAllSchedule = _useAppointmentBookin2.getLoadAllSchedule,
|
|
56
55
|
channel = _useAppointmentBookin2.channel;
|
|
57
56
|
var _useAppointmentBookin3 = useAppointmentBookingStep(),
|
|
58
57
|
nextStep = _useAppointmentBookin3.nextStep;
|
|
@@ -282,10 +281,7 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
282
281
|
});
|
|
283
282
|
}
|
|
284
283
|
return day;
|
|
285
|
-
});
|
|
286
|
-
// if (isDateSelectedFirst) {
|
|
287
|
-
// getLoadAllSchedule();
|
|
288
|
-
// }
|
|
284
|
+
});
|
|
289
285
|
setLoading(false);
|
|
290
286
|
setDateMonthList(updatedDates);
|
|
291
287
|
_context4.next = 23;
|
|
@@ -14,7 +14,7 @@ import React, { useMemo, useRef, useState, useImperativeHandle, forwardRef, useE
|
|
|
14
14
|
import useComponents from "../../../../hooks/useComponents";
|
|
15
15
|
import { formatForms, formatCarts, updateLists, updateBookingFormStorage } from "../../utils";
|
|
16
16
|
import { useAppointmentBookingContext } from "../../context";
|
|
17
|
-
import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep } from "../../hooks";
|
|
17
|
+
import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep, contextUtils } from "../../hooks";
|
|
18
18
|
import PolicyModal from "../../deposit/components/PolicyModal";
|
|
19
19
|
import "./index.less";
|
|
20
20
|
var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
@@ -54,6 +54,7 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
54
54
|
getOtherData = _useAppointmentBookin3.getOtherData;
|
|
55
55
|
var _useAppointmentBookin4 = useAppointmentBookingStep(),
|
|
56
56
|
nextStep = _useAppointmentBookin4.nextStep;
|
|
57
|
+
var utils = contextUtils();
|
|
57
58
|
useImperativeHandle(ref, function () {
|
|
58
59
|
return {
|
|
59
60
|
next: function next() {
|
|
@@ -80,11 +81,11 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
80
81
|
var _resource = getResourceList();
|
|
81
82
|
return (_resource === null || _resource === void 0 ? void 0 : _resource.resources) || [];
|
|
82
83
|
}, []);
|
|
83
|
-
var newCarts = formatCarts(carts, resources);
|
|
84
84
|
var forms = useMemo(function () {
|
|
85
|
+
var newCarts = formatCarts(carts, resources, utils);
|
|
85
86
|
if (!(newCarts !== null && newCarts !== void 0 && newCarts.length) || !(resources !== null && resources !== void 0 && resources.length)) return [];
|
|
86
87
|
return formatForms(newCarts) || [];
|
|
87
|
-
}, [
|
|
88
|
+
}, [carts, resources]);
|
|
88
89
|
useEffect(function () {
|
|
89
90
|
var _forms$currentFormInd;
|
|
90
91
|
if (!(forms !== null && forms !== void 0 && forms.length)) return;
|
|
@@ -84,17 +84,27 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
84
84
|
},
|
|
85
85
|
callback: function () {
|
|
86
86
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
87
|
-
var
|
|
87
|
+
var session, product, startDate, endDate, _data$origin, resources, activeStatus, index, description;
|
|
88
88
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
89
89
|
while (1) switch (_context.prev = _context.next) {
|
|
90
90
|
case 0:
|
|
91
|
+
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
92
|
+
_context.next = 3;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
if (type === 'session') {
|
|
96
|
+
appointmentBooking.closeProductDetail();
|
|
97
|
+
appointmentBooking.getAvailableDate();
|
|
98
|
+
}
|
|
99
|
+
return _context.abrupt("return");
|
|
100
|
+
case 3:
|
|
101
|
+
session = data === null || data === void 0 ? void 0 : data.session;
|
|
91
102
|
product = _objectSpread(_objectSpread({}, data), {}, {
|
|
92
103
|
options: (data === null || data === void 0 ? void 0 : data.option) || []
|
|
93
104
|
});
|
|
94
105
|
delete product.option;
|
|
95
|
-
session = data === null || data === void 0 ? void 0 : data.session;
|
|
96
106
|
if (!session) {
|
|
97
|
-
_context.next =
|
|
107
|
+
_context.next = 14;
|
|
98
108
|
break;
|
|
99
109
|
}
|
|
100
110
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
|
@@ -111,28 +121,28 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
111
121
|
startDate: startDate,
|
|
112
122
|
endDate: endDate
|
|
113
123
|
});
|
|
114
|
-
_context.next =
|
|
124
|
+
_context.next = 22;
|
|
115
125
|
break;
|
|
116
|
-
case
|
|
126
|
+
case 14:
|
|
117
127
|
resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
|
|
118
128
|
activeStatus = resources.find(function (item) {
|
|
119
129
|
return item.status === 1;
|
|
120
130
|
});
|
|
121
131
|
if (activeStatus) {
|
|
122
|
-
_context.next =
|
|
132
|
+
_context.next = 18;
|
|
123
133
|
break;
|
|
124
134
|
}
|
|
125
135
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
|
126
|
-
case
|
|
136
|
+
case 18:
|
|
127
137
|
appointmentBooking.storeProduct(product);
|
|
128
138
|
// duration 类型的商品,要获取一下资源
|
|
129
139
|
if (!(type === 'duration')) {
|
|
130
|
-
_context.next =
|
|
140
|
+
_context.next = 22;
|
|
131
141
|
break;
|
|
132
142
|
}
|
|
133
|
-
_context.next =
|
|
143
|
+
_context.next = 22;
|
|
134
144
|
return appointmentBooking.getAvailableDate();
|
|
135
|
-
case
|
|
145
|
+
case 22:
|
|
136
146
|
// 先选择日期流程
|
|
137
147
|
if (isDateSelectedFirst) {
|
|
138
148
|
index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
|
|
@@ -151,7 +161,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
151
161
|
removeStep('select-time');
|
|
152
162
|
}
|
|
153
163
|
}
|
|
154
|
-
case
|
|
164
|
+
case 23:
|
|
155
165
|
case "end":
|
|
156
166
|
return _context.stop();
|
|
157
167
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TasksManager } from '../../utils/tasks';
|
|
3
|
+
interface AppointmentBookingContextType {
|
|
4
|
+
appointmentBooking: any;
|
|
5
|
+
times: any[];
|
|
6
|
+
resources: any[];
|
|
7
|
+
setTimes: (times: any[]) => void;
|
|
8
|
+
setResources: (lists: any[]) => void;
|
|
9
|
+
carts: any[];
|
|
10
|
+
summary: any;
|
|
11
|
+
setCarts: (val: any[]) => void;
|
|
12
|
+
setSummary: (val: any) => void;
|
|
13
|
+
currentStep: any;
|
|
14
|
+
setCurrentStep: (val: any) => void;
|
|
15
|
+
appHelper?: any;
|
|
16
|
+
symbolic?: any;
|
|
17
|
+
resourceOtherParams?: any;
|
|
18
|
+
setResourceOtherParams: (val: any) => void;
|
|
19
|
+
selectedTime: any;
|
|
20
|
+
setSelectedTime: (val: any) => void;
|
|
21
|
+
isAgreeDepositPolicy: boolean;
|
|
22
|
+
setIsAgreeDepositPolicy: (val: boolean) => void;
|
|
23
|
+
isLastStep: boolean;
|
|
24
|
+
tasksManager: TasksManager;
|
|
25
|
+
policyParams: any;
|
|
26
|
+
setPolicyParams: (val: any) => void;
|
|
27
|
+
openPolicy: (content: any, callback?: any) => void;
|
|
28
|
+
closePolicy: (val?: boolean) => void;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
export declare const AppointmentBookingProvider: ({ children, }: {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}) => JSX.Element;
|
|
34
|
+
export declare const useAppointmentBookingContext: () => AppointmentBookingContextType | undefined;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export declare const useAppointmentBooking: () => any;
|
|
2
|
+
export declare const useShopDiscount: () => any;
|
|
3
|
+
export declare const contextUtils: () => any;
|
|
4
|
+
/**
|
|
5
|
+
* @title: 监听步骤发生变化
|
|
6
|
+
* @description:
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: WangHan
|
|
9
|
+
* @Date: 2025-04-15 11:11
|
|
10
|
+
*/
|
|
11
|
+
export declare const useAppointmentBookingStep: () => {
|
|
12
|
+
getStepIndex: (type: string, skipNumber?: number) => any;
|
|
13
|
+
stepList: any;
|
|
14
|
+
removeStep: (key: string) => any;
|
|
15
|
+
addStep: (props: any, stepKey?: string) => any;
|
|
16
|
+
updateStep: (key: string, step: any) => void;
|
|
17
|
+
nextStep: () => void;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @title: 获取商品数据
|
|
21
|
+
* @description:
|
|
22
|
+
* @return {*}
|
|
23
|
+
* @Author: WangHan
|
|
24
|
+
* @Date: 2025-04-15 11:12
|
|
25
|
+
*/
|
|
26
|
+
export declare const useAppointmentBookingProduct: () => {
|
|
27
|
+
checkProductType: (productId: number) => Promise<any>;
|
|
28
|
+
getProducts: () => Promise<any>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @title: 更新购物车数据
|
|
32
|
+
* @description:
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: WangHan
|
|
35
|
+
* @Date: 2025-04-15 11:12
|
|
36
|
+
*/
|
|
37
|
+
export declare const useAppointmentBookingCart: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* @title: 获取登录状态
|
|
40
|
+
* @description:
|
|
41
|
+
* @return {*}
|
|
42
|
+
* @Author: WangHan
|
|
43
|
+
* @Date: 2025-04-15 11:14
|
|
44
|
+
*/
|
|
45
|
+
export declare const useAppointmentBookingLogin: () => {
|
|
46
|
+
isLogin: boolean;
|
|
47
|
+
openLoginModal: (params: {
|
|
48
|
+
callback: any;
|
|
49
|
+
}) => void;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* @title: 获取账户
|
|
53
|
+
* @description:
|
|
54
|
+
* @return {*}
|
|
55
|
+
* @Author: WangHan
|
|
56
|
+
* @Date: 2025-04-15 11:15
|
|
57
|
+
*/
|
|
58
|
+
export declare const useAppointmentBookingAccount: () => {
|
|
59
|
+
accountLists: any;
|
|
60
|
+
getHolders: () => Promise<any>;
|
|
61
|
+
form_id: any;
|
|
62
|
+
addAccount: (val: any, type?: string) => Promise<any>;
|
|
63
|
+
checkAccount: (type: any) => any;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @title: 获取资源数据
|
|
67
|
+
* @description:
|
|
68
|
+
* @return {*}
|
|
69
|
+
* @Author: WangHan
|
|
70
|
+
* @Date: 2025-04-15 11:29
|
|
71
|
+
*/
|
|
72
|
+
export declare const useAppointmentBookingResource: () => {
|
|
73
|
+
getResourceTimeSlot: (index?: number) => Promise<void>;
|
|
74
|
+
getResourceList: () => {
|
|
75
|
+
resources: any;
|
|
76
|
+
resourceCodes: any;
|
|
77
|
+
};
|
|
78
|
+
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* @title: 是否跳过资源选择步骤
|
|
82
|
+
* @description:
|
|
83
|
+
* @return {*}
|
|
84
|
+
* @Author: WangHan
|
|
85
|
+
* @Date: 2025-04-21 11:47
|
|
86
|
+
*/
|
|
87
|
+
export declare const useIsSkipResourceStep: () => {
|
|
88
|
+
checkSkipResourceStep: (isSkipUpdateFormStep?: boolean) => Promise<boolean>;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* @title: 获取预约配置
|
|
92
|
+
* @description:
|
|
93
|
+
* @return {*}
|
|
94
|
+
* @Author: WangHan
|
|
95
|
+
* @Date: 2025-04-24 18:15
|
|
96
|
+
*/
|
|
97
|
+
export declare const useAppointmentBookingSetting: () => {
|
|
98
|
+
isDateSelectedFirst: boolean;
|
|
99
|
+
isFormSubject: boolean;
|
|
100
|
+
customPageId: any;
|
|
101
|
+
channel: any;
|
|
102
|
+
bookingSubject: any;
|
|
103
|
+
setOtherData: (key: string, val: any) => any;
|
|
104
|
+
getOtherData: (key: string) => any;
|
|
105
|
+
formName: any;
|
|
106
|
+
};
|
|
@@ -372,7 +372,6 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
372
372
|
var _ref12 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o2 = appointmentBooking.otherParams) === null || _appointmentBooking$o2 === void 0 ? void 0 : _appointmentBooking$o2.productModuleParams) || {},
|
|
373
373
|
bookingSubject = _ref12.bookingSubject;
|
|
374
374
|
var form_id = bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.form_id;
|
|
375
|
-
var customer = getCustomer();
|
|
376
375
|
|
|
377
376
|
// 获取账户列表数据
|
|
378
377
|
var getAccountLists = /*#__PURE__*/function () {
|
|
@@ -423,17 +422,18 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
423
422
|
var getHolders = /*#__PURE__*/function () {
|
|
424
423
|
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
425
424
|
var _utils$getStore$getSt;
|
|
426
|
-
var shop_id, params, data, newData;
|
|
425
|
+
var shop_id, customer, params, data, newData;
|
|
427
426
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
428
427
|
while (1) switch (_context8.prev = _context8.next) {
|
|
429
428
|
case 0:
|
|
430
429
|
shop_id = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.shop) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.id;
|
|
430
|
+
customer = getCustomer(utils);
|
|
431
431
|
if (!(!shop_id || !form_id || !(customer !== null && customer !== void 0 && customer.id))) {
|
|
432
|
-
_context8.next =
|
|
432
|
+
_context8.next = 4;
|
|
433
433
|
break;
|
|
434
434
|
}
|
|
435
435
|
return _context8.abrupt("return", []);
|
|
436
|
-
case
|
|
436
|
+
case 4:
|
|
437
437
|
params = {
|
|
438
438
|
url: '/form/data/v1',
|
|
439
439
|
query: {
|
|
@@ -442,9 +442,9 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
442
442
|
shop_id: shop_id
|
|
443
443
|
}
|
|
444
444
|
};
|
|
445
|
-
_context8.next =
|
|
445
|
+
_context8.next = 7;
|
|
446
446
|
return appointmentBooking.fetchHolderAccountsAsync(params);
|
|
447
|
-
case
|
|
447
|
+
case 7:
|
|
448
448
|
data = _context8.sent;
|
|
449
449
|
newData = data === null || data === void 0 ? void 0 : data.map(function (item) {
|
|
450
450
|
return {
|
|
@@ -453,7 +453,7 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
453
453
|
};
|
|
454
454
|
});
|
|
455
455
|
return _context8.abrupt("return", newData || []);
|
|
456
|
-
case
|
|
456
|
+
case 10:
|
|
457
457
|
case "end":
|
|
458
458
|
return _context8.stop();
|
|
459
459
|
}
|
|
@@ -467,19 +467,20 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
467
467
|
// 添加账户
|
|
468
468
|
var addAccount = /*#__PURE__*/function () {
|
|
469
469
|
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(val, type) {
|
|
470
|
-
var result;
|
|
470
|
+
var customer, result;
|
|
471
471
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
472
472
|
while (1) switch (_context9.prev = _context9.next) {
|
|
473
473
|
case 0:
|
|
474
|
-
|
|
474
|
+
customer = getCustomer(utils);
|
|
475
|
+
_context9.next = 3;
|
|
475
476
|
return appointmentBooking.addAccount(val, {
|
|
476
477
|
type: type,
|
|
477
478
|
customerId: customer === null || customer === void 0 ? void 0 : customer.id
|
|
478
479
|
});
|
|
479
|
-
case
|
|
480
|
+
case 3:
|
|
480
481
|
result = _context9.sent;
|
|
481
482
|
return _context9.abrupt("return", result);
|
|
482
|
-
case
|
|
483
|
+
case 5:
|
|
483
484
|
case "end":
|
|
484
485
|
return _context9.stop();
|
|
485
486
|
}
|
|
@@ -731,12 +732,6 @@ export var useAppointmentBookingSetting = function useAppointmentBookingSetting(
|
|
|
731
732
|
customPageId = _ref21.customPageId,
|
|
732
733
|
channel = _ref21.channel;
|
|
733
734
|
|
|
734
|
-
// 加载日历接口
|
|
735
|
-
var getLoadAllSchedule = function getLoadAllSchedule() {
|
|
736
|
-
var res = appointmentBooking.loadAllSchedule();
|
|
737
|
-
console.log(res, 'loadAllSchedule');
|
|
738
|
-
};
|
|
739
|
-
|
|
740
735
|
// 设置缓存
|
|
741
736
|
var setOtherData = function setOtherData(key, val) {
|
|
742
737
|
return appointmentBooking.setOtherData(key, val);
|
|
@@ -756,7 +751,6 @@ export var useAppointmentBookingSetting = function useAppointmentBookingSetting(
|
|
|
756
751
|
isFormSubject: (bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.type) === 'form',
|
|
757
752
|
customPageId: customPageId,
|
|
758
753
|
channel: channel,
|
|
759
|
-
getLoadAllSchedule: getLoadAllSchedule,
|
|
760
754
|
bookingSubject: bookingSubject,
|
|
761
755
|
setOtherData: setOtherData,
|
|
762
756
|
getOtherData: getOtherData,
|
|
@@ -4,18 +4,15 @@ import useEngineContext from "../../hooks/useEngineContext";
|
|
|
4
4
|
import { AppointmentBookingProvider } from "./context";
|
|
5
5
|
import Content from "./components/Content";
|
|
6
6
|
import localeTexts from "./locales";
|
|
7
|
-
import { useAppointmentBooking } from "./hooks";
|
|
7
|
+
import { useAppointmentBooking, contextUtils } from "./hooks";
|
|
8
8
|
import { formatCurrentUser } from "./utils";
|
|
9
9
|
import "./index.less";
|
|
10
10
|
var AppointmentBooking = function AppointmentBooking() {
|
|
11
11
|
var _context$engine;
|
|
12
12
|
var context = useEngineContext();
|
|
13
13
|
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
|
|
14
|
+
var utils = contextUtils();
|
|
14
15
|
var appointmentBooking = useAppointmentBooking();
|
|
15
|
-
|
|
16
|
-
// 初始化项目的时候,用于预加载 schedule 数据
|
|
17
|
-
appointmentBooking.loadAllSchedule();
|
|
18
|
-
var currentUser = formatCurrentUser();
|
|
19
16
|
useEffect(function () {
|
|
20
17
|
var _appointmentBooking$o;
|
|
21
18
|
var _ref = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
|
|
@@ -25,6 +22,7 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
|
25
22
|
if ((bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.type) === 'form') return;
|
|
26
23
|
appointmentBooking.getAccounts().then(function (data) {
|
|
27
24
|
if (!data.length) {
|
|
25
|
+
var currentUser = formatCurrentUser(utils);
|
|
28
26
|
appointmentBooking.addAccounts([currentUser]);
|
|
29
27
|
}
|
|
30
28
|
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 格式化holder表数据
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {any} data
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2025-05-07 21:22
|
|
8
|
+
*/
|
|
9
|
+
export declare const formatHolder: (data: any[]) => any[];
|
|
10
|
+
export declare const formatGuest: (data: any[], products: any) => any[];
|
|
11
|
+
/**
|
|
12
|
+
* @title: 格式化购物车中资源上挂接的表单数据
|
|
13
|
+
* @description:
|
|
14
|
+
* @param {any} data
|
|
15
|
+
* @param {any} resources
|
|
16
|
+
* @return {*}
|
|
17
|
+
* @Author: WangHan
|
|
18
|
+
* @Date: 2025-05-06 22:22
|
|
19
|
+
*/
|
|
20
|
+
export declare const formatCartsResources: (carts: any[], resources: any[], setPolicyIds: any) => any[];
|
|
21
|
+
/**
|
|
22
|
+
* @title: 格式化购物车数据
|
|
23
|
+
* @description:
|
|
24
|
+
* @param {any} data
|
|
25
|
+
* @param {any} resources
|
|
26
|
+
* @param {any} accountLists
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: WangHan
|
|
29
|
+
* @Date: 2025-05-07 21:22
|
|
30
|
+
*/
|
|
31
|
+
export declare const formatCarts: (data: any[], resources: any[], utils: any, accountLists?: any) => any[];
|
|
32
|
+
/**
|
|
33
|
+
* @title: 对资源进行排序
|
|
34
|
+
* @description:
|
|
35
|
+
* @param {any} currentResourcesMap
|
|
36
|
+
* @param {any} resourceSort
|
|
37
|
+
* @return {*}
|
|
38
|
+
* @Author: WangHan
|
|
39
|
+
* @Date: 2025-04-14 11:16
|
|
40
|
+
*/
|
|
41
|
+
export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
|
|
42
|
+
export declare const getMeAccount: (val: any[]) => any;
|
|
43
|
+
export declare const getCustomer: (utils: any) => any;
|
|
44
|
+
export declare const formatCustomer: (val: any) => {
|
|
45
|
+
id: any;
|
|
46
|
+
username: string;
|
|
47
|
+
};
|
|
48
|
+
export declare const formatCurrentUser: (utils: any) => {
|
|
49
|
+
id: any;
|
|
50
|
+
username: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @title: 定金合并的标点符号
|
|
54
|
+
* @description:
|
|
55
|
+
* @return {*}
|
|
56
|
+
* @Author: WangHan
|
|
57
|
+
* @Date: 2025-04-21 17:52
|
|
58
|
+
*/
|
|
59
|
+
export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
|
|
60
|
+
/**
|
|
61
|
+
* @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
|
|
62
|
+
* @description:
|
|
63
|
+
* @param {any} array
|
|
64
|
+
* @param {any} resources
|
|
65
|
+
* @return {*}
|
|
66
|
+
* @Author: WangHan
|
|
67
|
+
* @Date: 2025-04-25 19:05
|
|
68
|
+
*/
|
|
69
|
+
export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
|
|
70
|
+
export declare const formatForms: (array: any[]) => ({
|
|
71
|
+
form_id: any;
|
|
72
|
+
policy_id: any;
|
|
73
|
+
id: any;
|
|
74
|
+
cart_id: any;
|
|
75
|
+
} | null)[];
|
|
76
|
+
/**
|
|
77
|
+
* @title: 打开表单
|
|
78
|
+
* @description:
|
|
79
|
+
* @param {string} title
|
|
80
|
+
* @param {any} callback
|
|
81
|
+
* @return {*}
|
|
82
|
+
* @Author: WangHan
|
|
83
|
+
* @Date: 2025-04-26 15:26
|
|
84
|
+
*/
|
|
85
|
+
export declare const openForm: ({ form_id, title, callback, utils }: any) => void;
|
|
86
|
+
/**
|
|
87
|
+
* @title: 更新数组
|
|
88
|
+
* @description:
|
|
89
|
+
* @return {*}
|
|
90
|
+
* @Author: WangHan
|
|
91
|
+
* @Date: 2025-04-26 18:13
|
|
92
|
+
*/
|
|
93
|
+
export declare function updateLists<T extends Record<string, any>>(list: T[], key: string, value: any, newData: Partial<T>): T[];
|
|
94
|
+
/**
|
|
95
|
+
* @title: 更新表单存储
|
|
96
|
+
* @description:
|
|
97
|
+
* @param {any} bookingForm
|
|
98
|
+
* @param {number} id
|
|
99
|
+
* @param {any} newData
|
|
100
|
+
* @return {*}
|
|
101
|
+
* @Author: WangHan
|
|
102
|
+
* @Date: 2025-04-27 17:27
|
|
103
|
+
*/
|
|
104
|
+
export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
|
|
105
|
+
export declare const Toast: (text: string) => void;
|
|
106
|
+
/**
|
|
107
|
+
* @title: 添加或移除表单步骤
|
|
108
|
+
* @description:
|
|
109
|
+
* @param {any} param1
|
|
110
|
+
* @return {*}
|
|
111
|
+
* @Author: WangHan
|
|
112
|
+
* @Date: 2025-05-06 21:51
|
|
113
|
+
*/
|
|
114
|
+
export declare const checkHasFormStep: ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
|