@pisell/private-materials 6.7.7 → 6.7.8

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 (345) 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 +17 -8
  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/Voucher/index.js +1 -2
  12. package/es/components/booking/addons/index.js +17 -25
  13. package/es/components/booking/components/footer/amount.d.ts +0 -1
  14. package/es/components/booking/components/footer/amount.js +84 -548
  15. package/es/components/booking/components/footer/index.js +56 -77
  16. package/es/components/booking/components/footer/utils.d.ts +0 -19
  17. package/es/components/booking/components/footer/utils.js +73 -194
  18. package/es/components/booking/components/voucher/index.js +7 -23
  19. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  20. package/es/components/booking/hooks/useQuotation.js +1 -4
  21. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  22. package/es/components/booking/info/service2/utils.js +0 -1
  23. package/es/components/booking/info2/cartClientCard/index.js +6 -30
  24. package/es/components/booking/info2/index.js +1 -1
  25. package/es/components/booking/info2/service/addService/index.js +3 -2
  26. package/es/components/booking/info2/service/editNormalService/index.js +0 -6
  27. package/es/components/booking/info2/service/editService/index.js +6 -16
  28. package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
  29. package/es/components/booking/info2/service/editService/utils.js +0 -66
  30. package/es/components/booking/utils.d.ts +0 -1
  31. package/es/components/booking/utils.js +3 -16
  32. package/es/components/checkout/PaymentModal.d.ts +5 -13
  33. package/es/components/checkout/PaymentModal.js +252 -304
  34. package/es/components/checkout/PaymentPlugin.d.ts +3 -0
  35. package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
  36. package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
  37. package/es/components/checkout/components/AdditionalModule/index.js +12 -52
  38. package/es/components/checkout/components/AmountSummary/index.js +76 -9
  39. package/es/components/checkout/components/AmountSummary/index.less +6 -5
  40. package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
  41. package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
  42. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  43. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
  44. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
  45. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
  46. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
  47. package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
  48. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
  49. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
  50. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  51. package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
  52. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  53. package/es/components/checkout/index.less +1 -1
  54. package/es/components/checkout/locales.d.ts +0 -6
  55. package/es/components/checkout/locales.js +0 -6
  56. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
  57. package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
  58. package/es/components/eftpos/hooks.d.ts +0 -1
  59. package/es/components/eftposPay/hooks.d.ts +1 -1
  60. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
  61. package/es/components/eftposPay/payo/config.js +32 -70
  62. package/es/components/eftposPay/store/index.d.ts +4 -4
  63. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  64. package/es/components/eftposPay/tyro/index.js +0 -12
  65. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  68. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  69. package/es/components/index.d.ts +1 -2
  70. package/es/components/index.js +1 -2
  71. package/es/components/list/List.js +40 -56
  72. package/es/components/list/hooks/useListState.d.ts +3 -5
  73. package/es/components/list/hooks/useListState.js +2 -17
  74. package/es/components/list/styles/header.less +3 -3
  75. package/es/components/list/utils/index.d.ts +1 -13
  76. package/es/components/list/utils/index.js +1 -43
  77. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
  78. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  79. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  80. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  81. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  82. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
  83. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
  84. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
  85. package/es/components/pay/toC/index.js +4 -7
  86. package/es/components/pay/toC/locales.d.ts +0 -3
  87. package/es/components/pay/toC/locales.js +3 -6
  88. package/es/components/pay/toC/status.d.ts +0 -1
  89. package/es/components/pay/toC/status.js +0 -3
  90. package/es/components/schedules/utils.d.ts +1 -1
  91. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  92. package/es/components/subTotal/index.js +1 -1
  93. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
  94. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
  95. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
  96. package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
  97. package/es/components/ticketBooking/components/menuBar/index.js +12 -109
  98. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  99. package/es/components/ticketBooking/components/timeBar/index.js +7 -112
  100. package/es/components/ticketBooking/components/timeBar/index.less +0 -59
  101. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
  102. package/es/components/ticketBooking/locales.d.ts +0 -6
  103. package/es/components/ticketBooking/locales.js +3 -9
  104. package/es/components/ticketBooking/utils/index.d.ts +0 -3
  105. package/es/components/ticketBooking/utils/index.js +13 -36
  106. package/es/components/wallet/Detail/index.js +2 -34
  107. package/es/components/wallet/Detail/index.less +0 -11
  108. package/es/components/wallet/Detail/locales.d.ts +0 -6
  109. package/es/components/wallet/Detail/locales.js +2 -14
  110. package/es/components/wallet/Voucher/index.js +10 -11
  111. package/es/components/wallet/components/WalletCard.js +1 -5
  112. package/es/components/wallet/index.js +2 -4
  113. package/es/components/wallet/serve.d.ts +0 -7
  114. package/es/hooks/usePaymentLogger.d.ts +0 -1
  115. package/es/index.d.ts +0 -4
  116. package/es/index.js +1 -5
  117. package/es/plus/clientCard/locales.js +3 -3
  118. package/es/plus/clinetSearch/index.js +30 -28
  119. package/es/plus/clinetSearch/locales.d.ts +0 -3
  120. package/es/plus/clinetSearch/locales.js +4 -7
  121. package/es/plus/clinetSearch/types.d.ts +0 -12
  122. package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
  123. package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
  124. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
  125. package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
  126. package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
  127. package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
  128. package/es/plus/walletPassGallery/index.js +3 -7
  129. package/es/plus/walletPassGallery/serve.d.ts +0 -3
  130. package/es/plus/walletPassGallery/serve.js +2 -4
  131. package/es/pro/Login2.0/index.less +8 -15
  132. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  133. package/es/pro/comprehensiveSearch/locales.js +1 -1
  134. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -45
  135. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  136. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
  137. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
  138. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
  139. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
  140. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
  141. package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
  142. package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
  143. package/es/utils/index.d.ts +1 -1
  144. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
  145. package/lib/components/booking/addons/index.js +7 -15
  146. package/lib/components/booking/components/footer/amount.d.ts +0 -1
  147. package/lib/components/booking/components/footer/amount.js +41 -293
  148. package/lib/components/booking/components/footer/index.js +11 -30
  149. package/lib/components/booking/components/footer/utils.d.ts +0 -19
  150. package/lib/components/booking/components/footer/utils.js +41 -138
  151. package/lib/components/booking/components/voucher/index.js +9 -25
  152. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  153. package/lib/components/booking/hooks/useQuotation.js +1 -2
  154. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  155. package/lib/components/booking/info/service2/utils.js +0 -1
  156. package/lib/components/booking/info2/cartClientCard/index.js +5 -25
  157. package/lib/components/booking/info2/index.js +2 -7
  158. package/lib/components/booking/info2/service/addService/index.js +2 -1
  159. package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
  160. package/lib/components/booking/info2/service/editService/index.js +3 -12
  161. package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
  162. package/lib/components/booking/info2/service/editService/utils.js +3 -40
  163. package/lib/components/booking/utils.d.ts +0 -1
  164. package/lib/components/booking/utils.js +0 -11
  165. package/lib/components/checkout/PaymentModal.d.ts +5 -13
  166. package/lib/components/checkout/PaymentModal.js +147 -190
  167. package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
  168. package/lib/components/checkout/PaymentPlugin.js +181 -0
  169. package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
  170. package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
  171. package/lib/components/checkout/components/AmountSummary/index.js +46 -5
  172. package/lib/components/checkout/components/AmountSummary/index.less +6 -5
  173. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
  174. package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
  175. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  176. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
  177. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
  178. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
  179. package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
  180. package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
  181. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
  182. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
  183. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  184. package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
  185. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  186. package/lib/components/checkout/index.less +1 -1
  187. package/lib/components/checkout/locales.d.ts +0 -6
  188. package/lib/components/checkout/locales.js +0 -6
  189. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
  190. package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
  191. package/lib/components/eftpos/hooks.d.ts +0 -1
  192. package/lib/components/eftposPay/hooks.d.ts +1 -1
  193. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
  194. package/lib/components/eftposPay/payo/config.js +73 -98
  195. package/lib/components/eftposPay/store/index.d.ts +4 -4
  196. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  197. package/lib/components/eftposPay/tyro/index.js +0 -12
  198. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  199. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  200. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  201. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  202. package/lib/components/index.d.ts +1 -2
  203. package/lib/components/index.js +0 -3
  204. package/lib/components/list/List.js +16 -34
  205. package/lib/components/list/hooks/useListState.d.ts +3 -5
  206. package/lib/components/list/hooks/useListState.js +1 -14
  207. package/lib/components/list/styles/header.less +3 -3
  208. package/lib/components/list/utils/index.d.ts +1 -13
  209. package/lib/components/list/utils/index.js +0 -27
  210. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
  211. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  212. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  213. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  214. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  215. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
  216. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  217. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
  218. package/lib/components/pay/toC/index.js +1 -4
  219. package/lib/components/pay/toC/locales.d.ts +0 -3
  220. package/lib/components/pay/toC/locales.js +3 -6
  221. package/lib/components/pay/toC/status.d.ts +0 -1
  222. package/lib/components/pay/toC/status.js +0 -5
  223. package/lib/components/schedules/utils.d.ts +1 -1
  224. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  225. package/lib/components/subTotal/index.js +1 -1
  226. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
  227. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
  228. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
  229. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
  230. package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
  231. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  232. package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
  233. package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
  234. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
  235. package/lib/components/ticketBooking/locales.d.ts +0 -6
  236. package/lib/components/ticketBooking/locales.js +3 -9
  237. package/lib/components/ticketBooking/utils/index.d.ts +0 -3
  238. package/lib/components/ticketBooking/utils/index.js +6 -20
  239. package/lib/components/wallet/Detail/index.js +3 -31
  240. package/lib/components/wallet/Detail/index.less +0 -11
  241. package/lib/components/wallet/Detail/locales.d.ts +0 -6
  242. package/lib/components/wallet/Detail/locales.js +2 -14
  243. package/lib/components/wallet/Voucher/index.js +8 -8
  244. package/lib/components/wallet/components/WalletCard.js +0 -4
  245. package/lib/components/wallet/index.js +2 -2
  246. package/lib/components/wallet/serve.d.ts +0 -7
  247. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  248. package/lib/index.d.ts +0 -4
  249. package/lib/index.js +0 -12
  250. package/lib/plus/clientCard/locales.js +3 -3
  251. package/lib/plus/clinetSearch/index.js +8 -17
  252. package/lib/plus/clinetSearch/locales.d.ts +0 -3
  253. package/lib/plus/clinetSearch/locales.js +4 -7
  254. package/lib/plus/clinetSearch/types.d.ts +0 -12
  255. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  256. package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
  257. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
  258. package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
  259. package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
  260. package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
  261. package/lib/plus/walletPassGallery/index.js +3 -7
  262. package/lib/plus/walletPassGallery/serve.d.ts +0 -3
  263. package/lib/plus/walletPassGallery/serve.js +2 -3
  264. package/lib/pro/Login2.0/index.less +8 -15
  265. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  266. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  267. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +43 -42
  268. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  269. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
  270. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
  271. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
  272. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
  273. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
  274. package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
  275. package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
  276. package/lib/utils/index.d.ts +1 -1
  277. package/package.json +4 -4
  278. package/es/components/checkout/plugin.d.ts +0 -2
  279. package/es/components/checkout/plugin.js +0 -303
  280. package/es/components/eftposPay/payo/payment.d.ts +0 -66
  281. package/es/components/eftposPay/payo/payment.js +0 -579
  282. package/es/components/eftposPay/utils/log/index.d.ts +0 -110
  283. package/es/components/eftposPay/utils/log/index.js +0 -371
  284. package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
  285. package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
  286. package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
  287. package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
  288. package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
  289. package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
  290. package/es/components/systemSettings/registry/components/SectionList.js +0 -174
  291. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
  292. package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
  293. package/es/components/systemSettings/registry/components/index.d.ts +0 -4
  294. package/es/components/systemSettings/registry/components/index.js +0 -4
  295. package/es/components/systemSettings/registry/index.d.ts +0 -5
  296. package/es/components/systemSettings/registry/index.js +0 -1059
  297. package/es/components/systemSettings/registry/index.less +0 -410
  298. package/es/components/systemSettings/registry/locales.d.ts +0 -272
  299. package/es/components/systemSettings/registry/locales.js +0 -300
  300. package/es/components/systemSettings/registry/services.d.ts +0 -77
  301. package/es/components/systemSettings/registry/services.js +0 -472
  302. package/es/components/systemSettings/registry/types.d.ts +0 -126
  303. package/es/components/systemSettings/registry/types.js +0 -1
  304. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  305. package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
  306. package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
  307. package/es/components/systemSettings/registry/utils/validators.js +0 -44
  308. package/es/components/wallet/utils.d.ts +0 -48
  309. package/es/components/wallet/utils.js +0 -342
  310. package/lib/components/checkout/plugin.d.ts +0 -2
  311. package/lib/components/checkout/plugin.js +0 -263
  312. package/lib/components/eftposPay/payo/payment.d.ts +0 -66
  313. package/lib/components/eftposPay/payo/payment.js +0 -357
  314. package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
  315. package/lib/components/eftposPay/utils/log/index.js +0 -294
  316. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
  317. package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
  318. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
  319. package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
  320. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
  321. package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
  322. package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
  323. package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
  324. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
  325. package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
  326. package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
  327. package/lib/components/systemSettings/registry/components/index.js +0 -48
  328. package/lib/components/systemSettings/registry/index.d.ts +0 -5
  329. package/lib/components/systemSettings/registry/index.js +0 -529
  330. package/lib/components/systemSettings/registry/index.less +0 -410
  331. package/lib/components/systemSettings/registry/locales.d.ts +0 -272
  332. package/lib/components/systemSettings/registry/locales.js +0 -324
  333. package/lib/components/systemSettings/registry/services.d.ts +0 -77
  334. package/lib/components/systemSettings/registry/services.js +0 -290
  335. package/lib/components/systemSettings/registry/types.d.ts +0 -126
  336. package/lib/components/systemSettings/registry/types.js +0 -17
  337. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  338. package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
  339. package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
  340. package/lib/components/systemSettings/registry/utils/validators.js +0 -54
  341. package/lib/components/wallet/utils.d.ts +0 -48
  342. package/lib/components/wallet/utils.js +0 -287
  343. package/lowcode/payment-modal/meta.ts +0 -135
  344. package/lowcode/settings-registry/meta.ts +0 -29
  345. package/lowcode/wallet-pass-detail/meta.ts +0 -89
