@pisell/private-materials 3.3.34 → 3.3.36

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 (148) 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 +3 -3
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +5 -5
  9. package/es/components/Sales/Cart/index.js +26 -13
  10. package/es/components/Sales/Cart/types.d.ts +12 -0
  11. package/es/components/Sales/Cart/utils.d.ts +23 -0
  12. package/es/components/Sales/Cart/utils.js +161 -0
  13. package/es/components/Sales/Checkout/utils.d.ts +9 -1
  14. package/es/components/Sales/Checkout/utils.js +25 -3
  15. package/es/components/Sales/Event/Detail.d.ts +2 -0
  16. package/es/components/Sales/Event/Detail.js +56 -13
  17. package/es/components/Sales/Event/serve.d.ts +10 -0
  18. package/es/components/Sales/Event/serve.js +26 -1
  19. package/es/components/Sales/Summary/utils.js +1 -0
  20. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +18 -17
  21. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  22. package/es/components/appointmentBooking/components/Cart/Item/index.js +21 -20
  23. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +156 -53
  24. package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  25. package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
  26. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  27. package/es/components/appointmentBooking/components/Content/index.js +26 -25
  28. package/es/components/appointmentBooking/components/Content/index.less +23 -1
  29. package/es/components/appointmentBooking/components/Footer/index.js +5 -5
  30. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  31. package/es/components/appointmentBooking/components/Header/index.js +7 -7
  32. package/es/components/appointmentBooking/components/Services/index.js +50 -25
  33. package/es/components/appointmentBooking/hooks.d.ts +2 -1
  34. package/es/components/appointmentBooking/hooks.js +52 -47
  35. package/es/components/appointmentBooking/index.d.ts +0 -1
  36. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  37. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  38. package/es/components/booking/components/footer/index.d.ts +0 -1
  39. package/es/components/booking/deposit/index.d.ts +0 -1
  40. package/es/components/booking/forms/single/index.d.ts +0 -1
  41. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  42. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  43. package/es/components/booking/info/date/index.d.ts +0 -1
  44. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  45. package/es/components/booking/info/index.d.ts +0 -1
  46. package/es/components/booking/info/service/Lists.d.ts +0 -1
  47. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  48. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  49. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  50. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  51. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  52. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  53. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  54. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  55. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  56. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  57. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  58. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  59. package/es/components/booking/utils.d.ts +2 -2
  60. package/es/components/booking/utils.js +19 -11
  61. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +218 -73
  62. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  63. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  66. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -1
  67. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -4
  68. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  69. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  70. package/es/components/eventBooking/components/bookingDetailModal/index.js +70 -13
  71. package/es/components/eventBooking/index.d.ts +0 -1
  72. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  73. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  74. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  75. package/es/components/productExtension/index.d.ts +0 -1
  76. package/es/components/productSelect/components/TabProduct/index.js +4 -2
  77. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  78. package/es/components/ticketBooking/index.d.ts +0 -1
  79. package/lib/components/Sales/Cart/index.js +30 -18
  80. package/lib/components/Sales/Cart/types.d.ts +12 -0
  81. package/lib/components/Sales/Cart/utils.d.ts +23 -0
  82. package/lib/components/Sales/Cart/utils.js +149 -0
  83. package/lib/components/Sales/Checkout/utils.d.ts +9 -1
  84. package/lib/components/Sales/Checkout/utils.js +18 -4
  85. package/lib/components/Sales/Event/Detail.d.ts +2 -0
  86. package/lib/components/Sales/Event/Detail.js +34 -10
  87. package/lib/components/Sales/Event/serve.d.ts +10 -0
  88. package/lib/components/Sales/Event/serve.js +5 -2
  89. package/lib/components/Sales/Summary/utils.js +1 -0
  90. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +3 -3
  91. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  92. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -1
  93. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +43 -6
  94. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
  95. package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
  96. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  97. package/lib/components/appointmentBooking/components/Content/index.js +7 -7
  98. package/lib/components/appointmentBooking/components/Content/index.less +23 -1
  99. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  100. package/lib/components/appointmentBooking/components/Header/index.js +5 -3
  101. package/lib/components/appointmentBooking/components/Services/index.js +18 -10
  102. package/lib/components/appointmentBooking/hooks.d.ts +2 -1
  103. package/lib/components/appointmentBooking/hooks.js +9 -3
  104. package/lib/components/appointmentBooking/index.d.ts +0 -1
  105. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  106. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  107. package/lib/components/booking/components/footer/index.d.ts +0 -1
  108. package/lib/components/booking/deposit/index.d.ts +0 -1
  109. package/lib/components/booking/forms/single/index.d.ts +0 -1
  110. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  111. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  112. package/lib/components/booking/info/date/index.d.ts +0 -1
  113. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  114. package/lib/components/booking/info/index.d.ts +0 -1
  115. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  116. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  117. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  118. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  119. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  120. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  121. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  122. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  123. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  124. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  125. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  126. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  127. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  128. package/lib/components/booking/utils.d.ts +2 -2
  129. package/lib/components/booking/utils.js +5 -1
  130. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +128 -42
  131. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  132. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  133. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  134. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  135. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +3 -1
  136. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -2
  137. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  138. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  139. package/lib/components/eventBooking/components/bookingDetailModal/index.js +79 -24
  140. package/lib/components/eventBooking/index.d.ts +0 -1
  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/productExtension/fields/SelectProducts/index.d.ts +0 -1
  144. package/lib/components/productExtension/index.d.ts +0 -1
  145. package/lib/components/productSelect/components/TabProduct/index.js +6 -2
  146. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  147. package/lib/components/ticketBooking/index.d.ts +0 -1
  148. package/package.json +4 -4
