@pisell/private-materials 6.6.99 → 6.6.101

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 (259) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/businessModel/SalesModel/index.d.ts +0 -1
  8. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  9. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  10. package/es/components/booking/addons/model.d.ts +10 -1
  11. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  12. package/es/components/booking/components/footer/utils.js +0 -13
  13. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  14. package/es/components/booking/components/voucher/index.js +3 -42
  15. package/es/components/booking/forms/model.d.ts +10 -1
  16. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  17. package/es/components/booking/forms/table/index.d.ts +0 -1
  18. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  19. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +5 -8
  20. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  21. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  22. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  23. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  24. package/es/components/booking/info/index.d.ts +0 -1
  25. package/es/components/booking/info/model.d.ts +10 -1
  26. package/es/components/booking/info/service/Lists.d.ts +0 -1
  27. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  28. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  29. package/es/components/booking/info/service/like/index.d.ts +0 -1
  30. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  31. package/es/components/booking/info/service2/utils.d.ts +1 -1
  32. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  33. package/es/components/booking/info2/service/editService/index.js +11 -31
  34. package/es/components/booking/info2/service/editService/utils.d.ts +0 -3
  35. package/es/components/booking/info2/service/editService/utils.js +19 -128
  36. package/es/components/booking/info2/utilsByBooking.js +81 -9
  37. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  38. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  39. package/es/components/booking/model.d.ts +9 -1
  40. package/es/components/booking/notes/model.d.ts +10 -1
  41. package/es/components/booking/payments/model.d.ts +10 -1
  42. package/es/components/booking/utils.d.ts +2 -2
  43. package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
  44. package/es/components/eftpos/SettlementModal/Action.d.ts +0 -1
  45. package/es/components/eftpos/SettlementModal/index.d.ts +0 -1
  46. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  47. package/es/components/eftpos/form/index.d.ts +0 -1
  48. package/es/components/eftpos/group/index.d.ts +0 -1
  49. package/es/components/eftpos/hooks.d.ts +0 -1
  50. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  51. package/es/components/eftpos/icon/device.d.ts +0 -1
  52. package/es/components/eftpos/receipt/index.d.ts +0 -1
  53. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  54. package/es/components/eftposPay/amount.d.ts +1 -1
  55. package/es/components/eftposPay/app.d.ts +0 -1
  56. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  57. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  58. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  59. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  60. package/es/components/eftposPay/device.d.ts +1 -1
  61. package/es/components/eftposPay/hooks.d.ts +2 -2
  62. package/es/components/eftposPay/mx51/Action.d.ts +0 -1
  63. package/es/components/eftposPay/store/index.d.ts +5 -5
  64. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  65. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  68. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  75. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  76. package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  77. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  78. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  79. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  80. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  81. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  82. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  83. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  84. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  85. package/es/components/pay/toC/model.d.ts +9 -1
  86. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  87. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  88. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  89. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  90. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  91. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  92. package/es/components/schedules/model.d.ts +9 -1
  93. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  94. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  95. package/es/components/schedules/products/index.d.ts +0 -1
  96. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  97. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  98. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  99. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  100. package/es/components/ticketBooking/utils/index.js +4 -4
  101. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  102. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  103. package/es/plus/clientName/index.d.ts +0 -1
  104. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  105. package/es/plus/clinetSearch/Add/index.js +4 -2
  106. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
  107. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
  108. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
  109. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
  110. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
  111. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -1
  112. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  113. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  114. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
  115. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  116. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  117. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -1
  118. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  119. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -1
  120. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  121. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  122. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -1
  123. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -1
  124. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  125. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -1
  126. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -1
  127. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -1
  128. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
  129. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  130. package/es/pro/Selector/demo.d.ts +0 -1
  131. package/es/pro/pisellPaymentList/example.d.ts +0 -1
  132. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +0 -1
  133. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  134. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  135. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  136. package/lib/components/booking/addons/model.d.ts +10 -1
  137. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  138. package/lib/components/booking/components/footer/utils.js +1 -8
  139. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  140. package/lib/components/booking/components/voucher/index.js +3 -43
  141. package/lib/components/booking/forms/model.d.ts +10 -1
  142. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  143. package/lib/components/booking/forms/table/index.d.ts +0 -1
  144. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  145. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +5 -7
  146. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  147. package/lib/components/booking/info/clientVariant/vertical/index.js +1 -1
  148. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  149. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  150. package/lib/components/booking/info/index.d.ts +0 -1
  151. package/lib/components/booking/info/model.d.ts +10 -1
  152. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  153. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  154. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  155. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  156. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  157. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  158. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  159. package/lib/components/booking/info2/service/editService/index.js +12 -38
  160. package/lib/components/booking/info2/service/editService/utils.d.ts +0 -3
  161. package/lib/components/booking/info2/service/editService/utils.js +12 -94
  162. package/lib/components/booking/info2/utilsByBooking.js +50 -2
  163. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  164. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  165. package/lib/components/booking/model.d.ts +9 -1
  166. package/lib/components/booking/notes/model.d.ts +10 -1
  167. package/lib/components/booking/payments/model.d.ts +10 -1
  168. package/lib/components/booking/utils.d.ts +2 -2
  169. package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
  170. package/lib/components/eftpos/SettlementModal/Action.d.ts +0 -1
  171. package/lib/components/eftpos/SettlementModal/index.d.ts +0 -1
  172. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  173. package/lib/components/eftpos/form/index.d.ts +0 -1
  174. package/lib/components/eftpos/group/index.d.ts +0 -1
  175. package/lib/components/eftpos/hooks.d.ts +0 -1
  176. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  177. package/lib/components/eftpos/icon/device.d.ts +0 -1
  178. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  179. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  180. package/lib/components/eftposPay/amount.d.ts +1 -1
  181. package/lib/components/eftposPay/app.d.ts +0 -1
  182. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  183. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  184. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  185. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  186. package/lib/components/eftposPay/device.d.ts +1 -1
  187. package/lib/components/eftposPay/hooks.d.ts +2 -2
  188. package/lib/components/eftposPay/mx51/Action.d.ts +0 -1
  189. package/lib/components/eftposPay/store/index.d.ts +5 -5
  190. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  191. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  192. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  193. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  194. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  195. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  196. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  197. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  198. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  199. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  200. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  201. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  202. package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  203. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  204. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  205. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  206. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  207. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  208. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  209. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  210. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  211. package/lib/components/pay/toC/model.d.ts +9 -1
  212. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  213. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  214. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  215. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  216. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  217. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  218. package/lib/components/schedules/model.d.ts +9 -1
  219. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  220. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  221. package/lib/components/schedules/products/index.d.ts +0 -1
  222. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  223. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  224. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  225. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  226. package/lib/components/ticketBooking/utils/index.js +2 -2
  227. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  228. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  229. package/lib/plus/clientName/index.d.ts +0 -1
  230. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  231. package/lib/plus/clinetSearch/Add/index.js +1 -0
  232. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
  233. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
  234. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
  235. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
  236. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
  237. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +0 -1
  238. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  239. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  240. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
  241. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  242. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  243. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +0 -1
  244. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  245. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +0 -1
  246. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  247. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  248. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -1
  249. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +0 -1
  250. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  251. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -1
  252. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -1
  253. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -1
  254. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
  255. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  256. package/lib/pro/Selector/demo.d.ts +0 -1
  257. package/lib/pro/pisellPaymentList/example.d.ts +0 -1
  258. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +0 -1
  259. package/package.json +2 -2