@@ -47,7 +47,7 @@ var getRelationDetailsTotal = (relation_details) => {
47
47
  }
48
48
  return total.toNumber();
49
49
  };
50
- var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
50
+ var getProductExpectAmount = (state, isEdit) => {
51
51
  var _a, _b, _c, _d;
52
52
  let price = new import_decimal.default(0);
53
53
  let duration = new import_decimal.default(0);
@@ -59,15 +59,13 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
59
59
  if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item)) {
60
60
  const quantity = new import_decimal.default(item._extend.quantity || 1);
61
61
  const itemTotal = new import_decimal.default(item._extend.total || 0);
62
- const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
63
- price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
62
+ price = price.add(itemTotal.mul(quantity));
64
63
  const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
65
64
  duration = duration.add(_duration);
66
65
  } else {
67
66
  const quantity = new import_decimal.default(item._extend.quantity || 1);
68
67
  const itemTotal = new import_decimal.default(item._extend.total || 0);
69
- const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
70
- price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
68
+ price = price.add(itemTotal.mul(quantity));
71
69
  const relationTotal = new import_decimal.default(getRelationDetailsTotal(
72
70
  item._extend.relation_details || []
73
71
  ));
@@ -81,8 +79,7 @@ var getProductExpectAmount = (state, isEdit, isOriginTotal) => {
81
79
  for (let item of state.addons.value) {
82
80
  const quantity = new import_decimal.default(item._extend.quantity || 1);
83
81
  const itemTotal = new import_decimal.default(item._extend.total || 0);
84
- const itemOriginTotal = new import_decimal.default(item._extend.origin_total || 0);
85
- price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
82
+ price = price.add(itemTotal.mul(quantity));
86
83
  }
87
84
  }
88
85
  }