@@ -17,11 +17,11 @@ var Footer = function Footer(_ref) {
17
17
  var _currentStep$step;
18
18
  var onNext = _ref.onNext,
19
19
  isOpen = _ref.isOpen;
20
- var _useAppointmentBookin = useAppointmentBookingContext(),
21
- carts = _useAppointmentBookin.carts,
22
- currentStep = _useAppointmentBookin.currentStep,
23
- isErrorHolder = _useAppointmentBookin.isErrorHolder,
24
- setIsErrorHolder = _useAppointmentBookin.setIsErrorHolder;
20
+ var _ref2 = useAppointmentBookingContext(),
21
+ carts = _ref2.carts,
22
+ currentStep = _ref2.currentStep,
23
+ isErrorHolder = _ref2.isErrorHolder,
24
+ setIsErrorHolder = _ref2.setIsErrorHolder;
25
25
  var _useState = useState(false),
26
26
  _useState2 = _slicedToArray(_useState, 2),
27
27
  open = _useState2[0],
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -62,7 +62,7 @@ var Header = function Header() {
62
62
  var handleBack = /*#__PURE__*/function () {
63
63
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
64
64
  var _currentStep$step4;
65
- var key, types, _carts$, type, resourceStep;
65
+ var key, types, _carts$, type, resourceStep, prevStepData, currentStepData, _key;
66
66
  return _regeneratorRuntime().wrap(function _callee$(_context) {
67
67
  while (1) switch (_context.prev = _context.next) {
68
68
  case 0:
@@ -125,15 +125,15 @@ var Header = function Header() {
125
125
 
126
126
  // 6. 默认回退一步
127
127
  appointmentBooking.back();
128
-
129
- // 再次将步骤更新为false, 增加这个判断为了跳过那一步没有设置holder,但是直接后退了
130
- if (resourceStep !== null && resourceStep !== void 0 && resourceStep.isSkip && ((resourceStep === null || resourceStep === void 0 ? void 0 : resourceStep.key) === 'select-resource' || (resourceStep === null || resourceStep === void 0 ? void 0 : resourceStep.key) === 'select-service')) {
131
- updateStep(resourceStep === null || resourceStep === void 0 ? void 0 : resourceStep.key, {
132
- index: currentStep === null || currentStep === void 0 ? void 0 : currentStep.index,
128
+ prevStepData = stepList[(currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) - 1];
129
+ currentStepData = stepList[currentStep === null || currentStep === void 0 ? void 0 : currentStep.index]; // 如果当前步骤或者前一步骤被跳过,则将步骤更新为false
130
+ if (currentStepData !== null && currentStepData !== void 0 && currentStepData.isSkip || prevStepData !== null && prevStepData !== void 0 && prevStepData.isSkip) {
131
+ _key = currentStepData !== null && currentStepData !== void 0 && currentStepData.isSkip ? currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.key : prevStepData === null || prevStepData === void 0 ? void 0 : prevStepData.key;
132
+ updateStep(_key, {
133
133
  isSkip: false
134
134
  });
135
135
  }
136
- case 16:
136
+ case 18:
137
137
  case "end":
138
138
  return _context.stop();
139
139
  }
@@ -28,15 +28,16 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
28
28
  utils = _ref.utils;
29
29
  var appointmentBooking = useAppointmentBooking();
30
30
  var _useAppointmentBookin = useAppointmentBookingSetting(),
31
- isDateSelectedFirst = _useAppointmentBookin.isDateSelectedFirst;
31
+ isDateSelectedFirst = _useAppointmentBookin.isDateSelectedFirst,
32
+ isRetailTemplate = _useAppointmentBookin.isRetailTemplate;
32
33
  var _useAppointmentBookin2 = useAppointmentBookingProduct(),
33
34
  getProducts = _useAppointmentBookin2.getProducts,
34
35
  checkProductType = _useAppointmentBookin2.checkProductType;
35
36
  var _useAppointmentBookin3 = useAppointmentBookingStep(),
36
37
  removeStep = _useAppointmentBookin3.removeStep,
37
38
  nextStep = _useAppointmentBookin3.nextStep;
38
- var _useAppointmentBookin4 = useAppointmentBookingContext(),
39
- currentStep = _useAppointmentBookin4.currentStep;
39
+ var _ref2 = useAppointmentBookingContext(),
40
+ currentStep = _ref2.currentStep;
40
41
  var _useState = useState(null),
41
42
  _useState2 = _slicedToArray(_useState, 2),
42
43
  products = _useState2[0],
@@ -63,18 +64,25 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
63
64
  });
64
65
  }, [isDateSelectedFirst]);
65
66
  var handleSelectProduct = /*#__PURE__*/function () {
66
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item) {
67
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item) {
67
68
  var type;
68
69
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
69
70
  while (1) switch (_context2.prev = _context2.next) {
70
71
  case 0:
71
- _context2.next = 2;
72
+ // 不是零售模版才触发检测商品
73
+ type = '';
74
+ if (isRetailTemplate) {
75
+ _context2.next = 6;
76
+ break;
77
+ }
78
+ _context2.next = 4;
72
79
  return checkProductType(item === null || item === void 0 ? void 0 : item.id);
73
- case 2:
80
+ case 4:
74
81
  type = _context2.sent;
75
82
  if (type === 'session') {
76
83
  appointmentBooking.openProductDetail(item.id);
77
84
  }
85
+ case 6:
78
86
  utils === null || utils === void 0 || utils.action({
79
87
  type: 'pisell1.productDetail',
80
88
  data: {
@@ -84,12 +92,31 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
84
92
  },
85
93
  callback: function () {
86
94
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
87
- var session, product, startDate, endDate, _data$origin, resources, activeStatus, index, description;
95
+ var product, session, startDate, endDate, _data$origin, resources, activeStatus, index, description;
88
96
  return _regeneratorRuntime().wrap(function _callee$(_context) {
89
97
  while (1) switch (_context.prev = _context.next) {
90
98
  case 0:
99
+ product = _objectSpread(_objectSpread({}, data), {}, {
100
+ options: (data === null || data === void 0 ? void 0 : data.option) || []
101
+ });
102
+ delete product.option;
103
+
104
+ // 零售模版,直接加入购物车
105
+ if (!isRetailTemplate) {
106
+ _context.next = 7;
107
+ break;
108
+ }
91
109
  if (!(data !== null && data !== void 0 && data.isCancel)) {
92
- _context.next = 3;
110
+ _context.next = 5;
111
+ break;
112
+ }
113
+ return _context.abrupt("return");
114
+ case 5:
115
+ appointmentBooking.storeProduct(product);
116
+ return _context.abrupt("return");
117
+ case 7:
118
+ if (!(data !== null && data !== void 0 && data.isCancel)) {
119
+ _context.next = 10;
93
120
  break;
94
121
  }
95
122
  if (type === 'session') {
@@ -97,14 +124,10 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
97
124
  appointmentBooking.getAvailableDate();
98
125
  }
99
126
  return _context.abrupt("return");
100
- case 3:
127
+ case 10:
101
128
  session = data === null || data === void 0 ? void 0 : data.session;
102
- product = _objectSpread(_objectSpread({}, data), {}, {
103
- options: (data === null || data === void 0 ? void 0 : data.option) || []
104
- });
105
- delete product.option;
106
129
  if (!session) {
107
- _context.next = 14;
130
+ _context.next = 20;
108
131
  break;
109
132
  }
110
133
  startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
@@ -117,32 +140,34 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
117
140
  }
118
141
  });
119
142
  appointmentBooking.closeProductDetail();
120
- appointmentBooking.getAvailableDate({
143
+ _context.next = 18;
144
+ return appointmentBooking.getAvailableDate({
121
145
  startDate: startDate,
122
146
  endDate: endDate
123
147
  });
124
- _context.next = 22;
148
+ case 18:
149
+ _context.next = 28;
125
150
  break;
126
- case 14:
151
+ case 20:
127
152
  resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
128
153
  activeStatus = resources.find(function (item) {
129
154
  return item.status === 1;
130
155
  });
131
156
  if (activeStatus) {
132
- _context.next = 18;
157
+ _context.next = 24;
133
158
  break;
134
159
  }
135
160
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
136
- case 18:
161
+ case 24:
137
162
  appointmentBooking.storeProduct(product);
138
163
  // duration 类型的商品,要获取一下资源
139
164
  if (!(type === 'duration')) {
140
- _context.next = 22;
165
+ _context.next = 28;
141
166
  break;
142
167
  }
143
- _context.next = 22;
168
+ _context.next = 28;
144
169
  return appointmentBooking.getAvailableDate();
145
- case 22:
170
+ case 28:
146
171
  // 先选择日期流程
147
172
  if (isDateSelectedFirst) {
148
173
  index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
@@ -163,7 +188,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
163
188
  removeStep('select-time');
164
189
  }
165
190
  }
166
- case 23:
191
+ case 29:
167
192
  case "end":
168
193
  return _context.stop();
169
194
  }
@@ -175,14 +200,14 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
175
200
  return callback;
176
201
  }()
177
202
  });
178
- case 5:
203
+ case 7:
179
204
  case "end":
180
205
  return _context2.stop();
181
206
  }
182
207
  }, _callee2);
183
208
  }));
184
209
  return function handleSelectProduct(_x) {
185
- return _ref2.apply(this, arguments);
210
+ return _ref3.apply(this, arguments);
186
211
  };
187
212
  }();
