@pisell/private-materials 6.2.11 → 6.2.13

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 (260) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Cart/utils.js +17 -1
  11. package/es/components/Sales/Event/Detail.d.ts +1 -0
  12. package/es/components/Sales/Event/Detail.js +45 -11
  13. package/es/components/Sales/Event/serve.d.ts +10 -0
  14. package/es/components/Sales/Event/serve.js +25 -0
  15. package/es/components/Sales/Summary/utils.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  17. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  18. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  19. package/es/components/booking/components/customSelect/index.js +0 -1
  20. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  21. package/es/components/booking/forms/table/index.d.ts +0 -1
  22. package/es/components/booking/hooks/useClearCart.js +8 -11
  23. package/es/components/booking/info/client/index.js +2 -3
  24. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  25. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  26. package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
  27. package/es/components/booking/info/service/Lists.js +26 -36
  28. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  29. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  30. package/es/components/booking/info/service/like/index.d.ts +0 -1
  31. package/es/components/booking/info/service2/utils.js +21 -20
  32. package/es/components/booking/info2/index.js +0 -1
  33. package/es/components/booking/info2/service/addService/utils.js +3 -6
  34. package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
  35. package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
  36. package/es/components/booking/info2/service/editService/index.js +165 -258
  37. package/es/components/booking/info2/service/index.js +15 -19
  38. package/es/components/booking/materiels/duration/index.js +2 -9
  39. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  40. package/es/components/booking/utils.d.ts +2 -2
  41. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  42. package/es/components/eftpos/form/index.d.ts +0 -1
  43. package/es/components/eftpos/group/index.d.ts +0 -1
  44. package/es/components/eftpos/hooks.d.ts +0 -1
  45. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  46. package/es/components/eftpos/icon/device.d.ts +0 -1
  47. package/es/components/eftpos/receipt/index.d.ts +0 -1
  48. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  49. package/es/components/eftposPay/amount.d.ts +1 -1
  50. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  51. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  52. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  53. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  54. package/es/components/eftposPay/device.d.ts +1 -1
  55. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  56. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  57. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  58. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  59. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  60. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  61. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  63. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -2
  66. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  67. package/es/components/eventBooking/index.js +14 -0
  68. package/es/components/eventBooking/index.less +1 -1
  69. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  70. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  71. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  72. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  73. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  74. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  75. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  76. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  77. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  78. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  79. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  80. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  81. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  82. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  83. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  84. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  85. package/es/components/schedules/products/index.d.ts +0 -1
  86. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  87. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  88. package/es/components/shoppingCart/components/Cart/Product.js +41 -48
  89. package/es/components/shoppingCart/components/Cart/index.js +18 -21
  90. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  91. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  92. package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -175
  93. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  94. package/es/components/ticketBooking/components/timeBar/index.js +71 -78
  95. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  96. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  97. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  98. package/lib/components/Sales/Cart/utils.js +10 -1
  99. package/lib/components/Sales/Event/Detail.d.ts +1 -0
  100. package/lib/components/Sales/Event/Detail.js +37 -12
  101. package/lib/components/Sales/Event/serve.d.ts +10 -0
  102. package/lib/components/Sales/Event/serve.js +7 -0
  103. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  104. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  105. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  106. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  107. package/lib/components/booking/components/customSelect/index.js +0 -1
  108. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  109. package/lib/components/booking/forms/table/index.d.ts +0 -1
  110. package/lib/components/booking/hooks/useClearCart.js +13 -16
  111. package/lib/components/booking/info/client/index.js +4 -5
  112. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  113. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  114. package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
  115. package/lib/components/booking/info/service/Lists.js +23 -35
  116. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  117. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  118. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  119. package/lib/components/booking/info/service2/utils.js +17 -17
  120. package/lib/components/booking/info2/service/addService/utils.js +2 -4
  121. package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
  122. package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
  123. package/lib/components/booking/info2/service/editService/index.js +70 -132
  124. package/lib/components/booking/info2/service/index.js +9 -13
  125. package/lib/components/booking/materiels/duration/index.js +2 -7
  126. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  127. package/lib/components/booking/utils.d.ts +2 -2
  128. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  129. package/lib/components/eftpos/form/index.d.ts +0 -1
  130. package/lib/components/eftpos/group/index.d.ts +0 -1
  131. package/lib/components/eftpos/hooks.d.ts +0 -1
  132. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  133. package/lib/components/eftpos/icon/device.d.ts +0 -1
  134. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  135. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  136. package/lib/components/eftposPay/amount.d.ts +1 -1
  137. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  138. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  139. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  140. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  141. package/lib/components/eftposPay/device.d.ts +1 -1
  142. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  143. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  144. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  145. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  146. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  147. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  148. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  149. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  150. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  151. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  152. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -2
  153. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  154. package/lib/components/eventBooking/index.js +11 -0
  155. package/lib/components/eventBooking/index.less +1 -1
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  157. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  158. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  159. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  160. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  161. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  162. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  163. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  164. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  165. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  166. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  167. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  168. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  169. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  170. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  171. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  172. package/lib/components/schedules/products/index.d.ts +0 -1
  173. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  174. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  175. package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
  176. package/lib/components/shoppingCart/components/Cart/index.js +15 -18
  177. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  178. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  179. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +127 -143
  180. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  181. package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
  182. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  183. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  184. package/package.json +3 -3
  185. package/es/components/Sales/Checkout/utils.d.ts +0 -40
  186. package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  187. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
  188. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  189. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  190. package/es/components/appointmentBooking/hooks.d.ts +0 -106
  191. package/es/components/appointmentBooking/index.d.ts +0 -3
  192. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  193. package/es/components/booking/components/voucher/index.d.ts +0 -3
  194. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  195. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -6
  196. package/es/components/booking/info/index.d.ts +0 -3
  197. package/es/components/booking/info/utils.d.ts +0 -50
  198. package/es/components/booking/info2/index.d.ts +0 -12
  199. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  200. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  201. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  202. package/es/components/booking/locales.d.ts +0 -828
  203. package/es/components/booking/model.d.ts +0 -108
  204. package/es/components/eftposPay/const.d.ts +0 -184
  205. package/es/components/eftposPay/hooks.d.ts +0 -35
  206. package/es/components/eftposPay/index.d.ts +0 -4
  207. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  208. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  209. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  210. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  211. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  212. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  213. package/es/components/eftposPay/manufacturer.d.ts +0 -7
  214. package/es/components/eftposPay/pay.d.ts +0 -20
  215. package/es/components/eftposPay/store/index.d.ts +0 -355
  216. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  217. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
  218. package/es/components/productSelect/index.d.ts +0 -26
  219. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  220. package/es/components/ticketBooking/index.d.ts +0 -7
  221. package/es/components/walletList/index.d.ts +0 -28
  222. package/es/utils/index.d.ts +0 -23
  223. package/lib/components/Sales/Checkout/utils.d.ts +0 -40
  224. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  225. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
  226. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  227. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  228. package/lib/components/appointmentBooking/hooks.d.ts +0 -106
  229. package/lib/components/appointmentBooking/index.d.ts +0 -3
  230. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  231. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  232. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  233. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -6
  234. package/lib/components/booking/info/index.d.ts +0 -3
  235. package/lib/components/booking/info/utils.d.ts +0 -50
  236. package/lib/components/booking/info2/index.d.ts +0 -12
  237. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  238. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  239. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  240. package/lib/components/booking/locales.d.ts +0 -828
  241. package/lib/components/booking/model.d.ts +0 -108
  242. package/lib/components/eftposPay/const.d.ts +0 -184
  243. package/lib/components/eftposPay/hooks.d.ts +0 -35
  244. package/lib/components/eftposPay/index.d.ts +0 -4
  245. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  246. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  247. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  248. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  249. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  250. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  251. package/lib/components/eftposPay/manufacturer.d.ts +0 -7
  252. package/lib/components/eftposPay/pay.d.ts +0 -20
  253. package/lib/components/eftposPay/store/index.d.ts +0 -355
  254. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  255. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
  256. package/lib/components/productSelect/index.d.ts +0 -26
  257. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  258. package/lib/components/ticketBooking/index.d.ts +0 -7
  259. package/lib/components/walletList/index.d.ts +0 -28
  260. package/lib/utils/index.d.ts +0 -23
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
3
2
  export * from './Sales';
