@pisell/private-materials 6.11.38 → 6.11.39

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.
Files changed (85) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/booking/addons/model.d.ts +10 -1
  8. package/es/components/booking/components/footer/index.js +38 -34
  9. package/es/components/booking/forms/model.d.ts +10 -1
  10. package/es/components/booking/hooks/usePromotion.d.ts +301 -0
  11. package/es/components/booking/hooks/useQuotation.js +12 -8
  12. package/es/components/booking/info/model.d.ts +10 -1
  13. package/es/components/booking/info/service/Lists.d.ts +3 -0
  14. package/es/components/booking/info/service2/utils.d.ts +226 -0
  15. package/es/components/booking/info2/service/editService/index.d.ts +8 -0
  16. package/es/components/booking/model.d.ts +9 -1
  17. package/es/components/booking/notes/model.d.ts +10 -1
  18. package/es/components/booking/payments/model.d.ts +10 -1
  19. package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
  20. package/es/components/eftposPay/store/index.d.ts +2 -2
  21. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  22. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  23. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  24. package/es/components/pay/toC/model.d.ts +9 -1
  25. package/es/components/schedules/model.d.ts +9 -1
  26. package/es/components/shoppingCart/components/Cart/index.d.ts +4 -0
  27. package/es/components/shoppingCart/hooks/usePromotionModal.js +4 -2
  28. package/es/components/shoppingCart/server.js +4 -2
  29. package/es/components/shoppingCart/type.d.ts +58 -0
  30. package/es/components/shoppingCart/utils.d.ts +192 -0
  31. package/es/components/shoppingCart/utils.js +1 -1
  32. package/es/components/ticketBooking/components/addServiceVariant/addService.js +13 -12
  33. package/es/pro/skuDetailModal/types.d.ts +395 -0
  34. package/lib/components/booking/addons/model.d.ts +10 -1
  35. package/lib/components/booking/components/footer/index.js +2 -1
  36. package/lib/components/booking/forms/model.d.ts +10 -1
  37. package/lib/components/booking/hooks/usePromotion.d.ts +301 -0
  38. package/lib/components/booking/hooks/useQuotation.js +6 -2
  39. package/lib/components/booking/info/model.d.ts +10 -1
  40. package/lib/components/booking/info/service/Lists.d.ts +3 -0
  41. package/lib/components/booking/info/service2/utils.d.ts +226 -0
  42. package/lib/components/booking/info2/service/editService/index.d.ts +8 -0
  43. package/lib/components/booking/model.d.ts +9 -1
  44. package/lib/components/booking/notes/model.d.ts +10 -1
  45. package/lib/components/booking/payments/model.d.ts +10 -1
  46. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  47. package/lib/components/eftposPay/store/index.d.ts +2 -2
  48. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  49. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  50. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  51. package/lib/components/pay/toC/model.d.ts +9 -1
  52. package/lib/components/schedules/model.d.ts +9 -1
  53. package/lib/components/shoppingCart/components/Cart/index.d.ts +4 -0
  54. package/lib/components/shoppingCart/hooks/usePromotionModal.js +5 -3
  55. package/lib/components/shoppingCart/server.js +3 -1
  56. package/lib/components/shoppingCart/type.d.ts +58 -0
  57. package/lib/components/shoppingCart/utils.d.ts +192 -0
  58. package/lib/components/shoppingCart/utils.js +1 -1
  59. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -2
  60. package/lib/pro/skuDetailModal/types.d.ts +395 -0
  61. package/package.json +2 -2
  62. package/es/components/booking/info2/service/editNormalService/index.d.ts +0 -3
  63. package/es/components/eftposPay/huifu/const.d.ts +0 -5
  64. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  65. package/es/components/eftposPay/payo/config.d.ts +0 -13
  66. package/es/components/eftposPay/payo/const.d.ts +0 -26
  67. package/es/components/eftposPay/tyro/const.d.ts +0 -17
  68. package/es/components/eftposPay/windcave/const.d.ts +0 -119
  69. package/es/plus/pisellSalesGrid/PisellSalesGrid.d.ts +0 -5
  70. package/es/plus/pisellSalesManagement/config/booking.d.ts +0 -185
  71. package/es/plus/pisellSalesManagement/config/order.d.ts +0 -172
  72. package/es/plus/pisellSalesManagement/hooks/useBookingPerspective.d.ts +0 -2
  73. package/es/plus/pisellSalesManagement/hooks/useOrderPerspective.d.ts +0 -2
  74. package/lib/components/booking/info2/service/editNormalService/index.d.ts +0 -3
  75. package/lib/components/eftposPay/huifu/const.d.ts +0 -5
  76. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  77. package/lib/components/eftposPay/payo/config.d.ts +0 -13
  78. package/lib/components/eftposPay/payo/const.d.ts +0 -26
  79. package/lib/components/eftposPay/tyro/const.d.ts +0 -17
  80. package/lib/components/eftposPay/windcave/const.d.ts +0 -119
  81. package/lib/plus/pisellSalesGrid/PisellSalesGrid.d.ts +0 -5
  82. package/lib/plus/pisellSalesManagement/config/booking.d.ts +0 -185
  83. package/lib/plus/pisellSalesManagement/config/order.d.ts +0 -172
  84. package/lib/plus/pisellSalesManagement/hooks/useBookingPerspective.d.ts +0 -2
  85. package/lib/plus/pisellSalesManagement/hooks/useOrderPerspective.d.ts +0 -2