188
213
  return /*#__PURE__*/React.createElement("div", {
@@ -14,7 +14,7 @@ export declare const useAppointmentBookingStep: () => {
14
14
  removeStep: (key: string) => any;
15
15
  addStep: (props: any, stepKey?: string) => any;
16
16
  updateStep: (key: string, step: any) => void;
17
- nextStep: () => void;
17
+ nextStep: () => any;
18
18
  };
19
19
  /**
20
20
  * @title: 获取商品数据
@@ -97,6 +97,7 @@ export declare const useIsSkipResourceStep: () => {
97
97
  export declare const useAppointmentBookingSetting: () => {
98
98
  isDateSelectedFirst: boolean;
99
99
  isFormSubject: boolean;
100
+ isRetailTemplate: any;
100
101
  customPageId: any;
101
102
  channel: any;
102
103
  bookingSubject: any;
@@ -50,6 +50,8 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
50
50
  setCurrentStep = _useAppointmentBookin.setCurrentStep,
51
51
  policyIdsRef = _useAppointmentBookin.policyIdsRef,
52
52
  openPolicy = _useAppointmentBookin.openPolicy;
53
+ var _useAppointmentBookin2 = useAppointmentBookingSetting(),
54
+ isRetailTemplate = _useAppointmentBookin2.isRetailTemplate;
53
55
  var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s = appointmentBooking.store) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.step) === null || _appointmentBooking$s === void 0 || (_appointmentBooking$s = _appointmentBooking$s.store) === null || _appointmentBooking$s === void 0 ? void 0 : _appointmentBooking$s.stepList) || [];
54
56
 
55
57
  // 判断是否是最后一步
@@ -123,6 +125,9 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
123
125
  // 下一步
124
126
  var nextStep = function nextStep() {
125
127
  var _appointmentBooking$s2;
128
+ if (isRetailTemplate) {
129
+ return appointmentBooking.next();
130
+ }
126
131
  var currentStep = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.getCurrentStep();
127
132
  var stepList = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$s2 = appointmentBooking.store) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.step) === null || _appointmentBooking$s2 === void 0 || (_appointmentBooking$s2 = _appointmentBooking$s2.store) === null || _appointmentBooking$s2 === void 0 ? void 0 : _appointmentBooking$s2.stepList) || [];
128
133
 
@@ -170,19 +175,17 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
170
175
  * @Date: 2025-04-15 11:12
171
176
  */
172
177
  export var useAppointmentBookingProduct = function useAppointmentBookingProduct() {
173
- var _useAppointmentBookin2 = useAppointmentBookingContext(),
174
- appointmentBooking = _useAppointmentBookin2.appointmentBooking,
175
- carts = _useAppointmentBookin2.carts;
176
- var _ref2 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
177
- productModuleParams = _ref2.productModuleParams;
178
- var _ref3 = productModuleParams || {},
179
- bookingProcess = _ref3.bookingProcess,
180
- bookingSubject = _ref3.bookingSubject;
178
+ var _ref2 = useAppointmentBookingContext(),
179
+ appointmentBooking = _ref2.appointmentBooking;
180
+ var _ref3 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
181
+ productModuleParams = _ref3.productModuleParams;
182
+ var _ref4 = productModuleParams || {},
183
+ bookingProcess = _ref4.bookingProcess;
181
184
 
182
185
  // 获取商品列表
183
186
  var getProducts = /*#__PURE__*/function () {
184
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
185
- var _dates$, dates, _ref5, _productModuleParams, _productList, _ref6, productModuleParams, productList;
187
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
188
+ var _dates$, dates, _ref6, _productModuleParams, _productList, _ref7, productModuleParams, productList;
186
189
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
187
190
  while (1) switch (_context2.prev = _context2.next) {
188
191
  case 0:
@@ -200,7 +203,7 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
200
203
  }
201
204
  return _context2.abrupt("return");
202
205
  case 6:
203
- _ref5 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {}, _productModuleParams = _ref5.productModuleParams;
206
+ _ref6 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {}, _productModuleParams = _ref6.productModuleParams;
204
207
  _context2.next = 9;
205
208
  return appointmentBooking.loadProductByScheduleDate(_objectSpread({
206
209
  date: (_dates$ = dates[0]) === null || _dates$ === void 0 ? void 0 : _dates$.date
@@ -210,7 +213,7 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
210
213
  return _context2.abrupt("return", _productList);
211
214
  case 11:
212
215
  // 先选商品
213
- _ref6 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {}, productModuleParams = _ref6.productModuleParams;
216
+ _ref7 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {}, productModuleParams = _ref7.productModuleParams;
214
217
  _context2.next = 14;
215
218
  return appointmentBooking.loadProducts(productModuleParams);
216
219
  case 14:
@@ -223,13 +226,13 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
223
226
  }, _callee2);
224
227
  }));
225
228
  return function getProducts() {
226
- return _ref4.apply(this, arguments);
229
+ return _ref5.apply(this, arguments);
227
230
  };
228
231
  }();
229
232
 
230
233
  // 检测商品类型
231
234
  var checkProductType = /*#__PURE__*/function () {
232
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(productId) {
235
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(productId) {
233
236
  var result;
234
237
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
235
238
  while (1) switch (_context3.prev = _context3.next) {
@@ -246,7 +249,7 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
246
249
  }, _callee3);
247
250
  }));
