@pisell/private-materials 6.2.19 → 6.2.20

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 (193) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Sales/Checkout/utils.d.ts +1 -0
  8. package/es/components/Sales/Checkout/utils.js +3 -2
  9. package/es/components/booking/info/service/editService/constants.d.ts +1 -0
  10. package/es/components/booking/info/service/editService/constants.js +3 -0
  11. package/es/components/booking/info/service/editService/index.js +15 -10
  12. package/es/components/booking/info/utils.js +1 -1
  13. package/es/components/booking/info2/service/editService/index.js +14 -11
  14. package/lib/components/Sales/Checkout/utils.d.ts +1 -0
  15. package/lib/components/Sales/Checkout/utils.js +3 -2
  16. package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
  17. package/lib/components/booking/info/service/editService/constants.js +31 -0
  18. package/lib/components/booking/info/service/editService/index.js +7 -1
  19. package/lib/components/booking/info/utils.js +2 -1
  20. package/lib/components/booking/info2/service/editService/index.js +5 -2
  21. package/package.json +3 -3
  22. package/es/components/Sales/Cart/utils.d.ts +0 -63
  23. package/es/components/Sales/Checkout/index.d.ts +0 -37
  24. package/es/components/Sales/Checkout/serve.d.ts +0 -15
  25. package/es/components/Sales/Customer/index.d.ts +0 -25
  26. package/es/components/Sales/Event/Detail.d.ts +0 -30
  27. package/es/components/Sales/Event/serve.d.ts +0 -49
  28. package/es/components/Sales/Summary/index.d.ts +0 -35
  29. package/es/components/Sales/Summary/serve.d.ts +0 -1
  30. package/es/components/Sales/Summary/utils.d.ts +0 -51
  31. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  32. package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  33. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
  34. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -9
  35. package/es/components/appointmentBooking/components/Form/index.d.ts +0 -4
  36. package/es/components/appointmentBooking/components/Form/utils.d.ts +0 -8
  37. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
  38. package/es/components/appointmentBooking/components/Resource/index.d.ts +0 -7
  39. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  40. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  41. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  42. package/es/components/appointmentBooking/deposit/index.d.ts +0 -3
  43. package/es/components/appointmentBooking/hooks.d.ts +0 -106
  44. package/es/components/appointmentBooking/index.d.ts +0 -3
  45. package/es/components/booking/components/customSelect/index.d.ts +0 -38
  46. package/es/components/booking/components/footer/index.d.ts +0 -11
  47. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  48. package/es/components/booking/components/voucher/index.d.ts +0 -3
  49. package/es/components/booking/hooks/useClearCart.d.ts +0 -2
  50. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  51. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
  52. package/es/components/booking/info/client/index.d.ts +0 -4
  53. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -10
  54. package/es/components/booking/info/index.d.ts +0 -4
  55. package/es/components/booking/info/service/Lists.d.ts +0 -2
  56. package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
  57. package/es/components/booking/info/service2/utils.d.ts +0 -247
  58. package/es/components/booking/info2/index.d.ts +0 -12
  59. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  60. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  61. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  62. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  63. package/es/components/booking/info2/service/index.d.ts +0 -4
  64. package/es/components/booking/info2/utils.d.ts +0 -4
  65. package/es/components/booking/info2/utilsByBooking.d.ts +0 -35
  66. package/es/components/booking/locales.d.ts +0 -828
  67. package/es/components/booking/materiels/duration/index.d.ts +0 -13
  68. package/es/components/booking/model.d.ts +0 -108
  69. package/es/components/eftposPay/const.d.ts +0 -184
  70. package/es/components/eftposPay/hooks.d.ts +0 -35
  71. package/es/components/eftposPay/index.d.ts +0 -4
  72. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  73. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  74. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  75. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  76. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  77. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  78. package/es/components/eftposPay/manufacturer.d.ts +0 -7
  79. package/es/components/eftposPay/pay.d.ts +0 -20
  80. package/es/components/eftposPay/store/index.d.ts +0 -355
  81. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -3
  82. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
  83. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  84. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
  85. package/es/components/eventBooking/index.d.ts +0 -3
  86. package/es/components/eventBooking/locales.d.ts +0 -246
  87. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  88. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -3
  89. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
  90. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  91. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  92. package/es/components/pay/toC/index.d.ts +0 -3
  93. package/es/components/pay/toC/locales.d.ts +0 -289
  94. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
  95. package/es/components/productSelect/index.d.ts +0 -26
  96. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  97. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -3
  98. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  99. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  100. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  101. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  102. package/es/components/ticketBooking/index.d.ts +0 -7
  103. package/es/components/ticketBooking/locales.d.ts +0 -174
  104. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  105. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  106. package/es/components/walletList/index.d.ts +0 -28
  107. package/es/utils/index.d.ts +0 -23
  108. package/lib/components/Sales/Cart/utils.d.ts +0 -63
  109. package/lib/components/Sales/Checkout/index.d.ts +0 -37
  110. package/lib/components/Sales/Checkout/serve.d.ts +0 -15
  111. package/lib/components/Sales/Customer/index.d.ts +0 -25
  112. package/lib/components/Sales/Event/Detail.d.ts +0 -30
  113. package/lib/components/Sales/Event/serve.d.ts +0 -49
  114. package/lib/components/Sales/Summary/index.d.ts +0 -35
  115. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  116. package/lib/components/Sales/Summary/utils.d.ts +0 -51
  117. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  118. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  119. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
  120. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -9
  121. package/lib/components/appointmentBooking/components/Form/index.d.ts +0 -4
  122. package/lib/components/appointmentBooking/components/Form/utils.d.ts +0 -8
  123. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
  124. package/lib/components/appointmentBooking/components/Resource/index.d.ts +0 -7
  125. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  126. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  127. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  128. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -3
  129. package/lib/components/appointmentBooking/hooks.d.ts +0 -106
  130. package/lib/components/appointmentBooking/index.d.ts +0 -3
  131. package/lib/components/booking/components/customSelect/index.d.ts +0 -38
  132. package/lib/components/booking/components/footer/index.d.ts +0 -11
  133. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  134. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  135. package/lib/components/booking/hooks/useClearCart.d.ts +0 -2
  136. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  137. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
  138. package/lib/components/booking/info/client/index.d.ts +0 -4
  139. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -10
  140. package/lib/components/booking/info/index.d.ts +0 -4
  141. package/lib/components/booking/info/service/Lists.d.ts +0 -2
  142. package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
  143. package/lib/components/booking/info/service2/utils.d.ts +0 -247
  144. package/lib/components/booking/info2/index.d.ts +0 -12
  145. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  146. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  147. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  148. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  149. package/lib/components/booking/info2/service/index.d.ts +0 -4
  150. package/lib/components/booking/info2/utils.d.ts +0 -4
  151. package/lib/components/booking/info2/utilsByBooking.d.ts +0 -35
  152. package/lib/components/booking/locales.d.ts +0 -828
  153. package/lib/components/booking/materiels/duration/index.d.ts +0 -13
  154. package/lib/components/booking/model.d.ts +0 -108
  155. package/lib/components/eftposPay/const.d.ts +0 -184
  156. package/lib/components/eftposPay/hooks.d.ts +0 -35
  157. package/lib/components/eftposPay/index.d.ts +0 -4
  158. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  159. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  160. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  161. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  162. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  163. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  164. package/lib/components/eftposPay/manufacturer.d.ts +0 -7
  165. package/lib/components/eftposPay/pay.d.ts +0 -20
  166. package/lib/components/eftposPay/store/index.d.ts +0 -355
  167. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -3
  168. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
  169. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  170. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
  171. package/lib/components/eventBooking/index.d.ts +0 -3
  172. package/lib/components/eventBooking/locales.d.ts +0 -246
  173. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  174. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -3
  175. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
  176. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  177. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  178. package/lib/components/pay/toC/index.d.ts +0 -3
  179. package/lib/components/pay/toC/locales.d.ts +0 -289
  180. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
  181. package/lib/components/productSelect/index.d.ts +0 -26
  182. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  183. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -3
  184. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  185. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  186. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  187. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  188. package/lib/components/ticketBooking/index.d.ts +0 -7
  189. package/lib/components/ticketBooking/locales.d.ts +0 -174
  190. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  191. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  192. package/lib/components/walletList/index.d.ts +0 -28
  193. package/lib/utils/index.d.ts +0 -23