@@ -133,10 +130,9 @@ var getProductItemTax = (item, state, options) => {
133
130
  }
134
131
  }
135
132
  }
136
- return singleItemTax.times(quantity).toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
133
+ return singleItemTax.times(quantity);
137
134
  };
138
135
  var processItemsTax = (items, state, options) => {
139
- var _a, _b, _c;
140
136
  const { tax_rate, is_price_include_tax, computed } = options;
141
137
  const { shopDiscount, productExpectAmount } = computed;
142
138
  let originTax = new import_decimal.default(0);
@@ -144,11 +140,10 @@ var processItemsTax = (items, state, options) => {
144
140
  for (let item of items) {
145
141
  const quantity = new import_decimal.default(item._extend.quantity || 1);
146
142
  const unitPrice = new import_decimal.default(item._extend.total || 0);
147
- const mainProductPrice = new import_decimal.default(getMainProductTotal(item) || 0);
148
- let originalTaxPerItem = getProductItemTax(
143
+ const originalTaxPerItem = getProductItemTax(
149
144
  {
150
145
  ...item,
151
- total: mainProductPrice.add(((_a = item._extend) == null ? void 0 : _a.surcharge_fee) || 0).toNumber(),
146
+ total: unitPrice.toNumber(),
152
147
  quantity: 1
153
148
  },
154
149
  state,
@@ -158,22 +153,19 @@ var processItemsTax = (items, state, options) => {
158
153
  if (productExpectAmount > 0) {
159
154
  itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
160
155
  }
161
- let mainItemDiscount = new import_decimal.default(0);
162
- if (unitPrice.greaterThan(0)) {
163
- mainItemDiscount = mainProductPrice.dividedBy(productExpectAmount).times(shopDiscount);
164
- }
165
- const mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_b = item._extend) == null ? void 0 : _b.surcharge_fee) || 0);
166
- const maxDiscountedTaxPerItem = getProductItemTax(
156
+ const itemDiscountedUnitPrice = unitPrice.minus(itemDiscount);
157
+ const discountedTaxPerItem = getProductItemTax(
167
158
  {
168
159
  ...item,
169
- total: mainItemDiscountedUnitPrice.toNumber(),
160
+ total: itemDiscountedUnitPrice.toNumber(),
170
161
  price: item._extend.total,
171
162
  quantity: 1
172
163
  },
173
164
  state,
174
165
  { tax_rate, is_price_include_tax }
175
166
  );
176
- item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItem.toNumber();
167
+ item._extend.original_tax_fee = originalTaxPerItem.toNumber();
168
+ item._extend.tax_fee = discountedTaxPerItem.toNumber();
177
169
  let addTimeTotalTax = new import_decimal.default(0);
178
170
  if (Array.isArray(item._extend.relation_details)) {
179
171
  for (let atItem of item._extend.relation_details) {
@@ -189,7 +181,8 @@ var processItemsTax = (items, state, options) => {
189
181
  const addTimeTaxPerItem = getProductItemTax(
190
182
  {
191
183
  ...atItem,
192
- total: _discountedTotal.add((atItem == null ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
184
+ total: _discountedTotal,
185
+ // 可能包含原有数据,或前端临时数据
193
186
  quantity: atItem.product_quantity || atItem.num || 1
194
187
  },
195
188
  state,
@@ -198,51 +191,8 @@ var processItemsTax = (items, state, options) => {
198
191
  addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
199
192
  }
200
193
  }
201
- let bundleTotalOriginTax = new import_decimal.default(0);
202
- let bundleTotalTax = new import_decimal.default(0);
203
- if (Array.isArray((_c = item._extend.other) == null ? void 0 : _c.bundle)) {
204
- for (let bundleItem of item._extend.other.bundle) {
205
- if (getBundleItemIsOriginalPrice(bundleItem)) {
206
- const bundleQuantity = new import_decimal.default(bundleItem.quantity || 1);
207
- const bundleUnitPrice = new import_decimal.default(
208
- bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
209
- );
210
- const bundleOriginalTaxPerItem = getProductItemTax(
211
- {
212
- ...bundleItem,
213
- total: bundleUnitPrice.add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
214
- quantity: 1
215
- },
216
- state,
217
- { tax_rate, is_price_include_tax }
218
- );
219
- let bundleItemDiscount = new import_decimal.default(0);
220
- if (productExpectAmount > 0) {
221
- bundleItemDiscount = bundleUnitPrice.dividedBy(productExpectAmount).times(shopDiscount);
222
- }
223
- const bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem == null ? void 0 : bundleItem.surcharge_fee) || 0);
224
- const bundleDiscountedTaxPerItem = getProductItemTax(
225
- {
226
- ...bundleItem,
227
- total: bundleDiscountedUnitPrice.toNumber(),
228
- quantity: 1
229
- },
230
- state,
231
- { tax_rate, is_price_include_tax }
232
- );
233
- bundleItem.original_tax_fee = new import_decimal.default(bundleOriginalTaxPerItem).toNumber();
234
- bundleItem.tax_fee = new import_decimal.default(bundleDiscountedTaxPerItem).toNumber();
235
- bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
236
- bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
237
- }
238
- }
239
- }
240
- const original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
241
- const tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
242
- item._extend.original_tax_fee = original_tax_fee.toNumber();
243
- item._extend.tax_fee = tax_fee.toNumber();
244
- originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
245
- tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
194
+ originTax = originTax.plus(originalTaxPerItem.times(quantity)).plus(addTimeTotalTax);
195
+ tax = tax.plus(discountedTaxPerItem.times(quantity)).plus(addTimeTotalTax);
246
196
  }
247
197
  return { originTax, tax };
248
198
  };
@@ -303,7 +253,7 @@ var isProductMatchSurchargeCondition = (item, options) => {
303
253
  }
304
254
  const isInScheduleByDate = (_a = options.ScheduleModule) == null ? void 0 : _a.isInScheduleByDate;
305
255
  const { surchargeConfig, scheduleById = {} } = options;
306
- const { startDate, product_id, isCustomItem } = item;
256
+ const { startDate, other, isCustomItem } = item._extend;
307
257
  const {
308
258
  open_product = 0,
309
259
  // 1 | 0
@@ -327,6 +277,7 @@ var isProductMatchSurchargeCondition = (item, options) => {
327
277
  if (isCustomItem) {
328
278
  isProductMatch = false;
329
279
  } else {
280
+ const product_id = other == null ? void 0 : other.product_id;
330
281
  isProductMatch = available_product_ids.includes(product_id);
331
282
  }
332
283
  }
@@ -356,71 +307,8 @@ var isProductMatchSurchargeCondition = (item, options) => {
356
307
  }
357
308
  return isProductMatch && isScheduleMatch;
358
309
  };
359
- var getBundleItemIsOriginalPrice = (item) => {
360
- return (item == null ? void 0 : item.price_type) === "markup" && (item == null ? void 0 : item.price_type_ext) === "product_price";
361
- };
362
- var getBundleItemIsMarkupPrice = (item) => {
363
- return (item == null ? void 0 : item.price_type) === "markup" && ((item == null ? void 0 : item.price_type_ext) === "" || !(item == null ? void 0 : item.price_type_ext));
364
- };
365
- var getBundleItemIsDiscountPrice = (item) => {
366
- return (item == null ? void 0 : item.price_type) === "markdown" && ((item == null ? void 0 : item.price_type_ext) === "" || !(item == null ? void 0 : item.price_type_ext));
367
- };
368
- var getBundleItemIsMarkupOrDiscountPrice = (item) => {
369
- return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
370
- };
371
- var getDiscountAmount = (discounts) => {
372
- return (discounts || []).reduce((total, discount) => {
373
- return total.add(new import_decimal.default(discount.amount || 0));
374
- }, new import_decimal.default(0)).toNumber();
375
- };
376
- var getMainProductTotal = (item) => {
377
- var _a, _b, _c, _d, _e, _f;
378
- let total = new import_decimal.default(((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) ?? ((_b = item == null ? void 0 : item.metadata) == null ? void 0 : _b.main_product_selling_price) ?? item._extend.price ?? 0);
379
- if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
380
- total = total.add((_e = item._extend.other) == null ? void 0 : _e.option.reduce((t, option) => {
381
- return t.add(new import_decimal.default(option.price || 0).mul(option.num || 1));
382
- }, new import_decimal.default(0)));
383
- }
384
- for (let bundleItem of ((_f = item._extend.other) == null ? void 0 : _f.bundle) || []) {
385
- if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
386
- const discountAmount = getDiscountAmount(bundleItem.discount_list);
387
- const bundleItemPrice = new import_decimal.default(bundleItem.bundle_selling_price ?? bundleItem.price ?? 0);
388
- const bundleItemTotal = bundleItemPrice.minus(discountAmount);
389
- total = total.add(bundleItemTotal);
390
- }
391
- }
392
- return total.toNumber();
393
- };
394
- var clearSurchargeFee = (state) => {
395
- var _a, _b;
396
- const { service, addons } = state;
397
- if (Array.isArray(service == null ? void 0 : service.value)) {
398
- for (let item of service.value) {
399
- item._extend.surcharge_fee = 0;
400
- item._extend.relation_surcharge_ids = [];
401
- for (let bundleItem of ((_a = item._extend.other) == null ? void 0 : _a.bundle) || []) {
402
- bundleItem.surcharge_fee = 0;
403
- bundleItem.relation_surcharge_ids = [];
404
- }
405
- for (let relationDetail of item._extend.relation_details || []) {
406
- relationDetail.surcharge_fee = 0;
407
- relationDetail.relation_surcharge_ids = [];
408
- }
409
- }
410
- }
411
- if (Array.isArray(addons == null ? void 0 : addons.value)) {
412
- for (let item of addons.value) {
413
- item._extend.surcharge_fee = 0;
414
- item._extend.relation_surcharge_ids = [];
415
- for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
416
- bundleItem.surcharge_fee = 0;
417
- bundleItem.relation_surcharge_ids = [];
418
- }
419
- }
420
- }
421
- };
422
310
  var getSurcharge = (state, options) => {
423
- var _a, _b, _c, _d, _e;
311
+ var _a;
424
312
  const { isEdit, ScheduleModule, surcharge_list, scheduleById } = options;
425
313
  const { bookingDetail, bookingId } = state;
426
314
  if (!isEdit && bookingId) {
@@ -445,7 +333,6 @@ var getSurcharge = (state, options) => {
445
333
  }
446
334
  return [];
447
335
  }
448
- clearSurchargeFee(state);
449
336
  const { service, addons } = state;
450
337
  if (!Array.isArray(surcharge_list) || !(surcharge_list == null ? void 0 : surcharge_list.length)) return [];
451
338
  const surchargeWithAmount = [];
@@ -456,89 +343,24 @@ var getSurcharge = (state, options) => {
456
343
  fixed = "0",
457
344
  id,
458
345
  type,
459
- description,
460
- open_product
346
+ description
461
347
  } = surchargeConfig;
462
348
  const matchedItems = [];
463
349
  if (Array.isArray(service == null ? void 0 : service.value)) {
464
350
  for (let item of service.value) {
465
- if (isProductMatchSurchargeCondition(
466
- {
467
- isCustomItem: item.isCustomItem,
468
- startDate: item._extend.startDate,
469
- product_id: item.product_id
470
- },
471
- {
472
- surchargeConfig,
473
- scheduleById: scheduleById || {},
474
- ScheduleModule
475
- }
476
- )) {
477
- const total = getMainProductTotal(item);
478
- const mainQuantity = item._extend.quantity || 1;
351
+ if (isProductMatchSurchargeCondition(item, {
352
+ surchargeConfig,
353
+ scheduleById: scheduleById || {},
354
+ ScheduleModule
355
+ })) {
479
356
  matchedItems.push({
480
- total,
481
- // addTimeTotal: getRelationDetailsTotal(
482
- // item._extend.relation_details || []
483
- // ),
484
- isMain: true,
485
- quantity: mainQuantity,
486
- item,
487
- mainQuantity
488
- // 主商品的mainQuantity等于自己的quantity
357
+ total: Number(item._extend.total),
358
+ addTimeTotal: getRelationDetailsTotal(
359
+ item._extend.relation_details || []
360
+ ),
361
+ quantity: item._extend.quantity || 1
489
362
  });
490
363
  }
491
- for (let bundleItem of ((_b = item._extend.other) == null ? void 0 : _b.bundle) || []) {
492
- if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition(
493
- {
494
- isCustomItem: false,
495
- startDate: item._extend.startDate,
496
- product_id: bundleItem._bundle_product_id
497
- },
498
- {
499
- surchargeConfig,
500
- scheduleById: scheduleById || {},
501
- ScheduleModule
502
- }
503
- )) {
504
- const mainQuantity = item._extend.quantity || 1;
505
- matchedItems.push({
506
- isMain: false,
507
- total: Number(
508
- bundleItem.bundle_selling_price ?? bundleItem.price ?? 0
509
- ),
510
- quantity: bundleItem.num || bundleItem.quantity || 1,
511
- item: bundleItem,
512
- mainQuantity
513
- // 子商品的mainQuantity是所属主商品的quantity
514
- });
515
- }
516
- }
517
- for (let relationDetail of item._extend.relation_details || []) {
518
- if (isProductMatchSurchargeCondition(
519
- {
520
- isCustomItem: false,
521
- startDate: item._extend.startDate,
522
- product_id: relationDetail.product_id
523
- },
524
- {
525
- surchargeConfig,
526
- scheduleById: scheduleById || {},
527
- ScheduleModule
528
- }
529
- )) {
530
- matchedItems.push({
531
- isMain: false,
532
- total: Number(
533
- (relationDetail == null ? void 0 : relationDetail.price) || ((_c = relationDetail == null ? void 0 : relationDetail.metadata) == null ? void 0 : _c.main_product_attached_bundle_selling_price)
534
- ),
535
- quantity: relationDetail.num || relationDetail.quantity || 1,
536
- item: relationDetail,
537
- mainQuantity: 1
538
- // 加时商品不受主商品数量影响
539
- });
540
- }
541
- }
542
364
  }
543
365
  }
544
366
  if (Array.isArray(addons == null ? void 0 : addons.value)) {
@@ -549,84 +371,28 @@ var getSurcharge = (state, options) => {
549
371
  ScheduleModule
550
372
  })) {
551
373
  matchedItems.push({
552
- isMain: true,
553
374
  total: Number(item._extend.total),
554
- quantity: item._extend.quantity || 1,
555
- item,
556
- mainQuantity: 1
557
- // addons独立商品,mainQuantity为1
375
+ quantity: item._extend.quantity || 1
558
376
  });
559
377
  }
560
378
  }
561
379
  }
562
380
  let finalAmount = 0;
563
- const productCount = matchedItems.reduce((total, item) => {
564
- if (item.isMain) {
565
- return total + (item.quantity || 1);
566
- } else {
567
- return total + (item.quantity || 1) * (item.mainQuantity || 1);
568
- }
569
- }, 0);
570
- let fixedTotal = new import_decimal.default(0);
571
- let productTotalSurcharge = new import_decimal.default(0);
572
381
  if (matchedItems.length > 0) {
573
382
  let configTotal = new import_decimal.default(0);
574
- if (fixed && new import_decimal.default(fixed).gt(0)) {
575
- configTotal = configTotal.plus(fixed);
576
- }
577
- if (percentage && new import_decimal.default(percentage).gt(0) || fixed) {
383
+ if (percentage && new import_decimal.default(percentage).gt(0)) {
578
384
  const percentageRate = new import_decimal.default(percentage);
579
- for (let [index, item] of matchedItems.entries()) {
580
- const isLast = index === matchedItems.length - 1;
385
+ for (let item of matchedItems) {
581
386
  const itemPrice = new import_decimal.default(Math.max(0, item.total || 0));
582
- const itemQuantity = new import_decimal.default(item.isMain ? item.quantity || 1 : item.quantity * item.mainQuantity || 1);
387
+ const itemQuantity = new import_decimal.default(item.quantity || 1);
583
388
  const addTimeTotal = new import_decimal.default(item.addTimeTotal || 0);
584
- const itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
585
- configTotal = configTotal.plus(itemTotalSurcharge);
586
- const itemSurcharge = itemPrice.times(percentageRate);
587
- const fixedSurcharge = new import_decimal.default(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
588
- const quantity = item.isMain ? item.quantity : item.quantity * item.mainQuantity;
589
- fixedTotal = fixedTotal.plus(new import_decimal.default(fixedSurcharge).times(quantity).toNumber());
590
- if (isLast && fixedTotal.gt(0)) {
591
- const remaining = new import_decimal.default(fixed).minus(fixedTotal).toNumber();
592
- if (remaining > 0) {
593
- productTotalSurcharge = productTotalSurcharge.plus(remaining);
594
- if (item.isMain) {
595
- item.item._extend.surcharge_rounding_remainder = remaining;
596
- } else {
597
- item.item.surcharge_rounding_remainder = remaining;
598
- }
599
- }
600
- }
601
- if (open_product !== 0) {
602
- if (item.isMain) {
603
- const originSurchargeFee = new import_decimal.default(item.item._extend.surcharge_fee || 0);
604
- const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
605
- productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
606
- item.item._extend.surcharge_fee = surchargeFee;
607
- item.item._extend.relation_surcharge_ids = [...((_d = item.item._extend) == null ? void 0 : _d.relation_surcharge_ids) || [], id];
608
- } else {
609
- const originSurchargeFee = new import_decimal.default(item.item.surcharge_fee || 0);
610
- const surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, import_decimal.default.ROUND_DOWN).toNumber();
611
- productTotalSurcharge = productTotalSurcharge.plus(new import_decimal.default(surchargeFee).times(itemQuantity).toNumber());
612
- item.item.surcharge_fee = surchargeFee;
613
- item.item.relation_surcharge_ids = [...((_e = item.item) == null ? void 0 : _e.relation_surcharge_ids) || [], id];
614
- }
615
- }
616
- if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
617
- const configTotalRounded = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
618
- if (item.isMain) {
619
- let newRoundingRemainder = new import_decimal.default(item.item._extend.surcharge_rounding_remainder || 0);
620
- newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
621
- item.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
622
- } else {
623
- let newRoundingRemainder = new import_decimal.default(item.item.surcharge_rounding_remainder || 0);
624
- newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
625
- item.item.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
626
- }
627
- }
389
+ const itemSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
390
+ configTotal = configTotal.plus(itemSurcharge);
628
391
  }
629
392
  }
393
+ if (fixed && new import_decimal.default(fixed).gt(0)) {
394
+ configTotal = configTotal.plus(fixed);
395
+ }
630
396
  finalAmount = configTotal.toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP).toNumber();
631
397
  }
632
398
  const name = surchargeConfig.name || {};
@@ -644,10 +410,7 @@ var getSurcharge = (state, options) => {
644
410
  type: "default",
645
411
  fixed,
646
412
  amount: finalAmount,
647
- percentage,
648
- metadata: {
649
- open_product
650
- }
413
+ percentage
651
414
  });