248
251
  return function checkProductType(_x2) {
249
- return _ref7.apply(this, arguments);
252
+ return _ref8.apply(this, arguments);
250
253
  };
251
254
  }();
252
255
  return {
@@ -271,10 +274,10 @@ export var useAppointmentBookingCart = function useAppointmentBookingCart() {
271
274
  setCarts = _useAppointmentBookin3.setCarts,
272
275
  setSummary = _useAppointmentBookin3.setSummary,
273
276
  setIsAgreeDepositPolicy = _useAppointmentBookin3.setIsAgreeDepositPolicy;
274
- var _ref8 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
275
- bookingSubject = _ref8.bookingSubject;
277
+ var _ref9 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
278
+ bookingSubject = _ref9.bookingSubject;
276
279
  var getCartAndSummary = /*#__PURE__*/function () {
277
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
280
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
278
281
  var carts, newCarts, summary;
279
282
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
280
283
  while (1) switch (_context4.prev = _context4.next) {
@@ -306,7 +309,7 @@ export var useAppointmentBookingCart = function useAppointmentBookingCart() {
306
309
  }, _callee4);
307
310
  }));
308
311
  return function getCartAndSummary() {
309
- return _ref9.apply(this, arguments);
312
+ return _ref10.apply(this, arguments);
310
313
  };
