@pisell/private-materials 6.6.5 → 6.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Services/index.js +25 -22
  14. package/es/components/appointmentBooking/components/Voucher/index.js +15 -1
  15. package/es/components/booking/addons/index.js +25 -17
  16. package/es/components/booking/components/actionButtons/index.js +3 -1
  17. package/es/components/booking/components/footer/amount.d.ts +1 -0
  18. package/es/components/booking/components/footer/amount.js +548 -84
  19. package/es/components/booking/components/footer/index.js +36 -33
  20. package/es/components/booking/components/footer/utils.d.ts +19 -0
  21. package/es/components/booking/components/footer/utils.js +166 -67
  22. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  23. package/es/components/booking/components/voucher/index.js +53 -15
  24. package/es/components/booking/forms/table/index.d.ts +0 -1
  25. package/es/components/booking/hooks/useQuotation.js +4 -1
  26. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  27. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  28. package/es/components/booking/info/service/like/index.d.ts +0 -1
  29. package/es/components/booking/info/service2/utils.js +1 -0
  30. package/es/components/booking/info2/cartClientCard/index.js +5 -3
  31. package/es/components/booking/info2/service/addService/index.js +9 -9
  32. package/es/components/booking/info2/service/editNormalService/index.js +6 -0
  33. package/es/components/booking/info2/service/editService/index.js +27 -17
  34. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  35. package/es/components/booking/info2/service/editService/utils.js +66 -0
  36. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  37. package/es/components/booking/utils.d.ts +1 -0
  38. package/es/components/booking/utils.js +15 -2
  39. package/es/components/checkout/components/AmountSummary/index.less +4 -5
  40. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  41. package/es/components/eftpos/form/index.d.ts +0 -1
  42. package/es/components/eftpos/group/index.d.ts +0 -1
  43. package/es/components/eftpos/hooks.d.ts +0 -1
  44. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  45. package/es/components/eftpos/icon/device.d.ts +0 -1
  46. package/es/components/eftpos/receipt/index.d.ts +0 -1
  47. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  48. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  49. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  50. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  51. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  52. package/es/components/eftposPay/payo/config.d.ts +1 -0
  53. package/es/components/eftposPay/payo/config.js +70 -32
  54. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  55. package/es/components/eftposPay/payo/payment.js +579 -0
  56. package/es/components/eftposPay/store/index.d.ts +1 -1
  57. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  58. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  59. package/es/components/eftposPay/utils/log/index.js +371 -0
  60. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  61. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  63. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  68. package/es/components/index.d.ts +2 -2
  69. package/es/components/index.js +2 -2
  70. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  71. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  72. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  73. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  74. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  75. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  76. package/es/components/pay/toC/index.js +7 -4
  77. package/es/components/pay/toC/locales.d.ts +3 -0
  78. package/es/components/pay/toC/locales.js +6 -3
  79. package/es/components/pay/toC/status.d.ts +1 -0
  80. package/es/components/pay/toC/status.js +3 -0
  81. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  82. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  83. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  84. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  85. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  86. package/es/components/schedules/products/index.d.ts +0 -1
  87. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  88. package/es/components/subTotal/index.js +1 -1
  89. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  90. package/es/components/{wallet/serve.js → systemSettings/registry/components/GroupModal.js} +145 -190
  91. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  92. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  93. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  94. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  95. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  96. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  97. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  98. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  99. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  100. package/es/components/systemSettings/registry/components/index.js +4 -0
  101. package/es/components/systemSettings/registry/index.d.ts +5 -0
  102. package/es/components/systemSettings/registry/index.js +1059 -0
  103. package/es/components/systemSettings/registry/index.less +410 -0
  104. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  105. package/es/components/systemSettings/registry/locales.js +300 -0
  106. package/es/components/systemSettings/registry/services.d.ts +77 -0
  107. package/es/components/systemSettings/registry/services.js +472 -0
  108. package/es/components/systemSettings/registry/types.d.ts +126 -0
  109. package/es/components/systemSettings/registry/types.js +1 -0
  110. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  111. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  112. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  113. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  114. package/es/components/ticketBooking/components/addServiceVariant/addService.js +7 -5
  115. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  116. package/es/components/ticketBooking/utils/index.js +37 -17
  117. package/es/components/walletList/index.d.ts +0 -25
  118. package/es/components/walletList/index.js +173 -41
  119. package/es/components/walletList/locales.d.ts +9 -0
  120. package/es/components/walletList/locales.js +12 -3
  121. package/es/components/walletList/serve.d.ts +19 -0
  122. package/es/components/walletList/serve.js +94 -5
  123. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  124. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  125. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  126. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  127. package/es/index.d.ts +3 -2
  128. package/es/index.js +4 -3
  129. package/es/plus/clientName/index.d.ts +0 -1
  130. package/es/plus/walletEditor/WalletEditor.js +60 -2
  131. package/es/plus/walletEditor/locales.d.ts +9 -0
  132. package/es/plus/walletEditor/locales.js +12 -3
  133. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  134. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  135. package/es/plus/walletPassGallery/components/passDetail/index.js +5 -1
  136. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  137. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  138. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  139. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  140. package/es/plus/walletPassGallery/index.js +226 -42
  141. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  142. package/es/plus/walletPassGallery/locales.js +29 -5
  143. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  144. package/es/plus/walletPassGallery/serve.js +59 -2
  145. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  146. package/es/plus/walletPassGallery/utils.js +342 -0
  147. package/es/pro/Login2.0/index.less +15 -8
  148. package/es/pro/pisellPaymentList/example.d.ts +0 -1
  149. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +35 -30
  150. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  151. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  152. package/lib/components/appointmentBooking/components/Services/index.js +5 -2
  153. package/lib/components/appointmentBooking/components/Voucher/index.js +13 -1
  154. package/lib/components/booking/addons/index.js +15 -7
  155. package/lib/components/booking/components/actionButtons/index.js +4 -2
  156. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  157. package/lib/components/booking/components/footer/amount.js +293 -41
  158. package/lib/components/booking/components/footer/index.js +5 -2
  159. package/lib/components/booking/components/footer/utils.d.ts +19 -0
  160. package/lib/components/booking/components/footer/utils.js +111 -35
  161. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  162. package/lib/components/booking/components/voucher/index.js +56 -16
  163. package/lib/components/booking/forms/table/index.d.ts +0 -1
  164. package/lib/components/booking/hooks/useQuotation.js +2 -1
  165. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  166. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  167. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  168. package/lib/components/booking/info/service2/utils.js +1 -0
  169. package/lib/components/booking/info2/cartClientCard/index.js +4 -2
  170. package/lib/components/booking/info2/service/addService/index.js +1 -1
  171. package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
  172. package/lib/components/booking/info2/service/editService/index.js +30 -8
  173. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  174. package/lib/components/booking/info2/service/editService/utils.js +40 -3
  175. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  176. package/lib/components/booking/utils.d.ts +1 -0
  177. package/lib/components/booking/utils.js +11 -0
  178. package/lib/components/checkout/components/AmountSummary/index.less +4 -5
  179. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  180. package/lib/components/eftpos/form/index.d.ts +0 -1
  181. package/lib/components/eftpos/group/index.d.ts +0 -1
  182. package/lib/components/eftpos/hooks.d.ts +0 -1
  183. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  184. package/lib/components/eftpos/icon/device.d.ts +0 -1
  185. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  186. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  187. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  188. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  189. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  190. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  191. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  192. package/lib/components/eftposPay/payo/config.js +98 -73
  193. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  194. package/lib/components/eftposPay/payo/payment.js +357 -0
  195. package/lib/components/eftposPay/store/index.d.ts +1 -1
  196. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  197. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  198. package/lib/components/eftposPay/utils/log/index.js +294 -0
  199. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  200. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  201. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  202. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  203. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  204. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  205. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  206. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  207. package/lib/components/index.d.ts +2 -2
  208. package/lib/components/index.js +3 -3
  209. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  210. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  211. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  212. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  213. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  214. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  215. package/lib/components/pay/toC/index.js +4 -1
  216. package/lib/components/pay/toC/locales.d.ts +3 -0
  217. package/lib/components/pay/toC/locales.js +6 -3
  218. package/lib/components/pay/toC/status.d.ts +1 -0
  219. package/lib/components/pay/toC/status.js +5 -0
  220. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  221. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  222. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  223. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  224. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  225. package/lib/components/schedules/products/index.d.ts +0 -1
  226. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  227. package/lib/components/subTotal/index.js +1 -1
  228. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  229. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  230. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  231. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  232. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  233. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  234. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  235. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  236. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  237. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  238. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  239. package/lib/components/{wallet → systemSettings/registry}/components/index.js +13 -10
  240. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  241. package/lib/components/systemSettings/registry/index.js +529 -0
  242. package/lib/components/systemSettings/registry/index.less +410 -0
  243. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  244. package/lib/components/systemSettings/registry/locales.js +324 -0
  245. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  246. package/lib/components/systemSettings/registry/services.js +290 -0
  247. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  248. package/lib/components/{wallet/RechargeableCard/serve.js → systemSettings/registry/types.js} +3 -19
  249. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  250. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  251. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  252. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  253. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -7
  254. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  255. package/lib/components/ticketBooking/utils/index.js +21 -6
  256. package/lib/components/walletList/index.d.ts +0 -25
  257. package/lib/components/walletList/index.js +100 -4
  258. package/lib/components/walletList/locales.d.ts +9 -0
  259. package/lib/components/walletList/locales.js +12 -3
  260. package/lib/components/walletList/serve.d.ts +19 -0
  261. package/lib/components/walletList/serve.js +26 -3
  262. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  263. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  264. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  265. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  266. package/lib/index.d.ts +3 -2
  267. package/lib/index.js +5 -2
  268. package/lib/plus/clientName/index.d.ts +0 -1
  269. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  270. package/lib/plus/walletEditor/locales.d.ts +9 -0
  271. package/lib/plus/walletEditor/locales.js +12 -3
  272. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  273. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  274. package/lib/plus/walletPassGallery/components/passDetail/index.js +4 -1
  275. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  276. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  277. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  278. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  279. package/lib/plus/walletPassGallery/index.js +157 -28
  280. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  281. package/lib/plus/walletPassGallery/locales.js +32 -5
  282. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  283. package/lib/plus/walletPassGallery/serve.js +17 -5
  284. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  285. package/lib/plus/walletPassGallery/utils.js +287 -0
  286. package/lib/pro/Login2.0/index.less +15 -8
  287. package/lib/pro/pisellPaymentList/example.d.ts +0 -1
  288. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +34 -39
  289. package/lowcode/settings-registry/meta.ts +29 -0
  290. package/package.json +3 -3
  291. package/es/components/wallet/Detail/index.d.ts +0 -42
  292. package/es/components/wallet/Detail/index.js +0 -1182
  293. package/es/components/wallet/Detail/index.less +0 -386
  294. package/es/components/wallet/Detail/locales.d.ts +0 -153
  295. package/es/components/wallet/Detail/locales.js +0 -170
  296. package/es/components/wallet/Detail/model.d.ts +0 -13
  297. package/es/components/wallet/Detail/model.js +0 -22
  298. package/es/components/wallet/Detail/serve.d.ts +0 -39
  299. package/es/components/wallet/Detail/serve.js +0 -64
  300. package/es/components/wallet/DetailContext.d.ts +0 -25
  301. package/es/components/wallet/DetailContext.js +0 -162
  302. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  303. package/es/components/wallet/DiscountCard/index.js +0 -218
  304. package/es/components/wallet/DiscountCard/index.less +0 -9
  305. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  306. package/es/components/wallet/DiscountCard/model.js +0 -22
  307. package/es/components/wallet/PointCard/index.d.ts +0 -3
  308. package/es/components/wallet/PointCard/index.js +0 -169
  309. package/es/components/wallet/PointCard/index.less +0 -9
  310. package/es/components/wallet/PointCard/model.d.ts +0 -13
  311. package/es/components/wallet/PointCard/model.js +0 -22
  312. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  313. package/es/components/wallet/RechargeableCard/index.js +0 -463
  314. package/es/components/wallet/RechargeableCard/index.less +0 -108
  315. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  316. package/es/components/wallet/RechargeableCard/model.js +0 -28
  317. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  318. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  319. package/es/components/wallet/Voucher/index.d.ts +0 -12
  320. package/es/components/wallet/Voucher/index.js +0 -131
  321. package/es/components/wallet/Voucher/index.less +0 -9
  322. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  323. package/es/components/wallet/Voucher/locales.js +0 -20
  324. package/es/components/wallet/Voucher/model.d.ts +0 -13
  325. package/es/components/wallet/Voucher/model.js +0 -22
  326. package/es/components/wallet/carouselArrow.png +0 -0
  327. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  328. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  329. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  330. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  331. package/es/components/wallet/components/UsageRules/index.js +0 -147
  332. package/es/components/wallet/components/UsageRules/index.less +0 -157
  333. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  334. package/es/components/wallet/components/WalletBar/index.js +0 -19
  335. package/es/components/wallet/components/WalletBar/index.less +0 -36
  336. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  337. package/es/components/wallet/components/WalletCard.js +0 -91
  338. package/es/components/wallet/components/index.d.ts +0 -3
  339. package/es/components/wallet/components/index.js +0 -4
  340. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
  341. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  342. package/es/components/wallet/index.d.ts +0 -10
  343. package/es/components/wallet/index.js +0 -807
  344. package/es/components/wallet/index.less +0 -151
  345. package/es/components/wallet/locales.d.ts +0 -132
  346. package/es/components/wallet/locales.js +0 -139
  347. package/es/components/wallet/model.d.ts +0 -37
  348. package/es/components/wallet/model.js +0 -86
  349. package/es/components/wallet/serve.d.ts +0 -150
  350. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  351. package/es/components/wallet/utils/formatUtils.js +0 -73
  352. package/lib/components/wallet/Detail/index.d.ts +0 -42
  353. package/lib/components/wallet/Detail/index.js +0 -874
  354. package/lib/components/wallet/Detail/index.less +0 -386
  355. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  356. package/lib/components/wallet/Detail/locales.js +0 -194
  357. package/lib/components/wallet/Detail/model.d.ts +0 -13
  358. package/lib/components/wallet/Detail/model.js +0 -43
  359. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  360. package/lib/components/wallet/Detail/serve.js +0 -44
  361. package/lib/components/wallet/DetailContext.d.ts +0 -25
  362. package/lib/components/wallet/DetailContext.js +0 -118
  363. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  364. package/lib/components/wallet/DiscountCard/index.js +0 -209
  365. package/lib/components/wallet/DiscountCard/index.less +0 -9
  366. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  367. package/lib/components/wallet/DiscountCard/model.js +0 -43
  368. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  369. package/lib/components/wallet/PointCard/index.js +0 -190
  370. package/lib/components/wallet/PointCard/index.less +0 -9
  371. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  372. package/lib/components/wallet/PointCard/model.js +0 -43
  373. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  374. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  375. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  376. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  377. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  378. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  379. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  380. package/lib/components/wallet/Voucher/index.js +0 -146
  381. package/lib/components/wallet/Voucher/index.less +0 -9
  382. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  383. package/lib/components/wallet/Voucher/locales.js +0 -44
  384. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  385. package/lib/components/wallet/Voucher/model.js +0 -43
  386. package/lib/components/wallet/carouselArrow.png +0 -0
  387. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  388. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  389. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  390. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  391. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  392. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  393. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  394. package/lib/components/wallet/components/WalletBar/index.js +0 -49
  395. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  396. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  397. package/lib/components/wallet/components/WalletCard.js +0 -97
  398. package/lib/components/wallet/components/index.d.ts +0 -3
  399. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
  400. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  401. package/lib/components/wallet/index.d.ts +0 -10
  402. package/lib/components/wallet/index.js +0 -580
  403. package/lib/components/wallet/index.less +0 -151
  404. package/lib/components/wallet/locales.d.ts +0 -132
  405. package/lib/components/wallet/locales.js +0 -163
  406. package/lib/components/wallet/model.d.ts +0 -37
  407. package/lib/components/wallet/model.js +0 -91
  408. package/lib/components/wallet/serve.d.ts +0 -150
  409. package/lib/components/wallet/serve.js +0 -85
  410. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  411. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -43,7 +43,7 @@ var ShopDiscountHooks = {
43
43
  };
