@pisell/private-materials 6.6.52 → 6.6.54

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 (71) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
  10. package/es/components/booking/addons/index.js +2 -3
  11. package/es/components/booking/components/footer/amount.js +5 -4
  12. package/es/components/booking/components/footer/index.js +0 -7
  13. package/es/components/booking/components/footer/utils.d.ts +1 -1
  14. package/es/components/booking/components/footer/utils.js +15 -10
  15. package/es/components/booking/components/voucher/index.js +1 -7
  16. package/es/components/booking/components/voucher/index.less +1 -4
  17. package/es/components/booking/components/voucherModal/index.less +0 -1
  18. package/es/components/booking/info/service2/utils.js +46 -42
  19. package/es/components/booking/info2/service/editService/index.js +8 -10
  20. package/es/components/booking/info2/service/editService/utils.d.ts +1 -0
  21. package/es/components/booking/info2/service/editService/utils.js +16 -0
  22. package/es/components/booking/payments/index.js +1 -1
  23. package/es/components/checkout/components/WalletPassModule/index.js +0 -1
  24. package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  25. package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
  26. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  27. package/es/components/checkout/hooks/useWalletPass.js +192 -316
  28. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  29. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
  30. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  31. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  32. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  33. package/es/components/pay/toC/index.js +27 -66
  34. package/es/components/pay/toC/model.d.ts +0 -1
  35. package/es/components/pay/toC/serve.d.ts +0 -18
  36. package/es/components/pay/toC/serve.js +1 -29
  37. package/es/components/pay/toC/utils.d.ts +2 -2
  38. package/es/components/pay/toC/utils.js +0 -4
  39. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
  40. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
  41. package/lib/components/booking/addons/index.js +2 -3
  42. package/lib/components/booking/components/footer/amount.js +4 -4
  43. package/lib/components/booking/components/footer/index.js +0 -9
  44. package/lib/components/booking/components/footer/utils.d.ts +1 -1
  45. package/lib/components/booking/components/footer/utils.js +15 -10
  46. package/lib/components/booking/components/voucher/index.js +1 -7
  47. package/lib/components/booking/components/voucher/index.less +1 -4
  48. package/lib/components/booking/components/voucherModal/index.less +0 -1
  49. package/lib/components/booking/info/service2/utils.js +15 -13
  50. package/lib/components/booking/info2/service/editService/index.js +21 -24
  51. package/lib/components/booking/info2/service/editService/utils.d.ts +1 -0
  52. package/lib/components/booking/info2/service/editService/utils.js +16 -0
  53. package/lib/components/booking/payments/index.js +1 -1
  54. package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
  55. package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  56. package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
  57. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  58. package/lib/components/checkout/hooks/useWalletPass.js +108 -157
  59. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  60. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
  61. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  62. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  63. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  64. package/lib/components/pay/toC/index.js +11 -52
  65. package/lib/components/pay/toC/model.d.ts +0 -1
  66. package/lib/components/pay/toC/serve.d.ts +0 -18
  67. package/lib/components/pay/toC/serve.js +0 -6
  68. package/lib/components/pay/toC/utils.d.ts +2 -2
  69. package/lib/components/pay/toC/utils.js +0 -4
  70. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
  71. package/package.json +4 -4
@@ -6,7 +6,6 @@
6
6
  .pisell-voucher-modal-content {
7
7
  max-height: 70vh;
8
8
  overflow-y: auto;
9
- display: flex;
10
9
  }
11
10
 
12
11
  // 隐藏状态下的样式优化
@@ -190,16 +190,17 @@ var handleChangeHolder = (products, currentItem, other) => {
190
190
  };
