@pisell/private-materials 6.7.3 → 6.7.5

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 (592) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
  12. package/es/components/booking/addons/index.js +25 -17
  13. package/es/components/booking/addons/model.d.ts +1 -10
  14. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  15. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  16. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  17. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  18. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  19. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  20. package/es/components/booking/components/footer/amount.js +529 -79
  21. package/es/components/booking/components/footer/index.js +77 -56
  22. package/es/components/booking/components/footer/utils.d.ts +19 -0
  23. package/es/components/booking/components/footer/utils.js +151 -52
  24. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  25. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  26. package/es/components/booking/components/voucher/index.js +20 -6
  27. package/es/components/booking/forms/model.d.ts +1 -10
  28. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  29. package/es/components/booking/forms/single/index.d.ts +1 -0
  30. package/es/components/booking/forms/table/index.d.ts +1 -0
  31. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  32. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  33. package/es/components/booking/info/date/index.d.ts +1 -0
  34. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  35. package/es/components/booking/info/model.d.ts +1 -10
  36. package/es/components/booking/info/notes/index.d.ts +1 -0
  37. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  38. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  39. package/es/components/booking/info/service/like/index.d.ts +1 -0
  40. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  41. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  42. package/es/components/booking/info/service2/utils.js +1 -0
  43. package/es/components/booking/info2/cartClientCard/index.js +30 -6
  44. package/es/components/booking/info2/index.js +1 -1
  45. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  46. package/es/components/booking/info2/service/addService/index.js +2 -3
  47. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  48. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  49. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  50. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  51. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  52. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  53. package/es/components/booking/model.d.ts +1 -9
  54. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  55. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  56. package/es/components/booking/notes/addNote/index.d.ts +1 -0
  57. package/es/components/booking/notes/model.d.ts +1 -10
  58. package/es/components/booking/payments/model.d.ts +1 -10
  59. package/es/components/booking/utils.js +16 -3
  60. package/es/components/checkout/PaymentModal.d.ts +7 -5
  61. package/es/components/checkout/PaymentModal.js +257 -213
  62. package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  63. package/es/components/checkout/components/AdditionalModule/index.js +52 -12
  64. package/es/components/checkout/components/AmountSummary/index.js +9 -76
  65. package/es/components/checkout/components/AmountSummary/index.less +5 -6
  66. package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
  67. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  68. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
  69. package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  70. package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  71. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
  72. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  73. package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
  74. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  75. package/es/components/checkout/index.less +1 -1
  76. package/es/components/checkout/locales.js +6 -0
  77. package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  78. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  79. package/es/components/eftpos/form/index.d.ts +1 -0
  80. package/es/components/eftpos/group/index.d.ts +1 -0
  81. package/es/components/eftpos/hooks.d.ts +1 -0
  82. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  83. package/es/components/eftpos/icon/device.d.ts +1 -0
  84. package/es/components/eftpos/index.d.ts +1 -0
  85. package/es/components/eftpos/pos.d.ts +1 -0
  86. package/es/components/eftpos/receipt/index.d.ts +1 -0
  87. package/es/components/eftposPay/amount.d.ts +2 -1
  88. package/es/components/eftposPay/app.d.ts +1 -0
  89. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  90. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  91. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  92. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  93. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  94. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  95. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  96. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  97. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  98. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  99. package/es/components/eftposPay/device.d.ts +1 -1
  100. package/es/components/eftposPay/hooks.d.ts +2 -2
  101. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  102. package/es/components/eftposPay/pay.d.ts +1 -0
  103. package/es/components/eftposPay/payo/config.js +70 -32
  104. package/es/components/eftposPay/payo/payment.js +579 -0
  105. package/es/components/eftposPay/store/index.d.ts +4 -4
  106. package/es/components/eftposPay/tip.d.ts +1 -0
  107. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  108. package/es/components/eftposPay/tyro/index.js +12 -0
  109. package/es/components/eftposPay/utils/log/index.js +371 -0
  110. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  111. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  112. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  113. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  114. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  115. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  116. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  117. package/es/components/index.js +2 -1
  118. package/es/components/login/index.d.ts +1 -0
  119. package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
  120. package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
  121. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  122. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  124. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  125. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  126. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  127. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  128. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  129. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  130. package/es/components/pay/toC/index.js +7 -4
  131. package/es/components/pay/toC/locales.js +6 -3
  132. package/es/components/pay/toC/model.d.ts +1 -9
  133. package/es/components/pay/toC/status.js +3 -0
  134. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  135. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  136. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  137. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  138. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  139. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  140. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  141. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  142. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  143. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  144. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  145. package/es/components/schedules/calendar/index.d.ts +1 -0
  146. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  147. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  148. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  149. package/es/components/schedules/model.d.ts +1 -9
  150. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  151. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  152. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  153. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  154. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  155. package/es/components/schedules/products/index.d.ts +1 -0
  156. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  157. package/es/components/schedules/products/list/index.d.ts +1 -0
  158. package/es/components/schedules/resources/index.d.ts +1 -0
  159. package/es/components/schedules/resources/list/index.d.ts +1 -0
  160. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  161. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  162. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  163. package/es/components/schedules/schedules/index.d.ts +1 -0
  164. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  165. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  166. package/es/components/shoppingCart/index.d.ts +1 -0
  167. package/es/components/subTotal/index.js +1 -1
  168. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  169. package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
  170. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  171. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  172. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  173. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  174. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  175. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  176. package/es/components/systemSettings/registry/components/index.js +4 -0
  177. package/es/components/systemSettings/registry/index.d.ts +5 -0
  178. package/es/components/systemSettings/registry/index.js +1059 -0
  179. package/es/components/systemSettings/registry/index.less +410 -0
  180. package/es/components/systemSettings/registry/locales.js +300 -0
  181. package/es/components/systemSettings/registry/services.js +472 -0
  182. package/es/components/systemSettings/registry/types.js +1 -0
  183. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  184. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  185. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
  186. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  187. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  188. package/es/components/ticketBooking/components/timeBar/index.js +112 -7
  189. package/es/components/ticketBooking/components/timeBar/index.less +59 -0
  190. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
  191. package/es/components/ticketBooking/locales.js +9 -3
  192. package/es/components/ticketBooking/utils/index.js +36 -13
  193. package/es/components/wallet/Detail/index.js +34 -2
  194. package/es/components/wallet/Detail/index.less +11 -0
  195. package/es/components/wallet/Detail/locales.js +14 -2
  196. package/es/components/wallet/Detail/model.d.ts +1 -13
  197. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  198. package/es/components/wallet/PointCard/model.d.ts +1 -13
  199. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  200. package/es/components/wallet/Voucher/index.js +11 -10
  201. package/es/components/wallet/Voucher/model.d.ts +1 -13
  202. package/es/components/wallet/components/WalletCard.js +5 -1
  203. package/es/components/wallet/index.js +4 -2
  204. package/es/components/wallet/model.d.ts +1 -9
  205. package/es/components/wallet/utils.js +342 -0
  206. package/es/hooks/usePaymentLogger.d.ts +1 -0
  207. package/es/index.d.ts +4 -0
  208. package/es/index.js +4 -0
  209. package/es/plus/clientCard/locales.js +3 -3
  210. package/es/plus/clientName/index.d.ts +1 -0
  211. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  212. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  213. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  214. package/es/plus/clinetSearch/index.js +28 -30
  215. package/es/plus/clinetSearch/locales.js +7 -4
  216. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
  217. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
  218. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
  219. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
  220. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
  221. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  222. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  223. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  224. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
  225. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  226. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
  227. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  228. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  229. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  230. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
  231. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
  232. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
  233. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  234. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  235. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  236. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  237. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  238. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  239. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  240. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  241. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  242. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  243. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  244. package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
  245. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  246. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  247. package/es/plus/walletPassGallery/index.js +7 -3
  248. package/es/plus/walletPassGallery/serve.js +4 -2
  249. package/es/plus/webPosLogin/WebPosLogin.js +5 -8
  250. package/es/plus/webPosLogin/WebPosLoginCpt.js +1 -1
  251. package/es/plus/webPosLogin/components/BrandPanel/index.js +7 -37
  252. package/es/plus/webPosLogin/components/MediaDisplay/index.d.ts +12 -0
  253. package/es/plus/webPosLogin/components/MediaDisplay/index.js +220 -0
  254. package/es/plus/webPosLogin/components/MediaDisplay/index.less +141 -0
  255. package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
  256. package/es/plus/webPosLogin/components/MediaDisplay/type.js +1 -0
  257. package/es/pro/Login2.0/index.less +15 -8
  258. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  259. package/es/pro/comprehensiveSearch/locales.js +1 -1
  260. package/es/pro/pisellPaymentList/example.d.ts +1 -0
  261. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
  262. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
  263. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
  264. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  265. package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
  266. package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  267. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  268. package/lib/components/booking/addons/index.js +15 -7
  269. package/lib/components/booking/addons/model.d.ts +1 -10
  270. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  271. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  272. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  273. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  274. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  275. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  276. package/lib/components/booking/components/footer/amount.js +276 -38
  277. package/lib/components/booking/components/footer/index.js +30 -11
  278. package/lib/components/booking/components/footer/utils.d.ts +19 -0
  279. package/lib/components/booking/components/footer/utils.js +97 -21
  280. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  281. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  282. package/lib/components/booking/components/voucher/index.js +21 -7
  283. package/lib/components/booking/forms/model.d.ts +1 -10
  284. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  285. package/lib/components/booking/forms/single/index.d.ts +1 -0
  286. package/lib/components/booking/forms/table/index.d.ts +1 -0
  287. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  288. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  289. package/lib/components/booking/info/date/index.d.ts +1 -0
  290. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  291. package/lib/components/booking/info/model.d.ts +1 -10
  292. package/lib/components/booking/info/notes/index.d.ts +1 -0
  293. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  294. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  295. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  296. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  297. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  298. package/lib/components/booking/info/service2/utils.js +1 -0
  299. package/lib/components/booking/info2/cartClientCard/index.js +25 -5
  300. package/lib/components/booking/info2/index.js +7 -2
  301. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  302. package/lib/components/booking/info2/service/addService/index.js +1 -2
  303. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  304. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  305. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  306. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  307. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  308. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  309. package/lib/components/booking/model.d.ts +1 -9
  310. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  311. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  312. package/lib/components/booking/notes/addNote/index.d.ts +1 -0
  313. package/lib/components/booking/notes/model.d.ts +1 -10
  314. package/lib/components/booking/payments/model.d.ts +1 -10
  315. package/lib/components/booking/utils.js +11 -0
  316. package/lib/components/checkout/PaymentModal.d.ts +7 -5
  317. package/lib/components/checkout/PaymentModal.js +171 -135
  318. package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  319. package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
  320. package/lib/components/checkout/components/AmountSummary/index.js +5 -46
  321. package/lib/components/checkout/components/AmountSummary/index.less +5 -6
  322. package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
  323. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  324. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
  325. package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
  326. package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  327. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
  328. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  329. package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
  330. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  331. package/lib/components/checkout/index.less +1 -1
  332. package/lib/components/checkout/locales.js +6 -0
  333. package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  334. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  335. package/lib/components/eftpos/form/index.d.ts +1 -0
  336. package/lib/components/eftpos/group/index.d.ts +1 -0
  337. package/lib/components/eftpos/hooks.d.ts +1 -0
  338. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  339. package/lib/components/eftpos/icon/device.d.ts +1 -0
  340. package/lib/components/eftpos/index.d.ts +1 -0
  341. package/lib/components/eftpos/pos.d.ts +1 -0
  342. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  343. package/lib/components/eftposPay/amount.d.ts +2 -1
  344. package/lib/components/eftposPay/app.d.ts +1 -0
  345. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  346. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  347. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  348. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  349. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  350. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  351. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  352. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  353. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  354. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  355. package/lib/components/eftposPay/device.d.ts +1 -1
  356. package/lib/components/eftposPay/hooks.d.ts +2 -2
  357. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  358. package/lib/components/eftposPay/pay.d.ts +1 -0
  359. package/lib/components/eftposPay/payo/config.js +98 -73
  360. package/lib/components/eftposPay/payo/payment.js +357 -0
  361. package/lib/components/eftposPay/store/index.d.ts +4 -4
  362. package/lib/components/eftposPay/tip.d.ts +1 -0
  363. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  364. package/lib/components/eftposPay/tyro/index.js +12 -0
  365. package/lib/components/eftposPay/utils/log/index.js +294 -0
  366. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  367. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  368. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  369. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  370. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  371. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  372. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  373. package/lib/components/index.js +3 -0
  374. package/lib/components/login/index.d.ts +1 -0
  375. package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
  376. package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
  377. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  378. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  379. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  380. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  381. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  382. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  383. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  384. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  385. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  386. package/lib/components/pay/toC/index.js +4 -1
  387. package/lib/components/pay/toC/locales.js +6 -3
  388. package/lib/components/pay/toC/model.d.ts +1 -9
  389. package/lib/components/pay/toC/status.js +5 -0
  390. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  391. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  392. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  393. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  394. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  395. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  396. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  397. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  398. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  399. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  400. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  401. package/lib/components/schedules/calendar/index.d.ts +1 -0
  402. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  403. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  404. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  405. package/lib/components/schedules/model.d.ts +1 -9
  406. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  407. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  408. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  409. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  410. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  411. package/lib/components/schedules/products/index.d.ts +1 -0
  412. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  413. package/lib/components/schedules/products/list/index.d.ts +1 -0
  414. package/lib/components/schedules/resources/index.d.ts +1 -0
  415. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  416. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  417. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  418. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  419. package/lib/components/schedules/schedules/index.d.ts +1 -0
  420. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  421. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  422. package/lib/components/shoppingCart/index.d.ts +1 -0
  423. package/lib/components/subTotal/index.js +1 -1
  424. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  425. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  426. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  427. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  428. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  429. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  430. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  431. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  432. package/lib/components/systemSettings/registry/components/index.js +48 -0
  433. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  434. package/lib/components/systemSettings/registry/index.js +529 -0
  435. package/lib/components/systemSettings/registry/index.less +410 -0
  436. package/lib/components/systemSettings/registry/locales.js +324 -0
  437. package/lib/components/systemSettings/registry/services.js +290 -0
  438. package/lib/components/systemSettings/registry/types.js +17 -0
  439. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  440. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  441. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
  442. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  443. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  444. package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
  445. package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
  446. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
  447. package/lib/components/ticketBooking/locales.js +9 -3
  448. package/lib/components/ticketBooking/utils/index.js +20 -6
  449. package/lib/components/wallet/Detail/index.js +31 -3
  450. package/lib/components/wallet/Detail/index.less +11 -0
  451. package/lib/components/wallet/Detail/locales.js +14 -2
  452. package/lib/components/wallet/Detail/model.d.ts +1 -13
  453. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  454. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  455. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  456. package/lib/components/wallet/Voucher/index.js +8 -8
  457. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  458. package/lib/components/wallet/components/WalletCard.js +4 -0
  459. package/lib/components/wallet/index.js +2 -2
  460. package/lib/components/wallet/model.d.ts +1 -9
  461. package/lib/components/wallet/utils.js +287 -0
  462. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  463. package/lib/index.d.ts +4 -0
  464. package/lib/index.js +12 -0
  465. package/lib/plus/clientCard/locales.js +3 -3
  466. package/lib/plus/clientName/index.d.ts +1 -0
  467. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  468. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  469. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  470. package/lib/plus/clinetSearch/index.js +17 -8
  471. package/lib/plus/clinetSearch/locales.js +7 -4
  472. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
  473. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
  474. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
  475. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
  476. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
  477. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  478. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  479. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  480. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
  481. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  482. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
  483. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  484. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  485. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  486. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
  487. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
  488. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
  489. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  490. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  491. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  492. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  493. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  494. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  495. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  496. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  497. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  498. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  499. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  500. package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
  501. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  502. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  503. package/lib/plus/walletPassGallery/index.js +7 -3
  504. package/lib/plus/walletPassGallery/serve.js +3 -2
  505. package/lib/plus/webPosLogin/WebPosLogin.js +17 -21
  506. package/lib/plus/webPosLogin/WebPosLoginCpt.js +1 -1
  507. package/lib/plus/webPosLogin/components/BrandPanel/index.js +2 -22
  508. package/lib/plus/webPosLogin/components/MediaDisplay/index.d.ts +12 -0
  509. package/lib/plus/webPosLogin/components/MediaDisplay/index.js +160 -0
  510. package/lib/plus/webPosLogin/components/MediaDisplay/index.less +141 -0
  511. package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
  512. package/lib/plus/webPosLogin/components/MediaDisplay/type.js +17 -0
  513. package/lib/pro/Login2.0/index.less +15 -8
  514. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  515. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  516. package/lib/pro/pisellPaymentList/example.d.ts +1 -0
  517. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
  518. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
  519. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
  520. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  521. package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
  522. package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  523. package/lowcode/settings-registry/meta.ts +29 -0
  524. package/lowcode/wallet-pass-detail/meta.ts +89 -0
  525. package/package.json +4 -4
  526. package/es/components/booking/components/footer/amount.d.ts +0 -36
  527. package/es/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
  528. package/es/components/booking/info/service2/utils.d.ts +0 -251
  529. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  530. package/es/components/booking/utils.d.ts +0 -173
  531. package/es/components/checkout/PaymentPlugin.d.ts +0 -2
  532. package/es/components/checkout/components/CashPaymentModule/index.d.ts +0 -24
  533. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -15
  534. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -81
  535. package/es/components/checkout/locales.d.ts +0 -507
  536. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -33
  537. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  538. package/es/components/eftposPay/payo/config.d.ts +0 -12
  539. package/es/components/eftposPay/tyro/index.d.ts +0 -9
  540. package/es/components/index.d.ts +0 -23
  541. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -149
  542. package/es/components/pay/toC/locales.d.ts +0 -298
  543. package/es/components/pay/toC/status.d.ts +0 -12
  544. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
  545. package/es/components/ticketBooking/locales.d.ts +0 -192
  546. package/es/components/ticketBooking/utils/index.d.ts +0 -90
  547. package/es/components/wallet/Detail/locales.d.ts +0 -147
  548. package/es/components/wallet/serve.d.ts +0 -143
  549. package/es/plus/clientCard/locales.d.ts +0 -18
  550. package/es/plus/clinetSearch/index.d.ts +0 -17
  551. package/es/plus/clinetSearch/locales.d.ts +0 -102
  552. package/es/plus/clinetSearch/types.d.ts +0 -49
  553. package/es/plus/walletPassGallery/serve.d.ts +0 -218
  554. package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +0 -15
  555. package/es/pro/comprehensiveSearch/locales.d.ts +0 -15
  556. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -11
  557. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -97
  558. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -17
  559. package/lib/components/booking/components/footer/amount.d.ts +0 -36
  560. package/lib/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
  561. package/lib/components/booking/info/service2/utils.d.ts +0 -251
  562. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  563. package/lib/components/booking/utils.d.ts +0 -173
  564. package/lib/components/checkout/PaymentPlugin.d.ts +0 -2
  565. package/lib/components/checkout/PaymentPlugin.js +0 -181
  566. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +0 -24
  567. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -15
  568. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -81
  569. package/lib/components/checkout/locales.d.ts +0 -507
  570. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -33
  571. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  572. package/lib/components/eftposPay/payo/config.d.ts +0 -12
  573. package/lib/components/eftposPay/tyro/index.d.ts +0 -9
  574. package/lib/components/index.d.ts +0 -23
  575. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -149
  576. package/lib/components/pay/toC/locales.d.ts +0 -298
  577. package/lib/components/pay/toC/status.d.ts +0 -12
  578. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
  579. package/lib/components/ticketBooking/locales.d.ts +0 -192
  580. package/lib/components/ticketBooking/utils/index.d.ts +0 -90
  581. package/lib/components/wallet/Detail/locales.d.ts +0 -147
  582. package/lib/components/wallet/serve.d.ts +0 -143
  583. package/lib/plus/clientCard/locales.d.ts +0 -18
  584. package/lib/plus/clinetSearch/index.d.ts +0 -17
  585. package/lib/plus/clinetSearch/locales.d.ts +0 -102
  586. package/lib/plus/clinetSearch/types.d.ts +0 -49
  587. package/lib/plus/walletPassGallery/serve.d.ts +0 -218
  588. package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +0 -15
  589. package/lib/pro/comprehensiveSearch/locales.d.ts +0 -15
  590. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -11
  591. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -97
  592. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -17
