@pisell/private-materials 3.0.203 → 3.0.204

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 (292) 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 +1 -1
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +27 -12
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +33 -18
  11. package/es/components/booking/components/customSelect/index.d.ts +0 -1
  12. package/es/components/booking/components/customSelect/index.js +2 -6
  13. package/es/components/booking/components/footer/amount.js +22 -46
  14. package/es/components/booking/components/footer/index.js +40 -84
  15. package/es/components/booking/components/footer/utils.js +35 -266
  16. package/es/components/booking/forms/model.d.ts +1 -1
  17. package/es/components/booking/info/addServiceVariant/index.js +1 -8
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  19. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
  20. package/es/components/booking/info/clientVariant/vertical/index.js +9 -124
  21. package/es/components/booking/info/main.js +15 -28
  22. package/es/components/booking/info/model.js +0 -3
  23. package/es/components/booking/info/pet/index.js +5 -54
  24. package/es/components/booking/info/service/addService/index.js +96 -187
  25. package/es/components/booking/info/service/addService/index.less +3 -13
  26. package/es/components/booking/info/service/addService/utils.d.ts +2 -12
  27. package/es/components/booking/info/service/addService/utils.js +26 -103
  28. package/es/components/booking/info/service/editService/index.js +132 -435
  29. package/es/components/booking/info/service/editService/index.less +13 -18
  30. package/es/components/booking/info/service/serve.d.ts +0 -10
  31. package/es/components/booking/info/service/serve.js +0 -28
  32. package/es/components/booking/info/utils.d.ts +0 -20
  33. package/es/components/booking/info/utils.js +0 -37
  34. package/es/components/booking/locales.d.ts +0 -66
  35. package/es/components/booking/locales.js +3 -81
  36. package/es/components/booking/model.d.ts +1 -5
  37. package/es/components/booking/model.js +2 -4
  38. package/es/components/booking/notes/index.d.ts +1 -1
  39. package/es/components/booking/notes/model.d.ts +1 -1
  40. package/es/components/booking/payments/model.d.ts +1 -1
  41. package/es/components/booking/utils.d.ts +3 -12
  42. package/es/components/booking/utils.js +26 -143
  43. package/es/components/eftpos/form/index.js +12 -6
  44. package/es/components/eftpos/group/index.d.ts +1 -2
  45. package/es/components/eftpos/group/index.js +1 -2
  46. package/es/components/eftpos/hooks.d.ts +4 -4
  47. package/es/components/eftpos/index.js +2 -2
  48. package/es/components/eftpos/receipt/index.d.ts +24 -0
  49. package/es/components/eftpos/receipt/index.js +96 -0
  50. package/es/components/eftposPay/app.d.ts +11 -0
  51. package/es/components/eftposPay/app.js +173 -0
  52. package/es/components/eftposPay/component/fail/failCustom.js +1 -0
  53. package/es/components/eftposPay/component/fail/index.js +1 -0
  54. package/es/components/eftposPay/component/manual/index.js +4 -1
  55. package/es/components/eftposPay/component/step/index.d.ts +6 -6
  56. package/es/components/eftposPay/component/step/step.d.ts +4 -4
  57. package/es/components/eftposPay/const.d.ts +27 -1
  58. package/es/components/eftposPay/const.js +22 -0
  59. package/es/components/eftposPay/device.d.ts +1 -1
  60. package/es/components/eftposPay/device.js +2 -2
  61. package/es/components/eftposPay/helper.d.ts +6 -0
  62. package/es/components/eftposPay/helper.js +24 -4
  63. package/es/components/eftposPay/hooks.d.ts +2 -1
  64. package/es/components/eftposPay/hooks.js +22 -16
  65. package/es/components/eftposPay/index.d.ts +1 -1
  66. package/es/components/eftposPay/index.js +130 -179
  67. package/es/components/eftposPay/locales.d.ts +15 -0
  68. package/es/components/eftposPay/locales.js +15 -0
  69. package/es/components/eftposPay/payo/config.js +20 -8
  70. package/es/components/eftposPay/store/index.d.ts +1 -1
  71. package/es/components/eftposPay/tip.d.ts +10 -0
  72. package/es/components/eftposPay/tip.js +177 -0
  73. package/es/components/eftposPay/tip.less +9 -0
  74. package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
  75. package/es/components/eftposPay/tyro/index.js +55 -22
  76. package/es/components/eftposPay/windcave/helper.d.ts +1 -1
  77. package/es/components/eftposPay/windcave/windcave.js +17 -6
  78. package/es/components/schedules/index.d.ts +1 -1
  79. package/es/components/schedules/model.d.ts +1 -1
  80. package/es/index.d.ts +0 -1
  81. package/es/index.js +1 -2
  82. package/lib/components/booking/components/customSelect/index.d.ts +0 -1
  83. package/lib/components/booking/components/customSelect/index.js +2 -6
  84. package/lib/components/booking/components/footer/amount.js +8 -27
  85. package/lib/components/booking/components/footer/index.js +4 -25
  86. package/lib/components/booking/components/footer/utils.js +35 -161
  87. package/lib/components/booking/forms/model.d.ts +1 -1
  88. package/lib/components/booking/info/addServiceVariant/index.js +0 -5
  89. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  90. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
  91. package/lib/components/booking/info/clientVariant/vertical/index.js +11 -87
  92. package/lib/components/booking/info/main.js +9 -17
  93. package/lib/components/booking/info/model.js +0 -3
  94. package/lib/components/booking/info/pet/index.js +25 -61
  95. package/lib/components/booking/info/service/addService/index.js +84 -115
  96. package/lib/components/booking/info/service/addService/index.less +3 -13
  97. package/lib/components/booking/info/service/addService/utils.d.ts +2 -12
  98. package/lib/components/booking/info/service/addService/utils.js +10 -58
  99. package/lib/components/booking/info/service/editService/index.js +182 -425
  100. package/lib/components/booking/info/service/editService/index.less +13 -18
  101. package/lib/components/booking/info/service/serve.d.ts +0 -10
  102. package/lib/components/booking/info/service/serve.js +2 -7
  103. package/lib/components/booking/info/utils.d.ts +0 -20
  104. package/lib/components/booking/info/utils.js +0 -41
  105. package/lib/components/booking/locales.d.ts +0 -66
  106. package/lib/components/booking/locales.js +3 -69
  107. package/lib/components/booking/model.d.ts +1 -5
  108. package/lib/components/booking/model.js +2 -4
  109. package/lib/components/booking/notes/index.d.ts +1 -1
  110. package/lib/components/booking/notes/model.d.ts +1 -1
  111. package/lib/components/booking/payments/model.d.ts +1 -1
  112. package/lib/components/booking/utils.d.ts +3 -12
  113. package/lib/components/booking/utils.js +18 -89
  114. package/lib/components/eftpos/form/index.js +12 -6
  115. package/lib/components/eftpos/group/index.d.ts +1 -2
  116. package/lib/components/eftpos/group/index.js +0 -1
  117. package/lib/components/eftpos/hooks.d.ts +4 -4
  118. package/lib/components/eftpos/index.js +2 -2
  119. package/lib/components/eftpos/receipt/index.d.ts +24 -0
  120. package/lib/components/eftpos/receipt/index.js +88 -0
  121. package/lib/components/eftposPay/app.d.ts +11 -0
  122. package/lib/components/eftposPay/app.js +166 -0
  123. package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
  124. package/lib/components/eftposPay/component/fail/index.js +1 -1
  125. package/lib/components/eftposPay/component/manual/index.js +19 -5
  126. package/lib/components/eftposPay/component/step/index.d.ts +6 -6
  127. package/lib/components/eftposPay/component/step/step.d.ts +4 -4
  128. package/lib/components/eftposPay/const.d.ts +27 -1
  129. package/lib/components/eftposPay/const.js +18 -0
  130. package/lib/components/eftposPay/device.d.ts +1 -1
  131. package/lib/components/eftposPay/device.js +2 -2
  132. package/lib/components/eftposPay/helper.d.ts +6 -0
  133. package/lib/components/eftposPay/helper.js +29 -4
  134. package/lib/components/eftposPay/hooks.d.ts +2 -1
  135. package/lib/components/eftposPay/hooks.js +8 -2
  136. package/lib/components/eftposPay/index.d.ts +1 -1
  137. package/lib/components/eftposPay/index.js +106 -144
  138. package/lib/components/eftposPay/locales.d.ts +15 -0
  139. package/lib/components/eftposPay/locales.js +15 -0
  140. package/lib/components/eftposPay/payo/config.js +33 -9
  141. package/lib/components/eftposPay/store/index.d.ts +1 -1
  142. package/lib/components/eftposPay/tip.d.ts +10 -0
  143. package/lib/components/eftposPay/tip.js +159 -0
  144. package/lib/components/eftposPay/tip.less +9 -0
  145. package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
  146. package/lib/components/eftposPay/tyro/index.js +40 -9
  147. package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
  148. package/lib/components/eftposPay/windcave/windcave.js +29 -6
  149. package/lib/components/schedules/index.d.ts +1 -1
  150. package/lib/components/schedules/model.d.ts +1 -1
  151. package/lib/index.d.ts +0 -1
  152. package/lib/index.js +0 -3
  153. package/package.json +5 -5
  154. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  155. package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
  156. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  157. package/es/components/booking/info/Provider.d.ts +0 -0
  158. package/es/components/booking/info/Provider.js +0 -54
  159. package/es/components/booking/info/dateRange/index.d.ts +0 -5
  160. package/es/components/booking/info/dateRange/index.js +0 -98
  161. package/es/components/booking/info/dateRange/index.less +0 -21
  162. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  163. package/es/components/booking/info/pet/ChangePetModal/index.js +0 -134
  164. package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
  165. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
  166. package/es/components/booking/info/service/editService/BookingList/index.js +0 -39
  167. package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
  168. package/es/components/booking/info/service/editService/EditTabs/index.js +0 -35
  169. package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
  170. package/es/components/booking/info/service/serviceManager/distributeDiscount.js +0 -55
  171. package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
  172. package/es/components/booking/info/service/serviceManager/index.js +0 -277
  173. package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  174. package/es/components/booking/info/service/serviceManager/utils.js +0 -0
  175. package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
  176. package/es/components/booking/info/service2/Group/utils.js +0 -146
  177. package/es/components/booking/info/service2/Lists.d.ts +0 -3
  178. package/es/components/booking/info/service2/Lists.js +0 -152
  179. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  180. package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
  181. package/es/components/booking/info/service2/index.d.ts +0 -6
  182. package/es/components/booking/info/service2/index.js +0 -57
  183. package/es/components/booking/info/service2/status.d.ts +0 -31
  184. package/es/components/booking/info/service2/status.js +0 -78
  185. package/es/components/booking/info/service2/utils.d.ts +0 -237
  186. package/es/components/booking/info/service2/utils.js +0 -1064
  187. package/es/components/booking/materiels/holder/index.d.ts +0 -7
  188. package/es/components/booking/materiels/holder/index.js +0 -51
  189. package/es/components/shoppingCart/Provider.d.ts +0 -3
  190. package/es/components/shoppingCart/Provider.js +0 -86
  191. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  192. package/es/components/shoppingCart/components/Cart/Product.js +0 -68
  193. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
  194. package/es/components/shoppingCart/components/Cart/index.js +0 -72
  195. package/es/components/shoppingCart/components/Cart/index.less +0 -68
  196. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
  197. package/es/components/shoppingCart/components/Empty/index.js +0 -14
  198. package/es/components/shoppingCart/components/Empty/index.less +0 -19
  199. package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
  200. package/es/components/shoppingCart/components/Render/index.js +0 -69
  201. package/es/components/shoppingCart/components/Render/index.less +0 -2
  202. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  203. package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -132
  204. package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  205. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  206. package/es/components/shoppingCart/hooks/useAddService.js +0 -23
  207. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  208. package/es/components/shoppingCart/hooks/useClearCart.js +0 -59
  209. package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
  210. package/es/components/shoppingCart/hooks/useContext.js +0 -5
  211. package/es/components/shoppingCart/index.d.ts +0 -4
  212. package/es/components/shoppingCart/index.js +0 -24
  213. package/es/components/shoppingCart/locales.d.ts +0 -33
  214. package/es/components/shoppingCart/locales.js +0 -38
  215. package/es/components/shoppingCart/mock.d.ts +0 -40
  216. package/es/components/shoppingCart/mock.js +0 -40
  217. package/es/components/shoppingCart/status.d.ts +0 -2
  218. package/es/components/shoppingCart/status.js +0 -22
  219. package/es/components/shoppingCart/type.d.ts +0 -39
  220. package/es/components/shoppingCart/type.js +0 -1
  221. package/es/components/shoppingCart/utils.d.ts +0 -63
  222. package/es/components/shoppingCart/utils.js +0 -116
  223. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  224. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
  225. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  226. package/lib/components/booking/info/Provider.d.ts +0 -0
  227. package/lib/components/booking/info/Provider.js +0 -0
  228. package/lib/components/booking/info/dateRange/index.d.ts +0 -5
  229. package/lib/components/booking/info/dateRange/index.js +0 -111
  230. package/lib/components/booking/info/dateRange/index.less +0 -21
  231. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  232. package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -121
  233. package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
  234. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
  235. package/lib/components/booking/info/service/editService/BookingList/index.js +0 -55
  236. package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
  237. package/lib/components/booking/info/service/editService/EditTabs/index.js +0 -75
  238. package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
  239. package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +0 -70
  240. package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
  241. package/lib/components/booking/info/service/serviceManager/index.js +0 -207
  242. package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  243. package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
  244. package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
  245. package/lib/components/booking/info/service2/Group/utils.js +0 -142
  246. package/lib/components/booking/info/service2/Lists.d.ts +0 -3
  247. package/lib/components/booking/info/service2/Lists.js +0 -115
  248. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  249. package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
  250. package/lib/components/booking/info/service2/index.d.ts +0 -6
  251. package/lib/components/booking/info/service2/index.js +0 -75
  252. package/lib/components/booking/info/service2/status.d.ts +0 -31
  253. package/lib/components/booking/info/service2/status.js +0 -81
  254. package/lib/components/booking/info/service2/utils.d.ts +0 -237
  255. package/lib/components/booking/info/service2/utils.js +0 -678
  256. package/lib/components/booking/materiels/holder/index.d.ts +0 -7
  257. package/lib/components/booking/materiels/holder/index.js +0 -65
  258. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  259. package/lib/components/shoppingCart/Provider.js +0 -110
  260. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  261. package/lib/components/shoppingCart/components/Cart/Product.js +0 -73
  262. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
  263. package/lib/components/shoppingCart/components/Cart/index.js +0 -77
  264. package/lib/components/shoppingCart/components/Cart/index.less +0 -68
  265. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
  266. package/lib/components/shoppingCart/components/Empty/index.js +0 -43
  267. package/lib/components/shoppingCart/components/Empty/index.less +0 -19
  268. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
  269. package/lib/components/shoppingCart/components/Render/index.js +0 -75
  270. package/lib/components/shoppingCart/components/Render/index.less +0 -2
  271. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  272. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
  273. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  274. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  275. package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
  276. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  277. package/lib/components/shoppingCart/hooks/useClearCart.js +0 -66
  278. package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
  279. package/lib/components/shoppingCart/hooks/useContext.js +0 -31
  280. package/lib/components/shoppingCart/index.d.ts +0 -4
  281. package/lib/components/shoppingCart/index.js +0 -60
  282. package/lib/components/shoppingCart/locales.d.ts +0 -33
  283. package/lib/components/shoppingCart/locales.js +0 -56
  284. package/lib/components/shoppingCart/mock.d.ts +0 -40
  285. package/lib/components/shoppingCart/mock.js +0 -76
  286. package/lib/components/shoppingCart/status.d.ts +0 -2
  287. package/lib/components/shoppingCart/status.js +0 -60
  288. package/lib/components/shoppingCart/type.d.ts +0 -39
  289. package/lib/components/shoppingCart/type.js +0 -17
  290. package/lib/components/shoppingCart/utils.d.ts +0 -63
  291. package/lib/components/shoppingCart/utils.js +0 -86
  292. package/lowcode/shopping-cart/meta.ts +0 -98