4
3
  export default SalesModel;
@@ -168,7 +168,23 @@ export var formatOptionsToOrigin = function formatOptionsToOrigin(options) {
168
168
  };
169
169
  export var handleProductDeposit = function handleProductDeposit(cartItem, eventDetail, num) {
170
170
  var _origin$custom_deposi;
171
- var productDetail = eventDetail.productDetail;
171
+ var productDetail = eventDetail.productDetail,
172
+ bookingOptionItem = eventDetail.bookingOptionItem;
173
+
174
+ // 如果是普通商品
175
+ var normalProduct = bookingOptionItem === null || bookingOptionItem === void 0 ? void 0 : bookingOptionItem._originData;
176
+ if (!productDetail && normalProduct) {
177
+ var custom_deposit_data = normalProduct.custom_deposit_data;
178
+ if ((custom_deposit_data === null || custom_deposit_data === void 0 ? void 0 : custom_deposit_data.has_deposit) == 1) {
179
+ return getProductDeposit({
180
+ cartItem: cartItem,
181
+ product: normalProduct,
182
+ num: num
183
+ });
184
+ } else {
185
+ return null;
186
+ }
187
+ }
172
188
  if (!productDetail) {
173
189
  return null;
174
190
  }
@@ -14,6 +14,7 @@ interface EventDetailContextType {
14
14
  currentBookingOption: any;
15
15
  selectEventDetailProductDetail: (productDetail: any) => void;
16
16
  checkBeforeSelectEventDetail: () => boolean;
17
+ getProductDetailRequest: any;
17
18
  }
18
19
  interface EventDetailProviderProps {
19
20
  children: React.ReactNode;
@@ -15,7 +15,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
15
15
  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; } }
