@pisell/private-materials 6.6.4 → 6.6.6

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 (411) 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 +7 -7
  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/Footer/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Services/index.js +25 -22
  14. package/es/components/appointmentBooking/components/Voucher/index.js +15 -1
  15. package/es/components/booking/addons/index.js +25 -17
  16. package/es/components/booking/components/actionButtons/index.js +3 -1
  17. package/es/components/booking/components/footer/amount.d.ts +1 -0
  18. package/es/components/booking/components/footer/amount.js +548 -84
  19. package/es/components/booking/components/footer/index.js +36 -33
  20. package/es/components/booking/components/footer/utils.d.ts +19 -0
  21. package/es/components/booking/components/footer/utils.js +166 -67
  22. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  23. package/es/components/booking/components/voucher/index.js +53 -15
  24. package/es/components/booking/forms/table/index.d.ts +0 -1
  25. package/es/components/booking/hooks/useQuotation.js +4 -1
  26. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  27. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  28. package/es/components/booking/info/service/like/index.d.ts +0 -1
  29. package/es/components/booking/info/service2/utils.js +1 -0
  30. package/es/components/booking/info2/cartClientCard/index.js +5 -3
  31. package/es/components/booking/info2/service/addService/index.js +9 -9
  32. package/es/components/booking/info2/service/editNormalService/index.js +6 -0
  33. package/es/components/booking/info2/service/editService/index.js +27 -17
  34. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  35. package/es/components/booking/info2/service/editService/utils.js +66 -0
  36. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  37. package/es/components/booking/utils.d.ts +1 -0
  38. package/es/components/booking/utils.js +15 -2
  39. package/es/components/checkout/components/AmountSummary/index.less +4 -5
  40. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  41. package/es/components/eftpos/form/index.d.ts +0 -1
  42. package/es/components/eftpos/group/index.d.ts +0 -1
  43. package/es/components/eftpos/hooks.d.ts +0 -1
  44. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  45. package/es/components/eftpos/icon/device.d.ts +0 -1
  46. package/es/components/eftpos/receipt/index.d.ts +0 -1
  47. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  48. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  49. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  50. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  51. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  52. package/es/components/eftposPay/payo/config.d.ts +1 -0
  53. package/es/components/eftposPay/payo/config.js +70 -32
  54. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  55. package/es/components/eftposPay/payo/payment.js +579 -0
  56. package/es/components/eftposPay/store/index.d.ts +1 -1
  57. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  58. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  59. package/es/components/eftposPay/utils/log/index.js +371 -0
  60. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  61. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  63. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  68. package/es/components/index.d.ts +2 -2
  69. package/es/components/index.js +2 -2
  70. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  71. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  72. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  73. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  74. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  75. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  76. package/es/components/pay/toC/index.js +7 -4
  77. package/es/components/pay/toC/locales.d.ts +3 -0
  78. package/es/components/pay/toC/locales.js +6 -3
  79. package/es/components/pay/toC/status.d.ts +1 -0
  80. package/es/components/pay/toC/status.js +3 -0
  81. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  82. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  83. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  84. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  85. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  86. package/es/components/schedules/products/index.d.ts +0 -1
  87. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  88. package/es/components/subTotal/index.js +1 -1
  89. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  90. package/es/components/{wallet/serve.js → systemSettings/registry/components/GroupModal.js} +145 -190
  91. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  92. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  93. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  94. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  95. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  96. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  97. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  98. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  99. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  100. package/es/components/systemSettings/registry/components/index.js +4 -0
  101. package/es/components/systemSettings/registry/index.d.ts +5 -0
  102. package/es/components/systemSettings/registry/index.js +1059 -0
  103. package/es/components/systemSettings/registry/index.less +410 -0
  104. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  105. package/es/components/systemSettings/registry/locales.js +300 -0
  106. package/es/components/systemSettings/registry/services.d.ts +77 -0
  107. package/es/components/systemSettings/registry/services.js +472 -0
  108. package/es/components/systemSettings/registry/types.d.ts +126 -0
  109. package/es/components/systemSettings/registry/types.js +1 -0
  110. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  111. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  112. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  113. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  114. package/es/components/ticketBooking/components/addServiceVariant/addService.js +7 -5
  115. package/es/components/ticketBooking/utils/index.d.ts +5 -0
  116. package/es/components/ticketBooking/utils/index.js +38 -17
  117. package/es/components/walletList/index.d.ts +0 -25
  118. package/es/components/walletList/index.js +173 -41
  119. package/es/components/walletList/locales.d.ts +9 -0
  120. package/es/components/walletList/locales.js +12 -3
  121. package/es/components/walletList/serve.d.ts +19 -0
  122. package/es/components/walletList/serve.js +94 -5
  123. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  124. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  125. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  126. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  127. package/es/index.d.ts +3 -2
  128. package/es/index.js +4 -3
  129. package/es/plus/clientName/index.d.ts +0 -1
  130. package/es/plus/walletEditor/WalletEditor.js +60 -2
  131. package/es/plus/walletEditor/locales.d.ts +9 -0
  132. package/es/plus/walletEditor/locales.js +12 -3
  133. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  134. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  135. package/es/plus/walletPassGallery/components/passDetail/index.js +5 -1
  136. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  137. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  138. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  139. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  140. package/es/plus/walletPassGallery/index.js +226 -42
  141. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  142. package/es/plus/walletPassGallery/locales.js +29 -5
  143. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  144. package/es/plus/walletPassGallery/serve.js +59 -2
  145. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  146. package/es/plus/walletPassGallery/utils.js +342 -0
  147. package/es/pro/Login2.0/index.less +15 -8
  148. package/es/pro/pisellPaymentList/example.d.ts +0 -1
  149. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +35 -30
  150. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  151. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  152. package/lib/components/appointmentBooking/components/Services/index.js +5 -2
  153. package/lib/components/appointmentBooking/components/Voucher/index.js +13 -1
  154. package/lib/components/booking/addons/index.js +15 -7
  155. package/lib/components/booking/components/actionButtons/index.js +4 -2
  156. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  157. package/lib/components/booking/components/footer/amount.js +293 -41
  158. package/lib/components/booking/components/footer/index.js +5 -2
  159. package/lib/components/booking/components/footer/utils.d.ts +19 -0
  160. package/lib/components/booking/components/footer/utils.js +111 -35
  161. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  162. package/lib/components/booking/components/voucher/index.js +56 -16
  163. package/lib/components/booking/forms/table/index.d.ts +0 -1
  164. package/lib/components/booking/hooks/useQuotation.js +2 -1
  165. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  166. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  167. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  168. package/lib/components/booking/info/service2/utils.js +1 -0
  169. package/lib/components/booking/info2/cartClientCard/index.js +4 -2
  170. package/lib/components/booking/info2/service/addService/index.js +1 -1
  171. package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
  172. package/lib/components/booking/info2/service/editService/index.js +30 -8
  173. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  174. package/lib/components/booking/info2/service/editService/utils.js +40 -3
  175. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  176. package/lib/components/booking/utils.d.ts +1 -0
  177. package/lib/components/booking/utils.js +11 -0
  178. package/lib/components/checkout/components/AmountSummary/index.less +4 -5
  179. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  180. package/lib/components/eftpos/form/index.d.ts +0 -1
  181. package/lib/components/eftpos/group/index.d.ts +0 -1
  182. package/lib/components/eftpos/hooks.d.ts +0 -1
  183. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  184. package/lib/components/eftpos/icon/device.d.ts +0 -1
  185. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  186. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  187. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  188. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  189. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  190. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  191. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  192. package/lib/components/eftposPay/payo/config.js +98 -73
  193. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  194. package/lib/components/eftposPay/payo/payment.js +357 -0
  195. package/lib/components/eftposPay/store/index.d.ts +1 -1
  196. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  197. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  198. package/lib/components/eftposPay/utils/log/index.js +294 -0
  199. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  200. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  201. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  202. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  203. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  204. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  205. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  206. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  207. package/lib/components/index.d.ts +2 -2
  208. package/lib/components/index.js +3 -3
  209. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  210. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  211. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  212. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  213. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  214. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  215. package/lib/components/pay/toC/index.js +4 -1
  216. package/lib/components/pay/toC/locales.d.ts +3 -0
  217. package/lib/components/pay/toC/locales.js +6 -3
  218. package/lib/components/pay/toC/status.d.ts +1 -0
  219. package/lib/components/pay/toC/status.js +5 -0
  220. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  221. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  222. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  223. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  224. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  225. package/lib/components/schedules/products/index.d.ts +0 -1
  226. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  227. package/lib/components/subTotal/index.js +1 -1
  228. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  229. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  230. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  231. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  232. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  233. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  234. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  235. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  236. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  237. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  238. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  239. package/lib/components/{wallet → systemSettings/registry}/components/index.js +13 -10
  240. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  241. package/lib/components/systemSettings/registry/index.js +529 -0
  242. package/lib/components/systemSettings/registry/index.less +410 -0
  243. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  244. package/lib/components/systemSettings/registry/locales.js +324 -0
  245. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  246. package/lib/components/systemSettings/registry/services.js +290 -0
  247. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  248. package/lib/components/{wallet/RechargeableCard/serve.js → systemSettings/registry/types.js} +3 -19
  249. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  250. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  251. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  252. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  253. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -7
  254. package/lib/components/ticketBooking/utils/index.d.ts +5 -0
  255. package/lib/components/ticketBooking/utils/index.js +22 -6
  256. package/lib/components/walletList/index.d.ts +0 -25
  257. package/lib/components/walletList/index.js +100 -4
  258. package/lib/components/walletList/locales.d.ts +9 -0
  259. package/lib/components/walletList/locales.js +12 -3
  260. package/lib/components/walletList/serve.d.ts +19 -0
  261. package/lib/components/walletList/serve.js +26 -3
  262. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  263. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  264. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  265. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  266. package/lib/index.d.ts +3 -2
  267. package/lib/index.js +5 -2
  268. package/lib/plus/clientName/index.d.ts +0 -1
  269. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  270. package/lib/plus/walletEditor/locales.d.ts +9 -0
  271. package/lib/plus/walletEditor/locales.js +12 -3
  272. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  273. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  274. package/lib/plus/walletPassGallery/components/passDetail/index.js +4 -1
  275. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  276. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  277. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  278. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  279. package/lib/plus/walletPassGallery/index.js +157 -28
  280. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  281. package/lib/plus/walletPassGallery/locales.js +32 -5
  282. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  283. package/lib/plus/walletPassGallery/serve.js +17 -5
  284. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  285. package/lib/plus/walletPassGallery/utils.js +287 -0
  286. package/lib/pro/Login2.0/index.less +15 -8
  287. package/lib/pro/pisellPaymentList/example.d.ts +0 -1
  288. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +34 -39
  289. package/lowcode/settings-registry/meta.ts +29 -0
  290. package/package.json +4 -4
  291. package/es/components/wallet/Detail/index.d.ts +0 -42
  292. package/es/components/wallet/Detail/index.js +0 -1182
  293. package/es/components/wallet/Detail/index.less +0 -386
  294. package/es/components/wallet/Detail/locales.d.ts +0 -153
  295. package/es/components/wallet/Detail/locales.js +0 -170
  296. package/es/components/wallet/Detail/model.d.ts +0 -13
  297. package/es/components/wallet/Detail/model.js +0 -22
  298. package/es/components/wallet/Detail/serve.d.ts +0 -39
  299. package/es/components/wallet/Detail/serve.js +0 -64
  300. package/es/components/wallet/DetailContext.d.ts +0 -25
  301. package/es/components/wallet/DetailContext.js +0 -162
  302. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  303. package/es/components/wallet/DiscountCard/index.js +0 -218
  304. package/es/components/wallet/DiscountCard/index.less +0 -9
  305. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  306. package/es/components/wallet/DiscountCard/model.js +0 -22
  307. package/es/components/wallet/PointCard/index.d.ts +0 -3
  308. package/es/components/wallet/PointCard/index.js +0 -169
  309. package/es/components/wallet/PointCard/index.less +0 -9
  310. package/es/components/wallet/PointCard/model.d.ts +0 -13
  311. package/es/components/wallet/PointCard/model.js +0 -22
  312. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  313. package/es/components/wallet/RechargeableCard/index.js +0 -463
  314. package/es/components/wallet/RechargeableCard/index.less +0 -108
  315. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  316. package/es/components/wallet/RechargeableCard/model.js +0 -28
  317. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  318. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  319. package/es/components/wallet/Voucher/index.d.ts +0 -12
  320. package/es/components/wallet/Voucher/index.js +0 -131
  321. package/es/components/wallet/Voucher/index.less +0 -9
  322. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  323. package/es/components/wallet/Voucher/locales.js +0 -20
  324. package/es/components/wallet/Voucher/model.d.ts +0 -13
  325. package/es/components/wallet/Voucher/model.js +0 -22
  326. package/es/components/wallet/carouselArrow.png +0 -0
  327. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  328. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  329. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  330. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  331. package/es/components/wallet/components/UsageRules/index.js +0 -147
  332. package/es/components/wallet/components/UsageRules/index.less +0 -157
  333. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  334. package/es/components/wallet/components/WalletBar/index.js +0 -19
  335. package/es/components/wallet/components/WalletBar/index.less +0 -36
  336. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  337. package/es/components/wallet/components/WalletCard.js +0 -91
  338. package/es/components/wallet/components/index.d.ts +0 -3
  339. package/es/components/wallet/components/index.js +0 -4
  340. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
  341. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  342. package/es/components/wallet/index.d.ts +0 -10
  343. package/es/components/wallet/index.js +0 -807
  344. package/es/components/wallet/index.less +0 -151
  345. package/es/components/wallet/locales.d.ts +0 -132
  346. package/es/components/wallet/locales.js +0 -139
  347. package/es/components/wallet/model.d.ts +0 -37
  348. package/es/components/wallet/model.js +0 -86
  349. package/es/components/wallet/serve.d.ts +0 -150
  350. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  351. package/es/components/wallet/utils/formatUtils.js +0 -73
  352. package/lib/components/wallet/Detail/index.d.ts +0 -42
  353. package/lib/components/wallet/Detail/index.js +0 -874
  354. package/lib/components/wallet/Detail/index.less +0 -386
  355. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  356. package/lib/components/wallet/Detail/locales.js +0 -194
  357. package/lib/components/wallet/Detail/model.d.ts +0 -13
  358. package/lib/components/wallet/Detail/model.js +0 -43
  359. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  360. package/lib/components/wallet/Detail/serve.js +0 -44
  361. package/lib/components/wallet/DetailContext.d.ts +0 -25
  362. package/lib/components/wallet/DetailContext.js +0 -118
  363. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  364. package/lib/components/wallet/DiscountCard/index.js +0 -209
  365. package/lib/components/wallet/DiscountCard/index.less +0 -9
  366. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  367. package/lib/components/wallet/DiscountCard/model.js +0 -43
  368. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  369. package/lib/components/wallet/PointCard/index.js +0 -190
  370. package/lib/components/wallet/PointCard/index.less +0 -9
  371. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  372. package/lib/components/wallet/PointCard/model.js +0 -43
  373. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  374. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  375. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  376. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  377. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  378. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  379. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  380. package/lib/components/wallet/Voucher/index.js +0 -146
  381. package/lib/components/wallet/Voucher/index.less +0 -9
  382. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  383. package/lib/components/wallet/Voucher/locales.js +0 -44
  384. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  385. package/lib/components/wallet/Voucher/model.js +0 -43
  386. package/lib/components/wallet/carouselArrow.png +0 -0
  387. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  388. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  389. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  390. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  391. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  392. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  393. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  394. package/lib/components/wallet/components/WalletBar/index.js +0 -49
  395. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  396. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  397. package/lib/components/wallet/components/WalletCard.js +0 -97
  398. package/lib/components/wallet/components/index.d.ts +0 -3
  399. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
  400. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  401. package/lib/components/wallet/index.d.ts +0 -10
  402. package/lib/components/wallet/index.js +0 -580
  403. package/lib/components/wallet/index.less +0 -151
  404. package/lib/components/wallet/locales.d.ts +0 -132
  405. package/lib/components/wallet/locales.js +0 -163
  406. package/lib/components/wallet/model.d.ts +0 -37
  407. package/lib/components/wallet/model.js +0 -91
  408. package/lib/components/wallet/serve.d.ts +0 -150
  409. package/lib/components/wallet/serve.js +0 -85
  410. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  411. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -16,6 +16,11 @@ export declare const formatProductOption: (option: any) => any;