@@ -0,0 +1,301 @@
1
+ /**
2
+ * 赠品信息(evaluator 返回)
3
+ */
4
+ interface GiftInfo {
5
+ strategyId: string;
6
+ strategyName: string | Record<string, string>;
7
+ giftCount: number;
8
+ giftOptions: Array<{
9
+ product_id: number;
10
+ product_variant_id: number;
11
+ }>;
12
+ }
13
+ /**
14
+ * 扩展的赠品信息(包含触发赠品的主商品ID)
15
+ */
16
+ interface ExtendedGiftInfo extends GiftInfo {
17
+ /** 触发此赠品的主商品 _id 列表 */
18
+ sourceProductIds: string[];
19
+ }
20
+ /**
21
+ * 赠品详情信息(放在 _extend._promotion.giftInfo)
22
+ */
23
+ interface PromotionGiftDetail {
24
+ strategyName: string | Record<string, string>;
25
+ giftCount: number;
26
+ giftOptions: Array<{
27
+ product_id: number;
28
+ product_variant_id: number;
29
+ }>;
30
+ }
31
+ /**
32
+ * 商品促销信息(整合后,放在 _extend._promotion)
33
+ */
34
+ interface ProductPromotionInfo {
35
+ /** 策略ID */
36
+ strategyId: string;
37
+ /** 策略元数据 */
38
+ strategyMetadata?: any;
39
+ /** 是否参与促销 */
40
+ inPromotion: boolean;
41
+ /** 原始价格 */
42
+ originalPrice: number;
43
+ /** 最终价格 */
44
+ finalPrice: number;
45
+ /** 赠品信息(仅"买X送Y"促销的第一个商品有) */
46
+ giftInfo?: PromotionGiftDetail;
47
+ }
48
+ /**
49
+ * 赠品商品上的标记信息(放在 _giftInfo)
50
+ */
51
+ interface GiftProductInfo {
52
+ /** 关联策略ID */
53
+ strategyId: string;
54
+ /** 策略名称 */
55
+ strategyName: string | Record<string, string>;
56
+ /** 触发此赠品的主商品 _id 列表 */
57
+ sourceProductIds: string[];
58
+ }
59
+ /**
60
+ * 赠品减少操作项
61
+ */
62
+ interface GiftReduceItem {
63
+ /** 赠品的 _id */
64
+ _id: string;
65
+ /** 当前数量 */
66
+ currentQuantity: number;
67
+ /** 目标数量(减少后的数量,不会是0,0的情况在toRemove处理) */
68
+ newQuantity: number;
69
+ }
70
+ /**
71
+ * 赠品操作类型
72
+ */
73
+ interface GiftAction {
74
+ /** 需要添加的赠品 */
75
+ toAdd: Array<{
76
+ strategyId: string;
77
+ strategyName: string | Record<string, string>;
78
+ giftCount: number;
79
+ giftOptions: Array<{
80
+ product_id: number;
81
+ product_variant_id: number;
82
+ }>;
83
+ /** 触发此赠品的主商品 _id 列表 */
84
+ sourceProductIds: string[];
85
+ }>;
86
+ /** 需要减少数量的赠品(数量减少但不删除) */
87
+ toReduce: Array<{
88
+ strategyId: string;
89
+ /** 具体要操作的赠品列表 */
90
+ items: GiftReduceItem[];
91
+ }>;
92
+ /** 需要完全删除的赠品 _id 列表 */
93
+ toRemove: string[];
94
+ }
95
+ /**
96
+ * 促销计算结果
97
+ */
98
+ /**
99
+ * 未满足促销条件的信息
100
+ */
101
+ interface UnfulfilledPromotion {
102
+ /** 策略ID */
103
+ strategyId: string;
104
+ /** 活动名称 */
105
+ strategyName: string | Record<string, string>;
106
+ /** 促销类型(X_ITEMS_FOR_Y_PRICE / BUY_X_GET_Y_FREE) */
107
+ actionType: string;
108
+ /** 还需要买几件 */
109
+ needQuantity: number;
110
+ /** 当前已有几件 */
111
+ currentQuantity: number;
112
+ /** 促销需要的总件数 */
113
+ requiredQuantity: number;
114
+ /** 可以参与此促销的商品列表 */
115
+ eligibleProducts: Array<{
116
+ product_id: number;
117
+ product_variant_id: number;
118
+ }>;
119
+ /** 策略元数据 */
120
+ strategyMetadata?: any;
121
+ /** 展示配置 */
122
+ display?: {
123
+ text: string | Record<string, string>;
124
+ type: string;
125
+ };
126
+ }
127
+ interface PromotionResult {
128
+ /** 处理后的商品列表(不含赠品) */
129
+ products: any[];
130
+ /** 总优惠金额 */
131
+ totalDiscount: number;
132
+ /** 扩展的赠品信息(包含 sourceProductIds) */
133
+ gifts: ExtendedGiftInfo[];
134
+ /** 赠品操作(需要添加/减少/删除的赠品) */
135
+ giftActions: GiftAction;
136
+ /** 未满足促销条件的信息(用于展示"再买X件"提示) */
137
+ unfulfilledPromotions: UnfulfilledPromotion[];
138
+ }
139
+ /**
140
+ * 赠品选择回调参数
141
+ */
142
+ interface GiftSelectionCallbackParams {
143
+ /** 策略ID */
144
+ strategyId: string;
145
+ /** 策略名称 */
146
+ strategyName: string | Record<string, string>;
147
+ /** 可选赠品列表 */
148
+ giftOptions: Array<{
149
+ product_id: number;
150
+ product_variant_id: number;
151
+ }>;
152
+ /** 可选数量 */
153
+ giftCount: number;
154
+ /** 触发此赠品的主商品 _id 列表 */
155
+ sourceProductIds: string[];
156
+ }
157
+ /**
158
+ * usePromotion 配置选项
159
+ */
160
+ interface UsePromotionOptions {
161
+ /** 需要选择赠品时的回调 */
162
+ onGiftSelection?: (params: GiftSelectionCallbackParams) => void;
163
+ }
164
+ declare const usePromotion: (state?: any, dispatch?: any, options?: UsePromotionOptions) => {
165
+ run: (this: unknown) => void;
166
+ formatProductList: (this: unknown, list: any[]) => any[];
167
+ processPromotion: (this: unknown, list: any[]) => PromotionResult;
168
+ };
169
+ export default usePromotion;
170
+ /**
171
+ * 主商品的 _extend._promotion 结构示例
172
+ *
173
+ * @example
174
+ * ```typescript
175
+ * // 1. X件Y元促销 - 已满足条件
176
+ * {
177
+ * _extend: {
178
+ * _promotion: {
179
+ * strategyId: "strategy_1",
180
+ * strategyMetadata: { ... },
181
+ * inPromotion: true,
182
+ * originalPrice: 100,
183
+ * finalPrice: 80,
184
+ * }
185
+ * }
186
+ * }
187
+ *
188
+ * // 2. X件Y元促销 - 未满足条件(如买2件享优惠,当前只买了1件)
189
+ * // UI 可以展示"再买1件即可享受2件80元"等提示
190
+ * {
191
+ * _extend: {
192
+ * _promotion: {
193
+ * strategyId: "strategy_1",
194
+ * strategyMetadata: { ... },
195
+ * inPromotion: false, // 未满足条件
196
+ * originalPrice: 100,
197
+ * finalPrice: 100, // 价格不变
198
+ * }
199
+ * }
200
+ * }
201
+ *
202
+ * // 3. 买X送Y促销的第一个商品(有 giftInfo)
203
+ * {
204
+ * _extend: {
205
+ * _promotion: {
206
+ * strategyId: "strategy_2",
207
+ * strategyMetadata: { ... },
208
+ * inPromotion: true,
209
+ * originalPrice: 100,
210
+ * finalPrice: 100,
211
+ * giftInfo: {
212
+ * strategyName: "买3送1",
213
+ * giftCount: 1,
214
+ * giftOptions: [{ product_id: 123, product_variant_id: 0 }]
215
+ * }
216
+ * }
217
+ * }
218
+ * }
219
+ *
220
+ * // 4. 买X送Y促销的其他商品(无 giftInfo)
221
+ * {
222
+ * _extend: {
223
+ * _promotion: {
224
+ * strategyId: "strategy_2",
225
+ * strategyMetadata: { ... },
226
+ * inPromotion: true,
227
+ * originalPrice: 100,
228
+ * finalPrice: 100,
229
+ * }
230
+ * }
231
+ * }
232
+ *
233
+ * // 5. 无适用促销的商品
234
+ * // 没有 _promotion 字段
235
+ * {
236
+ * _extend: {
237
+ * // 无 _promotion 字段
238
+ * }
239
+ * }
240
+ * ```
241
+ */
242
+ /**
243
+ * onGiftSelection 回调中如何构建赠品商品的示例
244
+ *
245
+ * @example
246
+ * ```tsx
247
+ * const { run, formatProductList, processPromotion } = usePromotion(state, dispatch, {
248
+ * onGiftSelection: async ({ strategyId, strategyName, giftOptions, giftCount, sourceProductIds }) => {
249
+ * // giftOptions 只包含 product_id 和 product_variant_id
250
+ * // 需要自行获取完整商品信息
251
+ *
252
+ * let selectedGiftOption = giftOptions[0]; // 默认选第一个
253
+ *
254
+ * // 如果有多个赠品选项,弹出选择弹窗
255
+ * if (giftOptions.length > 1) {
256
+ * selectedGiftOption = await showGiftSelectionModal(giftOptions);
257
+ * }
258
+ *
259
+ * // 获取完整商品信息(根据 product_id 和 product_variant_id)
260
+ * const productDetail = await fetchProductDetail(
261
+ * selectedGiftOption.product_id,
262
+ * selectedGiftOption.product_variant_id
263
+ * );
264
+ *
265
+ * // 构建赠品商品对象
266
+ * const giftProduct = {
267
+ * _id: generateStringId(), // 唯一标识
268
+ * _isGift: true, // 标记为赠品
269
+ * _giftInfo: { // 赠品关联信息(注意:赠品用 _giftInfo,主商品用 _extend._promotion)
270
+ * strategyId, // 策略ID
271
+ * strategyName, // 策略名称
272
+ * sourceProductIds, // 触发此赠品的主商品 _id 列表
273
+ * } as GiftProductInfo,
274
+ * _extend: {
275
+ * price: 0, // 赠品价格为0
276
+ * main_product_selling_price: 0,
277
+ * quantity: giftCount, // 赠品数量
278
+ * total: 0,
279
+ * origin_total: 0,
280
+ * product_name: productDetail.title,
281
+ * other: {
282
+ * product_id: selectedGiftOption.product_id,
283
+ * product_variant_id: selectedGiftOption.product_variant_id,
284
+ * },
285
+ * },
286
+ * // ... 其他商品基础信息从 productDetail 获取
287
+ * title: productDetail.title,
288
+ * price: productDetail.price, // 原价(用于展示划线价)
289
+ * // ...
290
+ * };
291
+ *
292
+ * // 添加到购物车
293
+ * dispatch({
294
+ * type: 'addService',
295
+ * payload: { value: giftProduct },
296
+ * });
297
+ * },
298
+ * });
299
+ * ```
300
+ */
301
+ export type { GiftInfo, ExtendedGiftInfo, PromotionGiftDetail, ProductPromotionInfo, GiftProductInfo, GiftAction, GiftReduceItem, GiftSelectionCallbackParams, UsePromotionOptions, PromotionResult, UnfulfilledPromotion, };
@@ -228,15 +228,19 @@ var useQuotation = (state, dispatch) => {
228
228
  const currentDate = (0, import_react.useMemo)(() => {
229
229
  return state.date.value.format("YYYY-MM-DD");
230
230
  }, [state.date.value]);
231
+ const getCartValueRef = () => {
232
+ return cartValueRef;
233
+ };
231
234
  const updateCartQuotation = async (params) => {
232
235
  const data = await getCartQuotation(params);
233
236
  if (!data || !data.length) return;
237
+ const newCartValueRef = getCartValueRef();
234
238
  const {
235
239
  isChange,
236
240
  value: newCartValue,
237
241
  isNotFoundBundle,
238
242
  notFoundProducts
239
- } = setNewCartValue(cartValueRef.current, data);
243
+ } = setNewCartValue(newCartValueRef.current, data);
240
244
  if (isNotFoundBundle) {
241
245
  setProducts(notFoundProducts);
242
246
  setOpen(true);
@@ -270,7 +274,7 @@ var useQuotation = (state, dispatch) => {
270
274
  });
271
275
  },