@@ -32,18 +32,14 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
32
32
  import { formatAddFormValues } from "../../../forms/format";
33
33
  import { moveItemToFront } from "../../utils";
34
34
  import { request } from "../../../utils";
35
- import { isDayBooking, isOpenDeletePet, getPets, getAppointmentService, updateServicePrice } from "../../service2/utils";
36
- import ChangePetModal from "../../pet/ChangePetModal";
37
- import { walkInData } from "../../model";
38
35
  var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
39
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$pet6, _state$pet6$formData, _state$pet6$formData$, _state$pet8, _state$client$value4, _state$bookingConfig17, _state$bookingConfig18, _state$bookingConfig19, _state$pet9, _state$pet9$formData, _state$bookingConfig20, _state$bookingConfig21, _state$service2, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig22, _state$client6;
36
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$pet6, _state$pet6$formData, _state$pet6$formData$, _state$pet8, _state$client$value4, _state$bookingConfig17, _state$bookingConfig18, _state$bookingConfig19, _state$pet9, _state$pet9$formData, _state$bookingConfig20, _state$bookingConfig21, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig22, _state$client6;
40
37
  var globalState = props.globalState,
41
38
  setGlobalState = props.setGlobalState;
42
39
  var modalRef = useRef();
43
40
  var state = globalState;
