@pisell/private-materials 3.0.198 → 3.0.199

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 (202) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/addons/model.d.ts +1 -1
  12. package/es/components/booking/components/customSelect/index.d.ts +0 -1
  13. package/es/components/booking/components/customSelect/index.js +2 -6
  14. package/es/components/booking/components/footer/amount.js +22 -45
  15. package/es/components/booking/components/footer/index.js +40 -84
  16. package/es/components/booking/components/footer/utils.js +32 -218
  17. package/es/components/booking/info/addServiceVariant/index.js +1 -8
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  19. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
  20. package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
  21. package/es/components/booking/info/main.js +8 -20
  22. package/es/components/booking/info/model.js +0 -3
  23. package/es/components/booking/info/pet/index.js +5 -54
  24. package/es/components/booking/info/service/addService/index.js +20 -127
  25. package/es/components/booking/info/service/addService/index.less +3 -13
  26. package/es/components/booking/info/service/addService/utils.d.ts +2 -11
  27. package/es/components/booking/info/service/addService/utils.js +24 -49
  28. package/es/components/booking/info/service/editService/index.js +41 -232
  29. package/es/components/booking/info/service/editService/index.less +13 -18
  30. package/es/components/booking/info/utils.d.ts +0 -9
  31. package/es/components/booking/info/utils.js +0 -13
  32. package/es/components/booking/locales.d.ts +0 -60
  33. package/es/components/booking/locales.js +3 -75
  34. package/es/components/booking/model.d.ts +1 -4
  35. package/es/components/booking/model.js +2 -4
  36. package/es/components/booking/payments/index.d.ts +1 -1
  37. package/es/components/booking/utils.d.ts +3 -12
  38. package/es/components/booking/utils.js +22 -126
  39. package/es/components/eftpos/form/index.js +12 -6
  40. package/es/components/eftpos/group/index.d.ts +1 -2
  41. package/es/components/eftpos/group/index.js +1 -2
  42. package/es/components/eftpos/index.js +2 -2
  43. package/es/components/eftpos/receipt/index.d.ts +24 -0
  44. package/es/components/eftpos/receipt/index.js +96 -0
  45. package/es/components/eftposPay/helper.d.ts +1 -0
  46. package/es/components/eftposPay/helper.js +14 -0
  47. package/es/components/eftposPay/hooks.d.ts +1 -1
  48. package/es/components/eftposPay/tyro/index.js +51 -20
  49. package/es/index.d.ts +0 -1
  50. package/es/index.js +1 -2
  51. package/lib/components/booking/addons/model.d.ts +1 -1
  52. package/lib/components/booking/components/customSelect/index.d.ts +0 -1
  53. package/lib/components/booking/components/customSelect/index.js +2 -6
  54. package/lib/components/booking/components/footer/amount.js +8 -26
  55. package/lib/components/booking/components/footer/index.js +4 -25
  56. package/lib/components/booking/components/footer/utils.js +31 -144
  57. package/lib/components/booking/info/addServiceVariant/index.js +0 -5
  58. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  59. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
  60. package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
  61. package/lib/components/booking/info/main.js +4 -11
  62. package/lib/components/booking/info/model.js +0 -3
  63. package/lib/components/booking/info/pet/index.js +25 -61
  64. package/lib/components/booking/info/service/addService/index.js +28 -95
  65. package/lib/components/booking/info/service/addService/index.less +3 -13
  66. package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
  67. package/lib/components/booking/info/service/addService/utils.js +10 -31
  68. package/lib/components/booking/info/service/editService/index.js +122 -271
  69. package/lib/components/booking/info/service/editService/index.less +13 -18
  70. package/lib/components/booking/info/utils.d.ts +0 -9
  71. package/lib/components/booking/info/utils.js +0 -6
  72. package/lib/components/booking/locales.d.ts +0 -60
  73. package/lib/components/booking/locales.js +3 -63
  74. package/lib/components/booking/model.d.ts +1 -4
  75. package/lib/components/booking/model.js +2 -4
  76. package/lib/components/booking/payments/index.d.ts +1 -1
  77. package/lib/components/booking/utils.d.ts +3 -12
  78. package/lib/components/booking/utils.js +15 -79
  79. package/lib/components/eftpos/form/index.js +12 -6
  80. package/lib/components/eftpos/group/index.d.ts +1 -2
  81. package/lib/components/eftpos/group/index.js +0 -1
  82. package/lib/components/eftpos/index.js +2 -2
  83. package/lib/components/eftpos/receipt/index.d.ts +24 -0
  84. package/lib/components/eftpos/receipt/index.js +88 -0
  85. package/lib/components/eftposPay/helper.d.ts +1 -0
  86. package/lib/components/eftposPay/helper.js +21 -0
  87. package/lib/components/eftposPay/hooks.d.ts +1 -1
  88. package/lib/components/eftposPay/tyro/index.js +36 -7
  89. package/lib/index.d.ts +0 -1
  90. package/lib/index.js +0 -3
  91. package/package.json +4 -4
  92. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  93. package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
  94. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  95. package/es/components/booking/info/dateRange/index.d.ts +0 -5
  96. package/es/components/booking/info/dateRange/index.js +0 -98
  97. package/es/components/booking/info/dateRange/index.less +0 -21
  98. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  99. package/es/components/booking/info/pet/ChangePetModal/index.js +0 -119
  100. package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
  101. package/es/components/booking/info/service2/Lists.d.ts +0 -3
  102. package/es/components/booking/info/service2/Lists.js +0 -158
  103. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  104. package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
  105. package/es/components/booking/info/service2/index.d.ts +0 -3
  106. package/es/components/booking/info/service2/index.js +0 -58
  107. package/es/components/booking/info/service2/status.d.ts +0 -31
  108. package/es/components/booking/info/service2/status.js +0 -78
  109. package/es/components/booking/info/service2/utils.d.ts +0 -145
  110. package/es/components/booking/info/service2/utils.js +0 -436
  111. package/es/components/booking/materiels/holder/index.d.ts +0 -7
  112. package/es/components/booking/materiels/holder/index.js +0 -51
  113. package/es/components/shoppingCart/Provider.d.ts +0 -3
  114. package/es/components/shoppingCart/Provider.js +0 -86
  115. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  116. package/es/components/shoppingCart/components/Cart/Product.js +0 -96
  117. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
  118. package/es/components/shoppingCart/components/Cart/index.js +0 -72
  119. package/es/components/shoppingCart/components/Cart/index.less +0 -68
  120. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
  121. package/es/components/shoppingCart/components/Empty/index.js +0 -14
  122. package/es/components/shoppingCart/components/Empty/index.less +0 -19
  123. package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
  124. package/es/components/shoppingCart/components/Render/index.js +0 -68
  125. package/es/components/shoppingCart/components/Render/index.less +0 -2
  126. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  127. package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
  128. package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  129. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  130. package/es/components/shoppingCart/hooks/useAddService.js +0 -23
  131. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  132. package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
  133. package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
  134. package/es/components/shoppingCart/hooks/useContext.js +0 -5
  135. package/es/components/shoppingCart/index.d.ts +0 -4
  136. package/es/components/shoppingCart/index.js +0 -24
  137. package/es/components/shoppingCart/locales.d.ts +0 -33
  138. package/es/components/shoppingCart/locales.js +0 -38
  139. package/es/components/shoppingCart/mock.d.ts +0 -40
  140. package/es/components/shoppingCart/mock.js +0 -40
  141. package/es/components/shoppingCart/status.d.ts +0 -2
  142. package/es/components/shoppingCart/status.js +0 -22
  143. package/es/components/shoppingCart/type.d.ts +0 -39
  144. package/es/components/shoppingCart/type.js +0 -1
  145. package/es/components/shoppingCart/utils.d.ts +0 -63
  146. package/es/components/shoppingCart/utils.js +0 -119
  147. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  148. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
  149. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  150. package/lib/components/booking/info/dateRange/index.d.ts +0 -5
  151. package/lib/components/booking/info/dateRange/index.js +0 -111
  152. package/lib/components/booking/info/dateRange/index.less +0 -21
  153. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  154. package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -111
  155. package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
  156. package/lib/components/booking/info/service2/Lists.d.ts +0 -3
  157. package/lib/components/booking/info/service2/Lists.js +0 -113
  158. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  159. package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
  160. package/lib/components/booking/info/service2/index.d.ts +0 -3
  161. package/lib/components/booking/info/service2/index.js +0 -75
  162. package/lib/components/booking/info/service2/status.d.ts +0 -31
  163. package/lib/components/booking/info/service2/status.js +0 -81
  164. package/lib/components/booking/info/service2/utils.d.ts +0 -145
  165. package/lib/components/booking/info/service2/utils.js +0 -320
  166. package/lib/components/booking/materiels/holder/index.d.ts +0 -7
  167. package/lib/components/booking/materiels/holder/index.js +0 -65
  168. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  169. package/lib/components/shoppingCart/Provider.js +0 -110
  170. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  171. package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
  172. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
  173. package/lib/components/shoppingCart/components/Cart/index.js +0 -77
  174. package/lib/components/shoppingCart/components/Cart/index.less +0 -68
  175. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
  176. package/lib/components/shoppingCart/components/Empty/index.js +0 -43
  177. package/lib/components/shoppingCart/components/Empty/index.less +0 -19
  178. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
  179. package/lib/components/shoppingCart/components/Render/index.js +0 -79
  180. package/lib/components/shoppingCart/components/Render/index.less +0 -2
  181. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  182. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
  183. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  184. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  185. package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
  186. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  187. package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
  188. package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
  189. package/lib/components/shoppingCart/hooks/useContext.js +0 -31
  190. package/lib/components/shoppingCart/index.d.ts +0 -4
  191. package/lib/components/shoppingCart/index.js +0 -60
  192. package/lib/components/shoppingCart/locales.d.ts +0 -33
  193. package/lib/components/shoppingCart/locales.js +0 -56
  194. package/lib/components/shoppingCart/mock.d.ts +0 -40
  195. package/lib/components/shoppingCart/mock.js +0 -76
  196. package/lib/components/shoppingCart/status.d.ts +0 -2
  197. package/lib/components/shoppingCart/status.js +0 -60
  198. package/lib/components/shoppingCart/type.d.ts +0 -39
  199. package/lib/components/shoppingCart/type.js +0 -17
  200. package/lib/components/shoppingCart/utils.d.ts +0 -63
  201. package/lib/components/shoppingCart/utils.js +0 -92
  202. package/lowcode/shopping-cart/meta.ts +0 -98
