@pisell/private-materials 3.3.43 → 3.3.45

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 +5 -5
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +5 -5
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Summary/utils.d.ts +1 -1
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -25
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +31 -16
  14. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Content/index.js +39 -20
  16. package/es/components/appointmentBooking/components/Date/index.js +2 -13
  17. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  18. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Form/index.js +76 -167
  20. package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  21. package/es/components/appointmentBooking/components/Form/utils.js +36 -0
  22. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  23. package/es/components/appointmentBooking/components/Header/index.js +78 -46
  24. package/es/components/appointmentBooking/components/Resource/index.js +92 -115
  25. package/es/components/appointmentBooking/components/Services/index.js +19 -4
  26. package/es/components/appointmentBooking/components/TimeSlicing/index.js +20 -27
  27. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  28. package/es/components/appointmentBooking/context.js +50 -3
  29. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  30. package/es/components/appointmentBooking/hooks.d.ts +1 -2
  31. package/es/components/appointmentBooking/hooks.js +377 -269
  32. package/es/components/appointmentBooking/utils.d.ts +91 -2
  33. package/es/components/appointmentBooking/utils.js +350 -61
  34. package/es/components/booking/components/footer/amount.d.ts +24 -0
  35. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  36. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  37. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  38. package/es/components/booking/info/service/Lists.d.ts +0 -1
  39. package/es/components/booking/info/service/addService/index.d.ts +11 -0
  40. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  41. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  42. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  43. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  44. package/es/components/booking/info/service2/utils.d.ts +244 -0
  45. package/es/components/booking/info/utils.d.ts +50 -0
  46. package/es/components/booking/info2/service/addService/index.d.ts +12 -0
  47. package/es/components/booking/info2/service/editService/index.d.ts +7 -0
  48. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  49. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  50. package/es/components/booking/utils.d.ts +172 -0
  51. package/es/components/eftposPay/amount.d.ts +1 -1
  52. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  53. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  54. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  55. package/es/components/eftposPay/device.d.ts +1 -1
  56. package/es/components/eftposPay/hooks.d.ts +1 -1
  57. package/es/components/eftposPay/index.d.ts +1 -0
  58. package/es/components/eftposPay/pay.d.ts +1 -0
  59. package/es/components/eftposPay/store/index.d.ts +2 -2
  60. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  61. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  63. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  68. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  73. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  78. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  79. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  80. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  81. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  82. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  83. package/es/components/eventBooking/index.d.ts +0 -1
  84. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  85. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  86. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  87. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  88. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  89. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  90. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  91. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  92. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  93. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  94. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  95. package/es/components/productExtension/index.d.ts +0 -1
  96. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  97. package/es/components/productSelect/components/productGroup/index.d.ts +11 -7
  98. package/es/components/productSelect/components/productGroup/index.js +32 -19
  99. package/es/components/productSelect/components/productGroup/index.less +17 -3
  100. package/es/components/productSelect/index.d.ts +3 -2
  101. package/es/components/productSelect/index.js +20 -6
  102. package/es/components/productSelect/index.less +7 -0
  103. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  104. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  105. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  106. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  107. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  108. package/es/components/shoppingCart/index.d.ts +0 -1
  109. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  110. package/es/components/ticketBooking/components/addServiceVariant/addService.js +11 -3
  111. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  112. package/es/components/ticketBooking/utils/index.d.ts +14 -0
  113. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  114. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  115. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  116. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  117. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +0 -5
  118. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  119. package/lib/components/appointmentBooking/components/Cart/Item/index.js +35 -16
  120. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  121. package/lib/components/appointmentBooking/components/Content/index.js +37 -21
  122. package/lib/components/appointmentBooking/components/Date/index.js +0 -6
  123. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  124. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  125. package/lib/components/appointmentBooking/components/Form/index.js +56 -108
  126. package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  127. package/lib/components/appointmentBooking/components/Form/utils.js +49 -0
  128. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  129. package/lib/components/appointmentBooking/components/Header/index.js +49 -19
  130. package/lib/components/appointmentBooking/components/Resource/index.js +51 -69
  131. package/lib/components/appointmentBooking/components/Services/index.js +16 -3
  132. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -7
  133. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  134. package/lib/components/appointmentBooking/context.js +52 -4
  135. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  136. package/lib/components/appointmentBooking/hooks.d.ts +1 -2
  137. package/lib/components/appointmentBooking/hooks.js +153 -57
  138. package/lib/components/appointmentBooking/utils.d.ts +91 -2
  139. package/lib/components/appointmentBooking/utils.js +210 -50
  140. package/lib/components/booking/components/footer/amount.d.ts +24 -0
  141. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  142. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  143. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  144. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  145. package/lib/components/booking/info/service/addService/index.d.ts +11 -0
  146. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  147. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  148. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  149. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  150. package/lib/components/booking/info/service2/utils.d.ts +244 -0
  151. package/lib/components/booking/info/utils.d.ts +50 -0
  152. package/lib/components/booking/info2/service/addService/index.d.ts +12 -0
  153. package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
  154. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  155. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  156. package/lib/components/booking/utils.d.ts +172 -0
  157. package/lib/components/eftposPay/amount.d.ts +1 -1
  158. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  159. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  160. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  161. package/lib/components/eftposPay/device.d.ts +1 -1
  162. package/lib/components/eftposPay/hooks.d.ts +1 -1
  163. package/lib/components/eftposPay/index.d.ts +1 -0
  164. package/lib/components/eftposPay/pay.d.ts +1 -0
  165. package/lib/components/eftposPay/store/index.d.ts +2 -2
  166. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  167. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  168. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  169. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  170. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  171. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  172. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  173. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  174. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  175. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  176. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  177. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  178. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  179. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  180. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  181. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  182. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  183. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  185. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  186. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  187. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  188. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  189. package/lib/components/eventBooking/index.d.ts +0 -1
  190. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  191. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  192. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  193. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  194. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  195. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  196. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  197. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  198. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  199. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  200. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  201. package/lib/components/productExtension/index.d.ts +0 -1
  202. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  203. package/lib/components/productSelect/components/productGroup/index.d.ts +11 -7
  204. package/lib/components/productSelect/components/productGroup/index.js +12 -10
  205. package/lib/components/productSelect/components/productGroup/index.less +17 -3
  206. package/lib/components/productSelect/index.d.ts +3 -2
  207. package/lib/components/productSelect/index.js +17 -3
  208. package/lib/components/productSelect/index.less +7 -0
  209. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  210. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  211. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  212. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  213. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  214. package/lib/components/shoppingCart/index.d.ts +0 -1
  215. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  216. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
  217. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  218. package/lib/components/ticketBooking/utils/index.d.ts +14 -0
  219. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  220. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  221. package/lowcode/product-select/meta.ts +18 -34
  222. package/package.json +4 -4
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
3
2
  export * from './Sales';