44
41
  var stateRef = useRef(state);
45
42
  var prevCustomerId = useRef(null);
46
- var changePetRef = useRef(null);
47
43
  var context = useEngineContext();
48
44
  var _useState = useState(true),
49
45
  _useState2 = _slicedToArray(_useState, 2),
@@ -97,13 +93,6 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
97
93
  pet: _objectSpread(_objectSpread({}, stateRef.current.pet), payload)
98
94
  });
99
95
  }
100
-
101
- // 设置服务
102
- if (type === 'setService') {
103
- setGlobalState({
104
- service: _objectSpread(_objectSpread({}, stateRef.current.service), payload)
105
- });
106
- }
107
96
  };
108
97
  var boardConfig = useMemo(function () {
109
98
  var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
@@ -121,21 +110,6 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
121
110
  }
122
111
  }, [state === null || state === void 0 ? void 0 : (_state$bookingConfig8 = state.bookingConfig) === null || _state$bookingConfig8 === void 0 ? void 0 : (_state$bookingConfig9 = _state$bookingConfig8.config) === null || _state$bookingConfig9 === void 0 ? void 0 : (_state$bookingConfig10 = _state$bookingConfig9.basic) === null || _state$bookingConfig10 === void 0 ? void 0 : (_state$bookingConfig11 = _state$bookingConfig10.appointment_customer) === null || _state$bookingConfig11 === void 0 ? void 0 : _state$bookingConfig11.type, state === null || state === void 0 ? void 0 : state.modalOpen]);
