@pisell/private-materials 6.5.26 → 6.6.1

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 (336) 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 +2 -2
  6. package/build/lowcode/preview.js +146 -165
  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/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
  13. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
  14. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  15. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  16. package/es/components/appointmentBooking/hooks.js +30 -30
  17. package/es/components/appointmentBooking/locales.d.ts +3 -0
  18. package/es/components/appointmentBooking/locales.js +9 -6
  19. package/es/components/booking/components/actionButtons/index.js +34 -20
  20. package/es/components/booking/components/customSelect/index.js +1 -1
  21. package/es/components/booking/components/footer/amount.js +25 -8
  22. package/es/components/booking/components/footer/index.js +66 -33
  23. package/es/components/booking/components/footer/utils.d.ts +7 -0
  24. package/es/components/booking/components/footer/utils.js +126 -99
  25. package/es/components/booking/components/voucher/index.js +25 -9
  26. package/es/components/booking/dashboard/serve.js +1 -6
  27. package/es/components/booking/forms/footer.js +24 -10
  28. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  29. package/es/components/booking/forms/serve.js +2 -12
  30. package/es/components/booking/hooks/useQuotation.js +69 -21
  31. package/es/components/booking/info/client/index.js +28 -13
  32. package/es/components/booking/info/client/serve.js +2 -11
  33. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  34. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  35. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  36. package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  37. package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
  38. package/es/components/booking/info/main.js +3 -2
  39. package/es/components/booking/info/model.js +5 -0
  40. package/es/components/booking/info/pet/serve.js +1 -6
  41. package/es/components/booking/info/service/Lists.d.ts +1 -1
  42. package/es/components/booking/info/service/Lists.js +10 -4
  43. package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
  44. package/es/components/booking/info/service/serve.d.ts +14 -0
  45. package/es/components/booking/info/service/serve.js +25 -18
  46. package/es/components/booking/info/service2/Group/utils.js +2 -0
  47. package/es/components/booking/info/service2/utils.d.ts +1 -33
  48. package/es/components/booking/info/service2/utils.js +92 -56
  49. package/es/components/booking/info/utils.js +5 -0
  50. package/es/components/booking/info2/cartClientCard/index.js +49 -9
  51. package/es/components/booking/info2/index.js +3 -2
  52. package/es/components/booking/info2/serve.js +1 -6
  53. package/es/components/booking/info2/service/addService/index.js +146 -89
  54. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  55. package/es/components/booking/info2/service/addService/utils.js +83 -14
  56. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  57. package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
  58. package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  59. package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
  60. package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
  61. package/es/components/booking/info2/service/editService/index.js +313 -57
  62. package/es/components/booking/info2/utilsByBooking.js +19 -14
  63. package/es/components/booking/locales.d.ts +36 -0
  64. package/es/components/booking/locales.js +48 -3
  65. package/es/components/booking/model.d.ts +4 -0
  66. package/es/components/booking/model.js +3 -0
  67. package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
  68. package/es/components/booking/utils/confirmHolderModal.js +318 -0
  69. package/es/components/booking/utils/confirmHolderModal.less +40 -0
  70. package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
  71. package/es/components/booking/utils/selectHolderModal.js +407 -0
  72. package/es/components/booking/utils.d.ts +16 -7
  73. package/es/components/booking/utils.js +26 -37
  74. package/es/components/checkout/PaymentModal.js +61 -30
  75. package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
  76. package/es/components/checkout/components/ScrollableList/index.js +0 -1
  77. package/es/components/checkout/locales.d.ts +3 -0
  78. package/es/components/checkout/locales.js +3 -0
  79. package/es/components/eftposPay/linkly/index.js +64 -2
  80. package/es/components/eftposPay/tyro/index.js +12 -0
  81. package/es/components/list/List.js +3 -0
  82. package/es/components/pay/toB/components/MX51/index.js +14 -44
  83. package/es/components/pay/toB/types/index.d.ts +0 -12
  84. package/es/components/pay/toB/types/index.js +0 -4
  85. package/es/components/shoppingCart/components/Cart/Product.js +6 -3
  86. package/es/components/shoppingCart/type.d.ts +1 -0
  87. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  88. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  89. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
  90. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  91. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  92. package/es/components/ticketBooking/components/addServiceVariant/addService.js +419 -794
  93. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  94. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
  95. package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  96. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  97. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  98. package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
  99. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  100. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  101. package/es/components/ticketBooking/components/timeBar/index.js +1 -4
  102. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  103. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
  104. package/es/components/ticketBooking/index.d.ts +0 -1
  105. package/es/components/ticketBooking/index.js +0 -2
  106. package/es/components/ticketBooking/serve.js +17 -119
  107. package/es/components/ticketBooking/utils/index.d.ts +7 -1
  108. package/es/components/ticketBooking/utils/index.js +44 -28
  109. package/es/hooks/useEngineContext.d.ts +0 -1
  110. package/es/hooks/useEngineContext.js +0 -7
  111. package/es/index.d.ts +4 -0
  112. package/es/index.js +5 -1
  113. package/es/plus/clientCard/locales.js +3 -3
  114. package/es/plus/clinetSearch/index.js +28 -30
  115. package/es/plus/clinetSearch/locales.d.ts +3 -0
  116. package/es/plus/clinetSearch/locales.js +7 -4
  117. package/es/plus/clinetSearch/types.d.ts +12 -0
  118. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  119. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  120. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  121. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  122. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  123. package/es/plus/contactInfo/index.d.ts +6 -0
  124. package/es/plus/contactInfo/index.js +198 -0
  125. package/es/plus/contactInfo/index.less +621 -0
  126. package/es/plus/contactInfo/locales.d.ts +15 -0
  127. package/es/plus/contactInfo/locales.js +14 -0
  128. package/es/plus/contactInfo/types.d.ts +91 -0
  129. package/es/plus/contactInfo/types.js +1 -0
  130. package/es/plus/contactInfo/utils.d.ts +7 -0
  131. package/es/plus/contactInfo/utils.js +50 -0
  132. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  133. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  134. package/es/plus/contactInfoModal/index.d.ts +41 -0
  135. package/es/plus/contactInfoModal/index.js +155 -0
  136. package/es/plus/contactInfoModal/index.less +19 -0
  137. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  138. package/es/plus/contactInfoModal/locales.js +65 -0
  139. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  140. package/es/plus/productSelect/ProductCard/index.js +1 -1
  141. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  142. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  143. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  144. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  145. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  146. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  147. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  148. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  149. package/es/plus/selectHolder/index.d.ts +7 -0
  150. package/es/plus/selectHolder/index.js +273 -0
  151. package/es/plus/selectHolder/index.less +137 -0
  152. package/es/plus/selectHolder/locales.d.ts +24 -0
  153. package/es/plus/selectHolder/locales.js +29 -0
  154. package/es/plus/selectHolder/types.d.ts +104 -0
  155. package/es/plus/selectHolder/types.js +1 -0
  156. package/es/plus/selectHolder/utils.d.ts +9 -0
  157. package/es/plus/selectHolder/utils.js +16 -0
  158. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  159. package/es/pro/comprehensiveSearch/locales.js +1 -1
  160. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  161. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
  162. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  163. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  164. package/es/pro/multiDayTimeSelect/index.js +1 -0
  165. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  166. package/es/pro/multiDayTimeSelect/types.js +1 -0
  167. package/es/pro/skuDetailModal/types.d.ts +1 -0
  168. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  169. package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
  170. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  171. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  172. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  173. package/lib/components/appointmentBooking/hooks.js +73 -35
  174. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  175. package/lib/components/appointmentBooking/locales.js +6 -3
  176. package/lib/components/booking/components/actionButtons/index.js +11 -2
  177. package/lib/components/booking/components/customSelect/index.js +1 -1
  178. package/lib/components/booking/components/footer/amount.js +23 -6
  179. package/lib/components/booking/components/footer/index.js +26 -5
  180. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  181. package/lib/components/booking/components/footer/utils.js +120 -82
  182. package/lib/components/booking/components/voucher/index.js +10 -1
  183. package/lib/components/booking/dashboard/serve.js +1 -6
  184. package/lib/components/booking/forms/footer.js +29 -11
  185. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  186. package/lib/components/booking/forms/serve.js +2 -12
  187. package/lib/components/booking/hooks/useQuotation.js +45 -13
  188. package/lib/components/booking/info/client/index.js +14 -1
  189. package/lib/components/booking/info/client/serve.js +2 -13
  190. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
  191. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  192. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  193. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  194. package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
  195. package/lib/components/booking/info/main.js +5 -4
  196. package/lib/components/booking/info/model.js +5 -0
  197. package/lib/components/booking/info/pet/serve.js +1 -6
  198. package/lib/components/booking/info/service/Lists.d.ts +1 -1
  199. package/lib/components/booking/info/service/Lists.js +5 -3
  200. package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
  201. package/lib/components/booking/info/service/serve.d.ts +14 -0
  202. package/lib/components/booking/info/service/serve.js +8 -17
  203. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  204. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  205. package/lib/components/booking/info/service2/utils.js +38 -29
  206. package/lib/components/booking/info/utils.js +4 -0
  207. package/lib/components/booking/info2/cartClientCard/index.js +34 -5
  208. package/lib/components/booking/info2/index.js +11 -5
  209. package/lib/components/booking/info2/serve.js +1 -6
  210. package/lib/components/booking/info2/service/addService/index.js +22 -3
  211. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  212. package/lib/components/booking/info2/service/addService/utils.js +48 -11
  213. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  214. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  215. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  216. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  217. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  218. package/lib/components/booking/info2/service/editService/index.js +254 -32
  219. package/lib/components/booking/info2/utilsByBooking.js +26 -19
  220. package/lib/components/booking/locales.d.ts +36 -0
  221. package/lib/components/booking/locales.js +42 -3
  222. package/lib/components/booking/model.d.ts +4 -0
  223. package/lib/components/booking/model.js +3 -0
  224. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  225. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  226. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  227. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  228. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  229. package/lib/components/booking/utils.d.ts +16 -7
  230. package/lib/components/booking/utils.js +18 -21
  231. package/lib/components/checkout/PaymentModal.js +41 -18
  232. package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
  233. package/lib/components/checkout/components/ScrollableList/index.js +0 -1
  234. package/lib/components/checkout/locales.d.ts +3 -0
  235. package/lib/components/checkout/locales.js +3 -0
  236. package/lib/components/eftposPay/linkly/index.js +31 -1
  237. package/lib/components/eftposPay/tyro/index.js +12 -0
  238. package/lib/components/list/List.js +3 -0
  239. package/lib/components/pay/toB/components/MX51/index.js +12 -37
  240. package/lib/components/pay/toB/types/index.d.ts +0 -12
  241. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  242. package/lib/components/shoppingCart/type.d.ts +1 -0
  243. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  244. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  245. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  246. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  247. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  248. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +279 -313
  249. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  250. package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
  251. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  252. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  253. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  254. package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
  255. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  256. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  257. package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
  258. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  259. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
  260. package/lib/components/ticketBooking/index.d.ts +0 -1
  261. package/lib/components/ticketBooking/index.js +0 -2
  262. package/lib/components/ticketBooking/serve.js +15 -117
  263. package/lib/components/ticketBooking/utils/index.d.ts +7 -1
  264. package/lib/components/ticketBooking/utils/index.js +29 -23
  265. package/lib/hooks/useEngineContext.d.ts +0 -1
  266. package/lib/hooks/useEngineContext.js +2 -10
  267. package/lib/index.d.ts +4 -0
  268. package/lib/index.js +12 -0
  269. package/lib/plus/clientCard/locales.js +3 -3
  270. package/lib/plus/clinetSearch/index.js +17 -8
  271. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  272. package/lib/plus/clinetSearch/locales.js +7 -4
  273. package/lib/plus/clinetSearch/types.d.ts +12 -0
  274. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  275. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  276. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  277. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  278. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  279. package/lib/plus/contactInfo/index.d.ts +6 -0
  280. package/lib/plus/contactInfo/index.js +226 -0
  281. package/lib/plus/contactInfo/index.less +621 -0
  282. package/lib/plus/contactInfo/locales.d.ts +15 -0
  283. package/lib/plus/contactInfo/locales.js +38 -0
  284. package/lib/plus/contactInfo/types.d.ts +91 -0
  285. package/lib/plus/contactInfo/types.js +17 -0
  286. package/lib/plus/contactInfo/utils.d.ts +7 -0
  287. package/lib/plus/contactInfo/utils.js +64 -0
  288. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  289. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  290. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  291. package/lib/plus/contactInfoModal/index.js +139 -0
  292. package/lib/plus/contactInfoModal/index.less +19 -0
  293. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  294. package/lib/plus/contactInfoModal/locales.js +89 -0
  295. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  296. package/lib/plus/productSelect/ProductCard/index.js +1 -1
  297. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  298. package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
  299. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  300. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  301. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  302. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  303. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  304. package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
  305. package/lib/plus/selectHolder/index.d.ts +7 -0
  306. package/lib/plus/selectHolder/index.js +223 -0
  307. package/lib/plus/selectHolder/index.less +137 -0
  308. package/lib/plus/selectHolder/locales.d.ts +24 -0
  309. package/lib/plus/selectHolder/locales.js +47 -0
  310. package/lib/plus/selectHolder/types.d.ts +104 -0
  311. package/lib/plus/selectHolder/types.js +17 -0
  312. package/lib/plus/selectHolder/utils.d.ts +9 -0
  313. package/lib/plus/selectHolder/utils.js +34 -0
  314. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  315. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  316. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  317. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
  318. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  319. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  320. package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
  321. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  322. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  323. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  324. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  325. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  326. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  327. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  328. package/lowcode/contact-info/meta.ts +199 -0
  329. package/lowcode/contact-info-modal/meta.ts +98 -0
  330. package/lowcode/event-select-holder/meta.ts +2 -2
  331. package/lowcode/select-holder/meta.ts +220 -0
  332. package/lowcode/select-holder/snippets.ts +41 -0
  333. package/package.json +13 -11
  334. package/es/hooks/printer.d.ts +0 -4
  335. package/es/hooks/printer.js +0 -35
  336. package/lib/hooks/printer.d.ts +0 -4
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import dayjs from "dayjs";
7
+ import dayjs from 'dayjs';
8
8
  import { flexibleObj, isNowTime, getNowTime } from "../../utils";