4
3
  export default SalesModel;
@@ -25,7 +25,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
25
25
  * @return {*}
26
26
  * @Author: xiangfeng.xue
27
27
  */
28
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
28
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
29
29
  /**
30
30
  * 计算所有价格明细
31
31
  * @param items - 购物车商品数组
@@ -104,41 +104,20 @@ var ContinueButton = function ContinueButton(_ref) {
104
104
  */
105
105
  var handleContinue = /*#__PURE__*/function () {
106
106
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
107
- var loginOk;
108
107
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
109
108
  while (1) switch (_context2.prev = _context2.next) {
110
109
  case 0:
111
110
  _context2.prev = 0;
112
- if (!((currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2 >= (stepList === null || stepList === void 0 ? void 0 : stepList.length))) {
113
- _context2.next = 9;
114
- break;
115
- }
116
- _context2.next = 4;
117
- return handleLoginCheck();
118
- case 4:
119
- loginOk = _context2.sent;
120
- if (loginOk) {
121
- _context2.next = 7;
122
- break;
123
- }
124
- return _context2.abrupt("return");
125
- case 7:
126
- if (!handleCheckAccount()) {
127
- _context2.next = 9;
128
- break;
129
- }
130
- return _context2.abrupt("return");
131
- case 9:
132
111
  return _context2.abrupt("return", onNext && onNext());
133
- case 12:
134
- _context2.prev = 12;
112
+ case 4:
113
+ _context2.prev = 4;
135
114
  _context2.t0 = _context2["catch"](0);
136
115
  console.log(_context2.t0, 'handleContinue_error');
137
- case 15:
116
+ case 7:
138
117
  case "end":
139
118
  return _context2.stop();
140
119
  }
141
- }, _callee2, null, [[0, 12]]);
120
+ }, _callee2, null, [[0, 4]]);
142
121
  }));