191
191
  var handleLike = (products, currentItem, other) => {
192
192
  return products.map((item) => {
193
- var _a, _b;
193
+ var _a, _b, _c, _d;
194
+ const isSameGroup = ((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId) && ((_b = item._extend) == null ? void 0 : _b.groupId) === (currentItem == null ? void 0 : currentItem.serviceId);
194
195
  if (currentItem.isParallelResource) {
195
- if (item._id === currentItem.serviceId) {
196
+ if (item._id === currentItem.serviceId || isSameGroup) {
196
197
  return {
197
198
  ...item,
198
199
  _extend: {
199
200
  ...item._extend,
200
201
  resource: {
201
- ...(_a = item._extend) == null ? void 0 : _a.resource,
202
- [currentItem.resourceId]: (_b = item._extend) == null ? void 0 : _b.resource[currentItem.resourceId].map((item2) => ({
202
+ ...(_c = item._extend) == null ? void 0 : _c.resource,
203
+ [currentItem.resourceId]: (_d = item._extend) == null ? void 0 : _d.resource[currentItem.resourceId].map((item2) => ({
203
204
  ...item2,
204
205
  like_status: other.like_status
205
206
  }))
@@ -209,7 +210,7 @@ var handleLike = (products, currentItem, other) => {
209
210
  }
210
211
  return item;
211
212
  } else {
212
- if (item._id === currentItem._id) {
213
+ if (item._id === currentItem._id || isSameGroup) {
213
214
  return {
214
215
  ...item,
215
216
  _extend: {
@@ -224,11 +225,12 @@ var handleLike = (products, currentItem, other) => {
224
225
  };
225
226
  var handleChangeResource = (products, currentItem, other, state) => {
226
227
  return products.map((item) => {
227
- var _a;
228
+ var _a, _b, _c, _d, _e;
228
229
  const { props, value } = other || {};
229
230
  const { isParallelResource, resourceId } = props || {};
231
+ const isSameGroup = ((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId) && ((_b = item._extend) == null ? void 0 : _b.groupId) === ((_d = (_c = currentItem == null ? void 0 : currentItem._origin) == null ? void 0 : _c._extend) == null ? void 0 : _d.groupId);
230
232
  if (isParallelResource) {
231
- if (item._id === currentItem._id) {
233
+ if (item._id === currentItem._id || isSameGroup) {
232
234
  const hasDataItem = (0, import_utils6.getProductExtend)({
233
235
  cacheItem: { ...item, new: 0 },
234
236
  state
@@ -238,21 +240,21 @@ var handleChangeResource = (products, currentItem, other, state) => {
238
240
  return pre;
239
241
  }, {}) : {};
240
242
  item._extend.resource[resourceId] = value.map((d) => {
241
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
243
+ var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i;
242
244
  const currentForm = ((_a2 = hasDataItem._data.resourceMaps) == null ? void 0 : _a2[resourceId]) || {};
243
245
  return (
244
246
  // maps[d] 为真时, 说明是之前已选择, 否则为新增的值,补充数据
245
247
  maps[d] || {
246
- relation_type: ((_c = (_b = currentForm.renderListMaps[d]) == null ? void 0 : _b.usable) == null ? void 0 : _c.relation_type) || "form",
248
+ relation_type: ((_c2 = (_b2 = currentForm.renderListMaps[d]) == null ? void 0 : _b2.usable) == null ? void 0 : _c2.relation_type) || "form",
247
249
  form_id: resourceId,
248
250
  relation_id: d,
249
251
  like_status: "common",
250
252
  // 新添加的数据补充错误信息
251
253
  errors: (0, import_utilsByBooking.getErrorList)(
252
- (_d = currentForm.renderListMaps) == null ? void 0 : _d[d],
254
+ (_d2 = currentForm.renderListMaps) == null ? void 0 : _d2[d],
253
255
  hasDataItem
254
256
  ),
255
- children: (_f = (_e = currentForm.renderListMaps) == null ? void 0 : _e[d]) == null ? void 0 : _f.children,
257
+ children: (_f = (_e2 = currentForm.renderListMaps) == null ? void 0 : _e2[d]) == null ? void 0 : _f.children,
256
258
  metadata: {
257
259
  ...(_h = (_g = currentForm.renderListMaps) == null ? void 0 : _g[d]) == null ? void 0 : _h.metadata,
258
260
  form_name: currentForm.title,
@@ -264,9 +266,9 @@ var handleChangeResource = (products, currentItem, other, state) => {
264
266
  }
265
267
  return item;
266
268
  } else {
267
- if (item._id === currentItem._id) {
269
+ if (item._id === currentItem._id || isSameGroup) {
268
270
  const resourceItem = currentResource(state, other.id, item);
269
- const { relation_type, item_id, schedule_id } = ((_a = resourceItem == null ? void 0 : resourceItem._extend) == null ? void 0 : _a.usableTime) || {};
271
+ const { relation_type, item_id, schedule_id } = ((_e = resourceItem == null ? void 0 : resourceItem._extend) == null ? void 0 : _e.usableTime) || {};
270
272
  return {
271
273
  ...item,
272
274
  _extend: {
@@ -61,13 +61,12 @@ var import_EditTabs = __toESM(require("../../../info/service/editService/EditTab
61
61
  var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
62
62
  var import_dayjs = __toESM(require("dayjs"));
63
63
  var import_utils9 = require("../../../info/service2/Group/utils");
64
- var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
65
64
  var import_useShopDiscountModule = require("../../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
66
65
  var import_DiscountChangeModal = __toESM(require("./DiscountChangeModal"));
67
66
  var import_decimal = __toESM(require("decimal.js"));
68
67
  var submitLock = false;
69
68
  var Info = (_, ref) => {
70
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
69
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
71
70
  const [form] = import_antd.Form.useForm();
72
71
  const useTotal = import_antd.Form.useWatch("total", form);
73
72
  const useResource = import_antd.Form.useWatch("resource", form);
@@ -86,10 +85,6 @@ var Info = (_, ref) => {
86
85
  const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
87
86
  const [open, setOpen] = (0, import_react.useState)(false);
88
87
  const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
89
- const context = (0, import_useEngineContext.default)();
90
- const {
91
- getData
92
- } = (_a = context.appHelper) == null ? void 0 : _a.utils;
93
88
  const valuesRef = (0, import_react.useRef)({});
94
89
  const noInOriginalDiscountIdsRef = (0, import_react.useRef)([]);
95
90
  const isEditedRef = (0, import_react.useRef)(false);
@@ -107,7 +102,7 @@ var Info = (_, ref) => {
107
102
  return true;
108
103
  }
109
104
  return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils4.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
110
- }, [(_b = state == null ? void 0 : state.service) == null ? void 0 : _b.cacheItem]);
105
+ }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
111
106
  const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
112
107
  let values = form.getFieldsValue();
113
108
  let _item = _cacheItem || state.service.cacheItem;
@@ -137,7 +132,7 @@ var Info = (_, ref) => {
137
132
  state.service.cacheItem,
138
133
  useStartTime,
139
134
  useResource,
140
- (_e = (_d = (_c = state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.basic) == null ? void 0 : _e.service_time
135
+ (_d = (_c = (_b = state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.service_time
141
136
  ]);
142
137
  const flexibleOption = (0, import_react.useMemo)(() => {
143
138
  const op = (0, import_utils7.getFlexibleOption)({
@@ -159,7 +154,7 @@ var Info = (_, ref) => {
159
154
  durationProps,
160
155
  useStartTime,
161
156
  currentResource,
162
- (_h = (_g = (_f = state.bookingConfig) == null ? void 0 : _f.config) == null ? void 0 : _g.basic) == null ? void 0 : _h.service_time,
157
+ (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time,
163
158
  useDuration
164
159
  ]);
165
160
  (0, import_react.useEffect)(() => {
@@ -256,7 +251,6 @@ var Info = (_, ref) => {
256
251
  }, 1500);
257
252
  let _list = [...state.service.value];
258
253
  let _item = {
259
- is_price_include_tax: getData("is_price_include_tax"),
260
254
  ...cacheItem ?? state.service.cacheItem,
261
255
  autoClose: false
262
256
  };
@@ -436,7 +430,7 @@ var Info = (_, ref) => {
436
430
  let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
437
431
  let cPrice = Number(useTotal || 0);
438
432
  return cPrice !== oPrice;
439
- }, [useTotal, (_j = (_i = state.service.cacheItem) == null ? void 0 : _i._extend) == null ? void 0 : _j.origin_total]);
433
+ }, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
440
434
  const getResources = () => {
441
435
  var _a2, _b2;
442
436
  let res = (0, import_utils7.formatResources)({
@@ -500,11 +494,11 @@ var Info = (_, ref) => {
500
494
  }, [state.service.editModal, state.isBookingCreatePage]);
501
495
  (0, import_react.useEffect)(() => {
502
496
  getDiscount();
503
- }, [useTotal, (_l = (_k = state.service.cacheItem) == null ? void 0 : _k._extend) == null ? void 0 : _l.origin_total]);
497
+ }, [useTotal, (_k = (_j = state.service.cacheItem) == null ? void 0 : _j._extend) == null ? void 0 : _k.origin_total]);
504
498
  const bundles = (0, import_react.useMemo)(() => {
505
499
  var _a2, _b2, _c2, _d2;
506
500
  return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
507
- }, [(_p = (_o = (_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n._extend) == null ? void 0 : _o.other) == null ? void 0 : _p.bundle]);
501
+ }, [(_o = (_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.other) == null ? void 0 : _o.bundle]);
508
502
  const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
509
503
  var _a2, _b2, _c2, _d2, _e2;
510
504
  const item = state.service.cacheItem;
@@ -534,6 +528,7 @@ var Info = (_, ref) => {
534
528
  customer_id: (_e2 = (_d2 = state.client) == null ? void 0 : _d2.value) == null ? void 0 : _e2.id,
535
529
  value: {
536
530
  ...item._extend.other,
531
+ bundle: (0, import_utils8.mergeBundles)(item._extend.other),
537
532
  ...sessionValue,
538
533
  quantity: values.quantity || item._extend.quantity
539
534
  }
@@ -635,7 +630,7 @@ var Info = (_, ref) => {
635
630
  }
636
631
  return false;
637
632
  }, [state.renderType, isNormalProduct]);
638
- const SelectTime = (_q = window.BaseMaterials) == null ? void 0 : _q.SelectTime;
633
+ const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
639
634
  const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
640
635
  const items = (0, import_react.useMemo)(() => {
641
636
  var _a2, _b2;
@@ -672,7 +667,7 @@ var Info = (_, ref) => {
672
667
  }
673
668
  ))));
674
669
  }, [
675
- (_t = (_s = (_r = state.service) == null ? void 0 : _r.cacheItem) == null ? void 0 : _s._extend) == null ? void 0 : _t.product_name,
670
+ (_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name,
676
671
  bundles,
677
672
  state.amountSymbol,
678
673
  state.isBookingCreatePage
@@ -717,7 +712,7 @@ var Info = (_, ref) => {
717
712
  ));
718
713
  }, [
719
714
  useTotal,
720
- (_v = (_u = state.service.cacheItem) == null ? void 0 : _u._extend) == null ? void 0 : _v.origin_total,
715
+ (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total,
721
716
  state.amountSymbol,
722
717
  state.channelDisabledEdit
723
718
  ]);
@@ -765,7 +760,7 @@ var Info = (_, ref) => {
765
760
  }
766
761
  ) : null
767
762
  ));
768
- }, [SelectTime, (_z = (_y = (_x = (_w = state.bookingConfig) == null ? void 0 : _w.config) == null ? void 0 : _x.basic) == null ? void 0 : _y.service_time) == null ? void 0 : _z.value, isEditGroup]);
763
+ }, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value, isEditGroup]);
769
764
  const endTime = (0, import_react.useMemo)(() => {
770
765
  if (!isEditGroup) {
771
766
  return null;
@@ -804,8 +799,8 @@ var Info = (_, ref) => {
804
799
  ));
805
800
  }, [
806
801
  state.renderType,
807
- (_B = (_A = state.service.cacheItem) == null ? void 0 : _A._data) == null ? void 0 : _B.resources,
808
- (_D = (_C = state.service.cacheItem) == null ? void 0 : _C._data) == null ? void 0 : _D.resourceMaps
802
+ (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources,
803
+ (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps
809
804
  ]);
810
805
  const holder = (0, import_react.useMemo)(() => {
811
806
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
@@ -843,7 +838,7 @@ var Info = (_, ref) => {
843
838
  }, [
844
839
  state.locale,
845
840
  state.isTerminal,
846
- (_G = (_F = (_E = state.service) == null ? void 0 : _E.cacheItem) == null ? void 0 : _F._data) == null ? void 0 : _G.capacitys
841
+ (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys
847
842
  ]);
848
843
  const hiddenQuantity = (0, import_react.useMemo)(() => {
849
844
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
@@ -923,10 +918,10 @@ var Info = (_, ref) => {
923
918
  import_utils.locales.getText("pisell2.text.apply")
924
919
  )
925
920
  );
926
- }, [(_H = state.service.resourcesOrigin) == null ? void 0 : _H.length, isNormalProduct]);
921
+ }, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length, isNormalProduct]);
927
922
  console.log("render edit");
928
923
  console.log(
929
- state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
924
+ state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose),
930
925
  performance.now() - window.pp1,
931
926
  "打开商品1"
932
927
  );
@@ -1029,6 +1024,8 @@ var Info = (_, ref) => {
1029
1024
  var _a2, _b2, _c2;
1030
1025
  delete cacheItem.discount_list;
1031
1026
  (_c2 = (_b2 = (_a2 = cacheItem._extend.other) == null ? void 0 : _a2.bundle) == null ? void 0 : _b2.forEach) == null ? void 0 : _c2.call(_b2, (bundle) => {
1027
+ var _a3;
1028
+ (_a3 = bundle == null ? void 0 : bundle.metadata) == null ? true : delete _a3.custom_product_bundle_map_id;
1032
1029
  bundle == null ? true : delete bundle.discount_list;
1033
1030
  bundle == null ? true : delete bundle.booking_id;
1034
1031
  bundle == null ? true : delete bundle.bundle_selling_price;
@@ -1061,7 +1058,7 @@ var Info = (_, ref) => {
1061
1058
  zIndex: state.service.changeService ? 999 : 1e3,
1062
1059
  forceRender: true,
1063
1060
  mask: state.drawerMask,
1064
- open: !isNoSpecAndPackage && state.service.editModal && !((_J = state.service.cacheItem) == null ? void 0 : _J.autoClose),
1061
+ open: !isNoSpecAndPackage && state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
1065
1062
  title: import_utils.locales.getText("pisell2.text.edit-service"),
1066
1063
  onClose: () => {
1067
1064
  var _a2;
@@ -1087,7 +1084,7 @@ var Info = (_, ref) => {
1087
1084
  display: currentTab === "batch_edit" ? "block" : "none"
1088
1085
  }
1089
1086
  },
1090
- /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_L = (_K = state.client) == null ? void 0 : _K.value) == null ? void 0 : _L.id) && holder),
1087
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_K = (_J = state.client) == null ? void 0 : _J.value) == null ? void 0 : _K.id) && holder),
1091
1088
  /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
1092
1089
  import_noteModal.default,
1093
1090
  {
@@ -32,6 +32,7 @@ export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total
32
32
  * @returns 折扣列表
33
33
  */
34
34
  export declare const getProductAllDiscountList: (cacheItem: any) => any;
35
+ export declare const mergeBundles: (other: any) => any[];
35
36
  /**
36
37
  * 合并 bundle 数据,基于 id 和 product_id 匹配,price 优先使用 originalOther 中的值
37
38
  * @param other - callback 返回的新数据
@@ -32,6 +32,7 @@ __export(utils_exports, {
32
32
  getAutoAllocationStorage: () => getAutoAllocationStorage,
33
33
  getProductAllDiscountList: () => getProductAllDiscountList,
34
34
  mergeBundleWithOriginalPrice: () => mergeBundleWithOriginalPrice,
35
+ mergeBundles: () => mergeBundles,
35
36
  setAutoAllocationStorage: () => setAutoAllocationStorage,
36
37
  setProductPrice: () => setProductPrice
37
38
  });
@@ -96,6 +97,20 @@ var getProductAllDiscountList = (cacheItem) => {
96
97
  discountList.push(...bundleDiscountList);
97
98
  return discountList;
98
99
  };
100
+ var mergeBundles = (other) => {
101
+ const bundle = (other == null ? void 0 : other.bundle) || [];
102
+ const newBundle = [];
103
+ bundle.forEach((item) => {
104
+ const newItem = newBundle.find((newItem2) => newItem2.id === item.id);
105
+ if (newItem) {
106
+ newItem.num += item.num || 1;
107
+ newItem.quantity += item.quantity || 1;
108
+ } else {
109
+ newBundle.push({ ...item });
110
+ }
111
+ });
112
+ return newBundle;
113
+ };
99
114
  var mergeBundleWithOriginalPrice = (other, originalOther) => {
100
115
  var _a, _b;
101
116
  if (!((_a = other == null ? void 0 : other.bundle) == null ? void 0 : _a.length) || !((_b = originalOther == null ? void 0 : originalOther.bundle) == null ? void 0 : _b.length)) return other;
@@ -115,6 +130,7 @@ var mergeBundleWithOriginalPrice = (other, originalOther) => {
115
130
  getAutoAllocationStorage,
116
131
  getProductAllDiscountList,
117
132
  mergeBundleWithOriginalPrice,
133
+ mergeBundles,
118
134
  setAutoAllocationStorage,
119
135
  setProductPrice
120
136
  });
@@ -134,7 +134,7 @@ var Payments = (0, import_model.Provider)((props) => {
134
134
  item.service_fee,
135
135
  2,
136
136
  (state == null ? void 0 : state.amountSymbol) || "$"
137
- ), ")") : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-list-item-date" }, (0, import_dayjs.default)(item.payment_time).format(
137
+ ), ")") : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "payment-list-item-date" }, (0, import_dayjs.default)(item.payment_time || item.created_at).format(
138
138
  "HH:mm YYYY/MM/DD"
139
139
  ), /* @__PURE__ */ import_react.default.createElement("span", { className: "payment-list-item-platform-type" }, item.platform && import_utils.locales.getText("pisell2.text.platform.type")(
140
140
  item.platform
@@ -68,7 +68,6 @@ var WalletPassModule = (0, import_react.forwardRef)(
68
68
  } = (0, import_useWalletPass.useWalletPass)({
69
69
  onSelectChange,
70
70
  customAmount,
71
- totalAmount: Number(orderInfo == null ? void 0 : orderInfo.totalAmount) || 0,
72
71
  clientId
73
72
  });
74
73
  const [expiredModalVisible, setExpiredModalVisible] = (0, import_react.useState)(false);
@@ -1,7 +1,6 @@
1
1
  declare type WalletPassDataType = Record<string, any>;
2
2
  export declare const getAvailableMaxAmount: (data: WalletPassDataType) => any;
3
3
  export declare const voucherTime: (data: WalletPassDataType, key?: string) => any;
4
- export declare const getVoucherAvailableStatus: (item: any) => boolean;
5
4
  export declare const formatMachineCodeServer2CardList: (data: WalletPassDataType[], selectId?: number[], otherProps?: Record<string, any>) => any;
6
5
  export declare const formatDiscountWalletData: (data: any, selectId?: number[]) => any;
7
6
  export interface WalletPassUsageUnit {
@@ -33,7 +33,6 @@ __export(utils_exports, {
33
33
  formatMachineCodeServer2CardList: () => formatMachineCodeServer2CardList,
34
34
  getAvailableMaxAmount: () => getAvailableMaxAmount,
35
35
  getPointCardAmount: () => getPointCardAmount,
36
- getVoucherAvailableStatus: () => getVoucherAvailableStatus,
37
36
  isSameContent: () => isSameContent,
38
37
  voucherTime: () => voucherTime
39
38
  });
@@ -44,9 +43,6 @@ var import_materials = require("@pisell/materials");
44
43
  var import_decimal = __toESM(require("decimal.js"));
45
44
  var Amount = import_materials.PisellText.Amount;
46
45
  var getAvailableMaxAmount = (data) => {
47
- if ((0, import_utils.isNumber)(data._available_max_amount)) {
48
- return data._available_max_amount;
49
- }
50
46
  return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
51
47
  };
52
48
  var voucherTime = (data, key = "expire_date") => {
@@ -59,20 +55,9 @@ var voucherTime = (data, key = "expire_date") => {
59
55
  }
60
56
  return import_utils.locales.getText("pisell2.text.walletPassPermanent");
61
57
  };
62
- var getVoucherAvailableStatus = (item) => {
63
- return item.unified_available_status === 1 && ((0, import_utils.isNumber)(item._unified_available_status) ? !!item._unified_available_status : true);
64
- };
65
58
  var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) => {
66
59
  return (data || []).map((item) => {
67
60
  var _a, _b;
68
- let disabled = false;
69
- if (item.unified_available_status === 0) {
70
- disabled = true;
71
- } else {
72
- if ((0, import_utils.isNumber)(item._unified_available_status)) {
73
- disabled = !item._unified_available_status;
74
- }
75
- }
76
61
  return {
77
62
  id: item.id,
78
63
  name: item.product_name,
@@ -89,8 +74,8 @@ var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) =>
89
74
  showQrCode: false,
90
75
  showStatus: true,
91
76
  code: item.code,
92
- disabled,
93
- disabledReason: (0, import_utils.isNumber)(item._unified_available_status) && item._unified_available_status !== 1 ? item.reason : (_a = item.unified_messages) == null ? void 0 : _a.title,
77
+ disabled: !item.unified_available_status,
78
+ disabledReason: (_a = item.unified_messages) == null ? void 0 : _a.title,
94
79
  cover: (_b = item.product) == null ? void 0 : _b.cover,
95
80
  qrCode: item.code,
96
81
  validDate: voucherTime(item),
@@ -168,7 +153,6 @@ var isSameContent = (arr1, arr2) => {
168
153
  formatMachineCodeServer2CardList,
169
154
  getAvailableMaxAmount,
170
155
  getPointCardAmount,
171
- getVoucherAvailableStatus,
172
156
  isSameContent,
173
157
  voucherTime
174
158
  });
@@ -9,7 +9,6 @@ export declare const useWalletPass: (props: {
9
9
  }[]) => void) | undefined;
10
10
  customAmount?: string | undefined;
11
11
  clientId?: number | undefined;
12
- totalAmount?: number | undefined;
13
12
  }) => {
14
13
  walletRecommendList: any[];
15
14
  userIdentificationCodes: any[];
@@ -30,6 +29,7 @@ export declare const useWalletPass: (props: {
30
29
  selectedDiscountList: any;
31
30
  handleSelectDiscount: (this: unknown, value: number[], option: any) => void;
32
31
  customerName: any;
32
+ fetchWalletRecommendList: (this: unknown, params: any) => Promise<any>;
33
33
  fetchUserIdentificationCodes: (this: unknown, params: any) => Promise<any>;
34
34
  getCachedWalletRecommendList: (this: unknown) => any;
35
35
  getCachedUserIdentificationCodes: (this: unknown) => any;