@@ -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;
@@ -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 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -513,19 +513,6 @@ var formatProducts = function formatProducts(item, quantity) {
513
513
  // 非手动折扣
514
514
  var notManualDiscount = discount_list.filter(function (item) {
515
515
  return item.type !== 'product';
516
- }).map(function (discount) {
517
- var _discount$metadata, _discount$metadata$nu, _discount$metadata2;
518
- // 预约按份拆成 num=1 提交时,主商品扣次也要按当前提交数量拆分。
519
- if (quantity === undefined || (discount.tag || discount.type) !== 'entitlement_pass' || (_discount$metadata = discount.metadata) !== null && _discount$metadata !== void 0 && _discount$metadata.custom_product_bundle_map_id) {
520
- return discount;
521
- }
522
- var num = Math.min(Number((_discount$metadata$nu = (_discount$metadata2 = discount.metadata) === null || _discount$metadata2 === void 0 ? void 0 : _discount$metadata2.num) !== null && _discount$metadata$nu !== void 0 ? _discount$metadata$nu : item._extend.quantity), quantity);
523
- return _objectSpread(_objectSpread({}, discount), {}, {
524
- _num: num,
525
- metadata: _objectSpread(_objectSpread({}, discount.metadata), {}, {
526
- num: num
527
- })
528
- });
529
516
  });
530
517
  if (item.isCustomItem) {
531
518
  item.product_id = 0;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -107,14 +107,6 @@ var VoucherCard = function VoucherCard(props) {
107
107
  changeCustomerToGlobalState: changeCustomerToGlobalState
108
108
  }),
109
109
  selectCustomer = _useCustomer.selectCustomer;
110
- useEffect(function () {
111
- var _shopDiscount$setEnti;
112
- shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setEnti = shopDiscount.setEntitlementPassEnabled) === null || _shopDiscount$setEnti === void 0 || _shopDiscount$setEnti.call(shopDiscount, isBooking4Shop);
113
- return function () {
114
- var _shopDiscount$setEnti2;
115
- return shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setEnti2 = shopDiscount.setEntitlementPassEnabled) === null || _shopDiscount$setEnti2 === void 0 ? void 0 : _shopDiscount$setEnti2.call(shopDiscount, false);
116
- };
117
- }, [shopDiscount, isBooking4Shop]);
118
110
 
