@pisell/private-materials 3.3.33 → 3.3.35

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 (274) 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 +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Cart/index.js +26 -13
  12. package/es/components/Sales/Cart/types.d.ts +12 -0
  13. package/es/components/Sales/Cart/utils.d.ts +23 -0
  14. package/es/components/Sales/Cart/utils.js +161 -0
  15. package/es/components/Sales/Checkout/utils.d.ts +9 -1
  16. package/es/components/Sales/Checkout/utils.js +25 -3
  17. package/es/components/Sales/Event/Detail.d.ts +2 -0
  18. package/es/components/Sales/Event/Detail.js +56 -13
  19. package/es/components/Sales/Event/serve.d.ts +10 -0
  20. package/es/components/Sales/Event/serve.js +26 -1
  21. package/es/components/Sales/Summary/utils.js +1 -0
  22. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +42 -20
  23. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -29
  25. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  26. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +156 -53
  27. package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  28. package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
  29. package/es/components/appointmentBooking/components/Content/index.js +28 -44
  30. package/es/components/appointmentBooking/components/Content/index.less +23 -1
  31. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  32. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  33. package/es/components/appointmentBooking/components/Footer/index.js +5 -5
  34. package/es/components/appointmentBooking/components/Form/index.js +161 -61
  35. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  36. package/es/components/appointmentBooking/components/Header/index.js +47 -61
  37. package/es/components/appointmentBooking/components/Resource/index.js +102 -119
  38. package/es/components/appointmentBooking/components/Services/index.js +50 -25
  39. package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
  40. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  41. package/es/components/appointmentBooking/context.js +3 -43
  42. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  43. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  44. package/es/components/appointmentBooking/hooks.d.ts +3 -1
  45. package/es/components/appointmentBooking/hooks.js +215 -294
  46. package/es/components/appointmentBooking/utils.d.ts +2 -88
  47. package/es/components/appointmentBooking/utils.js +63 -325
  48. package/es/components/booking/addons/model.js +5 -5
  49. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  50. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  51. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  52. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  53. package/es/components/booking/components/browserSelect/index.js +1 -1
  54. package/es/components/booking/components/voucher/index.d.ts +0 -1
  55. package/es/components/booking/forms/model.js +5 -5
  56. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  57. package/es/components/booking/forms/single/index.d.ts +0 -1
  58. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  59. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  60. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  61. package/es/components/booking/info/date/index.d.ts +0 -1
  62. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  63. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  64. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  65. package/es/components/booking/info/service/like/index.js +1 -1
  66. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  67. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  68. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  69. package/es/components/booking/info/utils.js +1 -1
  70. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  71. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  72. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  73. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  74. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  75. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  76. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  77. package/es/components/booking/materiels/startTime/index.js +1 -1
  78. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  79. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  80. package/es/components/booking/notes/model.js +5 -5
  81. package/es/components/booking/payments/model.js +5 -5
  82. package/es/components/booking/utils.d.ts +2 -2
  83. package/es/components/booking/utils.js +19 -11
  84. package/es/components/eftposPay/amount.d.ts +1 -1
  85. package/es/components/eftposPay/device.d.ts +1 -1
  86. package/es/components/eftposPay/hooks.d.ts +1 -1
  87. package/es/components/eftposPay/store/index.d.ts +3 -3
  88. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  89. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +218 -73
  90. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  91. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  92. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  93. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  94. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  95. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  96. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  97. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  98. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  99. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  100. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  101. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  102. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  103. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -2
  104. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -4
  105. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  106. package/es/components/eventBooking/components/bookingDetailModal/index.js +70 -13
  107. package/es/components/listComponent/index.js +5 -5
  108. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  109. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  110. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  111. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  112. package/es/components/productExtension/card/index.js +3 -3
  113. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  114. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  115. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  116. package/es/components/productExtension/fields/Forms/index.js +12 -12
  117. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  118. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  119. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  120. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  121. package/es/components/productExtension/index.d.ts +0 -1
  122. package/es/components/productExtension/server.js +2 -2
  123. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  124. package/es/components/productSelect/components/TabProduct/index.js +4 -2
  125. package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
  126. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  127. package/es/components/schedules/calendar/index.js +4 -4
  128. package/es/components/schedules/calendar/serve.js +2 -2
  129. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  130. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  131. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  132. package/es/components/schedules/components/ResourceList/index.js +1 -1
  133. package/es/components/schedules/components/Search/index.js +5 -5
  134. package/es/components/schedules/model.js +5 -5
  135. package/es/components/schedules/openHours/index.js +1 -1
  136. package/es/components/schedules/openHours/serve.js +2 -2
  137. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  138. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  139. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  140. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  141. package/es/components/schedules/products/serve.js +2 -2
  142. package/es/components/schedules/products/utils.js +5 -5
  143. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  144. package/es/components/schedules/resources/detail/index.js +10 -10
  145. package/es/components/schedules/resources/list/index.js +2 -2
  146. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  147. package/es/components/schedules/resources/serve.js +2 -2
  148. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  149. package/es/components/schedules/utils.d.ts +1 -1
  150. package/es/components/schedules/utils.js +4 -4
  151. package/es/components/selectModal/index.js +2 -2
  152. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  153. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  154. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  155. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  156. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  157. package/es/components/ticketBooking/index.d.ts +0 -1
  158. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  159. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  160. package/es/hooks/useComponents.js +1 -1
  161. package/es/utils/index.d.ts +1 -1
  162. package/lib/components/Sales/Cart/index.js +30 -18
  163. package/lib/components/Sales/Cart/types.d.ts +12 -0
  164. package/lib/components/Sales/Cart/utils.d.ts +23 -0
  165. package/lib/components/Sales/Cart/utils.js +149 -0
  166. package/lib/components/Sales/Checkout/utils.d.ts +9 -1
  167. package/lib/components/Sales/Checkout/utils.js +18 -4
  168. package/lib/components/Sales/Event/Detail.d.ts +2 -0
  169. package/lib/components/Sales/Event/Detail.js +34 -10
  170. package/lib/components/Sales/Event/serve.d.ts +10 -0
  171. package/lib/components/Sales/Event/serve.js +5 -2
  172. package/lib/components/Sales/Summary/utils.js +1 -0
  173. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +7 -2
  174. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  175. package/lib/components/appointmentBooking/components/Cart/Item/index.js +10 -34
  176. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  177. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +43 -6
  178. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  179. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
  180. package/lib/components/appointmentBooking/components/Content/index.js +28 -42
  181. package/lib/components/appointmentBooking/components/Content/index.less +23 -1
  182. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  183. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  184. package/lib/components/appointmentBooking/components/Form/index.js +98 -54
  185. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  186. package/lib/components/appointmentBooking/components/Header/index.js +19 -36
  187. package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
  188. package/lib/components/appointmentBooking/components/Services/index.js +18 -10
  189. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
  190. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  191. package/lib/components/appointmentBooking/context.js +4 -48
  192. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  193. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  194. package/lib/components/appointmentBooking/hooks.d.ts +3 -1
  195. package/lib/components/appointmentBooking/hooks.js +62 -142
  196. package/lib/components/appointmentBooking/utils.d.ts +2 -88
  197. package/lib/components/appointmentBooking/utils.js +51 -191
  198. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  199. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  200. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  201. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  202. package/lib/components/booking/forms/single/index.d.ts +0 -1
  203. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  204. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  205. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  206. package/lib/components/booking/info/date/index.d.ts +0 -1
  207. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  208. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  209. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  210. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  211. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  212. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  213. package/lib/components/booking/info/utils.js +1 -1
  214. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  215. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  216. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  217. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  218. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  219. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  220. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  221. package/lib/components/booking/utils.d.ts +2 -2
  222. package/lib/components/booking/utils.js +5 -1
  223. package/lib/components/eftposPay/amount.d.ts +1 -1
  224. package/lib/components/eftposPay/device.d.ts +1 -1
  225. package/lib/components/eftposPay/hooks.d.ts +1 -1
  226. package/lib/components/eftposPay/store/index.d.ts +3 -3
  227. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  228. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +128 -42
  229. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  230. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  231. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  232. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  233. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  234. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  235. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  236. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  237. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  238. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  239. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  240. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  241. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  242. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -2
  243. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -2
  244. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  245. package/lib/components/eventBooking/components/bookingDetailModal/index.js +79 -24
  246. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  247. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  248. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  249. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  250. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  251. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  252. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  253. package/lib/components/productExtension/index.d.ts +0 -1
  254. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  255. package/lib/components/productSelect/components/TabProduct/index.js +6 -2
  256. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
  257. package/lib/components/schedules/utils.d.ts +1 -1
  258. package/lib/components/schedules/utils.js +1 -1
  259. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  260. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  261. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  262. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  263. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  264. package/lib/components/ticketBooking/index.d.ts +0 -1
  265. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  266. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  267. package/lib/utils/index.d.ts +1 -1
  268. package/package.json +1 -1
  269. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  270. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
  271. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
  272. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  273. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
  274. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
