@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
|
@@ -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
|
+
};
|
|
@@ -221,7 +221,6 @@ var useAppointmentBookingAccount = () => {
|
|
|
221
221
|
const [accountLists, setAccountLists] = (0, import_react.useState)([]);
|
|
222
222
|
const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
223
223
|
const form_id = bookingSubject == null ? void 0 : bookingSubject.form_id;
|
|
224
|
-
const customer = (0, import_utils2.getCustomer)();
|
|
225
224
|
const getAccountLists = async () => {
|
|
226
225
|
const data = await appointmentBooking.getAccounts();
|
|
227
226
|
setAccountLists(data || []);
|
|
@@ -241,6 +240,7 @@ var useAppointmentBookingAccount = () => {
|
|
|
241
240
|
const getHolders = async () => {
|
|
242
241
|
var _a2, _b, _c;
|
|
243
242
|
const shop_id = (_c = (_b = (_a2 = utils.getStore().getState()) == null ? void 0 : _a2.global) == null ? void 0 : _b.shop) == null ? void 0 : _c.id;
|
|
243
|
+
const customer = (0, import_utils2.getCustomer)(utils);
|
|
244
244
|
if (!shop_id || !form_id || !(customer == null ? void 0 : customer.id)) return [];
|
|
245
245
|
const params = {
|
|
246
246
|
url: "/form/data/v1",
|
|
@@ -260,6 +260,7 @@ var useAppointmentBookingAccount = () => {
|
|
|
260
260
|
return newData || [];
|
|
261
261
|
};
|
|
262
262
|
const addAccount = async (val, type) => {
|
|
263
|
+
const customer = (0, import_utils2.getCustomer)(utils);
|
|
263
264
|
const result = await appointmentBooking.addAccount(val, { type, customerId: customer == null ? void 0 : customer.id });
|
|
264
265
|
return result;
|
|
265
266
|
};
|
|
@@ -348,10 +349,6 @@ var useAppointmentBookingSetting = () => {
|
|
|
348
349
|
const utils = contextUtils();
|
|
349
350
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
350
351
|
const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
351
|
-
const getLoadAllSchedule = () => {
|
|
352
|
-
const res = appointmentBooking.loadAllSchedule();
|
|
353
|
-
console.log(res, "loadAllSchedule");
|
|
354
|
-
};
|
|
355
352
|
const setOtherData = (key, val) => {
|
|
356
353
|
return appointmentBooking.setOtherData(key, val);
|
|
357
354
|
};
|
|
@@ -368,7 +365,6 @@ var useAppointmentBookingSetting = () => {
|
|
|
368
365
|
isFormSubject: (bookingSubject == null ? void 0 : bookingSubject.type) === "form",
|
|
369
366
|
customPageId,
|
|
370
367
|
channel,
|
|
371
|
-
getLoadAllSchedule,
|
|
372
368
|
bookingSubject,
|
|
373
369
|
setOtherData,
|
|
374
370
|
getOtherData,
|
|
@@ -45,15 +45,15 @@ var AppointmentBooking = () => {
|
|
|
45
45
|
var _a, _b;
|
|
46
46
|
const context = (0, import_useEngineContext.default)();
|
|
47
47
|
import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
|
|
48
|
+
const utils = (0, import_hooks.contextUtils)();
|
|
48
49
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
49
|
-
appointmentBooking.loadAllSchedule();
|
|
50
|
-
const currentUser = (0, import_utils2.formatCurrentUser)();
|
|
51
50
|
(0, import_react.useEffect)(() => {
|
|
52
51
|
var _a2;
|
|
53
52
|
const { bookingSubject } = ((_a2 = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a2.productModuleParams) || {};
|
|
54
53
|
if ((bookingSubject == null ? void 0 : bookingSubject.type) === "form") return;
|
|
55
54
|
appointmentBooking.getAccounts().then((data) => {
|
|
56
55
|
if (!data.length) {
|
|
56
|
+
const currentUser = (0, import_utils2.formatCurrentUser)(utils);
|
|
57
57
|
appointmentBooking.addAccounts([currentUser]);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -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;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
|
|
29
19
|
// src/components/appointmentBooking/utils.ts
|
|
@@ -50,7 +40,6 @@ __export(utils_exports, {
|
|
|
50
40
|
module.exports = __toCommonJS(utils_exports);
|
|
51
41
|
var import_utils = require("@pisell/utils");
|
|
52
42
|
var import_materials = require("@pisell/materials");
|
|
53
|
-
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
54
43
|
var formatHolder = (data) => {
|
|
55
44
|
return data == null ? void 0 : data.map((d) => {
|
|
56
45
|
return {
|
|
@@ -102,11 +91,10 @@ var formatCartsResources = (carts, resources, setPolicyIds) => {
|
|
|
102
91
|
return [];
|
|
103
92
|
}
|
|
104
93
|
};
|
|
105
|
-
var formatCarts = (data, resources, accountLists) => {
|
|
94
|
+
var formatCarts = (data, resources, utils, accountLists) => {
|
|
106
95
|
var _a;
|
|
107
96
|
try {
|
|
108
|
-
|
|
109
|
-
const utils = context.appHelper.utils || {};
|
|
97
|
+
if (!utils || !(data == null ? void 0 : data.length)) return [];
|
|
110
98
|
const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
|
|
111
99
|
const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
|
|
112
100
|
const newCarts = data == null ? void 0 : data.map((d) => {
|
|
@@ -170,14 +158,17 @@ var sortResources = (resources, resourceSort) => {
|
|
|
170
158
|
var getMeAccount = (val) => {
|
|
171
159
|
return val == null ? void 0 : val.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
172
160
|
};
|
|
173
|
-
var getCustomer = () => {
|
|
161
|
+
var getCustomer = (utils) => {
|
|
174
162
|
var _a, _b;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
163
|
+
try {
|
|
164
|
+
if (!utils) return;
|
|
165
|
+
let userInfo = (_b = (_a = utils.getStore().getState()) == null ? void 0 : _a.global) == null ? void 0 : _b.userInfo;
|
|
166
|
+
const localUserInfo = JSON.parse(utils.storage.get("customer") || "{}");
|
|
167
|
+
userInfo = (userInfo == null ? void 0 : userInfo.id) ? userInfo : localUserInfo;
|
|
168
|
+
return userInfo;
|
|
169
|
+
} catch (error) {
|
|
170
|
+
console.log(`getCustomer ${error}`);
|
|
171
|
+
}
|
|
181
172
|
};
|
|
182
173
|
var formatCustomer = (val) => {
|
|
183
174
|
let currentUserName = `${(val == null ? void 0 : val.first_name) || ""}${(val == null ? void 0 : val.last_name) ? ` ${val == null ? void 0 : val.last_name}` : ""}`;
|
|
@@ -187,8 +178,8 @@ var formatCustomer = (val) => {
|
|
|
187
178
|
username: currentUserName
|
|
188
179
|
};
|
|
189
180
|
};
|
|
190
|
-
var formatCurrentUser = () => {
|
|
191
|
-
let userInfo = getCustomer();
|
|
181
|
+
var formatCurrentUser = (utils) => {
|
|
182
|
+
let userInfo = getCustomer(utils);
|
|
192
183
|
const customer = formatCustomer(userInfo);
|
|
193
184
|
return customer;
|
|
194
185
|
};
|
|
@@ -57,7 +57,7 @@ var VoucherCard = (props) => {
|
|
|
57
57
|
var _a, _b;
|
|
58
58
|
const context = (0, import_useEngineContext.default)();
|
|
59
59
|
const { state, dispatch } = props;
|
|
60
|
-
const [showDetail, setShowDetail] = (0, import_react.useState)(
|
|
60
|
+
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
61
61
|
const { pisellos } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
62
62
|
const [code, setCode] = (0, import_react.useState)("");
|
|
63
63
|
const [discountList, setDisCountList] = (0, import_react.useState)([]);
|
|
@@ -163,10 +163,12 @@ var VoucherCard = (props) => {
|
|
|
163
163
|
const val = await shopDiscount.scanCode(code);
|
|
164
164
|
console.log(val);
|
|
165
165
|
if (val == null ? void 0 : val.isAvailable) {
|
|
166
|
+
productRef.current = val.productList;
|
|
166
167
|
dispatch({
|
|
167
168
|
type: "setService",
|
|
168
169
|
payload: {
|
|
169
|
-
value: val.productList
|
|
170
|
+
value: val.productList,
|
|
171
|
+
edit: true
|
|
170
172
|
}
|
|
171
173
|
});
|
|
172
174
|
setCode("");
|
|
@@ -180,7 +180,12 @@ var Info = (props) => {
|
|
|
180
180
|
let data = await state.apis.getServices({
|
|
181
181
|
skip: 1,
|
|
182
182
|
num: 500,
|
|
183
|
-
extension_type: state.renderType === "eventBooking" ? void 0 : [
|
|
183
|
+
extension_type: state.renderType === "eventBooking" ? void 0 : [
|
|
184
|
+
"product_appointment",
|
|
185
|
+
"appointment_ticket",
|
|
186
|
+
"session_product",
|
|
187
|
+
"session_ticket"
|
|
188
|
+
],
|
|
184
189
|
with: ["category"],
|
|
185
190
|
ids: state.renderType === "eventBooking" ? (_c2 = state.eventOtherParams) == null ? void 0 : _c2.productIds : void 0,
|
|
186
191
|
open_quotation: 1,
|
|
@@ -188,11 +193,7 @@ var Info = (props) => {
|
|
|
188
193
|
with_count: ["bundleGroup", "optionGroup"],
|
|
189
194
|
order_by_string: "sort:desc",
|
|
190
195
|
status: "published",
|
|
191
|
-
|
|
192
|
-
_config: {
|
|
193
|
-
useCache: true
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
+
schedule_date: params == null ? void 0 : params.schedule_date,
|
|
196
197
|
...dayParams
|
|
197
198
|
});
|
|
198
199
|
setLoading(false);
|
|
@@ -294,16 +295,15 @@ var Info = (props) => {
|
|
|
294
295
|
const showAddButton = (0, import_react.useMemo)(() => {
|
|
295
296
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
296
297
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
298
|
+
const currentDate = (0, import_react.useMemo)(() => {
|
|
299
|
+
return state.date.value.format("YYYY-MM-DD");
|
|
300
|
+
}, [state.date.value]);
|
|
297
301
|
(0, import_ahooks.useUpdateEffect)(() => {
|
|
298
302
|
if (state.service.addModal) {
|
|
299
|
-
getServices();
|
|
303
|
+
getServices({ schedule_date: currentDate });
|
|
300
304
|
setSearch("");
|
|
301
305
|
}
|
|
302
|
-
}, [state.service.addModal]);
|
|
303
|
-
const currentDate = (0, import_react.useMemo)(() => {
|
|
304
|
-
return state.date.value.format("YYYY-MM-DD");
|
|
305
|
-
}, [state.date.value]);
|
|
306
|
-
console.log(currentDate, "currentDate");
|
|
306
|
+
}, [state.service.addModal, currentDate]);
|
|
307
307
|
(0, import_react.useEffect)(() => {
|
|
308
308
|
if (renderMode === "current") {
|
|
309
309
|
getServices({ schedule_date: currentDate });
|
|
@@ -311,9 +311,9 @@ var Info = (props) => {
|
|
|
311
311
|
}, [renderMode, currentDate]);
|
|
312
312
|
(0, import_react.useEffect)(() => {
|
|
313
313
|
if (state.renderType === "eventBooking" && state.modalOpen) {
|
|
314
|
-
getServices();
|
|
314
|
+
getServices({ schedule_date: currentDate });
|
|
315
315
|
}
|
|
316
|
-
}, [state.renderType, state.modalOpen]);
|
|
316
|
+
}, [state.renderType, state.modalOpen, currentDate]);
|
|
317
317
|
const addButton = (0, import_react.useMemo)(() => {
|
|
318
318
|
if (isDay) {
|
|
319
319
|
return;
|
|
@@ -240,4 +240,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
240
240
|
* @Author: WangHan
|
|
241
241
|
* @Date: 2024-12-24 11:32
|
|
242
242
|
*/
|
|
243
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
243
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -299,6 +299,7 @@ var updateServices = (state, currentItem, type, other, actions) => {
|
|
|
299
299
|
}
|
|
300
300
|
if (type === "change_holder") {
|
|
301
301
|
products = handleChangeHolder(products, currentItem, other);
|
|
302
|
+
return products;
|
|
302
303
|
}
|
|
303
304
|
if (type === "add_holder") {
|
|
304
305
|
(_c = actions == null ? void 0 : actions.handleAddHolder) == null ? void 0 : _c.call(actions, products, currentItem);
|
|
@@ -138,7 +138,13 @@ var Info = (props) => {
|
|
|
138
138
|
let data = await state.apis.getServices({
|
|
139
139
|
skip: 1,
|
|
140
140
|
num: 500,
|
|
141
|
-
extension_type: state.renderType === "eventBooking" ? void 0 : [
|
|
141
|
+
extension_type: state.renderType === "eventBooking" ? void 0 : [
|
|
142
|
+
"product_appointment",
|
|
143
|
+
"appointment_ticket",
|
|
144
|
+
"service_product",
|
|
145
|
+
"session_product",
|
|
146
|
+
"session_ticket"
|
|
147
|
+
],
|
|
142
148
|
with: ["category", "resourceRelation"],
|
|
143
149
|
ids: state.renderType === "eventBooking" ? (_c2 = state.eventOtherParams) == null ? void 0 : _c2.productIds : void 0,
|
|
144
150
|
open_quotation: 1,
|
|
@@ -146,11 +152,7 @@ var Info = (props) => {
|
|
|
146
152
|
with_count: ["bundleGroup", "optionGroup"],
|
|
147
153
|
order_by_string: "sort:desc",
|
|
148
154
|
status: "published",
|
|
149
|
-
|
|
150
|
-
_config: {
|
|
151
|
-
useCache: true
|
|
152
|
-
}
|
|
153
|
-
}
|
|
155
|
+
schedule_date: params == null ? void 0 : params.schedule_date
|
|
154
156
|
});
|
|
155
157
|
setLoading(false);
|
|
156
158
|
if (!state.service.addModal) {
|
|
@@ -293,15 +295,15 @@ var Info = (props) => {
|
|
|
293
295
|
const showAddButton = (0, import_react.useMemo)(() => {
|
|
294
296
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
295
297
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
298
|
+
const currentDate = (0, import_react.useMemo)(() => {
|
|
299
|
+
return state.date.value.format("YYYY-MM-DD");
|
|
300
|
+
}, [state.date.value]);
|
|
296
301
|
(0, import_ahooks.useUpdateEffect)(() => {
|
|
297
302
|
if (state.service.addModal) {
|
|
298
|
-
getServices();
|
|
303
|
+
getServices({ schedule_date: currentDate });
|
|
299
304
|
setSearch("");
|
|
300
305
|
}
|
|
301
|
-
}, [state.service.addModal]);
|
|
302
|
-
const currentDate = (0, import_react.useMemo)(() => {
|
|
303
|
-
return state.date.value.format("YYYY-MM-DD");
|
|
304
|
-
}, [state.date.value]);
|
|
306
|
+
}, [state.service.addModal, currentDate]);
|
|
305
307
|
(0, import_react.useEffect)(() => {
|
|
306
308
|
if (renderMode === "current") {
|
|
307
309
|
getServices({ schedule_date: currentDate });
|
|
@@ -309,9 +311,9 @@ var Info = (props) => {
|
|
|
309
311
|
}, [renderMode, currentDate]);
|
|
310
312
|
(0, import_react.useEffect)(() => {
|
|
311
313
|
if (state.renderType === "eventBooking" && state.modalOpen) {
|
|
312
|
-
getServices();
|
|
314
|
+
getServices({ schedule_date: currentDate });
|
|
313
315
|
}
|
|
314
|
-
}, [state.renderType, state.modalOpen]);
|
|
316
|
+
}, [state.renderType, state.modalOpen, currentDate]);
|
|
315
317
|
const addButton = (0, import_react.useMemo)(() => {
|
|
316
318
|
if (state.isBookingCreatePage) {
|
|
317
319
|
return /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
|
|
@@ -163,10 +163,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
163
163
|
export declare const getDuration: (duration: number | {
|
|
164
164
|
type: string;
|
|
165
165
|
value: number;
|
|
166
|
-
}) => number | {
|
|
166
|
+
}) => number | "flexible" | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}
|
|
169
|
+
};
|
|
170
170
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
171
171
|
export declare const getIsEdit: (state: any) => boolean;
|
|
172
172
|
export {};
|