143
122
  return function handleContinue() {
144
123
  return _ref4.apply(this, arguments);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
4
3
  export default Total;
@@ -14,7 +14,7 @@ import ContinueButton from "../ContinueButton";
14
14
  import { useAppointmentBooking } from "../../../hooks";
15
15
  import { useAppointmentBookingContext } from "../../../context";
16
16
  import { useAppointmentBookingAccount, useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingLogin, contextUtils } from "../../../hooks";
17
- import { formatHolder, formatCarts, formatCurrentUser, openForm } from "../../../utils";
17
+ import { formatHolder, formatCurrentUser, openForm, getMultiResources, updateCartResources } from "../../../utils";
18
18
  import VoucherCard from "../../Voucher";
19
19
  import Total from "./Total";
20
20
  import Deposit from "../../Deposit";
@@ -27,15 +27,16 @@ var CartItem = function CartItem(_ref) {
27
27
  var _ref2 = useAppointmentBookingContext(),
28
28
  carts = _ref2.carts,
29
29
  currentStep = _ref2.currentStep,
30
- resources = _ref2.resources,
31
30
  setResourceOtherParams = _ref2.setResourceOtherParams,
32
31
  resourceOtherParams = _ref2.resourceOtherParams,
33
32
  summary = _ref2.summary,
34
- isLastStep = _ref2.isLastStep;
33
+ isLastStep = _ref2.isLastStep,
34
+ currentSelectedResources = _ref2.currentSelectedResources,
35
+ currentStepParams = _ref2.currentStepParams,
36
+ isErrorHolder = _ref2.isErrorHolder;
35
37
  var _useAppointmentBookin = useAppointmentBookingAccount(),
36
38
  accountLists = _useAppointmentBookin.accountLists,
37
39
  getHolders = _useAppointmentBookin.getHolders,
38
- form_id = _useAppointmentBookin.form_id,
39
40
  addAccount = _useAppointmentBookin.addAccount;
40
41
  var _useAppointmentBookin2 = useAppointmentBookingResource(),
41
42
  getResourceList = _useAppointmentBookin2.getResourceList;
@@ -108,15 +109,11 @@ var CartItem = function CartItem(_ref) {
108
109
  errorList: null
109
110
  }));
110
111
 
111
- // 清空资源
112
- if (!val) {
113
- appointmentBooking.deleteCartItemInfo('resource', e === null || e === void 0 ? void 0 : e._id);
114
- } else {
115
- appointmentBooking.updateCart({
116
- _id: e === null || e === void 0 ? void 0 : e._id,
117
- resources: val ? [val] : []
118
- });
119
- }
112
+ // 更新资源
113
+ appointmentBooking.updateCart({
114
+ _id: e === null || e === void 0 ? void 0 : e._id,
115
+ resources: updateCartResources(e, val, currentSelectedResources)
116
+ });
120
117
  getResourceList();
121
118
  return;
122
119
  }
@@ -199,8 +196,26 @@ var CartItem = function CartItem(_ref) {
199
196
  }
200
197
  };
201
198
  var products = useMemo(function () {
202
- return formatCarts(carts, resources, utils, accountLists);
203
- }, [carts, resources, accountLists]);
199
+ if (!(carts !== null && carts !== void 0 && carts.length)) return [];
200
+ if ((currentSelectedResources === null || currentSelectedResources === void 0 ? void 0 : currentSelectedResources.length) > 0) {
201
+ var newCarts = carts.map(function (item) {
202
+ var currentResourceData = currentSelectedResources.find(function (resource) {
203
+ return (resource === null || resource === void 0 ? void 0 : resource._id) === (item === null || item === void 0 ? void 0 : item._id);
204
+ });
205
+
206
+ // 可选资源列表
207
+ var multiResources = getMultiResources(item, currentResourceData === null || currentResourceData === void 0 ? void 0 : currentResourceData.currentSelectedResource, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key);
208
+ return _objectSpread(_objectSpread({}, item), {}, {
209
+ isMultipleResource: true,
210
+ multiResources: multiResources,
211
+ isErrorHolder: isErrorHolder || false
212
+ });
213
+ });
214
+ return newCarts;
215
+ } else {
216
+ return carts;
217
+ }
218
+ }, [carts, currentSelectedResources, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key, isErrorHolder]);
204
219
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
205
220
  className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