44
44
  var services = {};
45
45
  var VoucherCard = function VoucherCard(props) {
46
- var _context$appHelper, _state$client$value, _state$service3;
46
+ var _context$appHelper, _state$client$value, _state$pet2, _state$service3;
47
47
  var context = useEngineContext();
48
48
  var state = props.state,
49
49
  dispatch = props.dispatch,
@@ -70,11 +70,15 @@ var VoucherCard = function VoucherCard(props) {
70
70
  var shopDiscount = useShopDiscountModule();
71
71
  var _useActiveExecute = useActiveExecute(),
72
72
  executeIfActive = _useActiveExecute.executeIfActive;
73
+ var holderChangedRef = useRef(false);
74
+ var stateRef = useRef(state);
75
+ stateRef.current = state;
73
76
  services = state.service;
74
77
 
75
78
  // 将选中的客户数据传递给状态管理
76
79
  var changeCustomerToGlobalState = useMemoizedFn(function (value) {
77
- var _state$service;
80
+ var _state$client, _state$service;
81
+ var beforeValue = state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
78
82
  dispatch({
79
83
  type: 'setClient',
80
84
  payload: {
@@ -82,6 +86,7 @@ var VoucherCard = function VoucherCard(props) {
82
86
  edit: true
83
87
  }
84
88
  });
89
+ if ((beforeValue === null || beforeValue === void 0 ? void 0 : beforeValue.id) === (value === null || value === void 0 ? void 0 : value.id)) return;
85
90
  if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
86
91
  // 还需要清空商品内的 holder 信息
87
92
  dispatch({
@@ -121,7 +126,7 @@ var VoucherCard = function VoucherCard(props) {
121
126
  var serviceMemo = useMemo(function () {
122
127
  var _ref;
123
128
  var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
124
- var _value$_extend, _value$_extend2;
129
+ var _value$_extend, _value$_extend2, _value$_extend3;
125
130
  return {
126
131
  booking_id: value.booking_id,
127
132
  id: value.id,
@@ -130,11 +135,17 @@ var VoucherCard = function VoucherCard(props) {
130
135
  discount_list: value.discount_list,
131
136
  origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total,
132
137
  quantity: value._extend.quantity,
133
- startDate: value._extend.startDate
138
+ startDate: value._extend.startDate,
139
+ holder_id: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.holder_id
134
140
  };
135
141
  });
136
142
  return val;
137
143
  }, [state.service.value]);
144
+ var serviceTotal = useMemo(function () {
145
+ return serviceMemo.reduce(function (total, item) {
146
+ return total + (item.total || 0);
147
+ }, 0);
148
+ }, [serviceMemo]);
138
149
  var onScanWallPassCode = useMemoizedFn(function (e) {
139
150
  if (!e.detail.code) {
140
151
  return;
@@ -151,20 +162,37 @@ var VoucherCard = function VoucherCard(props) {
151
162
  var addonsMemo = useMemo(function () {
152
163
  var _ref2;
153
164
  var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
154
- var _value$_extend3, _value$_extend4;
165
+ var _value$_extend4, _value$_extend5;
155
166
  return {
156
167
  booking_id: value.booking_id,
157
168
  id: value.id,
158
169
  _id: value._id,
159
170
  price: value.price,
160
- total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
171
+ total: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.total,
161
172
  discount_list: value.discount_list,
162
173
  _key: value._key,
163
- num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
174
+ num: value === null || value === void 0 || (_value$_extend5 = value._extend) === null || _value$_extend5 === void 0 ? void 0 : _value$_extend5.quantity
164
175
  };
165
176
  });
166
177
  return val;
167
178
  }, [state.addons.value]);
179
+ var holdersMemo = useMemo(function () {
180
+ if (isBooking4Shop) {
181
+ var _state$pet;
182
+ var list = [];
183
+ if ((_state$pet = state.pet) !== null && _state$pet !== void 0 && _state$pet.value) {
184
+ var entries = Object.entries(state.pet.value);
185
+ // 多余 1 个表单类型时,无法计算
186
+ // 同一表单多个 holder 时,os内只取第一个
187
+ if (entries.length === 1) {
188
+ list = entries[0][1];
189
+ }
190
+ }
191
+ shopDiscount.setHolders(list);
192
+ holderChangedRef.current = true;
193
+ return list || [];
194
+ }
195
+ }, [(_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.value, isBooking4Shop]);
168
196
  var disabled = useMemo(function () {
169
197
  var _state$bookingDetail;
170
198
  if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
@@ -176,14 +204,16 @@ var VoucherCard = function VoucherCard(props) {
176
204
  }, [state, addonsMemo, serviceMemo]);
177
205
  var _useDebounceFn = useDebounceFn(function () {
178
206
  var _state$service2;
179
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length)) {
207
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length)) {
180
208
  return;
181
209
  }
182
210
  if (isBooking4Shop) {
183
- var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
211
+ var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(stateRef.current.service.value), _toConsumableArray(stateRef.current.addons.value)));
184
212
  console.log('input: ', state.service.value);
185
213
  console.log('output: ', val);
186
214
  productListToValue(val.productList);
215
+ // 重置 holder 变化标识,防止重复计算
216
+ holderChangedRef.current = false;
187
217
  }
188
218
  }, {
189
219
  wait: 500
@@ -193,7 +223,7 @@ var VoucherCard = function VoucherCard(props) {
193
223
  // 更新productList
194
224
  useEffect(function () {
195
225
  run();
196
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
226
+ }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), JSON.stringify(holdersMemo), isBooking4Shop]);
197
227
  useEffect(function () {
198
228
  if (shopDiscount) {
199
229
  var wrappedHandler = executeIfActive(fn);
@@ -244,6 +274,12 @@ var VoucherCard = function VoucherCard(props) {
244
274
  var _getServiceAddons = getServiceAddons(list),
245
275
  serviceList = _getServiceAddons.serviceList,
246
276
  addonsList = _getServiceAddons.addonsList;
277
+ var newTotal = serviceList.reduce(function (total, item) {
278
+ return total + (item._extend.total || 0);
279
+ }, 0);
280
+ if (newTotal !== serviceTotal) {
281
+ edit = true;
282
+ }
247
283
  serviceValueRef.current = serviceList;
248
284
  addonsValueRef.current = addonsList;
249
285
  var other = {};
@@ -261,11 +297,13 @@ var VoucherCard = function VoucherCard(props) {
261
297
 
262
298
  // 售票页面暂时不需要
263
299
  if (!(props !== null && props !== void 0 && (_props$state = props.state) !== null && _props$state !== void 0 && _props$state.isBookingTicket2)) {
264
- dispatch({
265
- type: 'setAddons',
266
- payload: _objectSpread({
267
- value: addonsList
268
- }, other)
300
+ setTimeout(function () {
301
+ dispatch({
302
+ type: 'setAddons',
303
+ payload: _objectSpread({
304
+ value: addonsList
305
+ }, other)
306
+ });
269
307
  });
270
308
  }
271
309
  });
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -93,9 +93,12 @@ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
93
93
  return item.id === bundle.id;
94
94
  });
95
95
  var optionPrice = calculateTotalPrice((selectBundleInfo === null || selectBundleInfo === void 0 ? void 0 : selectBundleInfo.option) || []);
96
+
97
+ // 编辑预约时使用折扣卡
98
+ var isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
96
99
  return _objectSpread(_objectSpread({}, bundle), {}, {
97
100
  base_price: bundleItemMap[bundle.id].base_price,
98
- price: new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
101
+ price: isEditDiscount ? bundle.price : new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
99
102
  // product_price: bundleItemMap[item.id].product_price,
100
103
  });
101
104
  });
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -442,6 +442,7 @@ var formatBundle = function formatBundle(bundle) {
442
442
  num: item === null || item === void 0 ? void 0 : item.num,
443
443
  price: item === null || item === void 0 ? void 0 : item.price,
444
444
  total: item === null || item === void 0 ? void 0 : item.price,
445
+ origin_total: item.original_total,
445
446
  price_type: item === null || item === void 0 ? void 0 : item.price_type,
446
447
  bundle_sum_price: item === null || item === void 0 ? void 0 : item.bundle_sum_price,
447
448
  bundle_sum_type: item === null || item === void 0 ? void 0 : item.bundle_sum_type,
@@ -35,7 +35,7 @@ import { useIsActive } from "../../../ticketBooking/context/IsActiveContext";
35
35
  // 导出类型
36
36
 
37
37
  var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
38
- var _context$appHelper, _state$client;
38
+ var _context$appHelper, _state$client2;
39
39
  var _ref$clientCardProps = _ref.clientCardProps,
40
40
  clientCardProps = _ref$clientCardProps === void 0 ? {} : _ref$clientCardProps,
41
41
  beforeSwitchModalOpen = _ref.beforeSwitchModalOpen,
@@ -73,7 +73,8 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
73
73
 
74
74
  // 将选中的客户数据传递给状态管理
75
75
  var changeCustomerToGlobalState = useMemoizedFn(function (value) {
76
- var _state$service;
76
+ var _state$client, _state$service;
77
+ var beforeValue = state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
77
78
  dispatch({
78
79
  type: 'setClient',
79
80
  payload: {
@@ -81,6 +82,7 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
81
82
  edit: true
82
83
  }
83
84
  });
85
+ if ((beforeValue === null || beforeValue === void 0 ? void 0 : beforeValue.id) === (value === null || value === void 0 ? void 0 : value.id)) return;
84
86
  if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
85
87
  // 还需要清空商品内的 holder 信息
86
88
  dispatch({
@@ -109,7 +111,7 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
109
111
  initLoad = _useCustomer.initLoad,
110
112
  hasMore = _useCustomer.hasMore,
111
113
  loadMore = _useCustomer.loadMore;
112
- var selectedCustomer = (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
114
+ var selectedCustomer = (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : _state$client2.value;
113
115
 
114
116
  // 点击搜索按钮 重置列表
115
117
  var handleSearchClient = /*#__PURE__*/function () {
@@ -30,7 +30,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
30
30
  import { getProductDetail } from "../../../info/service/serve";
31
31
  import { getIsBundleOrCombination } from "../../../info/utils";
32
32
  import { getMultiDay, getProductExtend, isMultiDayProduct } from "./utils";
33
- import { formatProductListByCategory, getIsEject, getIsOnlySession, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
33
+ import { formatProductListByCategory, getIsEject, getIsOnlySession, getMainPrice, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
34
34
  import { locales, getUniqueId } from '@pisell/utils';
35
35
  import { useUpdateEffect } from 'ahooks';
36
36
  import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
@@ -305,7 +305,6 @@ var Info = function Info(props) {
305
305
  _extend: {
306
306
  start_date: state.date.value,
307
307
  quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
308
- price: _detail.price,
309
308
  product_name: item.title,
310
309
  other: other
311
310
  },
@@ -315,6 +314,7 @@ var Info = function Info(props) {
315
314
  if (isMultiDay) {
316
315
  cacheItem._extend.end_date = state.date.value.add(1, 'day');
317
316
  }
317
+ cacheItem._extend.price = getMainPrice(cacheItem, _detail.price);
318
318
  _total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
319
319
  cacheItem._extend.total = _total;
320
320
  // 用于储存原价
@@ -365,7 +365,7 @@ var Info = function Info(props) {
365
365
  cacheItem.autoClose = false;
366
366
  }
367
367
  if (!cacheItem.autoClose) {
368
- _context4.next = 26;
368
+ _context4.next = 27;
369
369
  break;
370
370
  }
371
371
  cacheItem.autoClose = false;
@@ -393,17 +393,17 @@ var Info = function Info(props) {
393
393
  changeService: false
394
394
  }
395
395
  });
396
- _context4.next = 32;
396
+ _context4.next = 33;
397
397
  break;
398
- case 26:
398
+ case 27:
399
399
  (_window$openBookingEd = (_window = window).openBookingEditModal) === null || _window$openBookingEd === void 0 || _window$openBookingEd.call(_window);
400
400
  if (!isMultiDay) {
401
- _context4.next = 30;
401
+ _context4.next = 31;
402
402
  break;
403
403
  }
404
- _context4.next = 30;
404
+ _context4.next = 31;
405
405
  return getMultiDayCacheItem(true);
406
- case 30:
406
+ case 31:
407
407
  dispatch({
408
408
  type: 'setService',
409
409
  payload: {
@@ -414,7 +414,7 @@ var Info = function Info(props) {
414
414
  }
415
415
  });
416
416
  onEdit === null || onEdit === void 0 || onEdit(cacheItem);
417
- case 32:
417
+ case 33:
418
418
  case "end":
419
419
  return _context4.stop();
420
420
  }
@@ -2,6 +2,7 @@ import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'reac
2
2
  import { useMemoizedFn } from 'ahooks';
3
3
  import SkuDetailModal from "../../../../../pro/skuDetailModal";
4
4
  import { Context } from "../../../info/model";
5
+ import { setProductPrice } from "../editService/utils";
5
6
  var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
6
7
  var _useContext = useContext(Context),
7
8
  state = _useContext.state,
@@ -33,6 +34,11 @@ var EditNormalService = /*#__PURE__*/forwardRef(function (props, ref) {
33
34
  var _ref2, _state$service2;
34
35
  var newProducts = (_ref2 = (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (item) {
35
36
  if (item._id == data._id) {
37
+ var _data$_extend, _data$_extend2;
38
+ data = setProductPrice(data, {
39
+ newTotal: (_data$_extend = data._extend) === null || _data$_extend === void 0 ? void 0 : _data$_extend.total,
40
+ origin_total: (_data$_extend2 = data._extend) === null || _data$_extend2 === void 0 ? void 0 : _data$_extend2.origin_total
41
+ });
36
42
  return data;
37
43
  }
38
44
  return item;
@@ -41,6 +41,7 @@ import { editSessionProduct } from "../../../info/utils";
41
41
  import { deleteCacheParams, getDays, getProductTotalPrice, getServiceTimes, isSessionProduct, isWalkIn } from "../../../utils";
42
42
  import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
43
43
  import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj, setDefaultCapacitys } from "../addService/utils";
44
+ import { setProductPrice } from "./utils";
44
45
  import NoteModal from "../../../../../plus/noteModal";
45
46
  import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
46
47
  import EditTabs from "../../../info/service/editService/EditTabs";
@@ -258,7 +259,7 @@ var Info = function Info(_, ref) {
258
259
  * @Date: 2024-01-09 14:04
259
260
  */
260
261
  var onFinish = function onFinish(values) {
261
- var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
262
+ var _resourcesRef$current, _item$_extend, _item$_extend2, _item$_extend3, _item$_extend4, _item2, _item3, _item$_extend5, _state$service$cacheI3, _window$closeBookingE2, _window2;
262
263
  var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
263
264
  if (isShowTimeAndResource && !isSuccess) {
264
265
  return;
@@ -339,8 +340,12 @@ var Info = function Info(_, ref) {
339
340
  _item._extend.quantity = 1;
340
341
  }
341
342
  }
342
- var _id = _item === null || _item === void 0 ? void 0 : _item._id;
343
- var groupId = _item === null || _item === void 0 || (_item$_extend5 = _item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.groupId;
343
+ var _id = (_item2 = _item) === null || _item2 === void 0 ? void 0 : _item2._id;
344
+ var groupId = (_item3 = _item) === null || _item3 === void 0 || (_item3 = _item3._extend) === null || _item3 === void 0 ? void 0 : _item3.groupId;
345
+ _item = setProductPrice(_item, {
346
+ newTotal: values.total,
347
+ origin_total: (_item$_extend5 = _item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.origin_total
348
+ });
344
349
  if (groupId) {
345
350
  _list = _list.filter(function (d) {
346
351
  var _d$_extend;
@@ -420,7 +425,7 @@ var Info = function Info(_, ref) {
420
425
  var startTime = performance.now();
421
426
  console.log(startTime, 'startTime');
422
427
  form.resetFields();
423
- form.setFieldsValue(values);
428
+ // form.setFieldsValue(values);
424
429
  // form.setFieldValue('resource', values.resource)
425
430
 
426
431
  // values.resource[1117][0].times = [];
@@ -431,19 +436,24 @@ var Info = function Info(_, ref) {
431
436
  // }
432
437
  // };
433
438
 
434
- // form.setFieldsValue({
435
- // capacity: values.capacity,
436
- // duration: values.duration,
437
- // endDate: values.endDate,
438
- // origin_total: values.origin_total,
439
- // price: values.price,
440
- // product_name: values.product_name,
441
- // quantity: values.quantity,
442
- // resource: values.resource,
443
- // startDate: values.startDate,
444
- // start_time: values.start_time,
445
- // total: values.total,
446
- // });
439
+ form.setFieldsValue({
440
+ capacity: values.capacity,
441
+ discount_reason: values.discount_reason,
442
+ duration: values.duration,
443
+ endDate: values.endDate,
444
+ end_date: values.end_date,
445
+ origin_total: values.origin_total,
446
+ price: values.price,
447
+ product_name: values.product_name,
448
+ quantity: values.quantity,
449
+ resource: values.resource,
450
+ startDate: values.startDate,
451
+ start_time: values.start_time,
452
+ start_date: values.start_date,
453
+ total: values.total,
454
+ holder_id: values.holder_id,
455
+ note: values.note
456
+ });
447
457
  var endTime = performance.now();
448
458
  console.log(endTime - window.pp1, '打开商品5');
449
459
  console.log('执行时间', endTime - startTime, values);
@@ -11,3 +11,18 @@ export declare const getAutoAllocationStorage: (id: string | number) => any;
11
11
  export declare const setAutoAllocationStorage: (data: {
12
12
  [key: string]: boolean;
13
13
  }) => void;
14
+ /**
15
+ * 手动折扣后给商品价格和子商品价格重新计算
16
+ *
17
+ * 计算逻辑:
18
+ * 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
19
+ * 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
20
+ *
21
+ * @param cacheItem - 缓存的商品项
22
+ * @param newTotal - 折扣后的新总价
23
+ * @param origin_total - 原始总价
24
+ */
25
+ export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total }: {
26
+ newTotal: number;
27
+ origin_total: number;
28
+ }) => any;
@@ -14,7 +14,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
14
14
  判断是否需要进入编辑服务页
15
15
  */
16
16
 
17
+ import { isArr } from "@pisell/utils";
17
18
  import { isBoolean } from "@pisell/utils";
19
+ import Decimal from "decimal.js";
18
20
  var isNewService = function isNewService(service) {
19
21
  return !service.new && service._extend.endDate;
20
22
  };
@@ -52,4 +54,68 @@ export var setAutoAllocationStorage = function setAutoAllocationStorage(data) {
52
54
  } else {
53
55
  localStorage.setItem('resource-auto-allocation', JSON.stringify(_objectSpread({}, data)));
54
56
  }
57
+ };
58
+
59
+ /**
60
+ * 手动折扣后给商品价格和子商品价格重新计算
61
+ *
62
+ * 计算逻辑:
63
+ * 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
64
+ * 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
65
+ *
66
+ * @param cacheItem - 缓存的商品项
67
+ * @param newTotal - 折扣后的新总价
68
+ * @param origin_total - 原始总价
69
+ */
70
+ export var setProductPrice = function setProductPrice(cacheItem, _ref2) {
71
+ var _cacheItem$_extend$ot, _cacheItem$_extend$ot2, _cacheItem$_extend$ot4, _cacheItem$_extend$ot5;
72
+ var newTotal = _ref2.newTotal,
73
+ origin_total = _ref2.origin_total;
74
+ // 计算折扣比例
75
+ var discountRatio = new Decimal(newTotal).div(new Decimal(origin_total));
76
+
77
+ // 用于累加子商品总价c
78
+ var subTotal = new Decimal(0);
79
+
80
+ // 处理 bundle 子商品
81
+ if ((_cacheItem$_extend$ot = cacheItem._extend.other) !== null && _cacheItem$_extend$ot !== void 0 && _cacheItem$_extend$ot.bundle && isArr((_cacheItem$_extend$ot2 = cacheItem._extend.other) === null || _cacheItem$_extend$ot2 === void 0 ? void 0 : _cacheItem$_extend$ot2.bundle)) {
82
+ var _cacheItem$_extend$ot3;
83
+ (_cacheItem$_extend$ot3 = cacheItem._extend.other) === null || _cacheItem$_extend$ot3 === void 0 || (_cacheItem$_extend$ot3 = _cacheItem$_extend$ot3.bundle) === null || _cacheItem$_extend$ot3 === void 0 || _cacheItem$_extend$ot3.forEach(function (bundle) {
84
+ var _ref3, _bundle$num;
85
+ // 计算新价格,直接截取两位小数(不四舍五入)
86
+ var newPrice = new Decimal(bundle.original_price || bundle.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
87
+
88
+ // 获取数量,优先取 num,再取 quantity,默认为 1
89
+ var quantity = (_ref3 = (_bundle$num = bundle.num) !== null && _bundle$num !== void 0 ? _bundle$num : bundle.quantity) !== null && _ref3 !== void 0 ? _ref3 : 1;
90
+
91
+ // 累加到子商品总价
92
+ subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
93
+
94
+ // 设置新价格
95
+ bundle.price = newPrice;
96
+ });
97
+ }
98
+
99
+ // 处理 option 子商品
100
+ if ((_cacheItem$_extend$ot4 = cacheItem._extend.other) !== null && _cacheItem$_extend$ot4 !== void 0 && _cacheItem$_extend$ot4.option && isArr((_cacheItem$_extend$ot5 = cacheItem._extend.other) === null || _cacheItem$_extend$ot5 === void 0 ? void 0 : _cacheItem$_extend$ot5.option)) {
101
+ var _cacheItem$_extend$ot6;
102
+ (_cacheItem$_extend$ot6 = cacheItem._extend.other) === null || _cacheItem$_extend$ot6 === void 0 || (_cacheItem$_extend$ot6 = _cacheItem$_extend$ot6.option) === null || _cacheItem$_extend$ot6 === void 0 || _cacheItem$_extend$ot6.forEach(function (option) {
103
+ var _ref4, _option$num;
104
+ // 计算新价格,直接截取两位小数(不四舍五入)
105
+ var newPrice = new Decimal(option.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
106
+
107
+ // 获取数量,优先取 num,再取 quantity,默认为 1
108
+ var quantity = (_ref4 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref4 !== void 0 ? _ref4 : 1;
109
+
110
+ // 累加到子商品总价
111
+ subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
112
+
113
+ // 设置新价格
114
+ option.price = newPrice;
115
+ });
116
+ }
117
+
118
+ // 主商品价格 = newTotal - 子商品总价(让主商品吸收精度误差,确保总价精确)
119
+ cacheItem._extend.price = new Decimal(newTotal).sub(subTotal).toNumber();
120
+ return cacheItem;
55
121
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  interface StartTimeProps extends SelectProps {
4
3
  locale?: string;
@@ -161,6 +161,7 @@ export declare const getIsOnlySession: (item: any) => boolean;
161
161
  * @Date: 2024-01-26 14:09
162
162
  */
163
163
  export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
164
+ export declare const getMainPrice: (item: any, price?: number) => number;
164
165
  export declare const getProductTotalPrice: (item: any) => number;
165
166
  /**
166
167
  * @title: 判断 duration
@@ -778,11 +778,24 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
778
778
  return _extend;
779
779
  };
780
780
 
781
+ // 获取主商品价格 包含组合规格
782
+ export var getMainPrice = function getMainPrice(item, price) {
783
+ var _item$_extend;
784
+ var newPrice = new Decimal(price || item._extend.price || 0);
785
+ var other = (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.other;
786
+
787
+ // 多规格
788
+ if (other !== null && other !== void 0 && other.product_variant_id) {
789
+ newPrice = new Decimal((other === null || other === void 0 ? void 0 : other.price) || 0);
790
+ }
791
+ return newPrice.toNumber();
792
+ };
793
+
781
794
  // 商品价格: (商品价格 + (套餐价格 + 单规格价格 * 单规格数量) * 套餐数量 + 单规格价格 * 单规格数量) * 商品数量
782
795
  export var getProductTotalPrice = function getProductTotalPrice(item) {
783
- var _item$_extend;
796
+ var _item$_extend2;
784
797
  var price = new Decimal(item._extend.price || 0);
785
- var other = (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.other;
798
+ var other = (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.other;
786
799
 
787
800
  // 多规格
788
801
  if (other !== null && other !== void 0 && other.product_variant_id) {
@@ -248,7 +248,6 @@
248
248
 
249
249
  .balance-due-label {
250
250
  font-size: 16px;
251
- color: #7f56da;
252
251
  font-weight: 400;
253
252
  line-height: 1.5;
254
253
  margin-bottom: 4px;
@@ -256,7 +255,7 @@
256
255
 
257
256
  .balance-due-amount {
258
257
  font-size: 14px;
259
- font-weight: 400;
258
+ font-weight: 600;
260
259
  color: #7f56da;
261
260
  line-height: 0.75;
262
261
  text-decoration: underline;
@@ -272,13 +271,13 @@
272
271
  .pay-text {
273
272
  font-size: 16px;
274
273
  font-weight: 500;
275
- color: #7f56da;
276
274
  letter-spacing: 0.09375em;
275
+ margin-top: 12px;
277
276
  }
278
277
 
279
278
  .pay-amount {
280
- font-size: 32px;
281
- font-weight: 400;
279
+ font-size: 36px;
280
+ font-weight: 600;
282
281
  color: #1e1830;
283
282
  line-height: 0.75;
284
283
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 递归循环表单数据
4
3
  * @Author: hongbing.wang
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RadioGroupProps } from 'antd';
3
2
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
4
3
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Eftpos } from './const';
3
2
  /**
4
3
  * @title: tyro 设备连接
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 自定义组件设置
4
3
  * @description: 自定义组件设置
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: () => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './titlebar.less';
3
2
  declare enum EPopupTitleBarVariantType {
4
3
  BackTitleClose = "back-title-cancel",
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StatusType } from '../../const';
3
2
  declare const _default: (props: {
4
3
  status: StatusType;