16
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  import React, { createContext, useRef, useState } from 'react';
18
- import { getEventDetailBookingOptionsApi, getEventDetailIntroductionApi, getEventDetailSelectDateApi, getEventDetailTeacherApi } from "./serve";
18
+ import { getEventDetailBookingOptionsApi, getEventDetailIntroductionApi, getEventDetailSelectDateApi, getEventDetailTeacherApi, getProductDetailApi } from "./serve";
19
19
  import { useRequest } from 'ahooks';
20
20
  import { useEvent } from "./index";
21
21
  import { getIamgeFromMedia } from "../utils";
@@ -219,22 +219,55 @@ export var EventDetailProvider = function EventDetailProvider(_ref) {
219
219
  selectEventDetailBookingOptions(current.value);
220
220
  }
221
221
  });
222
+ var getProductDetailRequest = useRequest(getProductDetailApi, {
223
+ manual: true,
224
+ loadingDelay: 200
225
+ });
226
+
227
+ /**
228
+ * @title: 选择活动关联的商品
229
+ * @param id 活动关联的商品id
230
+ */
222
231
  var selectEventDetailBookingOptions = function selectEventDetailBookingOptions(id) {
223
- var _bookingOptions$filte;
232
+ var _bookingOptions$filte, _option$_originData;
224
233
  var _ref2 = detailRef.current || {},
225
234
  introduction = _ref2.introduction,
226
235
  bookingOptions = _ref2.bookingOptions;
227
236
  var option = bookingOptions === null || bookingOptions === void 0 || (_bookingOptions$filte = bookingOptions.filter(function (v) {
228
237
  return v.value === id;
229
238
  })) === null || _bookingOptions$filte === void 0 ? void 0 : _bookingOptions$filte[0];
230
- _setDetail({
231
- introduction: _objectSpread(_objectSpread({}, introduction), {}, {
232
- price: option.price,
233
- origin_price: option.original_price
234
- }),
235
- selectedProduct: option // 选中的活动关联的商品
236
- });
237
- _setCurrentBookingOption(id);
239
+ var setSelectedData = function setSelectedData(data) {
240
+ _setDetail({
241
+ introduction: _objectSpread(_objectSpread({}, introduction), {}, {
242
+ price: data === null || data === void 0 ? void 0 : data.price,
243
+ origin_price: data === null || data === void 0 ? void 0 : data.original_price
244
+ }),
245
+ selectedProduct: data // 选中的活动关联的商品
246
+ });
247
+ _setCurrentBookingOption(id);
248
+ };
249
+
250
+ // 普通商品需要单独查询商品详情
251
+ if ((option === null || option === void 0 || (_option$_originData = option._originData) === null || _option$_originData === void 0 ? void 0 : _option$_originData.is_eject) === 0) {
252
+ var _introduction$_origin;
253
+ getProductDetailRequest.runAsync(id, {
254
+ open_deposit: 1,
255
+ front_end_cache_id: (introduction === null || introduction === void 0 || (_introduction$_origin = introduction._originData) === null || _introduction$_origin === void 0 ? void 0 : _introduction$_origin.id) + '_' + id
256
+ }).then(function (res) {
257
+ var _res$data2;
258
+ // 定金相关信息
259
+ var custom_deposit_data = res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.custom_deposit_data;
260
+ var newOption = _objectSpread({}, option);
261
+ if (custom_deposit_data && newOption._originData) {
262
+ newOption._originData.custom_deposit_data = custom_deposit_data;
263
+ }
264
+ setSelectedData(newOption);
265
+ }).catch(function () {
266
+ setSelectedData(option);
267
+ });
268
+ } else {
269
+ setSelectedData(option);
270
+ }
238
271
  };
