@pisell/private-materials 3.3.76 → 3.3.78

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 (356) 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 +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/businessModel/SalesModel/Sales/index.js +37 -4
  12. package/es/components/Sales/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +7 -0
  14. package/es/components/Sales/Resource/serve.js +10 -0
  15. package/es/components/Sales/Summary/utils.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  18. package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
  19. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  20. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  21. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  22. package/es/components/appointmentBooking/components/Date/index.js +24 -14
  23. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  24. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  25. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  26. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  27. package/es/components/appointmentBooking/components/Header/index.js +8 -14
  28. package/es/components/appointmentBooking/components/Services/index.js +38 -36
  29. package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  30. package/es/components/appointmentBooking/components/Voucher/index.js +13 -0
  31. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  32. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +6 -7
  33. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  34. package/es/components/appointmentBooking/index.d.ts +1 -0
  35. package/es/components/appointmentBooking/index.js +14 -0
  36. package/es/components/appointmentBooking/index.less +1 -1
  37. package/es/components/appointmentBooking/locales.js +3 -3
  38. package/es/components/booking/addons/index.js +12 -3
  39. package/es/components/booking/addons/model.js +5 -0
  40. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  41. package/es/components/booking/components/TabProduct/selectProductItem/index.js +3 -1
  42. package/es/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
  43. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  44. package/es/components/booking/components/browserSelect/index.js +1 -1
  45. package/es/components/booking/components/footer/amount.js +2 -1
  46. package/es/components/booking/components/footer/index.d.ts +1 -0
  47. package/es/components/booking/components/footer/index.js +9 -3
  48. package/es/components/booking/components/footer/utils.js +74 -36
  49. package/es/components/booking/components/voucher/index.d.ts +1 -0
  50. package/es/components/booking/components/voucher/index.js +110 -66
  51. package/es/components/booking/components/voucher/utils.d.ts +4 -0
  52. package/es/components/booking/components/voucher/utils.js +15 -0
  53. package/es/components/booking/forms/footer.d.ts +1 -0
  54. package/es/components/booking/forms/model.js +5 -5
  55. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  56. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  57. package/es/components/booking/hooks/useQuotation.d.ts +1 -0
  58. package/es/components/booking/hooks/useQuotation.js +16 -1
  59. package/es/components/booking/info/client/index.js +12 -3
  60. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  61. package/es/components/booking/info/service/Lists.d.ts +1 -0
  62. package/es/components/booking/info/service/Lists.js +1 -1
  63. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  64. package/es/components/booking/info/service/addService/index.js +3 -1
  65. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  66. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  67. package/es/components/booking/info/service/like/index.js +1 -1
  68. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  69. package/es/components/booking/info/service2/utils.js +6 -2
  70. package/es/components/booking/info/utils.js +1 -1
  71. package/es/components/booking/info2/index.js +9 -4
  72. package/es/components/booking/info2/serve.d.ts +1 -1
  73. package/es/components/booking/info2/serve.js +12 -8
  74. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  75. package/es/components/booking/info2/service/addService/index.js +5 -3
  76. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  77. package/es/components/booking/info2/service/editService/index.js +5 -2
  78. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  79. package/es/components/booking/info2/utils.d.ts +1 -1
  80. package/es/components/booking/info2/utils.js +3 -2
  81. package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
  82. package/es/components/booking/info2/utilsByBooking.js +5 -3
  83. package/es/components/booking/locales.d.ts +3 -0
  84. package/es/components/booking/locales.js +6 -3
  85. package/es/components/booking/materiels/startTime/index.js +1 -1
  86. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  87. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  88. package/es/components/booking/notes/model.js +5 -5
  89. package/es/components/booking/payments/model.js +5 -5
  90. package/es/components/booking/utils.d.ts +1 -0
  91. package/es/components/booking/utils.js +4 -0
  92. package/es/components/eftposPay/amount.d.ts +1 -1
  93. package/es/components/eftposPay/device.d.ts +1 -1
  94. package/es/components/eftposPay/hooks.d.ts +1 -1
  95. package/es/components/eftposPay/store/index.d.ts +3 -3
  96. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  97. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  98. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  99. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  100. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  101. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  102. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  103. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  104. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  105. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  106. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  107. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  108. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  109. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  110. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  111. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  112. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  113. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  114. package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
  115. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  116. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  117. package/es/components/eventBooking/index.d.ts +1 -0
  118. package/es/components/eventBooking/index.js +21 -7
  119. package/es/components/eventBooking/locales.js +3 -3
  120. package/es/components/index.d.ts +2 -1
  121. package/es/components/index.js +2 -1
  122. package/es/components/listComponent/index.js +5 -5
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  124. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  125. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  126. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  127. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  128. package/es/components/productExtension/card/index.js +3 -3
  129. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  130. package/es/components/productExtension/fields/Forms/index.js +12 -12
  131. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  132. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  133. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  134. package/es/components/productExtension/server.js +2 -2
  135. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  136. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  137. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  138. package/es/components/schedules/calendar/index.js +4 -4
  139. package/es/components/schedules/calendar/serve.js +2 -2
  140. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  141. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  142. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  143. package/es/components/schedules/components/ResourceList/index.js +1 -1
  144. package/es/components/schedules/components/Search/index.js +5 -5
  145. package/es/components/schedules/model.js +5 -5
  146. package/es/components/schedules/openHours/index.js +1 -1
  147. package/es/components/schedules/openHours/serve.js +2 -2
  148. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  149. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  150. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  151. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  152. package/es/components/schedules/products/serve.js +2 -2
  153. package/es/components/schedules/products/utils.js +5 -5
  154. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  155. package/es/components/schedules/resources/detail/index.js +10 -10
  156. package/es/components/schedules/resources/list/index.js +2 -2
  157. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  158. package/es/components/schedules/resources/serve.js +2 -2
  159. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  160. package/es/components/schedules/utils.d.ts +1 -1
  161. package/es/components/schedules/utils.js +4 -4
  162. package/es/components/selectModal/index.js +2 -2
  163. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  164. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  165. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  166. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  167. package/es/components/stepController/components/Content/index.d.ts +7 -0
  168. package/es/components/stepController/components/Content/index.js +9 -0
  169. package/es/components/stepController/components/Content/index.less +8 -0
  170. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  171. package/es/components/stepController/components/Footer/index.js +15 -0
  172. package/es/components/stepController/components/Footer/index.less +39 -0
  173. package/es/components/stepController/components/Header/index.d.ts +20 -0
  174. package/es/components/stepController/components/Header/index.js +97 -0
  175. package/es/components/stepController/components/Header/index.less +21 -0
  176. package/es/components/stepController/index.d.ts +5 -0
  177. package/es/components/stepController/index.js +64 -0
  178. package/es/components/stepController/index.less +11 -0
  179. package/es/components/stepController/locales.d.ts +27 -0
  180. package/es/components/stepController/locales.js +32 -0
  181. package/es/components/stepController/types.d.ts +23 -0
  182. package/es/components/stepController/types.js +1 -0
  183. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
  184. package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -8
  185. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  186. package/es/components/ticketBooking/components/ticketBooking/index.js +124 -3
  187. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  188. package/es/components/ticketBooking/locales.d.ts +164 -146
  189. package/es/components/ticketBooking/locales.js +195 -147
  190. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  191. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  192. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  193. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  194. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  195. package/es/components/ticketBooking/utils/index.js +58 -6
  196. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  197. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  198. package/es/hooks/useComponents.js +1 -1
  199. package/es/hooks/useWindowSize.d.ts +5 -0
  200. package/es/hooks/useWindowSize.js +26 -0
  201. package/es/index.d.ts +1 -0
  202. package/es/index.js +2 -1
  203. package/es/utils/index.d.ts +1 -1
  204. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  205. package/lib/components/Sales/Resource/index.js +1 -1
  206. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  207. package/lib/components/Sales/Resource/serve.js +9 -2
  208. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  209. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  210. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  211. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -4
  212. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  213. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  214. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  215. package/lib/components/appointmentBooking/components/Date/index.js +12 -5
  216. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  217. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  218. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  219. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  220. package/lib/components/appointmentBooking/components/Header/index.js +2 -3
  221. package/lib/components/appointmentBooking/components/Services/index.js +19 -18
  222. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  223. package/lib/components/appointmentBooking/components/Voucher/index.js +9 -0
  224. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  225. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +0 -1
  226. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  227. package/lib/components/appointmentBooking/index.d.ts +1 -0
  228. package/lib/components/appointmentBooking/index.js +11 -0
  229. package/lib/components/appointmentBooking/index.less +1 -1
  230. package/lib/components/appointmentBooking/locales.js +3 -3
  231. package/lib/components/booking/addons/index.js +12 -2
  232. package/lib/components/booking/addons/model.js +3 -0
  233. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  234. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +5 -1
  235. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +6 -0
  236. package/lib/components/booking/components/footer/amount.js +2 -1
  237. package/lib/components/booking/components/footer/index.d.ts +1 -0
  238. package/lib/components/booking/components/footer/index.js +10 -5
  239. package/lib/components/booking/components/footer/utils.js +48 -12
  240. package/lib/components/booking/components/voucher/index.d.ts +1 -0
  241. package/lib/components/booking/components/voucher/index.js +111 -67
  242. package/lib/components/booking/components/voucher/utils.d.ts +4 -0
  243. package/lib/components/booking/components/voucher/utils.js +43 -0
  244. package/lib/components/booking/forms/footer.d.ts +1 -0
  245. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  246. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  247. package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
  248. package/lib/components/booking/hooks/useQuotation.js +19 -1
  249. package/lib/components/booking/info/client/index.js +10 -3
  250. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  251. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  252. package/lib/components/booking/info/service/Lists.js +1 -1
  253. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  254. package/lib/components/booking/info/service/addService/index.js +2 -0
  255. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  256. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  257. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  258. package/lib/components/booking/info/service2/utils.js +3 -1
  259. package/lib/components/booking/info/utils.js +1 -3
  260. package/lib/components/booking/info2/index.js +9 -9
  261. package/lib/components/booking/info2/serve.d.ts +1 -1
  262. package/lib/components/booking/info2/serve.js +1 -1
  263. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  264. package/lib/components/booking/info2/service/addService/index.js +4 -2
  265. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  266. package/lib/components/booking/info2/service/editService/index.js +5 -2
  267. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  268. package/lib/components/booking/info2/utils.d.ts +1 -1
  269. package/lib/components/booking/info2/utils.js +2 -2
  270. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
  271. package/lib/components/booking/info2/utilsByBooking.js +3 -2
  272. package/lib/components/booking/locales.d.ts +3 -0
  273. package/lib/components/booking/locales.js +6 -3
  274. package/lib/components/booking/utils.d.ts +1 -0
  275. package/lib/components/booking/utils.js +6 -0
  276. package/lib/components/eftposPay/amount.d.ts +1 -1
  277. package/lib/components/eftposPay/device.d.ts +1 -1
  278. package/lib/components/eftposPay/hooks.d.ts +1 -1
  279. package/lib/components/eftposPay/store/index.d.ts +3 -3
  280. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  281. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  282. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  283. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  284. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  285. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  286. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  287. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  288. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  289. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  290. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  291. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  292. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  293. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  294. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  295. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  296. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  297. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  298. package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
  299. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  300. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  301. package/lib/components/eventBooking/index.d.ts +1 -0
  302. package/lib/components/eventBooking/index.js +11 -7
  303. package/lib/components/eventBooking/locales.js +3 -3
  304. package/lib/components/index.d.ts +2 -1
  305. package/lib/components/index.js +3 -0
  306. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  307. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  308. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  309. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  310. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  311. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  312. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  313. package/lib/components/schedules/utils.d.ts +1 -1
  314. package/lib/components/schedules/utils.js +1 -1
  315. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  316. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  317. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  318. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  319. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  320. package/lib/components/stepController/components/Content/index.js +40 -0
  321. package/lib/components/stepController/components/Content/index.less +8 -0
  322. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  323. package/lib/components/stepController/components/Footer/index.js +49 -0
  324. package/lib/components/stepController/components/Footer/index.less +39 -0
  325. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  326. package/lib/components/stepController/components/Header/index.js +104 -0
  327. package/lib/components/stepController/components/Header/index.less +21 -0
  328. package/lib/components/stepController/index.d.ts +5 -0
  329. package/lib/components/stepController/index.js +89 -0
  330. package/lib/components/stepController/index.less +11 -0
  331. package/lib/components/stepController/locales.d.ts +27 -0
  332. package/lib/components/stepController/locales.js +50 -0
  333. package/lib/components/stepController/types.d.ts +23 -0
  334. package/lib/components/stepController/types.js +17 -0
  335. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
  336. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +42 -5
  337. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  338. package/lib/components/ticketBooking/components/ticketBooking/index.js +124 -3
  339. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  340. package/lib/components/ticketBooking/locales.d.ts +164 -146
  341. package/lib/components/ticketBooking/locales.js +22 -4
  342. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  343. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  344. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  345. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  346. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  347. package/lib/components/ticketBooking/utils/index.js +48 -5
  348. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  349. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  350. package/lib/hooks/useWindowSize.d.ts +5 -0
  351. package/lib/hooks/useWindowSize.js +51 -0
  352. package/lib/index.d.ts +1 -0
  353. package/lib/index.js +3 -0
  354. package/lib/utils/index.d.ts +1 -1
  355. package/lowcode/step-controller/meta.ts +88 -0
  356. package/package.json +2 -2
