@pisell/private-materials 6.4.81 → 6.4.82

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 (222) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  13. package/es/components/booking/addons/index.js +1 -1
  14. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  15. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  16. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  17. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  18. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  19. package/es/components/booking/components/footer/amount.js +48 -34
  20. package/es/components/booking/components/footer/utils.js +38 -38
  21. package/es/components/booking/components/voucher/index.js +3 -1
  22. package/es/components/booking/forms/footer.d.ts +1 -0
  23. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  24. package/es/components/booking/forms/single/index.d.ts +1 -0
  25. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  26. package/es/components/booking/hooks/useQuotation.js +4 -1
  27. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  28. package/es/components/booking/info/date/index.d.ts +1 -0
  29. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  30. package/es/components/booking/info/notes/index.d.ts +1 -0
  31. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  32. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  33. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  34. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  35. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  36. package/es/components/booking/info2/service/editNormalService/index.js +6 -0
  37. package/es/components/booking/info2/service/editService/index.js +16 -6
  38. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  39. package/es/components/booking/info2/service/editService/utils.js +66 -0
  40. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  41. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  42. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  43. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  44. package/es/components/checkout/components/AmountSummary/index.less +4 -5
  45. package/es/components/eftpos/index.d.ts +1 -0
  46. package/es/components/eftpos/pos.d.ts +1 -0
  47. package/es/components/eftposPay/amount.d.ts +1 -0
  48. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  49. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  50. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  51. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  52. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  53. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  54. package/es/components/eftposPay/pay.d.ts +1 -0
  55. package/es/components/eftposPay/payo/config.d.ts +1 -0
  56. package/es/components/eftposPay/tip.d.ts +1 -0
  57. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  58. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  59. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  60. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  61. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  62. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  63. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  64. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  65. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  66. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  67. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  68. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  69. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  70. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  71. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  72. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  73. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  74. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  75. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  76. package/es/components/login/index.d.ts +1 -0
  77. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  78. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  79. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  80. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  81. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  82. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  83. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  84. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  85. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  86. package/es/components/schedules/calendar/index.d.ts +1 -0
  87. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  88. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  89. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  90. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  91. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  92. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  93. package/es/components/schedules/products/list/index.d.ts +1 -0
  94. package/es/components/schedules/resources/index.d.ts +1 -0
  95. package/es/components/schedules/resources/list/index.d.ts +1 -0
  96. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  97. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  98. package/es/components/schedules/schedules/index.d.ts +1 -0
  99. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  100. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  101. package/es/components/shoppingCart/index.d.ts +1 -0
  102. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  103. package/es/hooks/usePaymentLogger.d.ts +1 -0
  104. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  105. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  106. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  107. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  108. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  109. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  110. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  111. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  112. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  113. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  114. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  115. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +35 -30
  116. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  117. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  118. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  119. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  120. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  121. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  122. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  123. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  124. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  125. package/lib/components/booking/components/footer/amount.js +29 -15
  126. package/lib/components/booking/components/footer/utils.js +8 -8
  127. package/lib/components/booking/components/voucher/index.js +4 -2
  128. package/lib/components/booking/forms/footer.d.ts +1 -0
  129. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  130. package/lib/components/booking/forms/single/index.d.ts +1 -0
  131. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  132. package/lib/components/booking/hooks/useQuotation.js +2 -1
  133. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  134. package/lib/components/booking/info/date/index.d.ts +1 -0
  135. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  136. package/lib/components/booking/info/notes/index.d.ts +1 -0
  137. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  138. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  139. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  140. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  141. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  142. package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
  143. package/lib/components/booking/info2/service/editService/index.js +12 -3
  144. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  145. package/lib/components/booking/info2/service/editService/utils.js +40 -3
  146. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  147. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  148. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  149. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  150. package/lib/components/checkout/components/AmountSummary/index.less +4 -5
  151. package/lib/components/eftpos/index.d.ts +1 -0
  152. package/lib/components/eftpos/pos.d.ts +1 -0
  153. package/lib/components/eftposPay/amount.d.ts +1 -0
  154. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  155. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  156. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  157. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  158. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  159. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  160. package/lib/components/eftposPay/pay.d.ts +1 -0
  161. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  162. package/lib/components/eftposPay/tip.d.ts +1 -0
  163. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  164. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  165. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  166. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  167. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  168. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  169. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  170. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  171. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  172. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  173. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  174. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  175. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  176. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  177. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  178. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  179. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  180. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  181. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  182. package/lib/components/login/index.d.ts +1 -0
  183. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  184. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  185. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  186. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  187. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  188. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  189. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  190. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  191. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  192. package/lib/components/schedules/calendar/index.d.ts +1 -0
  193. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  194. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  195. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  196. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  197. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  198. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  199. package/lib/components/schedules/products/list/index.d.ts +1 -0
  200. package/lib/components/schedules/resources/index.d.ts +1 -0
  201. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  202. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  203. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  204. package/lib/components/schedules/schedules/index.d.ts +1 -0
  205. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  206. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  207. package/lib/components/shoppingCart/index.d.ts +1 -0
  208. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  209. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  210. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  211. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  212. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  213. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  214. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  215. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  216. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  217. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  218. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  219. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  220. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  221. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +34 -39
  222. package/package.json +1 -1
