@pisell/private-materials 3.2.19 → 3.2.21
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +40 -70
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +3 -5
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -6
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.js +4 -11
- package/es/components/appointmentBooking/components/Resource/index.js +13 -3
- package/es/components/appointmentBooking/components/Services/index.js +13 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +1 -1
- package/es/components/appointmentBooking/context.d.ts +4 -0
- package/es/components/appointmentBooking/context.js +14 -1
- package/es/components/appointmentBooking/hooks.d.ts +2 -1
- package/es/components/appointmentBooking/hooks.js +32 -3
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +6 -3
- package/es/components/appointmentBooking/utils.d.ts +1 -0
- package/es/components/appointmentBooking/utils.js +28 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +240 -0
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.js +7 -3
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/shoppingCart/status.js +2 -1
- package/es/components/shoppingCart/type.d.ts +2 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +22 -15
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +2 -5
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +7 -4
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.js +3 -8
- package/lib/components/appointmentBooking/components/Resource/index.js +15 -3
- package/lib/components/appointmentBooking/components/Services/index.js +5 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -1
- package/lib/components/appointmentBooking/context.d.ts +4 -0
- package/lib/components/appointmentBooking/context.js +10 -1
- package/lib/components/appointmentBooking/hooks.d.ts +2 -1
- package/lib/components/appointmentBooking/hooks.js +12 -2
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/appointmentBooking/utils.d.ts +1 -0
- package/lib/components/appointmentBooking/utils.js +30 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +240 -0
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +19 -3
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/shoppingCart/status.js +2 -1
- package/lib/components/shoppingCart/type.d.ts +2 -0
- package/package.json +3 -3
|
@@ -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<
|
|
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
|
-
|
|
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,
|
|
@@ -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) {
|
|
@@ -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 {
|
|
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
|
-
}, [
|
|
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,
|