@@ -27,6 +27,20 @@ var AppointmentBooking = function AppointmentBooking() {
27
27
  }
28
28
  });
29
29
  }, []);
30
+ useEffect(function () {
31
+ var setRealVH = function setRealVH() {
32
+ // window.innerHeight 会返回视口真实的高度(不包括工具栏)
33
+ var vh = window.innerHeight * 0.01;
34
+ document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
35
+ };
36
+
37
+ // 页面加载和窗口大小变化时都重新计算
38
+ setRealVH();
39
+ window.addEventListener('resize', setRealVH);
40
+ return function () {
41
+ window.removeEventListener('resize', setRealVH);
42
+ };
43
+ }, []);
30
44
  return /*#__PURE__*/React.createElement("div", {
31
45
  className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
32
46
  }, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  background: #ffffff;
6
- height: 100vh;
6
+ height: calc(var(--vh, 1vh) * 100);
7
7
  overflow-y: auto;
8
8
 
9
9
  .pisell-section-headers {
@@ -126,7 +126,7 @@ export default {
126
126
  return "Tip: Change ".concat(val || 'resource', " using the dropdown in the cart.");
127
127
  },
128
128
  'pisell2.text.apply': 'Apply',
129
- 'pisell2.text.goodpass': 'GoodPass',
129
+ 'pisell2.text.goodpass': 'Promotion',
130
130
  'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
131
131
  'pisell2.text.goodpass.view-more': 'View More',
132
132
  'pisell2.text.goodpass.code': 'Code',
@@ -262,7 +262,7 @@ export default {
262
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
263
  },
264
264
  'pisell2.text.apply': '应用',
265
- 'pisell2.text.goodpass': '商品券',
265
+ 'pisell2.text.goodpass': '促销',
266
266
  'pisell2.text.goodpass.product-vouchers': '商品兑换券',
267
267
  'pisell2.text.goodpass.view-more': '查看更多',
268
268
  'pisell2.text.goodpass.code': '券码',
@@ -398,7 +398,7 @@ export default {
398
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
399
  },
400
400
  'pisell2.text.apply': '應用',
401
- 'pisell2.text.goodpass': '商品券',
401
+ 'pisell2.text.goodpass': '促銷',
402
402
  'pisell2.text.goodpass.product-vouchers': '商品兌換券',
403
403
  'pisell2.text.goodpass.view-more': '查看更多',
404
404
  'pisell2.text.goodpass.code': '券碼',
@@ -36,7 +36,7 @@ import TabProduct from "../components/TabProduct";
36
36
  import EmptyBooking from "../components/emptyBooking";
37
37
  import Footer from "../components/footer";
38
38
  import { formatProductBundle, formatProductOption, formatProductPrice } from "../components/footer/utils";
39
- import { formatProductListByCategory, getIsEject, getProductTotalPrice, isSessionProduct, request } from "../utils";
39
+ import { formatProductListByCategory, getIsEject, getIsOnlySession, getProductTotalPrice, isSessionProduct, request } from "../utils";
40
40
  import { locales, getUniqueId } from '@pisell/utils';
41
41
  import "./index.less";
42
42
  import useEngineContext from "../../../hooks/useEngineContext";
@@ -97,11 +97,13 @@ var formatProductValues = function formatProductValues(data) {
97
97
  return _objectSpread(_objectSpread({}, d), {}, {
98
98
  id: d.product_id,
99
99
  title: d.product_title,
100
+ isAddons: true,
100
101
  quantity: d.product_quantity,
101
102
  cover: d.product_cover,
102
103
  price: Number(d.source_product_price),
103
104
  _extend: {
104
105
  total: Number(d.selling_price),
106
+ origin_total: Number(d.selling_price),
105
107
  payment_price: Number(d.payment_price),
106
108
  price: Number(d.source_product_price),
107
109
  quantity: d.product_quantity,
@@ -288,6 +290,7 @@ var Addons = Provider(function (props) {
288
290
 
289
291
  // 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
290
292
  var isEject = getIsEject(item, type);
293
+ var isOnlySession = getIsOnlySession(item);
291
294
  state.action({
292
295
  type: 'pisell1.handleOpenProductModal',
293
296
  data: {
@@ -300,6 +303,7 @@ var Addons = Provider(function (props) {
300
303
  package: true,
301
304
  number: true
302
305
  },
306
+ isOnlySession: isOnlySession,
303
307
  is_eject: isEject ? 1 : 0,
304
308
  isOS: isSession
305
309
  },
@@ -307,6 +311,7 @@ var Addons = Provider(function (props) {
307
311
  var _detail = detail || item;
308
312
  var product = _objectSpread(_objectSpread({}, _detail), {}, {
309
313
  _id: getUniqueId(),
314
+ isAddons: true,
310
315
  _key: e.key,
311
316
  _extend: {
312
317
  price: _detail.price,
@@ -317,8 +322,11 @@ var Addons = Provider(function (props) {
317
322
  });
318
323
  var _total = getProductTotalPrice(product);
319
324
  product._extend.total = _total;
325
+ product._extend.origin_total = _total;
326
+ // 已经加入购物车的折扣商品 不叠加
320
327
  var _item = _list.find(function (d) {
321
- return d._extend.other.rowKey === e.rowKey;
328
+ var _d$discount_list;
329
+ return d._extend.other.rowKey === e.rowKey && !d.booking_id && !((_d$discount_list = d.discount_list) !== null && _d$discount_list !== void 0 && _d$discount_list.length);
322
330
  });
323
331
 
324
332
  // 如果已添加, 则数量+1
@@ -511,6 +519,7 @@ var Addons = Provider(function (props) {
511
519
  var _product$_extend;
512
520
  var _detail = detail || item;
513
521
  var product = _objectSpread(_objectSpread(_objectSpread({}, item), _detail), {}, {
522
+ isAddons: true,
514
523
  // 编辑商品时清除折扣信息
515
524
  discount_list: [],
516
525
  _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
@@ -523,8 +532,8 @@ var Addons = Provider(function (props) {
523
532
  }
524
533
  var _total = getProductTotalPrice(product);
525
534
  product._extend.total = _total;
535
+ product._extend.origin_total = _total;
526
536
  var _list = _toConsumableArray(state.addons.value);
527
- console.log('cacheItem', product);
528
537
  _list = _list.map(function (d) {
529
538
  return d._id === product._id ? product : d;
530
539
  });
@@ -17,6 +17,11 @@ var _miniRedux = miniRedux({
17
17
  state.setGlobalState({
18
18
  addons: _objectSpread(_objectSpread({}, state.addons), payload)
19
19
  });
20
+ },
21
+ setService: function setService(state, payload) {
22
+ state.setGlobalState({
23
+ service: _objectSpread(_objectSpread({}, state.service), payload)
24
+ });
20
25
  }
21
26
  }
22
27
  }),
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
3
4
  export default SelectProductItem;
@@ -63,6 +63,8 @@ var SelectProductItem = function SelectProductItem(_ref) {
63
63
  disabled: disabled
64
64
  }), /*#__PURE__*/React.createElement("div", {
65
65
  className: "server-select-product-total"
66
- }, formatAmount(item._extend.total * item._extend.quantity, 2, amountSymbol)))));
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)))));
67
69
  };
68
70
  export default SelectProductItem;
@@ -66,6 +66,7 @@
66
66
  font-style: normal;
67
67
  font-weight: 400;
68
68
 
69
+
69
70
  .server-select-product-total {
70
71
  color: var(--Base-Black, #000);
71
72
  font-size: 16px;
@@ -73,6 +74,11 @@
73
74
  font-weight: 500;
74
75
  line-height: 24px;
75
76
  }
77
+ .server-select-product-origin-total {
78
+ text-decoration: line-through;
79
+ color: #4e4e4e;
80
+ margin-right: 12px;
81
+ }
76
82
  }
77
83
 
78
84
 
@@ -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(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; } }
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; } }
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,6 +13,10 @@ import "./index.less";
13
13
 
14
14
  // tabs 子组件定义
15
15
 
16
+ // 定义主键类型
17
+
18
+ // Tabs 可传递的参数
19
+
16
20
  var Tabs = function Tabs(_ref, ref) {
17
21
  var renderTab = _ref.renderTab,
18
22
  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 ? void 0 : _resetProps$onChange.call(resetProps, e);
32
+ (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
33
33
  }
34
34
  }), _options);
35
35
  };
@@ -55,7 +55,8 @@ 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
- price += Number(_item._extend.total);
58
+ var _quantity = _item._extend.quantity || 1;
59
+ price += Number(_item._extend.total) * Number(_quantity);
59
60
 
60
61
  // 附加商品
61
62
  price += getRelationDetailsTotal(_item._extend.relation_details || []);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @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, _state$addons4, _state$bookingDetail12, _state$bookingDetail13;
50
+ var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _businessUtils$getApp2, _state$addons4, _state$bookingDetail12, _state$bookingDetail13;
51
51
  var state = props.state,
52
52
  buttons = props.buttons,
53
53
  dispatch = props.dispatch,
@@ -240,6 +240,7 @@ 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'));
243
244
  console.log('has goodpass app:', hasGoodPassApp);
244
245
 
245
246
  /**
@@ -1291,14 +1292,19 @@ var Footer = function Footer(props) {
1291
1292
  label: locales.getText('pisell2.text.refunded-amount')
1292
1293
  }];
1293
1294
  }, [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]);
1294
1299
  return /*#__PURE__*/React.createElement(Skeleton, {
1295
1300
  title: false,
1296
1301
  round: true,
1297
1302
  loading: showFooter,
1298
1303
  active: true
1299
- }, hasGoodPassApp && source === 'info' ? /*#__PURE__*/React.createElement(VoucherCard, {
1304
+ }, (hasGoodPassApp || hasDiscountCardApp) && ['addons', 'info'].includes(source) && !paymentRefundedStatus ? /*#__PURE__*/React.createElement(VoucherCard, {
1300
1305
  state: state,
1301
- dispatch: dispatch
1306
+ dispatch: dispatch,
1307
+ source: source
1302
1308
  }) : null, /*#__PURE__*/React.createElement("div", {
1303
1309
  className: "pisell-lowcode__booking-footer-total"
1304
1310
  }, /*#__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 { locales, sendWarningLog } from '@pisell/utils';
14
+ import { isArr, 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
- });
161
+ }, false);
162
162
  }
163
163
  checkSubResourcesCapacity(resource);
164
164
  return {
@@ -198,12 +198,17 @@ 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;
201
+ var _state$bookingConfig, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4;
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
+ }
203
208
  var obj = {
204
209
  customer_id: values.customer_id,
205
210
  form_id: form_id,
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] : []
211
+ form_record: form_record
207
212
  };
208
213
 
209
214
  // 连锁加盟子店铺 增加参数
@@ -222,9 +227,9 @@ var formatHolders = function formatHolders(state, item, values) {
222
227
  * @Date: 2024-12-23 12:05
223
228
  */
224
229
  export var formatProductPrice = function formatProductPrice(item) {
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);
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);
228
233
  // 单规格, 单价 + 单规格价格
229
234
  if (other !== null && other !== void 0 && other.option) {
230
235
  var _other$option;
@@ -235,21 +240,21 @@ export var formatProductPrice = function formatProductPrice(item) {
235
240
  return price;
236
241
  };
237
242
  var formatMetaData = function formatMetaData(item) {
238
- var _item$_extend5, _item$_extend6, _item$_extend8;
243
+ var _item$_extend8, _item$_extend9, _item$_extend11;
239
244
  var metadata = {};
240
- if ((_item$_extend5 = item._extend) !== null && _item$_extend5 !== void 0 && _item$_extend5.capacity) {
245
+ if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.capacity) {
241
246
  metadata.capacity = item._extend.capacity;
242
247
  }
243
248
  if (item._extend.groupId) {
244
249
  metadata.groupId = item._extend.groupId;
245
250
  }
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;
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;
249
254
  }
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;
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;
253
258
  }
254
259
  return metadata;
255
260
  };
@@ -276,8 +281,8 @@ var formatMetaData = function formatMetaData(item) {
276
281
  * @Author: WangHan
277
282
  * @Date: 2024-12-07 14:21
278
283
  */
279
- var formatProducts = function formatProducts(item) {
280
- var _item$_extend10, _item$_extend11, _item$_extend12, _item$_extend13;
284
+ var formatProducts = function formatProducts(item, quantity) {
285
+ var _item$_extend13, _item$_extend14, _item$_extend15, _item$_extend16;
281
286
  var total = Number(item._extend.total);
282
287
  var origin_total = Number(item._extend.origin_total);
283
288
  var discount_amount = origin_total - total;
@@ -291,9 +296,9 @@ var formatProducts = function formatProducts(item) {
291
296
  return item.type !== 'product';
292
297
  });
293
298
  return {
294
- "num": item._extend.quantity,
299
+ "num": quantity || item._extend.quantity,
295
300
  "price": formatProductPrice(item),
296
- "source_product_price": (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.price,
301
+ "source_product_price": (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.price,
297
302
  "product_id": (item === null || item === void 0 ? void 0 : item.product_id) || item.id,
298
303
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
299
304
  "product_discount_reason": item._extend.discount_reason || '',
@@ -303,10 +308,10 @@ var formatProducts = function formatProducts(item) {
303
308
  "discount_per": item._extend.discount_per,
304
309
  "discount_type": item._extend.discount_type || discount_type,
305
310
  "order_detail_id": item._extend.order_detail_id || 0,
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),
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),
307
312
  "bundle_edit": item._extend.bundle_edit,
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,
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,
310
315
  "discount_list": notManualDiscount,
311
316
  metadata: formatMetaData(item)
312
317
  };
@@ -326,8 +331,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
326
331
 
327
332
  // 过滤出卡片中的普通商品
328
333
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
329
- var _item$_extend14;
330
- var holderId = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.holder_id;
334
+ var _item$_extend17;
335
+ var holderId = (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.holder_id;
331
336
  var bookingHolderId = booking_item._extend.holder_id;
332
337
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
333
338
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -353,15 +358,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
353
358
 
354
359
  // 找出预约商品
355
360
  list = list.filter(function (item) {
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);
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);
358
363
  });
359
364
 
360
365
  // 对预约商品列表根据holder_id进行分组
361
366
  var groupMap = new Map();
362
367
  list.forEach(function (item) {
363
- var _item$_extend16;
364
- var key = (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.holder_id; // 分组键
368
+ var _item$_extend19;
369
+ var key = (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.holder_id; // 分组键
365
370
  if (!groupMap.has(key)) {
366
371
  groupMap.set(key, []);
367
372
  }
@@ -381,6 +386,12 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
381
386
  return list || [];
382
387
  } catch (error) {}
383
388
  };
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
+ };
384
395
 
385
396
  /**
386
397
  * @title: 预约商品信息
@@ -414,7 +425,7 @@ var formatBookings = function formatBookings(data, values) {
414
425
  var dayParams = {};
415
426
  var eventOtherParams = data.eventOtherParams;
416
427
  var bookings = [];
417
- bookings = list.map(function (item) {
428
+ list.forEach(function (item) {
418
429
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
419
430
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
420
431
  var end_time = item._extend.endDate.format("HH:mm");
@@ -428,9 +439,9 @@ var formatBookings = function formatBookings(data, values) {
428
439
 
429
440
  // 跨日预约下的普通商品
430
441
  if (isDay) {
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);
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);
434
445
  var _formatDayTime = formatDayTime({
435
446
  startDate: startDate,
436
447
  endDate: endDate
@@ -452,7 +463,7 @@ var formatBookings = function formatBookings(data, values) {
452
463
  }
453
464
  }, 'minutes');
454
465
  }
455
- return _objectSpread(_objectSpread({
466
+ var booking = _objectSpread(_objectSpread({
456
467
  "product": formatProducts(item),
457
468
  "relation_products": formatRelationDetails(item._extend.relation_details),
458
469
  'id': item.booking_id || 0,
@@ -474,6 +485,19 @@ var formatBookings = function formatBookings(data, values) {
474
485
  "resources": formatResource(item),
475
486
  "metadata": formatMetaData(item)
476
487
  }, 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
+ }
477
501
  });
478
502
  return bookings;
479
503
  };
@@ -491,8 +515,8 @@ var formatRelationProducts = function formatRelationProducts(data) {
491
515
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
492
516
  // open items 下的商品
493
517
  list = list.filter(function (item) {
494
- var _item$_extend21;
495
- return !((_item$_extend21 = item._extend) !== null && _item$_extend21 !== void 0 && _item$_extend21.holder_id);
518
+ var _item$_extend24;
519
+ return !((_item$_extend24 = item._extend) !== null && _item$_extend24 !== void 0 && _item$_extend24.holder_id);
496
520
  });
497
521
  var relationProducts = [];
498
522
  relationProducts = list.map(function (item) {
@@ -587,7 +611,11 @@ export var formatValues = function formatValues(state) {
587
611
  if (isDay || isEvent) {
588
612
  values.relation_products = formatRelationProducts(state);
589
613
  } else {
614
+ var _values$relation_prod;
590
615
  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
+ }
591
619
  }
592
620
  // 服务
593
621
  values.bookings = formatBookings(state, values);
@@ -617,8 +645,18 @@ export var formatValues = function formatValues(state) {
617
645
  export var checkHolderIsError = function checkHolderIsError(state) {
618
646
  var _state$client;
619
647
  var holderError = state.service.value.some(function (item) {
648
+ var _item$_extend25;
620
649
  // 普通商品不需要检测holder
621
- return !item._extend.holder_id && !isNormalProductByDurationSchedule(item);
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;
622
660
  });
623
661
  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;
624
662
  if (holderError && (!clientId || clientId === 0 || clientId === 1)) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const VoucherCard: (props: any) => JSX.Element | null;
3
4
  export default VoucherCard;