311
314
  }();
312
315
  useEffect(function () {
@@ -337,8 +340,8 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
337
340
  var utils = contextUtils();
338
341
  var isLogin = !!(utils !== null && utils !== void 0 && (_utils$token = utils.token) !== null && _utils$token !== void 0 && (_utils$token$get = _utils$token.get) !== null && _utils$token$get !== void 0 && _utils$token$get.call(_utils$token));
339
342
  var openLoginModal = function openLoginModal(params) {
340
- var _ref11 = params || {},
341
- callback = _ref11.callback;
343
+ var _ref12 = params || {},
344
+ callback = _ref12.callback;
342
345
  utils.action({
343
346
  type: 'pisell1.login',
344
347
  data: {
@@ -369,13 +372,13 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
369
372
  _useState2 = _slicedToArray(_useState, 2),
370
373
  accountLists = _useState2[0],
371
374
  setAccountLists = _useState2[1];
372
- var _ref12 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o2 = appointmentBooking.otherParams) === null || _appointmentBooking$o2 === void 0 ? void 0 : _appointmentBooking$o2.productModuleParams) || {},
373
- bookingSubject = _ref12.bookingSubject;
375
+ var _ref13 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o2 = appointmentBooking.otherParams) === null || _appointmentBooking$o2 === void 0 ? void 0 : _appointmentBooking$o2.productModuleParams) || {},
376
+ bookingSubject = _ref13.bookingSubject;
374
377
  var form_id = bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.form_id;
375
378
 
376
379
  // 获取账户列表数据
377
380
  var getAccountLists = /*#__PURE__*/function () {
378
- var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
381
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
379
382
  var data;
380
383
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
381
384
  while (1) switch (_context6.prev = _context6.next) {
@@ -392,13 +395,13 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
392
395
  }, _callee6);
393
396
  }));
