@pisell/private-materials 6.6.55 → 6.6.57

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 (71) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
  12. package/es/components/booking/addons/index.js +2 -3
  13. package/es/components/booking/components/footer/amount.js +1 -1
  14. package/es/components/booking/components/footer/index.js +0 -7
  15. package/es/components/booking/components/footer/utils.d.ts +1 -1
  16. package/es/components/booking/components/footer/utils.js +5 -7
  17. package/es/components/booking/components/voucher/index.js +0 -6
  18. package/es/components/booking/components/voucher/index.less +1 -4
  19. package/es/components/booking/components/voucherModal/index.less +0 -1
  20. package/es/components/booking/dashboard/index.js +3 -3
  21. package/es/components/booking/info/service2/utils.d.ts +219 -0
  22. package/es/components/booking/info2/service/editService/index.js +2 -8
  23. package/es/components/checkout/components/WalletPassModule/index.js +0 -1
  24. package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  25. package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
  26. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  27. package/es/components/checkout/hooks/useWalletPass.js +215 -331
  28. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  29. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
  30. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  31. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  32. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  33. package/es/components/pay/toC/index.js +27 -66
  34. package/es/components/pay/toC/model.d.ts +0 -1
  35. package/es/components/pay/toC/serve.d.ts +0 -18
  36. package/es/components/pay/toC/serve.js +1 -29
  37. package/es/components/pay/toC/utils.d.ts +2 -2
  38. package/es/components/pay/toC/utils.js +0 -4
  39. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
  40. package/es/pro/Login2.0/components/phoneValidation.js +65 -58
  41. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
  42. package/lib/components/booking/addons/index.js +2 -3
  43. package/lib/components/booking/components/footer/amount.js +1 -1
  44. package/lib/components/booking/components/footer/index.js +0 -9
  45. package/lib/components/booking/components/footer/utils.d.ts +1 -1
  46. package/lib/components/booking/components/footer/utils.js +3 -5
  47. package/lib/components/booking/components/voucher/index.js +0 -6
  48. package/lib/components/booking/components/voucher/index.less +1 -4
  49. package/lib/components/booking/components/voucherModal/index.less +0 -1
  50. package/lib/components/booking/dashboard/index.js +3 -3
  51. package/lib/components/booking/info/service2/utils.d.ts +219 -0
  52. package/lib/components/booking/info2/service/editService/index.js +18 -24
  53. package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
  54. package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  55. package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
  56. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  57. package/lib/components/checkout/hooks/useWalletPass.js +131 -173
  58. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  59. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
  60. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  61. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  62. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  63. package/lib/components/pay/toC/index.js +11 -52
  64. package/lib/components/pay/toC/model.d.ts +0 -1
  65. package/lib/components/pay/toC/serve.d.ts +0 -18
  66. package/lib/components/pay/toC/serve.js +0 -6
  67. package/lib/components/pay/toC/utils.d.ts +2 -2
  68. package/lib/components/pay/toC/utils.js +0 -4
  69. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
  70. package/lib/pro/Login2.0/components/phoneValidation.js +4 -2
  71. package/package.json +1 -1
@@ -28,8 +28,6 @@ import { PisellInput, PisellGoodPassCard, PisellText, PisellToast } from '@pisel
28
28
  import { useAppointmentBooking, useShopDiscount, useAppointmentBookingLogin, useAppointmentBookingAccount } from "../../hooks";
29
29
  import "../../../booking/components/voucher/index.less";
30
30
  import "./index.less";
