@pisell/private-materials 3.3.55 → 3.3.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 (123) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/appointmentBooking/assets/resource.svg +1 -0
  12. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Resource/index.js +44 -5
  15. package/es/components/appointmentBooking/hooks.js +218 -177
  16. package/es/components/appointmentBooking/locales.d.ts +3 -0
  17. package/es/components/appointmentBooking/locales.js +9 -0
  18. package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
  19. package/es/components/booking/components/drawer/index.js +4 -2
  20. package/es/components/booking/components/footer/index.js +1 -1
  21. package/es/components/booking/components/voucher/index.js +25 -17
  22. package/es/components/booking/info/client/index.js +2 -1
  23. package/es/components/booking/info/pet/index.js +3 -0
  24. package/es/components/booking/info/service2/utils.js +27 -27
  25. package/es/components/booking/info2/index.js +3 -3
  26. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  27. package/es/components/booking/info2/service/addService/utils.js +5 -2
  28. package/es/components/booking/info2/service/editService/index.js +1 -0
  29. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  30. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
  31. package/es/components/eventBooking/components/progressBar/index.js +16 -0
  32. package/es/components/eventBooking/index.d.ts +0 -1
  33. package/es/components/pay/toC/PaymentList/index.js +10 -4
  34. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  35. package/es/components/pay/toC/PaymentList/serve.js +7 -1
  36. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -13
  37. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +30 -13
  38. package/es/components/pay/toC/PaymentMethods/index.js +29 -2
  39. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  40. package/es/components/pay/toC/WalletPassBlock/index.less +4 -0
  41. package/es/components/pay/toC/index.js +38 -30
  42. package/es/components/pay/toC/utils.d.ts +6 -0
  43. package/es/components/pay/toC/utils.js +21 -0
  44. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  45. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
  46. package/es/components/productSelect/components/TabProduct/index.js +28 -10
  47. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  48. package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
  49. package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  50. package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  51. package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
  52. package/es/components/productSelect/components/productGroup/index.js +20 -7
  53. package/es/components/productSelect/components/productGroup/index.less +14 -1
  54. package/es/components/productSelect/index.less +1 -2
  55. package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
  56. package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  57. package/es/components/ticketBooking/components/ticketBooking/index.js +18 -9
  58. package/es/components/ticketBooking/index.js +2 -1
  59. package/es/components/ticketBooking/locales.d.ts +3 -0
  60. package/es/components/ticketBooking/locales.js +12 -3
  61. package/es/components/ticketBooking/serve.d.ts +5 -0
  62. package/es/components/ticketBooking/serve.js +27 -0
  63. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  64. package/es/components/ticketBooking/utils/index.js +35 -3
  65. package/es/components/wallet/index.js +51 -5
  66. package/lib/components/appointmentBooking/assets/resource.svg +1 -0
  67. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  68. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  69. package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
  70. package/lib/components/appointmentBooking/hooks.js +12 -3
  71. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  72. package/lib/components/appointmentBooking/locales.js +3 -0
  73. package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
  74. package/lib/components/booking/components/drawer/index.js +2 -2
  75. package/lib/components/booking/components/footer/index.js +1 -1
  76. package/lib/components/booking/components/voucher/index.js +31 -27
  77. package/lib/components/booking/info/client/index.js +2 -1
  78. package/lib/components/booking/info/pet/index.js +3 -0
  79. package/lib/components/booking/info/service2/utils.js +2 -2
  80. package/lib/components/booking/info2/index.js +7 -4
  81. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  82. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  83. package/lib/components/booking/info2/service/editService/index.js +1 -0
  84. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  85. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
  86. package/lib/components/eventBooking/components/progressBar/index.js +15 -0
  87. package/lib/components/eventBooking/index.d.ts +0 -1
  88. package/lib/components/pay/toC/PaymentList/index.js +11 -6
  89. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  90. package/lib/components/pay/toC/PaymentList/serve.js +5 -2
  91. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +10 -1
  92. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +10 -1
  93. package/lib/components/pay/toC/PaymentMethods/index.js +28 -4
  94. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  95. package/lib/components/pay/toC/WalletPassBlock/index.less +4 -0
  96. package/lib/components/pay/toC/index.js +20 -13
  97. package/lib/components/pay/toC/utils.d.ts +6 -0
  98. package/lib/components/pay/toC/utils.js +15 -0
  99. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  100. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
  101. package/lib/components/productSelect/components/TabProduct/index.js +19 -6
  102. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  103. package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
  104. package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  105. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  106. package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
  107. package/lib/components/productSelect/components/productGroup/index.js +24 -4
  108. package/lib/components/productSelect/components/productGroup/index.less +14 -1
  109. package/lib/components/productSelect/index.less +1 -2
  110. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +25 -14
  111. package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  112. package/lib/components/ticketBooking/components/ticketBooking/index.js +17 -8
  113. package/lib/components/ticketBooking/index.js +2 -1
  114. package/lib/components/ticketBooking/locales.d.ts +3 -0
  115. package/lib/components/ticketBooking/locales.js +6 -3
  116. package/lib/components/ticketBooking/serve.d.ts +5 -0
  117. package/lib/components/ticketBooking/serve.js +8 -2
  118. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  119. package/lib/components/ticketBooking/utils/index.js +35 -3
  120. package/lib/components/wallet/index.js +26 -1
  121. package/package.json +4 -4
  122. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  123. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