652
415
  }
653
416
  return surchargeWithAmount;
@@ -757,19 +520,6 @@ var getSumTotal = (state, options) => {
757
520
  state,
758
521
  options
759
522
  });
760
- const { productExpectAmount: productExpectAmountWithoutDiscount } = getProductExpectAmount(
761
- state,
762
- options.isEdit,
763
- true
764
- );
765
- const originExpectAmountWithoutDiscount = getExpectAmount({
766
- price: productExpectAmountWithoutDiscount,
767
- tax: originTax,
768
- surchargeAmount,
769
- shopDiscount: 0,
770
- state,
771
- options
772
- });
773
523
  const sumTotalAmount = getSumTotalAmount({ expectAmount, roundingAmount });
774
524
  const sumTotalAmountDecimal = new import_decimal.default((0, import_utils2.formatAmount)(sumTotalAmount, 2, "") || 0);
775
525
  const orderPaidAmountDecimal = new import_decimal.default(orderPaidAmount || 0);
@@ -796,9 +546,7 @@ var getSumTotal = (state, options) => {
796
546
  totalRefundAmount,
797
547
  dueAmount,
798
548
  roundingAmount,
799
- originExpectAmount,
800
- // 订单原价 不包含整单折扣 不包含商品券折扣卡抵扣
801
- originExpectAmountWithoutDiscount
549
+ originExpectAmount
802
550
  };