@@ -29,6 +29,7 @@ export declare const formatValues: (params: {
29
29
  platform: 'h5' | 'pc';
30
30
  excludeDisabled?: boolean;
31
31
  extra?: Record<string, any>;
32
+ otherValue?: Record<string, any>;
32
33
  }) => any;
33
34
  /**
34
35
  * @title: 获取拉开表单弹窗参数
@@ -86,10 +86,11 @@ var formatBookings = function formatBookings(list) {
86
86
  */
87
87
  export var formatValues = function formatValues(params) {
88
88
  var state = params.state,
89
+ otherValue = params.otherValue,
89
90
  platform = params.platform,
90
91
  excludeDisabled = params.excludeDisabled,
91
92
  extra = params.extra;
92
- var values = _objectSpread({
93
+ var values = _objectSpread(_objectSpread({
93
94
  type: 'event_booking_v2',
94
95
  platform: platform === 'pc' ? 'PC' : 'H5',
95
96
  sales_channel: 'my_pisel',
@@ -97,7 +98,7 @@ export var formatValues = function formatValues(params) {
97
98
  bookings: [],
98
99
  shop_note: '',
99
100
  schedule_date: ''
100
- }, extra || {});
101
+ }, extra || {}), otherValue || {});
101
102
  console.log('values', values);
102
103
  var data = [];
103
104
  if (excludeDisabled) {
@@ -0,0 +1 @@
1
+ export declare const getIsPartyRoomResourceShop: (id: number) => boolean;
@@ -0,0 +1,3 @@
1
+ export var getIsPartyRoomResourceShop = function getIsPartyRoomResourceShop(id) {
2
+ return [2155].includes(id);
3
+ };
@@ -45,12 +45,15 @@ import Like from "../like";
45
45
  import { editSessionProduct, getMultiDayPrices } from "../../utils";
46
46
  import { useService } from "../serviceManager";
47
47
  import EditTabs from "./EditTabs";
48
+ import { getIsPartyRoomResourceShop } from "./constants";
49
+ import useEngineContext from "../../../../../hooks/useEngineContext";
48
50
  var submitLock = false;
49
51
  var Info = function Info(_, ref) {
50
52
  var _state$bookingConfig2, _state$service$cacheI4, _state$service$cacheI6, _state$service$cacheI7, _state$service4, _state$service6, _state$service8, _state$date, _state$date$format, _state$date2, _window$BaseMaterials, _state$service$cacheI13, _state$service10, _state$service$cacheI14, _state$bookingConfig4;
51
53
  var _Form$useForm = Form.useForm(),
52
54
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
53
55
  form = _Form$useForm2[0];
56
+ var context = useEngineContext();
54
57
  var useTotal = Form.useWatch('total', form);
55
58
  var useLikeStatus = Form.useWatch('like_status', form);
56
59
  var useResource = Form.useWatch('resource', form);
@@ -569,7 +572,7 @@ var Info = function Info(_, ref) {
569
572
  */
570
573
  var getResourcesData = /*#__PURE__*/function () {
571
574
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
572
- var params, format, startDate, endDate, _formatDayTime, startDateTime, endDateTime, data, _list;
575
+ var _context$appHelper$ut, _context$appHelper$ut2, params, format, startDate, endDate, _formatDayTime, startDateTime, endDateTime, isPartyRoomResourceShop, codes, data, _list;
573
576
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
574
577
  while (1) switch (_context3.prev = _context3.next) {
575
578
  case 0:
@@ -602,16 +605,18 @@ var Info = function Info(_, ref) {
602
605
  case 13:
603
606
  params.with_date_times = state.date.value.format('YYYY-MM-DD');
604
607
  case 14:
605
- _context3.next = 16;
608
+ isPartyRoomResourceShop = getIsPartyRoomResourceShop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.global) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.globalConfig) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.id);
609
+ codes = isPartyRoomResourceShop ? ['resources', 'therapist', 'table', 'party_room'] : ['resources', 'therapist', 'table'];
610
+ _context3.next = 18;
606
611
  return state.apis.getResources(_objectSpread({
607
612
  skip: 1,
608
613
  num: 1000,
609
- codes: ['resources', 'therapist', 'table'],
614
+ codes: codes,
610
615
  _config: {
611
616
  abort: true
612
617
  }
613
618
  }, params));
614
- case 16:
619
+ case 18:
615
620
  data = _context3.sent;
616
621
  // 合并无资源
617
622
  _list = [getNoResource()].concat((data === null || data === void 0 ? void 0 : data.list) || []);
@@ -621,19 +626,19 @@ var Info = function Info(_, ref) {
621
626
  resourcesOrigin: _list
622
627
  }
623
628
  });
624
- _context3.next = 24;
629
+ _context3.next = 26;
625
630
  break;
626
- case 21:
627
- _context3.prev = 21;
631
+ case 23:
632
+ _context3.prev = 23;
628
633
  _context3.t0 = _context3["catch"](1);
629
634
  console.log(_context3.t0, 'err');
630
- case 24:
635
+ case 26:
631
636
  setResourceLoading(false);
632
- case 25:
637
+ case 27:
633
638
  case "end":
634
639
  return _context3.stop();
635
640
  }
636
- }, _callee3, null, [[1, 21]]);
641
+ }, _callee3, null, [[1, 23]]);
637
642
  }));
