@pisell/private-materials 3.2.18 → 3.2.20

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 (105) 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.js +3 -3
  6. package/build/lowcode/view.js +3 -3
  7. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +40 -70
  8. package/es/components/appointmentBooking/components/Cart/Item/Total.js +3 -5
  9. package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -6
  10. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Footer/index.js +4 -11
  12. package/es/components/appointmentBooking/components/Resource/index.js +13 -3
  13. package/es/components/appointmentBooking/components/Services/index.js +13 -1
  14. package/es/components/appointmentBooking/components/TimeSlicing/index.js +19 -6
  15. package/es/components/appointmentBooking/context.d.ts +4 -0
  16. package/es/components/appointmentBooking/context.js +14 -1
  17. package/es/components/appointmentBooking/hooks.d.ts +2 -1
  18. package/es/components/appointmentBooking/hooks.js +32 -3
  19. package/es/components/appointmentBooking/locales.d.ts +3 -0
  20. package/es/components/appointmentBooking/locales.js +6 -3
  21. package/es/components/appointmentBooking/utils.d.ts +1 -0
  22. package/es/components/appointmentBooking/utils.js +28 -0
  23. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  24. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  25. package/es/components/booking/info/date/index.d.ts +0 -1
  26. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  27. package/es/components/booking/info/notes/index.d.ts +0 -1
  28. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  29. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  30. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  31. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  32. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  33. package/es/components/booking/info/service2/utils.d.ts +240 -0
  34. package/es/components/booking/info/utils.js +1 -1
  35. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  36. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  37. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  38. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  39. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  40. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  41. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  42. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  43. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  44. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  45. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  46. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  47. package/es/components/shoppingCart/components/Cart/Product.js +7 -3
  48. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  49. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  50. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  51. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  52. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  53. package/es/components/shoppingCart/index.d.ts +0 -1
  54. package/es/components/shoppingCart/status.js +2 -1
  55. package/es/components/shoppingCart/type.d.ts +2 -0
  56. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +22 -15
  57. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +2 -5
  58. package/lib/components/appointmentBooking/components/Cart/Item/index.js +7 -4
  59. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  60. package/lib/components/appointmentBooking/components/Footer/index.js +3 -8
  61. package/lib/components/appointmentBooking/components/Resource/index.js +15 -3
  62. package/lib/components/appointmentBooking/components/Services/index.js +5 -1
  63. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +15 -4
  64. package/lib/components/appointmentBooking/context.d.ts +4 -0
  65. package/lib/components/appointmentBooking/context.js +10 -1
  66. package/lib/components/appointmentBooking/hooks.d.ts +2 -1
  67. package/lib/components/appointmentBooking/hooks.js +12 -2
  68. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  69. package/lib/components/appointmentBooking/locales.js +6 -3
  70. package/lib/components/appointmentBooking/utils.d.ts +1 -0
  71. package/lib/components/appointmentBooking/utils.js +30 -0
  72. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  73. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  74. package/lib/components/booking/info/date/index.d.ts +0 -1
  75. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  76. package/lib/components/booking/info/notes/index.d.ts +0 -1
  77. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  78. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  79. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  80. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  81. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  82. package/lib/components/booking/info/service2/utils.d.ts +240 -0
  83. package/lib/components/booking/info/utils.js +1 -1
  84. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  85. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  86. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  87. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  88. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  89. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  90. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  91. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  92. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  93. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  94. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  95. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  96. package/lib/components/shoppingCart/components/Cart/Product.js +19 -3
  97. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  98. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  99. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  100. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  101. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  102. package/lib/components/shoppingCart/index.d.ts +0 -1
  103. package/lib/components/shoppingCart/status.js +2 -1
  104. package/lib/components/shoppingCart/type.d.ts +2 -0
  105. package/package.json +4 -4
