@pisell/private-materials 6.5.27 → 6.6.2

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 (340) 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/serve.js +2 -12
  29. package/es/components/booking/hooks/useQuotation.js +69 -21
  30. package/es/components/booking/info/client/index.js +28 -13
  31. package/es/components/booking/info/client/serve.js +2 -11
  32. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  33. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  34. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  35. package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  36. package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
  37. package/es/components/booking/info/main.js +3 -2
  38. package/es/components/booking/info/model.js +5 -0
  39. package/es/components/booking/info/pet/serve.js +1 -6
  40. package/es/components/booking/info/service/Lists.d.ts +1 -1
  41. package/es/components/booking/info/service/Lists.js +10 -4
  42. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  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 +9 -1
  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/hooks/useWalletPass.d.ts +1 -1
  78. package/es/components/checkout/locales.d.ts +3 -0
  79. package/es/components/checkout/locales.js +3 -0
  80. package/es/components/eftposPay/linkly/index.js +64 -2
  81. package/es/components/eftposPay/tyro/index.js +12 -0
  82. package/es/components/list/List.js +3 -0
  83. package/es/components/pay/toB/components/MX51/index.js +14 -44
  84. package/es/components/pay/toB/types/index.d.ts +0 -12
  85. package/es/components/pay/toB/types/index.js +0 -4
  86. package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
  87. package/es/components/shoppingCart/components/Cart/Product.js +6 -3
  88. package/es/components/shoppingCart/type.d.ts +1 -0
  89. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  90. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  91. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
  92. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  93. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  94. package/es/components/ticketBooking/components/addServiceVariant/addService.js +421 -794
  95. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  96. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
  97. package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  98. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  99. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  100. package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
  101. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  102. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  103. package/es/components/ticketBooking/components/timeBar/index.js +1 -4
  104. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  105. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
  106. package/es/components/ticketBooking/index.d.ts +0 -1
  107. package/es/components/ticketBooking/index.js +0 -2
  108. package/es/components/ticketBooking/serve.js +17 -119
  109. package/es/components/ticketBooking/utils/index.d.ts +7 -1
  110. package/es/components/ticketBooking/utils/index.js +44 -28
  111. package/es/hooks/useEngineContext.d.ts +0 -1
  112. package/es/hooks/useEngineContext.js +0 -7
  113. package/es/index.d.ts +4 -0
  114. package/es/index.js +5 -1
  115. package/es/plus/clientCard/locales.js +3 -3
  116. package/es/plus/clinetSearch/index.js +28 -30
  117. package/es/plus/clinetSearch/locales.d.ts +3 -0
  118. package/es/plus/clinetSearch/locales.js +7 -4
  119. package/es/plus/clinetSearch/types.d.ts +12 -0
  120. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  121. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  122. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  123. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  124. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  125. package/es/plus/contactInfo/index.d.ts +6 -0
  126. package/es/plus/contactInfo/index.js +198 -0
  127. package/es/plus/contactInfo/index.less +621 -0
  128. package/es/plus/contactInfo/locales.d.ts +15 -0
  129. package/es/plus/contactInfo/locales.js +14 -0
  130. package/es/plus/contactInfo/types.d.ts +91 -0
  131. package/es/plus/contactInfo/types.js +1 -0
  132. package/es/plus/contactInfo/utils.d.ts +7 -0
  133. package/es/plus/contactInfo/utils.js +50 -0
  134. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  135. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  136. package/es/plus/contactInfoModal/index.d.ts +41 -0
  137. package/es/plus/contactInfoModal/index.js +155 -0
  138. package/es/plus/contactInfoModal/index.less +19 -0
  139. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  140. package/es/plus/contactInfoModal/locales.js +65 -0
  141. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  142. package/es/plus/productSelect/ProductCard/index.js +1 -1
  143. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  144. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  145. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  146. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  147. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  148. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  149. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  150. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  151. package/es/plus/selectHolder/index.d.ts +7 -0
  152. package/es/plus/selectHolder/index.js +273 -0
  153. package/es/plus/selectHolder/index.less +137 -0
  154. package/es/plus/selectHolder/locales.d.ts +24 -0
  155. package/es/plus/selectHolder/locales.js +29 -0
  156. package/es/plus/selectHolder/types.d.ts +104 -0
  157. package/es/plus/selectHolder/types.js +1 -0
  158. package/es/plus/selectHolder/utils.d.ts +9 -0
  159. package/es/plus/selectHolder/utils.js +16 -0
  160. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  161. package/es/pro/comprehensiveSearch/locales.js +1 -1
  162. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  163. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
  164. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  165. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  166. package/es/pro/multiDayTimeSelect/index.js +1 -0
  167. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  168. package/es/pro/multiDayTimeSelect/types.js +1 -0
  169. package/es/pro/skuDetailModal/types.d.ts +1 -0
  170. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  171. package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
  172. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  173. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  174. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  175. package/lib/components/appointmentBooking/hooks.js +73 -35
  176. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  177. package/lib/components/appointmentBooking/locales.js +6 -3
  178. package/lib/components/booking/components/actionButtons/index.js +11 -2
  179. package/lib/components/booking/components/customSelect/index.js +1 -1
  180. package/lib/components/booking/components/footer/amount.js +23 -6
  181. package/lib/components/booking/components/footer/index.js +26 -5
  182. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  183. package/lib/components/booking/components/footer/utils.js +120 -82
  184. package/lib/components/booking/components/voucher/index.js +10 -1
  185. package/lib/components/booking/dashboard/serve.js +1 -6
  186. package/lib/components/booking/forms/footer.js +29 -11
  187. package/lib/components/booking/forms/serve.js +2 -12
  188. package/lib/components/booking/hooks/useQuotation.js +45 -13
  189. package/lib/components/booking/info/client/index.js +14 -1
  190. package/lib/components/booking/info/client/serve.js +2 -13
  191. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
  192. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  193. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  194. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  195. package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
  196. package/lib/components/booking/info/main.js +5 -4
  197. package/lib/components/booking/info/model.js +5 -0
  198. package/lib/components/booking/info/pet/serve.js +1 -6
  199. package/lib/components/booking/info/service/Lists.d.ts +1 -1
  200. package/lib/components/booking/info/service/Lists.js +5 -3
  201. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  202. package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
  203. package/lib/components/booking/info/service/serve.d.ts +14 -0
  204. package/lib/components/booking/info/service/serve.js +8 -17
  205. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  206. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  207. package/lib/components/booking/info/service2/utils.js +38 -29
  208. package/lib/components/booking/info/utils.js +4 -0
  209. package/lib/components/booking/info2/cartClientCard/index.js +34 -5
  210. package/lib/components/booking/info2/index.js +11 -5
  211. package/lib/components/booking/info2/serve.js +1 -6
  212. package/lib/components/booking/info2/service/addService/index.js +22 -3
  213. package/lib/components/booking/info2/service/addService/utils.d.ts +9 -1
  214. package/lib/components/booking/info2/service/addService/utils.js +48 -11
  215. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  216. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  217. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  218. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  219. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  220. package/lib/components/booking/info2/service/editService/index.js +254 -32
  221. package/lib/components/booking/info2/utilsByBooking.js +26 -19
  222. package/lib/components/booking/locales.d.ts +36 -0
  223. package/lib/components/booking/locales.js +42 -3
  224. package/lib/components/booking/model.d.ts +4 -0
  225. package/lib/components/booking/model.js +3 -0
  226. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  227. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  228. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  229. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  230. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  231. package/lib/components/booking/utils.d.ts +16 -7
  232. package/lib/components/booking/utils.js +18 -21
  233. package/lib/components/checkout/PaymentModal.js +41 -18
  234. package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
  235. package/lib/components/checkout/components/ScrollableList/index.js +0 -1
  236. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  237. package/lib/components/checkout/locales.d.ts +3 -0
  238. package/lib/components/checkout/locales.js +3 -0
  239. package/lib/components/eftposPay/linkly/index.js +31 -1
  240. package/lib/components/eftposPay/tyro/index.js +12 -0
  241. package/lib/components/list/List.js +3 -0
  242. package/lib/components/pay/toB/components/MX51/index.js +12 -37
  243. package/lib/components/pay/toB/types/index.d.ts +0 -12
  244. package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
  245. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  246. package/lib/components/shoppingCart/type.d.ts +1 -0
  247. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  248. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  249. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  250. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  251. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  252. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +281 -313
  253. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  254. package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
  255. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  256. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  257. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  258. package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
  259. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  260. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  261. package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
  262. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  263. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
  264. package/lib/components/ticketBooking/index.d.ts +0 -1
  265. package/lib/components/ticketBooking/index.js +0 -2
  266. package/lib/components/ticketBooking/serve.js +15 -117
  267. package/lib/components/ticketBooking/utils/index.d.ts +7 -1
  268. package/lib/components/ticketBooking/utils/index.js +29 -23
  269. package/lib/hooks/useEngineContext.d.ts +0 -1
  270. package/lib/hooks/useEngineContext.js +2 -10
  271. package/lib/index.d.ts +4 -0
  272. package/lib/index.js +12 -0
  273. package/lib/plus/clientCard/locales.js +3 -3
  274. package/lib/plus/clinetSearch/index.js +17 -8
  275. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  276. package/lib/plus/clinetSearch/locales.js +7 -4
  277. package/lib/plus/clinetSearch/types.d.ts +12 -0
  278. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  279. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  280. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  281. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  282. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  283. package/lib/plus/contactInfo/index.d.ts +6 -0
  284. package/lib/plus/contactInfo/index.js +226 -0
  285. package/lib/plus/contactInfo/index.less +621 -0
  286. package/lib/plus/contactInfo/locales.d.ts +15 -0
  287. package/lib/plus/contactInfo/locales.js +38 -0
  288. package/lib/plus/contactInfo/types.d.ts +91 -0
  289. package/lib/plus/contactInfo/types.js +17 -0
  290. package/lib/plus/contactInfo/utils.d.ts +7 -0
  291. package/lib/plus/contactInfo/utils.js +64 -0
  292. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  293. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  294. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  295. package/lib/plus/contactInfoModal/index.js +139 -0
  296. package/lib/plus/contactInfoModal/index.less +19 -0
  297. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  298. package/lib/plus/contactInfoModal/locales.js +89 -0
  299. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  300. package/lib/plus/productSelect/ProductCard/index.js +1 -1
  301. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  302. package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
  303. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  304. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  305. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  306. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  307. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  308. package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
  309. package/lib/plus/selectHolder/index.d.ts +7 -0
  310. package/lib/plus/selectHolder/index.js +223 -0
  311. package/lib/plus/selectHolder/index.less +137 -0
  312. package/lib/plus/selectHolder/locales.d.ts +24 -0
  313. package/lib/plus/selectHolder/locales.js +47 -0
  314. package/lib/plus/selectHolder/types.d.ts +104 -0
  315. package/lib/plus/selectHolder/types.js +17 -0
  316. package/lib/plus/selectHolder/utils.d.ts +9 -0
  317. package/lib/plus/selectHolder/utils.js +34 -0
  318. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  319. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  320. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  321. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
  322. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  323. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  324. package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
  325. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  326. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  327. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  328. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  329. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  330. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  331. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  332. package/lowcode/contact-info/meta.ts +199 -0
  333. package/lowcode/contact-info-modal/meta.ts +98 -0
  334. package/lowcode/event-select-holder/meta.ts +2 -2
  335. package/lowcode/select-holder/meta.ts +220 -0
  336. package/lowcode/select-holder/snippets.ts +41 -0
  337. package/package.json +13 -11
  338. package/es/hooks/printer.d.ts +0 -4
  339. package/es/hooks/printer.js +0 -35
  340. package/lib/hooks/printer.d.ts +0 -4