239
272
 
240
273
  /**
@@ -272,7 +305,8 @@ export var EventDetailProvider = function EventDetailProvider(_ref) {
272
305
  getEventDetailSelectDate: getEventDetailSelectDate,
273
306
  currentBookingOption: currentBookingOption,
274
307
  selectEventDetailProductDetail: selectEventDetailProductDetail,
275
- checkBeforeSelectEventDetail: checkBeforeSelectEventDetail
308
+ checkBeforeSelectEventDetail: checkBeforeSelectEventDetail,
309
+ getProductDetailRequest: getProductDetailRequest
276
310
  };
277
311
  return /*#__PURE__*/React.createElement(EventDetailContext.Provider, {
278
312
  value: contextValue
@@ -37,3 +37,13 @@ export declare const getProductPrice: (params: {
37
37
  customer_id: number;
38
38
  schedule_date?: string;
39
39
  }) => Promise<any>;
40
+ /**
41
+ * 获取商品详情
42
+ * @param id 商品id
43
+ * @param params 参数
44
+ * @returns
45
+ */
46
+ export declare const getProductDetailApi: (id: number, params: {
47
+ open_deposit?: string | number;
48
+ front_end_cache_id?: string;
49
+ }) => Promise<any>;
@@ -55,4 +55,29 @@ export var getProductPrice = /*#__PURE__*/function () {
55
55
  return function getProductPrice(_x) {
56
56
  return _ref.apply(this, arguments);
57
57
  };
58
+ }();
59
+
60
+ /**
61
+ * 获取商品详情
62
+ * @param id 商品id
63
+ * @param params 参数
64
+ * @returns
65
+ */
66
+ export var getProductDetailApi = /*#__PURE__*/function () {
67
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id, params) {
68
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
69
+ while (1) switch (_context2.prev = _context2.next) {
70
+ case 0:
71
+ return _context2.abrupt("return", request.getRequest().get("/h5/product/standard/show/".concat(id), params, {
72
+ useCache: true
73
+ }));
74
+ case 1:
75
+ case "end":
76
+ return _context2.stop();
77
+ }
78
+ }, _callee2);
79
+ }));
80
+ return function getProductDetailApi(_x2, _x3) {
81
+ return _ref2.apply(this, arguments);
82
+ };
58
83
  }();
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -74,7 +74,6 @@ var CustomSelect = function CustomSelect(props, ref) {
74
74
  showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown,
75
75
  propsHandleOpenModal = props.handleOpenModal,
76
76
  handleDayChange = props.handleDayChange;
77
- console.log('custom select');
78
77
  var searchRef = useRef();
79
78
 
80
79
  // 当前选择的值
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -2,12 +2,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
- import React, { useMemo } from 'react';
5
+ import React from 'react';
6
6
  import classNames from 'classnames';
7
7
  import { Iconfont } from '@pisell/materials';
8
8
  import { locales } from "@pisell/utils";
9
9
  var useClearCart = function useClearCart(state, dispatch) {
10
- var _state$service3;
10
+ var _state$service, _state$service2;
11
11
  var handleClear = function handleClear() {
12
12
  // 清除购物车
13
13
  dispatch({
@@ -17,14 +17,11 @@ var useClearCart = function useClearCart(state, dispatch) {
17
17
  }
18
18
  });
19
19
  };
20
- return useMemo(function () {
21
- var _state$service, _state$service2;
22
- return !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit && /*#__PURE__*/React.createElement("span", {
23
- className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
24
- onClick: handleClear
25
- }, /*#__PURE__*/React.createElement(Iconfont, {
26
- type: "pisell2-trash-01"
27
- }), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
28
- }, [(_state$service3 = state.service) === null || _state$service3 === void 0 || (_state$service3 = _state$service3.value) === null || _state$service3 === void 0 ? void 0 : _state$service3.length, state.channelDisabledEdit]);
20
+ return !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit && /*#__PURE__*/React.createElement("span", {
21
+ className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
22
+ onClick: handleClear
23
+ }, /*#__PURE__*/React.createElement(Iconfont, {
24
+ type: "pisell2-trash-01"
25
+ }), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
29
26
  };
30
27
  export default useClearCart;
@@ -36,7 +36,7 @@ import { getWaiverTitle } from "../clientVariant/utils";
36
36
  import useGetHolderList from "../hooks/useGetHolderList";
37
37
  var isLoadClient = false;
38
38
  var Client = function Client() {
39
- var _state$client$value2, _state$client4, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
39
+ var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
40
40
  var modalRef = useRef();
41
41
  var _useState = useState(false),
42
42
  _useState2 = _slicedToArray(_useState, 2),
@@ -397,7 +397,6 @@ var Client = function Client() {
397
397
  }, locales.getText('pisell2.text.load-more'))) : null;
398
398
  }, [loadLoading, params, state.client.clients.length]);