31
- import { useAppointmentBookingContext } from "../../context";
32
- import { useDebounceFn } from 'ahooks';
33
31
  var ShopDiscountHooks = {
34
32
  onInited: 'shopDiscount:onInited',
35
33
  onDestroy: 'shopDiscount:onDestroy',
@@ -71,19 +69,11 @@ var VoucherCard = function VoucherCard(props) {
71
69
  openLoginModal = _useAppointmentBookin.openLoginModal;
72
70
  var _useAppointmentBookin2 = useAppointmentBookingAccount(),
73
71
  accountLists = _useAppointmentBookin2.accountLists;
74
- var _useAppointmentBookin3 = useAppointmentBookingContext(),
75
- summary = _useAppointmentBookin3.summary;
76
- var originTotal = summary.originTotal,
77
- total = summary.total;
78
72
  var cart = appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.cart;
79
73
  var isUserLoggedIn = useMemo(function () {
80
74
  var _utils$token, _utils$token$get;
81
75
  return !!(utils !== null && utils !== void 0 && (_utils$token = utils.token) !== null && _utils$token !== void 0 && (_utils$token$get = _utils$token.get) !== null && _utils$token$get !== void 0 && _utils$token$get.call(_utils$token)) || false;
82
76
  }, [store]);
83
- useEffect(function () {
84
- var shopDiscount = pisellos.getModule('shopDiscount');
85
- shopDiscount.setOriginTotalAmount(originTotal);
86
- }, [originTotal]);
87
77
  var availableData = useMemo(function () {
88
78
  return discountList.filter(function (item) {
89
79
  return !!item.isAvailable;
@@ -120,18 +110,13 @@ var VoucherCard = function VoucherCard(props) {
120
110
  });
121
111
  appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$b = appointmentBooking.batchUpdateCart) === null || _appointmentBooking$b === void 0 || _appointmentBooking$b.call(appointmentBooking, items);
122
112
  };
123
-
124
- // 防抖处理
125
- var _useDebounceFn = useDebounceFn(function () {
126
- var _shopDiscount$setBook, _appointmentBooking$o;
127
- var products = cart === null || cart === void 0 ? void 0 : cart.getItems();
128
- shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setBook = shopDiscount.setBookingSubject) === null || _shopDiscount$setBook === void 0 || _shopDiscount$setBook.call(shopDiscount, appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSetting) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.bookingSubject);
129
- var val = shopDiscount.calcDiscount(products);
130
- batchUpdateCart(val.productList);
131
- }, {
132
- wait: 200
133
- }),
134
- onCartChange = _useDebounceFn.run;
113
+ var onCartChange = function onCartChange() {
114
+ var _shopDiscount$setBook, _appointmentBooking$o;
115
+ var products = cart === null || cart === void 0 ? void 0 : cart.getItems();
116
+ shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setBook = shopDiscount.setBookingSubject) === null || _shopDiscount$setBook === void 0 || _shopDiscount$setBook.call(shopDiscount, appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSetting) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.bookingSubject);
117
+ var val = shopDiscount.calcDiscount(products);
118
+ batchUpdateCart(val.productList);
119
+ };
135
120
  var stringifiedHolders = useMemo(function () {
136
121
  var _ret;
137
122
  try {
@@ -60,15 +60,14 @@ export var formatProducts = function formatProducts(values) {
60
60
  discountway: 'num',
61
61
  discount_type: 'discount',
62
62
  bundle_edit: (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.bundle_edit,
63
- product_bundle: formatProductBundle((_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 || (_item$_extend3 = _item$_extend3.other) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.bundle, item.is_price_include_tax),
63
+ product_bundle: formatProductBundle((_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 || (_item$_extend3 = _item$_extend3.other) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.bundle),
64
64
  "product_option_item": formatProductOption((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 || (_item$_extend4 = _item$_extend4.other) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.option),
65
65
  "product_variant_id": ((_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 || (_item$_extend5 = _item$_extend5.other) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.product_variant_id) || 0,
66
66
  "source_product_price": getSourceProductPrice(item),
67
67
  "main_product_selling_price": (_getMainProductSellin = getMainProductSellingPrice(item)) !== null && _getMainProductSellin !== void 0 ? _getMainProductSellin : formatProductPrice(item),
68
68
  "calculated_original_price": formatOriginalPrice(item),
69
69
  "calculated_selling_price": formatSellingPrice(item),
70
- "tax_fee": item._extend.tax_fee,
71
- is_price_include_tax: item.is_price_include_tax
70
+ "tax_fee": item._extend.tax_fee
72
71
  };
73
72
  });
74
73
  return arr;
@@ -843,7 +843,7 @@ var getMainProductTotal = function getMainProductTotal(item) {
843
843
  // 子商品价格
844
844
  var bundleItemPrice = new Decimal((_ref5 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref5 !== void 0 ? _ref5 : 0);
845
845
  // todo: 套餐子商品后不需要处理 子商品价格 - 子商品折扣金额
846
- var bundleItemTotal = bundleItemPrice;
846
+ var bundleItemTotal = bundleItemPrice.minus(discountAmount);
847
847
  total = total.add(bundleItemTotal);
848
848
  }
849
849
  }
@@ -338,13 +338,6 @@ var Footer = function Footer(props) {
338
338
  ScheduleModule: ScheduleModule
339
339
  }, getDataFromHost()));
340
340
  }, [state, isEdit]);
341
- useEffect(function () {
342
- window.dispatchEvent(new CustomEvent('onOriginExpectAmountWithoutDiscountChange', {
343
- detail: {
344
- originExpectAmountWithoutDiscount: total === null || total === void 0 ? void 0 : total.originExpectAmountWithoutDiscount
345
- }
346
- }));
347
- }, [total === null || total === void 0 ? void 0 : total.originExpectAmountWithoutDiscount]);
348
341
  useDebounceEffect(function () {
349
342
  var _state$service4;
350
343
  if (state !== null && state !== void 0 && (_state$service4 = state.service) !== null && _state$service4 !== void 0 && _state$service4.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
@@ -93,7 +93,7 @@ var log = function log(data) {
93
93
  * @Author: zhiwei.Wang
94
94
  * @Date: 2024-02-19 09:26
95
95
  */
96
- export var formatProductBundle = function formatProductBundle(bundle, is_price_include_tax) {
96
+ export var formatProductBundle = function formatProductBundle(bundle) {
97
97
  if (!bundle) {
98
98
  return;
99
99
  }
@@ -134,7 +134,6 @@ export var formatProductBundle = function formatProductBundle(bundle, is_price_i
134
134
  "option": option,
135
135
  "bundle_selling_price": Math.abs(d === null || d === void 0 ? void 0 : d.price),
136
136
  // "bundle_sum_price": d?.original_price || d?.original_total,
137
- is_price_include_tax: is_price_include_tax,
138
137
  "metadata": {
139
138
  custom_product_bundle_map_id: d._id,
140
139
  // 子商品单数量附加费
@@ -324,8 +323,8 @@ export var formatOriginalPrice = function formatOriginalPrice(item) {
324
323
 
325
324
  /**
326
325
  * 获取套餐子商品折扣差价
327
- * @param item
328
- * @returns
326
+ * @param item
327
+ * @returns
329
328
  */
330
329
  var getBundleProductDiscountDifference = function getBundleProductDiscountDifference(item) {
331
330
  var _item$_extend9, _item$_extend10, _item$_extend11;
@@ -517,7 +516,7 @@ var formatProducts = function formatProducts(item, quantity) {
517
516
  "discount_per": item._extend.discount_per,
518
517
  "discount_type": item._extend.discount_type || discount_type,
519
518
  "order_detail_id": item._extend.order_detail_id || 0,
520
- "product_bundle": formatProductBundle((_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 || (_item$_extend38 = _item$_extend38.other) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.bundle, item.is_price_include_tax),
519
+ "product_bundle": formatProductBundle((_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 || (_item$_extend38 = _item$_extend38.other) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.bundle),
521
520
  "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
522
521
  "product_option_item": formatProductOption((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 || (_item$_extend39 = _item$_extend39.other) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.option),
523
522
  "product_variant_id": ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 || (_item$_extend40 = _item$_extend40.other) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.product_variant_id) || 0,
@@ -527,8 +526,7 @@ var formatProducts = function formatProducts(item, quantity) {
527
526
  "calculated_original_price": formatOriginalPrice(item),
528
527
  "calculated_selling_price": formatSellingPrice(item),
529
528
  "tax_fee": item._extend.tax_fee,
530
- "custom_deposit_data": item.custom_deposit_data,
531
- is_price_include_tax: item.is_price_include_tax
529
+ "custom_deposit_data": item.custom_deposit_data
532
530
  };
533
531
  };
534
532
 
@@ -152,17 +152,11 @@ var VoucherCard = function VoucherCard(props) {
152
152
  }
153
153
  onScanCode(e.detail.code);
154
154
  });
155
- var onOriginExpectAmountWithoutDiscountChange = useMemoizedFn(function (e) {
156
- var _shopDiscount$setOrig;
157
- shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setOrig = shopDiscount.setOriginTotalAmount) === null || _shopDiscount$setOrig === void 0 || _shopDiscount$setOrig.call(shopDiscount, e.detail.originExpectAmountWithoutDiscount);
158
- });
159
155
  useEffect(function () {
160
156
  var wrappedOnScanWallPassCode = executeIfActive(onScanWallPassCode);
161
157
  window.addEventListener('onScanWallPassCode', wrappedOnScanWallPassCode);
162
- window.addEventListener('onOriginExpectAmountWithoutDiscountChange', onOriginExpectAmountWithoutDiscountChange);
163
158
  return function () {
164
159
  window.removeEventListener('onScanWallPassCode', wrappedOnScanWallPassCode);
165
- window.removeEventListener('onOriginExpectAmountWithoutDiscountChange', onOriginExpectAmountWithoutDiscountChange);
166
160
  };
167
161
  }, []);
168
162
  var addonsMemo = useMemo(function () {
@@ -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
  // 隐藏状态下的样式优化
@@ -169,7 +169,7 @@ var BookingDashboard = /*#__PURE__*/forwardRef(function (props, ref) {
169
169
  };
170
170
  }();
171
171
  var calcBookingDataCount = function calcBookingDataCount() {
172
- var _statisticData$total_, _statisticData$total_2, _statisticData$ongoin, _statisticData$ongoin2, _statisticData$upcomi, _statisticData$upcomi2;
172
+ var _statisticData$total_, _statisticData$total_2, _statisticData$ongoin, _statisticData$ongoin2, _statisticData$upcomi, _statisticData$upcomi2, _statisticData$comple, _statisticData$comple2;
173
173
  // 当前在场团体
174
174
  var groupsOnSiteNow = statisticData.groups_today_num || 0;
175
175
  // 当前在场人数
@@ -189,9 +189,9 @@ var BookingDashboard = /*#__PURE__*/forwardRef(function (props, ref) {
189
189
  // 超时的游客
190
190
  var overdue = statisticData.overdue_visitors_num || (hasTurnstileApp ? 0 : '-');
191
191
  // 已完成的游客
192
- var completed = statisticData.completed_visitors.num || 0;
192
+ var completed = ((_statisticData$comple = statisticData.completed_visitors) === null || _statisticData$comple === void 0 ? void 0 : _statisticData$comple.num) || 0;
193
193
  // 已完成的游客二级数据
194
- var completedChildren = statisticData.completed_visitors.statistics || [];
194
+ var completedChildren = ((_statisticData$comple2 = statisticData.completed_visitors) === null || _statisticData$comple2 === void 0 ? void 0 : _statisticData$comple2.statistics) || [];
195
195
  // 已离场的游客
196
196
  var departed = statisticData.departed_visitors_num || (hasTurnstileApp ? 0 : '-');
197
197
  onDataChange === null || onDataChange === void 0 || onDataChange({
@@ -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>;
@@ -48,13 +48,12 @@ import EditTabs from "../../../info/service/editService/EditTabs";
48
48
  import BookingList from "../../../info/service/editService/BookingList";
49
49
  import dayjs from "dayjs";
50
50
  import { createBookingItemsByGroup, getGroupTotalPrice } from "../../../info/service2/Group/utils";
51
- import useEngineContext from "../../../../../hooks/useEngineContext";
52
51
  import { useShopDiscountModule } from "../../../../ticketBooking/hooks/pisellos/useShopDiscountModule";
53
52
  import DiscountChangeModal from "./DiscountChangeModal";
54
53
  import Decimal from "decimal.js";
55
54
  var submitLock = false;
56
55
  var Info = function Info(_, ref) {
57
- var _context$appHelper, _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI7, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI12, _state$bookingConfig5, _state$service$cacheI13, _state$service$cacheI14, _state$service9, _state$service$resour2, _state$service$cacheI16, _state$service$cacheI17, _state$client2;
56
+ var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI7, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI12, _state$bookingConfig5, _state$service$cacheI13, _state$service$cacheI14, _state$service9, _state$service$resour2, _state$service$cacheI16, _state$service$cacheI17, _state$client2;
58
57
  var _Form$useForm = Form.useForm(),
59
58
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
60
59
  form = _Form$useForm2[0];
@@ -90,9 +89,6 @@ var Info = function Info(_, ref) {
90
89
  _useState8 = _slicedToArray(_useState7, 2),
91
90
  currentTab = _useState8[0],
92
91
  setCurrentTab = _useState8[1];
93
- var context = useEngineContext();
94
- var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
95
- getData = _context$appHelper$ut.getData;
96
92
  var valuesRef = useRef({});
97
93
  var noInOriginalDiscountIdsRef = useRef([]);
98
94
 
@@ -327,9 +323,7 @@ var Info = function Info(_, ref) {
327
323
  submitLock = false;
328
324
  }, 1500);
329
325
  var _list = _toConsumableArray(state.service.value);
330
- var _item = _objectSpread(_objectSpread({
331
- is_price_include_tax: getData('is_price_include_tax')
332
- }, cacheItem !== null && cacheItem !== void 0 ? cacheItem : state.service.cacheItem), {}, {
326
+ var _item = _objectSpread(_objectSpread({}, cacheItem !== null && cacheItem !== void 0 ? cacheItem : state.service.cacheItem), {}, {
333
327
  autoClose: false
334
328
  });
335
329
  var _extend = _objectSpread(_objectSpread({}, _item._extend), {}, {
@@ -25,7 +25,6 @@ var WalletPassModule = /*#__PURE__*/forwardRef(function (props, ref) {
25
25
  var _useWalletPass = useWalletPass({
26
26
  onSelectChange: onSelectChange,
27
27
  customAmount: customAmount,
28
- totalAmount: Number(orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.totalAmount) || 0,
29
28
  clientId: clientId
30
29
  }),
31
30
  handleSelectWallet = _useWalletPass.handleSelectWallet,
@@ -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 {
@@ -11,15 +11,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
13
  import React from 'react';
14
- import { formatDate, isNumber, locales } from '@pisell/utils';
14
+ import { formatDate, locales } from '@pisell/utils';
15
15
  import { globalConfig, PisellText } from "@pisell/materials";
16
16
  import Decimal from 'decimal.js';
17
17
  var Amount = PisellText.Amount;
18
18
  // 获取walletPass可用最大金额
19
19
  export var getAvailableMaxAmount = function getAvailableMaxAmount(data) {
20
- if (isNumber(data._available_max_amount)) {
21
- return data._available_max_amount;
22
- }
23
20
  return data.tag !== 'point_card' ? data.available_max_amount : data === null || data === void 0 ? void 0 : data.recommended_usage_amount;
24
21
  };
25
22
  export var voucherTime = function voucherTime(data) {
@@ -30,22 +27,11 @@ export var voucherTime = function voucherTime(data) {
30
27
  }
31
28
  return locales.getText('pisell2.text.walletPassPermanent');
32
29
  };
33
- export var getVoucherAvailableStatus = function getVoucherAvailableStatus(item) {
34
- return item.unified_available_status === 1 && (isNumber(item._unified_available_status) ? !!item._unified_available_status : true);
35
- };
36
30
  export var formatMachineCodeServer2CardList = function formatMachineCodeServer2CardList(data) {
37
31
  var selectId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
38
32
  var otherProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
39
33
  return (data || []).map(function (item) {
40
34
  var _item$unified_message, _item$product;
41
- var disabled = false;
42
- if (item.unified_available_status === 0) {
43
- disabled = true;
44
- } else {
45
- if (isNumber(item._unified_available_status)) {
46
- disabled = !item._unified_available_status;
47
- }
48
- }
49
35
  return _objectSpread({
50
36
  id: item.id,
51
37
  name: item.product_name,
@@ -62,8 +48,8 @@ export var formatMachineCodeServer2CardList = function formatMachineCodeServer2C
62
48
  showQrCode: false,
63
49
  showStatus: true,
64
50
  code: item.code,
65
- disabled: disabled,
66
- disabledReason: isNumber(item._unified_available_status) && item._unified_available_status !== 1 ? item.reason : (_item$unified_message = item.unified_messages) === null || _item$unified_message === void 0 ? void 0 : _item$unified_message.title,
51
+ disabled: !item.unified_available_status,
52
+ disabledReason: (_item$unified_message = item.unified_messages) === null || _item$unified_message === void 0 ? void 0 : _item$unified_message.title,
67
53
  cover: (_item$product = item.product) === null || _item$product === void 0 ? void 0 : _item$product.cover,
68
54
  qrCode: item.code,
69
55
  validDate: voucherTime(item),
@@ -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;