803
551
  };
804
552
  // Annotate the CommonJS export names for ESM import in node:
@@ -62,7 +62,7 @@ var import_ahooks = require("ahooks");
62
62
  var import_lodash = require("lodash");
63
63
  var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
64
64
  var Footer = (props) => {
65
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
65
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
66
66
  const { state, buttons, dispatch, source } = props;
67
67
  const [showDetail, setShowDetail] = (0, import_react.useState)(false);
68
68
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -467,11 +467,7 @@ var Footer = (props) => {
467
467
  (_l = (_k = state.client) == null ? void 0 : _k.value) == null ? void 0 : _l.id
468
468
  ]);
469
469
  const handleCheckoutInternal = async () => {
470
- var _a2, _b2, _c2;
471
- const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
472
- if (isToastMode) {
473
- (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
474
- }
470
+ (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
475
471
  const isNewOrder = !state.bookingId;
476
472
  if (isEdit) {
477
473
  if ((0, import_utils2.isDayBooking)(state)) {
@@ -498,18 +494,18 @@ var Footer = (props) => {
498
494
  setIsPaymentModalOpen(true);
499
495
  setCheckoutLoading(false);
500
496
  setPaymentCallback(() => (paymentResult) => {
501
- var _a3, _b3, _c3, _d2;
497
+ var _a2, _b2, _c2, _d2;
502
498
  console.log("Payment result:", paymentResult);
503
499
  setIsPaymentModalOpen(false);
504
500
  if ((paymentResult == null ? void 0 : paymentResult.status) === "success") {
505
501
  console.log("Payment completed successfully");
506
- (_b3 = (_a3 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a3.bookingTicket) == null ? void 0 : _b3.clearAllCart();
502
+ (_b2 = (_a2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _a2.bookingTicket) == null ? void 0 : _b2.clearAllCart();
507
503
  setPaymentModalData(null);
508
504
  setPaymentCallback(null);
509
505
  } else if ((paymentResult == null ? void 0 : paymentResult.status) === "cancelled") {
510
506
  console.log("Payment cancelled");
511
507
  if (res == null ? void 0 : res.order_id) {
512
- (_d2 = (_c3 = window == null ? void 0 : window.shopApi) == null ? void 0 : _c3.booking) == null ? void 0 : _d2.voidBooking(res.order_id);
508
+ (_d2 = (_c2 = window == null ? void 0 : window.shopApi) == null ? void 0 : _c2.booking) == null ? void 0 : _d2.voidBooking(res.order_id);
513
509
  }
514
510
  setPaymentModalData(null);
515
511
  setPaymentCallback(null);
@@ -600,11 +596,8 @@ var Footer = (props) => {
600
596
  messageShow = true,
601
597
  noSubmit = false
602
598
  }) => {
603
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
604
- const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
605
- if (isToastMode) {
606
- (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
607
- }
599
+ var _a2, _b2, _c2, _d2, _e2;
600
+ (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
608
601
  if ((0, import_utils2.isDayBooking)(state)) {
609
602
  const isHasDayProducts = handleDaySubmit();
610
603
  if (isHasDayProducts) return;
@@ -619,7 +612,7 @@ var Footer = (props) => {
619
612
  const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
620
613
  let saveOtherValue = {};
621
614
  if (type === "save") {
622
- saveOtherValue = await ((_d2 = state == null ? void 0 : state.onSave) == null ? void 0 : _d2.call(state, state.client)) || {};
615
+ saveOtherValue = await ((_a2 = state == null ? void 0 : state.onSave) == null ? void 0 : _a2.call(state, state.client)) || {};
623
616
  }
624
617
  try {
625
618
  let callbackData = null;
@@ -665,7 +658,7 @@ var Footer = (props) => {
665
658
  { key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
666
659
  {
667
660
  key: "店铺id",
668
- value: (_h2 = (_g2 = (_f2 = (_e2 = store == null ? void 0 : store.getState) == null ? void 0 : _e2.call(store)) == null ? void 0 : _f2.global) == null ? void 0 : _g2.globalConfig) == null ? void 0 : _h2.id
661
+ value: (_e2 = (_d2 = (_c2 = (_b2 = store == null ? void 0 : store.getState) == null ? void 0 : _b2.call(store)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id
669
662
  },
670
663
  {
671
664
  key: "shopApi",
@@ -1420,20 +1413,8 @@ var Footer = (props) => {
1420
1413
  data: paymentModalData,
1421
1414
  callback: paymentCallback || void 0,
1422
1415
  setEditCartMode,
1423
- paymentResultDisplayMode: (_s = (_r = (_q = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _q.config) == null ? void 0 : _r.payment_setting) == null ? void 0 : _s.payment_result_display_mode,
1424
- shopDiscount: state.shop_discount,
1425
- client: (_t = state.client) == null ? void 0 : _t.value,
1426
- currentTotalPrice: total.productAmount,
1427
- onChangeShopDiscount: (discount) => {
1428
- dispatch({
1429
- type: "setState",
1430
- payload: {
1431
- shop_discount: discount
1432
- }
1433
- });
1434
- },
1435
- onChangeOrderNote: handleNoteConfirm,
1436
- onDeleteOrderNote: handleNoteDelete,
1416
+ state,
1417
+ dispatch,
1437
1418
  onClose: (reset) => {
1438
1419
  setIsPaymentModalOpen(false);
1439
1420
  setPaymentModalData(null);
@@ -16,11 +16,6 @@ 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[];
24
19
  export interface ResourceItem {
25
20
  [key: string]: any;
26
21
  }
@@ -42,19 +37,5 @@ export declare const checkResourcesFormat: (resources: any[], service: any, isCh
42
37
  * @Date: 2024-12-23 12:05
43
38
  */
44
39
  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;
59
40
  export declare const formatValues: (state: any) => any;
60
41
  export declare const checkHolderIsError: (state: any) => any;