123
112
  var handleSelectPet = function handleSelectPet(val) {
124
- // 跨日预约,更改表单的时候打开弹窗提示
125
- if (isDayBooking(state)) {
126
- var _isOpenDeletePet = isOpenDeletePet(state, val),
127
- ids = _isOpenDeletePet.ids,
128
- lists = _isOpenDeletePet.lists;
129
- if ((ids === null || ids === void 0 ? void 0 : ids.length) > 0 && (lists === null || lists === void 0 ? void 0 : lists.length) > 0) {
130
- var _changePetRef$current, _state$service;
131
- (_changePetRef$current = changePetRef.current) === null || _changePetRef$current === void 0 ? void 0 : _changePetRef$current.open({
132
- ids: ids,
133
- setGlobalState: setGlobalState,
134
- service: ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [],
135
- state: state
136
- });
137
- }
138
- }
139
113
  setGlobalState({
140
114
  pet: _objectSpread(_objectSpread({}, state.pet), {}, {
141
115
  edit: true,
@@ -272,8 +246,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
272
246
  }, [isWalkIn, formId, (_state$client$value4 = state.client.value) === null || _state$client$value4 === void 0 ? void 0 : _state$client$value4.id, currentPetValue, boardConfig]);
273
247
  var petRender = useMemo(function () {
274
248
  var _state$bookingConfig14, _state$bookingConfig15, _state$bookingConfig16;
275
- // 跨日预约需要显示pet
276
- if ((state !== null && state !== void 0 && state.disabledEdit || boardConfig.type !== 'form') && !isDayBooking(state)) {
249
+ if (state !== null && state !== void 0 && state.disabledEdit || boardConfig.type !== 'form') {
277
250
  return null;
278
251
  }
279
252
  return /*#__PURE__*/React.createElement(React.Fragment, null, !(currentPetValue !== null && currentPetValue !== void 0 && currentPetValue.length) && !isHasFormRecord && !isWalkIn && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Empty, {
@@ -318,7 +291,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
318
291
  },
319
292
  previewItemTitleRender: previewItemTitleRender
320
293
  }));
321
- }, [isWalkIn, isHasFormRecord, state === null || state === void 0 ? void 0 : state.disabledEdit, boardConfig.type, state === null || state === void 0 ? void 0 : (_state$bookingConfig17 = state.bookingConfig) === null || _state$bookingConfig17 === void 0 ? void 0 : (_state$bookingConfig18 = _state$bookingConfig17.holder) === null || _state$bookingConfig18 === void 0 ? void 0 : (_state$bookingConfig19 = _state$bookingConfig18.form) === null || _state$bookingConfig19 === void 0 ? void 0 : _state$bookingConfig19.title, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : _state$pet9$formData[0], state, petDispatch, handleOpenModal, handleOpenClientModal, previewItemTitleRender, handleAddPet, currentPetValue, formId, state === null || state === void 0 ? void 0 : (_state$bookingConfig20 = state.bookingConfig) === null || _state$bookingConfig20 === void 0 ? void 0 : (_state$bookingConfig21 = _state$bookingConfig20.holder) === null || _state$bookingConfig21 === void 0 ? void 0 : _state$bookingConfig21.data_range, (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value]);
294
+ }, [isWalkIn, isHasFormRecord, state === null || state === void 0 ? void 0 : state.disabledEdit, boardConfig.type, state === null || state === void 0 ? void 0 : (_state$bookingConfig17 = state.bookingConfig) === null || _state$bookingConfig17 === void 0 ? void 0 : (_state$bookingConfig18 = _state$bookingConfig17.holder) === null || _state$bookingConfig18 === void 0 ? void 0 : (_state$bookingConfig19 = _state$bookingConfig18.form) === null || _state$bookingConfig19 === void 0 ? void 0 : _state$bookingConfig19.title, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : _state$pet9$formData[0], state, petDispatch, handleOpenModal, handleOpenClientModal, previewItemTitleRender, handleAddPet, currentPetValue, formId, state === null || state === void 0 ? void 0 : (_state$bookingConfig20 = state.bookingConfig) === null || _state$bookingConfig20 === void 0 ? void 0 : (_state$bookingConfig21 = _state$bookingConfig20.holder) === null || _state$bookingConfig21 === void 0 ? void 0 : _state$bookingConfig21.data_range]);
322
295
  var handleOpenClient = function handleOpenClient() {
323
296
  if (!isWalkIn || state !== null && state !== void 0 && state.disableEventBookingEdit) {
324
297
  return;
@@ -333,91 +306,6 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
333
306
  setSearch: (_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 ? void 0 : _modalRef$current2.setSearch
334
307
  };
335
308
  });
336
-
337
- /**
338
- * @title: 是否打开更改商品弹窗
339
- * @description:
340
- * @param {*} useMemo
341
- * @return {*}
342
- * @Author: WangHan
343
- * @Date: 2024-12-30 22:40
344
- */
345
- var isOpenDeleteProduct = useMemo(function () {
346
- if (!isDayBooking(state)) return false;
347
- var pets = getPets(state);
348
- var appointmentServices = getAppointmentService(state);
349
- if (pets !== null && pets !== void 0 && pets.length && appointmentServices !== null && appointmentServices !== void 0 && appointmentServices.length) {
350
- return true;
351
- }
352
- return false;
353
- }, [state]);
354
-
355
- /**
356
- * @title: 更改了客户
357
- * @description:
358
- * @param {any} e
359
- * @return {*}
360
- * @Author: WangHan
361
- * @Date: 2024-12-31 14:48
362
- */
363
- var _handleSelectClient = /*#__PURE__*/function () {
364
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
365
- var _state$service3, _state$service3$value, _state$client$value5, _value, _state, _changePetRef$current2, _state$service4, services;
366
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
367
- while (1) switch (_context2.prev = _context2.next) {
368
- case 0:
369
- handleSelectClient(e);
370
- if (!isDayBooking(state)) {
371
- _context2.next = 13;
372
- break;
373
- }
374
- _value = (e === null || e === void 0 ? void 0 : e[e.length - 1]) || walkInData;
375
- if (!_value.loading) {
376
- _context2.next = 5;
377
- break;
378
- }
379
- return _context2.abrupt("return");
380
- case 5:
381
- if (!(isDayBooking(state) && (state === null || state === void 0 ? void 0 : (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : (_state$service3$value = _state$service3.value) === null || _state$service3$value === void 0 ? void 0 : _state$service3$value.length) > 0 && ((_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.id) !== (_value === null || _value === void 0 ? void 0 : _value.id))) {
382
- _context2.next = 13;
383
- break;
384
- }
385
- _state = _objectSpread(_objectSpread({}, state), {}, {
386
- client: _objectSpread(_objectSpread({}, state.client), {}, {
387
- value: _objectSpread(_objectSpread({}, _value), {}, {
388
- name: getNickname(_value)
389
- })
390
- })
391
- }); // 表单数据并且有预约商品数据,则更新客户后将预约商品数据清空
392
- if (isOpenDeleteProduct) {
393
- (_changePetRef$current2 = changePetRef.current) === null || _changePetRef$current2 === void 0 ? void 0 : _changePetRef$current2.open({
394
- setGlobalState: setGlobalState,
395
- service: ((_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.value) || [],
396
- state: state,
397
- source: 'changeClient'
398
- });
399
- }
400
- _context2.next = 10;
401
- return updateServicePrice(_state);
402
- case 10:
403
- services = _context2.sent;
404
- console.log(services, state, _value, isOpenDeleteProduct, 'wh98797686');
405
- setGlobalState({
406
- service: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
407
- value: services,
408
- edit: true
409
- })
410
- });
411
- case 13:
412
- case "end":
413
- return _context2.stop();
414
- }
415
- }, _callee2);
416
- }));
417
- return function _handleSelectClient(_x2) {
418
- return _ref3.apply(this, arguments);
419
- };
420
- }();
421
309
  return /*#__PURE__*/React.createElement("div", {
422
310
  className: classNames('pisell-lowcode__booking-vertical-client-wrap', _defineProperty({}, 'create-booking-page-vertical-client-wrap', state.isBookingCreatePage))
423
311
  }, /*#__PURE__*/React.createElement("div", {
@@ -431,7 +319,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
431
319
  round: true
432
320
  }, /*#__PURE__*/React.createElement(Avatar, {
433
321
  className: "pisell-lowcode__booking-client-avatar",
434
- src: image.ali((_state$client$value6 = state.client.value) === null || _state$client$value6 === void 0 ? void 0 : _state$client$value6.cover, 100),
322
+ src: image.ali((_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.cover, 100),
435
323
  size: 64,
436
324
  icon: /*#__PURE__*/React.createElement(User01, {
437
325
  className: "pisell-lowcode__booking-client-list-item-avatar-icon"
@@ -444,11 +332,11 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
444
332
  className: "pisell-lowcode__booking-client-desc-item"
445
333
  }, locales.getText('pisell2.text.leave-empty-for-walk-in'))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
446
334
  className: "pisell-lowcode__booking-client-title"
447
- }, getNickname(state.client.value)), (_state$client$value7 = state.client.value) !== null && _state$client$value7 !== void 0 && _state$client$value7.email ? /*#__PURE__*/React.createElement("div", {
335
+ }, getNickname(state.client.value)), (_state$client$value6 = state.client.value) !== null && _state$client$value6 !== void 0 && _state$client$value6.email ? /*#__PURE__*/React.createElement("div", {
448
336
  className: "pisell-lowcode__booking-client-desc-item"
449
- }, (_state$client$value8 = state.client.value) === null || _state$client$value8 === void 0 ? void 0 : _state$client$value8.email) : null, (_state$client$value9 = state.client.value) !== null && _state$client$value9 !== void 0 && _state$client$value9.phone ? /*#__PURE__*/React.createElement("div", {
337
+ }, (_state$client$value7 = state.client.value) === null || _state$client$value7 === void 0 ? void 0 : _state$client$value7.email) : null, (_state$client$value8 = state.client.value) !== null && _state$client$value8 !== void 0 && _state$client$value8.phone ? /*#__PURE__*/React.createElement("div", {
450
338
  className: "pisell-lowcode__booking-client-desc-item"
451
- }, (_state$client$value10 = state.client.value) === null || _state$client$value10 === void 0 ? void 0 : _state$client$value10.phone) : null), !isWalkIn && /*#__PURE__*/React.createElement("div", {
339
+ }, (_state$client$value9 = state.client.value) === null || _state$client$value9 === void 0 ? void 0 : _state$client$value9.phone) : null), !isWalkIn && /*#__PURE__*/React.createElement("div", {
452
340
  className: "pisell-lowcode__booking-client-action-wrap"
453
341
  }, !state.disabledEdit && /*#__PURE__*/React.createElement(Dropdown.Button, {
454
342
  menu: {
@@ -486,7 +374,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
486
374
  autoFocus: !(context !== null && context !== void 0 && (_context$appHelper2 = context.appHelper) !== null && _context$appHelper2 !== void 0 && (_context$appHelper2$u = _context$appHelper2.utils) !== null && _context$appHelper2$u !== void 0 && (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) !== null && _context$appHelper2$u2 !== void 0 && _context$appHelper2$u2.call(_context$appHelper2$u)),
487
375
  ref: modalRef,
488
376
  onClose: handleClose,
489
- handleSelectClient: _handleSelectClient,
377
+ handleSelectClient: handleSelectClient,
490
378
  handleCreateItem: handleCreateItem,
491
379
  childrenValue: state.pet.value,
492
380
  handleSelectPet: handleSelectPet,
@@ -498,10 +386,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
498
386
  loadMore: loadMore,
499
387
  showPet: (boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.type) === 'form',
500
388
  handleAddPet: handleAddPet,
501
- franchiseeLoading: franchiseeLoading,
502
- showWalkIn: !isDayBooking(state)
503
- }), /*#__PURE__*/React.createElement(ChangePetModal, {
504
- ref: changePetRef
389
+ franchiseeLoading: franchiseeLoading
505
390
  }));
506
391
  });