@@ -1,4 +1,12 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
7
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
9
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
12
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -34,7 +42,7 @@ export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_d
34
42
  * @param state
35
43
  * @returns
36
44
  */
37
- var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
45
+ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOriginTotal) {
38
46
  var price = new Decimal(0);
39
47
  var duration = new Decimal(0);
40
48
  // 是否是跨日预约
@@ -54,7 +62,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
54
62
  if (isDay || isNormalProductByDurationSchedule(item)) {
55
63
  var quantity = new Decimal(item._extend.quantity || 1);
56
64
  var itemTotal = new Decimal(item._extend.total || 0);
57
- price = price.add(itemTotal.mul(quantity));
65
+ var itemOriginTotal = new Decimal(item._extend.origin_total || 0);
66
+ price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
58
67
 
59
68
  // 普通商品不能加到时长上
60
69
  var _duration = isDayBookingProduct(item, state) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
@@ -62,7 +71,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
62
71
  } else {
63
72
  var _quantity = new Decimal(item._extend.quantity || 1);
64
73
  var _itemTotal = new Decimal(item._extend.total || 0);
65
- price = price.add(_itemTotal.mul(_quantity));
74
+ var _itemOriginTotal = new Decimal(item._extend.origin_total || 0);
75
+ price = price.add((isOriginTotal ? _itemOriginTotal : _itemTotal).mul(_quantity));
66
76
 
67
77
  // 附加商品
68
78
  var relationTotal = new Decimal(getRelationDetailsTotal(item._extend.relation_details || []));
@@ -87,7 +97,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit) {
87
97
  var _item = _step3.value;
88
98
  var _quantity2 = new Decimal(_item._extend.quantity || 1);
89
99
  var _itemTotal2 = new Decimal(_item._extend.total || 0);
90
- price = price.add(_itemTotal2.mul(_quantity2));
100
+ var _itemOriginTotal2 = new Decimal(_item._extend.origin_total || 0);
101
+ price = price.add((isOriginTotal ? _itemOriginTotal2 : _itemTotal2).mul(_quantity2));
91
102
  }
92
103
  } catch (err) {
93
104
  _iterator3.e(err);
@@ -164,7 +175,52 @@ var getProductItemTax = function getProductItemTax(item, state, options) {
164
175
  }
165
176
 
166
177
  // 结果 = 单个商品税费 × 数量
167
- return singleItemTax.times(quantity);
178
+ return singleItemTax.times(quantity).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
179
+ };
180
+
181
+ /**
182
+ * 计算商品附加费 包含子商品的总附加费
183
+ */
184
+ var getProductSurchargeFee = function getProductSurchargeFee(product) {
185
+ var _extend = product._extend;
186
+ if (!_extend) {
187
+ return 0;
188
+ }
189
+ var surcharge_fee = _extend.surcharge_fee,
190
+ relation_details = _extend.relation_details,
191
+ other = _extend.other,
192
+ surcharge_rounding_remainder = _extend.surcharge_rounding_remainder;
193
+ var totalSurchargeFee = new Decimal(0);
194
+ if (surcharge_fee) {
195
+ totalSurchargeFee = totalSurchargeFee.plus(surcharge_fee);
196
+ }
197
+ if (surcharge_rounding_remainder) {
198
+ totalSurchargeFee = totalSurchargeFee.plus(surcharge_rounding_remainder);
199
+ }
200
+ if (relation_details) {
201
+ var _iterator4 = _createForOfIteratorHelper(relation_details),
202
+ _step4;
203
+ try {
204
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
205
+ var item = _step4.value;
206
+ totalSurchargeFee = totalSurchargeFee.plus(getProductSurchargeFee(item));
207
+ }
208
+ } catch (err) {
209
+ _iterator4.e(err);
210
+ } finally {
211
+ _iterator4.f();
212
+ }
213
+ }
214
+ if (other !== null && other !== void 0 && other.bundle) {
215
+ totalSurchargeFee = totalSurchargeFee.plus(other.bundle.reduce(function (total, item) {
216
+ var surchargeFee = new Decimal(item.surcharge_fee || 0).times(item.num || item.quantity || 1);
217
+ if (item.surcharge_rounding_remainder) {
218
+ surchargeFee = surchargeFee.plus(item.surcharge_rounding_remainder);
219
+ }
220
+ return total.plus(surchargeFee);
221
+ }, new Decimal(0)));
222
+ }
223
+ return totalSurchargeFee.toNumber();
168
224
  };
