@pisell/private-materials 3.3.78 → 3.3.80

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 (262) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/businessModel/SalesModel/Sales/index.js +4 -37
  12. package/es/components/Sales/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +0 -7
  14. package/es/components/Sales/Resource/serve.js +0 -10
  15. package/es/components/Sales/Summary/utils.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  17. package/es/components/appointmentBooking/components/Cart/Item/index.js +2 -4
  18. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  19. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  20. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  21. package/es/components/appointmentBooking/components/Header/index.js +14 -8
  22. package/es/components/appointmentBooking/components/Services/index.js +36 -38
  23. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Voucher/index.js +0 -13
  25. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  26. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +7 -6
  27. package/es/components/appointmentBooking/index.d.ts +0 -1
  28. package/es/components/appointmentBooking/index.js +0 -14
  29. package/es/components/appointmentBooking/index.less +1 -1
  30. package/es/components/appointmentBooking/locales.js +3 -3
  31. package/es/components/booking/addons/index.js +2 -9
  32. package/es/components/booking/addons/model.d.ts +10 -1
  33. package/es/components/booking/addons/model.js +0 -5
  34. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  35. package/es/components/booking/components/TabProduct/selectProductItem/index.js +1 -3
  36. package/es/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
  37. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  38. package/es/components/booking/components/browserSelect/index.js +1 -1
  39. package/es/components/booking/components/footer/amount.js +1 -2
  40. package/es/components/booking/components/footer/index.d.ts +0 -1
  41. package/es/components/booking/components/footer/index.js +3 -9
  42. package/es/components/booking/components/footer/utils.js +36 -74
  43. package/es/components/booking/components/voucher/index.d.ts +0 -1
  44. package/es/components/booking/components/voucher/index.js +66 -110
  45. package/es/components/booking/forms/model.d.ts +10 -1
  46. package/es/components/booking/forms/model.js +5 -5
  47. package/es/components/booking/info/model.d.ts +10 -1
  48. package/es/components/booking/info/service/like/index.js +1 -1
  49. package/es/components/booking/info/service2/utils.js +2 -6
  50. package/es/components/booking/info/utils.js +1 -1
  51. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  52. package/es/components/booking/info2/service/addService/index.js +2 -2
  53. package/es/components/booking/info2/service/editService/index.js +2 -5
  54. package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
  55. package/es/components/booking/info2/utilsByBooking.js +3 -5
  56. package/es/components/booking/locales.d.ts +0 -3
  57. package/es/components/booking/locales.js +3 -6
  58. package/es/components/booking/materiels/startTime/index.js +1 -1
  59. package/es/components/booking/model.d.ts +9 -1
  60. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  61. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  62. package/es/components/booking/notes/model.d.ts +10 -1
  63. package/es/components/booking/notes/model.js +5 -5
  64. package/es/components/booking/payments/model.d.ts +10 -1
  65. package/es/components/booking/payments/model.js +5 -5
  66. package/es/components/eftposPay/amount.d.ts +1 -1
  67. package/es/components/eftposPay/device.d.ts +1 -1
  68. package/es/components/eftposPay/hooks.d.ts +2 -2
  69. package/es/components/eftposPay/store/index.d.ts +4 -4
  70. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  72. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
  73. package/es/components/eventBooking/index.d.ts +0 -1
  74. package/es/components/eventBooking/index.js +7 -21
  75. package/es/components/eventBooking/locales.js +3 -3
  76. package/es/components/index.d.ts +1 -2
  77. package/es/components/index.js +1 -2
  78. package/es/components/listComponent/index.js +5 -5
  79. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  80. package/es/components/pay/toC/model.d.ts +9 -1
  81. package/es/components/productExtension/card/index.js +3 -3
  82. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  83. package/es/components/productExtension/fields/Forms/index.js +12 -12
  84. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  85. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  86. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  87. package/es/components/productExtension/server.js +2 -2
  88. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  89. package/es/components/schedules/calendar/index.js +4 -4
  90. package/es/components/schedules/calendar/serve.js +2 -2
  91. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  92. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  93. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  94. package/es/components/schedules/components/ResourceList/index.js +1 -1
  95. package/es/components/schedules/components/Search/index.js +5 -5
  96. package/es/components/schedules/model.d.ts +9 -1
  97. package/es/components/schedules/model.js +5 -5
  98. package/es/components/schedules/openHours/index.js +1 -1
  99. package/es/components/schedules/openHours/serve.js +2 -2
  100. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  101. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  102. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  103. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  104. package/es/components/schedules/products/serve.js +2 -2
  105. package/es/components/schedules/products/utils.js +5 -5
  106. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  107. package/es/components/schedules/resources/detail/index.js +10 -10
  108. package/es/components/schedules/resources/list/index.js +2 -2
  109. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  110. package/es/components/schedules/resources/serve.js +2 -2
  111. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  112. package/es/components/schedules/utils.d.ts +1 -1
  113. package/es/components/schedules/utils.js +4 -4
  114. package/es/components/selectModal/index.js +2 -2
  115. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  116. package/es/components/ticketBooking/components/addServiceVariant/addService.js +5 -6
  117. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  118. package/es/components/ticketBooking/components/ticketBooking/index.js +3 -124
  119. package/es/components/ticketBooking/locales.d.ts +146 -164
  120. package/es/components/ticketBooking/locales.js +147 -195
  121. package/es/components/ticketBooking/utils/index.d.ts +1 -5
  122. package/es/components/ticketBooking/utils/index.js +6 -58
  123. package/es/components/wallet/Detail/model.d.ts +13 -1
  124. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  125. package/es/components/wallet/PointCard/model.d.ts +13 -1
  126. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  127. package/es/components/wallet/Voucher/model.d.ts +13 -1
  128. package/es/components/wallet/model.d.ts +9 -1
  129. package/es/hooks/useComponents.js +1 -1
  130. package/es/index.d.ts +0 -1
  131. package/es/index.js +1 -2
  132. package/es/utils/index.d.ts +1 -1
  133. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  134. package/lib/components/Sales/Resource/index.js +1 -1
  135. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  136. package/lib/components/Sales/Resource/serve.js +2 -9
  137. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  138. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  139. package/lib/components/appointmentBooking/components/Cart/Item/index.js +4 -5
  140. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  141. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  142. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  143. package/lib/components/appointmentBooking/components/Header/index.js +3 -2
  144. package/lib/components/appointmentBooking/components/Services/index.js +18 -19
  145. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  146. package/lib/components/appointmentBooking/components/Voucher/index.js +0 -9
  147. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  148. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -0
  149. package/lib/components/appointmentBooking/index.d.ts +0 -1
  150. package/lib/components/appointmentBooking/index.js +0 -11
  151. package/lib/components/appointmentBooking/index.less +1 -1
  152. package/lib/components/appointmentBooking/locales.js +3 -3
  153. package/lib/components/booking/addons/index.js +2 -10
  154. package/lib/components/booking/addons/model.d.ts +10 -1
  155. package/lib/components/booking/addons/model.js +0 -3
  156. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  157. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +1 -5
  158. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
  159. package/lib/components/booking/components/footer/amount.js +1 -2
  160. package/lib/components/booking/components/footer/index.d.ts +0 -1
  161. package/lib/components/booking/components/footer/index.js +5 -10
  162. package/lib/components/booking/components/footer/utils.js +12 -48
  163. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  164. package/lib/components/booking/components/voucher/index.js +67 -111
  165. package/lib/components/booking/forms/model.d.ts +10 -1
  166. package/lib/components/booking/info/model.d.ts +10 -1
  167. package/lib/components/booking/info/service2/utils.js +1 -3
  168. package/lib/components/booking/info/utils.js +3 -1
  169. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  170. package/lib/components/booking/info2/service/addService/index.js +2 -2
  171. package/lib/components/booking/info2/service/editService/index.js +2 -5
  172. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
  173. package/lib/components/booking/info2/utilsByBooking.js +2 -3
  174. package/lib/components/booking/locales.d.ts +0 -3
  175. package/lib/components/booking/locales.js +3 -6
  176. package/lib/components/booking/model.d.ts +9 -1
  177. package/lib/components/booking/notes/model.d.ts +10 -1
  178. package/lib/components/booking/payments/model.d.ts +10 -1
  179. package/lib/components/eftposPay/amount.d.ts +1 -1
  180. package/lib/components/eftposPay/device.d.ts +1 -1
  181. package/lib/components/eftposPay/hooks.d.ts +2 -2
  182. package/lib/components/eftposPay/store/index.d.ts +4 -4
  183. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  185. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
  186. package/lib/components/eventBooking/index.d.ts +0 -1
  187. package/lib/components/eventBooking/index.js +7 -11
  188. package/lib/components/eventBooking/locales.js +3 -3
  189. package/lib/components/index.d.ts +1 -2
  190. package/lib/components/index.js +0 -3
  191. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  192. package/lib/components/pay/toC/model.d.ts +9 -1
  193. package/lib/components/schedules/model.d.ts +9 -1
  194. package/lib/components/schedules/utils.d.ts +1 -1
  195. package/lib/components/schedules/utils.js +1 -1
  196. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  197. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +4 -6
  198. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  199. package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -124
  200. package/lib/components/ticketBooking/locales.d.ts +146 -164
  201. package/lib/components/ticketBooking/locales.js +4 -22
  202. package/lib/components/ticketBooking/utils/index.d.ts +1 -5
  203. package/lib/components/ticketBooking/utils/index.js +5 -48
  204. package/lib/components/wallet/Detail/model.d.ts +13 -1
  205. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  206. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  207. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  208. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  209. package/lib/components/wallet/model.d.ts +9 -1
  210. package/lib/index.d.ts +0 -1
  211. package/lib/index.js +0 -3
  212. package/lib/utils/index.d.ts +1 -1
  213. package/package.json +4 -4
  214. package/es/components/booking/components/voucher/utils.d.ts +0 -4
  215. package/es/components/booking/components/voucher/utils.js +0 -15
  216. package/es/components/stepController/components/Content/index.d.ts +0 -7
  217. package/es/components/stepController/components/Content/index.js +0 -9
  218. package/es/components/stepController/components/Content/index.less +0 -8
  219. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  220. package/es/components/stepController/components/Footer/index.js +0 -15
  221. package/es/components/stepController/components/Footer/index.less +0 -39
  222. package/es/components/stepController/components/Header/index.d.ts +0 -20
  223. package/es/components/stepController/components/Header/index.js +0 -97
  224. package/es/components/stepController/components/Header/index.less +0 -21
  225. package/es/components/stepController/index.d.ts +0 -5
  226. package/es/components/stepController/index.js +0 -64
  227. package/es/components/stepController/index.less +0 -11
  228. package/es/components/stepController/locales.d.ts +0 -27
  229. package/es/components/stepController/locales.js +0 -32
  230. package/es/components/stepController/types.d.ts +0 -23
  231. package/es/components/stepController/types.js +0 -1
  232. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  233. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  234. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  235. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  236. package/es/hooks/useWindowSize.d.ts +0 -5
  237. package/es/hooks/useWindowSize.js +0 -26
  238. package/lib/components/booking/components/voucher/utils.d.ts +0 -4
  239. package/lib/components/booking/components/voucher/utils.js +0 -43
  240. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  241. package/lib/components/stepController/components/Content/index.js +0 -40
  242. package/lib/components/stepController/components/Content/index.less +0 -8
  243. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  244. package/lib/components/stepController/components/Footer/index.js +0 -49
  245. package/lib/components/stepController/components/Footer/index.less +0 -39
  246. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  247. package/lib/components/stepController/components/Header/index.js +0 -104
  248. package/lib/components/stepController/components/Header/index.less +0 -21
  249. package/lib/components/stepController/index.d.ts +0 -5
  250. package/lib/components/stepController/index.js +0 -89
  251. package/lib/components/stepController/index.less +0 -11
  252. package/lib/components/stepController/locales.d.ts +0 -27
  253. package/lib/components/stepController/locales.js +0 -50
  254. package/lib/components/stepController/types.d.ts +0 -23
  255. package/lib/components/stepController/types.js +0 -17
  256. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  257. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  258. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  259. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  260. package/lib/hooks/useWindowSize.d.ts +0 -5
  261. package/lib/hooks/useWindowSize.js +0 -51
  262. package/lowcode/step-controller/meta.ts +0 -88
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
4
3
  export default SelectProductItem;