119
111
  // 设置client
120
112
  useDebounceEffect(function () {
@@ -362,42 +354,11 @@ var VoucherCard = function VoucherCard(props) {
362
354
  if (!isBooking4Shop) return [];
363
355
  return discountList.filter(function (item) {
364
356
  return !!item.isAvailable;
365
- }).flatMap(function (discount) {
366
- var _discount$appliedProd, _discount$committedAp, _discount$applicableP;
367
- var currentRow = _objectSpread(_objectSpread({}, discount), {}, {
368
- // 原卡片仍读取 isSelected,历史扣次不代表本次勾选。
369
- isSelected: discount.tag === 'entitlement_pass' && !discount.isDisabled ? !!discount.isSelected && (((_discount$appliedProd = discount.appliedProductDetails) === null || _discount$appliedProd === void 0 ? void 0 : _discount$appliedProd.length) || 0) > (((_discount$committedAp = discount.committedAppliedProductDetails) === null || _discount$committedAp === void 0 ? void 0 : _discount$committedAp.length) || 0) : discount.isSelected,
370
- isDisabled: discount.isDisabled || (discount.tag === 'entitlement_pass' ? !discount.isAvailable : discount.isDisabledForProductUsed) || disabled,
357
+ }).map(function (discount) {
358
+ return _objectSpread(_objectSpread({}, discount), {}, {
359
+ isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
371
360
  savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
372
361
  });
373
- var committedDetails = discount.tag === 'entitlement_pass' ? discount.committedAppliedProductDetails || [] : [];
374
- if (!committedDetails.length) return [currentRow];
375
-
376
- // 历史抵扣独立展示;卡的次数配置只影响本次使用,不影响上次结算记录。
377
- var historyRow = _objectSpread(_objectSpread({}, discount), {}, {
378
- displayKey: "".concat(discount.id, "-last-settlement"),
379
- isEditMode: true,
380
- isSelected: true,
381
- isDisabled: true,
382
- appliedProductDetails: committedDetails,
383
- savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(_objectSpread(_objectSpread({}, discount), {}, {
384
- savedAmount: 0,
385
- appliedProductDetails: committedDetails
386
- }))
387
- });
388
- // Rules 返回的 appliedProductDetails 按“历史抵扣 + 本次抵扣”排列。
389
- var currentDetails = (discount.appliedProductDetails || []).slice(committedDetails.length);
390
- var canApplyToNewProducts = !discount.isDisabled && (((_discount$applicableP = discount.applicableProductDetails) === null || _discount$applicableP === void 0 ? void 0 : _discount$applicableP.length) || 0) > 0;
391
- if (!currentDetails.length && !canApplyToNewProducts) return [historyRow];
392
- return [historyRow, _objectSpread(_objectSpread({}, currentRow), {}, {
393
- displayKey: "".concat(discount.id, "-current"),
394
- isEditMode: false,
395
- appliedProductDetails: currentDetails,
396
- savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(_objectSpread(_objectSpread({}, discount), {}, {
397
- savedAmount: 0,
398
- appliedProductDetails: currentDetails
399
- }))
400
- })];
401
362
  });
402
363
  }, [discountList, isBooking4Shop, disabled]);
403
364
  if (!isBooking4Shop) return null;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
7
+ handleOk: (values: SendModalValues) => Promise<any>;
8
8
  };
9
9
  export default useSendModal;
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -52,7 +52,7 @@ var useClientFn = function useClientFn(_params) {
52
52
  num: 5,
53
53
  total: 0,
54
54
  search: '',
55
- with: ['contactsInfo'],
55
+ with: ['formRecord', 'contactsInfo'],
56
56
  relation_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
57
57
  }),
58
58
  _useState8 = _slicedToArray(_useState7, 2),
@@ -76,7 +76,6 @@ var useClientFn = function useClientFn(_params) {
76
76
  }, [(_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id]);
77
77
  var getClients = /*#__PURE__*/function () {
78
78
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, returnResult) {
79
- var _state$bookingConfig4;
80
79
  var customer_id, customer_ids, resetParams, _setLoading, _state$client, api, withKey, data, list, _payload, customerItem, totalList;
81
80
  return _regeneratorRuntime().wrap(function _callee$(_context) {
82
81
  while (1) switch (_context.prev = _context.next) {
@@ -110,19 +109,17 @@ var useClientFn = function useClientFn(_params) {
110
109
  abort: true
111
110
  }
112
111
  } : {}), {}, {
113
- with: withKey,
114
- with_form_records: 1,
115
- relation_form_id: state === null || state === void 0 || (_state$bookingConfig4 = state.bookingConfig) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.config) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.basic) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.appointment_subject) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.form_id
112
+ with: withKey
116
113
  }));