638
643
  return function getResourcesData() {
639
644
  return _ref5.apply(this, arguments);
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType, business
95
95
  if (renderType === 'eventBooking') {
96
96
  return false;
97
97
  }
98
- var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988, 8872, 6930, 8824, 8913, 8918];
98
+ var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988, 8872, 6930, 8824, 8913, 8918, 6413];
99
99
 
100
100
  // 固定的shopId 或者安装 Resource Kit 应用,则认为是booking4Shop
101
101
  return booking4Shops.includes(shopId) || (businessUtils === null || businessUtils === void 0 ? void 0 : businessUtils.getAppByModal('resourcekit'));
@@ -38,7 +38,7 @@ import { isNormalProductByDurationSchedule } from "../../../info/service2/utils"
38
38
  import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
39
39
  var submitLock = false;
40
40
  var Info = function Info(_, ref) {
41
- var _state$service3, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI4, _state$service$cacheI5, _state$service5, _window$BaseMaterials, _state$service7, _state$service$cacheI10, _state$bookingConfig5, _state$service$cacheI11, _state$service$cacheI12, _state$service8, _state$service$resour2, _state$service$cacheI13, _state$service$cacheI14;
41
+ var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI4, _state$service$cacheI5, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI10, _state$bookingConfig5, _state$service$cacheI11, _state$service$cacheI12, _state$service9, _state$service$resour2, _state$service$cacheI13, _state$service$cacheI14;
42
42
  var _Form$useForm = Form.useForm(),
43
43
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
44
44
  form = _Form$useForm2[0];
@@ -52,9 +52,12 @@ var Info = function Info(_, ref) {
52
52
  var resourcesRef = useRef(null);
53
53
  var isChangeTotal = useRef(false);
54
54
  var isNormalProduct = useMemo(function () {
55
- var _state$service, _state$service2;
56
- return (state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.cacheItem) && isNormalProductByDurationSchedule(state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.cacheItem);
57
- }, [state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.cacheItem]);
55
+ var _state$service, _state$service2, _state$service3;
56
+ if (!(state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && _state$service.cacheItem)) {
57
+ return true;
58
+ }
59
+ return (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.cacheItem) && isNormalProductByDurationSchedule(state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.cacheItem);
60
+ }, [state === null || state === void 0 || (_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.cacheItem]);
58
61
 
59
62
  // 当前商品信息+ 表单信息
60
63
  var getCurrentCacheItem = useMemoizedFn(function (_cacheItem) {
@@ -428,9 +431,9 @@ var Info = function Info(_, ref) {
428
431
  getDiscount();
429
432
  }, [useTotal, (_state$service$cacheI5 = state.service.cacheItem) === null || _state$service$cacheI5 === void 0 || (_state$service$cacheI5 = _state$service$cacheI5._extend) === null || _state$service$cacheI5 === void 0 ? void 0 : _state$service$cacheI5.origin_total]);
430
433
  var bundles = useMemo(function () {
431
- var _state$service4;
432
- return ((_state$service4 = state.service) === null || _state$service4 === void 0 || (_state$service4 = _state$service4.cacheItem) === null || _state$service4 === void 0 || (_state$service4 = _state$service4._extend) === null || _state$service4 === void 0 || (_state$service4 = _state$service4.other) === null || _state$service4 === void 0 ? void 0 : _state$service4.bundle) || [];
433
- }, [(_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 || (_state$service5 = _state$service5._extend) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.other) === null || _state$service5 === void 0 ? void 0 : _state$service5.bundle]);
434
+ var _state$service5;
435
+ return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 || (_state$service5 = _state$service5._extend) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.other) === null || _state$service5 === void 0 ? void 0 : _state$service5.bundle) || [];
436
+ }, [(_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.cacheItem) === null || _state$service6 === void 0 || (_state$service6 = _state$service6._extend) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.other) === null || _state$service6 === void 0 ? void 0 : _state$service6.bundle]);
434
437
 