@@ -37,6 +37,7 @@ import { editSessionProduct } from "../../../info/utils";
37
37
  import { deleteCacheParams, getProductTotalPrice, getServiceTimes, isSessionProduct } from "../../../utils";
38
38
  import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
39
39
  import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
40
+ import { setProductPrice } from "./utils";
40
41
  import NoteModal from "../../../../../plus/noteModal";
41
42
  import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
42
43
  var submitLock = false;
@@ -240,7 +241,7 @@ var Info = function Info(_, ref) {
240
241
  * @Date: 2024-01-09 14:04
241
242
  */
242
243
  var onFinish = function onFinish(values) {
243
- var _resourcesRef$current, _item$_extend, _state$service$cacheI3, _window$closeBookingE2, _window2;
244
+ var _resourcesRef$current, _item$_extend, _item2, _item$_extend2, _state$service$cacheI3, _window$closeBookingE2, _window2;
244
245
  var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
245
246
  if (isShowTimeAndResource && !isSuccess) {
246
247
  return;
@@ -277,7 +278,11 @@ var Info = function Info(_, ref) {
277
278
  _item._extend = _extend;
278
279
  _item._time = new Date().getTime();
279
280
  _item._serviceKey = genServiceKey(_item);
280
- var _id = _item === null || _item === void 0 ? void 0 : _item._id;
281
+ var _id = (_item2 = _item) === null || _item2 === void 0 ? void 0 : _item2._id;
282
+ _item = setProductPrice(_item, {
283
+ newTotal: values.total,
284
+ origin_total: (_item$_extend2 = _item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.origin_total
285
+ });
281
286
 
282
287
  // 判断是新增还是编辑
283
288
  if (!_list.some(function (d) {
@@ -288,7 +293,12 @@ var Info = function Info(_, ref) {
288
293
  } else {
289
294
  // 手动改价时移除优惠券使用
290
295
  if (isChangeTotal.current) {
296
+ var _item$_extend3;
291
297
  delete _item.discount_list;
298
+ _item = setProductPrice(_item, {
299
+ newTotal: values.total,
300
+ origin_total: (_item$_extend3 = _item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.origin_total
301
+ });
292
302
  }
293
303
  _list = _list.map(function (d) {
294
304
  return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
@@ -483,11 +493,11 @@ var Info = function Info(_, ref) {
483
493
  var isSession = isSessionProduct(item);
484
494
  var sessionValue = {};
485
495
  if (isSession) {
486
- var _item$_extend2, _item$_extend3, _item$_extend4;
496
+ var _item$_extend4, _item$_extend5, _item$_extend6;
487
497
  sessionValue.startEndTime = {
488
- startDate: item === null || item === void 0 || (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.start_date,
489
- endDate: item === null || item === void 0 || (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.end_date,
490
- duration: item === null || item === void 0 || (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.duration
498
+ startDate: item === null || item === void 0 || (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.start_date,
499
+ endDate: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.end_date,
500
+ duration: item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.duration
491
501
  };
492
502
  }
493
503
 
@@ -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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type ContactType = {
3
4
  country_calling_code: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface DurationProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from "antd";
2
3
  interface StartTimeProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  isEdit: boolean;
@@ -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,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos, DeviceStatus } from './const';
2
3
  import './index.less';
3
4
  interface PosProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DeviceProp } from "./const";
2
3
  interface PosProps {
3
4
  eftposName: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ onChange, className, isMobile }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 断网(客户端)提示页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  import './index.less';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 取消签名确认页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PayProps } from './const';
2
3
  import './index.less';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusEnum } from '../const';
2
3
  export declare const POS: ({ api, onChange, }: {
3
4
  api: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './tip.less';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 按钮操作区
3
4
  * @description: 仅包含签名
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ api, onChange, formatAmount, }: {
2
3
  api: any;
3
4
  onChange: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: () => JSX.Element;
3
4
  export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EmptyHolderModal: (props: any) => JSX.Element;
3
4
  export default EmptyHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Event: () => JSX.Element;
3
4
  export default Event;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: () => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Header: () => JSX.Element;
3
4
  export default Header;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Information: () => JSX.Element;
3
4
  export default Information;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const OrderProductModal: (props: any) => JSX.Element;
3
4
  export default OrderProductModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
2
3
  export default RemoveOptionConfirmModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Resource: () => JSX.Element;
3
4
  export default Resource;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectHolderModal: (props: any) => JSX.Element;
2
3
  export default SelectHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingOptions: (props: {
2
3
  onChangeBookingOption?: ((bookingOption: any) => void) | undefined;
3
4
  }) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Resource: (props: any) => JSX.Element;
2
3
  export default Resource;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Schedule: () => JSX.Element;
2
3
  export default Schedule;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type Item = any;
3
4
  interface ProductItemProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ScheduleTimeItem: ({ timeList }: any) => JSX.Element;
3
4
  export default ScheduleTimeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface LoginProps {
3
4
  title: string;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DateSectionCom: ({ value, onChange, showTime, className, style, useSpace, format, itemStyle, }: any) => JSX.Element;
2
3
  export default DateSectionCom;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const GenderField: (props: any) => JSX.Element;
2
3
  export default GenderField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface AddClientProps {
3
4
  onChange: (value: any) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface CustomerListProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const ProductItemPreview: ({ item, onClick, onRemove, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItemPreview;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface valueType {
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SelectResourcesTable: ({ value, onChange }: any) => JSX.Element;
3
4
  export default SelectResourcesTable;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface RuleSettingProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Calendar: () => JSX.Element;
3
4
  export default Calendar;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ScheduleItem } from "../../type";
2
3
  import "./index.less";
3
4
  declare type ScheduleDetailListPropsType = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ButtonProps } from 'antd';
2
3
  import { ScheduleItem } from '../../type';
3
4
  import './index.less';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const MaxParticipantsModule: ({ form, value, onChange, useSchedule, isAutoChange, onData, }: {
3
4
  form: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const ResourcesModule: ({ product }: {
2
3
  product: any;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const ProductDetailDrawer: () => JSX.Element;
3
4
  export default ProductDetailDrawer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type Item = any;
3
4
  interface ProductItemProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface ProductListProps {
3
4
  loading: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Resources: () => JSX.Element;
3
4
  export default Resources;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type ResourcesListProps = {
3
4
  list: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ScheduleItem } from '../../type';
2
3
  import './index.less';
3
4
  declare type AllSchedulesPropsType = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { DrawerProps } from "antd";
2
3
  import { ScheduleItem } from "../../type";
3
4
  import "./index.less";
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SchedulesConnect: () => JSX.Element;
2
3
  export default SchedulesConnect;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useAddService: (id?: number, type?: string) => JSX.Element | null;
2
3
  export default useAddService;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (key?: number | undefined) => JSX.Element | null;
2
3
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { shoppingCartProps } from './type';
2
3
  declare const shoppingCart: ({ onCard, onAction, onChange, onAddProduct, onActiveKey, ...props }: shoppingCartProps) => JSX.Element;
3
4
  export default shoppingCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from '../serve';
2
3
  /**
3
4
  * 钱包卡片Hook的参数
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface LogData {
2
3
  key: string;
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SCOProps } from '../types';
2
3
  import '../index.less';
3
4
  export declare const Header: (props: SCOProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormInstance } from 'antd';
2
3
  import { SRProps } from '../types';
3
4
  import '../index.less';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormInstance } from 'antd';
2
3
  import { SRProps } from '../types';
3
4
  import '../index.less';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SRProps } from '../types';
2
3
  import '../index.less';
3
4
  declare const GoLogin: (props: SRProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SRProps } from '../types';
2
3
  import '../index.less';
3
4
  export declare const Header: (props: SRProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SRStepStatus } from '../types';
2
3
  import '../index.less';
3
4
  declare const VerifyError: (props: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../index.less';
2
3
  declare const VerifyingEmailLink: (props: {
3
4
  onVerifyLink: () => Promise<void>;