@pisell/private-materials 6.2.24 → 6.2.26

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 (433) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +9 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/businessModel/SalesModel/index.d.ts +0 -1
  12. package/es/components/Sales/Cart/index.js +1 -0
  13. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  15. package/es/components/booking/addons/index.js +4 -1
  16. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  17. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  18. package/es/components/booking/components/actionButtons/index.js +395 -0
  19. package/es/components/booking/components/actionButtons/index.less +148 -0
  20. package/es/components/booking/components/browserSelect/index.js +1 -1
  21. package/es/components/booking/components/clearCartModal/index.js +50 -0
  22. package/es/components/booking/components/clearCartModal/index.less +109 -0
  23. package/es/components/booking/components/customSelect/index.js +1 -0
  24. package/es/components/booking/components/customiseItemModal/index.js +294 -0
  25. package/es/components/booking/components/customiseItemModal/index.less +606 -0
  26. package/es/components/booking/components/footer/amount.d.ts +1 -0
  27. package/es/components/booking/components/footer/amount.js +15 -3
  28. package/es/components/booking/components/footer/index.js +106 -39
  29. package/es/components/booking/components/footer/utils.js +52 -24
  30. package/es/components/booking/components/tabPane/index.js +86 -5
  31. package/es/components/booking/components/tabPane/index.less +75 -1
  32. package/es/components/booking/components/voucher/index.js +19 -8
  33. package/es/components/booking/components/voucher/index.less +1 -1
  34. package/es/components/booking/dashboard/index.js +10 -3
  35. package/es/components/booking/forms/model.js +5 -5
  36. package/es/components/booking/hooks/useClearCart.js +11 -8
  37. package/es/components/booking/hooks/useQuotation.js +17 -7
  38. package/es/components/booking/info/client/index.js +3 -2
  39. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  40. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  41. package/es/components/booking/info/hooks/useInfoHolder.js +15 -7
  42. package/es/components/booking/info/index.less +18 -2
  43. package/es/components/booking/info/main.js +14 -15
  44. package/es/components/booking/info/service/Lists.js +41 -28
  45. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  46. package/es/components/booking/info/service/editService/constants.d.ts +1 -0
  47. package/es/components/booking/info/service/editService/constants.js +3 -0
  48. package/es/components/booking/info/service/editService/index.js +15 -10
  49. package/es/components/booking/info/service/like/index.js +1 -1
  50. package/es/components/booking/info/service/serviceItem/index.js +2 -2
  51. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  52. package/es/components/booking/info/service2/utils.d.ts +4 -0
  53. package/es/components/booking/info/service2/utils.js +32 -23
  54. package/es/components/booking/info2/cartClientCard/index.js +343 -0
  55. package/es/components/booking/info2/cartClientCard/index.less +6 -0
  56. package/es/components/booking/info2/cartClientCard/locales.js +26 -0
  57. package/es/components/booking/info2/cartClientCard/types.js +1 -0
  58. package/es/components/booking/info2/cartClientCard/utils.js +7 -0
  59. package/es/components/booking/info2/index.js +41 -18
  60. package/es/components/booking/info2/service/addService/utils.js +6 -3
  61. package/es/components/booking/info2/service/addTimeModal/index.js +5 -1
  62. package/es/components/booking/info2/service/editNormalService/index.js +67 -0
  63. package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
  64. package/es/components/booking/info2/service/editService/index.js +267 -171
  65. package/es/components/booking/info2/service/index.js +27 -18
  66. package/es/components/booking/info2/service/serviceItem/index.js +2 -2
  67. package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
  68. package/es/components/booking/info2/utilsByBooking.js +26 -3
  69. package/es/components/booking/locales.js +99 -3
  70. package/es/components/booking/materiels/duration/index.js +9 -2
  71. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  72. package/es/components/booking/materiels/startTime/index.js +1 -1
  73. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  74. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  75. package/es/components/booking/notes/addNote/index.js +52 -32
  76. package/es/components/booking/notes/addNote/index.less +53 -0
  77. package/es/components/booking/notes/model.js +5 -5
  78. package/es/components/booking/payments/model.js +5 -5
  79. package/es/components/eftposPay/amount.d.ts +1 -1
  80. package/es/components/eftposPay/device.d.ts +1 -1
  81. package/es/components/eftposPay/hooks.d.ts +2 -2
  82. package/es/components/eftposPay/store/index.d.ts +3 -3
  83. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  84. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  85. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  86. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  87. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  88. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  89. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  90. package/es/components/listComponent/index.js +5 -5
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  92. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  93. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  94. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  95. package/es/components/productExtension/card/index.js +3 -3
  96. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  97. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  98. package/es/components/productExtension/fields/Forms/index.js +12 -12
  99. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  100. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  101. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  102. package/es/components/productExtension/server.js +2 -2
  103. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  104. package/es/components/schedules/calendar/index.js +4 -4
  105. package/es/components/schedules/calendar/serve.js +2 -2
  106. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  107. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  108. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  109. package/es/components/schedules/components/ResourceList/index.js +1 -1
  110. package/es/components/schedules/components/Search/index.js +5 -5
  111. package/es/components/schedules/model.js +5 -5
  112. package/es/components/schedules/openHours/index.js +1 -1
  113. package/es/components/schedules/openHours/serve.js +2 -2
  114. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  115. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  116. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  117. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  118. package/es/components/schedules/products/serve.js +2 -2
  119. package/es/components/schedules/products/utils.js +5 -5
  120. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  121. package/es/components/schedules/resources/detail/index.js +10 -10
  122. package/es/components/schedules/resources/list/index.js +2 -2
  123. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  124. package/es/components/schedules/resources/serve.js +2 -2
  125. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  126. package/es/components/schedules/utils.js +4 -4
  127. package/es/components/selectModal/index.js +2 -2
  128. package/es/components/shoppingCart/components/Cart/Product.js +62 -41
  129. package/es/components/shoppingCart/components/Cart/index.js +21 -18
  130. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  131. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  132. package/es/components/subTotal/index.less +1 -1
  133. package/es/components/ticketBooking/components/addServiceVariant/addService.js +309 -351
  134. package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
  135. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
  136. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
  137. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
  138. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
  139. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
  140. package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
  141. package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
  142. package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
  143. package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
  144. package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
  145. package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
  146. package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
  147. package/es/components/ticketBooking/components/ticketBooking/index.js +208 -33
  148. package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
  149. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  150. package/es/components/ticketBooking/components/timeBar/index.js +79 -68
  151. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
  152. package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
  153. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
  154. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
  155. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
  156. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
  157. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
  158. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
  159. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
  160. package/es/components/ticketBooking/index.js +21 -3
  161. package/es/components/ticketBooking/locales.js +6 -3
  162. package/es/components/ticketBooking/serve.js +11 -11
  163. package/es/components/ticketBooking/utils/index.d.ts +39 -2
  164. package/es/components/ticketBooking/utils/index.js +104 -11
  165. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  166. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  167. package/es/hooks/useComponents.js +1 -1
  168. package/es/hooks/useToast.js +9 -0
  169. package/es/hooks/useTranslationOriginal.js +10 -0
  170. package/es/index.js +5 -1
  171. package/es/plus/clientCard/index.js +452 -0
  172. package/es/plus/clientCard/index.less +539 -0
  173. package/es/plus/clientCard/line/index.js +157 -0
  174. package/es/plus/clientCard/line/index.less +142 -0
  175. package/es/plus/clientCard/locales.js +17 -0
  176. package/es/plus/clientCard/types.js +1 -0
  177. package/es/plus/clientCard/utils.js +59 -0
  178. package/es/plus/clientName/index.js +18 -0
  179. package/es/plus/clientName/index.less +10 -0
  180. package/es/plus/clientName/type.js +1 -0
  181. package/es/plus/clientName/utils.js +18 -0
  182. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  183. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  184. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  185. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  186. package/es/plus/clinetSearch/Add/index.js +212 -0
  187. package/es/plus/clinetSearch/Add/index.less +30 -0
  188. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  189. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  190. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  191. package/es/plus/clinetSearch/index.js +214 -0
  192. package/es/plus/clinetSearch/index.less +91 -0
  193. package/es/plus/clinetSearch/locales.js +101 -0
  194. package/es/plus/clinetSearch/serve.js +31 -0
  195. package/es/plus/clinetSearch/types.js +1 -0
  196. package/es/plus/noteModal/AddTempModal.js +64 -0
  197. package/es/plus/noteModal/index.js +199 -0
  198. package/es/plus/noteModal/index.less +168 -0
  199. package/es/plus/noteModal/locales.js +32 -0
  200. package/es/plus/noteModal/types.js +1 -0
  201. package/es/pro/comprehensiveSearch/camera.svg +4 -0
  202. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
  203. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
  204. package/es/pro/comprehensiveSearch/index.js +342 -0
  205. package/es/pro/comprehensiveSearch/index.less +323 -0
  206. package/es/pro/comprehensiveSearch/locales.js +17 -0
  207. package/es/pro/comprehensiveSearch/types.js +1 -0
  208. package/es/pro/numberKeyboard/index.js +155 -0
  209. package/es/pro/numberKeyboard/index.less +25 -0
  210. package/es/pro/numberKeyboard/locales.js +11 -0
  211. package/es/pro/pisellNumberSelector/example.js +68 -0
  212. package/es/pro/pisellNumberSelector/index.js +231 -0
  213. package/es/pro/pisellNumberSelector/index.less +193 -0
  214. package/es/pro/pisellPhoneKeyboard/index.js +211 -0
  215. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  216. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  217. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
  218. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
  219. package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
  220. package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
  221. package/es/pro/pisellPriceRadio/index.js +113 -0
  222. package/es/pro/pisellPriceRadio/index.less +158 -0
  223. package/es/pro/skuDetailModal/index.js +352 -0
  224. package/es/pro/skuDetailModal/index.less +236 -0
  225. package/es/pro/skuDetailModal/locales.js +47 -0
  226. package/es/pro/skuDetailModal/types.js +1 -0
  227. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  228. package/lib/components/Sales/Cart/index.js +1 -0
  229. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  230. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  231. package/lib/components/booking/addons/index.js +4 -1
  232. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  233. package/lib/components/booking/components/actionButtons/index.js +325 -0
  234. package/lib/components/booking/components/actionButtons/index.less +148 -0
  235. package/lib/components/booking/components/clearCartModal/index.js +80 -0
  236. package/lib/components/booking/components/clearCartModal/index.less +109 -0
  237. package/lib/components/booking/components/customSelect/index.js +1 -0
  238. package/lib/components/booking/components/customiseItemModal/index.js +279 -0
  239. package/lib/components/booking/components/customiseItemModal/index.less +606 -0
  240. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  241. package/lib/components/booking/components/footer/amount.js +5 -3
  242. package/lib/components/booking/components/footer/index.js +93 -23
  243. package/lib/components/booking/components/footer/utils.js +38 -13
  244. package/lib/components/booking/components/tabPane/index.js +78 -4
  245. package/lib/components/booking/components/tabPane/index.less +75 -1
  246. package/lib/components/booking/components/voucher/index.js +18 -7
  247. package/lib/components/booking/components/voucher/index.less +1 -1
  248. package/lib/components/booking/dashboard/index.js +7 -2
  249. package/lib/components/booking/hooks/useClearCart.js +16 -13
  250. package/lib/components/booking/hooks/useQuotation.js +3 -1
  251. package/lib/components/booking/info/client/index.js +5 -4
  252. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  253. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  254. package/lib/components/booking/info/hooks/useInfoHolder.js +16 -9
  255. package/lib/components/booking/info/index.less +18 -2
  256. package/lib/components/booking/info/main.js +12 -5
  257. package/lib/components/booking/info/service/Lists.js +41 -25
  258. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  259. package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
  260. package/lib/components/booking/info/service/editService/constants.js +31 -0
  261. package/lib/components/booking/info/service/editService/index.js +7 -1
  262. package/lib/components/booking/info/service/serviceItem/index.js +2 -2
  263. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  264. package/lib/components/booking/info/service2/utils.d.ts +4 -0
  265. package/lib/components/booking/info/service2/utils.js +31 -19
  266. package/lib/components/booking/info2/cartClientCard/index.js +298 -0
  267. package/lib/components/booking/info2/cartClientCard/index.less +6 -0
  268. package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
  269. package/lib/components/booking/info2/cartClientCard/types.js +17 -0
  270. package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
  271. package/lib/components/booking/info2/index.js +30 -9
  272. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  273. package/lib/components/booking/info2/service/addTimeModal/index.js +4 -0
  274. package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
  275. package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
  276. package/lib/components/booking/info2/service/editService/index.js +139 -74
  277. package/lib/components/booking/info2/service/index.js +16 -12
  278. package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
  279. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
  280. package/lib/components/booking/info2/utilsByBooking.js +23 -4
  281. package/lib/components/booking/locales.js +93 -3
  282. package/lib/components/booking/materiels/duration/index.js +7 -2
  283. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  284. package/lib/components/booking/notes/addNote/index.js +41 -23
  285. package/lib/components/booking/notes/addNote/index.less +53 -0
  286. package/lib/components/eftposPay/amount.d.ts +1 -1
  287. package/lib/components/eftposPay/device.d.ts +1 -1
  288. package/lib/components/eftposPay/hooks.d.ts +2 -2
  289. package/lib/components/eftposPay/store/index.d.ts +3 -3
  290. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  291. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  292. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  293. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  294. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  295. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  296. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  297. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  298. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  299. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  300. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  301. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  302. package/lib/components/schedules/utils.js +1 -1
  303. package/lib/components/shoppingCart/components/Cart/Product.js +42 -21
  304. package/lib/components/shoppingCart/components/Cart/index.js +18 -15
  305. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  306. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  307. package/lib/components/subTotal/index.less +1 -1
  308. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +176 -248
  309. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
  310. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
  311. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
  312. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
  313. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
  314. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
  315. package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
  316. package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
  317. package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
  318. package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
  319. package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
  320. package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
  321. package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
  322. package/lib/components/ticketBooking/components/ticketBooking/index.js +228 -80
  323. package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
  324. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  325. package/lib/components/ticketBooking/components/timeBar/index.js +100 -86
  326. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
  327. package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
  328. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
  329. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
  330. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
  331. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
  332. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
  333. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
  334. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
  335. package/lib/components/ticketBooking/index.js +31 -4
  336. package/lib/components/ticketBooking/locales.js +6 -3
  337. package/lib/components/ticketBooking/serve.js +11 -11
  338. package/lib/components/ticketBooking/utils/index.d.ts +39 -2
  339. package/lib/components/ticketBooking/utils/index.js +71 -10
  340. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  341. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  342. package/lib/hooks/useToast.js +42 -0
  343. package/lib/hooks/useTranslationOriginal.js +42 -0
  344. package/lib/index.js +12 -0
  345. package/lib/plus/clientCard/index.js +442 -0
  346. package/lib/plus/clientCard/index.less +539 -0
  347. package/lib/plus/clientCard/line/index.js +153 -0
  348. package/lib/plus/clientCard/line/index.less +142 -0
  349. package/lib/plus/clientCard/locales.js +41 -0
  350. package/lib/plus/clientCard/types.js +17 -0
  351. package/lib/plus/clientCard/utils.js +75 -0
  352. package/lib/plus/clientName/index.js +53 -0
  353. package/lib/plus/clientName/index.less +10 -0
  354. package/lib/plus/clientName/type.js +17 -0
  355. package/lib/plus/clientName/utils.js +43 -0
  356. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  357. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  358. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  359. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  360. package/lib/plus/clinetSearch/Add/index.js +243 -0
  361. package/lib/plus/clinetSearch/Add/index.less +30 -0
  362. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  363. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  364. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  365. package/lib/plus/clinetSearch/index.js +205 -0
  366. package/lib/plus/clinetSearch/index.less +91 -0
  367. package/lib/plus/clinetSearch/locales.js +125 -0
  368. package/lib/plus/clinetSearch/serve.js +33 -0
  369. package/lib/plus/clinetSearch/types.js +17 -0
  370. package/lib/plus/noteModal/AddTempModal.js +95 -0
  371. package/lib/plus/noteModal/index.js +199 -0
  372. package/lib/plus/noteModal/index.less +168 -0
  373. package/lib/plus/noteModal/locales.js +56 -0
  374. package/lib/plus/noteModal/types.js +17 -0
  375. package/lib/pro/comprehensiveSearch/camera.svg +4 -0
  376. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
  377. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
  378. package/lib/pro/comprehensiveSearch/index.js +259 -0
  379. package/lib/pro/comprehensiveSearch/index.less +323 -0
  380. package/lib/pro/comprehensiveSearch/locales.js +41 -0
  381. package/lib/pro/comprehensiveSearch/types.js +17 -0
  382. package/lib/pro/numberKeyboard/index.js +182 -0
  383. package/lib/pro/numberKeyboard/index.less +25 -0
  384. package/lib/pro/numberKeyboard/locales.js +35 -0
  385. package/lib/pro/pisellNumberSelector/example.js +93 -0
  386. package/lib/pro/pisellNumberSelector/index.js +260 -0
  387. package/lib/pro/pisellNumberSelector/index.less +193 -0
  388. package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
  389. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  390. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  391. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
  392. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
  393. package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
  394. package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
  395. package/lib/pro/pisellPriceRadio/index.js +130 -0
  396. package/lib/pro/pisellPriceRadio/index.less +158 -0
  397. package/lib/pro/skuDetailModal/index.js +311 -0
  398. package/lib/pro/skuDetailModal/index.less +236 -0
  399. package/lib/pro/skuDetailModal/locales.js +71 -0
  400. package/lib/pro/skuDetailModal/types.js +17 -0
  401. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  402. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  403. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  404. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  405. package/lowcode/client-card/meta.ts +337 -0
  406. package/lowcode/comprehensive-search/meta.ts +261 -0
  407. package/package.json +26 -26
  408. package/es/components/Sales/Cart/index.d.ts +0 -53
  409. package/es/components/booking/addons/index.d.ts +0 -17
  410. package/es/components/booking/components/tabPane/index.d.ts +0 -4
  411. package/es/components/booking/components/voucher/index.d.ts +0 -3
  412. package/es/components/booking/dashboard/index.d.ts +0 -20
  413. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -3
  414. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -3
  415. package/es/components/booking/locales.d.ts +0 -828
  416. package/es/components/booking/notes/addNote/index.d.ts +0 -3
  417. package/es/components/shoppingCart/type.d.ts +0 -48
  418. package/es/components/ticketBooking/locales.d.ts +0 -174
  419. package/es/components/ticketBooking/serve.d.ts +0 -287
  420. package/es/index.d.ts +0 -47
  421. package/lib/components/Sales/Cart/index.d.ts +0 -53
  422. package/lib/components/booking/addons/index.d.ts +0 -17
  423. package/lib/components/booking/components/tabPane/index.d.ts +0 -4
  424. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  425. package/lib/components/booking/dashboard/index.d.ts +0 -20
  426. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -3
  427. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -3
  428. package/lib/components/booking/locales.d.ts +0 -828
  429. package/lib/components/booking/notes/addNote/index.d.ts +0 -3
  430. package/lib/components/shoppingCart/type.d.ts +0 -48
  431. package/lib/components/ticketBooking/locales.d.ts +0 -174
  432. package/lib/components/ticketBooking/serve.d.ts +0 -287
  433. package/lib/index.d.ts +0 -47