9
9
  import { isWalkIn } from "../../utils";
10
10
  import { getSumCapacity } from "../../info2/utilsByBooking";
@@ -12,13 +12,13 @@ import { getDays } from "../../utils";
12
12
  import { appointmentTypes } from "../../info/service2/status";
13
13
  import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule, genRowKey } from "../../info/service2/utils";
14
14
  import { isArr, locales, sendWarningLog, getUniqueId } from '@pisell/utils';
15
- import { PisellToast } from "@pisell/materials";
15
+ import { PisellToast } from '@pisell/materials';
16
16
  import { getClientName } from "../../../../plus/clientName/utils";
17
17
  import { cloneDeep } from 'lodash';
18
18
  import Decimal from 'decimal.js';
19
19
  var formatNote = function formatNote(data) {
20
20
  var _data$notes;
21
- return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || "";
21
+ return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || '';
22
22
  };
23
23
  var formatCustomer = function formatCustomer(data) {
24
24
  var _data$client, _data$client2, _data$client3, _data$client4, _data$client5, _data$client6;
@@ -37,7 +37,7 @@ var formatCustomer = function formatCustomer(data) {
37
37
 
38
38
  /**
39
39
  * @title: 套餐单规格信息
40
- * @description:
40
+ * @description:
41
41
  * @param {any} option
42
42
  * @return {*}
43
43
  * @Author: zhiwei.Wang
@@ -49,17 +49,17 @@ export var formatProductOption = function formatProductOption(option) {
49
49
  }
50
50
  return option.map(function (d) {
51
51
  return {
52
- "num": d.num,
53
- "option_group_item_id": d.product_option_item_id || d.option_group_item_id,
54
- "option_group_id": d.option_group_id,
55
- "custom_add_price": Number(d === null || d === void 0 ? void 0 : d.add_price)
52
+ num: d.num,
53
+ option_group_item_id: d.product_option_item_id || d.option_group_item_id,
54
+ option_group_id: d.option_group_id,
55
+ custom_add_price: Number(d === null || d === void 0 ? void 0 : d.add_price)
56
56
  };
57
57
  });
58
58
  };
59
59
 
60
60
  /**
61
61
  * @title: 添加套餐警告
62
- * @description:
62
+ * @description:
63
63
  * @param {any} data
64
64
  * @return {*}
65
65
  * @Author: WangHan
@@ -80,7 +80,7 @@ var log = function log(data) {
80
80
 
81
81
  /**
82
82
  * @title: 套餐信息
83
- * @description:
83
+ * @description:
84
84
  * @param {any} bundle
85
85
  * @return {*}
86
86
  * @Author: zhiwei.Wang
@@ -117,7 +117,7 @@ export var formatProductBundle = function formatProductBundle(bundle) {
117
117
  // checkout 2.0 新增
118
118
  "price_type": d === null || d === void 0 ? void 0 : d.price_type,
119
119
  // checkout 2.0 新增
120
- "custom_price": new Decimal(d === null || d === void 0 ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
120
+ "custom_price": Math.abs(new Decimal(d === null || d === void 0 ? void 0 : d.price).sub(option_price).toNumber()).toFixed(2),
121
121
  "custom_price_type": d === null || d === void 0 ? void 0 : d.price_type,
122
122
  "option": option
123
123
  };
@@ -200,7 +200,7 @@ var formatResource = function formatResource(service) {
200
200
 
201
201
  /**
202
202
  * @title: 格式化子预约的holder数据
203
- * @description:
203
+ * @description:
204
204
  * @param {any} state
205
205
  * @param {any} item
206
206
  * @param {any} values
@@ -231,7 +231,7 @@ var formatHolders = function formatHolders(state, item, values) {
231
231
 
232
232
  /**
233
233
  * @title: 格式化商品单价
234
- * @description:
234
+ * @description:
235
235
  * @param {any} item
236
236
  * @return {*}
237
237
  * @Author: WangHan
@@ -264,8 +264,8 @@ export var formatProductPrice = function formatProductPrice(item) {
264
264
 
265
265
  /**
266
266
  * checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
267
- * @param item
268
- * @returns
267
+ * @param item
268
+ * @returns
269
269
  */
270
270
  var formatOriginalPrice = function formatOriginalPrice(item) {
271
271
  var _item$_extend8;
@@ -274,8 +274,8 @@ var formatOriginalPrice = function formatOriginalPrice(item) {
274
274
 
275
275
  /**
276
276
  * checkout2.0: 商品维度折扣后价格, original_price - 商品折扣金额(商品手动折扣等等)
277
- * @param item
278
- * @returns
277
+ * @param item
278
+ * @returns
279
279
  */
280
280
  var formatSellingPrice = function formatSellingPrice(item) {
281
281
  var _item$_extend9;
@@ -339,7 +339,7 @@ var getSourceProductPrice = function getSourceProductPrice(item) {
339
339
 
340
340
  /**
341
341
  * @title: 格式化商品数据
342
- * @description:
342
+ * @description:
343
343
  * @param {any} item
344
344
  * @return {*}
345
345
  * @Author: WangHan
@@ -368,36 +368,36 @@ var formatProducts = function formatProducts(item, quantity) {
368
368
  item.product_id = 0;
369
369
  }
370
370
  return {
371
- "name": item.name,
372
- "num": quantity || item._extend.quantity,
373
- "price": formatProductPrice(item),
374
- "source_product_price": getSourceProductPrice(item),
375
- "product_id": item !== null && item !== void 0 && item.product_id || item.product_id === 0 ? item.product_id : item.id,
376
- "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
377
- "product_discount_reason": item._extend.discount_reason || '',
378
- "is_charge_tax": item.is_charge_tax,
379
- "note": ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.note) || '',
380
- "discountway": item._extend.discountway || "num",
381
- "discount_per": item._extend.discount_per,
382
- "discount_type": item._extend.discount_type || discount_type,
383
- "order_detail_id": item._extend.order_detail_id || 0,
384
- "product_bundle": formatProductBundle((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.bundle),
385
- "bundle_edit": item._extend.bundle_edit,
386
- "product_option_item": formatProductOption((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.option),
387
- "product_variant_id": ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 || (_item$_extend22 = _item$_extend22.other) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.product_variant_id) || 0,
388
- "discount_list": notManualDiscount,
371
+ name: item.name,
372
+ num: quantity || item._extend.quantity,
373
+ price: formatProductPrice(item),
374
+ source_product_price: getSourceProductPrice(item),
375
+ product_id: item !== null && item !== void 0 && item.product_id || item.product_id === 0 ? item.product_id : item.id,
376
+ discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
377
+ product_discount_reason: item._extend.discount_reason || '',
378
+ is_charge_tax: item.is_charge_tax,
379
+ note: ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.note) || '',
380
+ discountway: item._extend.discountway || 'num',
381
+ discount_per: item._extend.discount_per,
382
+ discount_type: item._extend.discount_type || discount_type,
383
+ order_detail_id: item._extend.order_detail_id || 0,
384
+ product_bundle: formatProductBundle((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.bundle),
385
+ bundle_edit: item._extend.bundle_edit,
386
+ product_option_item: formatProductOption((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.option),
387
+ product_variant_id: ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 || (_item$_extend22 = _item$_extend22.other) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.product_variant_id) || 0,
388
+ discount_list: notManualDiscount,
389
389
  metadata: formatMetaData(item),
390
390
  // checkout 需求新增字段
391
- "calculated_original_price": formatOriginalPrice(item),
392
- "calculated_selling_price": formatSellingPrice(item),
393
- "tax_fee": item._extend.tax_fee,
394
- "custom_deposit_data": item.custom_deposit_data
391
+ calculated_original_price: formatOriginalPrice(item),
392
+ calculated_selling_price: formatSellingPrice(item),
393
+ tax_fee: item._extend.tax_fee,
394
+ custom_deposit_data: item.custom_deposit_data
395
395
  };
396
396
  };
397
397
 
398
398
  /**
399
399
  * @title: 格式化跨日预约下的普通商品
400
- * @description:
400
+ * @description:
401
401
  * @param {any} data
402
402
  * @param {any} booking_item
403
403
  * @return {*}
@@ -423,7 +423,7 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
423
423
 
424
424
  /**
425
425
  * @title: 格式化跨日预约商品列表
426
- * @description:
426
+ * @description:
427
427
  * @param {any} data
428
428
  * @return {*}
429
429
  * @Author: WangHan
@@ -471,9 +471,24 @@ var getHolderByIndex = function getHolderByIndex(holder, index) {
471
471
  });
472
472
  };
473
473
 
474
+ /**
475
+ * @title: 是否包含跨日预约商品
476
+ * @description:
477
+ * @param {any} data
478
+ * @return {*}
479
+ */
480
+ export var getHasMultiDayProduct = function getHasMultiDayProduct(data) {
481
+ var list = data.service.value;
482
+ var isHas = list.some(function (item) {
483
+ var _item$_extend26;
484
+ return (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.groupId;
485
+ });
486
+ return isHas;
487
+ };
488
+
474
489
  /**
475
490
  * @title: 预约商品信息
476
- * @description:
491
+ * @description:
477
492
  * @param {any} data
478
493
  * @return {*}
479
494
  * @Author: zhiwei.Wang
@@ -505,7 +520,7 @@ var formatBookings = function formatBookings(data, values) {
505
520
  var eventOtherParams = data.eventOtherParams;
506
521
  var bookings = [];
507
522
  list.forEach(function (item) {
508
- var _item$_extend30;
523
+ var _item$_extend27, _item$_extend32;
509
524
  // 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
510
525
  if (item.isCustomItem) {
511
526
  bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
@@ -513,10 +528,13 @@ var formatBookings = function formatBookings(data, values) {
513
528
  }));
514
529
  return;
515
530
  }
531
+
532
+ // 当前商品是跨日预约商品
533
+ var isMultiDay = (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.groupId;
516
534
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
517
535
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
518
- var end_time = item._extend.endDate.format("HH:mm");
519
- var start_time = item._extend.startDate.format("HH:mm");
536
+ var end_time = item._extend.endDate.format('HH:mm');
537
+ var start_time = item._extend.startDate.format('HH:mm');
520
538
 
521
539
  // 更新当前时间
522
540
  if (isNowTime(item._extend.start_time)) {
@@ -526,9 +544,9 @@ var formatBookings = function formatBookings(data, values) {
526
544
 
527
545
  // 跨日预约下的普通商品
528
546
  if (isDay) {
529
- var _item$_extend26, _item$_extend27, _item$_extend28, _item$_extend29;
530
- var startDate = ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.startDate) || ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.start_date);
531
- var endDate = ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.endDate) || ((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.end_date);
547
+ var _item$_extend28, _item$_extend29, _item$_extend30, _item$_extend31;
548
+ var startDate = ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.startDate) || ((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.start_date);
549
+ var endDate = ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.endDate) || ((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.end_date);
532
550
  var _formatDayTime = formatDayTime({
533
551
  startDate: startDate,
534
552
  endDate: endDate
@@ -550,34 +568,36 @@ var formatBookings = function formatBookings(data, values) {
550
568
  }
551
569
  }, 'minutes');
552
570
  }
553
- if (!((_item$_extend30 = item._extend) !== null && _item$_extend30 !== void 0 && _item$_extend30.unique_identification_number)) {
571
+ if (!((_item$_extend32 = item._extend) !== null && _item$_extend32 !== void 0 && _item$_extend32.unique_identification_number)) {
554
572
  var unique_identification_number = getUniqueId();
555
573
  item._extend.unique_identification_number = unique_identification_number;
556
574
  }
557
575
  var booking = _objectSpread(_objectSpread({
558
- "product": formatProducts(item),
559
- "metadata": formatMetaData(item),
560
- "relation_products": formatRelationDetails(item._extend.relation_details),
561
- 'id': item.booking_id || 0,
562
- "relation_id": item._extend.relation_id || 0,
563
- "like_status": item._extend.like_status || 'common',
564
- "relation_type": item._extend.relation_type || '',
565
- "is_all": false,
566
- "schedule_id": item._extend.schedule_id || 0,
567
- "end_time": end_time,
568
- "sub_type": isDay ? 'days' : getSubType(item),
569
- "select_date": start_date,
570
- "start_time": start_time,
571
- "end_date": end_date,
572
- "start_date": start_date,
573
- "duration": isDay ? 0 : flexibleObj.getValue(item._extend.duration),
574
- "number": item._extend.capacity ? getSumCapacity({
576
+ product: formatProducts(item),
577
+ metadata: formatMetaData(item),
578
+ relation_products: formatRelationDetails(item._extend.relation_details),
579
+ id: item.booking_id || 0,
580
+ relation_id: item._extend.relation_id || 0,
581
+ like_status: item._extend.like_status || 'common',
582
+ relation_type: item._extend.relation_type || '',
583
+ is_all: false,
584
+ schedule_id: item._extend.schedule_id || 0,
585
+ end_time: end_time,
586
+ sub_type: isDay ? 'days' : getSubType(item),
587
+ select_date: start_date,
588
+ start_time: start_time,
589
+ end_date: end_date,
590
+ start_date: start_date,
591
+ duration: isDay || isMultiDay ? 0 : flexibleObj.getValue(item._extend.duration),
592
+ number: item._extend.capacity ? getSumCapacity({
575
593
  cacheItem: item
576
594
  }) : item._extend.number || 1,
577
- "resources": formatResource(item),
578
- "note": item._extend.note
595
+ resources: formatResource(item),
596
+ note: item._extend.note
579
597
  }, eventOtherParams || {}), dayParams);
580
- if (isDay) {
598
+
599
+ // 跨日预约模版或当前是跨日预约商品时
600
+ if (isDay || isMultiDay) {
581
601
  bookings.push(booking);
582
602
  return;
583
603
  }
@@ -585,12 +605,12 @@ var formatBookings = function formatBookings(data, values) {
585
605
  var newItem = cloneDeep(item);
586
606
  newItem._extend.unique_identification_number = "".concat(item._extend.unique_identification_number, "_").concat(i);
587
607
  bookings.push(_objectSpread(_objectSpread({}, booking), {}, {
588
- "product": formatProducts(newItem, 1),
589
- "number": item._extend.capacity ? getSumCapacity({
608
+ product: formatProducts(newItem, 1),
609
+ number: item._extend.capacity ? getSumCapacity({
590
610
  cacheItem: newItem
591
611
  }, false) : newItem._extend.number || 1,
592
- "holder": getHolderByIndex(booking.holder, i),
593
- "metadata": formatMetaData(newItem)
612
+ holder: getHolderByIndex(booking.holder, i),
613
+ metadata: formatMetaData(newItem)
594
614
  }));
595
615
  }
596
616
  });
@@ -599,7 +619,7 @@ var formatBookings = function formatBookings(data, values) {
599
619
 
600
620
  /**
601
621
  * @title: 普通商品
602
- * @description:
622
+ * @description:
603
623
  * @param {any} data
604
624
  * @return {*}
605
625
  * @Author: WangHan
@@ -610,16 +630,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
610
630
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
611
631
  // open items 下的商品
612
632
  list = list.filter(function (item) {
613
- var _item$_extend31;
633
+ var _item$_extend33;
614
634
  return (
615
635
  // 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
616
- type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.holder_id) && appointmentTypes.includes(item.extension_type)
636
+ type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.holder_id) && appointmentTypes.includes(item.extension_type)
617
637
  );
618
638
  });
619
639
  var relationProducts = [];
620
640
  relationProducts = list.map(function (item) {
621
- var _item$_extend32;
622
- if (!((_item$_extend32 = item._extend) !== null && _item$_extend32 !== void 0 && _item$_extend32.unique_identification_number)) {
641
+ var _item$_extend34;
642
+ if (!((_item$_extend34 = item._extend) !== null && _item$_extend34 !== void 0 && _item$_extend34.unique_identification_number)) {
623
643
  var unique_identification_number = getUniqueId();
624
644
  item._extend.unique_identification_number = unique_identification_number;
625
645
  }
@@ -638,8 +658,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
638
658
  });
639
659
  var relationProducts = [];
640
660
  relationProducts = list.map(function (item) {
641
- var _item$_extend33;
642
- if (!((_item$_extend33 = item._extend) !== null && _item$_extend33 !== void 0 && _item$_extend33.unique_identification_number)) {
661
+ var _item$_extend35;
662
+ if (!((_item$_extend35 = item._extend) !== null && _item$_extend35 !== void 0 && _item$_extend35.unique_identification_number)) {
643
663
  var unique_identification_number = getUniqueId();
644
664
  item._extend.unique_identification_number = unique_identification_number;
645
665
  }
@@ -650,7 +670,7 @@ var formatNormalProducts = function formatNormalProducts(data) {
650
670
 
651
671
  /**
652
672
  * @title: 预约主体信息
653
- * @description:
673
+ * @description:
654
674
  * @param {any} state
655
675
  * @param {any} values
656
676
  * @return {*}
@@ -683,20 +703,24 @@ var formatHolder = function formatHolder(state, values) {
683
703
 
684
704
  // https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/2778666/detail/53001549?spaceKey=menutech
685
705
  export var formatValues = function formatValues(state) {
686
- var _values, _values3;
706
+ var _values, _values3, _state$contacts_info;
687
707
  var values = {
688
- type: state.renderType === 'eventBooking' ? "event_booking_v2" : "appointment_booking",
689
- platform: state.isBookingTicket2 ? "pos" : "shop",
690
- sales_channel: "my_pisel",
691
- order_sales_channel: state.isBookingTicket2 ? "pos" : "online_store",
708
+ type: state.renderType === 'eventBooking' ? 'event_booking_v2' : 'appointment_booking',
709
+ platform: state.isBookingTicket2 ? 'pos' : 'shop',
710
+ sales_channel: 'my_pisel',
711
+ order_sales_channel: state.isBookingTicket2 ? 'pos' : 'online_store',
692
712
  bookings: [],
693
713
  customer_id: 1,
694
- customer_name: "",
714
+ customer_name: '',
695
715
  holder: {},
696
716
  relation_products: [],
697
717
  metadata: {}
698
718
  };
719
+
720
+ // 是是跨日预约模版
699
721
  var isDay = isDaysBooking(state);
722
+ // 是否包含跨日预约商品
723
+ var isHasMultiDay = getHasMultiDayProduct(state);
700
724
  var isEvent = isEventBooking(state);
701
725
  if (!state.bookingId || isDay) {
702
726
  // 备注
@@ -719,8 +743,8 @@ export var formatValues = function formatValues(state) {
719
743
  // 主体
720
744
  values.holder = formatHolder(state, values);
721
745
  // todo
722
- if (isDay || isEvent) {
723
- values.relation_products = formatRelationProducts(state, isDay ? "day" : "event");
746
+ if (isEvent) {
747
+ values.relation_products = formatRelationProducts(state, 'event');
724
748
  } else {
725
749
  var _values$relation_prod;
726
750
  values.relation_products = formatNormalProducts(state);
@@ -741,7 +765,7 @@ export var formatValues = function formatValues(state) {
741
765
  }
742
766
 
743
767
  // 跨日预约增加多余参数区分
744
- if (isDay) {
768
+ if (isDay || isHasMultiDay) {
745
769
  values.metadata.is_multiday_appointment = 1;
746
770
  // is_bundle_price_calculated 用于区分商品的price是总价,还是商品的单价
747
771
  // values.is_bundle_price_calculated = 1
@@ -749,29 +773,32 @@ export var formatValues = function formatValues(state) {
749
773
  if (!((_values3 = values) !== null && _values3 !== void 0 && (_values3 = _values3.bookings) !== null && _values3 !== void 0 && _values3.length)) {
750
774
  values.type = 'virtual';
751
775
  }
776
+
777
+ // 联系信息
778
+ values.contacts_info = ((_state$contacts_info = state.contacts_info) === null || _state$contacts_info === void 0 ? void 0 : _state$contacts_info.value) || null;
752
779
  return values;
753
780
  };
754
781
 
755
782
  // 检测预约主体是否为空
756
783
  export var checkHolderIsError = function checkHolderIsError(state) {
757
784
  var _state$client;
758
- var errorRowKey = "";
785
+ var errorRowKey = '';
759
786
  var holderError = state.service.value.some(function (item) {
760
- var _item$_extend35;
787
+ var _item$_extend$holder_, _item$_extend37;
761
788
  // 普通商品不需要检测holder
762
789
  if (isNormalProductByDurationSchedule(item)) {
763
790
  return false;
764
791
  }
765
- if (item._extend.quantity === 1 && !item._extend.holder_id) {
766
- var _item$_extend34;
767
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 || (_item$_extend34 = _item$_extend34.other) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.rowKey);
768
- return true;
769
- }
770
- if (item._extend.quantity > 1 && ((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 || (_item$_extend35 = _item$_extend35.holder_id) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.length) !== item._extend.quantity) {
792
+ if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_item$_extend$holder_ = item._extend.holder_id) === null || _item$_extend$holder_ === void 0 ? void 0 : _item$_extend$holder_.length) === 0)) {
771
793
  var _item$_extend36;
772
794
  errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 || (_item$_extend36 = _item$_extend36.other) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.rowKey);
773
795
  return true;
774
796
  }
797
+ if (item._extend.quantity > 1 && ((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 || (_item$_extend37 = _item$_extend37.holder_id) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.length) !== item._extend.quantity) {
798
+ var _item$_extend38;
799
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 || (_item$_extend38 = _item$_extend38.other) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.rowKey);
800
+ return true;
801
+ }
775
802
  return false;
776
803
  });
777
804
  var clientId = (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id;
@@ -2,15 +2,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
+ 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."); }
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5
9
  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; }
6
10
  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; }
7
11
  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; }
8
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
13
  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); }
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
- 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."); }
12
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
15
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
16
  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); }
@@ -43,7 +43,7 @@ var ShopDiscountHooks = {
43
43
  };
44
44
  var services = {};
45
45
  var VoucherCard = function VoucherCard(props) {
46
- var _context$appHelper, _state$client$value, _state$service2;
46
+ var _context$appHelper, _state$client$value, _state$service3;
47
47
  var context = useEngineContext();
48
48
  var state = props.state,
49
49
  dispatch = props.dispatch,
@@ -74,6 +74,7 @@ var VoucherCard = function VoucherCard(props) {
74
74
 
75
75
  // 将选中的客户数据传递给状态管理
76
76
  var changeCustomerToGlobalState = useMemoizedFn(function (value) {
77
+ var _state$service;
77
78
  dispatch({
78
79
  type: 'setClient',
79
80
  payload: {
@@ -81,6 +82,21 @@ var VoucherCard = function VoucherCard(props) {
81
82
  edit: true
82
83
  }
83
84
  });
85
+ if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
86
+ // 还需要清空商品内的 holder 信息
87
+ dispatch({
88
+ type: 'setService',
89
+ payload: {
90
+ value: state.service.value.map(function (item) {
91
+ return _objectSpread(_objectSpread({}, item), {}, {
92
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
93
+ holder_id: []
94
+ })
95
+ });
96
+ })
97
+ }
98
+ });
99
+ }
84
100
  });
85
101
  var _useCustomer = useCustomer({
86
102
  changeCustomerToGlobalState: changeCustomerToGlobalState
@@ -158,8 +174,8 @@ var VoucherCard = function VoucherCard(props) {
158
174
  return false;
159
175
  }, [state, addonsMemo, serviceMemo]);
160
176
  var _useDebounceFn = useDebounceFn(function () {
161
- var _state$service;
162
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
177
+ var _state$service2;
178
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length)) {
163
179
  return;
164
180
  }
165
181
  if (isBooking4Shop) {
@@ -169,7 +185,7 @@ var VoucherCard = function VoucherCard(props) {
169
185
  productListToValue(val.productList);
170
186
  }
171
187
  }, {
172
- wait: 1000
188
+ wait: 500
173
189
  }),
174
190
  run = _useDebounceFn.run;
175
191
 
@@ -327,7 +343,7 @@ var VoucherCard = function VoucherCard(props) {
327
343
  width: '100%'
328
344
  },
329
345
  isInModal: isInModal || false,
330
- dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
346
+ dataSource: (_state$service3 = state.service) !== null && _state$service3 !== void 0 && (_state$service3 = _state$service3.value) !== null && _state$service3 !== void 0 && _state$service3.length ? availableData : [],
331
347
  mixedSort: mixedSort,
332
348
  onChange: function onChange(val) {
333
349
  var detail = shopDiscount.setDiscountSelected({
@@ -10,12 +10,7 @@ export var getBookingList = /*#__PURE__*/function () {
10
10
  while (1) switch (_context.prev = _context.next) {
11
11
  case 0:
12
12
  _context.next = 2;
13
- return request.getRequest().get("/shop/schedule/booking", params, {
14
- cache: {
15
- mode: "remote_local",
16
- type: "indexDB"
17
- }
18
- });
13
+ return request.getRequest().get("/shop/schedule/booking", params);
19
14
  case 2:
20
15
  _yield$request$getReq = _context.sent;
21
16
  data = _yield$request$getReq.data;