@@ -22,8 +22,18 @@ export declare const getEventDetailBookingOptionsApi: (params: {
22
22
  skip: number;
23
23
  customer_id?: number;
24
24
  open_quotation?: number;
25
+ is_eject?: number;
25
26
  }) => Promise<any>;
26
27
  export declare const getEventDetailSelectDateApi: (id: number | string, params: {
27
28
  days: number;
28
29
  start_date?: string;
29
30
  }) => Promise<any>;
31
+ /**
32
+ * 批量查询指定商品的最新价格
33
+ * @param params
34
+ */
35
+ export declare const getProductPrice: (params: {
36
+ ids: number[];
37
+ customer_id: number;
38
+ schedule_date?: string;
39
+ }) => Promise<any>;
@@ -23,7 +23,8 @@ __export(serve_exports, {
23
23
  getEventDetailIntroductionApi: () => getEventDetailIntroductionApi,
24
24
  getEventDetailSelectDateApi: () => getEventDetailSelectDateApi,
25
25
  getEventDetailTeacherApi: () => getEventDetailTeacherApi,
26
- getEventListApi: () => getEventListApi
26
+ getEventListApi: () => getEventListApi,
27
+ getProductPrice: () => getProductPrice
27
28
  });
28
29
  module.exports = __toCommonJS(serve_exports);