394
397
  return function getAccountLists() {
395
- return _ref13.apply(this, arguments);
398
+ return _ref14.apply(this, arguments);
396
399
  };
397
400
  }();
398
401
  useEffect(function () {
399
402
  getAccountLists();
400
403
  pisellOS.effects.on('appointmentBooking_accountList:changed', /*#__PURE__*/function () {
401
- var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(res) {
404
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(res) {
402
405
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
403
406
  while (1) switch (_context7.prev = _context7.next) {
404
407
  case 0:
@@ -413,14 +416,14 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
413
416
  }, _callee7);
414
417
  }));
415
418
  return function (_x3) {
416
- return _ref14.apply(this, arguments);
419
+ return _ref15.apply(this, arguments);
417
420
  };
418
421
  }());
419
422
  }, []);
420
423
 
421
424
  // 获取表单数据
422
425
  var getHolders = /*#__PURE__*/function () {
423
- var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
426
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
424
427
  var _utils$getStore$getSt;
425
428
  var shop_id, customer, params, data, newData;
426
429
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
@@ -460,13 +463,13 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
460
463
  }, _callee8);
461
464
  }));
462
465
  return function getHolders() {
463
- return _ref15.apply(this, arguments);
466
+ return _ref16.apply(this, arguments);
464
467
  };
465
468
  }();
466
469
 
467
470
  // 添加账户
468
471
  var addAccount = /*#__PURE__*/function () {
469
- var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(val, type) {
472
+ var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(val, type) {
470
473
  var customer, result;
471
474
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
472
475
  while (1) switch (_context9.prev = _context9.next) {
@@ -487,7 +490,7 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
487
490
  }, _callee9);
488
491
  }));
489
492
  return function addAccount(_x4, _x5) {
490
- return _ref16.apply(this, arguments);
493
+ return _ref17.apply(this, arguments);
491
494
  };
492
495
  }();
493
496
 
@@ -518,8 +521,8 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
518
521
  setTimes = _useAppointmentBookin4.setTimes,
519
522
  setResourceOtherParams = _useAppointmentBookin4.setResourceOtherParams,
520
523
  resourceOtherParams = _useAppointmentBookin4.resourceOtherParams;
521
- var _ref17 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
522
- resourceSort = _ref17.resourceSort;
524
+ var _ref18 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
525
+ resourceSort = _ref18.resourceSort;
523
526
 
524
527
  // 设置资源列表
525
528
  var getResourceList = function getResourceList() {
@@ -543,7 +546,7 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
543
546
 
544
547
  // 设置时间切片
545
548
  var getResourceTimeSlot = /*#__PURE__*/function () {
546
- var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(index) {
549
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(index) {
547
550
  var _getResourceList, resourceCodes, code, data;
548
551
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
549
552
  while (1) switch (_context10.prev = _context10.next) {
@@ -562,13 +565,13 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
562
565
  }, _callee10);
563
566
  }));