@@ -48,17 +48,18 @@ var import_amount = require("./amount");
48
48
  var import_index = require("./index.less");
49
49
  var import_serve2 = require("./serve");
50
50
  var import_utils3 = require("./utils");
51
- var import_voucher = __toESM(require("../voucher"));
51
+ var import_noteModal = __toESM(require("../../../../plus/noteModal"));
52
52
  var import__ = require("../../../../index");
53
53
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
54
54
  var import_utils4 = require("@pisell/utils");
55
55
  var import_dayjs = __toESM(require("dayjs"));
56
56
  var Footer = (props) => {
57
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
57
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
58
58
  const { state, buttons, dispatch, source } = props;
59
59
  const [showDetail, setShowDetail] = (0, import_react.useState)(false);
60
60
  const [loading, setLoading] = (0, import_react.useState)(false);
61
61
  const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
62
+ const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
62
63
  const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
63
64
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
64
65
  const appointmentProductRef = (0, import_react.useRef)(null);
@@ -193,10 +194,10 @@ var Footer = (props) => {
193
194
  }
194
195
  return false;
195
196
  }, [state, params]);
196
- const hasGoodPassApp = !!((_h = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _h.call(businessUtils, "goodpass"));
197
- const hasDiscountCardApp = !!((_i = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _i.call(businessUtils, "discountcard"));
198
- console.log("has goodpass app:", hasGoodPassApp);
199
- const goCheckout = async (order_id) => {
197
+ const isDisabledCheckOutForNegativeOrder = (0, import_react.useMemo)(() => {
198
+ return total.expectAmount < 0 && state.isBookingTicket2;
199
+ }, [total, state.isBookingTicket2]);
200
+ const goCheckout = async (order_id, isNewOrder) => {
200
201
  var _a2, _b2;
201
202
  if (!order_id) return;
202
203
  if (isTerminal == null ? void 0 : isTerminal()) {
@@ -205,7 +206,9 @@ var Footer = (props) => {
205
206
  key: "booking_checkout",
206
207
  data: {
207
208
  order_id,
208
- callbackType: "pisell2"
209
+ callbackType: "pisell2",
210
+ // 是新创建订单传递newOrder terminal内会执行弃单逻辑 编辑订单时不走弃单逻辑
211
+ newOrder: isNewOrder
209
212
  }
210
213
  });
211
214
  }
@@ -220,6 +223,7 @@ var Footer = (props) => {
220
223
  });
221
224
  };
222
225
  const handleCheckout = async () => {
226
+ const isNewOrder = !state.bookingId;
223
227
  if (isEdit) {
224
228
  if ((0, import_utils2.isDayBooking)(state)) {
225
229
  const isHasDayProducts = handleDaySubmit();
@@ -229,10 +233,10 @@ var Footer = (props) => {
229
233
  type: "checkout",
230
234
  messageShow: !(isTerminal == null ? void 0 : isTerminal())
231
235
  });
232
- goCheckout((res == null ? void 0 : res.order_id) || state.bookingId);
236
+ goCheckout((res == null ? void 0 : res.order_id) || state.bookingId, isNewOrder);
233
237
  return;
234
238
  }
235
- return goCheckout(state.bookingId);
239
+ return goCheckout(state.bookingId, isNewOrder);
236
240
  };
237
241
  const handleSaveAddons = async () => {
238
242
  try {
@@ -292,7 +296,7 @@ var Footer = (props) => {
292
296
  }
293
297
  try {
294
298
  let callbackData = null;
295
- let values = (0, import_utils3.formatValues)({ ...state, ...saveOtherValue });
299
+ let values = (0, import_utils3.formatValues)({ ...state, ...saveOtherValue }, context);
296
300
  const api = state.bookingId ? editApi : createApi;
297
301
  (0, import_utils4.sendWarningLog)({
298
302
  title: "saveBooking",
@@ -396,7 +400,7 @@ var Footer = (props) => {
396
400
  onClick: () => {
397
401
  handleCheckout();
398
402
  },
399
- disabled: isDisabled
403
+ disabled: isDisabled || isDisabledCheckOutForNegativeOrder
400
404
  },
401
405
  import_utils.locales.getText("pisell2.text.checkout")
402
406
  )
@@ -524,6 +528,32 @@ var Footer = (props) => {
524
528
  )
525
529
  );
526
530
  }, [loading, isDisabled, isEdit, infoEdit, addonsEdit, state]);
531
+ const handleNote = () => {
532
+ setNoteModalOpen(true);
533
+ };
534
+ const handleNoteConfirm = (noteValue) => {
535
+ dispatch({
536
+ type: "setNotes",
537
+ payload: {
538
+ orderNote: noteValue,
539
+ edit: true
540
+ }
541
+ });
542
+ setNoteModalOpen(false);
543
+ };
544
+ const handleNoteDelete = () => {
545
+ dispatch({
546
+ type: "setNotes",
547
+ payload: {
548
+ orderNote: "",
549
+ edit: true
550
+ }
551
+ });
552
+ setNoteModalOpen(false);
553
+ };
554
+ const handleNoteCancel = () => {
555
+ setNoteModalOpen(false);
556
+ };
527
557
  const completeButton = (0, import_react.useMemo)(() => {
528
558
  return /* @__PURE__ */ import_react.default.createElement(
529
559
  import_antd.Button,
@@ -582,6 +612,27 @@ var Footer = (props) => {
582
612
  )
583
613
  );
584
614
  }, []);
615
+ const noteButton = (0, import_react.useMemo)(() => {
616
+ return /* @__PURE__ */ import_react.default.createElement(
617
+ import_antd.ConfigProvider,
618
+ {
619
+ theme: {
620
+ token: {
621
+ colorPrimary: "#0d7fa9"
622
+ }
623
+ }
624
+ },
625
+ /* @__PURE__ */ import_react.default.createElement(
626
+ import_antd.Button,
627
+ {
628
+ className: "pisell-lowcode__booking-footer-buttons-item",
629
+ type: "primary",
630
+ onClick: handleNote
631
+ },
632
+ import_utils.locales.getText("pisell2.ticket-booking.notes")
633
+ )
634
+ );
635
+ }, []);
585
636
  let buttonMap = {
586
637
  checkout: checkoutButton,
587
638
  save: saveButton,
@@ -589,7 +640,8 @@ var Footer = (props) => {
589
640
  refund: refundButton,
590
641
  paymentLink: paymentLinkButton,
591
642
  rebook: rebookButton,
592
- clearAll: clearAllButton
643
+ clearAll: clearAllButton,
644
+ note: noteButton
593
645
  };
594
646
  const isShowClearAll = (0, import_react.useMemo)(() => {
595
647
  if (!state.bookingId) {
@@ -642,8 +694,8 @@ var Footer = (props) => {
642
694
  }
643
695
  if (source === "info") {
644
696
  let arr = [];
645
- if (isShowClearAll) {
646
- arr.push(buttonMap.clearAll);
697
+ if (state.isBookingTicket2) {
698
+ arr.push(buttonMap.note);
647
699
  }
648
700
  if (isCheckout) {
649
701
  if (!isTeam) {
@@ -724,7 +776,7 @@ var Footer = (props) => {
724
776
  isShowPaymentLink,
725
777
  source,
726
778
  _buttons.length,
727
- (_j = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _j.payment_status
779
+ (_h = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _h.payment_status
728
780
  ]);
729
781
  const isOnlyDeposit = (0, import_react.useMemo)(() => {
730
782
  var _a2, _b2, _c2, _d2;
@@ -816,7 +868,7 @@ var Footer = (props) => {
816
868
  }, [
817
869
  state.bookingId,
818
870
  state.bookingDetail,
819
- (_k = state.addons) == null ? void 0 : _k.load,
871
+ (_i = state.addons) == null ? void 0 : _i.load,
820
872
  state.renderType
821
873
  ]);
822
874
  const menuChange = (e) => {
@@ -880,16 +932,24 @@ var Footer = (props) => {
880
932
  title: (_c2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _c2.tax_title
881
933
  }
882
934
  },
883
- // 订单折扣
935
+ // 订单折扣(优惠券等)
884
936
  {
885
937
  hidden: !state.bookingId,
886
938
  key: "discount",
887
939
  value: total.shopDiscount
888
940
  },
941
+ // 手动折扣
942
+ {
943
+ hidden: !state.shop_discount || !!state.bookingId,
944
+ key: "shop_discount",
945
+ value: Number(state.shop_discount) || 0,
946
+ label: import_utils.locales.getText("pisell2.text.manual-price-adjustment")
947
+ },
889
948
  // 总计
890
949
  {
891
- key: "total",
892
- value: total.expectAmount
950
+ key: "expect_amount",
951
+ value: total.expectAmount,
952
+ label: import_utils.locales.getText("pisell2.subtotal.total")
893
953
  },
894
954
  // 舍入金额
895
955
  {
@@ -899,7 +959,7 @@ var Footer = (props) => {
899
959
  label: import_utils.locales.getText("pisell1.text.rounding")
900
960
  }
901
961
  ];
902
- }, [total, (_l = state.bookingDetail) == null ? void 0 : _l.surcharge, state, state.bookingId]);
962
+ }, [total, (_j = state.bookingDetail) == null ? void 0 : _j.surcharge, state, state.bookingId]);
903
963
  const orderTotalList = (0, import_react.useMemo)(() => {
904
964
  return [
905
965
  // 订单已付金额
@@ -933,8 +993,8 @@ var Footer = (props) => {
933
993
  label: import_utils.locales.getText("pisell2.text.refunded-amount")
934
994
  }
935
995
  ];
936
- }, [total, (_m = state.bookingDetail) == null ? void 0 : _m.surcharge, state, state.bookingId]);
937
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, (hasGoodPassApp || hasDiscountCardApp) && ["addons", "info"].includes(source) && !paymentRefundedStatus ? /* @__PURE__ */ import_react.default.createElement(import_voucher.default, { state, dispatch, source }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
996
+ }, [total, (_k = state.bookingDetail) == null ? void 0 : _k.surcharge, state, state.bookingId]);
997
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
938
998
  "span",
939
999
  {
940
1000
  className: "pisell-lowcode__booking-footer-right",
@@ -1003,6 +1063,16 @@ var Footer = (props) => {
1003
1063
  },
1004
1064
  actionMap.orderDetail.label
1005
1065
  )
1006
- ) : null, contextHolder, /* @__PURE__ */ import_react.default.createElement(import_AppointmentProductModal.default, { ref: appointmentProductRef }));
1066
+ ) : null, contextHolder, /* @__PURE__ */ import_react.default.createElement(import_AppointmentProductModal.default, { ref: appointmentProductRef }), noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
1067
+ import_noteModal.default,
1068
+ {
1069
+ open: noteModalOpen,
1070
+ title: import_utils.locales.getText("pisell2.text.add-order-notes"),
1071
+ value: ((_l = state.notes) == null ? void 0 : _l.orderNote) || "",
1072
+ onConfirm: handleNoteConfirm,
1073
+ onDelete: handleNoteDelete,
1074
+ onCancel: handleNoteCancel
1075
+ }
1076
+ ));
1007
1077
  };
1008
1078
  var footer_default = Footer;
@@ -125,7 +125,7 @@ var formatRelationDetails = (list) => {
125
125
  return (list || []).map((item) => {
126
126
  return {
127
127
  num: item.product_quantity,
128
- price: item.payment_price || 0,
128
+ price: item.original_price || 0,
129
129
  product_id: item.product_id,
130
130
  is_charge_tax: item.is_charge_tax,
131
131
  order_detail_id: item.order_detail_id
@@ -241,30 +241,34 @@ var getSourceProductPrice = (item) => {
241
241
  return price;
242
242
  };
243
243
  var formatProducts = (item, quantity) => {
244
- var _a, _b, _c, _d, _e, _f;
244
+ var _a, _b, _c, _d, _e, _f, _g;
245
245
  const total = Number(item._extend.total);
246
246
  const origin_total = Number(item._extend.origin_total);
247
247
  const discount_amount = origin_total - total;
248
248
  const discount_list = (item == null ? void 0 : item.discount_list) || [];
249
249
  const discount_type = discount_amount < 0 ? "change_price" : "discount";
250
250
  const notManualDiscount = discount_list.filter((item2) => item2.type !== "product");
251
+ if (item.isCustomItem) {
252
+ item.product_id = 0;
253
+ }
251
254
  return {
255
+ "name": item.name,
252
256
  "num": quantity || item._extend.quantity,
253
257
  "price": formatProductPrice(item),
254
258
  "source_product_price": getSourceProductPrice(item),
255
- "product_id": (item == null ? void 0 : item.product_id) || item.id,
259
+ "product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
256
260
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
257
261
  "product_discount_reason": item._extend.discount_reason || "",
258
262
  "is_charge_tax": item.is_charge_tax,
259
- "note": (item == null ? void 0 : item.note) || "",
263
+ "note": ((_a = item._extend) == null ? void 0 : _a.note) || "",
260
264
  "discountway": item._extend.discountway || "num",
261
265
  "discount_per": item._extend.discount_per,
262
266
  "discount_type": item._extend.discount_type || discount_type,
263
267
  "order_detail_id": item._extend.order_detail_id || 0,
264
- "product_bundle": formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
268
+ "product_bundle": formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
265
269
  "bundle_edit": item._extend.bundle_edit,
266
- "product_option_item": formatProductOption((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.option),
267
- "product_variant_id": ((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.product_variant_id) || 0,
270
+ "product_option_item": formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
271
+ "product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
268
272
  "discount_list": notManualDiscount,
269
273
  metadata: formatMetaData(item)
270
274
  };
@@ -319,6 +323,14 @@ var formatBookings = (data, values) => {
319
323
  let bookings = [];
320
324
  list.forEach((item) => {
321
325
  var _a, _b, _c, _d;
326
+ if (item.isCustomItem) {
327
+ bookings.push({
328
+ ...item._extend,
329
+ product_id: 0
330
+ // 确保后端接收到的 product_id 为 0
331
+ });
332
+ return;
333
+ }
322
334
  let start_date = item._extend.startDate.format("YYYY-MM-DD");
323
335
  let end_date = item._extend.endDate.format("YYYY-MM-DD");
324
336
  let end_time = item._extend.endDate.format("HH:mm");
@@ -358,6 +370,7 @@ var formatBookings = (data, values) => {
358
370
  "number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
359
371
  "resources": formatResource(item),
360
372
  "metadata": formatMetaData(item),
373
+ "note": item._extend.note,
361
374
  ...eventOtherParams || {},
362
375
  ...dayParams
363
376
  };
@@ -417,7 +430,7 @@ var formatValues = (state) => {
417
430
  var _a, _b, _c, _d, _e, _f, _g;
418
431
  let values = {
419
432
  type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
420
- platform: "shop",
433
+ platform: state.isBookingTicket2 ? "pos" : "shop",
421
434
  sales_channel: "my_pisel",
422
435
  bookings: [],
423
436
  customer_id: 1,
@@ -431,9 +444,9 @@ var formatValues = (state) => {
431
444
  if (!state.bookingId || isDay) {
432
445
  values.shop_note = formatNote(state);
433
446
  }
434
- if (state.bookingId) {
435
- values.shop_discount = state.bookingDetail.shop_discount;
436
- values.shop_discount_reason = state.bookingDetail.shop_discount_reason;
447
+ if (state.shop_discount && Number(state.shop_discount) > 0) {
448
+ values.shop_discount = state.shop_discount;
449
+ values.shop_discount_reason = "";
437
450
  }
438
451
  if (state.contacts) {
439
452
  values.contacts = ((_a = state.contacts) == null ? void 0 : _a.value) || [];
@@ -468,20 +481,32 @@ var formatValues = (state) => {
468
481
  };
469
482
  var checkHolderIsError = (state) => {
470
483
  var _a, _b;
484
+ let errorRowKey = "";
471
485
  const holderError = state.service.value.some((item) => {
472
- var _a2, _b2;
486
+ var _a2, _b2, _c, _d, _e, _f;
473
487
  if ((0, import_utils4.isNormalProductByDurationSchedule)(item)) {
474
488
  return false;
475
489
  }
476
490
  if (item._extend.quantity === 1 && !item._extend.holder_id) {
491
+ errorRowKey = (0, import_utils4.genRowKey)((_b2 = (_a2 = item == null ? void 0 : item._extend) == null ? void 0 : _a2.other) == null ? void 0 : _b2.rowKey);
477
492
  return true;
478
493
  }
479
- if (item._extend.quantity > 1 && ((_b2 = (_a2 = item._extend) == null ? void 0 : _a2.holder_id) == null ? void 0 : _b2.length) !== item._extend.quantity) {
494
+ if (item._extend.quantity > 1 && ((_d = (_c = item._extend) == null ? void 0 : _c.holder_id) == null ? void 0 : _d.length) !== item._extend.quantity) {
495
+ errorRowKey = (0, import_utils4.genRowKey)((_f = (_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.rowKey);
480
496
  return true;
481
497
  }
482
498
  return false;
483
499
  });
484
500
  const clientId = (_b = (_a = state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id;
501
+ if (holderError) {
502
+ const dom = document.getElementById(errorRowKey);
503
+ if (dom) {
504
+ dom.scrollIntoView({
505
+ behavior: "smooth",
506
+ block: "start"
507
+ });
508
+ }
509
+ }
485
510
  if (holderError && (!clientId || clientId === 0 || clientId === 1)) {
486
511
  (0, import_materials.PisellToast)({
487
512
  content: import_utils5.locales.getText("pisell2.text.please-select-the-customer-first")
@@ -37,14 +37,46 @@ var import_authWrap = __toESM(require("../authWrap"));
37
37
  var import_antd = require("antd");
38
38
  var import_index = require("./index.less");
39
39
  var import_classnames = __toESM(require("classnames"));
40
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
41
+ var import_voucher = __toESM(require("../voucher"));
42
+ var import_actionButtons = __toESM(require("../actionButtons"));
40
43
  var TabPane = ({
41
44
  children,
42
45
  header,
43
46
  footer,
44
47
  style,
45
48
  loading,
46
- bodyClassName
49
+ bodyClassName,
50
+ // 新增 props 用于传递 booking 相关数据
51
+ state,
52
+ dispatch,
53
+ source
47
54
  }) => {
55
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
56
+ const context = (0, import_useEngineContext.default)();
57
+ const { businessUtils } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
58
+ const hasGoodPassApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "goodpass"));
59
+ const hasDiscountCardApp = !!((_c = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _c.call(businessUtils, "discountcard"));
60
+ const paymentRefundedStatus = (0, import_react.useMemo)(() => {
61
+ var _a2;
62
+ return ["partially_refunded", "refunded"].includes(
63
+ (_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.payment_status
64
+ );
65
+ }, [state == null ? void 0 : state.bookingDetail]);
66
+ const voucherBaseCondition = (hasGoodPassApp || hasDiscountCardApp) && ["addons", "info"].includes(source) && !paymentRefundedStatus;
67
+ const shouldShowTerminalVoucher = voucherBaseCondition && (state == null ? void 0 : state.isBookingTicket2);
68
+ const shouldShowFooterVoucher = voucherBaseCondition && !(state == null ? void 0 : state.isBookingTicket2);
69
+ const addNote = (noteValue) => {
70
+ if (dispatch) {
71
+ dispatch({
72
+ type: "setNotes",
73
+ payload: {
74
+ orderNote: noteValue,
75
+ edit: true
76
+ }
77
+ });
78
+ }
79
+ };
48
80
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-tab-pane-wrap", style }, /* @__PURE__ */ import_react.default.createElement(
49
81
  "div",
50
82
  {
@@ -70,11 +102,53 @@ var TabPane = ({
70
102
  },
71
103
  children
72
104
  )
73
- ), /* @__PURE__ */ import_react.default.createElement(
105
+ ), shouldShowTerminalVoucher && state && dispatch && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-tab-pane-voucher-section" }, /* @__PURE__ */ import_react.default.createElement(
106
+ import_voucher.default,
107
+ {
108
+ state: {
109
+ ...state,
110
+ service: {
111
+ ...state.service || {},
112
+ value: ((_d = state.service) == null ? void 0 : _d.value) || []
113
+ },
114
+ addons: {
115
+ ...state.addons || {},
116
+ value: ((_e = state.addons) == null ? void 0 : _e.value) || []
117
+ },
118
+ client: {
119
+ ...state.client || {},
120
+ value: ((_f = state.client) == null ? void 0 : _f.value) || {}
121
+ }
122
+ },
123
+ dispatch,
124
+ source
125
+ }
126
+ ), /* @__PURE__ */ import_react.default.createElement(import_actionButtons.default, { state, dispatch })), /* @__PURE__ */ import_react.default.createElement(
74
127
  import_authWrap.default,
75
128
  {
76
- show: !!footer,
77
- trueRender: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-tab-pane-footer" }, footer)
129
+ show: !!footer || shouldShowFooterVoucher,
130
+ trueRender: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-tab-pane-footer" }, shouldShowFooterVoucher && state && dispatch && /* @__PURE__ */ import_react.default.createElement(
131
+ import_voucher.default,
132
+ {
133
+ state: {
134
+ ...state,
135
+ service: {
136
+ ...state.service || {},
137
+ value: ((_g = state.service) == null ? void 0 : _g.value) || []
138
+ },
139
+ addons: {
140
+ ...state.addons || {},
141
+ value: ((_h = state.addons) == null ? void 0 : _h.value) || []
142
+ },
143
+ client: {
144
+ ...state.client || {},
145
+ value: ((_i = state.client) == null ? void 0 : _i.value) || {}
146
+ }
147
+ },
148
+ dispatch,
149
+ source
150
+ }
151
+ ), footer)
78
152
  }
79
153
  )));
80
154
  };
@@ -5,7 +5,6 @@
5
5
  position: relative;
6
6
  display: flex;
7
7
  flex-direction: column;
8
-
9
8
  }
10
9
 
11
10
  .pisell-lowcode__booking-tab-pane-title {
@@ -30,6 +29,8 @@
30
29
  flex: 1;
31
30
  overflow: auto;
32
31
  padding: 0 32px;
32
+ // 为 voucher-section 预留空间
33
+ padding-bottom: 120px;
33
34
 
34
35
  .pisell-lowcode__booking-tab-pane-label {
35
36
  font-size: 16px;
@@ -45,6 +46,79 @@
45
46
  }
46
47
  }
47
48
 
49
+ // Voucher 和功能按钮区域
50
+ .pisell-lowcode__booking-tab-pane-voucher-section {
51
+ display: flex;
52
+ flex-direction: column;
53
+ padding: 8px 16px;
54
+ position: relative;
55
+ z-index: 3;
56
+ background-color: #1b1b1b;
57
+ box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
58
+
59
+ .pisell-lowcode__booking-footer-voucher-container {
60
+ background: var(--base-white, #FFF);
61
+ padding: 4px;
62
+ border-radius: 8px;
63
+ }
64
+
65
+ // ActionButtons 在 voucher-section 中的样式
66
+ .pisell-lowcode__action-buttons {
67
+ margin-top: 8px;
68
+ // 确保按钮可见
69
+ .action-button {
70
+ // 重要:确保文字颜色在深色背景下可见
71
+ color: white !important;
72
+
73
+ &:hover:not(:disabled) {
74
+ color: white !important;
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ // 订单备注区域
81
+ .pisell-lowcode__booking-tab-pane-notes-section {
82
+ background-color: #1b1b1b;
83
+ position: relative;
84
+ z-index: 3;
85
+
86
+ .pisell-lowcode__booking-notes {
87
+ background: var(--base-white, #FFF);
88
+ padding: 12px;
89
+ width: 100%;
90
+
91
+ .pisell-lowcode__booking-notes-label {
92
+ font-weight: 500;
93
+ color: #333;
94
+ margin-bottom: 8px;
95
+ }
96
+
97
+ .pisell-lowcode__booking-notes-input {
98
+ .pisell-lowcode-input {
99
+ height: 44px !important;
100
+ min-height: 44px !important;
101
+ border-radius: 6px;
102
+ font-size: 16px;
103
+ line-height: 36px;
104
+ }
105
+
106
+ // 备用选择器,以防万一
107
+ textarea.pisell-lowcode-input {
108
+ height: 44px !important;
109
+ min-height: 44px !important;
110
+ border-radius: 6px;
111
+ resize: none;
112
+ }
113
+
114
+ // 去掉外层包装容器的边框
115
+ .pisell-lowcode-input-textarea-affix-wrapper {
116
+ border-width: 1px;
117
+ }
118
+ }
119
+ }
120
+ }
121
+
48
122
  .pisell-lowcode__booking-tab-pane-footer {
49
123
  position: sticky;
50
124
  bottom: 0;
@@ -43,6 +43,7 @@ var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
43
43
  var import_index = require("./index.less");
44
44
  var import_ahooks = require("ahooks");
45
45
  var import_utils2 = require("./utils");
46
+ var import_pisellos = require("../../../ticketBooking/hooks/pisellos");
46
47
  var ShopDiscountHooks = {
47
48
  onInited: "shopDiscount:onInited",
48
49
  onDestroy: "shopDiscount:onDestroy",
@@ -67,6 +68,20 @@ var VoucherCard = (props) => {
67
68
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
68
69
  const shopDiscount = pisellos.getModule("shopDiscount");
69
70
  services = state.service;
71
+ const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
72
+ dispatch({
73
+ type: "setClient",
74
+ payload: {
75
+ value,
76
+ edit: true
77
+ }
78
+ });
79
+ });
80
+ const {
81
+ selectCustomer
82
+ } = (0, import_pisellos.useCustomer)({
83
+ changeCustomerToGlobalState
84
+ });
70
85
  (0, import_ahooks.useDebounceEffect)(
71
86
  () => {
72
87
  if (isBooking4Shop) {
@@ -96,7 +111,8 @@ var VoucherCard = (props) => {
96
111
  price: value.price,
97
112
  total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
98
113
  discount_list: value.discount_list,
99
- origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total
114
+ origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
115
+ quantity: value._extend.quantity
100
116
  };
101
117
  });
102
118
  return val;
@@ -158,12 +174,7 @@ var VoucherCard = (props) => {
158
174
  (0, import_react.useEffect)(() => {
159
175
  if (!isBooking4Shop) return;
160
176
  const onScanCustomerChange = (customer) => {
161
- dispatch({
162
- type: "setClient",
163
- payload: {
164
- value: customer
165
- }
166
- });
177
+ selectCustomer(customer);
167
178
  };
168
179
  const onDiscountListChange = (discount) => {
169
180
  setDisCountList(discount);
@@ -4,7 +4,7 @@
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: space-between;
7
- margin-bottom: 10px;
7
+ margin-bottom: 0px;
8
8
 
9
9
  .voucher-title-left {
10
10
  color: var(--base-black, #000);
@@ -57,7 +57,7 @@ var formatCapacityToChildrenData = (data) => {
57
57
  return Object.values(map).filter((item) => !!item.value).sort((a, b) => b.label.localeCompare(a.label));
58
58
  };
59
59
  import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
60
- var BookingDashboard = (props) => {
60
+ var BookingDashboard = (0, import_react.forwardRef)((props, ref) => {
61
61
  const {
62
62
  otherParams = {},
63
63
  backgroundColors,
@@ -267,6 +267,11 @@ var BookingDashboard = (props) => {
267
267
  clearInterval(timer);
268
268
  };
269
269
  }, [JSON.stringify(otherParams), refreshKey]);
270
+ (0, import_react.useImperativeHandle)(ref, () => ({
271
+ refresh: () => {
272
+ getData();
273
+ }
274
+ }));
270
275
  return /* @__PURE__ */ import_react.default.createElement(
271
276
  import_materials.PisellStatisticList,
272
277
  {
@@ -277,5 +282,5 @@ var BookingDashboard = (props) => {
277
282
  valueColor
278
283
  }
279
284
  );
280
- };
285
+ });
281
286
  var dashboard_default = BookingDashboard;