117
114
  case 8:
118
115
  data = _context.sent;
119
116
  list = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (d) {
120
- var _d$form_record_list;
117
+ var _d$form_record;
121
118
  return _objectSpread(_objectSpread({}, d), {}, {
122
119
  name: getNickname(d),
123
120
  id: d.franchisee_customer_id || d.id,
124
- form_record: ((_d$form_record_list = d.form_record_list) === null || _d$form_record_list === void 0 ? void 0 : _d$form_record_list.map(function (item) {
125
- return _objectSpread(_objectSpread(_objectSpread({}, item.data), item), {}, {
121
+ form_record: ((_d$form_record = d.form_record) === null || _d$form_record === void 0 ? void 0 : _d$form_record.map(function (item) {
122
+ return _objectSpread(_objectSpread(_objectSpread({}, item), item.data), {}, {
126
123
  form_record_id: item.id
127
124
  });
128
125
  })) || []
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -262,7 +262,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
262
262
  case 7:
263
263
  _context.next = 9;
264
264
  return getClients({
265
- with: ['contactsInfo'],
265
+ with: ['formRecord', 'contactsInfo'],
266
266
  relation_form_id: boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.form_id,
267
267
  skip: 1,
268
268
  num: 20,
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource, isShowDelete, isShowAmountFooter }: any) => JSX.Element;
3
2
  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: any;
9
+ locale: string;
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;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -216,4 +216,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
216
216
  * @Author: WangHan
217
217
  * @Date: 2024-12-24 11:32
218
218
  */
219
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
219
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -41,7 +41,7 @@ import { editSessionProduct } from "../../../info/utils";
41
41
  import { deleteCacheParams, getDays, getProductOriginTotalPrice, getProductTotalPrice, getServiceTimes, isSessionProduct, isWalkIn } from "../../../utils";
42
42
  import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
43
43
  import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj, setDefaultCapacitys } from "../addService/utils";
44
- import { getProductAllDiscountList, hasEntitlementDiscount, mergeBundleWithOriginalPrice, setProductPrice, updateEntitlementQuantity } from "./utils";
44
+ import { getProductAllDiscountList, mergeBundleWithOriginalPrice, setProductPrice } from "./utils";
45
45
  import NoteModal from "../../../../../plus/noteModal";
46
46
  import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
47
47
  import EditTabs from "../../../info/service/editService/EditTabs";
@@ -91,7 +91,6 @@ var Info = function Info(_, ref) {
91
91
  var resourcesRef = useRef(null);
92
92
  var isChangeTotal = useRef(false);
93
93
  var shouldReallocateBundlePriceRef = useRef(false);
94
- var isEntitlementPrice = hasEntitlementDiscount(state.service.cacheItem);
95
94
  var _useState3 = useState(false),
96
95
  _useState4 = _slicedToArray(_useState3, 2),
97
96
  noteModalOpen = _useState4[0],
@@ -323,7 +322,7 @@ var Info = function Info(_, ref) {
323
322
  * @Date: 2024-01-09 14:04
324
323
  */
325
324
  var onFinish = function onFinish(values, cacheItem) {
326
- var _resourcesRef$current, _item$_extend, _list$find, _previousItem$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item2, _item3, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
325
+ var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item2, _item3, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
327
326
  var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
328
327
  if (isShowTimeAndResource && !isSuccess) {
329
328
  return;
@@ -363,8 +362,7 @@ var Info = function Info(_, ref) {
363
362
  _extend.startDate = startDate;
364
363
  _extend.endDate = endDate;
365
364
  }
366
- var isManualPriceChange = isChangeTotal.current && !hasEntitlementDiscount(_item);
367
- var shouldReallocatePrice = isManualPriceChange || shouldReallocateBundlePriceRef.current;
365
+ var shouldReallocatePrice = isChangeTotal.current || shouldReallocateBundlePriceRef.current;
368
366
  if (shouldReallocatePrice) {
369
367
  var _extend$other, _extend$other2;
370
368
  // 计算折扣比例
@@ -396,16 +394,9 @@ var Info = function Info(_, ref) {
396
394
  _item._time = new Date().getTime();
397
395
  _item._serviceKey = genServiceKey(_item);
398
396
  _item._holderKey = genHolderKey(_item);
399
- var previousItem = (_list$find = _list.find(function (item) {
400
- return item._id === _item._id;
401
- })) !== null && _list$find !== void 0 ? _list$find : _list.find(function (item) {
402
- return isSameBookingServiceItem(item, _item);
403
- });
404
- var isEntitlementQuantityChange = hasEntitlementDiscount(previousItem) && Number(_item._extend.quantity || 1) !== Number((previousItem === null || previousItem === void 0 || (_previousItem$_extend = previousItem._extend) === null || _previousItem$_extend === void 0 ? void 0 : _previousItem$_extend.quantity) || 1);
405
397
  // 如果holder 有多个,则需要拆分多个商品
406
398
  // 另外一个情况 如果商品数量有多个,holder 数量小于商品数量也需要拆分
407
- // 多次卡改量由 updateEntitlementQuantity 拆分,避免复制历史扣次。
408
- if (!isEntitlementQuantityChange && (((_item$_extend2 = _item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.holder_id) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.length) > 1 || ((_item$_extend3 = _item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.quantity) > 1 && ((_item$_extend4 = _item._extend) === null || _item$_extend4 === void 0 || (_item$_extend4 = _item$_extend4.holder_id) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.length) >= 1)) {
399
+ if (((_item$_extend2 = _item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.holder_id) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.length) > 1 || ((_item$_extend3 = _item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.quantity) > 1 && ((_item$_extend4 = _item._extend) === null || _item$_extend4 === void 0 || (_item$_extend4 = _item$_extend4.holder_id) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.length) >= 1) {
409
400
  var holder_ids = _item._extend.holder_id;
410
401
  _item._extend.holder_id = holder_ids[0];
411
402
  holder_ids = holder_ids.slice(1);
@@ -474,16 +465,10 @@ var Info = function Info(_, ref) {
474
465
  _item = deleteDiscountList(_item, true);
475
466
  }
476
467
  if (matchById) {
477
- _list = _list.flatMap(function (d) {
478
- if (d._id !== _id) return [d];
479
- return updateEntitlementQuantity(d, _objectSpread(_objectSpread({}, _item), {}, {
468
+ _list = _list.map(function (d) {
469
+ return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
480
470
  new: 0
481
- })).map(function (item) {
482
- return _objectSpread(_objectSpread({}, item), {}, {
483
- _serviceKey: genServiceKey(item),
484
- _holderKey: genHolderKey(item)
485
- });
486
- });
471
+ }) : d;
487
472
  });
488
473
  } else {
489
474
  // fallback:合并同预约重复项,沿用 list 内 _id 避免再次失配
@@ -491,15 +476,10 @@ var Info = function Info(_, ref) {
491
476
  _list = _list.reduce(function (acc, d) {
492
477
  if (isSameBookingServiceItem(d, _item)) {
493
478
  if (!replaced) {
494
- acc.push.apply(acc, _toConsumableArray(updateEntitlementQuantity(d, _objectSpread(_objectSpread({}, _item), {}, {
479
+ acc.push(_objectSpread(_objectSpread({}, _item), {}, {
495
480
  new: 0,
496
481
  _id: d._id
497
- })).map(function (item) {
498
- return _objectSpread(_objectSpread({}, item), {}, {
499
- _serviceKey: genServiceKey(item),
500
- _holderKey: genHolderKey(item)
501
- });
502
- })));
482
+ }));
503
483
  replaced = true;
504
484
  }
505
485
  } else {
@@ -972,7 +952,7 @@ var Info = function Info(_, ref) {
972
952
  precision: 2,
973
953
  prefix: state.amountSymbol,
974
954
  onChange: handleTotalChange,
975
- disabled: state.channelDisabledEdit || isEntitlementPrice,
955
+ disabled: state.channelDisabledEdit,
976
956
  originalValue: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || 0,
977
957
  placeholder: ((_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total) || '0',
978
958
  size: "large",
@@ -983,7 +963,7 @@ var Info = function Info(_, ref) {
983
963
  selectType: 'dark'
984
964
  }
985
965
  })));
986
- }, [useTotal, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._extend) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.origin_total, state.amountSymbol, state.channelDisabledEdit, isEntitlementPrice]);
966
+ }, [useTotal, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._extend) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.origin_total, state.amountSymbol, state.channelDisabledEdit]);
987
967
  var reason = useMemo(function () {
988
968
  return isReason ? /*#__PURE__*/React.createElement(Col, {
989
969
  span: 24
@@ -7,9 +7,6 @@
7
7
 
8
8
  判断是否需要进入编辑服务页
9
9
  */
10
- export declare const hasEntitlementDiscount: (item: any) => boolean;
11
- /** 已提交部分保留原扣次;增加的数量作为新商品交给 OS 重新计算。 */
12
- export declare const updateEntitlementQuantity: (previous: any, next: any) => any[];
13
10
  export declare const getAutoAllocationStorage: (id: string | number) => any;
14
11
  export declare const setAutoAllocationStorage: (data: {
15
12
  [key: string]: boolean;
@@ -1,15 +1,15 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
4
  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); }
10
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
7
  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; }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ 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); }
13
13
  /**
14
14
  1. 在进入编辑服务前
15
15
 
@@ -20,125 +20,16 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
20
20
  判断是否需要进入编辑服务页
21
21
  */
22
22
 
23
- import { getUniqueId, isArr, isBoolean } from "@pisell/utils";
23
+ import { isArr } from "@pisell/utils";
24
+ import { isBoolean } from "@pisell/utils";
24
25
  import Decimal from "decimal.js";
25
- import { cloneDeep } from 'lodash';
26
26
  import { getBundleDiscountList } from "../../../components/footer/utils";
27
- import { getMainPrice, getProductTotalPrice } from "../../../utils";
28
- var isEntitlementDiscount = function isEntitlementDiscount(discount) {
29
- return ((discount === null || discount === void 0 ? void 0 : discount.tag) || (discount === null || discount === void 0 ? void 0 : discount.type)) === 'entitlement_pass';
30
- };
31
- var getServiceDiscounts = function getServiceDiscounts(item) {
32
- var _item$_extend;
33
- return [].concat(_toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []), _toConsumableArray(((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle) || []).flatMap(function (bundle) {
34
- return bundle.discount_list || [];
35
- })));
36
- };
37
- export var hasEntitlementDiscount = function hasEntitlementDiscount(item) {
38
- return getServiceDiscounts(item).some(isEntitlementDiscount);
39
- };
40
-
41
- /** 已提交部分保留原扣次;增加的数量作为新商品交给 OS 重新计算。 */
42
- export var updateEntitlementQuantity = function updateEntitlementQuantity(previous, next) {
43
- var _previous$_extend, _previous$_extend2, _previous$_extend3;
44
- var discounts = getServiceDiscounts(previous);
45
- var persisted = [previous === null || previous === void 0 ? void 0 : previous.booking_id, previous === null || previous === void 0 ? void 0 : previous.order_detail_id, previous === null || previous === void 0 || (_previous$_extend = previous._extend) === null || _previous$_extend === void 0 ? void 0 : _previous$_extend.order_detail_id].some(function (value) {
46
- return Number(value) > 0;
47
- }) || discounts.some(function (discount) {
48
- return isEntitlementDiscount(discount) && discount.id;
49
- });
50
- var previousQuantity = Number((previous === null || previous === void 0 || (_previous$_extend2 = previous._extend) === null || _previous$_extend2 === void 0 ? void 0 : _previous$_extend2.quantity) || 1);
51
- var nextQuantity = Number(next._extend.quantity || 1);
52
- if (!persisted || !hasEntitlementDiscount(previous) || nextQuantity === previousQuantity) {
53
- return [next];
54
- }
55
- if (nextQuantity < previousQuantity) {
56
- // 商品弹窗会重算原价;历史行减量只调整数量,沿用已提交的价格和商品配置。
57
- return [_objectSpread(_objectSpread({}, previous), {}, {
58
- _extend: _objectSpread(_objectSpread(_objectSpread({}, previous._extend), {}, {
59
- quantity: nextQuantity
60
- }, Array.isArray(next._extend.holder_id) ? {
61
- holder_id: next._extend.holder_id.slice(0, nextQuantity)
62
- } : {}), {}, {
63
- other: _objectSpread(_objectSpread({}, previous._extend.other), {}, {
64
- quantity: nextQuantity
65
- })
66
- }),
67
- discount_list: (previous.discount_list || []).map(function (discount) {
68
- var _discount$metadata, _discount$metadata$nu, _discount$metadata2;
69
- // 套餐扣次是每份主商品中的子商品次数,不能按主商品数量裁剪。
70
- if (!isEntitlementDiscount(discount) || (_discount$metadata = discount.metadata) !== null && _discount$metadata !== void 0 && _discount$metadata.custom_product_bundle_map_id) return discount;
71
- var num = Math.min(Number((_discount$metadata$nu = (_discount$metadata2 = discount.metadata) === null || _discount$metadata2 === void 0 ? void 0 : _discount$metadata2.num) !== null && _discount$metadata$nu !== void 0 ? _discount$metadata$nu : previousQuantity), nextQuantity);
72
- return _objectSpread(_objectSpread({}, discount), {}, {
73
- _num: num,
74
- metadata: _objectSpread(_objectSpread({}, discount.metadata), {}, {
75
- num: num
76
- })
77
- });
78
- })
79
- })];
80
- }
81
- var appended = cloneDeep(next);
82
- var uid = getUniqueId();
83
- appended._id = uid;
84
- appended.booking_id = 0;
85
- appended.order_detail_id = 0;
86
- appended.new = 0;
87
- appended.discount_list = [];
88
- appended.discount_amount = 0;
89
- appended.metadata = _objectSpread(_objectSpread({}, appended.metadata), {}, {
90
- unique_identification_number: uid
91
- });
92
- delete appended.metadata.entitlement_source_identity;
93
- delete appended.metadata.entitlement_source_product_uid;
94
- if (appended._origin) delete appended._origin.booking_id;
95
- var extend = appended._extend;
96
- extend.order_detail_id = 0;
97
- extend.unique_identification_number = uid;
98
- extend.quantity = nextQuantity - previousQuantity;
99
- if (Array.isArray(extend.holder_id)) {
100
- var holders = extend.holder_id.slice(previousQuantity, nextQuantity);
101
- extend.holder_id = holders.length ? holders : undefined;
102
- }
103
- extend.other = _objectSpread(_objectSpread({}, extend.other), {}, {
104
- quantity: extend.quantity
105
- });
106
- extend.other.bundle = (extend.other.bundle || []).map(function (bundle) {
107
- var _ref, _ref2, _bundle$original_pric, _bundle$discount_list;
108
- var price = (_ref = (_ref2 = (_bundle$original_pric = bundle.original_price) !== null && _bundle$original_pric !== void 0 ? _bundle$original_pric : (_bundle$discount_list = bundle.discount_list) === null || _bundle$discount_list === void 0 || (_bundle$discount_list = _bundle$discount_list[0]) === null || _bundle$discount_list === void 0 || (_bundle$discount_list = _bundle$discount_list.discount) === null || _bundle$discount_list === void 0 ? void 0 : _bundle$discount_list.original_amount) !== null && _ref2 !== void 0 ? _ref2 : bundle.product_price) !== null && _ref !== void 0 ? _ref : bundle.price;
109
- var bundleUid = getUniqueId();
110
- var metadata = _objectSpread(_objectSpread({}, bundle.metadata), {}, {
111
- custom_product_bundle_map_id: bundleUid,
112
- unique_identification_number: bundleUid
113
- });
114
- delete metadata.entitlement_source_identity;
115
- return _objectSpread(_objectSpread({}, bundle), {}, {
116
- _id: bundleUid,
117
- price: price,
118
- bundle_selling_price: price,
119
- discount_list: [],
120
- metadata: metadata
121
- });
122
- });
123
- var mainDiscount = (next.discount_list || []).find(function (discount) {
124
- var _discount$metadata3, _discount$discount;
125
- return !((_discount$metadata3 = discount.metadata) !== null && _discount$metadata3 !== void 0 && _discount$metadata3.custom_product_bundle_map_id) && ((_discount$discount = discount.discount) === null || _discount$discount === void 0 ? void 0 : _discount$discount.original_amount) != null;
126
- });
127
- if (mainDiscount && (previous === null || previous === void 0 || (_previous$_extend3 = previous._extend) === null || _previous$_extend3 === void 0 || (_previous$_extend3 = _previous$_extend3.other) === null || _previous$_extend3 === void 0 ? void 0 : _previous$_extend3.product_variant_id) === extend.other.product_variant_id) {
128
- extend.price = Number(mainDiscount.discount.original_amount);
129
- if (extend.other.product_variant_id) extend.other.price = extend.price;
130
- }
131
- extend.main_product_selling_price = getMainPrice(appended);
132
- extend.total = getProductTotalPrice(appended);
133
- extend.origin_total = extend.total;
134
- return [previous, appended];
135
- };
136
27
  var isNewService = function isNewService(service) {
137
28
  return !service.new && service._extend.endDate;
138
29
  };
139
- var init = function init(_ref3) {
140
- var cacheItem = _ref3.cacheItem,
141
- state = _ref3.state;
30
+ var init = function init(_ref) {
31
+ var cacheItem = _ref.cacheItem,
32
+ state = _ref.state;
142
33
  var _cacheItem = _objectSpread({}, cacheItem);
143
34
  var renderData = {};
144
35
  var _extend = {};
@@ -183,11 +74,11 @@ export var setAutoAllocationStorage = function setAutoAllocationStorage(data) {
183
74
  * @param newTotal - 折扣后的新总价
184
75
  * @param origin_total - 原始总价
185
76
  */
186
- export var setProductPrice = function setProductPrice(cacheItem, _ref4) {
187
- var _cacheItem$_extend$ot, _cacheItem$_extend$ot2, _cacheItem$_extend$ot4, _cacheItem$_extend$ot5;
188
- var newTotal = _ref4.newTotal,
189
- origin_total = _ref4.origin_total;
190
- if (hasEntitlementDiscount(cacheItem) || ((cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.discount_list) || []).some(function (item) {
77
+ export var setProductPrice = function setProductPrice(cacheItem, _ref2) {
78
+ var _cacheItem$discount_l, _cacheItem$_extend$ot, _cacheItem$_extend$ot2, _cacheItem$_extend$ot4, _cacheItem$_extend$ot5;
79
+ var newTotal = _ref2.newTotal,
80
+ origin_total = _ref2.origin_total;
81
+ if (cacheItem !== null && cacheItem !== void 0 && (_cacheItem$discount_l = cacheItem.discount_list) !== null && _cacheItem$discount_l !== void 0 && _cacheItem$discount_l.length && ((cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.discount_list) || []).some(function (item) {
191
82
  return ['good_pass', 'discount_card', 'product_discount_card'].includes(item.type);
192
83
  })) {
193
84
  return cacheItem;
@@ -206,12 +97,12 @@ export var setProductPrice = function setProductPrice(cacheItem, _ref4) {
206
97
  if ((_cacheItem$_extend$ot = cacheItem._extend.other) !== null && _cacheItem$_extend$ot !== void 0 && _cacheItem$_extend$ot.bundle && isArr((_cacheItem$_extend$ot2 = cacheItem._extend.other) === null || _cacheItem$_extend$ot2 === void 0 ? void 0 : _cacheItem$_extend$ot2.bundle)) {
207
98
  var _cacheItem$_extend$ot3;
208
99
  (_cacheItem$_extend$ot3 = cacheItem._extend.other) === null || _cacheItem$_extend$ot3 === void 0 || (_cacheItem$_extend$ot3 = _cacheItem$_extend$ot3.bundle) === null || _cacheItem$_extend$ot3 === void 0 || _cacheItem$_extend$ot3.forEach(function (bundle) {
209
- var _ref5, _bundle$num;
100
+ var _ref3, _bundle$num;
210
101
  // 计算新价格,直接截取两位小数(不四舍五入)
211
102
  var newPrice = new Decimal(bundle.original_price || bundle.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
212
103
 
213
104
  // 获取数量,优先取 num,再取 quantity,默认为 1
214
- var quantity = (_ref5 = (_bundle$num = bundle.num) !== null && _bundle$num !== void 0 ? _bundle$num : bundle.quantity) !== null && _ref5 !== void 0 ? _ref5 : 1;
105
+ var quantity = (_ref3 = (_bundle$num = bundle.num) !== null && _bundle$num !== void 0 ? _bundle$num : bundle.quantity) !== null && _ref3 !== void 0 ? _ref3 : 1;
215
106
 
216
107
  // 累加到子商品总价
217
108
  subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
@@ -225,12 +116,12 @@ export var setProductPrice = function setProductPrice(cacheItem, _ref4) {
225
116
  if ((_cacheItem$_extend$ot4 = cacheItem._extend.other) !== null && _cacheItem$_extend$ot4 !== void 0 && _cacheItem$_extend$ot4.option && isArr((_cacheItem$_extend$ot5 = cacheItem._extend.other) === null || _cacheItem$_extend$ot5 === void 0 ? void 0 : _cacheItem$_extend$ot5.option)) {
226
117
  var _cacheItem$_extend$ot6;
227
118
  (_cacheItem$_extend$ot6 = cacheItem._extend.other) === null || _cacheItem$_extend$ot6 === void 0 || (_cacheItem$_extend$ot6 = _cacheItem$_extend$ot6.option) === null || _cacheItem$_extend$ot6 === void 0 || _cacheItem$_extend$ot6.forEach(function (option) {
228
- var _ref6, _option$num;
119
+ var _ref4, _option$num;
229
120
  // 计算新价格,直接截取两位小数(不四舍五入)
230
121
  var newPrice = new Decimal(option.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
231
122
 
232
123
  // 获取数量,优先取 num,再取 quantity,默认为 1
233
- var quantity = (_ref6 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref6 !== void 0 ? _ref6 : 1;
124
+ var quantity = (_ref4 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref4 !== void 0 ? _ref4 : 1;
234
125
 
235
126
  // 累加到子商品总价
236
127
  subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));