564
567
  return function getResourceTimeSlot(_x6) {
565
- return _ref18.apply(this, arguments);
568
+ return _ref19.apply(this, arguments);
566
569
  };
567
570
  }();
568
571
 
569
572
  // 获取自动分配
570
573
  var autoSelectAllProductResources = /*#__PURE__*/function () {
571
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(index) {
574
+ var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(index) {
572
575
  var _getResourceList2, resourceCodes, code, data, res;
573
576
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
574
577
  while (1) switch (_context11.prev = _context11.next) {
@@ -594,7 +597,7 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
594
597
  }, _callee11);
595
598
  }));
596
599
  return function autoSelectAllProductResources(_x7) {
597
- return _ref19.apply(this, arguments);
600
+ return _ref20.apply(this, arguments);
598
601
  };
599
602
  }();
600
603
  return {
@@ -634,7 +637,7 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
634
637
  nextStep = _useAppointmentBookin10.nextStep;
635
638
  var utils = contextUtils();
636
639
  var checkSkipResourceStep = /*#__PURE__*/function () {
637
- var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(isSkipUpdateFormStep) {
640
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(isSkipUpdateFormStep) {
638
641
  var accountLists, carts, _res$errorList, _resources$, res, _getResourceList3, resources, resultCarts;
639
642
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
640
643
  while (1) switch (_context12.prev = _context12.next) {
@@ -706,7 +709,7 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
706
709
  }, _callee12, null, [[0, 23]]);
707
710
  }));
708
711
  return function checkSkipResourceStep(_x8) {
709
- return _ref20.apply(this, arguments);
712
+ return _ref21.apply(this, arguments);
710
713
  };
711
714
  }();
712
715
  return {
@@ -722,15 +725,15 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
722
725
  * @Date: 2025-04-24 18:15
723
726
  */
724
727
  export var useAppointmentBookingSetting = function useAppointmentBookingSetting() {
725
- var _appointmentBooking$o3;
728
+ var _appointmentBooking$o3, _appointmentBooking$o4;
726
729
  var utils = contextUtils();
727
- var _useAppointmentBookin11 = useAppointmentBookingContext(),
728
- appointmentBooking = _useAppointmentBookin11.appointmentBooking;
729
- var _ref21 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o3 = appointmentBooking.otherParams) === null || _appointmentBooking$o3 === void 0 ? void 0 : _appointmentBooking$o3.productModuleParams) || {},
730
- bookingProcess = _ref21.bookingProcess,
731
- bookingSubject = _ref21.bookingSubject,
732
- customPageId = _ref21.customPageId,
733
- channel = _ref21.channel;
730
+ var _ref22 = useAppointmentBookingContext(),
731
+ appointmentBooking = _ref22.appointmentBooking;
732
+ var _ref23 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o3 = appointmentBooking.otherParams) === null || _appointmentBooking$o3 === void 0 ? void 0 : _appointmentBooking$o3.productModuleParams) || {},
733
+ bookingProcess = _ref23.bookingProcess,
734
+ bookingSubject = _ref23.bookingSubject,
735
+ customPageId = _ref23.customPageId,
736
+ channel = _ref23.channel;
734
737
 
735
738
  // 设置缓存
736
739
  var setOtherData = function setOtherData(key, val) {
@@ -749,6 +752,8 @@ export var useAppointmentBookingSetting = function useAppointmentBookingSetting(
749
752
  isDateSelectedFirst: bookingProcess === 'date_first',
750
753
  // 主体是否是表单
751
754
  isFormSubject: (bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.type) === 'form',
755
+ // 是否是零售模版
756
+ isRetailTemplate: (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o4 = appointmentBooking.otherParams) === null || _appointmentBooking$o4 === void 0 ? void 0 : _appointmentBooking$o4.isRetailTemplate) || false,
752
757
  customPageId: customPageId,
753
758
  channel: channel,
754
759
  bookingSubject: bookingSubject,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AppointmentBooking: () => JSX.Element;
4
3
  export default AppointmentBooking;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: (props: any) => JSX.Element;
3
2
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 表单选择器
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from '../../../model';
3
2
  interface useClientFnParams {
4
3
  state: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
4
3
  declare const DateCom: () => 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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../info/service/actions/index.less';
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;