@pisell/private-materials 6.4.81 → 6.4.83

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 (168) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +164 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  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/booking/addons/model.d.ts +1 -10
  14. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  15. package/es/components/booking/components/footer/index.js +15 -3
  16. package/es/components/booking/components/footer/utils.js +55 -37
  17. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  18. package/es/components/booking/forms/model.d.ts +1 -10
  19. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  20. package/es/components/booking/forms/table/index.d.ts +0 -1
  21. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  22. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  23. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  24. package/es/components/booking/info/model.d.ts +1 -10
  25. package/es/components/booking/info/service/like/index.d.ts +0 -1
  26. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  27. package/es/components/booking/model.d.ts +1 -9
  28. package/es/components/booking/notes/model.d.ts +1 -10
  29. package/es/components/booking/payments/model.d.ts +1 -10
  30. package/es/components/checkout/PaymentModal.d.ts +13 -5
  31. package/es/components/checkout/PaymentModal.js +93 -149
  32. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  33. package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
  34. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  35. package/es/components/checkout/plugin.d.ts +2 -0
  36. package/es/components/checkout/plugin.js +303 -0
  37. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  38. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  39. package/es/components/eftpos/form/index.d.ts +0 -1
  40. package/es/components/eftpos/group/index.d.ts +0 -1
  41. package/es/components/eftpos/hooks.d.ts +0 -1
  42. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  43. package/es/components/eftpos/icon/device.d.ts +0 -1
  44. package/es/components/eftpos/receipt/index.d.ts +0 -1
  45. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  46. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  47. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  48. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  49. package/es/components/eftposPay/store/index.d.ts +2 -2
  50. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  51. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  52. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  53. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  54. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  55. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  56. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  57. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  58. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  59. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  60. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  61. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  62. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  63. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  64. package/es/components/pay/toC/model.d.ts +1 -9
  65. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  66. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  67. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  68. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  69. package/es/components/schedules/model.d.ts +1 -9
  70. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  71. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  72. package/es/components/schedules/products/index.d.ts +0 -1
  73. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  74. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  75. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  76. package/es/components/wallet/Detail/model.d.ts +1 -13
  77. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  78. package/es/components/wallet/PointCard/model.d.ts +1 -13
  79. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  80. package/es/components/wallet/Voucher/model.d.ts +1 -13
  81. package/es/components/wallet/model.d.ts +1 -9
  82. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  83. package/es/index.d.ts +1 -0
  84. package/es/index.js +2 -1
  85. package/es/plus/clientName/index.d.ts +0 -1
  86. package/es/pro/pisellPaymentList/example.d.ts +0 -1
  87. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  88. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  89. package/lib/components/booking/addons/model.d.ts +1 -10
  90. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  91. package/lib/components/booking/components/footer/index.js +15 -3
  92. package/lib/components/booking/components/footer/utils.js +18 -1
  93. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  94. package/lib/components/booking/forms/model.d.ts +1 -10
  95. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  96. package/lib/components/booking/forms/table/index.d.ts +0 -1
  97. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  98. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  99. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  100. package/lib/components/booking/info/model.d.ts +1 -10
  101. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  102. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  103. package/lib/components/booking/model.d.ts +1 -9
  104. package/lib/components/booking/notes/model.d.ts +1 -10
  105. package/lib/components/booking/payments/model.d.ts +1 -10
  106. package/lib/components/checkout/PaymentModal.d.ts +13 -5
  107. package/lib/components/checkout/PaymentModal.js +92 -139
  108. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  109. package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
  110. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  111. package/lib/components/checkout/plugin.d.ts +2 -0
  112. package/lib/components/checkout/plugin.js +263 -0
  113. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  114. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  115. package/lib/components/eftpos/form/index.d.ts +0 -1
  116. package/lib/components/eftpos/group/index.d.ts +0 -1
  117. package/lib/components/eftpos/hooks.d.ts +0 -1
  118. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  119. package/lib/components/eftpos/icon/device.d.ts +0 -1
  120. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  121. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  122. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  123. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  124. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  125. package/lib/components/eftposPay/store/index.d.ts +2 -2
  126. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  127. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  128. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  129. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  130. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  131. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  132. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  133. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  134. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  135. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  136. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  137. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  138. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  139. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  140. package/lib/components/pay/toC/model.d.ts +1 -9
  141. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  142. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  143. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  144. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  145. package/lib/components/schedules/model.d.ts +1 -9
  146. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  147. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  148. package/lib/components/schedules/products/index.d.ts +0 -1
  149. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  150. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  151. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  152. package/lib/components/wallet/Detail/model.d.ts +1 -13
  153. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  154. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  155. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  156. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  157. package/lib/components/wallet/model.d.ts +1 -9
  158. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  159. package/lib/index.d.ts +1 -0
  160. package/lib/index.js +3 -0
  161. package/lib/plus/clientName/index.d.ts +0 -1
  162. package/lib/pro/pisellPaymentList/example.d.ts +0 -1
  163. package/lowcode/payment-modal/meta.ts +135 -0
  164. package/package.json +3 -3
  165. package/es/components/checkout/PaymentPlugin.d.ts +0 -2
  166. package/es/components/checkout/PaymentPlugin.js +0 -199
  167. package/lib/components/checkout/PaymentPlugin.d.ts +0 -2
  168. package/lib/components/checkout/PaymentPlugin.js +0 -181
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -57,7 +57,7 @@ import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/use
57
57
  * @Date: 2024-01-30 16:51