16
16
  * @Date: 2024-02-19 09:26
17
17
  */
18
18
  export declare const formatProductBundle: (bundle: any) => any;
19
+ /**
20
+ * 获取子商品折扣信息
21
+ * @param item
22
+ */
23
+ export declare const getBundleDiscountList: (bundle: any[]) => any[];
19
24
  export interface ResourceItem {
20
25
  [key: string]: any;
21
26
  }
@@ -37,6 +42,20 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
37
42
  * @Date: 2024-12-23 12:05
38
43
  */
39
44
  export declare const formatProductPrice: (item: any) => number;
45
+ /**
46
+ * checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
47
+ * @param item
48
+ * @returns
49
+ */
50
+ export declare const formatOriginalPrice: (item: any) => number;
51
+ /**
52
+ * checkout2.0: 商品维度折扣后价格, original_price - 商品折扣金额(商品手动折扣等等)
53
+ * @param item
54
+ * @returns
55
+ */
56
+ export declare const formatSellingPrice: (item: any) => number;
57
+ export declare const getSourceProductPrice: (item: any) => number;
58
+ export declare const getMainProductSellingPrice: (item: any) => number | undefined;
40
59
  /**
41
60
  * @title: 是否包含跨日预约商品
42
61
  * @description:
@@ -32,11 +32,16 @@ __export(utils_exports, {
32
32
  checkHolderIsError: () => checkHolderIsError,
33
33
  checkResourcesFormat: () => checkResourcesFormat,
34
34
  checkSubResourcesCapacity: () => checkSubResourcesCapacity,
35
+ formatOriginalPrice: () => formatOriginalPrice,
35
36
  formatProductBundle: () => formatProductBundle,
36
37
  formatProductOption: () => formatProductOption,
37
38
  formatProductPrice: () => formatProductPrice,
39
+ formatSellingPrice: () => formatSellingPrice,
38
40
  formatValues: () => formatValues,
39
- getHasMultiDayProduct: () => getHasMultiDayProduct
41
+ getBundleDiscountList: () => getBundleDiscountList,
42
+ getHasMultiDayProduct: () => getHasMultiDayProduct,
43
+ getMainProductSellingPrice: () => getMainProductSellingPrice,
44
+ getSourceProductPrice: () => getSourceProductPrice
40
45
  });
41
46
  module.exports = __toCommonJS(utils_exports);
42
47
  var import_dayjs = __toESM(require("dayjs"));
@@ -110,6 +115,8 @@ var formatProductBundle = (bundle) => {
110
115
  return temp + Number(item.num) * item.custom_add_price;
111
116
  }, 0);
112
117
  return {
118
+ "is_charge_tax": d.is_charge_tax,
119
+ "tax_fee": d.tax_fee,
113
120
  "bundle_group_id": d.group_id,
114
121
  "bundle_id": d.id,
115
122
  "bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
@@ -117,16 +124,37 @@ var formatProductBundle = (bundle) => {
117
124
  "num": d.num,
118
125
  "extension_id": d.extension_id,
119
126
  "extension_type": d.extension_type,
120
- "price": Number(d == null ? void 0 : d.price),
121
- // checkout 2.0 新增
127
+ "price": Number(d == null ? void 0 : d.product_price),
122
128
  "price_type": d == null ? void 0 : d.price_type,
123
- // checkout 2.0 新增
124
- "custom_price": Math.abs(new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber()).toFixed(2),
129
+ "price_type_ext": d == null ? void 0 : d.price_type_ext,
130
+ "custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
125
131
  "custom_price_type": d == null ? void 0 : d.price_type,
126
- "option": option
132
+ "option": option,
133
+ "bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
134
+ // "bundle_sum_price": d?.original_price || d?.original_total,
135
+ "metadata": {
136
+ custom_product_bundle_map_id: d._id,
137
+ // 子商品单数量附加费
138
+ "surcharge_fee": d.surcharge_fee,
139
+ // 可选,附加费均摊舍入金额
140
+ "surcharge_rounding_remainder": d.surcharge_rounding_remainder,
141
+ relation_surcharge_ids: d.relation_surcharge_ids || []
142
+ }
127
143
  };
128
144
  });
129
145
  };
146
+ var getBundleDiscountList = (bundle) => {
147
+ if (!bundle) {
148
+ return [];
149
+ }
150
+ let discountList = [];
151
+ bundle.forEach((d) => {
152
+ if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
153
+ discountList.push(...d.discount_list.filter((item) => !item.id));
154
+ }
155
+ });
156
+ return discountList;
157
+ };
130
158
  var getSubType = (item) => {
131
159
  var _a;
132
160
  const _type = (_a = item.duration) == null ? void 0 : _a.type;
@@ -214,7 +242,7 @@ var formatHolders = (state, item, values) => {
214
242
  var formatProductPrice = (item) => {
215
243
  var _a, _b, _c, _d;
216
244
  const other = (_a = item._extend) == null ? void 0 : _a.other;
217
- let price = Number((_b = item._extend) == null ? void 0 : _b.price);
245
+ let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
218
246
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
219
247
  const variant = item.variant.find(
220
248
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -258,6 +286,23 @@ var formatMetaData = (item, isMultiDayPrices) => {
258
286
  }
259
287
  return metadata;
260
288
  };
289
+ var formatProductMetadata = (item) => {
290
+ var _a, _b, _c, _d, _e, _f, _g, _h;
291
+ let metadata = {};
292
+ if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
293
+ metadata.main_product_attached_bundle_surcharge_fee = (_b = item._extend) == null ? void 0 : _b.surcharge_fee;
294
+ }
295
+ if ((_c = item._extend) == null ? void 0 : _c.main_product_attached_bundle_tax_fee) {
296
+ metadata.main_product_attached_bundle_tax_fee = (_d = item._extend) == null ? void 0 : _d.main_product_attached_bundle_tax_fee;
297
+ }
298
+ if ((_e = item._extend) == null ? void 0 : _e.surcharge_rounding_remainder) {
299
+ metadata.surcharge_rounding_remainder = (_f = item._extend) == null ? void 0 : _f.surcharge_rounding_remainder;
300
+ }
301
+ if ((_g = item._extend) == null ? void 0 : _g.relation_surcharge_ids) {
302
+ metadata.relation_surcharge_ids = (_h = item._extend) == null ? void 0 : _h.relation_surcharge_ids;
303
+ }
304
+ return metadata;
305
+ };
261
306
  var getSourceProductPrice = (item) => {
262
307
  var _a, _b, _c;
263
308
  const other = (_a = item._extend) == null ? void 0 : _a.other;
@@ -272,12 +317,29 @@ var getSourceProductPrice = (item) => {
272
317
  }
273
318
  return price;
274
319
  };
320
+ var getMainProductSellingPrice = (item) => {
321
+ var _a, _b, _c, _d, _e, _f;
322
+ if (!(0, import_utils5.isNumber)((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) && !(0, import_utils5.isString)((_b = item._extend) == null ? void 0 : _b.main_product_selling_price)) {
323
+ return void 0;
324
+ }
325
+ let optionPrice = new import_decimal.default(0);
326
+ if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
327
+ optionPrice = (_e = item._extend.other) == null ? void 0 : _e.option.reduce((accumulator, currentValue) => {
328
+ const currentPrice = new import_decimal.default(currentValue.price || 0);
329
+ const currentNum = new import_decimal.default(currentValue.num || 0);
330
+ return accumulator.add(currentPrice.mul(currentNum));
331
+ }, optionPrice);
332
+ }
333
+ return new import_decimal.default((_f = item._extend) == null ? void 0 : _f.main_product_selling_price).add(optionPrice).toNumber();
334
+ };
275
335
  var formatProducts = (item, quantity) => {
276
- var _a, _b, _c, _d, _e, _f, _g;
336
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
277
337
  const total = Number(item._extend.total);
278
338
  const origin_total = Number(item._extend.origin_total);
279
339
  const discount_amount = origin_total - total;
280
- const discount_list = (item == null ? void 0 : item.discount_list) || [];
340
+ const bundleDiscountList = getBundleDiscountList(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
341
+ const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
342
+ discount_list.push(...bundleDiscountList);
281
343
  const discount_type = discount_amount < 0 ? "change_price" : "discount";
282
344
  discount_list.forEach((d) => {
283
345
  d.metadata = {
@@ -292,30 +354,31 @@ var formatProducts = (item, quantity) => {
292
354
  item.product_id = 0;
293
355
  }
294
356
  return {
295
- name: item.name,
296
- num: quantity || item._extend.quantity,
297
- price: formatProductPrice(item),
298
- source_product_price: getSourceProductPrice(item),
299
- product_id: (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
300
- discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
301
- product_discount_reason: item._extend.discount_reason || "",
302
- is_charge_tax: item.is_charge_tax,
303
- note: ((_a = item._extend) == null ? void 0 : _a.note) || "",
304
- discountway: item._extend.discountway || "num",
305
- discount_per: item._extend.discount_per,
306
- discount_type: item._extend.discount_type || discount_type,
307
- order_detail_id: item._extend.order_detail_id || 0,
308
- product_bundle: formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
309
- bundle_edit: item._extend.bundle_edit,
310
- product_option_item: formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
311
- product_variant_id: ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
312
- discount_list: notManualDiscount,
313
- metadata: formatMetaData(item, false),
357
+ "name": item.name,
358
+ "num": quantity || item._extend.quantity,
359
+ "price": formatProductPrice(item),
360
+ "main_product_selling_price": getMainProductSellingPrice(item) ?? formatProductPrice(item),
361
+ "source_product_price": getSourceProductPrice(item),
362
+ "product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
363
+ "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
364
+ "product_discount_reason": item._extend.discount_reason || "",
365
+ "is_charge_tax": item.is_charge_tax,
366
+ "note": ((_c = item._extend) == null ? void 0 : _c.note) || "",
367
+ "discountway": item._extend.discountway || "num",
368
+ "discount_per": item._extend.discount_per,
369
+ "discount_type": item._extend.discount_type || discount_type,
370
+ "order_detail_id": item._extend.order_detail_id || 0,
371
+ "product_bundle": formatProductBundle((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
372
+ "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
373
+ "product_option_item": formatProductOption((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
374
+ "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
375
+ "discount_list": notManualDiscount,
376
+ metadata: formatProductMetadata(item),
314
377
  // checkout 需求新增字段
315
- calculated_original_price: formatOriginalPrice(item),
316
- calculated_selling_price: formatSellingPrice(item),
317
- tax_fee: item._extend.tax_fee,
318
- custom_deposit_data: item.custom_deposit_data
378
+ "calculated_original_price": formatOriginalPrice(item),
379
+ "calculated_selling_price": formatSellingPrice(item),
380
+ "tax_fee": item._extend.tax_fee,
381
+ "custom_deposit_data": item.custom_deposit_data
319
382
  };
320
383
  };
321
384
  var formatAppointmentProductLists = (data) => {
@@ -381,7 +444,7 @@ var formatBookings = (data, values) => {
381
444
  let bookings = [];
382
445
  let obj = {};
383
446
  list.forEach((item) => {
384
- var _a, _b, _c, _d, _e, _f, _g;
447
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
385
448
  if (item.isCustomItem) {
386
449
  bookings.push({
387
450
  ...item._extend,
@@ -455,12 +518,20 @@ var formatBookings = (data, values) => {
455
518
  for (let i = 0; i < (item._extend.quantity || 1); i++) {
456
519
  const newItem = (0, import_lodash.cloneDeep)(item);
457
520
  newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
521
+ if (i > 0) {
522
+ newItem._extend.surcharge_rounding_remainder = void 0;
523
+ if (((_j = (_i = (_h = newItem._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle) == null ? void 0 : _j.length) > 0) {
524
+ newItem._extend.other.bundle.forEach((bundleItem) => {
525
+ bundleItem.surcharge_rounding_remainder = void 0;
526
+ });
527
+ }
528
+ }
458
529
  bookings.push({
459
530
  ...booking,
460
531
  product: formatProducts(newItem, 1),
461
532
  number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
462
533
  holder: getHolderByIndex(booking.holder, i),
463
- metadata: formatMetaData(newItem)
534
+ metadata: formatMetaData(newItem, false)
464
535
  });
465
536
  }
466
537
  });
@@ -620,9 +691,14 @@ var checkHolderIsError = (state) => {
620
691
  checkHolderIsError,
621
692
  checkResourcesFormat,
622
693
  checkSubResourcesCapacity,
694
+ formatOriginalPrice,
623
695
  formatProductBundle,
624
696
  formatProductOption,
625
697
  formatProductPrice,
698
+ formatSellingPrice,
626
699
  formatValues,
627
- getHasMultiDayProduct
700
+ getBundleDiscountList,
701
+ getHasMultiDayProduct,
702
+ getMainProductSellingPrice,
703
+ getSourceProductPrice
628
704
  });
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -48,7 +48,7 @@ var import_utils3 = require("../../info/clientVariant/utils");
48
48
  var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
49
49
  var services = {};
50
50
  var VoucherCard = (props) => {
51
- var _a, _b, _c, _d;
51
+ var _a, _b, _c, _d, _e;
52
52
  const context = (0, import_useEngineContext.default)();
53
53
  const { state, dispatch, source, isInModal = false } = props;
54
54
  const [showDetail, setShowDetail] = (0, import_react.useState)(isInModal ? true : false);
@@ -60,9 +60,13 @@ var VoucherCard = (props) => {
60
60
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
61
61
  const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
62
62
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
63
+ const holderChangedRef = (0, import_react.useRef)(false);
64
+ const stateRef = (0, import_react.useRef)(state);
65
+ stateRef.current = state;
63
66
  services = state.service;
64
67
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
65
- var _a2, _b2;
68
+ var _a2, _b2, _c2;
69
+ const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
66
70
  dispatch({
67
71
  type: "setClient",
68
72
  payload: {
@@ -70,7 +74,8 @@ var VoucherCard = (props) => {
70
74
  edit: true
71
75
  }
72
76
  });
73
- if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
77
+ if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
78
+ if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
74
79
  dispatch({
75
80
  type: "setService",
76
81
  payload: {
@@ -104,7 +109,7 @@ var VoucherCard = (props) => {
104
109
  const serviceMemo = (0, import_react.useMemo)(() => {
105
110
  var _a2;
106
111
  const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
107
- var _a3, _b2;
112
+ var _a3, _b2, _c2;
108
113
  return {
109
114
  booking_id: value.booking_id,
110
115
  id: value.id,
@@ -113,11 +118,17 @@ var VoucherCard = (props) => {
113
118
  discount_list: value.discount_list,
114
119
  origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
115
120
  quantity: value._extend.quantity,
116
- startDate: value._extend.startDate
121
+ startDate: value._extend.startDate,
122
+ holder_id: (_c2 = value == null ? void 0 : value._extend) == null ? void 0 : _c2.holder_id
117
123
  };
118
124
  });
119
125
  return val;
120
126
  }, [state.service.value]);
127
+ const serviceTotal = (0, import_react.useMemo)(() => {
128
+ return serviceMemo.reduce((total, item) => {
129
+ return total + (item.total || 0);
130
+ }, 0);
131
+ }, [serviceMemo]);
121
132
  const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
122
133
  if (!e.detail.code) {
123
134
  return;
@@ -148,6 +159,21 @@ var VoucherCard = (props) => {
148
159
  });
149
160
  return val;
150
161
  }, [state.addons.value]);
162
+ const holdersMemo = (0, import_react.useMemo)(() => {
163
+ var _a2;
164
+ if (isBooking4Shop) {
165
+ let list = [];
166
+ if ((_a2 = state.pet) == null ? void 0 : _a2.value) {
167
+ let entries = Object.entries(state.pet.value);
168
+ if (entries.length === 1) {
169
+ list = entries[0][1];
170
+ }
171
+ }
172
+ shopDiscount.setHolders(list);
173
+ holderChangedRef.current = true;
174
+ return list || [];
175
+ }
176
+ }, [(_c = state.pet) == null ? void 0 : _c.value, isBooking4Shop]);
151
177
  const disabled = (0, import_react.useMemo)(() => {
152
178
  var _a2;
153
179
  if (["paid", "partially_paid"].includes(
@@ -160,24 +186,30 @@ var VoucherCard = (props) => {
160
186
  const { run } = (0, import_ahooks.useDebounceFn)(
161
187
  () => {
162
188
  var _a2, _b2;
163
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
189
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
164
190
  return;
165
191
  }
166
192
  if (isBooking4Shop) {
167
193
  const val = shopDiscount.calcDiscount([
168
- ...state.service.value,
169
- ...state.addons.value
194
+ ...stateRef.current.service.value,
195
+ ...stateRef.current.addons.value
170
196
  ]);
171
197
  console.log("input: ", state.service.value);
172
198
  console.log("output: ", val);
173
199
  productListToValue(val.productList);
200
+ holderChangedRef.current = false;
174
201
  }
175
202
  },
176
203
  { wait: 500 }
177
204
  );
178
205
  (0, import_react.useEffect)(() => {
179
206
  run();
180
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
207
+ }, [
208
+ JSON.stringify(serviceMemo),
209
+ JSON.stringify(addonsMemo),
210
+ JSON.stringify(holdersMemo),
211
+ isBooking4Shop
212
+ ]);
181
213
  (0, import_react.useEffect)(() => {
182
214
  if (shopDiscount) {
183
215
  const wrappedHandler = executeIfActive(fn);
@@ -237,6 +269,12 @@ var VoucherCard = (props) => {
237
269
  const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
238
270
  var _a2;
239
271
  const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
272
+ const newTotal = serviceList.reduce((total, item) => {
273
+ return total + (item._extend.total || 0);
274
+ }, 0);
275
+ if (newTotal !== serviceTotal) {
276
+ edit = true;
277
+ }
240
278
  serviceValueRef.current = serviceList;
241
279
  addonsValueRef.current = addonsList;
242
280
  let other = {};
@@ -253,12 +291,14 @@ var VoucherCard = (props) => {
253
291
  }
254
292
  });
255
293
  if (!((_a2 = props == null ? void 0 : props.state) == null ? void 0 : _a2.isBookingTicket2)) {
256
- dispatch({
257
- type: "setAddons",
258
- payload: {
259
- value: addonsList,
260
- ...other
261
- }
294
+ setTimeout(() => {
295
+ dispatch({
296
+ type: "setAddons",
297
+ payload: {
298
+ value: addonsList,
299
+ ...other
300
+ }
301
+ });
262
302
  });
263
303
  }
264
304
  });
@@ -322,7 +362,7 @@ var VoucherCard = (props) => {
322
362
  {
323
363
  style: { width: "100%" },
324
364
  isInModal: isInModal || false,
325
- dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
365
+ dataSource: ((_e = (_d = state.service) == null ? void 0 : _d.value) == null ? void 0 : _e.length) ? availableData : [],
326
366
  mixedSort,
327
367
  onChange: (val) => {
328
368
  const detail = shopDiscount.setDiscountSelected({
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -100,10 +100,11 @@ var setNewCartValue = (cartValue, newProducts) => {
100
100
  }
101
101
  const selectBundleInfo = item._extend.other.bundle.find((item2) => item2.id === bundle.id);
102
102
  const optionPrice = calculateTotalPrice((selectBundleInfo == null ? void 0 : selectBundleInfo.option) || []);
103
+ const isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
103
104
  return {
104
105
  ...bundle,
105
106
  base_price: bundleItemMap[bundle.id].base_price,
106
- price: new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
107
+ price: isEditDiscount ? bundle.price : new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
107
108
  // product_price: bundleItemMap[item.id].product_price,
108
109
  };
109
110
  });
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -378,6 +378,7 @@ var formatBundle = (bundle) => {
378
378
  num: item == null ? void 0 : item.num,
379
379
  price: item == null ? void 0 : item.price,
380
380
  total: item == null ? void 0 : item.price,
381
+ origin_total: item.original_total,
381
382
  price_type: item == null ? void 0 : item.price_type,
382
383
  bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
383
384
  bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
@@ -76,7 +76,8 @@ var CartClientCard = (0, import_react.forwardRef)(({
76
76
  ((_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en"
77
77
  );
78
78
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
79
- var _a2, _b2;
79
+ var _a2, _b2, _c2;
80
+ const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
80
81
  dispatch({
81
82
  type: "setClient",
82
83
  payload: {
@@ -84,7 +85,8 @@ var CartClientCard = (0, import_react.forwardRef)(({
84
85
  edit: true
85
86
  }
86
87
  });
87
- if ((_b2 = (_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) {
88
+ if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
89
+ if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
88
90
  dispatch({
89
91
  type: "setService",
90
92
  payload: {
@@ -244,7 +244,6 @@ var Info = (props) => {
244
244
  _extend: {
245
245
  start_date: state.date.value,
246
246
  quantity: (e == null ? void 0 : e.quantity) || 1,
247
- price: _detail.price,
248
247
  product_name: item.title,
249
248
  other
250
249
  },
@@ -254,6 +253,7 @@ var Info = (props) => {
254
253
  if (isMultiDay) {
255
254
  cacheItem._extend.end_date = state.date.value.add(1, "day");
256
255
  }
256
+ cacheItem._extend.price = (0, import_utils3.getMainPrice)(cacheItem, _detail.price);
257
257
  let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
258
258
  cacheItem._extend.total = _total;
259
259
  cacheItem._extend.origin_total = _total;
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_ahooks = require("ahooks");
37
37
  var import_skuDetailModal = __toESM(require("../../../../../pro/skuDetailModal"));
38
38
  var import_model = require("../../../info/model");
39
+ var import_utils = require("../editService/utils");
39
40
  var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
40
41
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
41
42
  const modalRef = (0, import_react.useRef)(null);
@@ -62,7 +63,12 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
62
63
  const handleConfirm = (0, import_ahooks.useMemoizedFn)((data) => {
63
64
  var _a, _b;
64
65
  const newProducts = (_b = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || []) == null ? void 0 : _b.map((item) => {
66
+ var _a2, _b2;
65
67
  if (item._id == data._id) {
68
+ data = (0, import_utils.setProductPrice)(data, {
69
+ newTotal: (_a2 = data._extend) == null ? void 0 : _a2.total,
70
+ origin_total: (_b2 = data._extend) == null ? void 0 : _b2.origin_total
71
+ });
66
72
  return data;
67
73
  }
68
74
  return item;
@@ -54,12 +54,13 @@ var import_utils5 = require("../../../info/utils");
54
54
  var import_utils6 = require("../../../utils");
55
55
  var import_utilsByBooking = require("../../utilsByBooking");
56
56
  var import_utils7 = require("../addService/utils");
57
+ var import_utils8 = require("./utils");
57
58
  var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
58
59
  var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
59
60
  var import_EditTabs = __toESM(require("../../../info/service/editService/EditTabs"));
60
61
  var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
61
62
  var import_dayjs = __toESM(require("dayjs"));
62
- var import_utils8 = require("../../../info/service2/Group/utils");
63
+ var import_utils9 = require("../../../info/service2/Group/utils");
63
64
  var submitLock = false;
64
65
  var Info = (_, ref) => {
65
66
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
@@ -198,7 +199,7 @@ var Info = (_, ref) => {
198
199
  form.setFieldsValue({ discount });
199
200
  };
200
201
  const onFinish = (values) => {
201
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
202
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
202
203
  let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
203
204
  if (isShowTimeAndResource && !isSuccess) {
204
205
  return;
@@ -259,12 +260,16 @@ var Info = (_, ref) => {
259
260
  }
260
261
  let _id = _item == null ? void 0 : _item._id;
261
262
  let groupId = (_h2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _h2.groupId;
263
+ _item = (0, import_utils8.setProductPrice)(_item, {
264
+ newTotal: values.total,
265
+ origin_total: (_i2 = _item._extend) == null ? void 0 : _i2.origin_total
266
+ });
262
267
  if (groupId) {
263
268
  _list = _list.filter((d) => {
264
269
  var _a3;
265
270
  return ((_a3 = d._extend) == null ? void 0 : _a3.groupId) !== groupId;
266
271
  });
267
- _list = _list.concat((0, import_utils8.createBookingItemsByGroup)(_item, true));
272
+ _list = _list.concat((0, import_utils9.createBookingItemsByGroup)(_item, true));
268
273
  } else {
269
274
  if (!_list.some((d) => d._id === _id)) {
270
275
  const detail = (0, import_utils3.addService)(_list, _item, state);
@@ -279,7 +284,7 @@ var Info = (_, ref) => {
279
284
  (0, import_utils6.deleteCacheParams)();
280
285
  console.log("_onFinish", _list);
281
286
  form.resetFields();
282
- if (!!((_i2 = state.service.cacheItem) == null ? void 0 : _i2.new)) {
287
+ if (!!((_j2 = state.service.cacheItem) == null ? void 0 : _j2.new)) {
283
288
  window.dispatchEvent(
284
289
  new CustomEvent("onAddNewService", {
285
290
  detail: {
@@ -288,7 +293,7 @@ var Info = (_, ref) => {
288
293
  })
289
294
  );
290
295
  }
291
- (_j2 = window.closeBookingEditModal) == null ? void 0 : _j2.call(window);
296
+ (_k2 = window.closeBookingEditModal) == null ? void 0 : _k2.call(window);
292
297
  _list.sort((a, b) => {
293
298
  var _a3, _b3;
294
299
  const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
@@ -330,7 +335,24 @@ var Info = (_, ref) => {
330
335
  const startTime2 = performance.now();
331
336
  console.log(startTime2, "startTime");
332
337
  form.resetFields();
333
- form.setFieldsValue(values);
338
+ form.setFieldsValue({
339
+ capacity: values.capacity,
340
+ discount_reason: values.discount_reason,
341
+ duration: values.duration,
342
+ endDate: values.endDate,
343
+ end_date: values.end_date,
344
+ origin_total: values.origin_total,
345
+ price: values.price,
346
+ product_name: values.product_name,
347
+ quantity: values.quantity,
348
+ resource: values.resource,
349
+ startDate: values.startDate,
350
+ start_time: values.start_time,
351
+ start_date: values.start_date,
352
+ total: values.total,
353
+ holder_id: values.holder_id,
354
+ note: values.note
355
+ });
334
356
  const endTime2 = performance.now();
335
357
  console.log(endTime2 - window.pp1, "打开商品5");
336
358
  console.log("执行时间", endTime2 - startTime2, values);
@@ -872,10 +894,10 @@ var Info = (_, ref) => {
872
894
  if (duration2 !== void 0) {
873
895
  cacheItem._extend.duration = duration2;
874
896
  }
875
- cacheItem._extend.items = (0, import_utils8.createBookingItemsByGroup)(cacheItem);
897
+ cacheItem._extend.items = (0, import_utils9.createBookingItemsByGroup)(cacheItem);
876
898
  cacheItem._extend = {
877
899
  ...cacheItem._extend,
878
- ...(0, import_utils8.getGroupTotalPrice)(cacheItem._extend.items)
900
+ ...(0, import_utils9.getGroupTotalPrice)(cacheItem._extend.items)
879
901
  };
880
902
  dispatch({
881
903
  type: "setService",
@@ -11,3 +11,18 @@ export declare const getAutoAllocationStorage: (id: string | number) => any;
11
11
  export declare const setAutoAllocationStorage: (data: {
12
12
  [key: string]: boolean;
13
13
  }) => void;
14
+ /**
15
+ * 手动折扣后给商品价格和子商品价格重新计算
16
+ *
17
+ * 计算逻辑:
18
+ * 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
19
+ * 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
20
+ *
21
+ * @param cacheItem - 缓存的商品项
22
+ * @param newTotal - 折扣后的新总价
23
+ * @param origin_total - 原始总价
24
+ */
25
+ export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total }: {
26
+ newTotal: number;
27
+ origin_total: number;
28
+ }) => any;