206
221
  }, /*#__PURE__*/React.createElement("div", {
@@ -211,7 +226,7 @@ var CartItem = function CartItem(_ref) {
211
226
  hideAddBtn: false,
212
227
  holders: holders,
213
228
  disabledEdit: isLastStep,
214
- isShowChangeResource: (currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key) === 'select-resource',
229
+ isShowChangeResource: currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 || (_currentStep$step = _currentStep$step.key) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.startsWith('select-resource'),
215
230
  isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key) === 'select-service',
216
231
  isShowPackageNote: false,
217
232
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
4
3
  export default Cart;
@@ -29,7 +29,6 @@ import "./index.less";
29
29
  var Layout = function Layout() {
30
30
  var _currentStep$step, _currentStep$step3, _currentStep$step4, _currentStep$step6, _currentStep$step8;
31
31
  var stepRef = useRef();
32
- var formRef = useRef();
33
32
  var _ref = useAppointmentBookingContext(),
34
33
  currentStep = _ref.currentStep,
35
34
  setResourceOtherParams = _ref.setResourceOtherParams,
@@ -38,7 +37,9 @@ var Layout = function Layout() {
38
37
  appointmentBooking = _ref.appointmentBooking,
39
38
  setLoading = _ref.setLoading,
40
39
  policyParams = _ref.policyParams,
41
- closePolicy = _ref.closePolicy;
40
+ closePolicy = _ref.closePolicy,
41
+ currentStepParams = _ref.currentStepParams,
42
+ setIsErrorHolder = _ref.setIsErrorHolder;
42
43
  var _useAppointmentBookin = useAppointmentBookingSetting(),
43
44
  isDateSelectedFirst = _useAppointmentBookin.isDateSelectedFirst,
44
45
  isFormSubject = _useAppointmentBookin.isFormSubject,
@@ -48,8 +49,7 @@ var Layout = function Layout() {
48
49
  var _useAppointmentBookin3 = useAppointmentBookingAccount(),
49
50
  getHolders = _useAppointmentBookin3.getHolders;
50
51
  var _useAppointmentBookin4 = useAppointmentBookingStep(),
51
- removeStep = _useAppointmentBookin4.removeStep,
52
- stepList = _useAppointmentBookin4.stepList;
52
+ removeStep = _useAppointmentBookin4.removeStep;
53
53
  var _useShopDiscount = useShopDiscount(),
54
54
  shopDiscount = _useShopDiscount.shopDiscount;
55
55
 
@@ -61,6 +61,7 @@ var Layout = function Layout() {
61
61
  params = _useState2[0],
62
62
  setParams = _useState2[1];
63
63
  useEffect(function () {
64
+ appointmentBooking.removeStep('fill-form');
64
65
  return function () {
65
66
  var _shopDiscount$destroy;
66
67
  setIsAgreeDepositPolicy(false);
@@ -68,6 +69,18 @@ var Layout = function Layout() {
68
69
  shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$destroy = shopDiscount.destroy) === null || _shopDiscount$destroy === void 0 || _shopDiscount$destroy.call(shopDiscount);
69
70
  };
70
71
  }, []);
72
+ useEffect(function () {
73
+ var _currentStepParams$st;
74
+ if ((currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) < 0) return;
75
+ var resourceStepIndex = currentStepParams === null || currentStepParams === void 0 || (_currentStepParams$st = currentStepParams.stepLists) === null || _currentStepParams$st === void 0 ? void 0 : _currentStepParams$st.findIndex(function (item) {
76
+ return item.key === 'select-resource';
77
+ });
78
+
79
+ // 清空当前所选择的资源
80
+ if ((currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) < resourceStepIndex) {
81
+ appointmentBooking.setOtherData('current_selected_resources', null);
82
+ }
83
+ }, [currentStepParams]);
71
84
  useEffect(function () {
72
85
  try {
73
86
  if (!(appointmentBooking !== null && appointmentBooking !== void 0 && appointmentBooking.otherParams) || isRetailTemplate) return;
@@ -96,38 +109,44 @@ var Layout = function Layout() {
96
109
  setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
97
110
  errorList: null
98
111
  }));
112
+ setIsErrorHolder(false);
99
113
  window.scrollTo({
100
114
  top: 0,
101
115
  behavior: 'smooth'
102
116
  });
103
117
  }, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
118
+ var components = {
119
+ // 选择服务
120
+ 'select-service': Services,
121
+ // 添加客户
122
+ 'select-guest': Guest,
123
+ // 选择时间
124
+ 'select-date': Date,
125
+ // 时间切片
126
+ 'select-time': TimeSlicing,
127
+ // 确认信息
128
+ 'confirm-information': ConfirmInformation
129
+ };
104
130
  var Com = useMemo(function () {
105
131
  var _currentStep$step2;
106
132
  var key = currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key;
107
133
  if (!key) return null;
108
- var components = {
109
- // 选择服务
110
- 'select-service': Services,
111
- // 添加客户
112
- 'select-guest': Guest,
113
- // 选择时间
114
- 'select-date': Date,
134
+ var Com;
135
+ if (key.startsWith('select-resource')) {
115
136
  // 选择资源
116
- 'select-resource': Resource,
117
- // 时间切片
118
- 'select-time': TimeSlicing,
137
+ Com = Resource;
138
+ } else if (key.startsWith('fill-form')) {
119
139
  // 填写表单
120
- 'fill-form': Form,
121
- // 确认信息
122
- 'confirm-information': ConfirmInformation
123
- };
124
- var Com = components[key];
140
+ Com = Form;
141
+ } else {
142
+ Com = components[key];
143
+ }
125
144
  return /*#__PURE__*/React.createElement(Com, {
126
145
  onChange: setParams,
127
146
  params: params,
128
147
  ref: stepRef
129
148
  });
130
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key, stepRef]);
149
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key]);
131
150
 
132
151
  /**
133
152
  * @title: 动态计算中间内容区域的高度
@@ -71,7 +71,7 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
71
71
  */
72
72
  var handleNext = /*#__PURE__*/function () {
73
73
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
74
- var data, result;
74
+ var data;
75
75
  return _regeneratorRuntime().wrap(function _callee$(_context) {
76
76
  while (1) switch (_context.prev = _context.next) {
77
77
  case 0:
@@ -85,19 +85,8 @@ var Date = /*#__PURE__*/forwardRef(function (props, ref) {
85
85
  }
86
86
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unselect.date')));
87
87
  case 5:
88
- if (isDateSelectedFirst) {
89
- _context.next = 9;
90
- break;
91
- }
92
- result = appointmentBooking.checkResourceListForDate();
93
- if (result) {
94
- _context.next = 9;
95
- break;
96
- }
97
- return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.date')));
98
- case 9:
99
88
  nextStep();
100
- case 10:
89
+ case 6:
101
90
  case "end":
102
91
  return _context.stop();
103
92
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Deposit: () => JSX.Element;
4
3
  export default Deposit;
@@ -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;
@@ -10,122 +10,69 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useMemo, useRef, useState, useImperativeHandle, forwardRef, useEffect } from 'react';
13
+ import React, { useMemo, useRef, useImperativeHandle, forwardRef } from 'react';
14
14
  import useComponents from "../../../../hooks/useComponents";
15
- import { formatForms, formatCarts, updateLists, updateBookingFormStorage } from "../../utils";
15
+ import { updateBookingFormStorage, currentAppointmentBoard } from "../../utils";
16
16
  import { useAppointmentBookingContext } from "../../context";
17
- import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep, contextUtils } from "../../hooks";
18
- import PolicyModal from "../../deposit/components/PolicyModal";
17
+ import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep, useAppointmentBookingLogin, useAppointmentBookingAccount } from "../../hooks";
18
+ import { updateRelationForms } from "./utils";
19
19
  import "./index.less";
20
20
  var Form = /*#__PURE__*/forwardRef(function (props, ref) {
21
21
  var manualRef = useRef();
22
- var _useState = useState(0),
23
- _useState2 = _slicedToArray(_useState, 2),
24
- currentFormIndex = _useState2[0],
25
- setCurrentFormIndex = _useState2[1];
26
- var _useState3 = useState(false),
27
- _useState4 = _slicedToArray(_useState3, 2),
28
- showAgreement = _useState4[0],
29
- setShowAgreement = _useState4[1];
30
- var _useState5 = useState({}),
31
- _useState6 = _slicedToArray(_useState5, 2),
32
- agreementContent = _useState6[0],
33
- setAgreementContent = _useState6[1];
34
- var _useState7 = useState([]),
35
- _useState8 = _slicedToArray(_useState7, 2),
36
- formStatus = _useState8[0],
37
- setFormStatus = _useState8[1];
38
- var _useState9 = useState(false),
39
- _useState10 = _slicedToArray(_useState9, 2),
40
- isClearData = _useState10[0],
41
- setIsClearData = _useState10[1];
42
- var _useState11 = useState(0),
43
- _useState12 = _slicedToArray(_useState11, 2),
44
- formId = _useState12[0],
45
- setFormId = _useState12[1];
46
- var _useAppointmentBookin = useAppointmentBookingContext(),
47
- carts = _useAppointmentBookin.carts,
48
- appointmentBooking = _useAppointmentBookin.appointmentBooking,
49
- setLoading = _useAppointmentBookin.setLoading;
50
- var _useAppointmentBookin2 = useAppointmentBookingResource(),
51
- getResourceList = _useAppointmentBookin2.getResourceList;
52
- var _useAppointmentBookin3 = useAppointmentBookingSetting(),
53
- setOtherData = _useAppointmentBookin3.setOtherData,
54
- getOtherData = _useAppointmentBookin3.getOtherData;
55
- var _useAppointmentBookin4 = useAppointmentBookingStep(),
56
- nextStep = _useAppointmentBookin4.nextStep;
57
- var utils = contextUtils();
22
+ var _ref = useAppointmentBookingContext(),
23
+ appointmentBooking = _ref.appointmentBooking,
24
+ setLoading = _ref.setLoading,
25
+ currentStepParams = _ref.currentStepParams,
26
+ carts = _ref.carts;
27
+ var _useAppointmentBookin = useAppointmentBookingResource(),
28
+ getResourceList = _useAppointmentBookin.getResourceList;
29
+ var _useAppointmentBookin2 = useAppointmentBookingSetting(),
30
+ setOtherData = _useAppointmentBookin2.setOtherData,
31
+ getOtherData = _useAppointmentBookin2.getOtherData,
32
+ isFormSubject = _useAppointmentBookin2.isFormSubject;
33
+ var _useAppointmentBookin3 = useAppointmentBookingStep(),
34
+ nextStep = _useAppointmentBookin3.nextStep;
35
+ var _useAppointmentBookin4 = useAppointmentBookingLogin(),
36
+ isLogin = _useAppointmentBookin4.isLogin;
37
+ var _useAppointmentBookin5 = useAppointmentBookingAccount(),
38
+ checkAccount = _useAppointmentBookin5.checkAccount;
58
39
  useImperativeHandle(ref, function () {
59
40
  return {
60
41
  next: function next() {
61
- var _manualRef$current, _manualRef$current$su;
42
+ var _stepLists, _manualRef$current, _manualRef$current$su;
43
+ var stepLists = (currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.stepLists) || [];
44
+ var nextStepKey = (_stepLists = stepLists[(currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) + 1]) === null || _stepLists === void 0 ? void 0 : _stepLists.key;
45
+ // 如果下一步是确认页,则验证数据,有错误或者没有登录则不进行表单的提交
46
+
47
+ // if (nextStepKey === 'confirm-information') {
48
+ // const { hasError } = checkAndGoNext(isFormSubject, checkAccount, carts);
49
+ // if (hasError || !isLogin) {
50
+ // return nextStep(formStatus);
51
+ // }
52
+ // }
53
+
62
54
  setLoading(true);
63
55
  (_manualRef$current = manualRef.current) === null || _manualRef$current === void 0 || (_manualRef$current$su = _manualRef$current.submit) === null || _manualRef$current$su === void 0 || _manualRef$current$su.call(_manualRef$current);
64
56
  }
65
57
  };
66
58
  });
67
- var key = 'booking_form';
68
-
69
- // 获取本地存储
70
- var formStorage = getOtherData('booking_form') || {};
71
-
72
- /**
73
- * @title: 获取资源列表
74
- * @description:
75
- * @param {*} useMemo
76
- * @return {*}
77
- * @Author: WangHan
78
- * @Date: 2025-05-06 10:00
79
- */
80
- var resources = useMemo(function () {
81
- var _resource = getResourceList();
82
- return (_resource === null || _resource === void 0 ? void 0 : _resource.resources) || [];
83
- }, []);
84
- var forms = useMemo(function () {
85
- var newCarts = formatCarts(carts, resources, utils);
86
- if (!(newCarts !== null && newCarts !== void 0 && newCarts.length) || !(resources !== null && resources !== void 0 && resources.length)) return [];
87
- return formatForms(newCarts) || [];
88
- }, [carts, resources]);
89
- useEffect(function () {
90
- var _forms$currentFormInd;
91
- if (!(forms !== null && forms !== void 0 && forms.length)) return;
92
- setFormId((forms === null || forms === void 0 || (_forms$currentFormInd = forms[currentFormIndex]) === null || _forms$currentFormInd === void 0 ? void 0 : _forms$currentFormInd.form_id) || 0);
93
- }, [forms, currentFormIndex]);
94
59
  var _useComponents = useComponents({
95
60
  components: ['FormCard']
96
61
  }),
97
62
  _useComponents2 = _slicedToArray(_useComponents, 1),
98
63
  FormCard = _useComponents2[0];
64
+ var key = 'booking_form';
99
65
 
100
- /**
101
- * @title: 获取下一个表单
102
- * @description:
103
- * @return {*}
104
- * @Author: WangHan
105
- * @Date: 2025-04-26 11:04
106
- */
107
- var goToNextForm = function goToNextForm() {
108
- var nextIndex = currentFormIndex + 1;
109
- if (nextIndex < forms.length) {
110
- var _forms$nextIndex, _forms$nextIndex2;
111
- setIsClearData(true);
112
- setCurrentFormIndex(nextIndex);
113
-
114
- // 如果下一个表单没有id但有协议,直接弹协议
115
- if (!(forms !== null && forms !== void 0 && (_forms$nextIndex = forms[nextIndex]) !== null && _forms$nextIndex !== void 0 && _forms$nextIndex.form_id) && forms !== null && forms !== void 0 && (_forms$nextIndex2 = forms[nextIndex]) !== null && _forms$nextIndex2 !== void 0 && _forms$nextIndex2.policy_id) {
116
- var _forms$nextIndex3;
117
- setLoading(true);
118
- setAgreementContent({
119
- id: forms === null || forms === void 0 || (_forms$nextIndex3 = forms[nextIndex]) === null || _forms$nextIndex3 === void 0 ? void 0 : _forms$nextIndex3.policy_id
120
- });
121
- setShowAgreement(true);
122
- } else {
123
- setLoading(false);
124
- }
125
- } else {
126
- nextStep();
127
- }
128
- };
66
+ // 获取本地存储
67
+ var formStorage = getOtherData('booking_form') || {};
68
+ var appointmentBoard = useMemo(function () {
69
+ var _getResourceList = getResourceList(),
70
+ resources = _getResourceList.resources;
71
+ return currentAppointmentBoard(currentStepParams.key, resources, appointmentBooking);
72
+ }, [currentStepParams.key]);
73
+ var formId = useMemo(function () {
74
+ return (appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.resource_form_id) || 0;
75
+ }, [appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.resource_form_id]);
129
76
 
130
77
  /**
131
78
  * @title: 更新表单状态
@@ -139,10 +86,6 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
139
86
  if (status === 'error') {
140
87
  setLoading(false);
141
88
  }
142
- var newFormStatus = updateLists(formStatus, 'id', formId, {
143
- status: status
144
- });
145
- setFormStatus(newFormStatus);
146
89
  };
147
90
 
148
91
  /**
@@ -154,19 +97,14 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
154
97
  * @Date: 2025-04-28 11:32
155
98
  */
156
99
  var setFormStorage = function setFormStorage(values) {
157
- var _forms$currentFormInd2;
158
- var cart_id = forms === null || forms === void 0 || (_forms$currentFormInd2 = forms[currentFormIndex]) === null || _forms$currentFormInd2 === void 0 ? void 0 : _forms$currentFormInd2.cart_id;
159
100
  var oldData = getOtherData(key);
160
- var newData = updateBookingFormStorage(oldData, cart_id, values);
101
+ var newData = updateBookingFormStorage(oldData, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key, values);
161
102
  setOtherData(key, _objectSpread({}, newData));
162
103
 
163
104
  // 更新表单购物车
164
105
  appointmentBooking.updateCart({
165
- _id: cart_id,
166
- relationForms: [{
167
- form_id: formId,
168
- form_record_ids: [values === null || values === void 0 ? void 0 : values.form_record_id]
169
- }]
106
+ _id: appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.cart_id,
107
+ relationForms: updateRelationForms(carts, appointmentBoard, values)
170
108
  });
171
109
  };
172
110
 
@@ -180,69 +118,40 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
180
118
  * @Date: 2025-04-28 11:34
181
119
  */
182
120
  var handleFormFinish = function handleFormFinish(status, values) {
183
- setIsClearData(false);
184
- updateFormStatus(status);
185
- if (status === 'success') {
186
- var _forms$currentFormInd3;
187
- setFormStorage(values);
188
-
189
- // 判断当前表单是否有协议
190
- if (forms !== null && forms !== void 0 && (_forms$currentFormInd3 = forms[currentFormIndex]) !== null && _forms$currentFormInd3 !== void 0 && _forms$currentFormInd3.policy_id) {
191
- var _forms$currentFormInd4;
192
- setAgreementContent({
193
- id: forms === null || forms === void 0 || (_forms$currentFormInd4 = forms[currentFormIndex]) === null || _forms$currentFormInd4 === void 0 ? void 0 : _forms$currentFormInd4.policy_id
194
- });
195
- setShowAgreement(true);
196
- } else {
197
- goToNextForm();
121
+ try {
122
+ updateFormStatus(status);
123
+ if (status === 'success') {
124
+ setFormStorage(values);
125
+ nextStep();
198
126
  }
127
+ } catch (error) {
128
+ setLoading(false);
199
129
  }
200
130
  };
201
- var handleAgreementOk = function handleAgreementOk() {
202
- setShowAgreement(false);
203
- goToNextForm();
204
- };
205
- var formCom = useMemo(function () {
206
- var _forms$currentFormInd5;
207
- if (!formId) return;
208
- return /*#__PURE__*/React.createElement("div", {
209
- className: "appointment-form-wrap"
210
- }, /*#__PURE__*/React.createElement(FormCard, {
211
- id: formId,
212
- ref: manualRef,
213
- isGetLastData: false,
214
- setting: {
215
- isHidden: 1
216
- },
217
- formWrapStyle: {
218
- padding: '16px'
219
- },
220
- isV2API: true,
221
- isShowSkeleton: true,
222
- onSubmit: function onSubmit(status, values) {
223
- handleFormFinish(status, values);
224
- },
225
- onFinishFailed: function onFinishFailed(e) {
226
- updateFormStatus('error');
227
- },
228
- onFormValueChange: function onFormValueChange(values) {},
229
- defaultValues: (formStorage === null || formStorage === void 0 ? void 0 : formStorage[forms === null || forms === void 0 || (_forms$currentFormInd5 = forms[currentFormIndex]) === null || _forms$currentFormInd5 === void 0 ? void 0 : _forms$currentFormInd5.cart_id]) || {},
230
- isClearData: false
231
- }));
232
- }, [currentFormIndex, formId]);
233
- return /*#__PURE__*/React.createElement(React.Fragment, null, formCom, showAgreement ? /*#__PURE__*/React.createElement(PolicyModal, {
234
- open: showAgreement,
235
- onCancel: function onCancel() {
236
- return setShowAgreement(false);
131
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
132
+ className: "appointment-form-wrap",
133
+ key: currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key
134
+ }, /*#__PURE__*/React.createElement(FormCard, {
135
+ id: formId,
136
+ ref: manualRef,
137
+ isGetLastData: false,
138
+ setting: {
139
+ isHidden: 1
140
+ },
141
+ formWrapStyle: {
142
+ padding: '16px'
237
143
  },
238
- onConfirm: function onConfirm() {
239
- return handleAgreementOk();
144
+ isV2API: true,
145
+ isShowSkeleton: true,
146
+ onSubmit: function onSubmit(status, values) {
147
+ handleFormFinish(status, values);
240
148
  },
241
- item: agreementContent,
242
- onChange: function onChange() {
243
- return setLoading(false);
149
+ onFinishFailed: function onFinishFailed(e) {
150
+ updateFormStatus('error');
244
151
  },
245
- isHideCheckout: false
246
- }) : null);
152
+ onFormValueChange: function onFormValueChange(values) {},
153
+ defaultValues: (formStorage === null || formStorage === void 0 ? void 0 : formStorage[currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key]) || {},
154
+ isClearData: false
155
+ })));
247
156
  });
248
157
  export default Form;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @title: 更新表单数据
3
+ * @description:
4
+ * @return {*}
5
+ * @Author: WangHan
6
+ * @Date: 2025-05-26 16:58
7
+ */
8
+ export declare const updateRelationForms: (carts: any[], currentCart: any, values: any) => any;