435
438
  /**
436
439
  * @title: 编辑商品
@@ -580,7 +583,7 @@ var Info = function Info(_, ref) {
580
583
  var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
581
584
  console.log(isShowTimeAndResource, 'isShowTimeAndResource');
582
585
  var productName = useMemo(function () {
583
- var _state$service6;
586
+ var _state$service7;
584
587
  return /*#__PURE__*/React.createElement(Col, {
585
588
  span: 24
586
589
  }, /*#__PURE__*/React.createElement(Form.Item, {
@@ -591,7 +594,7 @@ var Info = function Info(_, ref) {
591
594
  className: "current-service-info-name-wrap"
592
595
  }, /*#__PURE__*/React.createElement("div", {
593
596
  className: "current-service-info-name"
594
- }, ((_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.cacheItem) === null || _state$service6 === void 0 || (_state$service6 = _state$service6._extend) === null || _state$service6 === void 0 ? void 0 : _state$service6.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
597
+ }, ((_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 ? void 0 : _state$service7.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
595
598
  onClick: handleEdit
596
599
  }, locales.getText('pisell2.text.edit')), !state.isBookingCreatePage && /*#__PURE__*/React.createElement(Button, {
597
600
  onClick: handleChange
@@ -604,7 +607,7 @@ var Info = function Info(_, ref) {
604
607
  return renderBundles(item, state.amountSymbol);
605
608
  }
606
609
  }))));
607
- }, [(_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 ? void 0 : _state$service7.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
610
+ }, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 ? void 0 : _state$service8.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
608
611
  var price = useMemo(function () {
609
612
  var _state$service$cacheI6, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9;
610
613
  return /*#__PURE__*/React.createElement(Col, {
@@ -702,7 +705,7 @@ var Info = function Info(_, ref) {
702
705
  cacheItem: state.service.cacheItem
703
706
  }));
704
707
  // 只监听Capacity 内部使用的 state.locale state.isTerminal, state.service?.cacheItem?._data?.capacitys
705
- }, [state.locale, state.isTerminal, (_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._data) === null || _state$service8 === void 0 ? void 0 : _state$service8.capacitys]);
708
+ }, [state.locale, state.isTerminal, (_state$service9 = state.service) === null || _state$service9 === void 0 || (_state$service9 = _state$service9.cacheItem) === null || _state$service9 === void 0 || (_state$service9 = _state$service9._data) === null || _state$service9 === void 0 ? void 0 : _state$service9.capacitys]);
706
709
  var hiddenQuantity = useMemo(function () {
707
710
  return /*#__PURE__*/React.createElement(Form.Item, {
708
711
  hidden: true,
@@ -29,6 +29,7 @@ export declare const formatValues: (params: {
29
29
  platform: 'h5' | 'pc';
30
30
  excludeDisabled?: boolean;
31
31
  extra?: Record<string, any>;
32
+ otherValue?: Record<string, any>;
32
33
  }) => any;
33
34
  /**
34
35
  * @title: 获取拉开表单弹窗参数
@@ -63,7 +63,7 @@ var formatBookings = (list) => {
63
63
  };
64
64
  var formatValues = (params) => {
65
65
  var _a, _b;
66
- const { state, platform, excludeDisabled, extra } = params;
66
+ const { state, otherValue, platform, excludeDisabled, extra } = params;
67
67
  let values = {
68
68
  type: "event_booking_v2",
69
69
  platform: platform === "pc" ? "PC" : "H5",
@@ -72,7 +72,8 @@ var formatValues = (params) => {
72
72
  bookings: [],
73
73
  shop_note: "",
74
74
  schedule_date: "",
75
- ...extra || {}
75
+ ...extra || {},
76
+ ...otherValue || {}
76
77
  };
77
78
  console.log("values", values);
78
79
  let data = [];
@@ -0,0 +1 @@
1
+ export declare const getIsPartyRoomResourceShop: (id: number) => boolean;
@@ -0,0 +1,31 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/booking/info/service/editService/constants.ts
20
+ var constants_exports = {};
21
+ __export(constants_exports, {
22
+ getIsPartyRoomResourceShop: () => getIsPartyRoomResourceShop
23
+ });
24
+ module.exports = __toCommonJS(constants_exports);
25
+ var getIsPartyRoomResourceShop = (id) => {
26
+ return [2155].includes(id);
27
+ };
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ getIsPartyRoomResourceShop
31
+ });
@@ -57,10 +57,13 @@ var import_like = __toESM(require("../like"));
57
57
  var import_utils7 = require("../../utils");
58
58
  var import_serviceManager = require("../serviceManager");
59
59
  var import_EditTabs = __toESM(require("./EditTabs"));
60
+ var import_constants = require("./constants");
61
+ var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
60
62
  var submitLock = false;
61
63
  var Info = (_, ref) => {
62
64
  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;
63
65
  const [form] = import_antd.Form.useForm();
66
+ const context = (0, import_useEngineContext.default)();
64
67
  const useTotal = import_antd.Form.useWatch("total", form);
65
68
  const useLikeStatus = import_antd.Form.useWatch("like_status", form);
66
69
  const useResource = import_antd.Form.useWatch("resource", form);
@@ -354,6 +357,7 @@ var Info = (_, ref) => {
354
357
  });
355
358
  }, [(_q = (_p = (_o = state.service) == null ? void 0 : _o.cacheItem) == null ? void 0 : _p._extend) == null ? void 0 : _q.multi_day]);
356
359
  const getResourcesData = async () => {
360
+ var _a2, _b2, _c2, _d2, _e2;
357
361
  setResourceLoading(true);
358
362
  try {
359
363
  let params = {};
@@ -373,10 +377,12 @@ var Info = (_, ref) => {
373
377
  } else {
374
378
  params.with_date_times = state.date.value.format("YYYY-MM-DD");
375
379
  }
380
+ const isPartyRoomResourceShop = (0, import_constants.getIsPartyRoomResourceShop)((_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id);
381
+ const codes = isPartyRoomResourceShop ? ["resources", "therapist", "table", "party_room"] : ["resources", "therapist", "table"];
376
382
  let data = await state.apis.getResources({
377
383
  skip: 1,
378
384
  num: 1e3,
379
- codes: ["resources", "therapist", "table"],
385
+ codes,
380
386
  _config: { abort: true },
381
387
  ...params
382
388
  });
@@ -144,7 +144,8 @@ var isBooking4Shop = (shopId, renderType, businessUtils) => {
144
144
  6930,
145
145
  8824,
146
146
  8913,
147
- 8918
147
+ 8918,
148
+ 6413
148
149
  ];
149
150
  return booking4Shops.includes(shopId) || (businessUtils == null ? void 0 : businessUtils.getAppByModal("resourcekit"));
150
151
  };
@@ -64,8 +64,11 @@ var Info = (_, ref) => {
64
64
  const resourcesRef = (0, import_react.useRef)(null);
65
65
  const isChangeTotal = (0, import_react.useRef)(false);
66
66
  const isNormalProduct = (0, import_react.useMemo)(() => {
67
- var _a2, _b2;
68
- return ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem) && (0, import_utils6.isNormalProductByDurationSchedule)((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem);
67
+ var _a2, _b2, _c2;
68
+ if (!((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem)) {
69
+ return true;
70
+ }
71
+ return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils6.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
69
72
  }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
70
73
  const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
71
74
  let values = form.getFieldsValue();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.2.19",
3
+ "version": "6.2.20",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
- "@pisell/date-picker": "3.0.4",
63
62
  "@pisell/utils": "3.0.0",
63
+ "@pisell/materials": "3.3.42",
64
64
  "@pisell/icon": "0.0.11",
65
- "@pisell/materials": "3.3.42"
65
+ "@pisell/date-picker": "3.0.4"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",
@@ -1,63 +0,0 @@
1
- import Decimal from 'decimal.js';
2
- import { ICalculatePriceParams } from './types';
3
- export declare const handleProductInfo: (eventDetail: any, num: number) => {
4
- totalPrice: number;
5
- originTotal: any;
6
- is_charge_tax: any;
7
- };
8
- /**
9
- * 获取商品总价
10
- * @description 当前总价计算基于商品数量为1
11
- * @param item 商品
12
- * @returns 商品总价
13
- */
14
- export declare const getTotalPrice: (params: ICalculatePriceParams) => number;
15
- /**
16
- * 获取商品原始总价
17
- * @description 当前总价计算基于商品数量为1
18
- * @param item 商品
19
- * @returns 商品原始总价
20
- */
21
- export declare const getOriginTotalPrice: (params: ICalculatePriceParams) => number | undefined;
22
- export declare const handleCartItemOrigin: (cartItem: any, eventDetail: any) => any;
23
- export declare const formatBundleToOrigin: (bundle: any) => any;
24
- export declare const formatOptionsToOrigin: (options: any) => any;
25
- export declare const handleProductDeposit: (cartItem: any, eventDetail: any, num: number) => {
26
- total: number;
27
- protocols: any;
28
- } | null;
29
- /**
30
- * 获取商品定金
31
- * @description 定金基于商品售价来算,最终乘商品数量
32
- * 1、如果套餐主商品有定金规则,则定金为:(套餐商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
33
- * 2、如果套餐主商品没有定金规则,子商品有定金规则,则定金为:(套餐子商品售价 * 套餐子商品定金百分比 + 套餐子商品定金固定金额)* 商品数量,最终将所有子商品定金相加
34
- * 3、普通商品/单规格商品/组合规则商品,定金规则:(商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
35
- * @param params 参数
36
- * @returns 商品定金
37
- */
38
- export declare const getProductDeposit: (params: {
39
- cartItem: any;
40
- product: any;
41
- bundle?: any;
42
- options?: any;
43
- num?: number;
44
- }) => {
45
- total: number;
46
- protocols: any;
47
- } | null;
48
- /**
49
- * 计算商品定金
50
- * @param params 参数
51
- * @returns 商品定金
52
- */
53
- export declare const calculateProductDeposit: (params: {
54
- depositData: {
55
- deposit_fixed?: string;
56
- deposit_percentage?: string;
57
- };
58
- total: string | number;
59
- num: number;
60
- }) => {
61
- result: boolean;
62
- depositTotal: Decimal;
63
- };
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- interface CheckoutData {
3
- }
4
- interface PayProps {
5
- order_id: string;
6
- amount: number;
7
- sale_channel?: string;
8
- is_deposit?: number;
9
- deposit_amount?: number;
10
- total_amount?: number;
11
- }
12
- interface CheckoutContextType {
13
- onCheckBeforeBooking: (data: any) => Promise<{
14
- result: boolean;
15
- num: number;
16
- }>;
17
- onCheckout: (data: any) => Promise<any>;
18
- onPay: (payProps: PayProps) => void;
19
- createBooking: any;
20
- checkBeforeBooking: any;
21
- freePay: any;
22
- }
23
- interface CheckoutProviderProps {
24
- children: React.ReactNode;
25
- }
26
- export declare const CheckoutContext: React.Context<CheckoutContextType | undefined>;
27
- export declare const CheckoutProvider: React.FC<CheckoutProviderProps>;
28
- /**
29
- * 使用步骤管理的Hook
30
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
31
- * @returns {StepContextType} 步骤管理上下文
32
- */
33
- export declare const useCheckout: () => CheckoutContextType;
34
- declare const _default: {
35
- defaultState: CheckoutData;
36
- };
37
- export default _default;
@@ -1,15 +0,0 @@
1
- /**
2
- * @title: 下单前置校验接口
3
- * @param {any} data
4
- */
5
- export declare const checkBeforeBookingApi: (data: any) => Promise<any>;
6
- /**
7
- * @title: 创建订单
8
- * @param {any} data
9
- */
10
- export declare const createBookingApi: (data: any) => Promise<any>;
11
- /**
12
- * @title: 免费支付
13
- * @param {string} orderId
14
- */
15
- export declare const freePayApi: (orderId: string) => Promise<any>;
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- interface CustomerData {
3
- }
4
- interface CustomerContextType {
5
- appContext: any;
6
- appUtils: any;
7
- isLogin: () => boolean;
8
- openLoginModal: (params: any) => void;
9
- getUserInfo: () => any;
10
- }
11
- interface CustomerProviderProps {
12
- children: React.ReactNode;
13
- }
14
- export declare const CustomerContext: React.Context<CustomerContextType | undefined>;
15
- export declare const CustomerProvider: React.FC<CustomerProviderProps>;
16
- /**
17
- * 使用步骤管理的Hook
18
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
19
- * @returns {StepContextType} 步骤管理上下文
20
- */
21
- export declare const useCustomer: () => CustomerContextType;
22
- declare const _default: {
23
- defaultState: CustomerData;
24
- };
25
- export default _default;
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- interface EventDetailContextType {
3
- detail: any;
4
- open: boolean;
5
- onOpenEventDetail: (eventItem: any) => void;
6
- onCloseEventDetail: () => void;
7
- onSelectEventDetail: () => void;
8
- selectEventDetailBookingOptions: (v: any) => void;
9
- getEventDetailSelectDate: {
10
- run: (id: number, params: any) => void;
11
- loading: boolean;
12
- data?: any;
13
- };
14
- currentBookingOption: any;
15
- selectEventDetailProductDetail: (productDetail: any) => void;
16
- checkBeforeSelectEventDetail: () => boolean;
17
- getProductDetailRequest: any;
18
- }
19
- interface EventDetailProviderProps {
20
- children: React.ReactNode;
21
- }
22
- export declare const EventDetailContext: React.Context<EventDetailContextType | undefined>;
23
- export declare const EventDetailProvider: React.FC<EventDetailProviderProps>;
24
- /**
25
- * 使用步骤管理的Hook
26
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
27
- * @returns {StepContextType} 步骤管理上下文
28
- */
29
- export declare const useEventDetail: () => EventDetailContextType;
30
- export {};
@@ -1,49 +0,0 @@
1
- /**
2
- * @title: 获取活动列表
3
- * @description: https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/3102494/detail/55349999?spaceKey=menutech
4
- * @param {any} params
5
- * @return {*}
6
- * @Author: zhiwei.Wang
7
- */
8
- export declare const getEventListApi: (params: {
9
- event_item_resource_id: number | string;
10
- title?: string;
11
- skip?: number;
12
- num?: number;
13
- open_quotation: number;
14
- }) => Promise<any>;
15
- export declare const getEventDetailIntroductionApi: (eventItemId: number | string) => Promise<any>;
16
- export declare const getEventDetailTeacherApi: (params: {
17
- event_item_id: number | string;
18
- }) => Promise<any>;
19
- export declare const getEventDetailBookingOptionsApi: (params: {
20
- ids: number | string;
21
- num: number;
22
- skip: number;
23
- customer_id?: number;
24
- open_quotation?: number;
25
- is_eject?: number;
26
- }) => Promise<any>;
27
- export declare const getEventDetailSelectDateApi: (id: number | string, params: {
28
- days: number;
29
- start_date?: string;
30
- }) => Promise<any>;
31
- /**
32
- * 批量查询指定商品的最新价格
33
- * @param params
34
- */
35
- export declare const getProductPrice: (params: {
36
- ids: number[];
37
- customer_id: number;
38
- schedule_date?: string;
39
- }) => Promise<any>;
40
- /**
41
- * 获取商品详情
42
- * @param id 商品id
43
- * @param params 参数
44
- * @returns
45
- */
46
- export declare const getProductDetailApi: (id: number, params: {
47
- open_deposit?: string | number;
48
- front_end_cache_id?: string;
49
- }) => Promise<any>;
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- interface SummaryData {
3
- }
4
- interface SummaryContextType {
5
- subtotal: number | string;
6
- total: number | string;
7
- taxTitle?: string;
8
- totalTaxFee?: string;
9
- isPriceIncludeTax?: 0 | 1;
10
- deposit?: {
11
- total: string;
12
- protocols: any[];
13
- hasDeposit: boolean;
14
- };
15
- isAgreeDepositPolicy: boolean;
16
- setIsAgreeDepositPolicy: (value: boolean) => void;
17
- getDepositProtocol: (params: {
18
- id: string;
19
- }) => Promise<any>;
20
- }
21
- interface SummaryProviderProps {
22
- children: React.ReactNode;
23
- }
24
- export declare const SummaryContext: React.Context<SummaryContextType | undefined>;
25
- export declare const SummaryProvider: React.FC<SummaryProviderProps>;
26
- /**
27
- * 使用步骤管理的Hook
28
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
29
- * @returns {StepContextType} 步骤管理上下文
30
- */
31
- export declare const useSummary: () => SummaryContextType;
32
- declare const _default: {
33
- defaultState: SummaryData;
34
- };
35
- export default _default;
@@ -1 +0,0 @@
1
- export declare const getDepositProtocolApi: (id: string) => Promise<any>;