@@ -63,8 +63,6 @@ var SelectProductItem = function SelectProductItem(_ref) {
63
63
  disabled: disabled
64
64
  }), /*#__PURE__*/React.createElement("div", {
65
65
  className: "server-select-product-total"
66
- }, item._extend.origin_total !== item._extend.total && /*#__PURE__*/React.createElement("span", {
67
- className: "server-select-product-origin-total"
68
- }, formatAmount(item._extend.origin_total * item._extend.quantity, 2, amountSymbol)), formatAmount(item._extend.total * item._extend.quantity, 2, amountSymbol)))));
66
+ }, formatAmount(item._extend.total * item._extend.quantity, 2, amountSymbol)))));
69
67
  };
70
68
  export default SelectProductItem;
@@ -66,7 +66,6 @@
66
66
  font-style: normal;
67
67
  font-weight: 400;
68
68
 
69
-
70
69
  .server-select-product-total {
71
70
  color: var(--Base-Black, #000);
72
71
  font-size: 16px;
@@ -74,11 +73,6 @@
74
73
  font-weight: 500;
75
74
  line-height: 24px;
76
75
  }
77
- .server-select-product-origin-total {
78
- text-decoration: line-through;
79
- color: #4e4e4e;
80
- margin-right: 12px;
81
- }
82
76
  }