@@ -41,14 +41,25 @@ var Resource = ({ params }) => {
41
41
  const { times, resources, appointmentBooking, carts } = (0, import_context.useAppointmentBookingContext)();
42
42
  console.log(params, resources, times, "wh8765");
43
43
  const onClick = async (e) => {
44
- var _a, _b, _c;
44
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
45
45
  setSelectedResource(e == null ? void 0 : e.start_time);
46
46
  const data = await appointmentBooking.autoSelectResource({
47
- resourceProductData: (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.product,
48
- resources: (_c = (_b = resources == null ? void 0 : resources[0]) == null ? void 0 : _b.resources) == null ? void 0 : _c[1],
47
+ resourceProductData: resources == null ? void 0 : resources[0],
48
+ resources: (_c = (_b = (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[1]) == null ? void 0 : _c.renderList,
49
49
  timeSlots: e
50
50
  });
51
- console.log(data, "wh9879676");
51
+ if (data) {
52
+ const _resources = [
53
+ (_g = (_f = (_e = (_d = resources == null ? void 0 : resources[0]) == null ? void 0 : _d.resources) == null ? void 0 : _e[0]) == null ? void 0 : _f.renderList) == null ? void 0 : _g[0],
54
+ (_k = (_j = (_i = (_h = resources == null ? void 0 : resources[0]) == null ? void 0 : _h.resources) == null ? void 0 : _i[1]) == null ? void 0 : _j.renderList) == null ? void 0 : _k[0]
55
+ ];
56
+ const aa = await appointmentBooking.submitTimeSlot({
57
+ resourceProductData: resources == null ? void 0 : resources[0],
58
+ selectedResources: _resources,
59
+ timeSlots: e
60
+ });
61
+ console.log(data, _resources, aa, "wh9879676");
62
+ }
52
63
  };
53
64
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-time-slicing-wrap" }, times.map((item, index) => {
54
65
  return /* @__PURE__ */ import_react.default.createElement(
@@ -15,6 +15,10 @@ interface AppointmentBookingContextType {
15
15
  isLastStep?: boolean;
16
16
  setIsLastStep: (val: boolean) => void;
17
17
  setCurrentStep: (val: any) => void;
18
+ appHelper?: any;
19
+ symbolic?: any;
20
+ resourceOtherParams?: any;
21
+ setResourceOtherParams: (val: any) => void;
18
22
  }
19
23
  export declare const AppointmentBookingProvider: ({ children, }: {
20
24
  children: ReactNode;
@@ -35,10 +35,12 @@ __export(context_exports, {
35
35
  module.exports = __toCommonJS(context_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_hooks = require("./hooks");
38
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
38
39
  var AppointmentBookingContext = (0, import_react.createContext)(void 0);
39
40
  var AppointmentBookingProvider = ({
40
41
  children
41
42
  }) => {
43
+ var _a;
42
44
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
43
45
  const [products, setProducts] = (0, import_react.useState)([]);
44
46
  const [summary, setSummary] = (0, import_react.useState)({});
@@ -49,6 +51,9 @@ var AppointmentBookingProvider = ({
49
51
  );
50
52
  const [isLastStep, setIsLastStep] = (0, import_react.useState)(false);
51
53
  const [carts, setCarts] = (0, import_react.useState)([]);
54
+ const [resourceOtherParams, setResourceOtherParams] = (0, import_react.useState)({});
55
+ const { appHelper } = (0, import_useEngineContext.default)();
56
+ const symbolic = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.getSymbolic();
52
57
  console.log(3234234, times, resources);
53
58
  const value = {
54
59
  appointmentBooking,
@@ -65,7 +70,11 @@ var AppointmentBookingProvider = ({
65
70
  setSummary,
66
71
  setCurrentStep,
67
72
  setIsLastStep,
68
- setCarts
73
+ setCarts,
74
+ appHelper,
75
+ symbolic,
76
+ resourceOtherParams,
77
+ setResourceOtherParams
69
78
  };
70
79
  return /* @__PURE__ */ import_react.default.createElement(AppointmentBookingContext.Provider, { value }, children);
71
80
  };
@@ -19,5 +19,6 @@ export declare const useAppointmentBookingAccount: () => {
19
19
  };
20
20
  export declare const useAppointmentBookingResource: () => {
21
21
  getResourceTimeSlot: (params: any) => Promise<void>;
22
- getResourceList: () => Promise<void>;
22
+ getResourceList: () => Promise<any>;
23
+ autoSelectAllProductResources: (code: string) => Promise<void>;
23
24
  };
@@ -148,8 +148,9 @@ var useAppointmentBookingAccount = () => {
148
148
  return { currentUser, accountLists };
149
149
  };
150
150
  var useAppointmentBookingResource = () => {
151
- const { appointmentBooking, setResources, setTimes } = (0, import_context.useAppointmentBookingContext)();
151
+ const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
152
152
  const { resourceSort } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
153
+ console.log(appointmentBooking, "appointmentBooking22");
153
154
  const getResourceTimeSlot = async (params) => {
154
155
  const data = await appointmentBooking.getResourceTimeSlot(params);
155
156
  setTimes(data || []);
@@ -163,8 +164,17 @@ var useAppointmentBookingResource = () => {
163
164
  };
164
165
  });
165
166
  setResources(resources || []);
167
+ return resources;
166
168
  };
167
- return { getResourceTimeSlot, getResourceList };
169
+ const autoSelectAllProductResources = async (code) => {
170
+ let res = await appointmentBooking.autoSelectAllProductResources(code);
171
+ console.log(res, "autoSelectAllProductResources");
172
+ setResourceOtherParams({
173
+ ...resourceOtherParams,
174
+ ...res
175
+ });
176
+ };
177
+ return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
168
178
  };
169
179
  // Annotate the CommonJS export names for ESM import in node:
170
180
  0 && (module.exports = {
@@ -74,6 +74,7 @@ declare const _default: {
74
74
  'pisell2.appointment.add.guest': string;
75
75
  'pisell2.appointment.edit.service': string;
76
76
  'pisell2.appointment.remove.guest': string;
77
+ 'pisell2.appointment.no.available.service': string;
77
78
  };
78
79
  'zh-CN': {
79
80
  'pisell2.event.calendar.limit.unavailable': string;
@@ -150,6 +151,7 @@ declare const _default: {
150
151
  'pisell2.appointment.add.guest': string;
151
152
  'pisell2.appointment.edit.service': string;
152
153
  'pisell2.appointment.remove.guest': string;
154
+ 'pisell2.appointment.no.available.service': string;
153
155
  };
154
156
  'zh-HK': {
155
157
  'pisell2.event.calendar.limit.unavailable': string;
@@ -226,6 +228,7 @@ declare const _default: {
226
228
  'pisell2.appointment.add.guest': string;
227
229
  'pisell2.appointment.edit.service': string;
228
230
  'pisell2.appointment.remove.guest': string;
231
+ 'pisell2.appointment.no.available.service': string;
229
232
  };
230
233
  };
231
234
  export default _default;
@@ -97,7 +97,8 @@ var locales_default = {
97
97
  "pisell2.appointment.service.title": (val) => `${val} ${val > 1 ? "services" : "service"}`,
98
98
  "pisell2.appointment.add.guest": "Add guest",
99
99
  "pisell2.appointment.edit.service": "Edit services",
100
- "pisell2.appointment.remove.guest": "Remove guest"
100
+ "pisell2.appointment.remove.guest": "Remove guest",
101
+ "pisell2.appointment.no.available.service": "No available times for this service. Please choose another."
101
102
  },
102
103
  "zh-CN": {
103
104
  "pisell2.event.calendar.limit.unavailable": "不可预约",
@@ -173,7 +174,8 @@ var locales_default = {
173
174
  "pisell2.appointment.service.title": (val) => `${val}个服务`,
174
175
  "pisell2.appointment.add.guest": "添加预约人",
175
176
  "pisell2.appointment.edit.service": "编辑服务",
176
- "pisell2.appointment.remove.guest": "移除预约人"
177
+ "pisell2.appointment.remove.guest": "移除预约人",
178
+ "pisell2.appointment.no.available.service": "此服务无可用时间,请选择其他服务。"
177
179
  },
178
180
  "zh-HK": {
179
181
  "pisell2.event.calendar.limit.unavailable": "不可預約",
@@ -249,6 +251,7 @@ var locales_default = {
249
251
  "pisell2.appointment.service.title": (val) => `${val}个服務`,
250
252
  "pisell2.appointment.add.guest": "添加預約人",
251
253
  "pisell2.appointment.edit.service": "編輯服務",
252
- "pisell2.appointment.remove.guest": "移除預約人"
254
+ "pisell2.appointment.remove.guest": "移除預約人",
255
+ "pisell2.appointment.no.available.service": "此服务无可用时间,请选择其他服务。"
253
256
  }
254
257
  };
@@ -45,6 +45,7 @@ export declare const formatMonthDisplay: (dateString: string) => string;
45
45
  export declare const resourceTitle: (data: any) => any;
46
46
  export declare const formatHolder: (data: any[]) => any[];
47
47
  export declare const formatGuest: (data: any[], products: any) => any[];
48
+ export declare const formatCarts: (data: any[], resources: any[]) => any[];
48
49
  /**
49
50
  * @title: 对资源进行排序
50
51
  * @description:
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var utils_exports = {};
31
31
  __export(utils_exports, {
32
32
  formatBackgroundColors: () => formatBackgroundColors,
33
+ formatCarts: () => formatCarts,
33
34
  formatGuest: () => formatGuest,
34
35
  formatHolder: () => formatHolder,
35
36
  formatMonthDisplay: () => formatMonthDisplay,
@@ -108,6 +109,34 @@ var formatGuest = (data, products) => {
108
109
  };
109
110
  });
110
111
  };
112
+ var formatCarts = (data, resources) => {
113
+ var _a;
114
+ const context = (0, import_useEngineContext.default)();
115
+ const utils = context.appHelper.utils || {};
116
+ const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
117
+ const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
118
+ console.log(resources, data, "wh987utils");
119
+ return data == null ? void 0 : data.map((d) => {
120
+ var _a2, _b;
121
+ const currentResource = resources.find((r) => (d == null ? void 0 : d._id) === (r == null ? void 0 : r._id));
122
+ let currentResources = (_b = (_a2 = currentResource == null ? void 0 : currentResource.resources) == null ? void 0 : _a2[0]) == null ? void 0 : _b.renderList;
123
+ currentResources = currentResources == null ? void 0 : currentResources.map((d2) => {
124
+ return {
125
+ ...d2,
126
+ label: d2 == null ? void 0 : d2.main_field
127
+ };
128
+ });
129
+ return {
130
+ ...d,
131
+ format: ["HH:mm", "HH:mm"],
132
+ show_time: true,
133
+ duration_type: d.duration.type,
134
+ locale,
135
+ symbol,
136
+ resources: currentResources
137
+ };
138
+ });
139
+ };
111
140
  var sortResources = (resources, resourceSort) => {
112
141
  try {
113
142
  let sortedResources = resources.sort((a, b) => {
@@ -140,6 +169,7 @@ var sortResources = (resources, resourceSort) => {
140
169
  // Annotate the CommonJS export names for ESM import in node:
141
170
  0 && (module.exports = {
142
171
  formatBackgroundColors,
172
+ formatCarts,
143
173
  formatGuest,
144
174
  formatHolder,
145
175
  formatMonthDisplay,
@@ -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 { 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 './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -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
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -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;
@@ -0,0 +1,240 @@
1
+ import dayjs from 'dayjs';
2
+ export declare const formatActiveKey: (lists: any[], platform: string, isEdit: boolean) => any[];
3
+ /**
4
+ * @title: 获取资源名称
5
+ * @description:
6
+ * @param {any} id
7
+ * @param {any} state
8
+ * @return {*}
9
+ * @Author: WangHan
10
+ * @Date: 2024-11-29 18:02
11
+ */
12
+ export declare const getResourceItem: (id: any, state: any) => any;
13
+ /**
14
+ * @title: 错误提示
15
+ * @description:
16
+ * @param {any} service
17
+ * @param {any} resourceItem
18
+ * @return {*}
19
+ * @Author: WangHan
20
+ * @Date: 2024-11-29 18:41
21
+ */
22
+ export declare const getErrorMessage: (service: any, resourceItem: any, isDay?: boolean) => any;
23
+ /**
24
+ * @title: 格式化主体列表
25
+ * @description:
26
+ * @param {any} lists
27
+ * @param {boolean} isOpenGroup
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2024-12-04 11:27
31
+ */
32
+ export declare const formatHolderLists: (lists: any) => any;
33
+ export declare const isBookingProduct: (extension_type: any, bol?: boolean) => boolean | undefined;
34
+ /**
35
+ * @title: 是否是预约商品
36
+ * @description:
37
+ * @return {*}
38
+ * @Author: WangHan
39
+ * @Date: 2024-12-06 11:24
40
+ */
41
+ export declare const isDayBookingProduct: (item: any, state: any) => boolean | undefined;
42
+ /**
43
+ * @title: 更新商品数据
44
+ * @description:
45
+ * @param {any} state
46
+ * @param {string} type
47
+ * @param {any} _id // 商品id
48
+ * @param {any} other
49
+ * @return {*}
50
+ * @Author: WangHan
51
+ * @Date: 2025-01-03 15:00
52
+ */
53
+ export declare const updateServices: (state: any, currentItem: any, type?: string, other?: any) => any;
54
+ export declare const formItems: (items: any[]) => any[];
55
+ /**
56
+ * @title: 格式化商品数据
57
+ * @description:
58
+ * @param {any} lists
59
+ * @return {*}
60
+ * @Author: WangHan
61
+ * @Date: 2024-11-29 17:36
62
+ */
63
+ export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean) => {
64
+ id: any;
65
+ _id: any;
66
+ name: any;
67
+ price: any;
68
+ total: any;
69
+ origin_total: any;
70
+ num: any;
71
+ image: any;
72
+ isShowNote: boolean;
73
+ note: any;
74
+ like_status: any;
75
+ bundle: any;
76
+ options: any;
77
+ errorMessage: string;
78
+ product_option_string: any;
79
+ discount_reason: any;
80
+ resource_id: any;
81
+ relation_form_name: any;
82
+ holder_title: any;
83
+ start_date: any;
84
+ end_date: any;
85
+ holder_id: any;
86
+ isNormalProduct: boolean;
87
+ locale: any;
88
+ symbol: any;
89
+ items: any[];
90
+ _origin: any;
91
+ }[];
92
+ /**
93
+ * @title: 禁用日期
94
+ * @description:
95
+ * @param {any} current
96
+ * @param {string} position
97
+ * @param {any} startDate
98
+ * @return {*}
99
+ * @Author: WangHan
100
+ * @Date: 2024-12-03 17:51
101
+ */
102
+ export declare const disabledDate: (current: any, position: string, currentDate: any) => any;
103
+ /**
104
+ * @title: 是否是跨日预约
105
+ * @description:
106
+ * @param {any} state
107
+ * @return {*}
108
+ * @Author: WangHan
109
+ * @Date: 2024-12-04 09:49
110
+ */
111
+ export declare const isDayBooking: (state: any) => boolean;
112
+ export declare const isDaysBooking: (state: any) => boolean;
113
+ export declare const isEventBooking: (state: any) => boolean;
114
+ export declare const isAppointmentProduct: (item: any) => boolean;
115
+ /**
116
+ * @title: 是否是terminal上的跨日预约
117
+ * @description:
118
+ * @param {any} state
119
+ * @return {*}
120
+ * @Author: WangHan
121
+ * @Date: 2024-12-04 15:31
122
+ */
123
+ export declare const isTerminalDayBooking: (state: any) => any;
124
+ export declare const formatDayDate: (_extend: any) => any;
125
+ /**
126
+ * @title: 根据营业日时间格式化时间
127
+ * @description:
128
+ * @param {any} state
129
+ * @return {*}
130
+ * @Author: WangHan
131
+ * @Date: 2024-12-04 12:07
132
+ */
133
+ export declare const formatDayTime: ({ startDate, endDate }: any) => {
134
+ startDateTime: dayjs.Dayjs;
135
+ endDateTime: dayjs.Dayjs;
136
+ };
137
+ export declare const formatDateTime: (start_date: any, end_date: any) => {
138
+ value: dayjs.Dayjs;
139
+ end_date: dayjs.Dayjs;
140
+ };
141
+ /**
142
+ * @title: 初始化日期
143
+ * @description:
144
+ * @return {*}
145
+ * @Author: WangHan
146
+ * @Date: 2024-12-06 17:24
147
+ */
148
+ export declare const initDate: () => {
149
+ value: dayjs.Dayjs;
150
+ end_date: dayjs.Dayjs;
151
+ };
152
+ /**
153
+ * @title: 是否有预约商品
154
+ * @description:
155
+ * @return {*}
156
+ * @Author: WangHan
157
+ * @Date: 2024-12-12 15:47
158
+ */
159
+ export declare const isHasDayAppointmentProduct: (state: any) => boolean;
160
+ /**
161
+ * @title: 过滤出如果是预约商品,则只获取跨日的预约商品
162
+ * @description:
163
+ * @param {any} lists
164
+ * @return {*}
165
+ * @Author: WangHan
166
+ * @Date: 2024-12-13 16:44
167
+ */
168
+ export declare const getDayProducts: (holderId: number, lists: any, isTerminal?: boolean) => any;
169
+ /**
170
+ * @title: 格式化表单数据
171
+ * @description:
172
+ * @param {any} state
173
+ * @return {*}
174
+ * @Author: WangHan
175
+ * @Date: 2024-12-30 22:19
176
+ */
177
+ export declare const getPets: (state: any) => any;
178
+ /**
179
+ * @title: 得出预约商品
180
+ * @description:
181
+ * @param {any} state
182
+ * @return {*}
183
+ * @Author: WangHan
184
+ * @Date: 2024-12-30 22:26
185
+ */
186
+ export declare const getAppointmentService: (state: any) => any;
187
+ /**
188
+ * @title: 判断是否打开删除宠物弹窗
189
+ * @description:
190
+ * @param {any} state
191
+ * @param {any} newVal
192
+ * @return {*}
193
+ * @Author: WangHan
194
+ * @Date: 2024-12-16 16:12
195
+ */
196
+ export declare const isOpenDeletePet: (state: any, newVal: any) => {
197
+ ids: any;
198
+ lists: any;
199
+ };
200
+ /**
201
+ * @title: 当前选中的表单id
202
+ * @description:
203
+ * @param {any} state
204
+ * @return {*}
205
+ * @Author: WangHan
206
+ * @Date: 2024-12-17 14:40
207
+ */
208
+ export declare const holderId: (state: any) => number;
209
+ /**
210
+ * @title: 更新套餐的价格
211
+ * @description:
212
+ * @param {any} currentValue
213
+ * @param {any} newBundleData
214
+ * @return {*}
215
+ * @Author: WangHan
216
+ * @Date: 2024-12-31 15:16
217
+ */
218
+ export declare function updateNormalBundlePrice(currentValue: any, newBundleData: any): any[];
219
+ /**
220
+ * @title: 更新预约商品报价单
221
+ * @description:
222
+ * @param {any} state
223
+ * @param {any} cacheItem
224
+ * @return {*}
225
+ * @Author: WangHan
226
+ * @Date: 2024-12-25 16:41
227
+ */
228
+ export declare const updateAppointmentServicePrice: (state: any, { start_date, end_date, product_id }: any) => Promise<{
229
+ multiDayPrices: any;
230
+ price: number;
231
+ }>;
232
+ /**
233
+ * @title: 更新普通商品报价单价格
234
+ * @description:
235
+ * @param {any} state
236
+ * @return {*}
237
+ * @Author: WangHan
238
+ * @Date: 2024-12-24 11:32
239
+ */
240
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -99,7 +99,7 @@ var isBooking4Shop = (shopId, renderType) => {
99
99
  if (renderType === "eventBooking") {
100
100
  return false;
101
101
  }
102
- const booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586];
102
+ const booking4Shops = [9, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586];
103
103
  return booking4Shops.includes(shopId);
104
104
  };
105
105
  function generateDateRange(start, end) {
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface DurationProps extends SelectProps {
4
3
  locale?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  interface StartTimeProps extends SelectProps {
4
3
  locale?: string;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const CartItem: () => JSX.Element;
3
+ export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const Actor: ({ name }: {
3
2
  name: string;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface valueType {
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProductProps } from '../../type';
3
2
  declare const Product: (props: ProductProps) => JSX.Element;
4
3
  export default Product;
@@ -40,7 +40,15 @@ var import_useAddService = __toESM(require("../../hooks/useAddService"));
40
40
  var Product = (props) => {
41
41
  const { id, lists, isAdd = true } = props;
42
42
  const { state, onAction, onChange } = (0, import_useContext.useContext)();
43
- const { disabledEdit, isShowPackageNote, isShowNote, hideAddBtn, platform } = state;
43
+ const {
44
+ disabledEdit,
45
+ isShowPackageNote,
46
+ isShowNote,
47
+ hideAddBtn,
48
+ platform,
49
+ isShowChangeResource,
50
+ isShowDelete
51
+ } = state;
44
52
  const clearCart = (0, import_useClearCart.default)(id);
45
53
  const handleChange = (item, type, other) => {
46
54
  if (disabledEdit && !(other == null ? void 0 : other.disabled)) return;
@@ -50,9 +58,17 @@ var Product = (props) => {
50
58
  return {
51
59
  isShowNote,
52
60
  isShowPackageNote,
53
- disabledEdit
61
+ disabledEdit,
62
+ isShowChangeResource,
63
+ isShowDelete
54
64
  };
55
- }, [isShowNote, isShowPackageNote, disabledEdit]);
65
+ }, [
66
+ isShowNote,
67
+ isShowPackageNote,
68
+ disabledEdit,
69
+ isShowChangeResource,
70
+ isShowDelete
71
+ ]);
56
72
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-content" }, clearCart, lists == null ? void 0 : lists.map((item) => {
57
73
  return /* @__PURE__ */ import_react.default.createElement(
58
74
  import_materials.ProductCard,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: () => JSX.Element;
4
3
  export default Cart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Empty: (props: any) => JSX.Element;
4
3
  export default Empty;