399
399
  var customSelect = useMemo(function () {
400
- console.log('render customSelect');
401
400
  return /*#__PURE__*/React.createElement(CustomSelect, {
402
401
  autoFocus: !state.isTerminal,
403
402
  modalOpen: state.modalOpen,
@@ -460,7 +459,7 @@ var Client = function Client() {
460
459
  return true;
461
460
  }
462
461
  });
463
- }, [state.isTerminal, state.modalOpen, (_state$client4 = state.client) === null || _state$client4 === void 0 ? void 0 : _state$client4.value, state.drawerMask, renderList, loading, franchiseeLoading, params.search, loadMore]);
462
+ }, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
464
463
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
465
464
  className: "pisell-lowcode__booking-client",
466
465
  onClick: function onClick() {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import { useMemoizedFn } from "ahooks";
8
7
  import { useEffect, useMemo, useRef } from "react";
9
8
  import useHolderConfig from "./useHolderConfig";
10
9
  import { isOpenAddTime } from "../utils";
@@ -30,27 +29,21 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
30
29
  };
31
30
  }, [state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.information_tab]);
32
31
  var showAddTimeModal = useMemo(function () {
33
- return isOpenAddTime(state) && !state.isBookingTicket2;
32
+ return isOpenAddTime(state);
34
33
  }, [state, appointment_card.quick_time]);