83
77
 
84
78
 
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
2
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
8
8
  import classNames from "classnames";
@@ -13,10 +13,6 @@ import "./index.less";
13
13
 
14
14
  // tabs 子组件定义
15
15
 
16
- // 定义主键类型
17
-
18
- // Tabs 可传递的参数
19
-
20
16
  var Tabs = function Tabs(_ref, ref) {
21
17
  var renderTab = _ref.renderTab,
22
18
  rowKey = _ref.rowKey,
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
29
29
  onChange: function onChange(e) {
30
30
  var _resetProps$onChange;
31
31
  e.persist();
32
- (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
32
+ (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
33
33
  }
34
34
  }), _options);
35
35
  };
@@ -55,8 +55,7 @@ var getProductAmount = function getProductAmount(state, isEdit) {
55
55
  var _duration = isDayBookingProduct(_item, state) ? _item._extend.duration : 0;
56
56
  duration += _duration;
57
57
  } else {
58
- var _quantity = _item._extend.quantity || 1;
59
- price += Number(_item._extend.total) * Number(_quantity);
58
+ price += Number(_item._extend.total);
60
59
 
61
60
  // 附加商品
62
61
  price += getRelationDetailsTotal(_item._extend.relation_details || []);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -47,7 +47,7 @@ import dayjs from 'dayjs';
47
47
  * @Date: 2024-01-30 16:51
48
48
  */
49
49
  var Footer = function Footer(props) {
50
- var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _businessUtils$getApp2, _state$addons4, _state$bookingDetail12, _state$bookingDetail13;
50
+ var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _state$addons4, _state$bookingDetail12, _state$bookingDetail13;
51
51
  var state = props.state,
52
52
  buttons = props.buttons,
53
53
  dispatch = props.dispatch,
@@ -240,7 +240,6 @@ var Footer = function Footer(props) {
240
240
 
241
241
  // 是否安装商品券应用
242
242
  var hasGoodPassApp = !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp = businessUtils.getAppByModal) !== null && _businessUtils$getApp !== void 0 && _businessUtils$getApp.call(businessUtils, 'goodpass'));
243
- var hasDiscountCardApp = !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp2 = businessUtils.getAppByModal) !== null && _businessUtils$getApp2 !== void 0 && _businessUtils$getApp2.call(businessUtils, 'discountcard'));
244
243
  console.log('has goodpass app:', hasGoodPassApp);