507
392
  export default VerticalClient;
@@ -23,20 +23,18 @@ import Notes from "./notes";
23
23
  import "./index.less";
24
24
  import classNames from 'classnames';
25
25
  import { Skeleton } from 'antd';
26
- import { Service2Cart } from "./service2";
27
- import { isDayBooking, isTerminalDayBooking } from "./service2/utils";
28
26
  import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
29
27
  var defaultModules = {
30
28
  client: 1,
31
29
  date: 1,
32
30
  service: 1,
33
31
  holder: 1,
34
- note: 1,
35
- service2: 0
32
+ note: 1
36
33
  };
37
34
  locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
38
35
  var Info = Provider(function (props) {
39
- var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state5, _modal$state5$notes, _context$appHelper4, _context$appHelper4$u, _classNames, _modal$state6;
36
+ var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _classNames, _modal$state5, _React$createElement;
37
+ // return <Payments {...props} />;
40
38
  var style = props.style,
41
39
  globalState = props.globalState,
42
40
  _props$modules = props.modules,
@@ -79,8 +77,7 @@ var Info = Provider(function (props) {
79
77
  }, globalState), {}, {
80
78
  isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
81
79
  isFranchisee: isFranchisee,
82
- timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone,
83
- isDayBooking: (globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === 'dayBooking'
80
+ timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
84
81
  })
85
82
  });