35
- var handleEdit = useMemoizedFn(function (cacheItem, type) {
36
- var _detailRef$current, _detailRef$current$in;
37
- // console.timeEnd('handleChange');
38
- console.time('handleEdit');
39
- console.log(performance.now() - window.pp1, '打开商品4');
40
- (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
41
- // setTimeout(() => {
42
- // console.log(performance.now() - window.pp1, '打开商品5');
43
- // console.timeEnd('handleEdit')
44
- // detailRef.current?.init?.(cacheItem, false, type === 'edit_product');
45
- // }, );
46
- });
34
+ var handleEdit = function handleEdit(cacheItem, type) {
35
+ setTimeout(function () {
36
+ var _detailRef$current, _detailRef$current$in;
37
+ (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
38
+ }, 100);
39
+ };
47
40
  var dispatchService = function dispatchService(type, payload) {
48
41
  dispatch({
49
42
  type: type,
50
43
  payload: _objectSpread({}, payload)
51
44
  });
52
45
  };
53
- var handleAction = useMemoizedFn(function (dataSource) {
46
+ var handleAction = function handleAction(dataSource) {
54
47
  var cacheItem = getProductExtend({
55
48
  cacheItem: _objectSpread(_objectSpread({}, dataSource._origin), {}, {
56
49
  new: 0
@@ -64,7 +57,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
64
57
  cacheItem: cacheItem
65
58
  }
66
59
  });
67
- });
60
+ };
68
61
  return {
69
62
  detailRef: detailRef,
70
63
  handleEdit: handleEdit,
@@ -14,7 +14,7 @@ import { useMemoizedFn } from 'ahooks';
14
14
  import { getProductExtend } from "../../info2/service/addService/utils";
15
15
  import useAddHolder from "../hooks/useAddHolder";
16
16
  var Lists = function Lists(_ref) {
17
- var _state$service2;
17
+ var _state$service;
18
18
  var onEdit = _ref.onEdit,
19
19
  onChange = _ref.onChange,
20
20
  onAction = _ref.onAction,
@@ -36,8 +36,6 @@ var Lists = function Lists(_ref) {
36
36
  * @Date: 2024-11-29 16:35
37
37
  */
38
38
  var handleChange = useMemoizedFn(function (currentItem, type, other) {
39
- console.time('handleChange');
40
- console.log(window.pp1 = performance.now(), '打开商品');
41
39
  if (state.disabledEdit || state.disableEventBookingEdit) {
42
40
  return;
43
41
  }
@@ -61,7 +59,9 @@ var Lists = function Lists(_ref) {
61
59
  editModal: true,
62
60
  cacheItem: cacheItem
63
61
  });
64
- return onEdit === null || onEdit === void 0 ? void 0 : onEdit(cacheItem, type);
62
+ return onEdit === null || onEdit === void 0 ? void 0 : onEdit(_objectSpread(_objectSpread({}, product), {}, {
63
+ new: 0
64
+ }), type);
65
65
  }
66
66
  var params = {
67
67
  editModal: false,
@@ -95,37 +95,27 @@ var Lists = function Lists(_ref) {
95
95
  isShowEditProduct: !state.isBookingCreatePage
96
96
  };
97
97
  }, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
98
- var products = useMemo(function () {
99
- var _state$service;
100
- console.time('products');
101
- var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource);
102
- console.timeEnd('products');
103
- return p;
104
- }, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value]);
105
- return useMemo(function () {
106
- console.log('render List');
107
- return /*#__PURE__*/React.createElement(CartContext.Provider, {
108
- value: {
109
- state: state
110
- }
111
- }, /*#__PURE__*/React.createElement(ShoppingCart, {
112
- isParallelResource: isParallelResource,
113
- onAction: onAction,
114
- onChange: handleChange,
115
- isOpenGroup: false,
116
- isHideClearCart: true,
117
- onAddProduct: function onAddProduct() {
118
- return onChange({
119
- addModal: true
120
- });
121
- }
122
- // onActiveKey={handleActiveKey}
123
- // collapseParams={CollapseParams}
124
- ,
125
- productParams: _objectSpread(_objectSpread({}, productParams), {}, {
126
- products: products
127
- })
128
- }));
129
- }, [products, state, productParams]);
98
+ return /*#__PURE__*/React.createElement(CartContext.Provider, {
99
+ value: {
100
+ state: state
101
+ }
102
+ }, /*#__PURE__*/React.createElement(ShoppingCart, {
103
+ isParallelResource: isParallelResource,
104
+ onAction: onAction,
105
+ onChange: handleChange,
106
+ isOpenGroup: false,
107
+ isHideClearCart: true,
108
+ onAddProduct: function onAddProduct() {
109
+ return onChange({
110
+ addModal: true
111
+ });
112
+ }
113
+ // onActiveKey={handleActiveKey}
114
+ // collapseParams={CollapseParams}
115
+ ,
116
+ productParams: _objectSpread(_objectSpread({}, productParams), {}, {
117
+ products: formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource)
118
+ })
119
+ }));
130
120
  };
131
121
  export default Lists;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -691,28 +691,29 @@ export var formatProducts = function formatProducts(lists, state) {
691
691
  _origin: item
692
692
  });
693
693
  };
694
+
695
+ // 将商品分为组商品和非组商品
696
+ lists.forEach(function (item) {
697
+ var _item$_extend28;
698
+ if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
699
+ normalList.push(formItem(item));
700
+ } else {
701
+ groupList.push(item);
702
+ }
703
+ });
704
+
705
+ // 根据item._extend.groupId 进行分组
706
+ var groups = groupList.reduce(function (prev, item) {
707
+ var _item$_extend29;
708
+ var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
709
+ if (!prev[groupId]) {
710
+ prev[groupId] = [];
711
+ }
712
+ prev[groupId].push(item);
713
+ return prev;
714
+ }, {});
694
715
  console.log(normalList, 'normalList');
695
716
  if (isRenderGroup) {
696
- // 将商品分为组商品和非组商品
697
- lists.forEach(function (item) {
698
- var _item$_extend28;
699
- if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
700
- normalList.push(formItem(item));
701
- } else {
702
- groupList.push(item);
703
- }
704
- });
705
-
706
- // 根据item._extend.groupId 进行分组
707
- var groups = groupList.reduce(function (prev, item) {
708
- var _item$_extend29;
709
- var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
710
- if (!prev[groupId]) {
711
- prev[groupId] = [];
712
- }
713
- prev[groupId].push(item);
714
- return prev;
715
- }, {});
716
717
  return Object.values(groups).map(function (d) {
717
718
  return formItem(concatBookings(d));
718
719
  }).concat(normalList);