272
276
  [(_b = (_a = state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id, currentDate, isEditClientOrDate],
273
- { wait: 200 }
277
+ { wait: 100 }
274
278
  );
275
279
  const dom = (0, import_react.useMemo)(() => {
276
280
  return /* @__PURE__ */ import_react.default.createElement(
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Lists: ({ onEdit, onChange, onAction, isParallelResource, isShowDelete, isShowAmountFooter, isShowPromotionAlert, }: any) => React.JSX.Element;
3
+ export default Lists;
@@ -0,0 +1,226 @@
1
+ import dayjs from 'dayjs';
2
+ export declare const formatActiveKey: (lists: any[], platform: string, isEdit: boolean) => any[];
3
+ /**
4
+ * @title: 获取资源名称
5
+ * @description:
6
+ * @param {any} id
7
+ * @param {any} state
8
+ * @return {*}
9
+ * @Author: WangHan
10
+ * @Date: 2024-11-29 18:02
11
+ */
12
+ export declare const getResourceItem: (id: any, state: any) => any;
13
+ /**
14
+ * @title: 错误提示
15
+ * @description:
16
+ * @param {any} service
17
+ * @param {any} resourceItem
18
+ * @return {*}
19
+ * @Author: WangHan
20
+ * @Date: 2024-11-29 18:41
21
+ */
22
+ export declare const getErrorMessage: (service: any, resourceItem: any, isDay?: boolean) => any;
23
+ /**
24
+ * @title: 格式化主体列表
25
+ * @description:
26
+ * @param {any} lists
27
+ * @param {boolean} isOpenGroup
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2024-12-04 11:27
31
+ */
32
+ export declare const formatHolderLists: (lists: any) => any;
33
+ export declare const isBookingProduct: (extension_type: any, bol?: boolean) => boolean | undefined;
34
+ /**
35
+ * @title: 是否是预约商品
36
+ * @description:
37
+ * @return {*}
38
+ * @Author: WangHan
39
+ * @Date: 2024-12-06 11:24
40
+ */
41
+ export declare const isDayBookingProduct: (item: any, state: any) => boolean | undefined;
42
+ export declare const handleChangeHolder: (products: any[], currentItem: any, other: any) => any[];
43
+ /**
44
+ * @title: 更新商品数据
45
+ * @description:
46
+ * @param {any} state
47
+ * @param currentItem
48
+ * @param {string} type
49
+ * @param {any} other
50
+ * @param actions
51
+ * @return {*}
52
+ * @Author: WangHan
53
+ * @Date: 2025-01-03 15:00
54
+ */
55
+ export declare const updateServices: (state: any, currentItem: any, type?: string, other?: any, actions?: any) => any;
56
+ export declare const formItems: (items: any[]) => any[];
57
+ export declare const getIsSubjectRequire: (state: any) => boolean;
58
+ export declare const isNormalProductByDurationSchedule: (item: any) => boolean;
59
+ export declare const isAllNormalProduct: (items: any[]) => boolean;
60
+ export declare const isAllNormalProductByState: (state: any) => boolean;
61
+ export declare const genRowKey: (key: string) => string;
62
+ /**
63
+ * @title: 格式化商品数据
64
+ * @description:
65
+ * @param {any} lists
66
+ * @return {*}
67
+ * @Author: WangHan
68
+ * @Date: 2024-11-29 17:36
69
+ */
70
+ export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean, translationOriginal?: any) => any[];
71
+ /**
72
+ * @title: 禁用日期
73
+ * @description:
74
+ * @param {any} current
75
+ * @param {string} position
76
+ * @param {any} startDate
77
+ * @return {*}
78
+ * @Author: WangHan
79
+ * @Date: 2024-12-03 17:51
80
+ */
81
+ export declare const disabledDate: (current: any, position: string, currentDate: any) => any;
82
+ /**
83
+ * @title: 是否是跨日预约
84
+ * @description:
85
+ * @param {any} state
86
+ * @return {*}
87
+ * @Author: WangHan
88
+ * @Date: 2024-12-04 09:49
89
+ */
90
+ export declare const isDayBooking: (state: any) => boolean;
91
+ export declare const isDaysBooking: (state: any) => boolean;
92
+ export declare const isEventBooking: (state: any) => boolean;
93
+ export declare const isAppointmentProduct: (item: any) => boolean;
94
+ /**
95
+ * @title: 是否是terminal上的跨日预约
96
+ * @description:
97
+ * @param {any} state
98
+ * @return {*}
99
+ * @Author: WangHan
100
+ * @Date: 2024-12-04 15:31
101
+ */
102
+ export declare const isTerminalDayBooking: (state: any) => any;
103
+ export declare const formatDayDate: (_extend: any) => any;
104
+ /**
105
+ * @title: 根据营业日时间格式化时间
106
+ * @description:
107
+ * @param {any} state
108
+ * @return {*}
109
+ * @Author: WangHan
110
+ * @Date: 2024-12-04 12:07
111
+ */
112
+ export declare const formatDayTime: ({ startDate, endDate }: any) => {
113
+ startDateTime: dayjs.Dayjs;
114
+ endDateTime: dayjs.Dayjs;
115
+ };
116
+ export declare const formatDateTime: (start_date: any, end_date: any) => {
117
+ value: dayjs.Dayjs;
118
+ end_date: dayjs.Dayjs;
119
+ };
120
+ /**
121
+ * @title: 初始化日期
122
+ * @description:
123
+ * @return {*}
124
+ * @Author: WangHan
125
+ * @Date: 2024-12-06 17:24
126
+ */
127
+ export declare const initDate: () => {
128
+ value: dayjs.Dayjs;
129
+ end_date: dayjs.Dayjs;
130
+ };
131
+ /**
132
+ * @title: 是否有预约商品
133
+ * @description:
134
+ * @return {*}
135
+ * @Author: WangHan
136
+ * @Date: 2024-12-12 15:47
137
+ */
138
+ export declare const isHasDayAppointmentProduct: (state: any) => boolean;
139
+ /**
140
+ * @title: 过滤出如果是预约商品,则只获取跨日的预约商品
141
+ * @description:
142
+ * @param {any} lists
143
+ * @return {*}
144
+ * @Author: WangHan
145
+ * @Date: 2024-12-13 16:44
146
+ */
147
+ export declare const getDayProducts: (holderId: number, lists: any, isTerminal?: boolean) => any;
148
+ /**
149
+ * @title: 格式化表单数据
150
+ * @description:
151
+ * @param {any} state
152
+ * @return {*}
153
+ * @Author: WangHan
154
+ * @Date: 2024-12-30 22:19
155
+ */
156
+ export declare const getPets: (state: any) => any;
157
+ /**
158
+ * @title: 得出预约商品
159
+ * @description:
160
+ * @param {any} state
161
+ * @return {*}
162
+ * @Author: WangHan
163
+ * @Date: 2024-12-30 22:26
164
+ */
165
+ export declare const getAppointmentService: (state: any) => any;
166
+ /**
167
+ * @title: 判断是否打开删除宠物弹窗
168
+ * @description:
169
+ * @param {any} state
170
+ * @param {any} newVal
171
+ * @return {*}
172
+ * @Author: WangHan
173
+ * @Date: 2024-12-16 16:12
174
+ */
175
+ export declare const isOpenDeletePet: (state: any, newVal: any) => {
176
+ ids: any;
177
+ lists: any;
178
+ };
179
+ /**
180
+ * @title: 当前选中的表单id
181
+ * @description:
182
+ * @param {any} state
183
+ * @return {*}
184
+ * @Author: WangHan
185
+ * @Date: 2024-12-17 14:40
186
+ */
187
+ export declare const holderId: (state: any) => number;
188
+ /**
189
+ * @title: 更新套餐的价格
190
+ * @description:
191
+ * @param {any} currentValue
192
+ * @param {any} newBundleData
193
+ * @return {*}
194
+ * @Author: WangHan
195
+ * @Date: 2024-12-31 15:16
196
+ */
197
+ export declare function updateNormalBundlePrice(currentValue: any, newBundleData: any): any[];
198
+ /**
199
+ * @title: 更新预约商品报价单
200
+ * @description:
201
+ * @param {any} state
202
+ * @param {any} cacheItem
203
+ * @return {*}
204
+ * @Author: WangHan
205
+ * @Date: 2024-12-25 16:41
206
+ */
207
+ export declare const updateAppointmentServicePrice: (state: any, { start_date, end_date, product_id }: any) => Promise<{
208
+ multiDayPrices: any;
209
+ price: number;
210
+ }>;
211
+ /**
212
+ * @title: 更新普通商品报价单价格
213
+ * @description:
214
+ * @param {any} state
215
+ * @return {*}
216
+ * @Author: WangHan
217
+ * @Date: 2024-12-24 11:32
218
+ */
219
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
220
+ /**
221
+ * @description: 根据_id和sourceProductId来获取主商品已选择的赠品
222
+ * @param {string} productId 主商品_id
223
+ * @param {any} products 商品列表
224
+ * @return {*}
225
+ */
226
+ export declare const getSelectedGiftBySourceProductId: (sourceProductId: string, products: any) => any;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import './index.less';
4
+ export interface EditServiceRef {
5
+ init: (cacheItem?: any) => void;
6
+ }
7
+ declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
8
+ export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -110,4 +111,11 @@ export declare const walkInData: {
110
111
  id: number;
111
112
  nickname: string;
112
113
  };
113
- export declare const Provider: any, Context: any;
114
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
115
+ state: FormState;
116
+ } & {
117
+ dispatch: (params: {
118
+ type: string;
119
+ payload: any;
120
+ }) => void;
121
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import './confirmHolderModal.less';
3
+ /**
4
+ * 确认 Holder 弹窗组件(直接返回 PisellContainer,不使用 createPortal)
5
+ */
6
+ export declare const ConfirmHolderModal: React.FC;
7
+ /**
8
+ * 通过 await 调用的确认 Holder 弹窗
9
+ * @param state 状态对象
10
+ * @param dispatch dispatch 函数
11
+ * @returns Promise,resolve 时返回 void(无论点击哪个按钮都会继续执行)
12
+ */
13
+ export declare function showConfirmHolderModal(state: any, dispatch: any): Promise<void>;
@@ -299,10 +299,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
299
299
  name?: string | undefined;
300
300
  symbol?: string | undefined;
301
301
  amount?: string | number | undefined;
302
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
302
+ mode?: "refund" | "fullPay" | "pay" | "query" | undefined;
303
303
  order_id?: string | number | undefined;
304
304
  eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
305
- action?: "amount" | "deviceList" | "pay" | undefined;
305
+ action?: "deviceList" | "amount" | "pay" | undefined;
306
306
  key?: number | undefined;
307
307
  step?: number | undefined;
308
308
  title?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare type CallToBookProps = {
4
3
  show: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const StripePayment: () => import("react").JSX.Element;
4
3
  export default StripePayment;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const PageLoading: () => import("react").JSX.Element;
4
3
  export default PageLoading;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -30,4 +31,11 @@ export interface PayGroup {
30
31
  front_order_uuid?: string;
31
32
  orderDetail: any;
32
33
  }
33
- export declare const Provider: any, Context: any;
34
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
35
+ state: FormState;
36
+ } & {
37
+ dispatch: (params: {
38
+ type: string;
39
+ payload: any;
40
+ }) => void;
41
+ }>;