58
58
  */
59
59
  var Footer = function Footer(props) {
60
- var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4;
60
+ var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4, _state$bookingConfig7, _state$client3;
61
61
  var state = props.state,
62
62
  buttons = props.buttons,
63
63
  dispatch = props.dispatch,
@@ -1941,8 +1941,20 @@ var Footer = function Footer(props) {
1941
1941
  data: paymentModalData,
1942
1942
  callback: paymentCallback || undefined,
1943
1943
  setEditCartMode: setEditCartMode,
1944
- state: state,
1945
- dispatch: dispatch,
1944
+ paymentResultDisplayMode: state === null || state === void 0 || (_state$bookingConfig7 = state.bookingConfig) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.config) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.payment_setting) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.payment_result_display_mode,
1945
+ shopDiscount: state.shop_discount,
1946
+ client: (_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.value,
1947
+ currentTotalPrice: total.productAmount,
1948
+ onChangeShopDiscount: function onChangeShopDiscount(discount) {
1949
+ dispatch({
1950
+ type: 'setState',
1951
+ payload: {
1952
+ shop_discount: discount
1953
+ }
1954
+ });
1955
+ },
1956
+ onChangeOrderNote: handleNoteConfirm,
1957
+ onDeleteOrderNote: handleNoteDelete,
1946
1958
  onClose: function onClose(reset) {
1947
1959
  // console.log('🔄 Footer: Closing PaymentModal');
1948
1960
  setIsPaymentModalOpen(false);
@@ -152,6 +152,11 @@ export var getBundleDiscountList = function getBundleDiscountList(bundle) {
152
152
  var discountList = [];
153
153
  bundle.forEach(function (d) {
154
154
  if (d.discount_list && isArr(d.discount_list)) {
155
+ d.discount_list.forEach(function (item) {
156
+ if (item !== null && item !== void 0 && item.id) {
157
+ item.order_discount_id = item.id;
158
+ }
159
+ });
155
160
  discountList.push.apply(discountList, _toConsumableArray(d.discount_list.filter(function (item) {
156
161
  return !item.id;
157
162
  })));
@@ -341,7 +346,7 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
341
346
  return metadata;
342
347
  };
343
348
  var formatProductMetadata = function formatProductMetadata(item) {
344
- var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23;
349
+ var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23, _item$_extend25;
345
350
  var metadata = {};
346
351
 
347
352
  // 主商品+非原价(加减价)子商品附加费
@@ -367,6 +372,10 @@ var formatProductMetadata = function formatProductMetadata(item) {
367
372
  var _item$_extend24;
368
373
  metadata.relation_surcharge_ids = (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.relation_surcharge_ids;
369
374
  }
375
+ if ((_item$_extend25 = item._extend) !== null && _item$_extend25 !== void 0 && _item$_extend25.unique_identification_number) {
376
+ var _item$_extend26;
377
+ metadata.unique_identification_number = (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.unique_identification_number;
378
+ }
370
379
  return metadata;
371
380
  };
372
381
 
@@ -386,9 +395,9 @@ var formatProductMetadata = function formatProductMetadata(item) {
386
395
 
387
396
  // 获取商品价格 包含组合规格
388
397
  export var getSourceProductPrice = function getSourceProductPrice(item) {
389
- var _item$_extend25, _item$_extend26, _item$variant2;
390
- var other = (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.other;
391
- var price = Number((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.price);
398
+ var _item$_extend27, _item$_extend28, _item$variant2;
399
+ var other = (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.other;
400
+ var price = Number((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.price);
392
401
 
393
402
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
394
403
  if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
@@ -404,8 +413,8 @@ export var getSourceProductPrice = function getSourceProductPrice(item) {
404
413
 
405
414
  // 获取主商品价格 要增加option
406
415
  export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
407
- var _item$_extend27, _item$_extend$other, _item$_extend$other2, _item$_extend28;
408
- if (!isNumber((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.main_product_selling_price)) {
416
+ var _item$_extend29, _item$_extend$other, _item$_extend$other2, _item$_extend30;
417
+ if (!isNumber((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.main_product_selling_price)) {
409
418
  return undefined;
410
419
  }
411
420
  var optionPrice = new Decimal(0);
@@ -418,7 +427,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
418
427
  return accumulator.add(currentPrice.mul(currentNum));
419
428
  }, optionPrice);
420
429
  }
421
- return new Decimal((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.main_product_selling_price).add(optionPrice).toNumber();
430
+ return new Decimal((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.main_product_selling_price).add(optionPrice).toNumber();
422
431
  };
423
432
 
424
433
  /**
@@ -430,11 +439,18 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
430
439
  * @Date: 2024-12-07 14:21
431
440
  */
432
441
  var formatProducts = function formatProducts(item, quantity) {
433
- var _item$_extend29, _getMainProductSellin, _item$_extend30, _item$_extend31, _item$_extend32, _item$_extend33;
442
+ var _item$_extend31, _getMainProductSellin, _item$_extend32, _item$_extend33, _item$_extend34, _item$_extend35;
443
+ if (item !== null && item !== void 0 && item.discount_list) {
444
+ item === null || item === void 0 || item.discount_list.forEach(function (d) {
445
+ if (d !== null && d !== void 0 && d.id) {
446
+ d.order_discount_id = d.id;
447
+ }
448
+ });
449
+ }
434
450
  var total = Number(item._extend.total);
435
451
  var origin_total = Number(item._extend.origin_total);
436
452
  var discount_amount = origin_total - total;
437
- var bundleDiscountList = getBundleDiscountList(((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 || (_item$_extend29 = _item$_extend29.other) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.bundle) || []);
453
+ var bundleDiscountList = getBundleDiscountList(((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 || (_item$_extend31 = _item$_extend31.other) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.bundle) || []);
438
454
  var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
439
455
  discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
440
456
 
@@ -463,15 +479,15 @@ var formatProducts = function formatProducts(item, quantity) {
463
479
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
464
480
  "product_discount_reason": item._extend.discount_reason || '',
465
481
  "is_charge_tax": item.is_charge_tax,
466
- "note": ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.note) || '',
482
+ "note": ((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.note) || '',
467
483
  "discountway": item._extend.discountway || "num",
468
484
  "discount_per": item._extend.discount_per,
469
485
  "discount_type": item._extend.discount_type || discount_type,
470
486
  "order_detail_id": item._extend.order_detail_id || 0,
471
- "product_bundle": formatProductBundle((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 || (_item$_extend31 = _item$_extend31.other) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.bundle),
487
+ "product_bundle": formatProductBundle((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 || (_item$_extend33 = _item$_extend33.other) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.bundle),
472
488
  "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
473
- "product_option_item": formatProductOption((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 || (_item$_extend32 = _item$_extend32.other) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.option),
474
- "product_variant_id": ((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 || (_item$_extend33 = _item$_extend33.other) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.product_variant_id) || 0,
489
+ "product_option_item": formatProductOption((_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 || (_item$_extend34 = _item$_extend34.other) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.option),
490
+ "product_variant_id": ((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 || (_item$_extend35 = _item$_extend35.other) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.product_variant_id) || 0,
475
491
  "discount_list": notManualDiscount,
476
492
  metadata: formatProductMetadata(item),
477
493
  // checkout 需求新增字段
@@ -496,8 +512,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
496
512
 
497
513
  // 过滤出卡片中的普通商品
498
514
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
499
- var _item$_extend34;
500
- var holderId = (_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.holder_id;
515
+ var _item$_extend36;
516
+ var holderId = (_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.holder_id;
501
517
  var bookingHolderId = booking_item._extend.holder_id;
502
518
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
503
519
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -523,15 +539,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
523
539
 
524
540
  // 找出预约商品
525
541
  list = list.filter(function (item) {
526
- var _item$_extend35;
527
- return ((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.holder_id) && !isNormalProductByDurationSchedule(item);
542
+ var _item$_extend37;
543
+ return ((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.holder_id) && !isNormalProductByDurationSchedule(item);
528
544
  });
529
545
 
530
546
  // 对预约商品列表根据holder_id进行分组
531
547
  var groupMap = new Map();
532
548
  list.forEach(function (item) {
533
- var _item$_extend36;
534
- var key = (_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.holder_id; // 分组键
549
+ var _item$_extend38;
550
+ var key = (_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.holder_id; // 分组键
535
551
  if (!groupMap.has(key)) {
536
552
  groupMap.set(key, []);
537
553
  }
@@ -593,7 +609,7 @@ var formatBookings = function formatBookings(data, values) {
593
609
  var bookings = [];
594
610
  var obj = {};
595
611
  list.forEach(function (item) {
596
- var _item$_extend41, _item$_extend42;
612
+ var _item$_extend43, _item$_extend44;
597
613
  // 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
598
614
  if (item.isCustomItem) {
599
615
  bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
@@ -614,9 +630,9 @@ var formatBookings = function formatBookings(data, values) {
614
630
 
615
631
  // 跨日预约下的普通商品
616
632
  if (isDay) {
617
- var _item$_extend37, _item$_extend38, _item$_extend39, _item$_extend40;
618
- var startDate = ((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.startDate) || ((_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.start_date);
619
- var endDate = ((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.endDate) || ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.end_date);
633
+ var _item$_extend39, _item$_extend40, _item$_extend41, _item$_extend42;
634
+ var startDate = ((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.startDate) || ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.start_date);
635
+ var endDate = ((_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.endDate) || ((_item$_extend42 = item._extend) === null || _item$_extend42 === void 0 ? void 0 : _item$_extend42.end_date);
620
636
  var _formatDayTime = formatDayTime({
621
637
  startDate: startDate,
622
638
  endDate: endDate
@@ -642,12 +658,14 @@ var formatBookings = function formatBookings(data, values) {
642
658
  // 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
643
659
  // 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
644
660
  // 后续出现不需要设置 metadata.multiDayPrices. 节省体积
645
- var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.groupId];
646
- if (!((_item$_extend42 = item._extend) !== null && _item$_extend42 !== void 0 && _item$_extend42.unique_identification_number)) {
661
+ var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.groupId];
662
+ if (!((_item$_extend44 = item._extend) !== null && _item$_extend44 !== void 0 && _item$_extend44.unique_identification_number)) {
647
663
  var unique_identification_number = getUniqueId();
648
664
  item._extend.unique_identification_number = unique_identification_number;
649
665
  }
666
+ debugger;
650
667
  var booking = _objectSpread(_objectSpread({
668
+ schedule_event_id: item === null || item === void 0 ? void 0 : item.booking_id,
651
669
  product: formatProducts(item),
652
670
  relation_products: formatRelationDetails(item._extend.relation_details),
653
671
  id: item.booking_id || 0,
@@ -720,16 +738,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
720
738
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
721
739
  // open items 下的商品
722
740
  list = list.filter(function (item) {
723
- var _item$_extend43;
741
+ var _item$_extend45;
724
742
  return (
725
743
  // 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
726
- type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.holder_id) && appointmentTypes.includes(item.extension_type)
744
+ type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend45 = item._extend) === null || _item$_extend45 === void 0 ? void 0 : _item$_extend45.holder_id) && appointmentTypes.includes(item.extension_type)
727
745
  );
728
746
  });
729
747
  var relationProducts = [];
730
748
  relationProducts = list.map(function (item) {
731
- var _item$_extend44;
732
- if (!((_item$_extend44 = item._extend) !== null && _item$_extend44 !== void 0 && _item$_extend44.unique_identification_number)) {
749
+ var _item$_extend46;
750
+ if (!((_item$_extend46 = item._extend) !== null && _item$_extend46 !== void 0 && _item$_extend46.unique_identification_number)) {
733
751
  var unique_identification_number = getUniqueId();
734
752
  item._extend.unique_identification_number = unique_identification_number;
735
753
  }
@@ -748,8 +766,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
748
766
  });
749
767
  var relationProducts = [];
750
768
  relationProducts = list.map(function (item) {
751
- var _item$_extend45;
752
- if (!((_item$_extend45 = item._extend) !== null && _item$_extend45 !== void 0 && _item$_extend45.unique_identification_number)) {
769
+ var _item$_extend47;
770
+ if (!((_item$_extend47 = item._extend) !== null && _item$_extend47 !== void 0 && _item$_extend47.unique_identification_number)) {
753
771
  var unique_identification_number = getUniqueId();
754
772
  item._extend.unique_identification_number = unique_identification_number;
755
773
  }
@@ -870,21 +888,21 @@ export var checkHolderIsError = function checkHolderIsError(state) {
870
888
  var _state$client;
871
889
  var errorRowKey = '';
872
890
  var holderError = state.service.value.some(function (item) {
873
- var _item$_extend47;
891
+ var _item$_extend49;
874
892
  // 普通商品不需要检测holder
875
893
  if (isNormalProductByDurationSchedule(item)) {
876
894
  return false;
877
895
  }
878
896
  if (item._extend.quantity === 1 && !item._extend.holder_id) {
879
- var _item$_extend46;
880
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend46 = item._extend) === null || _item$_extend46 === void 0 || (_item$_extend46 = _item$_extend46.other) === null || _item$_extend46 === void 0 ? void 0 : _item$_extend46.rowKey);
881
- return true;
882
- }
883
- if (item._extend.quantity > 1 && ((_item$_extend47 = item._extend) === null || _item$_extend47 === void 0 || (_item$_extend47 = _item$_extend47.holder_id) === null || _item$_extend47 === void 0 ? void 0 : _item$_extend47.length) !== item._extend.quantity) {
884
897
  var _item$_extend48;
885
898
  errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend48 = item._extend) === null || _item$_extend48 === void 0 || (_item$_extend48 = _item$_extend48.other) === null || _item$_extend48 === void 0 ? void 0 : _item$_extend48.rowKey);
886
899
  return true;
887
900
  }
901
+ if (item._extend.quantity > 1 && ((_item$_extend49 = item._extend) === null || _item$_extend49 === void 0 || (_item$_extend49 = _item$_extend49.holder_id) === null || _item$_extend49 === void 0 ? void 0 : _item$_extend49.length) !== item._extend.quantity) {
902
+ var _item$_extend50;
903
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend50 = item._extend) === null || _item$_extend50 === void 0 || (_item$_extend50 = _item$_extend50.other) === null || _item$_extend50 === void 0 ? void 0 : _item$_extend50.rowKey);
904
+ return true;
905
+ }
888
906
  return false;
889
907
  });
890
908
  var clientId = (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
7
+ handleOk: (values: SendModalValues) => Promise<any>;
8
8
  };
9
9
  export default useSendModal;
@@ -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;
@@ -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 { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -110,11 +109,4 @@ export declare const walkInData: {
110
109
  id: number;
111
110
  nickname: string;
112
111
  };
113
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
- state: FormState;
115
- } & {
116
- dispatch: (params: {
117
- type: string;
118
- payload: any;
119
- }) => void;
120
- }>;
112
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -15,16 +15,24 @@ interface PaymentModalProps {
15
15
  data?: PaymentModalData;
16
16
  callback?: (result: any) => void;
17
17
  onClose?: (reset?: boolean) => void;
18
- dispatch?: (action: {
19
- type: string;
20
- payload?: any;
21
- }) => void;
22
- state?: any;
18
+ paymentResultDisplayMode?: string;
19
+ shopDiscount?: number;
20
+ client?: any;
21
+ currentTotalPrice?: number;
22
+ config?: any;
23
+ onChangeShopDiscount?: (discount: string) => void;
24
+ onChangeOrderNote?: (note: string) => void;
25
+ onDeleteOrderNote?: () => void;
23
26
  }
24
27
  interface PaymentModalMainProps extends PaymentModalProps {
25
28
  onClose?: (reset?: boolean) => void;
26
29
  setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
27
30
  editOrderId?: number;
31
+ config?: {
32
+ showHeaderCenter?: boolean;
33
+ showHeaderRightButton?: boolean;
34
+ disabledSwitchClient?: boolean;
35
+ };
28
36
  }
29
37
  declare const PaymentModal: React.FC<PaymentModalMainProps>;
30
38
  export type { PaymentModalData, PaymentModalProps };