@@ -81,7 +81,6 @@ var Info = Provider(function (props) {
81
81
  }, []);
82
82
  useMemo(function () {
83
83
  var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$i, _context$appHelper3;
84
- // TODO: 优化 内部每次设置state会触发两次渲染
85
84
  var isFranchisee = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.businessUtils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getAppByModal) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, 'franchisee');
86
85
  modal.dispatch({
87
86
  type: 'setState',
@@ -128,8 +128,7 @@ export var getTimeObj = function getTimeObj(_ref4) {
128
128
  cacheItem: cacheItem,
129
129
  useStartTime: useStartTime,
130
130
  currentResource: currentResource,
131
- // 没有使用该参数
132
- // state,
131
+ state: state,
133
132
  durationProps: durationProps
134
133
  });
135
134
  var obj = sliceDayIntoFiveMinutes((_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.service_time, locales.locale);
@@ -287,9 +286,7 @@ export var setDefaultResource = function setDefaultResource(_ref6) {
287
286
  defaultOriginalResource = renderList;
288
287
  }
289
288
  var defaultResource = defaultOriginalResource.map(function (d) {
290
- return {
291
- // ...d,
292
- children: d.children,
289
+ return _objectSpread(_objectSpread({}, d), {}, {
293
290
  relation_type: d.relation_type,
294
291
  form_id: item.form_id,
295
292
  relation_id: d.id,
@@ -300,7 +297,7 @@ export var setDefaultResource = function setDefaultResource(_ref6) {
300
297
  form_name: item.title,
301
298
  resource_name: d.main_field
302
299
  }
303
- };
300
+ });
304
301
  });
305
302
  obj[item.form_id] = defaultResource;
306
303
  };
@@ -70,7 +70,6 @@ var AddTimeModal = function AddTimeModal() {
70
70
  _useState10 = _slicedToArray(_useState9, 2),
71
71
  renderList = _useState10[0],
72
72
  setRenderList = _useState10[1];
73
- console.log(renderList, 'renderListrenderList');
74
73
  var context = useEngineContext();
75
74
  var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
76
75
  interaction = _context$appHelper$ut.interaction;
@@ -149,7 +148,6 @@ var AddTimeModal = function AddTimeModal() {
149
148
  }
150
149
  return arr.filter(Boolean);
151
150
  }, [(_state$service = state.service) === null || _state$service === void 0 || (_state$service = _state$service.cacheItem) === null || _state$service === void 0 || (_state$service = _state$service._extend) === null || _state$service === void 0 ? void 0 : _state$service.resource]);
152
- console.log(currentResource, 'currentResource');
153
151
  var getTimeUsableStatus = function getTimeUsableStatus(time) {
154
152
  var _state$service$cacheI3;
155
153
  if (!((_state$service$cacheI3 = state.service.cacheItem) !== null && _state$service$cacheI3 !== void 0 && _state$service$cacheI3._extend) || !currentResource.length) {
@@ -272,7 +270,6 @@ var AddTimeModal = function AddTimeModal() {
272
270
  case 3:
273
271
  newList = _context2.sent;
274
272
  list = newList.map(function (d) {
275
- debugger;
276
273
  // 是否可用
277
274
  var isUsable = isUsableProduct(d.add_time, state.service.cacheItem);
278
275
  return _objectSpread(_objectSpread({}, d), {}, {
@@ -189,14 +189,9 @@ var Resources = function Resources(_ref, ref) {
189
189
  var getIsAutoAllocation = function getIsAutoAllocation(id) {
190
190
  return getAutoAllocationStorage(id);
191
191
  };
192
- console.log('resourcesss');
193
-
194
- /* todo: 此处value变化渲染三次 */
195
-
196
192
  return /*#__PURE__*/React.createElement(React.Fragment, null, data.map(function (item) {
197
193
  var _cur$2;
198
194
  var cur = _value[item.form_id];
199
- console.log(cur, 'curcur');
200
195
  var errors = (cur || []).reduce(function (pre, d) {
201
196
  return pre.concat((d === null || d === void 0 ? void 0 : d.errors) || []);
202
197
  }, []);