169
225
 
170
226
  /**
@@ -183,17 +239,21 @@ var processItemsTax = function processItemsTax(items, state, options) {
183
239
  productExpectAmount = computed.productExpectAmount;
184
240
  var originTax = new Decimal(0);
185
241
  var tax = new Decimal(0);
186
- var _iterator4 = _createForOfIteratorHelper(items),
187
- _step4;
242
+ var _iterator5 = _createForOfIteratorHelper(items),
243
+ _step5;
188
244
  try {
189
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
190
- var item = _step4.value;
245
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
246
+ var _item$_extend, _item$_extend2, _item$_extend$other;
247
+ var item = _step5.value;
191
248
  var quantity = new Decimal(item._extend.quantity || 1);
192
249
  var unitPrice = new Decimal(item._extend.total || 0);
250
+ var mainProductPrice = new Decimal(getMainProductTotal(item) || 0);
251
+
252
+ // const surchargeFee = getProductSurchargeFee(item);
193
253
 
194
254
  // 计算原始税费(折扣前)- 单个商品
195
255
  var originalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
196
- total: unitPrice.toNumber(),
256
+ total: mainProductPrice.add(((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.surcharge_fee) || 0).toNumber(),
197
257
  quantity: 1
198
258
  }), state, {
199
259
  tax_rate: tax_rate,
@@ -206,12 +266,31 @@ var processItemsTax = function processItemsTax(items, state, options) {
206
266
  itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
207
267
  }
208
268
 
209
- // 商品折后单价 = 商品单价 - 商品折后单价
210
- var itemDiscountedUnitPrice = unitPrice.minus(itemDiscount);
269
+ // // 商品折后单价 = 商品单价 - 商品折后单价
270
+ // const itemDiscountedUnitPrice = unitPrice.minus(itemDiscount).add(surchargeFee);
211
271
 
212
- // 计算折后税费(折扣后)- 单个商品
213
- var discountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
214
- total: itemDiscountedUnitPrice.toNumber(),
272
+ // // 计算折后税费(折扣后)- 单个商品 加子商品的税费
273
+ // const discountedTaxPerItem = getProductItemTax(
274
+ // {
275
+ // ...item,
276
+ // total: itemDiscountedUnitPrice.toNumber(),
277
+ // price: item._extend.total,
278
+ // quantity: 1,
279
+ // },
280
+ // state,
281
+ // { tax_rate, is_price_include_tax }
282
+ // );
283
+
284
+ // 按比例计算主商品应分摊的折扣
285
+ var mainItemDiscount = new Decimal(0);
286
+ if (unitPrice.greaterThan(0)) {
287
+ mainItemDiscount = mainProductPrice.dividedBy(productExpectAmount).times(shopDiscount);
288
+ }
289
+ var mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.surcharge_fee) || 0);
290
+
291
+ // 计算折后税费(折扣后)- 主商品的税费
292
+ var maxDiscountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
293
+ total: mainItemDiscountedUnitPrice.toNumber(),
215
294
  price: item._extend.total,
216
295
  quantity: 1
217
296
  }), state, {
@@ -219,18 +298,20 @@ var processItemsTax = function processItemsTax(items, state, options) {
219
298
  is_price_include_tax: is_price_include_tax
220
299
  });
221
300
 
222
- // 保存到商品扩展信息中
223
- item._extend.original_tax_fee = originalTaxPerItem.toNumber();
224
- item._extend.tax_fee = discountedTaxPerItem.toNumber();
301
+ // item._extend.payment_price = itemDiscountedUnitPrice;
302
+ // 保存到商品扩展信息中(保留两位小数)
303
+ // item._extend.original_tax_fee = originalTaxPerItem.toNumber();
304
+ // item._extend.tax_fee = discountedTaxPerItem.toNumber();
305
+ item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItem.toNumber();
225
306
 
226
307
  // 注意:加时商品独立计算,不考虑主商品数量
227
308
  var addTimeTotalTax = new Decimal(0);
228
309
  if (Array.isArray(item._extend.relation_details)) {
229
- var _iterator5 = _createForOfIteratorHelper(item._extend.relation_details),
230
- _step5;
310
+ var _iterator6 = _createForOfIteratorHelper(item._extend.relation_details),
311
+ _step6;
231
312
  try {
232
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
233
- var atItem = _step5.value;
313
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
314
+ var atItem = _step6.value;
234
315
  // 计算单件加时商品折扣后价格
235
316
  var _originTotal = new Decimal(atItem.selling_price || atItem.price || 0);
236
317
  var _discountedTotal = _originTotal;
@@ -238,8 +319,7 @@ var processItemsTax = function processItemsTax(items, state, options) {
238
319
  _discountedTotal = _originTotal.minus(_originTotal.dividedBy(productExpectAmount).times(shopDiscount));
239
320
  }
240
321
  var addTimeTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, atItem), {}, {
241
- total: _discountedTotal,
242
- // 可能包含原有数据,或前端临时数据
322
+ total: _discountedTotal.add((atItem === null || atItem === void 0 ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
243
323
  quantity: atItem.product_quantity || atItem.num || 1
244
324
  }), state, {
245
325
  tax_rate: tax_rate,
@@ -248,20 +328,84 @@ var processItemsTax = function processItemsTax(items, state, options) {
248
328
  addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
249
329
  }
250
330
  } catch (err) {
251
- _iterator5.e(err);
331
+ _iterator6.e(err);
332
+ } finally {
333
+ _iterator6.f();
334
+ }
335
+ }
336
+
337
+ // 处理 bundle 子商品(仅原价子商品)
338
+ var bundleTotalOriginTax = new Decimal(0);
339
+ var bundleTotalTax = new Decimal(0);
340
+ if (Array.isArray((_item$_extend$other = item._extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle)) {
341
+ var _iterator7 = _createForOfIteratorHelper(item._extend.other.bundle),
342
+ _step7;
343
+ try {
344
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
345
+ var bundleItem = _step7.value;
346
+ // 只处理原价的子商品
347
+ if (getBundleItemIsOriginalPrice(bundleItem)) {
348
+ var _ref2, _bundleItem$bundle_se;
349
+ var bundleQuantity = new Decimal(bundleItem.quantity || 1);
350
+ var bundleUnitPrice = new Decimal((_ref2 = (_bundleItem$bundle_se = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se !== void 0 ? _bundleItem$bundle_se : bundleItem.price) !== null && _ref2 !== void 0 ? _ref2 : 0);
351
+
352
+ // 计算原始税费(折扣前)- 单个商品
353
+ var bundleOriginalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
354
+ total: bundleUnitPrice.add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
355
+ quantity: 1
356
+ }), state, {
357
+ tax_rate: tax_rate,
358
+ is_price_include_tax: is_price_include_tax
359
+ });
360
+
361
+ // 计算平摊到该bundle商品的折扣
362
+ var bundleItemDiscount = new Decimal(0);
363
+ if (productExpectAmount > 0) {
364
+ bundleItemDiscount = bundleUnitPrice.dividedBy(productExpectAmount).times(shopDiscount);
365
+ }
366
+
367
+ // bundle商品折后单价
368
+ var bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0);
369
+
370
+ // 计算折后税费(折扣后)- 单个商品
371
+ var bundleDiscountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
372
+ total: bundleDiscountedUnitPrice.toNumber(),
373
+ quantity: 1
374
+ }), state, {
375
+ tax_rate: tax_rate,
376
+ is_price_include_tax: is_price_include_tax
377
+ });
378
+
379
+ // bundle商品折后单价
380
+ // bundleItem.bundle_payment_price = bundleDiscountedUnitPrice;
381
+ // 保存到bundle商品上(单个商品的税费,保留两位小数)
382
+ bundleItem.original_tax_fee = new Decimal(bundleOriginalTaxPerItem).toNumber();
383
+ bundleItem.tax_fee = new Decimal(bundleDiscountedTaxPerItem).toNumber();
384
+
385
+ // 累加bundle税费(需要乘以bundle数量和主商品数量)
386
+ bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
387
+ bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
388
+ }
389
+ }
390
+ } catch (err) {
391
+ _iterator7.e(err);
252
392
  } finally {
253
- _iterator5.f();
393
+ _iterator7.f();
254
394
  }
255
395
  }
396
+ var original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
397
+ var tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
398
+ item._extend.original_tax_fee = original_tax_fee.toNumber();
399
+ item._extend.tax_fee = tax_fee.toNumber();
256
400
 
257
401
  // 累加到总税费(乘以数量)
258
- originTax = originTax.plus(originalTaxPerItem.times(quantity)).plus(addTimeTotalTax);
259
- tax = tax.plus(discountedTaxPerItem.times(quantity)).plus(addTimeTotalTax);
402
+ originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
403
+ tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
260
404
  }
261
405
  } catch (err) {
262
- _iterator4.e(err);
406
+ _iterator5.e(err);
263
407
  } finally {
264
- _iterator4.f();
408
+ _iterator5.f();
265
409
  }
266
410
  return {
267
411
  originTax: originTax,
@@ -361,10 +505,9 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
361
505
  var surchargeConfig = options.surchargeConfig,
362
506
  _options$scheduleById = options.scheduleById,
363
507
  scheduleById = _options$scheduleById === void 0 ? {} : _options$scheduleById;
364
- var _item$_extend = item._extend,
365
- startDate = _item$_extend.startDate,
366
- other = _item$_extend.other,
367
- isCustomItem = _item$_extend.isCustomItem;
508
+ var startDate = item.startDate,
509
+ product_id = item.product_id,
510
+ isCustomItem = item.isCustomItem;
368
511
  var _surchargeConfig$open = surchargeConfig.open_product,
369
512
  open_product = _surchargeConfig$open === void 0 ? 0 : _surchargeConfig$open,
370
513
  _surchargeConfig$is_a = surchargeConfig.is_all,
@@ -395,7 +538,6 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
395
538
  isProductMatch = false;
396
539
  } else {
397
540
  // 普通商品:检查是否在指定商品列表中
398
- var product_id = other === null || other === void 0 ? void 0 : other.product_id;
399
541
  isProductMatch = available_product_ids.includes(product_id);
400
542
  }
401
543
  }
@@ -434,6 +576,156 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
434
576
  return isProductMatch && isScheduleMatch;
435
577
  };
436
578
 
579
+ // bundle商品是否是原价
580
+ var getBundleItemIsOriginalPrice = function getBundleItemIsOriginalPrice(item) {
581
+ return (item === null || item === void 0 ? void 0 : item.price_type) === 'markup' && (item === null || item === void 0 ? void 0 : item.price_type_ext) === 'product_price';
582
+ };
583
+
584
+ // bundle商品是否是加价
585
+ var getBundleItemIsMarkupPrice = function getBundleItemIsMarkupPrice(item) {
586
+ return (item === null || item === void 0 ? void 0 : item.price_type) === 'markup' && ((item === null || item === void 0 ? void 0 : item.price_type_ext) === '' || !(item !== null && item !== void 0 && item.price_type_ext));
587
+ };
588
+
589
+ // bundle商品是否是减价
590
+ var getBundleItemIsDiscountPrice = function getBundleItemIsDiscountPrice(item) {
591
+ return (item === null || item === void 0 ? void 0 : item.price_type) === 'markdown' && ((item === null || item === void 0 ? void 0 : item.price_type_ext) === '' || !(item !== null && item !== void 0 && item.price_type_ext));
592
+ };
593
+
594
+ // bundle商品是否是加价或减价
595
+ var getBundleItemIsMarkupOrDiscountPrice = function getBundleItemIsMarkupOrDiscountPrice(item) {
596
+ return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
597
+ };
598
+ var getDiscountAmount = function getDiscountAmount(discounts) {
599
+ return (discounts || []).reduce(function (total, discount) {
600
+ return total.add(new Decimal(discount.amount || 0));
601
+ }, new Decimal(0)).toNumber();
602
+ };
603
+
604
+ /**
605
+ * 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
606
+ */
607
+ var getMainProductTotal = function getMainProductTotal(item) {
608
+ var _item$_extend$other2, _item$_extend$other3, _item$_extend$other5;
609
+ var total = new Decimal(item._extend.main_product_selling_price || item._extend.price || 0);
610
+
611
+ // 如果主商品没有main_product_selling_price 则通过discount_list计算
612
+ if (!item._extend.main_product_selling_price) {
613
+ // 主商品折扣金额
614
+ var discountAmount = getDiscountAmount(item.discount_list);
615
+ // 主商品总价 - 主商品折扣金额
616
+ total = total.minus(discountAmount);
617
+ }
618
+
619
+ // 单规格
620
+ if ((_item$_extend$other2 = item._extend.other) !== null && _item$_extend$other2 !== void 0 && _item$_extend$other2.option && Array.isArray((_item$_extend$other3 = item._extend.other) === null || _item$_extend$other3 === void 0 ? void 0 : _item$_extend$other3.option)) {
621
+ var _item$_extend$other4;
622
+ total = total.add((_item$_extend$other4 = item._extend.other) === null || _item$_extend$other4 === void 0 ? void 0 : _item$_extend$other4.option.reduce(function (t, option) {
623
+ return t.add(new Decimal(option.price || 0).mul(option.num || 1));
624
+ }, new Decimal(0)));
625
+ }
626
+ var _iterator8 = _createForOfIteratorHelper(((_item$_extend$other5 = item._extend.other) === null || _item$_extend$other5 === void 0 ? void 0 : _item$_extend$other5.bundle) || []),
627
+ _step8;
628
+ try {
629
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
630
+ var bundleItem = _step8.value;
631
+ if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
632
+ var _ref3, _bundleItem$bundle_se2;
633
+ // 子商品折扣金额
634
+ var _discountAmount = getDiscountAmount(bundleItem.discount_list);
635
+ // 子商品价格
636
+ var bundleItemPrice = new Decimal((_ref3 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref3 !== void 0 ? _ref3 : 0);
637
+ // todo: 套餐子商品后不需要处理 子商品价格 - 子商品折扣金额
638
+ var bundleItemTotal = bundleItemPrice.minus(_discountAmount);
639
+ total = total.add(bundleItemTotal);
640
+ }
641
+ }
642
+ } catch (err) {
643
+ _iterator8.e(err);
644
+ } finally {
645
+ _iterator8.f();
646
+ }
647
+ return total.toNumber();
648
+ };
649
+
650
+ /**
651
+ * 清除附加费
652
+ */
653
+ var clearSurchargeFee = function clearSurchargeFee(state) {
654
+ var service = state.service,
655
+ addons = state.addons;
656
+ if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
657
+ var _iterator9 = _createForOfIteratorHelper(service.value),
658
+ _step9;
659
+ try {
660
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
661
+ var _item$_extend$other6;
662
+ var item = _step9.value;
663
+ item._extend.surcharge_fee = 0;
664
+ item._extend.relation_surcharge_ids = [];
665
+ var _iterator10 = _createForOfIteratorHelper(((_item$_extend$other6 = item._extend.other) === null || _item$_extend$other6 === void 0 ? void 0 : _item$_extend$other6.bundle) || []),
666
+ _step10;
667
+ try {
668
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
669
+ var bundleItem = _step10.value;
670
+ bundleItem.surcharge_fee = 0;
671
+ bundleItem.relation_surcharge_ids = [];
672
+ }
673
+ } catch (err) {
674
+ _iterator10.e(err);
675
+ } finally {
676
+ _iterator10.f();
677
+ }
678
+ var _iterator11 = _createForOfIteratorHelper(item._extend.relation_details || []),
679
+ _step11;
680
+ try {
681
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
682
+ var relationDetail = _step11.value;
683
+ relationDetail.surcharge_fee = 0;
684
+ relationDetail.relation_surcharge_ids = [];
685
+ }
686
+ } catch (err) {
687
+ _iterator11.e(err);
688
+ } finally {
689
+ _iterator11.f();
690
+ }
691
+ }
692
+ } catch (err) {
693
+ _iterator9.e(err);
694
+ } finally {
695
+ _iterator9.f();
696
+ }
697
+ }
698
+ if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
699
+ var _iterator12 = _createForOfIteratorHelper(addons.value),
700
+ _step12;
701
+ try {
702
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
703
+ var _item2$_extend$other;
704
+ var _item2 = _step12.value;
705
+ _item2._extend.surcharge_fee = 0;
706
+ _item2._extend.relation_surcharge_ids = [];
707
+ var _iterator13 = _createForOfIteratorHelper(((_item2$_extend$other = _item2._extend.other) === null || _item2$_extend$other === void 0 ? void 0 : _item2$_extend$other.bundle) || []),
708
+ _step13;
709
+ try {
710
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
711
+ var _bundleItem = _step13.value;
712
+ _bundleItem.surcharge_fee = 0;
713
+ _bundleItem.relation_surcharge_ids = [];
714
+ }
715
+ } catch (err) {
716
+ _iterator13.e(err);
717
+ } finally {
718
+ _iterator13.f();
719
+ }
720
+ }
721
+ } catch (err) {
722
+ _iterator12.e(err);
723
+ } finally {
724
+ _iterator12.f();
725
+ }
726
+ }
727
+ };
728
+
437
729
  /**
438
730
  * 订单附加费各项信息
439
731
  * @param state
@@ -470,6 +762,8 @@ var getSurcharge = function getSurcharge(state, options) {
470
762
  }
471
763
  return [];
472
764
  }
765
+ // 清除附加费
766
+ clearSurchargeFee(state);
473
767
 
474
768
  // 新增状态
475
769
  var service = state.service,
@@ -489,85 +783,222 @@ var getSurcharge = function getSurcharge(state, options) {
489
783
  fixed = _surchargeConfig$fixe === void 0 ? '0' : _surchargeConfig$fixe,
490
784
  id = surchargeConfig.id,
491
785
  type = surchargeConfig.type,
492
- description = surchargeConfig.description;
786
+ description = surchargeConfig.description,
787
+ open_product = surchargeConfig.open_product;
493
788
 
494
789
  // 收集所有符合条件的商品
495
790
  var matchedItems = [];
496
791
 
497
792
  // 检查service中符合条件的商品
498
793
  if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
499
- var _iterator6 = _createForOfIteratorHelper(service.value),
500
- _step6;
794
+ var _iterator14 = _createForOfIteratorHelper(service.value),
795
+ _step14;
501
796
  try {
502
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
503
- var item = _step6.value;
504
- if (isProductMatchSurchargeCondition(item, {
797
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
798
+ var _item$_extend$other7;
799
+ var item = _step14.value;
800
+ // 主商品符合附加费条件
801
+ if (isProductMatchSurchargeCondition({
802
+ isCustomItem: item.isCustomItem,
803
+ startDate: item._extend.startDate,
804
+ product_id: item.product_id
805
+ }, {
505
806
  surchargeConfig: surchargeConfig,
506
807
  scheduleById: scheduleById || {},
507
808
  ScheduleModule: ScheduleModule
508
809
  })) {
810
+ // 主商品加价减价后的总价
811
+ var total = getMainProductTotal(item);
812
+ var mainQuantity = item._extend.quantity || 1;
509
813
  matchedItems.push({
510
- total: Number(item._extend.total),
511
- addTimeTotal: getRelationDetailsTotal(item._extend.relation_details || []),
512
- quantity: item._extend.quantity || 1
814
+ total: total,
815
+ // addTimeTotal: getRelationDetailsTotal(
816
+ // item._extend.relation_details || []
817
+ // ),
818
+ isMain: true,
819
+ quantity: mainQuantity,
820
+ item: item,
821
+ mainQuantity: mainQuantity // 主商品的mainQuantity等于自己的quantity
513
822
  });
514
823
  }
824
+ // 遍历子商品 原价商品符合附加费条件
825
+ var _iterator15 = _createForOfIteratorHelper(((_item$_extend$other7 = item._extend.other) === null || _item$_extend$other7 === void 0 ? void 0 : _item$_extend$other7.bundle) || []),
826
+ _step15;
827
+ try {
828
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
829
+ var bundleItem = _step15.value;
830
+ // bundle商品是原价且符合附加费条件
831
+ if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition({
832
+ isCustomItem: false,
833
+ startDate: item._extend.startDate,
834
+ product_id: bundleItem._bundle_product_id
835
+ }, {
836
+ surchargeConfig: surchargeConfig,
837
+ scheduleById: scheduleById || {},
838
+ ScheduleModule: ScheduleModule
839
+ })) {
840
+ var _ref4, _bundleItem$bundle_se3;
841
+ var _mainQuantity = item._extend.quantity || 1;
842
+ matchedItems.push({
843
+ isMain: false,
844
+ total: Number((_ref4 = (_bundleItem$bundle_se3 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se3 !== void 0 ? _bundleItem$bundle_se3 : bundleItem.price) !== null && _ref4 !== void 0 ? _ref4 : 0),
845
+ quantity: bundleItem.num || bundleItem.quantity || 1,
846
+ item: bundleItem,
847
+ mainQuantity: _mainQuantity // 子商品的mainQuantity是所属主商品的quantity
848
+ });
849
+ }
850
+ }
851
+
852
+ // 加时商品符合附加费条件
853
+ } catch (err) {
854
+ _iterator15.e(err);
855
+ } finally {
856
+ _iterator15.f();
857
+ }
858
+ var _iterator16 = _createForOfIteratorHelper(item._extend.relation_details || []),
859
+ _step16;
860
+ try {
861
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
862
+ var relationDetail = _step16.value;
863
+ if (isProductMatchSurchargeCondition({
864
+ isCustomItem: false,
865
+ startDate: item._extend.startDate,
866
+ product_id: relationDetail.product_id
867
+ }, {
868
+ surchargeConfig: surchargeConfig,
869
+ scheduleById: scheduleById || {},
870
+ ScheduleModule: ScheduleModule
871
+ })) {
872
+ var _relationDetail$metad;
873
+ matchedItems.push({
874
+ isMain: false,
875
+ total: Number((relationDetail === null || relationDetail === void 0 ? void 0 : relationDetail.price) || (relationDetail === null || relationDetail === void 0 || (_relationDetail$metad = relationDetail.metadata) === null || _relationDetail$metad === void 0 ? void 0 : _relationDetail$metad.main_product_attached_bundle_selling_price)),
876
+ quantity: relationDetail.num || relationDetail.quantity || 1,
877
+ item: relationDetail,
878
+ mainQuantity: 1 // 加时商品不受主商品数量影响
879
+ });
880
+ }
881
+ }
882
+ } catch (err) {
883
+ _iterator16.e(err);
884
+ } finally {
885
+ _iterator16.f();
886
+ }
515
887
  }
516
888
  } catch (err) {
517
- _iterator6.e(err);
889
+ _iterator14.e(err);
518
890
  } finally {
519
- _iterator6.f();
891
+ _iterator14.f();
520
892
  }
521
893
  }
522
894
 
523
895
  // 检查addons中符合条件的商品
524
896
  if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
525
- var _iterator7 = _createForOfIteratorHelper(addons.value),
526
- _step7;
897
+ var _iterator17 = _createForOfIteratorHelper(addons.value),
898
+ _step17;
527
899
  try {
528
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
529
- var _item2 = _step7.value;
530
- if (isProductMatchSurchargeCondition(_item2, {
900
+ for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
901
+ var _item3 = _step17.value;
902
+ if (isProductMatchSurchargeCondition(_item3, {
531
903
  surchargeConfig: surchargeConfig,
532
904
  scheduleById: scheduleById || {},
533
905
  ScheduleModule: ScheduleModule
534
906
  })) {
535
907
  matchedItems.push({
536
- total: Number(_item2._extend.total),
537
- quantity: _item2._extend.quantity || 1
908
+ isMain: true,
909
+ total: Number(_item3._extend.total),
910
+ quantity: _item3._extend.quantity || 1,
911
+ item: _item3,
912
+ mainQuantity: 1 // addons独立商品,mainQuantity为1
538
913
  });
539
914
  }
540
915
  }
541
916
  } catch (err) {
542
- _iterator7.e(err);
917
+ _iterator17.e(err);
543
918
  } finally {
544
- _iterator7.f();
919
+ _iterator17.f();
545
920
  }
546
921
  }
547
922
  var finalAmount = 0;
923
+
924
+ // 计算商品总数:主商品和addons按quantity计算,子商品(bundle item)需要乘以主商品数量
925
+ var productCount = matchedItems.reduce(function (total, item) {
926
+ if (item.isMain) {
927
+ // 主商品和addons商品
928
+ return total + (item.quantity || 1);
929
+ } else {
930
+ // 子商品(bundle item)和加时商品
931
+ // 加时商品的 mainQuantity = 1,所以不受影响
932
+ // bundle item 的 mainQuantity = 主商品数量,需要乘以实际数量
933
+ return total + (item.quantity || 1) * (item.mainQuantity || 1);
934
+ }
935
+ }, 0);
936
+
937
+ // 追加进入的固定附加费总值
938
+ var fixedTotal = new Decimal(0);
548
939
  if (matchedItems.length > 0) {
549
940
  // 基于每个商品计算附加费:max(0, 商品价格) * rate + fixed
550
941
  var configTotal = new Decimal(0);
551
942
 
552
943
  // 计算百分比附加费 - 对每个商品单独计算
553
- if (percentage && new Decimal(percentage).gt(0)) {
944
+ if (percentage && new Decimal(percentage).gt(0) || fixed) {
554
945
  var percentageRate = new Decimal(percentage);
555
- var _iterator8 = _createForOfIteratorHelper(matchedItems),
556
- _step8;
946
+ var _iterator18 = _createForOfIteratorHelper(matchedItems.entries()),
947
+ _step18;
557
948
  try {
558
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
559
- var _item3 = _step8.value;
949
+ for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
950
+ var _step18$value = _slicedToArray(_step18.value, 2),
951
+ index = _step18$value[0],
952
+ _item4 = _step18$value[1];
953
+ var isLast = index === matchedItems.length - 1;
560
954
  // 对每个商品:max(0, 价格) * 数量 * 费率
561
- var itemPrice = new Decimal(Math.max(0, _item3.total || 0));
562
- var itemQuantity = new Decimal(_item3.quantity || 1);
563
- var addTimeTotal = new Decimal(_item3.addTimeTotal || 0);
564
- var itemSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
565
- configTotal = configTotal.plus(itemSurcharge);
955
+ var itemPrice = new Decimal(Math.max(0, _item4.total || 0));
956
+ var itemQuantity = new Decimal(_item4.isMain ? _item4.quantity || 1 : _item4.quantity * _item4.mainQuantity || 1);
957
+ var addTimeTotal = new Decimal(_item4.addTimeTotal || 0);
958
+ // 单个商品总附加费
959
+ var itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
960
+
961
+ // 单个商品单数量附加费
962
+ var itemSurcharge = itemPrice.times(percentageRate);
963
+
964
+ // 固定附加费 = 1 / 商品数量 * 固定附加费(向下取整保留两位小数)
965
+ var fixedSurcharge = new Decimal(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
966
+ var quantity = _item4.isMain ? _item4.quantity : _item4.quantity * _item4.mainQuantity;
967
+ fixedTotal = fixedTotal.plus(new Decimal(fixedSurcharge).times(quantity).toNumber());
968
+ // 如果是最后一个商品 判断fixed - fixedTotal 是否有剩余小数 如果有的话,追加抹平字段
969
+ if (isLast && fixedTotal.gt(0)) {
970
+ var remaining = new Decimal(fixed).minus(fixedTotal).toNumber();
971
+ if (remaining > 0) {
972
+ if (_item4.isMain) {
973
+ _item4.item._extend.surcharge_rounding_remainder = remaining;
974
+ } else {
975
+ _item4.item.surcharge_rounding_remainder = remaining;
976
+ }
977
+ }
978
+ }
979
+ // 只有当 open_product !== 0 时,才将附加费追加到商品身上
980
+ // open_product === 0 表示商品未开启该附加费,只在订单级别累加
981
+ if (open_product !== 0) {
982
+ if (_item4.isMain) {
983
+ var _item4$item$_extend;
984
+ var originSurchargeFee = new Decimal(_item4.item._extend.surcharge_fee || 0);
985
+ // 保留两位小数
986
+ _item4.item._extend.surcharge_fee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toNumber();
987
+ _item4.item._extend.relation_surcharge_ids = [].concat(_toConsumableArray(((_item4$item$_extend = _item4.item._extend) === null || _item4$item$_extend === void 0 ? void 0 : _item4$item$_extend.relation_surcharge_ids) || []), [id]);
988
+ } else {
989
+ var _item4$item;
990
+ var _originSurchargeFee = new Decimal(_item4.item.surcharge_fee || 0);
991
+ // 保留两位小数
992
+ _item4.item.surcharge_fee = _originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toNumber();
993
+ _item4.item.relation_surcharge_ids = [].concat(_toConsumableArray(((_item4$item = _item4.item) === null || _item4$item === void 0 ? void 0 : _item4$item.relation_surcharge_ids) || []), [id]);
994
+ }
995
+ }
996
+ configTotal = configTotal.plus(itemTotalSurcharge);
566
997
  }
567
998
  } catch (err) {
568
- _iterator8.e(err);
999
+ _iterator18.e(err);
569
1000
  } finally {
570
- _iterator8.f();
1001
+ _iterator18.f();
571
1002
  }
572
1003
  }
573
1004
 
@@ -594,7 +1025,10 @@ var getSurcharge = function getSurcharge(state, options) {
594
1025
  type: 'default',
595
1026
  fixed: fixed,
596
1027
  amount: finalAmount,
597
- percentage: percentage
1028
+ percentage: percentage,
1029
+ metadata: {
1030
+ open_product: open_product
1031
+ }
598
1032
  });
599
1033
  }
600
1034
  return surchargeWithAmount;
@@ -665,13 +1099,13 @@ export var getIsPriceIncludeTax = function getIsPriceIncludeTax(state) {
665
1099
  var _state$bookingDetail$, _state$bookingDetail6;
666
1100
  return (_state$bookingDetail$ = (_state$bookingDetail6 = state.bookingDetail) === null || _state$bookingDetail6 === void 0 ? void 0 : _state$bookingDetail6.is_price_include_tax) !== null && _state$bookingDetail$ !== void 0 ? _state$bookingDetail$ : 0;
667
1101
  };
668
- var getExpectAmount = function getExpectAmount(_ref2) {
669
- var price = _ref2.price,
670
- tax = _ref2.tax,
671
- surchargeAmount = _ref2.surchargeAmount,
672
- shopDiscount = _ref2.shopDiscount,
673
- state = _ref2.state,
674
- options = _ref2.options;
1102
+ var getExpectAmount = function getExpectAmount(_ref5) {
1103
+ var price = _ref5.price,
1104
+ tax = _ref5.tax,
1105
+ surchargeAmount = _ref5.surchargeAmount,
1106
+ shopDiscount = _ref5.shopDiscount,
1107
+ state = _ref5.state,
1108
+ options = _ref5.options;
675
1109
  var _tax = tax;
676
1110
  // 如果价格含税, 则将税费改为0
677
1111
  if (getIsPriceIncludeTax(state) || options !== null && options !== void 0 && options.is_price_include_tax) {
@@ -693,9 +1127,9 @@ var getRoundingAmount = function getRoundingAmount(state) {
693
1127
  var _state$bookingDetail9;
694
1128
  return Number(state === null || state === void 0 || (_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.rounding_amount) || 0;
695
1129
  };
696
- var getSumTotalAmount = function getSumTotalAmount(_ref3) {
697
- var expectAmount = _ref3.expectAmount,
698
- roundingAmount = _ref3.roundingAmount;
1130
+ var getSumTotalAmount = function getSumTotalAmount(_ref6) {
1131
+ var expectAmount = _ref6.expectAmount,
1132
+ roundingAmount = _ref6.roundingAmount;
699
1133
  return expectAmount + roundingAmount;
700
1134
  };
701
1135
 
@@ -767,6 +1201,20 @@ export var getSumTotal = function getSumTotal(state, options) {
767
1201
  options: options
768
1202
  });
769
1203
 
1204
+ // 商品原价 不包含折扣
1205
+ var _getProductExpectAmou2 = getProductExpectAmount(state, options.isEdit, true),
1206
+ productExpectAmountWithoutDiscount = _getProductExpectAmou2.productExpectAmount;
1207
+
1208
+ // 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
1209
+ var originExpectAmountWithoutDiscount = getExpectAmount({
1210
+ price: productExpectAmountWithoutDiscount,
1211
+ tax: originTax,
1212
+ surchargeAmount: surchargeAmount,
1213
+ shopDiscount: 0,
1214
+ state: state,
1215
+ options: options
1216
+ });
1217
+
770
1218
  // 总支付金额 总计
771
1219
  var sumTotalAmount = getSumTotalAmount({
772
1220
  expectAmount: expectAmount,
@@ -803,6 +1251,8 @@ export var getSumTotal = function getSumTotal(state, options) {
803
1251
  totalRefundAmount: totalRefundAmount,
804
1252
  dueAmount: dueAmount,
805
1253
  roundingAmount: roundingAmount,
806
- originExpectAmount: originExpectAmount
1254
+ originExpectAmount: originExpectAmount,
1255
+ // 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
1256
+ originExpectAmountWithoutDiscount: originExpectAmountWithoutDiscount
807
1257
  };
808
1258
  };