86
83
  }, [JSON.stringify(globalState)]);
@@ -108,38 +105,28 @@ var Info = Provider(function (props) {
108
105
  });
109
106
  }, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
110
107
  var notes = useMemo(function () {
111
- var _modal$state4, _modal$state4$notes;
108
+ var _modal$state3, _modal$state3$notes;
112
109
  if (!modules.note) {
113
110
  return null;
114
111
  }
115
-
116
- // 跨日预约一直显示备注
117
- if (isDayBooking(globalState)) {
118
- var _modal$state3, _modal$state3$notes;
119
- return /*#__PURE__*/React.createElement(AddNote, {
120
- value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
121
- onChange: addNote
122
- });
123
- }
124
112
  return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' || globalState.isBookingCreatePage ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
125
- value: (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote,
113
+ value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
126
114
  onChange: addNote
127
115
  });
128
- }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state5 = modal.state) === null || _modal$state5 === void 0 ? void 0 : (_modal$state5$notes = _modal$state5.notes) === null || _modal$state5$notes === void 0 ? void 0 : _modal$state5$notes.orderNote]);
129
- return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, {
130
- style: _objectSpread(_objectSpread({}, style), {}, {
131
- height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
132
- }),
116
+ }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
117
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
118
+ style: style,
133
119
  header: header,