@@ -1,4 +1,7 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _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
+ 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
+ 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); }); }; }
2
5
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
6
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
7
  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."); }
@@ -16,14 +19,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
16
19
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
21
  import Delete_wght300_24px from '@pisell/icon/es/Delete_wght300_24px';
19
- import { formatAmount, locales } from '@pisell/utils';
22
+ import { formatAmount, getUniqueId, locales } from '@pisell/utils';
20
23
  import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
21
24
  import Drawer from "../../../components/drawer";
22
25
  import { Context } from "../../../info/model";
23
26
  import Duration from "../../../materiels/duration";
24
27
  import Capacity from "./Capacity";
25
28
  import Resources from "./Resources";
26
- import { Input, Button, Row, Col, Form, InputNumber } from 'antd';
29
+ import Holder from "./Holder";
30
+ import { Input, Button, Row, Col, Form, InputNumber, DatePicker } from 'antd';
27
31
  import "./index.less";
28
32
  import CollapsibleList from "../../../components/collapsibleList";
29
33
  import { renderBundles } from "../../../components/collapsibleList/utils";
@@ -31,17 +35,21 @@ import "./index.less";
31
35
  import { useUpdateEffect, useMemoizedFn, useDebounceFn } from 'ahooks';
32
36
  // import SelectTime from "../../../../../../../materials/src/components/select-time";
