@pisell/private-materials 6.6.55 → 6.6.56

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 (63) hide show
  1. package/build/lowcode/render/default/view.css +1 -1
  2. package/build/lowcode/render/default/view.js +1 -1
  3. package/build/lowcode/view.css +1 -1
  4. package/build/lowcode/view.js +1 -1
  5. package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
  6. package/es/components/booking/addons/index.js +2 -3
  7. package/es/components/booking/components/footer/amount.js +1 -1
  8. package/es/components/booking/components/footer/index.js +0 -7
  9. package/es/components/booking/components/footer/utils.d.ts +1 -1
  10. package/es/components/booking/components/footer/utils.js +5 -7
  11. package/es/components/booking/components/voucher/index.js +0 -6
  12. package/es/components/booking/components/voucher/index.less +1 -4
  13. package/es/components/booking/components/voucherModal/index.less +0 -1
  14. package/es/components/booking/info/service2/utils.d.ts +219 -0
  15. package/es/components/booking/info2/service/editService/index.js +2 -8
  16. package/es/components/checkout/components/WalletPassModule/index.js +0 -1
  17. package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  18. package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
  19. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  20. package/es/components/checkout/hooks/useWalletPass.js +192 -316
  21. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  22. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
  23. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  24. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  25. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  26. package/es/components/pay/toC/index.js +27 -66
  27. package/es/components/pay/toC/model.d.ts +0 -1
  28. package/es/components/pay/toC/serve.d.ts +0 -18
  29. package/es/components/pay/toC/serve.js +1 -29
  30. package/es/components/pay/toC/utils.d.ts +2 -2
  31. package/es/components/pay/toC/utils.js +0 -4
  32. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
  33. package/es/pro/Login2.0/components/phoneValidation.js +65 -58
  34. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
  35. package/lib/components/booking/addons/index.js +2 -3
  36. package/lib/components/booking/components/footer/amount.js +1 -1
  37. package/lib/components/booking/components/footer/index.js +0 -9
  38. package/lib/components/booking/components/footer/utils.d.ts +1 -1
  39. package/lib/components/booking/components/footer/utils.js +3 -5
  40. package/lib/components/booking/components/voucher/index.js +0 -6
  41. package/lib/components/booking/components/voucher/index.less +1 -4
  42. package/lib/components/booking/components/voucherModal/index.less +0 -1
  43. package/lib/components/booking/info/service2/utils.d.ts +219 -0
  44. package/lib/components/booking/info2/service/editService/index.js +18 -24
  45. package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
  46. package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  47. package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
  48. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  49. package/lib/components/checkout/hooks/useWalletPass.js +108 -157
  50. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  51. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
  52. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  53. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  54. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  55. package/lib/components/pay/toC/index.js +11 -52
  56. package/lib/components/pay/toC/model.d.ts +0 -1
  57. package/lib/components/pay/toC/serve.d.ts +0 -18
  58. package/lib/components/pay/toC/serve.js +0 -6
  59. package/lib/components/pay/toC/utils.d.ts +2 -2
  60. package/lib/components/pay/toC/utils.js +0 -4
  61. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
  62. package/lib/pro/Login2.0/components/phoneValidation.js +4 -2
  63. package/package.json +2 -2
@@ -68,15 +68,14 @@ var formatProducts = (values) => {
68
68
  discountway: "num",
69
69
  discount_type: "discount",
70
70
  bundle_edit: (_c = item._extend) == null ? void 0 : _c.bundle_edit,
71
- product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle, item.is_price_include_tax),
71
+ product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
72
72
  "product_option_item": (0, import_utils.formatProductOption)((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
73
73
  "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
74
74
  "source_product_price": (0, import_utils.getSourceProductPrice)(item),
75
75
  "main_product_selling_price": (0, import_utils.getMainProductSellingPrice)(item) ?? (0, import_utils.formatProductPrice)(item),
76
76
  "calculated_original_price": (0, import_utils.formatOriginalPrice)(item),
77
77
  "calculated_selling_price": (0, import_utils.formatSellingPrice)(item),
78
- "tax_fee": item._extend.tax_fee,
79
- is_price_include_tax: item.is_price_include_tax
78
+ "tax_fee": item._extend.tax_fee
80
79
  };
81
80
  });