245
244
 
246
245
  /**
@@ -1292,19 +1291,14 @@ var Footer = function Footer(props) {
1292
1291
  label: locales.getText('pisell2.text.refunded-amount')
1293
1292
  }];
1294
1293
  }, [total, (_state$bookingDetail13 = state.bookingDetail) === null || _state$bookingDetail13 === void 0 ? void 0 : _state$bookingDetail13.surcharge, state, state.bookingId]);
1295
- var paymentRefundedStatus = useMemo(function () {
1296
- var _state$bookingDetail14;
1297
- return ['partially_refunded', 'refunded'].includes(state === null || state === void 0 || (_state$bookingDetail14 = state.bookingDetail) === null || _state$bookingDetail14 === void 0 ? void 0 : _state$bookingDetail14.payment_status);
1298
- }, [state === null || state === void 0 ? void 0 : state.bookingDetail]);
1299
1294
  return /*#__PURE__*/React.createElement(Skeleton, {
1300
1295
  title: false,
1301
1296
  round: true,
1302
1297
  loading: showFooter,
1303
1298
  active: true
1304
- }, (hasGoodPassApp || hasDiscountCardApp) && ['addons', 'info'].includes(source) && !paymentRefundedStatus ? /*#__PURE__*/React.createElement(VoucherCard, {
1299
+ }, hasGoodPassApp && source === 'info' ? /*#__PURE__*/React.createElement(VoucherCard, {
1305
1300
  state: state,
1306
- dispatch: dispatch,
1307
- source: source
1301
+ dispatch: dispatch
1308
1302
  }) : null, /*#__PURE__*/React.createElement("div", {
1309
1303
  className: "pisell-lowcode__booking-footer-total"
1310
1304
  }, /*#__PURE__*/React.createElement("span", {
@@ -11,7 +11,7 @@ import { getSumCapacity } from "../../info2/utilsByBooking";
11
11
  import { getDays } from "../../utils";
12
12
  import { appointmentTypes } from "../../info/service2/status";
13
13
  import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule } from "../../info/service2/utils";
14
- import { isArr, locales, sendWarningLog } from '@pisell/utils';
14
+ import { locales, sendWarningLog } from '@pisell/utils';
15
15
  import { PisellToast } from "@pisell/materials";
16
16
  var formatNote = function formatNote(data) {
17
17
  var _data$notes;
@@ -158,7 +158,7 @@ var checkResourcesFormat = function checkResourcesFormat(resources, service, isC
158
158
  if (!isChild) {
159
159
  resource.capacity = getSumCapacity({
160
160
  cacheItem: service
161
- }, false);
161
+ });
162
162
  }
163
163
  checkSubResourcesCapacity(resource);
164
164
  return {
@@ -198,17 +198,12 @@ var formatResource = function formatResource(service) {
198
198
  * @Date: 2024-12-07 14:52
199
199
  */
200
200
  var formatHolders = function formatHolders(state, item, values) {
201
- var _state$bookingConfig, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4;
201
+ var _state$bookingConfig, _item$_extend, _item$_extend2;
202
202
  var form_id = (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id) || 0;
203
- var form_record = (_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.holder_id ? [(_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.holder_id] : [];
204
- if ((_item$_extend3 = item._extend) !== null && _item$_extend3 !== void 0 && _item$_extend3.holder_id && isArr((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.holder_id)) {
205
- var _item$_extend5;
206
- form_record = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id;
207
- }
208
203
  var obj = {
209
204
  customer_id: values.customer_id,
210
205
  form_id: form_id,
211
- form_record: form_record
206
+ form_record: (_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.holder_id ? [(_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.holder_id] : []
212
207
  };
213
208
 
214
209
  // 连锁加盟子店铺 增加参数
@@ -227,9 +222,9 @@ var formatHolders = function formatHolders(state, item, values) {
227
222
  * @Date: 2024-12-23 12:05
228
223
  */
229
224
  export var formatProductPrice = function formatProductPrice(item) {
230
- var _item$_extend6, _item$_extend7;
231
- var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
232
- var price = Number((_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
225
+ var _item$_extend3, _item$_extend4;
226
+ var other = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.other;
227
+ var price = Number((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.price);
233
228
  // 单规格, 单价 + 单规格价格
234
229
  if (other !== null && other !== void 0 && other.option) {
235
230
  var _other$option;
@@ -240,21 +235,21 @@ export var formatProductPrice = function formatProductPrice(item) {
240
235
  return price;
241
236
  };
242
237
  var formatMetaData = function formatMetaData(item) {
243
- var _item$_extend8, _item$_extend9, _item$_extend11;
238
+ var _item$_extend5, _item$_extend6, _item$_extend8;
244
239
  var metadata = {};
245
- if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.capacity) {
240
+ if ((_item$_extend5 = item._extend) !== null && _item$_extend5 !== void 0 && _item$_extend5.capacity) {
246
241
  metadata.capacity = item._extend.capacity;
247
242
  }
248
243
  if (item._extend.groupId) {
249
244
  metadata.groupId = item._extend.groupId;
250
245
  }
251
- if ((_item$_extend9 = item._extend) !== null && _item$_extend9 !== void 0 && _item$_extend9.holder_id) {
252
- var _item$_extend10;
253
- metadata.holder_id = (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.holder_id;
246
+ if ((_item$_extend6 = item._extend) !== null && _item$_extend6 !== void 0 && _item$_extend6.holder_id) {
247
+ var _item$_extend7;
248
+ metadata.holder_id = (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.holder_id;
254
249
  }
255
- if ((_item$_extend11 = item._extend) !== null && _item$_extend11 !== void 0 && _item$_extend11.multiDayPrices) {
256
- var _item$_extend12;
257
- metadata.multiDayPrices = (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.multiDayPrices;
250
+ if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.multiDayPrices) {
251
+ var _item$_extend9;
252
+ metadata.multiDayPrices = (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.multiDayPrices;
258
253
  }
259
254
  return metadata;
260
255
  };
@@ -281,8 +276,8 @@ var formatMetaData = function formatMetaData(item) {
281
276
  * @Author: WangHan
282
277
  * @Date: 2024-12-07 14:21
283
278
  */
284
- var formatProducts = function formatProducts(item, quantity) {
285
- var _item$_extend13, _item$_extend14, _item$_extend15, _item$_extend16;
279
+ var formatProducts = function formatProducts(item) {
280
+ var _item$_extend10, _item$_extend11, _item$_extend12, _item$_extend13;
286
281
  var total = Number(item._extend.total);
287
282
  var origin_total = Number(item._extend.origin_total);
288
283
  var discount_amount = origin_total - total;
@@ -296,9 +291,9 @@ var formatProducts = function formatProducts(item, quantity) {
296
291
  return item.type !== 'product';
297
292
  });
298
293
  return {
299
- "num": quantity || item._extend.quantity,
294
+ "num": item._extend.quantity,
300
295
  "price": formatProductPrice(item),
301
- "source_product_price": (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.price,
296
+ "source_product_price": (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.price,
302
297
  "product_id": (item === null || item === void 0 ? void 0 : item.product_id) || item.id,
303
298
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
304
299
  "product_discount_reason": item._extend.discount_reason || '',
@@ -308,10 +303,10 @@ var formatProducts = function formatProducts(item, quantity) {
308
303
  "discount_per": item._extend.discount_per,
309
304
  "discount_type": item._extend.discount_type || discount_type,
310
305
  "order_detail_id": item._extend.order_detail_id || 0,
311
- "product_bundle": formatProductBundle((_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 || (_item$_extend14 = _item$_extend14.other) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.bundle),
306
+ "product_bundle": formatProductBundle((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.bundle),
312
307
  "bundle_edit": item._extend.bundle_edit,
313
- "product_option_item": formatProductOption((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 || (_item$_extend15 = _item$_extend15.other) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.option),
314
- "product_variant_id": ((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 || (_item$_extend16 = _item$_extend16.other) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.product_variant_id) || 0,
308
+ "product_option_item": formatProductOption((_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.option),
309
+ "product_variant_id": ((_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 || (_item$_extend13 = _item$_extend13.other) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.product_variant_id) || 0,
315
310
  "discount_list": notManualDiscount,
316
311
  metadata: formatMetaData(item)
317
312
  };
@@ -331,8 +326,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
331
326
 
332
327
  // 过滤出卡片中的普通商品
333
328
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
334
- var _item$_extend17;
335
- var holderId = (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.holder_id;
329
+ var _item$_extend14;
330
+ var holderId = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.holder_id;
336
331
  var bookingHolderId = booking_item._extend.holder_id;
337
332
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
338
333
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -358,15 +353,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
358
353
 
359
354
  // 找出预约商品
360
355
  list = list.filter(function (item) {
361
- var _item$_extend18;
362
- return ((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.holder_id) && appointmentTypes.includes(item.extension_type);
356
+ var _item$_extend15;
357
+ return ((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.holder_id) && appointmentTypes.includes(item.extension_type);
363
358
  });
364
359
 
365
360
  // 对预约商品列表根据holder_id进行分组
366
361
  var groupMap = new Map();
367
362
  list.forEach(function (item) {
368
- var _item$_extend19;
369
- var key = (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.holder_id; // 分组键
363
+ var _item$_extend16;
364
+ var key = (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.holder_id; // 分组键
370
365
  if (!groupMap.has(key)) {
371
366
  groupMap.set(key, []);
372
367
  }
@@ -386,12 +381,6 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
386
381
  return list || [];
387
382
  } catch (error) {}
388
383
  };
389
- var getHolderByIndex = function getHolderByIndex(holder, index) {
390
- var _holder$form_record;
391
- return _objectSpread(_objectSpread({}, holder), {}, {
392
- form_record: [holder === null || holder === void 0 || (_holder$form_record = holder.form_record) === null || _holder$form_record === void 0 ? void 0 : _holder$form_record[index]].filter(Boolean)
393
- });
394
- };
395
384
 
396
385
  /**
397
386
  * @title: 预约商品信息
@@ -425,7 +414,7 @@ var formatBookings = function formatBookings(data, values) {
425
414
  var dayParams = {};
426
415
  var eventOtherParams = data.eventOtherParams;
427
416
  var bookings = [];
428
- list.forEach(function (item) {
417
+ bookings = list.map(function (item) {
429
418
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
430
419
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
431
420
  var end_time = item._extend.endDate.format("HH:mm");
@@ -439,9 +428,9 @@ var formatBookings = function formatBookings(data, values) {
439
428
 
440
429
  // 跨日预约下的普通商品
441
430
  if (isDay) {
442
- var _item$_extend20, _item$_extend21, _item$_extend22, _item$_extend23;
443
- var startDate = ((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.startDate) || ((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.start_date);
444
- var endDate = ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.endDate) || ((_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.end_date);
431
+ var _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20;
432
+ var startDate = ((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.startDate) || ((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.start_date);
433
+ var endDate = ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.endDate) || ((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.end_date);
445
434
  var _formatDayTime = formatDayTime({
446
435
  startDate: startDate,
447
436
  endDate: endDate
@@ -463,7 +452,7 @@ var formatBookings = function formatBookings(data, values) {
463
452
  }
464
453
  }, 'minutes');
465
454
  }
466
- var booking = _objectSpread(_objectSpread({
455
+ return _objectSpread(_objectSpread({
467
456
  "product": formatProducts(item),
468
457
  "relation_products": formatRelationDetails(item._extend.relation_details),
469
458
  'id': item.booking_id || 0,
@@ -485,19 +474,6 @@ var formatBookings = function formatBookings(data, values) {
485
474
  "resources": formatResource(item),
486
475
  "metadata": formatMetaData(item)
487
476
  }, eventOtherParams || {}), dayParams);
488
- if (isDay) {
489
- bookings.push(booking);
490
- return;
491
- }
492
- for (var i = 0; i < (item._extend.quantity || 1); i++) {
493
- bookings.push(_objectSpread(_objectSpread({}, booking), {}, {
494
- "product": formatProducts(item, 1),
495
- "number": item._extend.capacity ? getSumCapacity({
496
- cacheItem: item
497
- }, false) : item._extend.number || 1,
498
- "holder": getHolderByIndex(booking.holder, i)
499
- }));
500
- }
501
477
  });
502
478
  return bookings;
503
479
  };
@@ -515,8 +491,8 @@ var formatRelationProducts = function formatRelationProducts(data) {
515
491
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
516
492
  // open items 下的商品
517
493
  list = list.filter(function (item) {
518
- var _item$_extend24;
519
- return !((_item$_extend24 = item._extend) !== null && _item$_extend24 !== void 0 && _item$_extend24.holder_id);
494
+ var _item$_extend21;
495
+ return !((_item$_extend21 = item._extend) !== null && _item$_extend21 !== void 0 && _item$_extend21.holder_id);
520
496
  });
521
497
  var relationProducts = [];
522
498
  relationProducts = list.map(function (item) {
@@ -611,11 +587,7 @@ export var formatValues = function formatValues(state) {
611
587
  if (isDay || isEvent) {
612
588
  values.relation_products = formatRelationProducts(state);
613
589
  } else {
614
- var _values$relation_prod;
615
590
  values.relation_products = formatNormalProducts(state);
616
- if (!((_values$relation_prod = values.relation_products) !== null && _values$relation_prod !== void 0 && _values$relation_prod.length)) {
617
- values.relation_products = undefined;
618
- }
619
591
  }
620
592
  // 服务
621
593
  values.bookings = formatBookings(state, values);
@@ -645,18 +617,8 @@ export var formatValues = function formatValues(state) {
645
617
  export var checkHolderIsError = function checkHolderIsError(state) {
646
618
  var _state$client;
647
619
  var holderError = state.service.value.some(function (item) {
648
- var _item$_extend25;
649
620
  // 普通商品不需要检测holder
650
- if (isNormalProductByDurationSchedule(item)) {
651
- return false;
652
- }
653
- if (item._extend.quantity === 1 && !item._extend.holder_id) {
654
- return true;
655
- }
656
- if (item._extend.quantity > 1 && ((_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 || (_item$_extend25 = _item$_extend25.holder_id) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.length) !== item._extend.quantity) {
657
- return true;
658
- }
659
- return false;
621
+ return !item._extend.holder_id && !isNormalProductByDurationSchedule(item);
660
622
  });
661
623
  var clientId = (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id;
662
624
  if (holderError && (!clientId || clientId === 0 || clientId === 1)) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const VoucherCard: (props: any) => JSX.Element | null;
4
3
  export default VoucherCard;