@@ -4,13 +4,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import dayjs from "dayjs";
8
7
  import { flexibleObj, isNowTime, getNowTime } from "../../utils";
9
8
  import { isWalkIn } from "../../utils";
10
9
  import { getSumCapacity } from "../../info2/utilsByBooking";
11
- import { getDays } from "../../utils";
12
- import { appointmentTypes } from "../../info/service2/status";
13
- import { isDayBooking, formatDayTime } from "../../info/service2/utils";
14
10
  var formatNote = function formatNote(data) {
15
11
  var _data$notes;
16
12
  return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || "";
@@ -80,7 +76,7 @@ var getSubType = function getSubType(item) {
80
76
  var _item$duration;
81
77
  var _type = (_item$duration = item.duration) === null || _item$duration === void 0 ? void 0 : _item$duration.type;
82
78
  // 目前不支持跨天
83
- if (_type) {
79
+ if (_type && _type !== 'days') {
84
80
  return _type;
85
81
  }
86
82
  return 'minutes';
@@ -121,135 +117,6 @@ var formatResource = function formatResource(service) {
121
117
  }
122
118
  };
123
119
 
124
- /**
125
- * @title: 格式化子预约的holder数据
126
- * @description:
127
- * @param {any} state
128
- * @param {any} item
129
- * @param {any} values
130
- * @return {*}
131
- * @Author: WangHan
132
- * @Date: 2024-12-07 14:52
133
- */
134
- var formatHolders = function formatHolders(state, item, values) {
135
- var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2, _state$bookingConfig$3, _item$_extend;
136
- var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : (_state$bookingConfig$3 = _state$bookingConfig$2.appointment_subject) === null || _state$bookingConfig$3 === void 0 ? void 0 : _state$bookingConfig$3.form_id) || 0;
137
- var obj = {
138
- customer_id: values.customer_id,
139
- form_id: form_id,
140
- form_record: [((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.holder_id) || 0]
141
- };
142
-
143
- // 连锁加盟子店铺 增加参数
144
- if (state.isFranchisee) {
145
- obj.is_source_shop = 1;
146
- }
147
- return obj;
148
- };
149
-
150
- /**
151
- * @title: 格式化商品数据
152
- * @description:
153
- * @param {any} item
154
- * @return {*}
155
- * @Author: WangHan
156
- * @Date: 2024-12-07 14:21
157
- */
158
- var formatProducts = function formatProducts(item) {
159
- var _item$_extend2, _item$_extend2$other;
160
- var total = Number(item._extend.total);
161
- var origin_total = Number(item._extend.origin_total);
162
- var discount_amount = origin_total - total;
163
-
164
- // 加价时type使用change_price
165
- var discount_type = discount_amount < 0 ? 'change_price' : 'discount';
166
- return {
167
- "num": item._extend.quantity,
168
- "price": item._extend.price,
169
- "product_id": (item === null || item === void 0 ? void 0 : item.product_id) || item.id,
170
- "discount_amount": discount_amount,
171
- "product_discount_reason": item._extend.discount_reason || '',
172
- "is_charge_tax": item.is_charge_tax,
173
- "note": (item === null || item === void 0 ? void 0 : item.note) || '',
174
- "discountway": item._extend.discountway || "num",
175
- "discount_per": item._extend.discount_per,
176
- "discount_type": item._extend.discount_type || discount_type,
177
- "order_detail_id": item._extend.order_detail_id || 0,
178
- "product_bundle": formatProductBundle((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : (_item$_extend2$other = _item$_extend2.other) === null || _item$_extend2$other === void 0 ? void 0 : _item$_extend2$other.bundle),
179
- "bundle_edit": item._extend.bundle_edit
180
- };
181
- };
182
-
183
- /**
184
- * @title: 格式化跨日预约下的普通商品
185
- * @description:
186
- * @param {any} data
187
- * @param {any} booking_item
188
- * @return {*}
189
- * @Author: WangHan
190
- * @Date: 2024-12-07 14:48
191
- */
192
- var formatDayRelationProducts = function formatDayRelationProducts(data, booking_item) {
193
- var list = data.service.value;
194
-
195
- // 过滤出卡片中的普通商品
196
- var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
197
- var _item$_extend3;
198
- var holderId = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.holder_id;
199
- var bookingHolderId = booking_item._extend.holder_id;
200
- var isAppointment = appointmentTypes.includes(item.extension_type);
201
- return holderId && holderId === bookingHolderId && !isAppointment;
202
- });
203
- relation_products = relation_products.map(function (item) {
204
- return formatProducts(item);
205
- });
206
- return relation_products || [];
207
- };
208
-
209
- /**
210
- * @title: 格式化跨日预约商品列表
211
- * @description:
212
- * @param {any} data
213
- * @return {*}
214
- * @Author: WangHan
215
- * @Date: 2024-12-17 11:06
216
- */
217
- var formatAppointmentProductLists = function formatAppointmentProductLists(data) {
218
- try {
219
- var _Array$from;
220
- var list = data.service.value;
221
-
222
- // 找出预约商品
223
- list = list.filter(function (item) {
224
- var _item$_extend4;
225
- return ((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.holder_id) && appointmentTypes.includes(item.extension_type);
226
- });
227
-
228
- // 对预约商品列表根据holder_id进行分组
229
- var groupMap = new Map();
230
- list.forEach(function (item) {
231
- var _item$_extend5;
232
- var key = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id; // 分组键
233
- if (!groupMap.has(key)) {
234
- groupMap.set(key, []);
235
- }
236
- groupMap.get(key).push(item);
237
- });
238
-
239
- // 处理每个分组
240
- groupMap.forEach(function (group) {
241
- // 只给第一个数据增加 relation_products
242
- group[0].relation_products = formatDayRelationProducts(data, group[0]);
243
- });
244
-
245
- // 将分组的结果还原为数组
246
- var result = (_Array$from = Array.from(groupMap.values())) === null || _Array$from === void 0 ? void 0 : _Array$from.reduce(function (acc, group) {
247
- return acc.concat(group);
248
- }, []);
249
- return result || [];
250
- } catch (error) {}
251
- };
252
-
253
120
  /**
254
121
  * @title: 预约商品信息
255
122
  * @description:
@@ -258,60 +125,42 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
258
125
  * @Author: zhiwei.Wang
259
126
  * @Date: 2024-02-19 09:26
260
127
  */
261
- var formatBookings = function formatBookings(data, values) {
262
- // 是否是跨日预约
263
- var isDay = isDayBooking(data);
128
+ var formatBookings = function formatBookings(data) {
264
129
  var list = data.service.value;
265
-
266
- // 格式化跨日预约商品列表
267
- if (isDay) {
268
- list = formatAppointmentProductLists(data);
269
- }
270
- var dayParams = {
271
- relation_products: []
272
- };
273
130
  var eventOtherParams = data.eventOtherParams;
274
131
  var bookings = [];
275
- console.log(list, 'wh_result11');
276
132
  bookings = list.map(function (item) {
133
+ var _item$_extend, _item$_extend$other;
277
134
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
278
135
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
279
136
  var end_time = item._extend.endDate.format("HH:mm");
280
137
  var start_time = item._extend.startDate.format("HH:mm");
281
-
282
138
  // 更新当前时间
283
139
  if (isNowTime(item._extend.start_time)) {
284
140
  start_time = getNowTime();
285
141
  }
142
+ var total = Number(item._extend.total);
143
+ var origin_total = Number(item._extend.origin_total);
144
+ var discount_amount = origin_total - total;
286
145
 
287
- // 跨日预约下的普通商品
288
- if (isDay) {
289
- var _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9;
290
- var startDate = ((_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate) || ((_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.start_date);
291
- var endDate = ((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.endDate) || ((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.end_date);
292
- var _formatDayTime = formatDayTime({
293
- startDate: startDate,
294
- endDate: endDate
295
- }),
296
- startDateTime = _formatDayTime.startDateTime,
297
- endDateTime = _formatDayTime.endDateTime;
298
-
299
- // 根据营业日时间更新时间
300
- start_date = dayjs(startDateTime).format('YYYY-MM-DD');
301
- start_time = dayjs(startDateTime).format('HH:mm');
302
- end_date = dayjs(endDateTime).format('YYYY-MM-DD');
303
- end_time = dayjs(endDateTime).format('HH:mm');
304
- dayParams.relation_products = (item === null || item === void 0 ? void 0 : item.relation_products) || [];
305
- dayParams.holder = formatHolders(data, item, values);
306
- dayParams.duration = getDays({
307
- _extend: {
308
- start_date: startDateTime,
309
- end_date: endDateTime
310
- }
311
- }, 'minutes');
312
- }
313
- return _objectSpread(_objectSpread({
314
- "product": formatProducts(item),
146
+ // 加价时type使用change_price
147
+ var discount_type = discount_amount < 0 ? 'change_price' : 'discount';
148
+ return _objectSpread({
149
+ "product": {
150
+ "num": item._extend.quantity,
151
+ "price": item._extend.price,
152
+ "product_id": item.id,
153
+ "discount_amount": discount_amount,
154
+ "product_discount_reason": item._extend.discount_reason || '',
155
+ "is_charge_tax": item.is_charge_tax,
156
+ "note": "",
157
+ "discountway": item._extend.discountway || "num",
158
+ "discount_per": item._extend.discount_per,
159
+ "discount_type": item._extend.discount_type || discount_type,
160
+ "order_detail_id": item._extend.order_detail_id || 0,
161
+ "product_bundle": formatProductBundle((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : (_item$_extend$other = _item$_extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle),
162
+ "bundle_edit": item._extend.bundle_edit
163
+ },
315
164
  "relation_products": formatRelationDetails(item._extend.relation_details),
316
165
  'id': item.booking_id || 0,
317
166
  "relation_id": item._extend.relation_id || 0,
@@ -320,12 +169,12 @@ var formatBookings = function formatBookings(data, values) {
320
169
  "is_all": false,
321
170
  "schedule_id": item._extend.schedule_id || 0,
322
171
  "end_time": end_time,
323
- "sub_type": isDay ? 'days' : getSubType(item),
172
+ "sub_type": getSubType(item),
324
173
  "select_date": start_date,
325
174
  "start_time": start_time,
326
175
  "end_date": end_date,
327
176
  "start_date": start_date,
328
- "duration": isDay ? 0 : flexibleObj.getValue(item._extend.duration),
177
+ "duration": flexibleObj.getValue(item._extend.duration),
329
178
  "number": item._extend.capacity ? getSumCapacity({
330
179
  cacheItem: item
331
180
  }) : item._extend.number || 1,
@@ -333,34 +182,11 @@ var formatBookings = function formatBookings(data, values) {
333
182
  "metadata": item._extend.capacity ? {
334
183
  capacity: item._extend.capacity
335
184
  } : undefined
336
- }, eventOtherParams || {}), dayParams);
185
+ }, eventOtherParams || {});
337
186
  });
338
187
  return bookings;
339
188
  };
340
189
 
341
- /**
342
- * @title: 普通商品
343
- * @description:
344
- * @param {any} data
345
- * @return {*}
346
- * @Author: WangHan
347
- * @Date: 2024-12-06 21:26
348
- */
349
- var formatRelationProducts = function formatRelationProducts(data) {
350
- var _data$service;
351
- var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
352
- // open items 下的商品
353
- list = list.filter(function (item) {
354
- var _item$_extend10;
355
- return !((_item$_extend10 = item._extend) !== null && _item$_extend10 !== void 0 && _item$_extend10.holder_id);
356
- });
357
- var relationProducts = [];
358
- relationProducts = list.map(function (item) {
359
- return formatProducts(item);
360
- });
361
- return relationProducts;
362
- };
363
-
364
190
  /**
365
191
  * @title: 预约主体信息
366
192
  * @description:
@@ -371,8 +197,8 @@ var formatRelationProducts = function formatRelationProducts(data) {
371
197
  * @Date: 2024-02-19 09:26
372
198
  */
373
199
  var formatHolder = function formatHolder(state, values) {
374
- var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$bookingConfig5, _state$pet$value, _state$pet, _state$pet$originValu, _state$pet$originValu2;
375
- var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : (_state$bookingConfig3 = _state$bookingConfig2.config) === null || _state$bookingConfig3 === void 0 ? void 0 : (_state$bookingConfig4 = _state$bookingConfig3.basic) === null || _state$bookingConfig4 === void 0 ? void 0 : (_state$bookingConfig5 = _state$bookingConfig4.appointment_subject) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.form_id) || 0;
200
+ var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2, _state$bookingConfig$3, _state$pet$value, _state$pet, _state$pet$originValu, _state$pet$originValu2;
201
+ var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : (_state$bookingConfig$3 = _state$bookingConfig$2.appointment_subject) === null || _state$bookingConfig$3 === void 0 ? void 0 : _state$bookingConfig$3.form_id) || 0;
376
202
  var petValue = ((_state$pet$value = state.pet.value) === null || _state$pet$value === void 0 ? void 0 : _state$pet$value[form_id]) || [];
377
203
  var obj = {
378
204
  customer_id: values.customer_id,
@@ -404,12 +230,9 @@ export var formatValues = function formatValues(state) {
404
230
  bookings: [],
405
231
  customer_id: 1,
406
232
  customer_name: "",
407
- holder: {},
408
- relation_products: [],
409
- metadata: {}
233
+ holder: {}
410
234
  };
411
- var isDay = isDayBooking(state);
412
- if (!state.bookingId || isDay) {
235
+ if (!state.bookingId) {
413
236
  // 备注
414
237
  values.shop_note = formatNote(state);
415
238
  }
@@ -428,13 +251,9 @@ export var formatValues = function formatValues(state) {
428
251
 
429
252
  // 主体
430
253
  values.holder = formatHolder(state, values);
431
- if (isDay) {
432
- // 父预约商品
433
- values.relation_products = formatRelationProducts(state);
434
- }
435
254
 
436
255
  // 服务
437
- values.bookings = formatBookings(state, values);
256
+ values.bookings = formatBookings(state);
438
257
 
439
258
  // 日期
440
259
  if ((_values = values) !== null && _values !== void 0 && (_values$bookings = _values.bookings) !== null && _values$bookings !== void 0 && (_values$bookings$ = _values$bookings[0]) !== null && _values$bookings$ !== void 0 && _values$bookings$.select_date && !(state !== null && state !== void 0 && state.bookingId)) {
@@ -444,10 +263,5 @@ export var formatValues = function formatValues(state) {
444
263
  startTime = "".concat(startTime || '00:00', ":00");
445
264
  values.schedule_date = "".concat(values.bookings[0].select_date, " ").concat(startTime);
446
265
  }
447
-
448
- // 跨日预约增加多余参数区分
449
- if (isDay) {
450
- values.metadata.is_multiday_appointment = 1;
451
- }
452
266
  return values;
453
267
  };
@@ -24,20 +24,13 @@ var AddServiceVariant = function AddServiceVariant(props) {
24
24
  service: _objectSpread(_objectSpread({}, stateRef.current.service), payload)
25
25
  });
26
26
  }
27
-
28
- // 更新日期
29
- if (type === 'setDate') {
30
- setGlobalState({
31
- date: _objectSpread(_objectSpread({}, stateRef.current.date), payload)
32
- });
33
- }
34
27
  };
35
28
  var Cpt = AddService;
36
29
  if (isBooking4Shop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.global) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id, props === null || props === void 0 ? void 0 : (_props$globalState = props.globalState) === null || _props$globalState === void 0 ? void 0 : _props$globalState.renderType)) {
37
30
  Cpt = AddService2;
38
31
  }
39
32
  return /*#__PURE__*/React.createElement(Cpt, {
40
- renderMode: 'current',
33
+ renderMode: "current",
41
34
  dispatch: dispatch,
42
35
  state: globalState,
43
36
  drawerProps: {
@@ -19,7 +19,6 @@ interface SelectDrawerProps {
19
19
  modalOpen: boolean;
20
20
  franchiseeLoading?: number;
21
21
  showHeader?: boolean;
22
- showWalkIn?: boolean;
23
22
  }
24
23
  declare const _default: React.ForwardRefExoticComponent<SelectDrawerProps & React.RefAttributes<unknown>>;
25
24
  export default _default;
@@ -99,8 +99,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
99
99
  handleAddPet = props.handleAddPet,
100
100
  modalOpen = props.modalOpen,
101
101
  franchiseeLoading = props.franchiseeLoading,
102
- showHeader = props.showHeader,
103
- showWalkIn = props.showWalkIn;
102
+ showHeader = props.showHeader;
104
103
  var form = (formData === null || formData === void 0 ? void 0 : formData[0]) || {};
105
104
  var valList = (childrenValue === null || childrenValue === void 0 ? void 0 : childrenValue[form.id]) || defaultArr;
106
105
  var _useState = useState(valList),
@@ -108,6 +107,13 @@ var SelectDrawer = function SelectDrawer(props, ref) {
108
107
  _value = _useState2[0],
109
108
  setValue = _useState2[1];
110
109
  var clientRef = useRef();
110
+ useEffect(function () {
111
+ setValue(valList.map(function (item) {
112
+ return _objectSpread(_objectSpread({}, item), {}, {
113
+ id: item.id || item.form_record_id
114
+ });
115
+ }));
116
+ }, [valList]);
111
117
  var searchRef = useRef();
112
118
 
113
119
  // 是否打开弹窗
@@ -119,13 +125,6 @@ var SelectDrawer = function SelectDrawer(props, ref) {
119
125
  _useState6 = _slicedToArray(_useState5, 2),
120
126
  search = _useState6[0],
121
127
  _setSearch = _useState6[1];
122
- useEffect(function () {
123
- setValue(valList.map(function (item) {
124
- return _objectSpread(_objectSpread({}, item), {}, {
125
- id: item.id || item.form_record_id
126
- });
127
- }));
128
- }, [valList, open]);
129
128
  useEffect(function () {
130
129
  if (!modalOpen) {
131
130
  setOpen(false);
@@ -169,12 +168,12 @@ var SelectDrawer = function SelectDrawer(props, ref) {
169
168
  if (getIsWalkIn(item === null || item === void 0 ? void 0 : item.id)) {
170
169
  return locales.getText('pisell2.text.select-a-customer');
171
170
  }
172
- var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) : '';
171
+ var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) : "";
173
172
  return item.name || (item.display_name || '').trim() || (item.nickname || '').trim() || firstLastName.trim() || '';
174
173
  }, [locales.localeMap]);
175
174
  var handleAddClient = function handleAddClient() {
176
175
  handleCreateItem(function () {
177
- _setSearch('');
176
+ _setSearch("");
178
177
  });
179
178
  };
180
179
  var handleChildrenValueChange = /*#__PURE__*/function () {
@@ -312,7 +311,7 @@ var SelectDrawer = function SelectDrawer(props, ref) {
312
311
  }();
313
312
  return /*#__PURE__*/React.createElement(Drawer, {
314
313
  showGoBack: showHeader,
315
- title: showHeader && locales.getText('pisell2.text.select-customer'),
314
+ title: showHeader && locales.getText("pisell2.text.select-customer"),
316
315
  open: open,
317
316
  onClose: closeDrawer,
318
317
  header: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
@@ -352,13 +351,13 @@ var SelectDrawer = function SelectDrawer(props, ref) {
352
351
  }, /*#__PURE__*/React.createElement(ActionItem, {
353
352
  title: locales.getText('pisell2.text.create-new-customer'),
354
353
  onClick: handleAddClient
355
- }), showWalkIn ? /*#__PURE__*/React.createElement(ActionItem, {
354
+ }), /*#__PURE__*/React.createElement(ActionItem, {
356
355
  title: "Walk-In",
357
356
  onClick: function onClick() {
358
357
  handleSelectClient([]);
359
358
  closeDrawer();
360
359
  }
361
- }) : null), /*#__PURE__*/React.createElement(Spin, {
360
+ })), /*#__PURE__*/React.createElement(Spin, {
362
361
  spinning: !!loading,
363
362
  delay: 500
364
363
  }, !!options.length ? options.map(function (item) {
@@ -32,17 +32,14 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
32
32
  import { formatAddFormValues } from "../../../forms/format";
33
33
  import { moveItemToFront } from "../../utils";
34
34
  import { request } from "../../../utils";
35
- import { isDayBooking, isOpenDeletePet } from "../../service2/utils";
36
- import ChangePetModal from "../../pet/ChangePetModal";
37
35
  var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
38
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$pet6, _state$pet6$formData, _state$pet6$formData$, _state$pet8, _state$client$value4, _state$bookingConfig17, _state$bookingConfig18, _state$bookingConfig19, _state$pet9, _state$pet9$formData, _state$bookingConfig20, _state$bookingConfig21, _state$service2, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig22, _state$client6;
36
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig8, _state$bookingConfig9, _state$bookingConfig10, _state$bookingConfig11, _state$pet3, _state$pet4, _state$pet6, _state$pet6$formData, _state$pet6$formData$, _state$pet8, _state$client$value4, _state$bookingConfig17, _state$bookingConfig18, _state$bookingConfig19, _state$pet9, _state$pet9$formData, _state$bookingConfig20, _state$bookingConfig21, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _state$bookingConfig22, _state$client6;
39
37
  var globalState = props.globalState,
40
38
  setGlobalState = props.setGlobalState;
41
39
  var modalRef = useRef();
42
40
  var state = globalState;
43
41
  var stateRef = useRef(state);
44
42
  var prevCustomerId = useRef(null);
45
- var changePetRef = useRef(null);
46
43
  var context = useEngineContext();
47
44
  var _useState = useState(true),
48
45
  _useState2 = _slicedToArray(_useState, 2),
@@ -96,13 +93,6 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
96
93
  pet: _objectSpread(_objectSpread({}, stateRef.current.pet), payload)
97
94
  });
98
95
  }
99
-
100
- // 设置服务
101
- if (type === 'setService') {
102
- setGlobalState({
103
- service: _objectSpread(_objectSpread({}, stateRef.current.service), payload)
104
- });
105
- }
106
96
  };
107
97
  var boardConfig = useMemo(function () {
108
98
  var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
@@ -120,21 +110,6 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
120
110
  }
121
111
  }, [state === null || state === void 0 ? void 0 : (_state$bookingConfig8 = state.bookingConfig) === null || _state$bookingConfig8 === void 0 ? void 0 : (_state$bookingConfig9 = _state$bookingConfig8.config) === null || _state$bookingConfig9 === void 0 ? void 0 : (_state$bookingConfig10 = _state$bookingConfig9.basic) === null || _state$bookingConfig10 === void 0 ? void 0 : (_state$bookingConfig11 = _state$bookingConfig10.appointment_customer) === null || _state$bookingConfig11 === void 0 ? void 0 : _state$bookingConfig11.type, state === null || state === void 0 ? void 0 : state.modalOpen]);
122
112
  var handleSelectPet = function handleSelectPet(val) {
123
- // 跨日预约,更改表单的时候打开弹窗提示
124
- if (isDayBooking(state)) {
125
- var _isOpenDeletePet = isOpenDeletePet(state, val),
126
- ids = _isOpenDeletePet.ids,
127
- lists = _isOpenDeletePet.lists;
128
- if ((ids === null || ids === void 0 ? void 0 : ids.length) > 0 && (lists === null || lists === void 0 ? void 0 : lists.length) > 0) {
129
- var _changePetRef$current, _state$service;
130
- (_changePetRef$current = changePetRef.current) === null || _changePetRef$current === void 0 ? void 0 : _changePetRef$current.open({
131
- ids: ids,
132
- setGlobalState: setGlobalState,
133
- service: ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [],
134
- state: state
135
- });
136
- }
137
- }
138
113
  setGlobalState({
139
114
  pet: _objectSpread(_objectSpread({}, state.pet), {}, {
140
115
  edit: true,
@@ -271,8 +246,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
271
246
  }, [isWalkIn, formId, (_state$client$value4 = state.client.value) === null || _state$client$value4 === void 0 ? void 0 : _state$client$value4.id, currentPetValue, boardConfig]);
272
247
  var petRender = useMemo(function () {
273
248
  var _state$bookingConfig14, _state$bookingConfig15, _state$bookingConfig16;
274
- // 跨日预约需要显示pet
275
- if ((state !== null && state !== void 0 && state.disabledEdit || boardConfig.type !== 'form') && !isDayBooking(state)) {
249
+ if (state !== null && state !== void 0 && state.disabledEdit || boardConfig.type !== 'form') {
276
250
  return null;
277
251
  }
278
252
  return /*#__PURE__*/React.createElement(React.Fragment, null, !(currentPetValue !== null && currentPetValue !== void 0 && currentPetValue.length) && !isHasFormRecord && !isWalkIn && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Empty, {
@@ -317,7 +291,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
317
291
  },
318
292
  previewItemTitleRender: previewItemTitleRender
319
293
  }));
320
- }, [isWalkIn, isHasFormRecord, state === null || state === void 0 ? void 0 : state.disabledEdit, boardConfig.type, state === null || state === void 0 ? void 0 : (_state$bookingConfig17 = state.bookingConfig) === null || _state$bookingConfig17 === void 0 ? void 0 : (_state$bookingConfig18 = _state$bookingConfig17.holder) === null || _state$bookingConfig18 === void 0 ? void 0 : (_state$bookingConfig19 = _state$bookingConfig18.form) === null || _state$bookingConfig19 === void 0 ? void 0 : _state$bookingConfig19.title, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : _state$pet9$formData[0], state, petDispatch, handleOpenModal, handleOpenClientModal, previewItemTitleRender, handleAddPet, currentPetValue, formId, state === null || state === void 0 ? void 0 : (_state$bookingConfig20 = state.bookingConfig) === null || _state$bookingConfig20 === void 0 ? void 0 : (_state$bookingConfig21 = _state$bookingConfig20.holder) === null || _state$bookingConfig21 === void 0 ? void 0 : _state$bookingConfig21.data_range, (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value]);
294
+ }, [isWalkIn, isHasFormRecord, state === null || state === void 0 ? void 0 : state.disabledEdit, boardConfig.type, state === null || state === void 0 ? void 0 : (_state$bookingConfig17 = state.bookingConfig) === null || _state$bookingConfig17 === void 0 ? void 0 : (_state$bookingConfig18 = _state$bookingConfig17.holder) === null || _state$bookingConfig18 === void 0 ? void 0 : (_state$bookingConfig19 = _state$bookingConfig18.form) === null || _state$bookingConfig19 === void 0 ? void 0 : _state$bookingConfig19.title, (_state$pet9 = state.pet) === null || _state$pet9 === void 0 ? void 0 : (_state$pet9$formData = _state$pet9.formData) === null || _state$pet9$formData === void 0 ? void 0 : _state$pet9$formData[0], state, petDispatch, handleOpenModal, handleOpenClientModal, previewItemTitleRender, handleAddPet, currentPetValue, formId, state === null || state === void 0 ? void 0 : (_state$bookingConfig20 = state.bookingConfig) === null || _state$bookingConfig20 === void 0 ? void 0 : (_state$bookingConfig21 = _state$bookingConfig20.holder) === null || _state$bookingConfig21 === void 0 ? void 0 : _state$bookingConfig21.data_range]);
321
295
  var handleOpenClient = function handleOpenClient() {
322
296
  if (!isWalkIn || state !== null && state !== void 0 && state.disableEventBookingEdit) {
323
297
  return;
@@ -412,10 +386,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
412
386
  loadMore: loadMore,
413
387
  showPet: (boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.type) === 'form',
414
388
  handleAddPet: handleAddPet,
415
- franchiseeLoading: franchiseeLoading,
416
- showWalkIn: !isDayBooking(state)
417
- }), /*#__PURE__*/React.createElement(ChangePetModal, {
418
- ref: changePetRef
389
+ franchiseeLoading: franchiseeLoading
419
390
  }));
420
391
  });
421
392
  export default VerticalClient;
@@ -23,20 +23,17 @@ import Notes from "./notes";
23
23
  import "./index.less";
24
24
  import classNames from 'classnames';
25
25
  import { Skeleton } from 'antd';
26
- import { Service2Cart } from "./service2";
27
- import { isDayBooking, isTerminalDayBooking } from "./service2/utils";
28
26
  import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
29
27
  var defaultModules = {
30
28
  client: 1,
31
29
  date: 1,
32
30
  service: 1,
33
31
  holder: 1,
34
- note: 1,
35
- service2: 0
32
+ note: 1
36
33
  };
37
34
  locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
38
35
  var Info = Provider(function (props) {
39
- var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state5, _modal$state5$notes, _context$appHelper4, _context$appHelper4$u, _classNames, _modal$state6, _React$createElement;
36
+ var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _classNames, _modal$state5, _React$createElement;
40
37
  // return <Payments {...props} />;
41
38
  var style = props.style,
42
39
  globalState = props.globalState,
@@ -108,24 +105,15 @@ var Info = Provider(function (props) {
108
105
  });
109
106
  }, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
110
107
  var notes = useMemo(function () {
111
- var _modal$state4, _modal$state4$notes;
108
+ var _modal$state3, _modal$state3$notes;
112
109
  if (!modules.note) {
113
110
  return null;
114
111
  }
115
-
116
- // 跨日预约一直显示备注
117
- if (isDayBooking(globalState)) {
118
- var _modal$state3, _modal$state3$notes;
119
- return /*#__PURE__*/React.createElement(AddNote, {
120
- value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
121
- onChange: addNote
122
- });
123
- }
124
112
  return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' || globalState.isBookingCreatePage ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
125
- value: (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote,
113
+ value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
126
114
  onChange: addNote
127
115
  });
128
- }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state5 = modal.state) === null || _modal$state5 === void 0 ? void 0 : (_modal$state5$notes = _modal$state5.notes) === null || _modal$state5$notes === void 0 ? void 0 : _modal$state5$notes.orderNote]);
116
+ }, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
129
117
  return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
130
118
  style: style,
131
119
  header: header,
@@ -136,9 +124,9 @@ var Info = Provider(function (props) {
136
124
  })
137
125
  }, _defineProperty(_React$createElement, "style", {
138
126
  height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
139
- }), _defineProperty(_React$createElement, "bodyClassName", classNames('booking-info-warp', (_classNames = {}, _defineProperty(_classNames, 'create-booking-page-info-wrap', isBookingCreatePage), _defineProperty(_classNames, 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode && !isTerminalDayBooking(modal.state)), _classNames))), _React$createElement), /*#__PURE__*/React.createElement("div", {
127
+ }), _defineProperty(_React$createElement, "bodyClassName", classNames('booking-info-warp', (_classNames = {}, _defineProperty(_classNames, 'create-booking-page-info-wrap', isBookingCreatePage), _defineProperty(_classNames, 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode), _classNames))), _React$createElement), /*#__PURE__*/React.createElement("div", {
140
128
  className: "booking-info"
141
- }, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state6 = modal.state) !== null && _modal$state6 !== void 0 && _modal$state6.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
129
+ }, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
142
130
  loading: globalState.loading,
143
131
  round: true,
144
132
  active: true,
@@ -146,6 +134,6 @@ var Info = Provider(function (props) {
146
134
  style: {
147
135
  paddingTop: 20
148
136
  }
149
- }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, modules.service2 ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service2Cart, null) : null) : null, notes, slot ? slot : null))) : null);
137
+ }, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null))) : null);
150
138
  });
151
139
  export default Info;
@@ -64,9 +64,6 @@ var _miniRedux = miniRedux({
64
64
  _val.disabledEdit = false;
65
65
  }
66
66
  state.setGlobalState(_val);
67
- },
68
- setActiveCartId: function setActiveCartId(state, payload) {
69
- state.setGlobalState(payload);
70
67
  }
71
68
  },
72
69
  reducers: {