134
120
  footer: /*#__PURE__*/React.createElement(Footer, {
135
121
  state: modal.state,
136
122
  dispatch: modal.dispatch,
137
123
  source: "info"
138
- }),
139
- bodyClassName: classNames('booking-info-warp', (_classNames = {}, _defineProperty(_classNames, 'create-booking-page-info-wrap', isBookingCreatePage), _defineProperty(_classNames, 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode && !isTerminalDayBooking(modal.state)), _classNames))
140
- }, /*#__PURE__*/React.createElement("div", {
124
+ })
125
+ }, _defineProperty(_React$createElement, "style", {
126
+ height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
127
+ }), _defineProperty(_React$createElement, "bodyClassName", classNames('booking-info-warp', (_classNames = {}, _defineProperty(_classNames, 'create-booking-page-info-wrap', isBookingCreatePage), _defineProperty(_classNames, 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode), _classNames))), _React$createElement), /*#__PURE__*/React.createElement("div", {
141
128
  className: "booking-info"
142
- }, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state6 = modal.state) !== null && _modal$state6 !== void 0 && _modal$state6.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
129
+ }, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
143
130
  loading: globalState.loading,
144
131
  round: true,
145
132
  active: true,
@@ -147,6 +134,6 @@ var Info = Provider(function (props) {
147
134
  style: {
148
135
  paddingTop: 20
149
136
  }
150
- }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, modules.service2 ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service2Cart, null) : null) : null, notes, slot ? slot : null))) : null);
137
+ }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null))) : null);
151
138
  });
152
139
  export default Info;
@@ -64,9 +64,6 @@ var _miniRedux = miniRedux({
64
64
  _val.disabledEdit = false;
65
65
  }
66
66
  state.setGlobalState(_val);
67
- },
68
- setActiveCartId: function setActiveCartId(state, payload) {
69
- state.setGlobalState(payload);
70
67
  }
71
68
  },