82
81
  return arr;
@@ -508,7 +508,7 @@ var getMainProductTotal = (item) => {
508
508
  if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
509
509
  const discountAmount = getDiscountAmount(bundleItem.discount_list);
510
510
  const bundleItemPrice = new import_decimal.default(bundleItem.bundle_selling_price ?? bundleItem.price ?? 0);
511
- const bundleItemTotal = bundleItemPrice;
511
+ const bundleItemTotal = bundleItemPrice.minus(discountAmount);
512
512
  total = total.add(bundleItemTotal);
513
513
  }
514
514
  }
@@ -269,15 +269,6 @@ var Footer = (props) => {
269
269
  ...getDataFromHost()
270
270
  });
271
271
  }, [state, isEdit]);
272
- (0, import_react.useEffect)(() => {
273
- window.dispatchEvent(
274
- new CustomEvent("onOriginExpectAmountWithoutDiscountChange", {
275
- detail: {
276
- originExpectAmountWithoutDiscount: total == null ? void 0 : total.originExpectAmountWithoutDiscount
277
- }
278
- })
279
- );
280
- }, [total == null ? void 0 : total.originExpectAmountWithoutDiscount]);
281
272
  (0, import_ahooks.useDebounceEffect)(() => {
282
273
  var _a2;
283
274
  if ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.addTimeModal) {
@@ -15,7 +15,7 @@ export declare const formatProductOption: (option: any) => any;
15
15
  * @Author: zhiwei.Wang
16
16
  * @Date: 2024-02-19 09:26
17
17
  */
18
- export declare const formatProductBundle: (bundle: any, is_price_include_tax: number) => any;
18
+ export declare const formatProductBundle: (bundle: any) => any;
19
19
  /**
20
20
  * 获取子商品折扣信息
21
21
  * @param item
@@ -97,7 +97,7 @@ var log = (data) => {
97
97
  ]
98
98
  });
99
99
  };
100
- var formatProductBundle = (bundle, is_price_include_tax) => {
100
+ var formatProductBundle = (bundle) => {
101
101
  if (!bundle) {
102
102
  return;
103
103
  }
@@ -137,7 +137,6 @@ var formatProductBundle = (bundle, is_price_include_tax) => {
137
137
  "option": option,
138
138
  "bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
139
139
  // "bundle_sum_price": d?.original_price || d?.original_total,
140
- is_price_include_tax,
141
140
  "metadata": {
142
141
  custom_product_bundle_map_id: d._id,
143
142
  // 子商品单数量附加费
@@ -407,7 +406,7 @@ var formatProducts = (item, quantity) => {
407
406
  "discount_per": item._extend.discount_per,
408
407
  "discount_type": item._extend.discount_type || discount_type,
409
408
  "order_detail_id": item._extend.order_detail_id || 0,
410
- "product_bundle": formatProductBundle((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle, item.is_price_include_tax),
409
+ "product_bundle": formatProductBundle((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
411
410
  "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
412
411
  "product_option_item": formatProductOption((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
413
412
  "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
@@ -417,8 +416,7 @@ var formatProducts = (item, quantity) => {
417
416
  "calculated_original_price": formatOriginalPrice(item),
418
417
  "calculated_selling_price": formatSellingPrice(item),
419
418
  "tax_fee": item._extend.tax_fee,
420
- "custom_deposit_data": item.custom_deposit_data,
421
- is_price_include_tax: item.is_price_include_tax
419
+ "custom_deposit_data": item.custom_deposit_data
422
420
  };
423
421
  };
424
422
  var formatAppointmentProductLists = (data) => {
@@ -135,17 +135,11 @@ var VoucherCard = (props) => {
135
135
  }
136
136
  onScanCode(e.detail.code);
137
137
  });
138
- const onOriginExpectAmountWithoutDiscountChange = (0, import_ahooks.useMemoizedFn)((e) => {
139
- var _a2;
140
- (_a2 = shopDiscount == null ? void 0 : shopDiscount.setOriginTotalAmount) == null ? void 0 : _a2.call(shopDiscount, e.detail.originExpectAmountWithoutDiscount);
141
- });
142
138
  (0, import_react.useEffect)(() => {
143
139
  const wrappedOnScanWallPassCode = executeIfActive(onScanWallPassCode);
144
140
  window.addEventListener("onScanWallPassCode", wrappedOnScanWallPassCode);
145
- window.addEventListener("onOriginExpectAmountWithoutDiscountChange", onOriginExpectAmountWithoutDiscountChange);
146
141
  return () => {
147
142
  window.removeEventListener("onScanWallPassCode", wrappedOnScanWallPassCode);
148
- window.removeEventListener("onOriginExpectAmountWithoutDiscountChange", onOriginExpectAmountWithoutDiscountChange);
149
143
  };
150
144
  }, []);
151
145
  const addonsMemo = (0, import_react.useMemo)(() => {
@@ -1,8 +1,5 @@
1
1
  .pisell-lowcode__booking-footer-voucher-container {
2
2
  margin-bottom: 8px;
3
- width: 100%;
4
- display: flex;
5
- flex-direction: column;
6
3
  .voucher-title {
7
4
  display: flex;
8
5
  align-items: center;
@@ -50,9 +47,9 @@
50
47
  width: 100%;
51
48
  transition: 0.2s;
52
49
  max-height: 0;
50
+ overflow: hidden;
53
51
  display: flex;
54
52
  flex-direction: column;
55
- overflow: auto;
56
53
 
57
54
  &.show {
58
55
  max-height: unset;
@@ -6,7 +6,6 @@
6
6
  .pisell-voucher-modal-content {
7
7
  max-height: 70vh;
8
8
  overflow-y: auto;
9
- display: flex;
10
9
  }
11
10
 
12
11
  // 隐藏状态下的样式优化
@@ -0,0 +1,219 @@
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) => 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>;
@@ -61,13 +61,12 @@ var import_EditTabs = __toESM(require("../../../info/service/editService/EditTab
61
61
  var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
62
62
  var import_dayjs = __toESM(require("dayjs"));
63
63
  var import_utils9 = require("../../../info/service2/Group/utils");
64
- var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
65
64
  var import_useShopDiscountModule = require("../../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
66
65
  var import_DiscountChangeModal = __toESM(require("./DiscountChangeModal"));
67
66
  var import_decimal = __toESM(require("decimal.js"));
68
67
  var submitLock = false;
69
68
  var Info = (_, ref) => {
70
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
69
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
71
70
  const [form] = import_antd.Form.useForm();
72
71
  const useTotal = import_antd.Form.useWatch("total", form);
73
72
  const useResource = import_antd.Form.useWatch("resource", form);
@@ -86,10 +85,6 @@ var Info = (_, ref) => {
86
85
  const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
87
86
  const [open, setOpen] = (0, import_react.useState)(false);
88
87
  const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
89
- const context = (0, import_useEngineContext.default)();
90
- const {
91
- getData
92
- } = (_a = context.appHelper) == null ? void 0 : _a.utils;
93
88
  const valuesRef = (0, import_react.useRef)({});
94
89
  const noInOriginalDiscountIdsRef = (0, import_react.useRef)([]);
95
90
  const isEditedRef = (0, import_react.useRef)(false);
@@ -107,7 +102,7 @@ var Info = (_, ref) => {
107
102
  return true;
108
103
  }
109
104
  return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils4.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
110
- }, [(_b = state == null ? void 0 : state.service) == null ? void 0 : _b.cacheItem]);
105
+ }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
111
106
  const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
112
107
  let values = form.getFieldsValue();
113
108
  let _item = _cacheItem || state.service.cacheItem;
@@ -137,7 +132,7 @@ var Info = (_, ref) => {
137
132
  state.service.cacheItem,
138
133
  useStartTime,
139
134
  useResource,
140
- (_e = (_d = (_c = state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.basic) == null ? void 0 : _e.service_time
135
+ (_d = (_c = (_b = state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.service_time
141
136
  ]);
142
137
  const flexibleOption = (0, import_react.useMemo)(() => {
143
138
  const op = (0, import_utils7.getFlexibleOption)({
@@ -159,7 +154,7 @@ var Info = (_, ref) => {
159
154
  durationProps,
160
155
  useStartTime,
161
156
  currentResource,
162
- (_h = (_g = (_f = state.bookingConfig) == null ? void 0 : _f.config) == null ? void 0 : _g.basic) == null ? void 0 : _h.service_time,
157
+ (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time,
163
158
  useDuration
164
159
  ]);
165
160
  (0, import_react.useEffect)(() => {
@@ -256,7 +251,6 @@ var Info = (_, ref) => {
256
251
  }, 1500);
257
252
  let _list = [...state.service.value];
258
253
  let _item = {
259
- is_price_include_tax: getData("is_price_include_tax"),
260
254
  ...cacheItem ?? state.service.cacheItem,
261
255
  autoClose: false
262
256
  };
@@ -436,7 +430,7 @@ var Info = (_, ref) => {
436
430
  let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
437
431
  let cPrice = Number(useTotal || 0);
438
432
  return cPrice !== oPrice;
439
- }, [useTotal, (_j = (_i = state.service.cacheItem) == null ? void 0 : _i._extend) == null ? void 0 : _j.origin_total]);
433
+ }, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
440
434
  const getResources = () => {
441
435
  var _a2, _b2;
442
436
  let res = (0, import_utils7.formatResources)({
@@ -500,11 +494,11 @@ var Info = (_, ref) => {
500
494
  }, [state.service.editModal, state.isBookingCreatePage]);
501
495
  (0, import_react.useEffect)(() => {
502
496
  getDiscount();
503
- }, [useTotal, (_l = (_k = state.service.cacheItem) == null ? void 0 : _k._extend) == null ? void 0 : _l.origin_total]);
497
+ }, [useTotal, (_k = (_j = state.service.cacheItem) == null ? void 0 : _j._extend) == null ? void 0 : _k.origin_total]);
504
498
  const bundles = (0, import_react.useMemo)(() => {
505
499
  var _a2, _b2, _c2, _d2;
506
500
  return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
507
- }, [(_p = (_o = (_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n._extend) == null ? void 0 : _o.other) == null ? void 0 : _p.bundle]);
501
+ }, [(_o = (_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.other) == null ? void 0 : _o.bundle]);
508
502
  const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
509
503
  var _a2, _b2, _c2, _d2, _e2;
510
504
  const item = state.service.cacheItem;
@@ -635,7 +629,7 @@ var Info = (_, ref) => {
635
629
  }
636
630
  return false;
637
631
  }, [state.renderType, isNormalProduct]);
638
- const SelectTime = (_q = window.BaseMaterials) == null ? void 0 : _q.SelectTime;
632
+ const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
639
633
  const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
640
634
  const items = (0, import_react.useMemo)(() => {
641
635
  var _a2, _b2;
@@ -672,7 +666,7 @@ var Info = (_, ref) => {
672
666
  }
673
667
  ))));
674
668
  }, [
675
- (_t = (_s = (_r = state.service) == null ? void 0 : _r.cacheItem) == null ? void 0 : _s._extend) == null ? void 0 : _t.product_name,
669
+ (_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name,
676
670
  bundles,
677
671
  state.amountSymbol,
678
672
  state.isBookingCreatePage
@@ -717,7 +711,7 @@ var Info = (_, ref) => {
717
711
  ));
718
712
  }, [
719
713
  useTotal,
720
- (_v = (_u = state.service.cacheItem) == null ? void 0 : _u._extend) == null ? void 0 : _v.origin_total,
714
+ (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total,
721
715
  state.amountSymbol,
722
716
  state.channelDisabledEdit
723
717
  ]);
@@ -765,7 +759,7 @@ var Info = (_, ref) => {
765
759
  }
766
760
  ) : null
767
761
  ));
768
- }, [SelectTime, (_z = (_y = (_x = (_w = state.bookingConfig) == null ? void 0 : _w.config) == null ? void 0 : _x.basic) == null ? void 0 : _y.service_time) == null ? void 0 : _z.value, isEditGroup]);
762
+ }, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value, isEditGroup]);
769
763
  const endTime = (0, import_react.useMemo)(() => {
770
764
  if (!isEditGroup) {
771
765
  return null;
@@ -804,8 +798,8 @@ var Info = (_, ref) => {
804
798
  ));
805
799
  }, [
806
800
  state.renderType,
807
- (_B = (_A = state.service.cacheItem) == null ? void 0 : _A._data) == null ? void 0 : _B.resources,
808
- (_D = (_C = state.service.cacheItem) == null ? void 0 : _C._data) == null ? void 0 : _D.resourceMaps
801
+ (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources,
802
+ (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps
809
803
  ]);
810
804
  const holder = (0, import_react.useMemo)(() => {
811
805
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
@@ -843,7 +837,7 @@ var Info = (_, ref) => {
843
837
  }, [
844
838
  state.locale,
845
839
  state.isTerminal,
846
- (_G = (_F = (_E = state.service) == null ? void 0 : _E.cacheItem) == null ? void 0 : _F._data) == null ? void 0 : _G.capacitys
840
+ (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys
847
841
  ]);
848
842
  const hiddenQuantity = (0, import_react.useMemo)(() => {
849
843
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
@@ -923,10 +917,10 @@ var Info = (_, ref) => {
923
917
  import_utils.locales.getText("pisell2.text.apply")
924
918
  )
925
919
  );
926
- }, [(_H = state.service.resourcesOrigin) == null ? void 0 : _H.length, isNormalProduct]);
920
+ }, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length, isNormalProduct]);
927
921
  console.log("render edit");
928
922
  console.log(
929
- state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
923
+ state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose),
930
924
  performance.now() - window.pp1,
931
925
  "打开商品1"
932
926
  );
@@ -1061,7 +1055,7 @@ var Info = (_, ref) => {
1061
1055
  zIndex: state.service.changeService ? 999 : 1e3,
1062
1056
  forceRender: true,
1063
1057
  mask: state.drawerMask,
1064
- open: !isNoSpecAndPackage && state.service.editModal && !((_J = state.service.cacheItem) == null ? void 0 : _J.autoClose),
1058
+ open: !isNoSpecAndPackage && state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
1065
1059
  title: import_utils.locales.getText("pisell2.text.edit-service"),
1066
1060
  onClose: () => {
1067
1061
  var _a2;
@@ -1087,7 +1081,7 @@ var Info = (_, ref) => {
1087
1081
  display: currentTab === "batch_edit" ? "block" : "none"
1088
1082
  }
1089
1083
  },
1090
- /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_L = (_K = state.client) == null ? void 0 : _K.value) == null ? void 0 : _L.id) && holder),
1084
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_K = (_J = state.client) == null ? void 0 : _J.value) == null ? void 0 : _K.id) && holder),
1091
1085
  /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
1092
1086
  import_noteModal.default,
1093
1087
  {
@@ -68,7 +68,6 @@ var WalletPassModule = (0, import_react.forwardRef)(
68
68
  } = (0, import_useWalletPass.useWalletPass)({
69
69
  onSelectChange,
70
70
  customAmount,
71
- totalAmount: Number(orderInfo == null ? void 0 : orderInfo.totalAmount) || 0,
72
71
  clientId
73
72
  });
74
73
  const [expiredModalVisible, setExpiredModalVisible] = (0, import_react.useState)(false);
@@ -1,7 +1,6 @@
1
1
  declare type WalletPassDataType = Record<string, any>;
2
2
  export declare const getAvailableMaxAmount: (data: WalletPassDataType) => any;
3
3
  export declare const voucherTime: (data: WalletPassDataType, key?: string) => any;
4
- export declare const getVoucherAvailableStatus: (item: any) => boolean;
5
4
  export declare const formatMachineCodeServer2CardList: (data: WalletPassDataType[], selectId?: number[], otherProps?: Record<string, any>) => any;
6
5
  export declare const formatDiscountWalletData: (data: any, selectId?: number[]) => any;
7
6
  export interface WalletPassUsageUnit {
@@ -33,7 +33,6 @@ __export(utils_exports, {
33
33
  formatMachineCodeServer2CardList: () => formatMachineCodeServer2CardList,
34
34
  getAvailableMaxAmount: () => getAvailableMaxAmount,
35
35
  getPointCardAmount: () => getPointCardAmount,
36
- getVoucherAvailableStatus: () => getVoucherAvailableStatus,
37
36
  isSameContent: () => isSameContent,
38
37
  voucherTime: () => voucherTime
39
38
  });
@@ -44,9 +43,6 @@ var import_materials = require("@pisell/materials");
44
43
  var import_decimal = __toESM(require("decimal.js"));
45
44
  var Amount = import_materials.PisellText.Amount;
46
45
  var getAvailableMaxAmount = (data) => {
47
- if ((0, import_utils.isNumber)(data._available_max_amount)) {
48
- return data._available_max_amount;
49
- }
50
46
  return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
51
47
  };
52
48
  var voucherTime = (data, key = "expire_date") => {
@@ -59,20 +55,9 @@ var voucherTime = (data, key = "expire_date") => {
59
55
  }
60
56
  return import_utils.locales.getText("pisell2.text.walletPassPermanent");
61
57
  };
62
- var getVoucherAvailableStatus = (item) => {
63
- return item.unified_available_status === 1 && ((0, import_utils.isNumber)(item._unified_available_status) ? !!item._unified_available_status : true);
64
- };
65
58
  var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) => {
66
59
  return (data || []).map((item) => {
67
60
  var _a, _b;
68
- let disabled = false;
69
- if (item.unified_available_status === 0) {
70
- disabled = true;
71
- } else {
72
- if ((0, import_utils.isNumber)(item._unified_available_status)) {
73
- disabled = !item._unified_available_status;
74
- }
75
- }
76
61
  return {
77
62
  id: item.id,
78
63
  name: item.product_name,
@@ -89,8 +74,8 @@ var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) =>
89
74
  showQrCode: false,
90
75
  showStatus: true,
91
76
  code: item.code,
92
- disabled,
93
- disabledReason: (0, import_utils.isNumber)(item._unified_available_status) && item._unified_available_status !== 1 ? item.reason : (_a = item.unified_messages) == null ? void 0 : _a.title,
77
+ disabled: !item.unified_available_status,
78
+ disabledReason: (_a = item.unified_messages) == null ? void 0 : _a.title,
94
79
  cover: (_b = item.product) == null ? void 0 : _b.cover,
95
80
  qrCode: item.code,
96
81
  validDate: voucherTime(item),
@@ -168,7 +153,6 @@ var isSameContent = (arr1, arr2) => {
168
153
  formatMachineCodeServer2CardList,
169
154
  getAvailableMaxAmount,
170
155
  getPointCardAmount,
171
- getVoucherAvailableStatus,
172
156
  isSameContent,
173
157
  voucherTime
174
158
  });
@@ -9,7 +9,6 @@ export declare const useWalletPass: (props: {
9
9
  }[]) => void) | undefined;
10
10
  customAmount?: string | undefined;
11
11
  clientId?: number | undefined;
12
- totalAmount?: number | undefined;
13
12
  }) => {
14
13
  walletRecommendList: any[];
15
14
  userIdentificationCodes: any[];
@@ -30,6 +29,7 @@ export declare const useWalletPass: (props: {
30
29
  selectedDiscountList: any;
31
30
  handleSelectDiscount: (this: unknown, value: number[], option: any) => void;
32
31
  customerName: any;
32
+ fetchWalletRecommendList: (this: unknown, params: any) => Promise<any>;
33
33
  fetchUserIdentificationCodes: (this: unknown, params: any) => Promise<any>;
34
34
  getCachedWalletRecommendList: (this: unknown) => any;
35
35
  getCachedUserIdentificationCodes: (this: unknown) => any;