@@ -106,6 +106,7 @@ declare const _default: {
106
106
  'pisell2.appointment.add-guests': string;
107
107
  'pisell2.appointment.policy': string;
108
108
  'pisell2.appointment.policy.confirm': string;
109
+ 'pisell2.appointment.resource.tip': (val: string) => string;
109
110
  'pisell2.text.apply': string;
110
111
  'pisell2.text.goodpass': string;
111
112
  'pisell2.text.goodpass.product-vouchers': string;
@@ -223,6 +224,7 @@ declare const _default: {
223
224
  'pisell2.appointment.add-guests': string;
224
225
  'pisell2.appointment.policy': string;
225
226
  'pisell2.appointment.policy.confirm': string;
227
+ 'pisell2.appointment.resource.tip': (val: string) => string;
226
228
  'pisell2.text.apply': string;
227
229
  'pisell2.text.goodpass': string;
228
230
  'pisell2.text.goodpass.product-vouchers': string;
@@ -340,6 +342,7 @@ declare const _default: {
340
342
  'pisell2.appointment.add-guests': string;
341
343
  'pisell2.appointment.policy': string;
342
344
  'pisell2.appointment.policy.confirm': string;
345
+ 'pisell2.appointment.resource.tip': (val: string) => string;
343
346
  'pisell2.text.apply': string;
344
347
  'pisell2.text.goodpass': string;
345
348
  'pisell2.text.goodpass.product-vouchers': string;
@@ -122,6 +122,9 @@ export default {
122
122
  'pisell2.appointment.add-guests': 'Add guests',
123
123
  'pisell2.appointment.policy': 'You have read and agreed to this policy',
124
124
  'pisell2.appointment.policy.confirm': 'Confirm',
125
+ 'pisell2.appointment.resource.tip': function pisell2AppointmentResourceTip(val) {
126
+ return "Tip: Change ".concat(val || 'resource', " using the dropdown in the cart.");
127
+ },
125
128
  'pisell2.text.apply': 'Apply',
126
129
  'pisell2.text.goodpass': 'GoodPass',
127
130
  'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
@@ -255,6 +258,9 @@ export default {
255
258
  'pisell2.appointment.add-guests': '添加预约人',
256
259
  'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
257
260
  'pisell2.appointment.policy.confirm': '确定',
261
+ 'pisell2.appointment.resource.tip': function pisell2AppointmentResourceTip(val) {
262
+ return "\u63D0\u793A\uFF1A\u5728\u53F3\u4FA7\u8D2D\u7269\u8F66\u4E2D\uFF0C\u901A\u8FC7\u4E0B\u62C9\u6846\u4FEE\u6539\u201C".concat(val || '资源', "\u201D");
263
+ },
258
264
  'pisell2.text.apply': '应用',
259
265
  'pisell2.text.goodpass': '商品券',
260
266
  'pisell2.text.goodpass.product-vouchers': '商品兑换券',
@@ -388,6 +394,9 @@ export default {
388
394
  'pisell2.appointment.add-guests': '添加預約人',
389
395
  'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
390
396
  'pisell2.appointment.policy.confirm': '確定',
397
+ 'pisell2.appointment.resource.tip': function pisell2AppointmentResourceTip(val) {
398
+ return "\u63D0\u793A\uFF1A\u5728\u53F3\u5074\u8CFC\u7269\u8ECA\u4E2D\uFF0C\u900F\u904E\u4E0B\u62C9\u6846\u4FEE\u6539\u201C".concat(val || '資源', "\u201D");
399
+ },
391
400
  'pisell2.text.apply': '應用',
392
401
  'pisell2.text.goodpass': '商品券',
393
402
  'pisell2.text.goodpass.product-vouchers': '商品兌換券',
@@ -1,7 +1,9 @@
1
1
  import React, { useMemo } from 'react';
2
- import { formatAmount, image, locales } from '@pisell/utils';
2
+ import { image, locales } from '@pisell/utils';
3
3
  import classNames from 'classnames';
4
4
  import { getDiscountTime } from "../../../utils";
5
+ import Decimal from 'decimal.js';
6
+ import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
5
7
  import "./index.less";
6
8
  var ProductItem = function ProductItem(_ref) {
7
9
  var item = _ref.item,
@@ -9,6 +11,13 @@ var ProductItem = function ProductItem(_ref) {
9
11
  amountSymbol = _ref.amountSymbol,
10
12
  style = _ref.style,
11
13
  className = _ref.className;
14
+ var price = item.price,
15
+ is_bundle = item.is_bundle,
16
+ minimum_markup_price = item.minimum_markup_price;
17
+ var _price = price;
18
+ if (is_bundle) {
19
+ _price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
20
+ }
12
21
  var stockText = useMemo(function () {
13
22
  if (item.is_track === 0) {
14
23
  return false;
@@ -45,6 +54,9 @@ var ProductItem = function ProductItem(_ref) {
45
54
  className: "server-product-time"
46
55
  }, stockText), /*#__PURE__*/React.createElement("div", {
47
56
  className: "server-product-price"
48
- }, formatAmount(item.price, 2, amountSymbol))));
57
+ }, /*#__PURE__*/React.createElement(PisellPriceText, {
58
+ value: _price,
59
+ isMini: is_bundle
60
+ }))));
49
61
  };
50
62
  export default ProductItem;
@@ -16,7 +16,9 @@ var Drawer = function Drawer(props) {
16
16
  var _props$hideScrollBar = props.hideScrollBar,
17
17
  hideScrollBar = _props$hideScrollBar === void 0 ? true : _props$hideScrollBar,
18
18
  _props$showGoBack = props.showGoBack,
19
- showGoBack = _props$showGoBack === void 0 ? true : _props$showGoBack;
19
+ showGoBack = _props$showGoBack === void 0 ? true : _props$showGoBack,
20
+ _props$mask = props.mask,
21
+ mask = _props$mask === void 0 ? false : _props$mask;
20
22
  return /*#__PURE__*/React.createElement(OriginDrawer, _extends({
21
23
  width: '600px',
22
24
  closable: false,
@@ -30,7 +32,7 @@ var Drawer = function Drawer(props) {
30
32
  padding: 0
31
33
  },
32
34
  push: false,
33
- mask: false
35
+ mask: mask
34
36
  }), /*#__PURE__*/React.createElement("div", {
35
37
  className: classNames('pisell-lowcode__booking-drawer-title-wrap')
36
38
  }, /*#__PURE__*/React.createElement("div", {
@@ -517,7 +517,7 @@ var Footer = function Footer(props) {
517
517
  }
518
518
  case 32:
519
519
  // 回调关闭弹窗
520
- state === null || state === void 0 || state.callback(callbackData);
520
+ state === null || state === void 0 || state.callback(callbackData, type);
521
521
  _setLoading(false);
522
522
 
523
523
  // return数据 checkout时需要
@@ -22,7 +22,7 @@ import useEngineContext from "../../../../hooks/useEngineContext";
22
22
  import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
23
23
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
24
24
  import "./index.less";
25
- import { useMemoizedFn } from "ahooks";
25
+ import { useMemoizedFn, useDebounceFn } from 'ahooks';
26
26
  var ShopDiscountHooks = {
27
27
  onInited: 'shopDiscount:onInited',
28
28
  onDestroy: 'shopDiscount:onDestroy',
@@ -98,25 +98,33 @@ var VoucherCard = function VoucherCard(props) {
98
98
  });
99
99
  return val;
100
100
  }, [state.service.value]);
101
+ var _useDebounceFn = useDebounceFn(function () {
102
+ var _state$service;
103
+ // console.log('state.service.value1', state.service.value);
104
+ if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
105
+ return;
106
+ }
107
+ if (isBooking4Shop) {
108
+ var val = shopDiscount.calcDiscount(state.service.value);
109
+ // console.log('input: ', state.service.value);
110
+ // console.log('output: ', val);
111
+ productRef.current = val.productList;
112
+ // console.log('val.productList', val.productList);
113
+ dispatch({
114
+ type: 'setService',
115
+ payload: _objectSpread(_objectSpread({}, services), {}, {
116
+ value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
117
+ })
118
+ });
119
+ }
120
+ }, {
121
+ wait: 500
122
+ }),
123
+ run = _useDebounceFn.run;
101
124
 
102
125
  // 更新productList
103
126
  useEffect(function () {
104
- var _state$service;
105
- if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
106
- return;
107
- }
108
- if (isBooking4Shop) {
109
- var val = shopDiscount.calcDiscount(state.service.value);
110
- console.log('input: ', state.service.value);
111
- console.log('output: ', val);
112
- productRef.current = val.productList;
113
- dispatch({
114
- type: 'setService',
115
- payload: _objectSpread(_objectSpread({}, services), {}, {
116
- value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
117
- })
118
- });
119
- }
127
+ run();
120
128
  }, [JSON.stringify(serviceMemo), isBooking4Shop]);
121
129
  var fn = useMemoizedFn(function (result) {
122
130
  var _result$productList;
@@ -401,7 +401,8 @@ var Client = function Client() {
401
401
  isPreview: false,
402
402
  drawerProps: {
403
403
  title: locales.getText('pisell2.text.select-customer'),
404
- destroyOnClose: true
404
+ destroyOnClose: true,
405
+ mask: state.drawerMask
405
406
  },
406
407
  mode: "single",
407
408
  createItemText: locales.getText('pisell2.text.create-new-customer'),
@@ -623,6 +623,9 @@ var Pet = function Pet(props) {
623
623
  form_id: formDataConfig === null || formDataConfig === void 0 ? void 0 : formDataConfig.form_id
624
624
  })].concat(_toConsumableArray(((_state$pet11 = state.pet) === null || _state$pet11 === void 0 || (_state$pet11 = _state$pet11.formData) === null || _state$pet11 === void 0 || (_state$pet11 = _state$pet11[0]) === null || _state$pet11 === void 0 ? void 0 : _state$pet11.options) || [])));
625
625
  },
626
+ drawerProps: {
627
+ mask: state.drawerMask
628
+ },
626
629
  getHolders: getHolders,
627
630
  addCallbackService: _addCallback,
628
631
  loading: valueLoading,
@@ -540,7 +540,7 @@ export var isAllNormalProductByState = function isAllNormalProductByState(state)
540
540
  return isAllNormalProduct(state.service.value);
541
541
  };
542
542
  var getGeneralParams = function getGeneralParams(item, state, isParallelResource) {
543
- var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8;
543
+ var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9;
544
544
  var pet = state.pet,
545
545
  service = state.service;
546
546
  var _ref8 = pet || {},
@@ -614,7 +614,8 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
614
614
  addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
615
615
  holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
616
616
  start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate : "",
617
- end_date: !isNormalProduct ? (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date) : ""
617
+ end_date: !isNormalProduct ? (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date) : "",
618
+ rowKey: "rowKey-".concat(item === null || item === void 0 || (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 || (_item$_extend9 = _item$_extend9.other) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.rowKey)
618
619
  }, parallelResourceOtherParams);
619
620
  };
620
621
  var calcAddTimeTotalPrice = function calcAddTimeTotalPrice(total, addTimeProducts) {
@@ -637,50 +638,49 @@ export var formatProducts = function formatProducts(lists, state) {
637
638
  var normalList = [];
638
639
  var groupList = [];
639
640
  var formItem = function formItem(item) {
640
- var _item$_extend9, _item$_extend10, _item$_extend11, _item$_extend13, _item$_extend14, _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20, _item$_extend21, _resourceItem, _item$_extend22, _item$_extend23, _item$_extend24, _item$_extend25, _item$_extend26;
641
+ var _item$_extend10, _item$_extend11, _item$_extend12, _item$_extend14, _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20, _item$_extend21, _item$_extend22, _resourceItem, _item$_extend23, _item$_extend24, _item$_extend25, _item$_extend26, _item$_extend27;
641
642
  var _isDayBookingProduct = isDayBookingProduct(item, state);
642
- var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.holder_id);
643
- var options = formatOptions(item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 || (_item$_extend10 = _item$_extend10.other) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.option);
644
- var bundle = formatBundle(item === null || item === void 0 || (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.bundle);
643
+ var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.holder_id);
644
+ var options = formatOptions(item === null || item === void 0 || (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.option);
645
+ var bundle = formatBundle(item === null || item === void 0 || (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.bundle);
645
646
  // 是否是普通商品
646
647
  var isNormalProduct = !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
647
648
  var resourceItem = {};
648
649
  var errorMessage = '';
649
650
  if (_isDayBookingProduct || isGeneral) {
650
- var _item$_extend12;
651
- resourceItem = getResourceItem(item === null || item === void 0 || (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.resource, state);
651
+ var _item$_extend13;
652
+ resourceItem = getResourceItem(item === null || item === void 0 || (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.resource, state);
652
653
  errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
653
654
  }
654
655
  var generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
655
- console.log(isNormalProduct, 'isNormalProduct');
656
656
  return _objectSpread(_objectSpread({
657
657
  id: item === null || item === void 0 ? void 0 : item.id,
658
658
  _id: item === null || item === void 0 ? void 0 : item._id,
659
659
  name: item === null || item === void 0 ? void 0 : item.title,
660
- price: item === null || item === void 0 || (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.price,
661
- total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.total, item === null || item === void 0 || (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.relation_details),
662
- origin_total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.origin_total, item === null || item === void 0 || (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.relation_details),
660
+ price: item === null || item === void 0 || (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.price,
661
+ total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.total, item === null || item === void 0 || (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.relation_details),
662
+ origin_total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.origin_total, item === null || item === void 0 || (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.relation_details),
663
663
  num: item === null || item === void 0 ? void 0 : item._extend.quantity,
664
664
  image: item === null || item === void 0 ? void 0 : item.cover,
665
665
  isShowNote: true,
666
666
  note: item === null || item === void 0 ? void 0 : item.note,
667
- like_status: item === null || item === void 0 || (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.like_status,
667
+ like_status: item === null || item === void 0 || (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.like_status,
668
668
  bundle: bundle,
669
669
  options: options,
670
670
  errorMessage: errorMessage,
671
- product_option_string: item === null || item === void 0 || (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 || (_item$_extend19 = _item$_extend19.other) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.product_option_string,
672
- discount_reason: item === null || item === void 0 || (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.discount_reason,
673
- resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.resource,
671
+ product_option_string: item === null || item === void 0 || (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.product_option_string,
672
+ discount_reason: item === null || item === void 0 || (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.discount_reason,
673
+ resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.resource,
674
674
  relation_form_name: isNormalProduct ? '' : ((_resourceItem = resourceItem) === null || _resourceItem === void 0 ? void 0 : _resourceItem.labelText) || item.relation_form_name,
675
675
  holder_title: clientTitle,
676
- start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.start_date : '',
677
- end_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.end_date : '',
678
- holder_id: (item === null || item === void 0 || (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.holder_id) || 0,
676
+ start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.start_date : '',
677
+ end_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.end_date : '',
678
+ holder_id: (item === null || item === void 0 || (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.holder_id) || 0,
679
679
  isNormalProduct: isNormalProduct,
680
680
  locale: state.locale,
681
681
  symbol: state.amountSymbol,
682
- relation_products: (item === null || item === void 0 || (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.relation_details) || [],
683
- items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.items) || [])
682
+ relation_products: (item === null || item === void 0 || (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.relation_details) || [],
683
+ items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.items) || [])
684
684
  }, generalParams), {}, {
685
685
  _origin: item
686
686
  });
@@ -688,8 +688,8 @@ export var formatProducts = function formatProducts(lists, state) {
688
688
 
689
689
  // 将商品分为组商品和非组商品
690
690
  lists.forEach(function (item) {
691
- var _item$_extend27;
692
- if (!(item !== null && item !== void 0 && (_item$_extend27 = item._extend) !== null && _item$_extend27 !== void 0 && _item$_extend27.groupId)) {
691
+ var _item$_extend28;
692
+ if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
693
693
  normalList.push(formItem(item));
694
694
  } else {
695
695
  groupList.push(item);
@@ -698,8 +698,8 @@ export var formatProducts = function formatProducts(lists, state) {
698
698
 
699
699
  // 根据item._extend.groupId 进行分组
700
700
  var groups = groupList.reduce(function (prev, item) {
701
- var _item$_extend28;
702
- var groupId = item === null || item === void 0 || (_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.groupId;
701
+ var _item$_extend29;
702
+ var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
703
703
  if (!prev[groupId]) {
704
704
  prev[groupId] = [];
705
705
  }
@@ -869,8 +869,8 @@ export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(stat
869
869
  // 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
870
870
  // services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
871
871
  services: services.filter(function (item) {
872
- var _item$_extend29;
873
- return ((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.holder_id) == d.form_record_id && checkType(item.extension_type);
872
+ var _item$_extend30;
873
+ return ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.holder_id) == d.form_record_id && checkType(item.extension_type);
874
874
  })
875
875
  });
876
876
  });
@@ -27,8 +27,8 @@ import { updateServiceDate } from "../info/date";
27
27
  import useEngineContext from "../../../hooks/useEngineContext";
28
28
  import Notes from "../info/notes";
29
29
  import "../info/index.less";
30
- import { Skeleton } from "antd";
31
- import classNames from "classnames";
30
+ import { Skeleton } from 'antd';
31
+ import classNames from 'classnames';
32
32
  import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
33
33
  import { getLocale } from "../../../utils/locales";
34
34
  var defaultModules = {
@@ -76,7 +76,7 @@ var Info = Provider(function (props) {
76
76
  });
77
77
  }
78
78
  }, []);
79
- useEffect(function () {
79
+ useMemo(function () {
80
80
  var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$i, _context$appHelper3;
81
81
  var isFranchisee = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.businessUtils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getAppByModal) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, 'franchisee');
82
82
  modal.dispatch({
@@ -77,7 +77,7 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
77
77
  * @Author: zhiwei.Wang
78
78
  * @Date: 2024-06-01 13:25
79
79
  */
80
- export declare const getProductExtend: ({ cacheItem, state }: any) => any;
80
+ export declare const getProductExtend: ({ cacheItem, state, isDisabledTime }: any) => any;
81
81
  /**
82
82
  * @title: 格式化服务列表
83
83
  * @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
@@ -472,7 +472,8 @@ var getIsAutoClose = function getIsAutoClose(cacheItem) {
472
472
  */
473
473
  export var getProductExtend = function getProductExtend(_ref10) {
474
474
  var cacheItem = _ref10.cacheItem,
475
- state = _ref10.state;
475
+ state = _ref10.state,
476
+ isDisabledTime = _ref10.isDisabledTime;
476
477
  // 有endDate 说明是在编辑已经保存过的商品, 没有则是编辑还没保存过的商品
477
478
  var isNew = cacheItem.new || !cacheItem._extend.endDate;
478
479
  var _cacheItem = _objectSpread({}, cacheItem);
@@ -552,7 +553,9 @@ export var getProductExtend = function getProductExtend(_ref10) {
552
553
  if (_cacheItem._extend.bundle_edit !== undefined) {
553
554
  _cacheItem._extend.bundle_edit = 1;
554
555
  }
555
- _cacheItem._time = new Date().getTime();
556
+ if (!isDisabledTime) {
557
+ _cacheItem._time = new Date().getTime();
558
+ }
556
559
  } else {
557
560
  // if (!_cacheItem._data.timeObj) {
558
561
  // _cacheItem._data.timeObj = getTimeObj({
@@ -539,6 +539,7 @@ var Info = function Info(_, ref) {
539
539
  ,
540
540
  zIndex: state.service.changeService ? 999 : 1000,
541
541
  forceRender: true,
542
+ mask: state.drawerMask,
542
543
  open: state.service.editModal && !((_state$service$cacheI6 = state.service.cacheItem) !== null && _state$service$cacheI6 !== void 0 && _state$service$cacheI6.autoClose),
543
544
  title: locales.getText('pisell2.text.edit-service'),
544
545
  onClose: function onClose() {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -3,6 +3,8 @@ import OpenCard from "../../OpenCard";
3
3
  import { PisellCheckboxGroup, PisellText } from '@pisell/materials';
4
4
  import { locales } from '@pisell/utils';
5
5
  import { useEventDetail } from "../../../../Sales";
6
+ import Decimal from 'decimal.js';
7
+ import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
6
8
  var BookingOptions = function BookingOptions(props) {
7
9
  var _detail$bookingOption, _detail$bookingOption2;
8
10
  var _useEventDetail = useEventDetail(),
@@ -27,12 +29,29 @@ var BookingOptions = function BookingOptions(props) {
27
29
  optionClassName: "option-item ".concat((detail === null || detail === void 0 || (_detail$bookingOption2 = detail.bookingOptions) === null || _detail$bookingOption2 === void 0 ? void 0 : _detail$bookingOption2.length) > 1 ? 'option-item-pointer' : ''),
28
30
  value: currentBookingOption,
29
31
  renderOption: function renderOption(option) {
32
+ var _ref = option._originData || {},
33
+ price = _ref.price,
34
+ is_bundle = _ref.is_bundle,
35
+ minimum_markup_price = _ref.minimum_markup_price;
36
+ if (!option._originData || !is_bundle) {
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ className: "item"
39
+ }, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellText.Amount, {
40
+ value: option.price,
41
+ showCurrencySymbol: true,
42
+ className: "price"
43
+ }));
44
+ }
45
+ var _price = price;
46
+ if (is_bundle) {
47
+ _price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
48
+ }
30
49
  return /*#__PURE__*/React.createElement("div", {
31
50
  className: "item"
32
- }, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellText.Amount, {
33
- value: option.price,
34
- showCurrencySymbol: true,
35
- className: "price"
51
+ }, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellPriceText, {
52
+ className: "price",
53
+ value: _price,
54
+ isMini: true
36
55
  }));
37
56
  },
38
57
  onChange: onChange
@@ -9,7 +9,9 @@ import { PisellHeaderProgressBar, PisellModal } from '@pisell/materials';
9
9
  import { useSales } from "../../../Sales";
10
10
  import { locales } from '@pisell/utils';
11
11
  import "./index.less";
12
+ import useEngineContext from "../../../../hooks/useEngineContext";
12
13
  var ProgressBar = function ProgressBar(_ref) {
14
+ var _context$appHelper;
13
15
  var title = _ref.title,
14
16
  description = _ref.description,
15
17
  _ref$showClose = _ref.showClose,
@@ -29,6 +31,9 @@ var ProgressBar = function ProgressBar(_ref) {
29
31
  setOpen = _useState2[1];
30
32
  var _useSales = useSales(),
31
33
  removeSessionStorage = _useSales.removeSessionStorage;
34
+ var context = useEngineContext();
35
+ var _ref2 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
36
+ interaction = _ref2.interaction;
32
37
 
33
38
  /**
34
39
  * @title: 点击关闭
@@ -54,6 +59,17 @@ var ProgressBar = function ProgressBar(_ref) {
54
59
  * @Date: 2025-02-10 17:46
55
60
  */
56
61
  var handleOk = function handleOk() {
62
+ var _interaction$utils, _interaction$utils$is;
63
+ if (interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils)) {
64
+ interaction.utils.postMessageToApp({
65
+ module: 'global',
66
+ key: 'paymentResultAction',
67
+ data: {
68
+ actionType: 'backHome'
69
+ }
70
+ });
71
+ return;
72
+ }
57
73
  onClose === null || onClose === void 0 || onClose();
58
74
  setOpen(false);
59
75
  // 清空数据
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const EventBooking: () => JSX.Element;
4
3
  export default EventBooking;
@@ -36,7 +36,7 @@ var offline = ['pisell.offline_payment', 'pisell.other.cashmanual', 'pisell.cust
36
36
  * @Date: 2024-08-16 10:52
37
37
  */
38
38
  var PaymentList = function PaymentList(props, ref) {
39
- var _props$store2, _props$store4;
39
+ var _context$appHelper, _props$store2, _props$store4;
40
40
  // 支付列表
41
41
  var _useState = useState([]),
42
42
  _useState2 = _slicedToArray(_useState, 2),
@@ -53,6 +53,8 @@ var PaymentList = function PaymentList(props, ref) {
53
53
  loading = _useState6[0],
54
54
  setLoading = _useState6[1];
55
55
  var context = useEngineContext();
56
+ var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
57
+ interaction = _context$appHelper$ut.interaction;
56
58
 
57
59
  // 支付列表, 补充图标 兼容受控方式
58
60
  var _paymentList = useMemo(function () {
@@ -139,6 +141,10 @@ var PaymentList = function PaymentList(props, ref) {
139
141
  setPaymentList(list);
140
142
  return list;
141
143
  };
144
+ var isApp = useMemo(function () {
145
+ var _interaction$utils, _interaction$utils$is;
146
+ return interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils);
147
+ }, []);
142
148
 
143
149
  /**
144
150
  * @title: 唯一初始化
@@ -149,13 +155,13 @@ var PaymentList = function PaymentList(props, ref) {
149
155
  * @Date: 2024-08-16 10:53
150
156
  */
151
157
  var init = function init(list) {
152
- var _context$appHelper;
158
+ var _context$appHelper2;
153
159
  // 打开loading
154
160
  setLoading(true);
155
- var platform = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.constants) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.platform) || 'h5';
161
+ var platform = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.constants) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.platform) || 'h5';
156
162
 
157
163
  // 过滤数据
158
- var _filterPaymentList = filterPaymentList(list, platform),
164
+ var _filterPaymentList = filterPaymentList(list, platform, isApp),
159
165
  paymentList = _filterPaymentList.paymentList,
160
166
  walletPass = _filterPaymentList.walletPass;
161
167
 
@@ -20,7 +20,7 @@ export declare const getPaymentList: (values: any) => Promise<{
20
20
  * @Author: zhiwei.Wang
21
21
  * @Date: 2024-08-16 10:57
22
22
  */
23
- export declare const filterPaymentList: (list: any[], platform?: string) => {
23
+ export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean) => {
24
24
  message: string;
25
25
  status: string;
26
26
  paymentList: any[];
@@ -60,6 +60,7 @@ export var getPaymentList = /*#__PURE__*/function () {
60
60
  */
61
61
  export var filterPaymentList = function filterPaymentList(list) {
62
62
  var platform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'h5';
63
+ var isApp = arguments.length > 2 ? arguments[2] : undefined;
63
64
  var paymentList = _toConsumableArray(list);
64
65
  var _paymentKeys = _toConsumableArray(paymentKeys);
65
66
 
@@ -77,7 +78,7 @@ export var filterPaymentList = function filterPaymentList(list) {
77
78
  // }
78
79
 
79
80
  // 非微信环境隐藏微信支付
80
- if (!isWx()) {
81
+ if (!isWx() && !isApp) {
81
82
  arr = arr.concat(['globepay.wechat.jsapi', 'superpay.wechat.h5']);
82
83
  }
83
84
 
@@ -96,6 +97,11 @@ export var filterPaymentList = function filterPaymentList(list) {
96
97
  arr = arr.concat(['mw.apple']);
97
98
  }
98
99
 
100
+ // iosApp内不展示谷歌支付
101
+ if (isIOS() && isApp) {
102
+ arr = arr.concat(['mw.google']);
103
+ }
104
+
99
105
  // 删除以上key
100
106
  _paymentKeys = _paymentKeys.filter(function (d) {
101
107
  return !arr.includes(d);