33
37
  import { ConfigProvider, Iconfont } from '@pisell/materials';
34
- import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
35
- import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
38
+ import { addService, genHolderKey, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
39
+ import { disabledDate as _disabledDate, isNormalProductByDurationSchedule } from "../../../info/service2/utils";
36
40
  import { editSessionProduct } from "../../../info/utils";
37
- import { deleteCacheParams, getProductTotalPrice, getServiceTimes, isSessionProduct } from "../../../utils";
41
+ import { deleteCacheParams, getDays, getProductTotalPrice, getServiceTimes, isSessionProduct, isWalkIn } from "../../../utils";
38
42
  import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
39
- import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
43
+ import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj, setDefaultCapacitys } from "../addService/utils";
40
44
  import NoteModal from "../../../../../plus/noteModal";
41
45
  import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
46
+ import EditTabs from "../../../info/service/editService/EditTabs";
47
+ import BookingList from "../../../info/service/editService/BookingList";
48
+ import dayjs from "dayjs";
49
+ import { createBookingItemsByGroup, getGroupTotalPrice } from "../../../info/service2/Group/utils";
42
50
  var submitLock = false;
43
51
  var Info = function Info(_, ref) {
44
- var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI6, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI11, _state$bookingConfig5, _state$service$cacheI12, _state$service$cacheI13, _state$service9, _state$service$resour2, _state$service$cacheI14, _state$service$cacheI15;
52
+ var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI7, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI12, _state$bookingConfig5, _state$service$cacheI13, _state$service$cacheI14, _state$service9, _state$service$resour2, _state$service$cacheI16, _state$service$cacheI17, _state$client2;
45
53
  var _Form$useForm = Form.useForm(),
46
54
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
47
55
  form = _Form$useForm2[0];
@@ -49,7 +57,11 @@ var Info = function Info(_, ref) {
49
57
  var useResource = Form.useWatch('resource', form);
50
58
  var useStartTime = Form.useWatch('start_time', form);
51
59
  var useDuration = Form.useWatch('duration', form);
60
+ var useHolder = Form.useWatch('holder', form);
61
+ var useHolderId = Form.useWatch('holder_id', form);
52
62
  var useNote = Form.useWatch('note', form);
63
+ var useStartDate = Form.useWatch('start_date', form);
64
+ var useEndDate = Form.useWatch('end_date', form);
53
65
  var _useContext = useContext(Context),
54
66
  state = _useContext.state,
55
67
  dispatch = _useContext.dispatch;
@@ -63,6 +75,11 @@ var Info = function Info(_, ref) {
63
75
  _useState4 = _slicedToArray(_useState3, 2),
64
76
  open = _useState4[0],
65
77
  setOpen = _useState4[1];
78
+ // 当前tab 跨日预约时展示tabs
79
+ var _useState5 = useState('batch_edit'),
80
+ _useState6 = _slicedToArray(_useState5, 2),
81
+ currentTab = _useState6[0],
82
+ setCurrentTab = _useState6[1];
66
83
  useEffect(function () {
67
84
  window.openBookingEditModal = function () {
68
85
  setOpen(true);
@@ -149,6 +166,7 @@ var Info = function Info(_, ref) {
149
166
  */
150
167
  var timeObj = useMemo(function () {
151
168
  var val = getTimeObj({
169
+ cacheItem: getCurrentCacheItem(),
152
170
  durationProps: durationProps,
153
171
  useStartTime: useStartTime,
154
172
  currentResource: currentResource,
@@ -240,7 +258,7 @@ var Info = function Info(_, ref) {
240
258
  * @Date: 2024-01-09 14:04
241
259
  */
242
260
  var onFinish = function onFinish(values) {
243
- var _resourcesRef$current, _item$_extend, _state$service$cacheI3, _window$closeBookingE2, _window2;
261
+ var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
244
262
  var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
245
263
  if (isShowTimeAndResource && !isSuccess) {
246
264
  return;
@@ -264,37 +282,89 @@ var Info = function Info(_, ref) {
264
282
  quantity: values.quantity
265
283
  })
266
284
  }, values);
267
- var _getServiceTimes = getServiceTimes({
268
- _extend: _extend
269
- }),
270
- startDate = _getServiceTimes.startDate,
271
- endDate = _getServiceTimes.endDate;
272
- _extend.startDate = startDate;
273
- _extend.endDate = endDate;
285
+
286
+ // 跨日预约商品
287
+ if (isEditGroup) {
288
+ // 更新商品数量和更新日期
289
+ _extend.quantity = 1;
290
+ _extend.startDate = _extend === null || _extend === void 0 ? void 0 : _extend.start_date;
291
+ _extend.endDate = _extend === null || _extend === void 0 ? void 0 : _extend.end_date;
292
+ } else {
293
+ var _getServiceTimes = getServiceTimes({
294
+ _extend: _extend
295
+ }),
296
+ startDate = _getServiceTimes.startDate,
297
+ endDate = _getServiceTimes.endDate;
298
+ _extend.startDate = startDate;
299
+ _extend.endDate = endDate;
300
+ }
274
301
  if (_extend.bundle_edit !== undefined) {
275
302
  _extend.bundle_edit = 1;
276
303
  }
277
304
  _item._extend = _extend;
278
305
  _item._time = new Date().getTime();
279
306
  _item._serviceKey = genServiceKey(_item);
307
+ _item._holderKey = genHolderKey(_item);
308
+ // 如果holder 有多个,则需要拆分多个商品
309
+ // 另外一个情况 如果商品数量有多个,holder 数量小于商品数量也需要拆分
310
+ if (((_item$_extend2 = _item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.holder_id) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.length) > 1 || ((_item$_extend3 = _item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.quantity) > 1 && ((_item$_extend4 = _item._extend) === null || _item$_extend4 === void 0 || (_item$_extend4 = _item$_extend4.holder_id) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.length) >= 1) {
311
+ var holder_ids = _item._extend.holder_id;
312
+ _item._extend.holder_id = holder_ids[0];
313
+ holder_ids = holder_ids.slice(1);
314
+ _item._holderKey = genHolderKey(_item);
315
+ holder_ids.forEach(function (holder_id) {
316
+ var newItem = _objectSpread(_objectSpread({}, _item), {}, {
317
+ _id: getUniqueId(),
318
+ _extend: _objectSpread(_objectSpread({}, _item._extend), {}, {
319
+ holder_id: [holder_id],
320
+ quantity: 1
321
+ })
322
+ });
323
+ newItem._holderKey = genHolderKey(newItem);
324
+ _list.unshift(newItem);
325
+ // 当前的商品 quantity 需要减去 1
326
+ _item._extend.quantity -= 1;
327
+ });
328
+ // 如果剩余的商品 quantity 依旧大于 1,则超出 1 的部分作为同一个商品,holder_id 为 undefined
329
+ if (_item._extend.quantity > 1) {
330
+ var newItem = _objectSpread(_objectSpread({}, _item), {}, {
331
+ _id: getUniqueId(),
332
+ _extend: _objectSpread(_objectSpread({}, _item._extend), {}, {
333
+ holder_id: undefined,
334
+ quantity: _item._extend.quantity - 1
335
+ })
336
+ });
337
+ newItem._holderKey = genHolderKey(newItem);
338
+ _list.unshift(newItem);
339
+ _item._extend.quantity = 1;
340
+ }
341
+ }
280
342
  var _id = _item === null || _item === void 0 ? void 0 : _item._id;
281
-
282
- // 判断是新增还是编辑
283
- if (!_list.some(function (d) {
284
- return d._id === _id;
285
- })) {
286
- var detail = addService(_list, _item, state);
287
- _list = detail.list;
343
+ var groupId = _item === null || _item === void 0 || (_item$_extend5 = _item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.groupId;
344
+ if (groupId) {
345
+ _list = _list.filter(function (d) {
346
+ var _d$_extend;
347
+ return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.groupId) !== groupId;
348
+ });
349
+ _list = _list.concat(createBookingItemsByGroup(_item, true));
288
350
  } else {
289
- // 手动改价时移除优惠券使用
290
- if (isChangeTotal.current) {
291
- delete _item.discount_list;
351
+ // 判断是新增还是编辑
352
+ if (!_list.some(function (d) {
353
+ return d._id === _id;
354
+ })) {
355
+ var detail = addService(_list, _item, state);
356
+ _list = detail.list;
357
+ } else {
358
+ // 手动改价时移除优惠券使用
359
+ if (isChangeTotal.current) {
360
+ delete _item.discount_list;
361
+ }
362
+ _list = _list.map(function (d) {
363
+ return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
364
+ new: 0
365
+ }) : d;
366
+ });
292
367
  }
293
- _list = _list.map(function (d) {
294
- return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
295
- new: 0
296
- }) : d;
297
- });
298
368
  }
299
369
  deleteCacheParams();
300
370
  console.log('_onFinish', _list);
@@ -307,6 +377,19 @@ var Info = function Info(_, ref) {
307
377
  }));
308
378
  }
309
379
  (_window$closeBookingE2 = (_window2 = window).closeBookingEditModal) === null || _window$closeBookingE2 === void 0 || _window$closeBookingE2.call(_window2);
380
+ // 排序:没有 _extend_holder_id 的靠前,有的靠后
381
+ _list.sort(function (a, b) {
382
+ var _a$_extend, _b$_extend;
383
+ var aHasHolderId = ((_a$_extend = a._extend) === null || _a$_extend === void 0 ? void 0 : _a$_extend.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
384
+ var bHasHolderId = ((_b$_extend = b._extend) === null || _b$_extend === void 0 ? void 0 : _b$_extend.holder_id) && (Array.isArray(b._extend.holder_id) ? b._extend.holder_id.length > 0 : true);
385
+
386
+ // 如果 a 没有 holder_id,b 有,a 排在前面(返回负数)
387
+ if (!aHasHolderId && bHasHolderId) return -1;
388
+ // 如果 a 有 holder_id,b 没有,a 排在后面(返回正数)
389
+ if (aHasHolderId && !bHasHolderId) return 1;
390
+ // 其他情况保持原顺序
391
+ return 0;
392
+ });
310
393
  dispatch({
311
394
  type: 'setService',
312
395
  payload: {
@@ -330,6 +413,7 @@ var Info = function Info(_, ref) {
330
413
  var setEditData = useMemoizedFn(function (_cacheItem, open, openProductDetail) {
331
414
  console.timeEnd('handleChange');
332
415
  console.log('setEditDatasetEditData', _cacheItem, open);
416
+ setCurrentTab('batch_edit');
333
417
  isChangeTotal.current = false;
334
418
  var cacheItem = _cacheItem || state.service.cacheItem;
335
419
  var values = cacheItem._extend;
@@ -387,9 +471,10 @@ var Info = function Info(_, ref) {
387
471
  return cPrice !== oPrice;
388
472
  }, [useTotal, (_state$service$cacheI5 = state.service.cacheItem) === null || _state$service$cacheI5 === void 0 || (_state$service$cacheI5 = _state$service$cacheI5._extend) === null || _state$service$cacheI5 === void 0 ? void 0 : _state$service$cacheI5.origin_total]);
389
473
  var getResources = function getResources() {
474
+ var _state$service$cacheI6;
390
475
  var res = formatResources({
391
476
  cacheItem: getCurrentCacheItem(),
392
- resourcesOrigin: state.service.cacheItem._data.resourcesOrigin
477
+ resourcesOrigin: (_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 || (_state$service$cacheI6 = _state$service$cacheI6._data) === null || _state$service$cacheI6 === void 0 ? void 0 : _state$service$cacheI6.resourcesOrigin
393
478
  });
394
479
  dispatch({
395
480
  type: 'setService',
@@ -459,7 +544,7 @@ var Info = function Info(_, ref) {
459
544
  */
460
545
  useEffect(function () {
461
546
  getDiscount();
462
- }, [useTotal, (_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 || (_state$service$cacheI6 = _state$service$cacheI6._extend) === null || _state$service$cacheI6 === void 0 ? void 0 : _state$service$cacheI6.origin_total]);
547
+ }, [useTotal, (_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total]);
463
548
  var bundles = useMemo(function () {
464
549
  var _state$service5;
465
550
  return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 || (_state$service5 = _state$service5._extend) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.other) === null || _state$service5 === void 0 ? void 0 : _state$service5.bundle) || [];
@@ -483,11 +568,11 @@ var Info = function Info(_, ref) {
483
568
  var isSession = isSessionProduct(item);
484
569
  var sessionValue = {};
485
570
  if (isSession) {
486
- var _item$_extend2, _item$_extend3, _item$_extend4;
571
+ var _item$_extend6, _item$_extend7, _item$_extend8;
487
572
  sessionValue.startEndTime = {
488
- startDate: item === null || item === void 0 || (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.start_date,
489
- endDate: item === null || item === void 0 || (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.end_date,
490
- duration: item === null || item === void 0 || (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.duration
573
+ startDate: item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.start_date,
574
+ endDate: item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.end_date,
575
+ duration: item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.duration
491
576
  };
492
577
  }
493
578
 
@@ -614,6 +699,17 @@ var Info = function Info(_, ref) {
614
699
  }, [state.renderType, isNormalProduct]);
615
700
  var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
616
701
  var isNoSpecAndPackage = getIsNoSpecAndPackage(state.service.cacheItem);
702
+
703
+ // 商品组数据
704
+ var items = useMemo(function () {
705
+ var _getCurrentCacheItem;
706
+ return ((_getCurrentCacheItem = getCurrentCacheItem()) === null || _getCurrentCacheItem === void 0 || (_getCurrentCacheItem = _getCurrentCacheItem._extend) === null || _getCurrentCacheItem === void 0 ? void 0 : _getCurrentCacheItem.items) || [];
707
+ }, [getCurrentCacheItem(), state.service.cacheItem, currentResource, useTotal]);
708
+
709
+ // 是否是编辑组
710
+ var isEditGroup = useMemo(function () {
711
+ return items.length;
712
+ }, [items]);
617
713
  var handleNoteConfirm = function handleNoteConfirm(noteValue) {
618
714
  form.setFieldsValue({
619
715
  note: noteValue
@@ -657,7 +753,7 @@ var Info = function Info(_, ref) {
657
753
  }))));
658
754
  }, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 ? void 0 : _state$service8.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
659
755
  var price = useMemo(function () {
660
- var _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10;
756
+ var _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$service$cacheI11;
661
757
  return /*#__PURE__*/React.createElement(Col, {
662
758
  span: 24
663
759
  }, /*#__PURE__*/React.createElement(Form.Item, {
@@ -666,7 +762,7 @@ var Info = function Info(_, ref) {
666
762
  rules: [{
667
763
  required: true
668
764
  }],
669
- extra: useTotal !== ((_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
765
+ extra: useTotal !== ((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
670
766
  }, /*#__PURE__*/React.createElement(DiscountKeyboard.InputNumber, {
671
767
  style: {
672
768
  width: '100%'
@@ -676,8 +772,8 @@ var Info = function Info(_, ref) {
676
772
  prefix: state.amountSymbol,
677
773
  onChange: handleTotalChange,
678
774
  disabled: state.channelDisabledEdit,
679
- originalValue: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
680
- placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || '0',
775
+ originalValue: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || 0,
776
+ placeholder: ((_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total) || '0',
681
777
  size: "large",
682
778
  keyboardProps: {
683
779
  containerProps: {
@@ -686,7 +782,7 @@ var Info = function Info(_, ref) {
686
782
  selectType: 'dark'
687
783
  }
688
784
  })));
689
- }, [useTotal, (_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total, state.amountSymbol, state.channelDisabledEdit]);
785
+ }, [useTotal, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._extend) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.origin_total, state.amountSymbol, state.channelDisabledEdit]);
690
786
  var reason = useMemo(function () {
691
787
  return isReason ? /*#__PURE__*/React.createElement(Col, {
692
788
  span: 24
@@ -697,17 +793,30 @@ var Info = function Info(_, ref) {
697
793
  size: "large"
698
794
  }))) : null;
699
795
  }, [isReason]);
796
+ var DateCom = function DateCom(position) {
797
+ return /*#__PURE__*/React.createElement(DatePicker, {
798
+ className: "pisell-lowcode__booking-service-select-date",
799
+ disabledDate: function disabledDate(current) {
800
+ return _disabledDate(current, position, state.date.value);
801
+ },
802
+ size: "large",
803
+ style: {
804
+ width: '100%'
805
+ },
806
+ format: state.locale === 'en' ? 'DD/MM/YYYY' : 'YYYY-MM-DD'
807
+ });
808
+ };
700
809
  var startTime = useMemo(function () {
701
810
  var _state$bookingConfig4;
702
811
  return /*#__PURE__*/React.createElement(Col, {
703
812
  span: 12
704
813
  }, /*#__PURE__*/React.createElement(Form.Item, {
705
- label: locales.getText('pisell2.text.start_time'),
706
- name: "start_time",
814
+ label: locales.getText(isEditGroup ? 'pisell2.text.start_date' : 'pisell2.text.start_time'),
815
+ name: isEditGroup ? 'start_date' : 'start_time',
707
816
  rules: [{
708
817
  required: true
709
818
  }]
710
- }, SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
819
+ }, isEditGroup ? DateCom('start') : SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
711
820
  slice: (_state$bookingConfig4 = state.bookingConfig) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.config) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.basic) === null || _state$bookingConfig4 === void 0 || (_state$bookingConfig4 = _state$bookingConfig4.service_time) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.value,
712
821
  timePickerProps: {
713
822
  style: {
@@ -720,11 +829,22 @@ var Info = function Info(_, ref) {
720
829
  }
721
830
  }
722
831
  }) : null));
723
- }, [SelectTime, (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.basic) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.service_time) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.value]);
832
+ }, [SelectTime, (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.basic) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.service_time) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.value, isEditGroup]);
833
+ var endTime = useMemo(function () {
834
+ if (!isEditGroup) {
835
+ return null;
836
+ }
837
+ return /*#__PURE__*/React.createElement(Col, {
838
+ span: 12
839
+ }, /*#__PURE__*/React.createElement(Form.Item, {
840
+ label: locales.getText('pisell2.text.end_date'),
841
+ name: "end_date"
842
+ }, DateCom('end')));
843
+ }, [isEditGroup]);
724
844
  var duration = useMemo(function () {
725
845
  console.log('render form duration');
726
846
  return /*#__PURE__*/React.createElement(Col, {
727
- span: 12
847
+ span: isEditGroup ? 24 : 12
728
848
  }, /*#__PURE__*/React.createElement(Form.Item, {
729
849
  label: locales.getText('pisell2.text.duration'),
730
850
  name: "duration",
@@ -734,7 +854,7 @@ var Info = function Info(_, ref) {
734
854
  }, /*#__PURE__*/React.createElement(Duration, _extends({}, durationProps, {
735
855
  timeObj: timeObj
736
856
  }))));
737
- }, [durationProps, timeObj]);
857
+ }, [durationProps, timeObj, isEditGroup]);
738
858
  var resource = useMemo(function () {
739
859
  console.log('render form resource');
740
860
  return /*#__PURE__*/React.createElement(Form.Item, {
@@ -750,7 +870,32 @@ var Info = function Info(_, ref) {
750
870
  // useStartTime={useStartTime}
751
871
  }));
752
872
  // 只监听内部使用值
753
- }, [state.renderType, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._data) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.resources, (_state$service$cacheI13 = state.service.cacheItem) === null || _state$service$cacheI13 === void 0 || (_state$service$cacheI13 = _state$service$cacheI13._data) === null || _state$service$cacheI13 === void 0 ? void 0 : _state$service$cacheI13.resourceMaps]);
873
+ }, [state.renderType, (_state$service$cacheI13 = state.service.cacheItem) === null || _state$service$cacheI13 === void 0 || (_state$service$cacheI13 = _state$service$cacheI13._data) === null || _state$service$cacheI13 === void 0 ? void 0 : _state$service$cacheI13.resources, (_state$service$cacheI14 = state.service.cacheItem) === null || _state$service$cacheI14 === void 0 || (_state$service$cacheI14 = _state$service$cacheI14._data) === null || _state$service$cacheI14 === void 0 ? void 0 : _state$service$cacheI14.resourceMaps]);
874
+ var holder = useMemo(function () {
875
+ var _state$bookingConfig6, _state$service$cacheI15, _state$bookingConfig7;
876
+ var showExtra = (state === null || state === void 0 || (_state$bookingConfig6 = state.bookingConfig) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.config) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.basic) === null || _state$bookingConfig6 === void 0 ? void 0 : _state$bookingConfig6.subject_require) === 'require' && (!useHolderId || (useHolderId === null || useHolderId === void 0 ? void 0 : useHolderId.length) < ((_state$service$cacheI15 = state.service.cacheItem) === null || _state$service$cacheI15 === void 0 || (_state$service$cacheI15 = _state$service$cacheI15._extend) === null || _state$service$cacheI15 === void 0 ? void 0 : _state$service$cacheI15.quantity));
877
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
878
+ name: "holder_id",
879
+ style: {
880
+ width: '100%'
881
+ },
882
+ rules: [{
883
+ required: (state === null || state === void 0 || (_state$bookingConfig7 = state.bookingConfig) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.config) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.basic) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.subject_require) === 'require',
884
+ validator: function validator(rule, value, callback) {
885
+ debugger;
886
+ if (showExtra) {
887
+ callback(locales.getText('page.booking.text.holder.length-error'));
888
+ } else {
889
+ callback();
890
+ }
891
+ }
892
+ }]
893
+ }, /*#__PURE__*/React.createElement(Holder, {
894
+ state: state,
895
+ cacheItem: state.service.cacheItem,
896
+ dispatch: dispatch
897
+ })));
898
+ }, [state.pet, state.client, state.service.cacheItem, useHolderId]);
754
899
  var capacity = useMemo(function () {
755
900
  return /*#__PURE__*/React.createElement(Form.Item, {
756
901
  noStyle: true,
@@ -837,11 +982,11 @@ var Info = function Info(_, ref) {
837
982
  }, locales.getText('pisell2.text.apply')));
838
983
  }, [(_state$service$resour2 = state.service.resourcesOrigin) === null || _state$service$resour2 === void 0 ? void 0 : _state$service$resour2.length, isNormalProduct]);
839
984
  console.log('render edit');
840
- console.log(state.service.editModal && !((_state$service$cacheI14 = state.service.cacheItem) !== null && _state$service$cacheI14 !== void 0 && _state$service$cacheI14.autoClose), performance.now() - window.pp1, '打开商品1');
841
- var _useState5 = useState(false),
842
- _useState6 = _slicedToArray(_useState5, 2),
843
- val = _useState6[0],
844
- setVal = _useState6[1];
985
+ console.log(state.service.editModal && !((_state$service$cacheI16 = state.service.cacheItem) !== null && _state$service$cacheI16 !== void 0 && _state$service$cacheI16.autoClose), performance.now() - window.pp1, '打开商品1');
986
+ var _useState7 = useState(false),
987
+ _useState8 = _slicedToArray(_useState7, 2),
988
+ val = _useState8[0],
989
+ setVal = _useState8[1];
845
990
  useEffect(function () {
846
991
  if (isShowTimeAndResource) {
847
992
  setTimeout(function () {
@@ -851,6 +996,113 @@ var Info = function Info(_, ref) {
851
996
  setVal(false);
852
997
  }
853
998
  }, [isShowTimeAndResource]);
999
+ var groupDom = useMemo(function () {
1000
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !!isEditGroup && /*#__PURE__*/React.createElement(EditTabs, {
1001
+ value: currentTab,
1002
+ onChange: function onChange(e) {
1003
+ console.log(e);
1004
+ setCurrentTab(e);
1005
+ }
1006
+ }), /*#__PURE__*/React.createElement("div", {
1007
+ className: "",
1008
+ style: {
1009
+ display: currentTab === 'booking_list' ? 'block' : 'none'
1010
+ }
1011
+ }, /*#__PURE__*/React.createElement(BookingList, {
1012
+ items: items
1013
+ })));
1014
+ }, [isEditGroup, currentTab, items]);
1015
+ var updateMultiDay = /*#__PURE__*/function () {
1016
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
1017
+ var start_date, end_date, duration, cacheItem, fieldsValues;
1018
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1019
+ while (1) switch (_context.prev = _context.next) {
1020
+ case 0:
1021
+ start_date = _ref.start_date, end_date = _ref.end_date, duration = _ref.duration;
1022
+ _context.next = 3;
1023
+ return getMultiDay({
1024
+ start_date: start_date,
1025
+ end_date: end_date,
1026
+ state: state,
1027
+ cacheItem: getCurrentCacheItem()
1028
+ });
1029
+ case 3:
1030
+ cacheItem = _context.sent;
1031
+ // 兼容时长为空的情况
1032
+ if (duration !== undefined) {
1033
+ cacheItem._extend.duration = duration;
1034
+ }
1035
+ cacheItem._extend.items = createBookingItemsByGroup(cacheItem);
1036
+ cacheItem._extend = _objectSpread(_objectSpread({}, cacheItem._extend), getGroupTotalPrice(cacheItem._extend.items));
1037
+ // 覆盖商品
1038
+ dispatch({
1039
+ type: 'setService',
1040
+ payload: {
1041
+ cacheItem: cacheItem
1042
+ }
1043
+ });
1044
+ fieldsValues = {
1045
+ total: cacheItem._extend.total
1046
+ }; // 更新表单内的商品价格
1047
+ form.setFieldsValue(fieldsValues);
1048
+ case 10:
1049
+ case "end":
1050
+ return _context.stop();
1051
+ }
1052
+ }, _callee);
1053
+ }));
1054
+ return function updateMultiDay(_x) {
1055
+ return _ref2.apply(this, arguments);
1056
+ };
1057
+ }();
1058
+ var onValuesChange = function onValuesChange(changedValues) {
1059
+ // 跨日预约
1060
+ if (isEditGroup) {
1061
+ // 根据时长更新结束时间
1062
+ if (changedValues !== null && changedValues !== void 0 && changedValues.duration) {
1063
+ var end_date = dayjs(useStartDate).add(changedValues === null || changedValues === void 0 ? void 0 : changedValues.duration, 'day');
1064
+ form.setFieldsValue({
1065
+ end_date: end_date
1066
+ });
1067
+
1068
+ // 跨日预约报价单
1069
+ return updateMultiDay({
1070
+ start_date: useStartDate,
1071
+ end_date: end_date,
1072
+ duration: changedValues === null || changedValues === void 0 ? void 0 : changedValues.duration
1073
+ });
1074
+ }
1075
+
1076
+ // 验证结束日期
1077
+ if (changedValues !== null && changedValues !== void 0 && changedValues.start_date) {
1078
+ var startDate = dayjs(changedValues === null || changedValues === void 0 ? void 0 : changedValues.start_date);
1079
+ var endDate = dayjs(useEndDate);
1080
+ // 如果开始日期大于结束日期,则清空数据
1081
+ if (startDate.isAfter(endDate)) {
1082
+ return form.setFieldsValue({
1083
+ duration: undefined,
1084
+ end_date: undefined
1085
+ });
1086
+ }
1087
+ }
1088
+
1089
+ // 计算时长
1090
+ if (changedValues !== null && changedValues !== void 0 && changedValues.start_date || changedValues !== null && changedValues !== void 0 && changedValues.end_date) {
1091
+ var _cacheItem2 = getCurrentCacheItem();
1092
+ var _duration = getDays(_cacheItem2, 'days');
1093
+ var start_date = (changedValues === null || changedValues === void 0 ? void 0 : changedValues.start_date) || useStartDate;
1094
+ var _end_date = (changedValues === null || changedValues === void 0 ? void 0 : changedValues.end_date) || useEndDate;
1095
+ updateMultiDay({
1096
+ start_date: start_date,
1097
+ end_date: _end_date,
1098
+ duration: _duration
1099
+ });
1100
+ return form.setFieldsValue({
1101
+ duration: _duration
1102
+ });
1103
+ }
1104
+ }
1105
+ };
854
1106
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
855
1107
  titleNoWrap: true
856
1108
  //通过zIndex的方式控制 添加商品 和 编辑服务弹窗的上下层级
@@ -858,7 +1110,7 @@ var Info = function Info(_, ref) {
858
1110
  zIndex: state.service.changeService ? 999 : 1000,
859
1111
  forceRender: true,
860
1112
  mask: state.drawerMask,
861
- open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$cacheI15 = state.service.cacheItem) !== null && _state$service$cacheI15 !== void 0 && _state$service$cacheI15.autoClose),
1113
+ open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$cacheI17 = state.service.cacheItem) !== null && _state$service$cacheI17 !== void 0 && _state$service$cacheI17.autoClose),
862
1114
  title: locales.getText('pisell2.text.edit-service'),
863
1115
  onClose: function onClose() {
864
1116
  var _window$closeBookingE4, _window4;
@@ -874,16 +1126,20 @@ var Info = function Info(_, ref) {
874
1126
  }
875
1127
  }, /*#__PURE__*/React.createElement("div", {
876
1128
  className: "pisell-lowcode__booking-service-body-edit"
877
- }, /*#__PURE__*/React.createElement(Form, {
1129
+ }, groupDom, /*#__PURE__*/React.createElement(Form, {
878
1130
  layout: "vertical",
879
1131
  form: form,
880
- onFinish: onFinish
1132
+ onFinish: onFinish,
1133
+ onValuesChange: onValuesChange,
1134
+ style: {
1135
+ display: currentTab === 'batch_edit' ? 'block' : 'none'
1136
+ }
881
1137
  }, /*#__PURE__*/React.createElement(Row, {
882
1138
  style: {
883
1139
  width: '100%'
884
1140
  },
885
1141
  gutter: [16, 0]
886
- }, productName, price, reason, val && isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity), /*#__PURE__*/React.createElement(Form.Item, {
1142
+ }, productName, price, reason, val && isShowTimeAndResource && /*#__PURE__*/React.createElement(React.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !isNormalProductByDurationSchedule(state.service.cacheItem) && !isWalkIn((_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id) && holder), /*#__PURE__*/React.createElement(Form.Item, {
887
1143
  noStyle: true,
888
1144
  name: "note"
889
1145
  }, noteModalOpen && /*#__PURE__*/React.createElement(NoteModal, {