72
69
  reducers: {
@@ -18,7 +18,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
18
18
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
19
19
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
- import React, { useContext, useEffect, useMemo, useState, useRef } from 'react';
21
+ import React, { useContext, useEffect, useMemo, useState } from 'react';
22
22
  import User01 from '@pisell/icon/es/User01';
23
23
  import { Context } from "../model";
24
24
  import { Avatar, Skeleton, Button } from 'antd';
@@ -28,9 +28,7 @@ import FormsCom from "../../forms/forms";
28
28
  import { changeFormValues, sortFormValues } from "../../forms/format";
29
29
  import { isWalkIn } from "../../utils";
30
30
  import useEngineContext from "../../../../hooks/useEngineContext";
31
- import { useMemoizedFn } from 'ahooks';
32
- import { isDayBooking } from "../../info/service2/utils";
33
- import ChangePetModal from "./ChangePetModal";
31
+ import { useMemoizedFn } from "ahooks";
34
32
  var defaultParams = {
35
33
  skip: 1,
36
34
  num: 20,
@@ -66,7 +64,6 @@ var Pet = function Pet(props) {
66
64
  _useState8 = _slicedToArray(_useState7, 2),
67
65
  params = _useState8[0],
68
66
  setParams = _useState8[1];
69
- var changePetRef = useRef(null);
70
67
  state = state || (props === null || props === void 0 ? void 0 : props.state);
71
68
  dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
72
69
  // board设置, 获取预约主体
@@ -301,19 +298,10 @@ var Pet = function Pet(props) {
301
298
  var cur = _toConsumableArray(state.pet.value[petForm.form_id] || []);
302
299
  var options = ((_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : (_state$pet3$formData = _state$pet3.formData) === null || _state$pet3$formData === void 0 ? void 0 : (_state$pet3$formData$ = _state$pet3$formData[0]) === null || _state$pet3$formData$ === void 0 ? void 0 : _state$pet3$formData$.options) || [];
303
300
  if (res.type === 'delete') {
304
- var isDay = isDayBooking(state);
305
-
306
- // 跨日预约在不能编辑情况下不能删除
307
- if (isDay && state.disabledEdit) return cur;
308
301
  cur = cur.filter(function (d) {
309
302
  return d.form_record_id !== item.form_record_id;
310
303
  });
311
304
  _addCallback();
312
-
313
- // 跨日预约移除的时候则删除商品数据
314
- if (isDay) {
315
- handleDayChange(item);
316
- }
317
305
  } else {
318
306
  var obj = {
319
307
  customer: item === null || item === void 0 ? void 0 : item.customer,
@@ -488,41 +476,6 @@ var Pet = function Pet(props) {
488
476
  }
489
477
  }, locales.getText('pisell2.text.load-more'))) : null;
490
478
  }, [loadLoading, params, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : (_state$pet9$formData$ = _state$pet9$formData[0]) === null || _state$pet9$formData$ === void 0 ? void 0 : (_state$pet9$formData$2 = _state$pet9$formData$.options) === null || _state$pet9$formData$2 === void 0 ? void 0 : _state$pet9$formData$2.length]);
491
- var handleDayChange = function handleDayChange(e) {
492
- var _state$service$value;
493
- var id = e === null || e === void 0 ? void 0 : e.form_record_id;
494
- var service = (_state$service$value = state.service.value) === null || _state$service$value === void 0 ? void 0 : _state$service$value.filter(function (item) {
495
- return item._extend.holder_id === id;
496
- });
497
-
498
- // 有form_id 并且购物车下有商品数据
499
- if (id && service !== null && service !== void 0 && service.length) {
500
- var _state$service;
501
- changePetRef === null || changePetRef === void 0 ? void 0 : changePetRef.current.open({
502
- ids: [id],
503
- dispatch: dispatch,
504
- service: ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || []
505
- });
506
- }
507
- };
508
-
509
- /**
510
- * @title: 跨日预约其他自定义方法
511
- * @description:
512
- * @param {*} useMemo
513
- * @return {*}
514
- * @Author: WangHan
515
- * @Date: 2024-12-12 22:30
516
- */
517
- var dayCustomSelect = useMemo(function () {
518
- var isDay = isDayBooking(state);
519
- if (isDay) {
520
- return {
521
- handleDayChange: handleDayChange
522
- };
523
- }
524
- return {};
525
- }, [state.renderType, state.service.value]);
526
479
  return useMemo(function () {
527
480
  var _state$client11;
528
481
  return /*#__PURE__*/React.createElement("div", {
@@ -549,7 +502,7 @@ var Pet = function Pet(props) {
549
502
  value: state.pet.value,
550
503
  onChange: onValueChange,
551
504
  client: (_state$client11 = state.client) === null || _state$client11 === void 0 ? void 0 : _state$client11.value,
552
- customSelectProps: _objectSpread({
505
+ customSelectProps: {
553
506
  loading: loading,
554
507
  handleViewItem: handleViewItem,
555
508
  virtualListHeight: window.innerHeight - 213 - 57 - 16,
@@ -567,7 +520,7 @@ var Pet = function Pet(props) {
567
520
  },
568
521
  handleOpenModal: handleOpenModal,
569
522
  previewItemTitleRender: previewItemTitleRender
570
- }, dayCustomSelect),
523
+ },
571
524
  optionRender: function optionRender(item) {
572
525
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
573
526
  className: "pisell-lowcode__booking-pet-list-item-avatar",
@@ -625,9 +578,7 @@ var Pet = function Pet(props) {
625
578
  return addCallback;
626
579
  }()
627
580
  }, addButtonProps)
628
- })), /*#__PURE__*/React.createElement(ChangePetModal, {
629
- ref: changePetRef
630
- }));
581
+ })));
631
582
  }, [valueLoading, hideTitle, state.pet.value, state.pet.formData, state.action, state.modalOpen, state.pet.value, (_state$client12 = state.client) === null || _state$client12 === void 0 ? void 0 : _state$client12.value, loading, state.disabledEdit, state.isTerminal, state.disableEventBookingEdit, params.search, loadMore, addButtonProps, state.isBookingCreatePage]);
632
583
  };
633
584
  export default Pet;