29
30
  var import_utils = require("../../../utils");
@@ -44,11 +45,13 @@ var getEventDetailSelectDateApi = (id, params) => {
44
45
  useCache: true
45
46
  });
46
47
  };
48
+ var getProductPrice = async (params) => import_utils.request.getRequest().post(`/h5/product/query/price`, params);
47
49
  // Annotate the CommonJS export names for ESM import in node:
48
50
  0 && (module.exports = {
49
51
  getEventDetailBookingOptionsApi,
50
52
  getEventDetailIntroductionApi,
51
53
  getEventDetailSelectDateApi,
52
54
  getEventDetailTeacherApi,
53
- getEventListApi
55
+ getEventListApi,
56
+ getProductPrice
54
57
  });
@@ -51,6 +51,7 @@ var calculateTaxFee = (shopInfo, items) => {
51
51
  return "0.00";
52
52
  }
53
53
  const { is_price_include_tax, tax_rate } = shopInfo || {};
54
+ console.log("shopInfo>>>", is_price_include_tax, tax_rate);
54
55
  const totalTaxFee = items.reduce((sum, item) => {
55
56
  const price = new import_decimal.default(item.price || 0);
56
57
  const taxRate = new import_decimal.default(tax_rate || 0).div(100);
@@ -46,7 +46,6 @@ var ContinueButton = ({ onNext }) => {
46
46
  const utils = context.appHelper.utils || {};
47
47
  const { isLogin, openLoginModal } = (0, import_hooks.useAppointmentBookingLogin)();
48
48
  const { accountLists, getHolders, checkAccount } = (0, import_hooks.useAppointmentBookingAccount)();
49
- const shopDiscount = (0, import_hooks.useShopDiscount)();
50
49
  const {
51
50
  currentStep,
52
51
  carts,
@@ -56,12 +55,13 @@ var ContinueButton = ({ onNext }) => {
56
55
  setIsErrorHolder,
57
56
  isLastStep
58
57
  } = (0, import_context.useAppointmentBookingContext)();
59
- const { isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
58
+ const { isFormSubject, isDateSelectedFirst } = (0, import_hooks.useAppointmentBookingSetting)();
60
59
  const stepList = (0, import_react.useMemo)(() => {
61
60
  var _a2, _b2, _c2;
62
61
  return (_c2 = (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.step) == null ? void 0 : _b2.store) == null ? void 0 : _c2.stepList;
63
62
  }, [(_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList]);
64
63
  const handleCheckAccount = () => {
64
+ if (isDateSelectedFirst) return false;
65
65
  const result = (0, import_utils2.checkHolder)({
66
66
  isFormSubject,
67
67
  checkAccount,
@@ -86,6 +86,11 @@ var ContinueButton = ({ onNext }) => {
86
86
  };
87
87
  const handleContinue = async () => {
88
88
  try {
89
+ if ((currentStep == null ? void 0 : currentStep.index) + 2 >= (stepList == null ? void 0 : stepList.length)) {
90
+ const loginOk = await handleLoginCheck();
91
+ if (!loginOk) return;
92
+ if (handleCheckAccount()) return;
93
+ }
89
94
  return onNext && onNext();
90
95
  } catch (error) {
91
96
  console.log(error, "handleContinue_error");
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
4
3
  export default Total;
@@ -46,21 +46,20 @@ var import_Deposit = __toESM(require("../../Deposit"));
46
46
  var import_utils3 = require("../utils");
47
47
  var import_index = require("./index.less");
48
48
  var CartItem = ({ onNext }) => {
49
- var _a, _b, _c, _d;
49
+ var _a, _b, _c;
50
50
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
51
51
  const {
52
52
  carts,
53
53
  currentStep,
54
+ resources,
54
55
  setResourceOtherParams,
55
56
  resourceOtherParams,
56
57
  summary,
57
- isLastStep,
58
- currentSelectedResourcesRef,
59
- currentStepParams
58
+ isLastStep
60
59
  } = (0, import_context.useAppointmentBookingContext)();
61
- const { accountLists, getHolders, addAccount } = (0, import_hooks2.useAppointmentBookingAccount)();
60
+ const { accountLists, getHolders, form_id, addAccount } = (0, import_hooks2.useAppointmentBookingAccount)();
62
61
  const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
63
- const { isFormSubject, bookingSubject } = (0, import_hooks2.useAppointmentBookingSetting)();
62
+ const { isFormSubject, bookingSubject, isRetailTemplate } = (0, import_hooks2.useAppointmentBookingSetting)();
64
63
  const { isLogin } = (0, import_hooks2.useAppointmentBookingLogin)();
65
64
  const utils = (0, import_hooks2.contextUtils)();
66
65
  const { businessUtils } = utils;
@@ -101,7 +100,7 @@ var CartItem = ({ onNext }) => {
101
100
  } else {
102
101
  appointmentBooking.updateCart({
103
102
  _id: e == null ? void 0 : e._id,
104
- resources: val ? (0, import_utils2.updateCartResources)(e, val) : []
103
+ resources: val ? [val] : []
105
104
  });
106
105
  }
107
106
  getResourceList();
@@ -151,31 +150,8 @@ var CartItem = ({ onNext }) => {
151
150
  }
152
151
  };
153
152
  const products = (0, import_react.useMemo)(() => {
154
- var _a2;
155
- console.log(currentSelectedResourcesRef.current, carts, "wh867865");
156
- if (!(carts == null ? void 0 : carts.length)) return [];
157
- if (((_a2 = currentSelectedResourcesRef == null ? void 0 : currentSelectedResourcesRef.current) == null ? void 0 : _a2.length) > 0) {
158
- const newCarts = carts.map((item) => {
159
- var _a3;
160
- const currentResourceData = currentSelectedResourcesRef.current.find(
161
- (resource) => (resource == null ? void 0 : resource._id) === (item == null ? void 0 : item._id)
162
- );
163
- const multiResources = (0, import_utils2.getMultiResources)(
164
- item,
165
- (_a3 = currentResourceData == null ? void 0 : currentResourceData.currentSelectedResource) == null ? void 0 : _a3.resourceItem,
166
- currentStepParams == null ? void 0 : currentStepParams.key
167
- );
168
- return {
169
- ...item,
170
- isMultipleResource: true,
171
- multiResources
172
- };
173
- });
174
- return newCarts;
175
- } else {
176
- return carts;
177
- }
178
- }, [carts, currentSelectedResourcesRef.current, currentStepParams == null ? void 0 : currentStepParams.key]);
153
+ return (0, import_utils2.formatCarts)(carts, resources, utils, accountLists);
154
+ }, [carts, resources, accountLists]);
179
155
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
180
156
  "div",
181
157
  {
@@ -189,8 +165,8 @@ var CartItem = ({ onNext }) => {
189
165
  hideAddBtn: false,
190
166
  holders,
191
167
  disabledEdit: isLastStep,
192
- isShowChangeResource: (_c = (_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) == null ? void 0 : _c.startsWith("select-resource"),
193
- isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
168
+ isShowChangeResource: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-resource",
169
+ isShowDelete: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-service",
194
170
  isShowPackageNote: false,
195
171
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
196
172
  isShowHolder: isFormSubject,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
4
3
  export default Cart;
@@ -39,6 +39,7 @@ var import_context = require("../../context");
39
39
  var import_hooks = require("../../hooks");
40
40
  var import_Item = __toESM(require("../Cart/Item"));
41
41
  var import_utils2 = require("../../utils");
42
+ var import_utils3 = require("./utils");
42
43
  var import_index = require("./index.less");
43
44
  var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
44
45
  var _a, _b;
@@ -46,12 +47,7 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
46
47
  const config = ((_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.constants) == null ? void 0 : _b.config) || {};
47
48
  const utils = (0, import_hooks.contextUtils)();
48
49
  const { appointmentBooking, summary, isAgreeDepositPolicy, setLoading } = (0, import_context.useAppointmentBookingContext)();
49
- const shopDiscount = (0, import_hooks.useShopDiscount)();
50
- const clearData = () => {
51
- var _a2;
52
- appointmentBooking.destroy();
53
- (_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
54
- };
50
+ const { isRetailTemplate } = (0, import_hooks.useAppointmentBookingSetting)();
55
51
  const goPaymentFinish = (order_id, amount) => {
56
52
  var _a2;
57
53
  const url = `/payment-finish/success?order_id=${order_id}&amount=${Number(
@@ -60,14 +56,55 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
60
56
  (_a2 = utils == null ? void 0 : utils.history) == null ? void 0 : _a2.replace(url);
61
57
  setLoading(false);
62
58
  };
59
+ (0, import_react.useEffect)(() => {
60
+ if (isRetailTemplate) {
61
+ handleForm();
62
+ }
63
+ }, [isRetailTemplate]);
64
+ const handleForm = async (isSubmit) => {
65
+ var _a2;
66
+ const carts = await appointmentBooking.getCart();
67
+ const key = "isRetailFormSubmit";
68
+ const isRetailFormSubmit = appointmentBooking.getOtherData(key);
69
+ const callback = () => {
70
+ if (isSubmit) {
71
+ onCheckout();
72
+ }
73
+ };
74
+ if (isRetailFormSubmit) {
75
+ return callback();
76
+ }
77
+ const params = (0, import_utils3.getFormParams)(carts);
78
+ (_a2 = utils == null ? void 0 : utils.action) == null ? void 0 : _a2.call(utils, {
79
+ type: "pisell1.goProductForm",
80
+ data: params,
81
+ callback: async (e) => {
82
+ var _a3;
83
+ await appointmentBooking.updateCart({
84
+ _id: (_a3 = carts == null ? void 0 : carts[0]) == null ? void 0 : _a3._id,
85
+ relationForms: e
86
+ });
87
+ appointmentBooking.setOtherData(key, true);
88
+ callback();
89
+ }
90
+ });
91
+ };
63
92
  const handleNext = async () => {
64
93
  var _a2;
65
94
  const { deposit } = summary;
66
95
  if ((deposit == null ? void 0 : deposit.hasDeposit) && ((_a2 = deposit == null ? void 0 : deposit.protocols) == null ? void 0 : _a2.length) > 0 && !isAgreeDepositPolicy) {
67
96
  return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.deposit.agree.policy"));
68
97
  }
98
+ if (isRetailTemplate) {
99
+ handleForm(true);
100
+ return;
101
+ }
102
+ onCheckout();
103
+ };
104
+ const onCheckout = async () => {
69
105
  setLoading(true);
70
106
  try {
107
+ const { deposit } = summary;
71
108
  const { data } = await appointmentBooking.submitOrder();
72
109
  const { is_deposit, deposit_amount, total_amount, order_id } = data || {};
73
110
  const _total = is_deposit ? deposit_amount : total_amount;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @title: 获取拉开表单弹窗参数
3
+ * @description:
4
+ * @param {any} state
5
+ * @return {*}
6
+ * @Author: WangHan
7
+ * @Date: 2025-05-28 15:40
8
+ */
9
+ export declare const getFormParams: (carts: any[]) => {
10
+ product_id: any[];
11
+ appointment_type: string;
12
+ };
@@ -0,0 +1,37 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/appointmentBooking/components/ConfirmInformation/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ getFormParams: () => getFormParams
23
+ });
24
+ module.exports = __toCommonJS(utils_exports);
25
+ var getFormParams = (carts) => {
26
+ const product_id = (carts || []).map((item) => {
27
+ return item.id;
28
+ });
29
+ return {
30
+ product_id,
31
+ appointment_type: "virtual"
32
+ };
33
+ };
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ getFormParams
37
+ });
@@ -51,6 +51,7 @@ var import_index = require("./index.less");
51
51
  var Layout = () => {
52
52
  var _a, _b, _c, _d, _e;
53
53
  const stepRef = (0, import_react.useRef)();
54
+ const formRef = (0, import_react.useRef)();
54
55
  const {
55
56
  currentStep,
56
57
  setResourceOtherParams,
@@ -59,19 +60,17 @@ var Layout = () => {
59
60
  appointmentBooking,
60
61
  setLoading,
61
62
  policyParams,
62
- closePolicy,
63
- currentStepParams
63
+ closePolicy
64
64
  } = (0, import_context.useAppointmentBookingContext)();
65
- const { isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
65
+ const { isDateSelectedFirst, isFormSubject, isRetailTemplate } = (0, import_hooks.useAppointmentBookingSetting)();
66
66
  const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
67
67
  const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
68
- const { removeStep } = (0, import_hooks.useAppointmentBookingStep)();
68
+ const { removeStep, stepList } = (0, import_hooks.useAppointmentBookingStep)();
69
69
  const { shopDiscount } = (0, import_hooks.useShopDiscount)();
70
70
  (0, import_hooks.useAppointmentBookingCart)();
71
71
  (0, import_hooks.useAppointmentBookingStep)();
72
72
  const [params, setParams] = (0, import_react.useState)({});
73
73
  (0, import_react.useEffect)(() => {
74
- appointmentBooking.removeStep("fill-form");
75
74
  return () => {
76
75
  var _a2;
77
76
  setIsAgreeDepositPolicy(false);
@@ -79,24 +78,14 @@ var Layout = () => {
79
78
  (_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
80
79
  };
81
80
  }, []);
82
- (0, import_react.useEffect)(() => {
83
- var _a2;
84
- if ((currentStepParams == null ? void 0 : currentStepParams.index) < 0) return;
85
- const resourceStepIndex = (_a2 = currentStepParams == null ? void 0 : currentStepParams.stepLists) == null ? void 0 : _a2.findIndex(
86
- (item) => item.key === "select-resource"
87
- );
88
- if ((currentStepParams == null ? void 0 : currentStepParams.index) < resourceStepIndex) {
89
- appointmentBooking.setOtherData("current_selected_resources", null);
90
- }
91
- }, [currentStepParams]);
92
81
  (0, import_react.useEffect)(() => {
93
82
  try {
83
+ if (!(appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || isRetailTemplate) return;
94
84
  if (isFormSubject) {
95
85
  removeStep("select-guest");
96
86
  } else {
97
87
  appointmentBooking.addStep(
98
88
  {
99
- index: (currentStep == null ? void 0 : currentStep.index) + 1,
100
89
  key: "select-guest",
101
90
  description: import_utils.locales.getText("pisell2.appointment.add-guests")
102
91
  },
@@ -105,12 +94,12 @@ var Layout = () => {
105
94
  }
106
95
  } catch (error) {
107
96
  }
108
- }, [isFormSubject]);
97
+ }, [isFormSubject, isRetailTemplate]);
109
98
  (0, import_react.useEffect)(() => {
110
- if (isFormSubject && isLogin) {
99
+ if (isFormSubject && isLogin && !isRetailTemplate) {
111
100
  getHolders();
112
101
  }
113
- }, [isFormSubject, isLogin]);
102
+ }, [isFormSubject, isLogin, isRetailTemplate]);
114
103
  (0, import_react.useEffect)(() => {
115
104
  if (!(currentStep == null ? void 0 : currentStep.step)) return;
116
105
  setLoading(false);
@@ -123,32 +112,29 @@ var Layout = () => {
123
112
  behavior: "smooth"
124
113
  });
125
114
  }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
126
- const components = {
127
- // 选择服务
128
- "select-service": import_Services.default,
129
- // 添加客户
130
- "select-guest": import_Guest.default,
131
- // 选择时间
132
- "select-date": import_Date.default,
133
- // 时间切片
134
- "select-time": import_TimeSlicing.default,
135
- // 确认信息
136
- "confirm-information": import_ConfirmInformation.default
137
- };
138
115
  const Com = (0, import_react.useMemo)(() => {
139
116
  var _a2;
140
117
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
141
118
  if (!key) return null;
142
- let Com2;
143
- if (key.startsWith("select-resource")) {
144
- Com2 = import_Resource.default;
145
- } else if (key.startsWith("fill-form")) {
146
- Com2 = import_Form.default;
147
- } else {
148
- Com2 = components[key];
149
- }
119
+ const components = {
120
+ // 选择服务
121
+ "select-service": import_Services.default,
122
+ // 添加客户
123
+ "select-guest": import_Guest.default,
124
+ // 选择时间
125
+ "select-date": import_Date.default,
126
+ // 选择资源
127
+ "select-resource": import_Resource.default,
128
+ // 时间切片
129
+ "select-time": import_TimeSlicing.default,
130
+ // 填写表单
131
+ "fill-form": import_Form.default,
132
+ // 确认信息
133
+ "confirm-information": import_ConfirmInformation.default
134
+ };
135
+ let Com2 = components[key];
150
136
  return /* @__PURE__ */ import_react.default.createElement(Com2, { onChange: setParams, params, ref: stepRef });
151
- }, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key]);
137
+ }, [(_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key, stepRef]);
152
138
  (0, import_react.useEffect)(() => {
153
139
  var _a2, _b2;
154
140
  if ((0, import_utils.isMobile)()) {
@@ -186,10 +172,10 @@ var Layout = () => {
186
172
  if (isDateSelectedFirst && key === "select-date") return false;
187
173
  return key !== "confirm-information";
188
174
  }, [isDateSelectedFirst, (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key]);
189
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, null), /* @__PURE__ */ import_react.default.createElement(
175
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !isRetailTemplate ? /* @__PURE__ */ import_react.default.createElement(import_Header.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
190
176
  "div",
191
177
  {
192
- className: `parallel-content-wrap ${(0, import_utils.isMobile)() ? "parallel-content-mobile-wrap" : ""}`
178
+ className: `parallel-content-wrap ${(0, import_utils.isMobile)() ? "parallel-content-mobile-wrap" : ""} ${isRetailTemplate ? "parallel-content-retail-wrap" : ""}`
193
179
  },
194
180
  /* @__PURE__ */ import_react.default.createElement("div", { className: "parallel-content-left" }, Com),
195
181
  isShowCartCom
@@ -1,5 +1,6 @@
1
1
  .parallel-content-wrap {
2
2
  width: 1000px;
3
+ max-width: 100%;
3
4
  display: flex;
4
5
  gap: 6px;
5
6
  // align-items: center;
@@ -13,7 +14,9 @@
13
14
 
14
15
  .parallel-content-left {
15
16
  flex: 1;
16
- width: 634px;
17
+ // width: 634px;
18
+ width: auto;
19
+ min-width: 0;
17
20
  // padding: 16px 0;
18
21
 
19
22
  .appointment-resource-wrap {
@@ -37,6 +40,8 @@
37
40
  position: sticky;
38
41
  top: 93px;
39
42
  height: fit-content;
43
+ flex: 0 0 360px;
44
+ background-color: #fff;
40
45
  }
41
46
  }
42
47
 
@@ -89,3 +94,20 @@
89
94
  }
90
95
  }
91
96
  }
97
+
98
+ .parallel-content-retail-wrap {
99
+ .pisell-product-select-wrapper {
100
+ .pisell-product-select-tabs-wrapper {
101
+ top: 0px !important;
102
+ }
103
+ }
104
+
105
+ .parallel-content-right {
106
+ top: 16px;
107
+ margin-top: 0;
108
+
109
+ .appointment-cart-item-wrap {
110
+ height: calc(100vh - 16px) !important;
111
+ }
112
+ }
113
+ }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Deposit: () => JSX.Element;
4
3
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;