@pisell/private-materials 3.0.13 → 3.0.14
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/components/addButton/index.d.ts +8 -8
- package/es/components/booking/components/addButton/index.js +1 -1
- package/es/components/booking/components/drawer/index.d.ts +1 -1
- package/es/components/booking/components/footer/FooterMenus/index.js +1 -1
- package/es/components/booking/components/footer/index.js +23 -21
- package/es/components/booking/components/footer/utils.js +4 -3
- package/es/components/booking/forms/forms.js +2 -1
- package/es/components/booking/info/client/index.js +0 -1
- package/es/components/booking/info/date/index.less +1 -1
- package/es/components/booking/info/index.js +10 -4
- package/es/components/booking/info/pet/index.js +5 -7
- package/es/components/booking/info/service/addService/index.js +27 -11
- package/es/components/booking/info/service/editService/index.js +8 -7
- package/es/components/booking/info/service/index.js +1 -1
- package/es/components/booking/info/service/index.less +3 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/model.d.ts +11 -0
- package/es/components/booking/utils.js +2 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/productExtension/card/index.d.ts +10 -0
- package/es/components/productExtension/card/index.js +20 -0
- package/es/components/productExtension/card/index.less +34 -0
- package/es/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
- package/es/components/productExtension/fields/Actor/Container/index.js +34 -0
- package/es/components/productExtension/fields/Actor/Container/index.less +19 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +94 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +5 -0
- package/es/components/productExtension/fields/Actor/index.js +23 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +10 -0
- package/es/components/productExtension/fields/Forms/index.js +184 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +30 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
- package/es/components/productExtension/fields/SelectProducts/index.js +91 -0
- package/es/components/productExtension/fields/SelectProducts/index.less +30 -0
- package/es/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
- package/es/components/productExtension/fields/SelectProducts/mock.js +0 -0
- package/es/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/server.js +29 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.js +198 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
- package/es/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
- package/es/components/productExtension/fields/SelectResourcesTable/mock.js +5072 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +49 -0
- package/es/components/productExtension/fields/index.d.ts +1 -0
- package/es/components/productExtension/fields/index.js +33 -0
- package/es/components/productExtension/index.d.ts +7 -0
- package/es/components/productExtension/index.js +77 -0
- package/es/components/productExtension/index.less +0 -0
- package/es/components/productExtension/locales.d.ts +48 -0
- package/es/components/productExtension/locales.js +47 -0
- package/es/components/productExtension/server.d.ts +1 -0
- package/es/components/productExtension/server.js +29 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +21 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +5 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +20 -5
- package/es/components/selectModal/index.d.ts +24 -0
- package/es/components/selectModal/index.js +108 -0
- package/es/components/selectModal/index.less +0 -0
- package/es/components/tabProduct/card/index.d.ts +2 -2
- package/es/components/tabProduct/card/index.js +3 -4
- package/es/components/tabProduct/index.d.ts +4 -2
- package/es/components/tabProduct/index.js +10 -9
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +22 -0
- package/es/utils/index.js +56 -0
- package/lib/components/booking/components/addButton/index.d.ts +8 -8
- package/lib/components/booking/components/addButton/index.js +1 -1
- package/lib/components/booking/components/drawer/index.d.ts +1 -1
- package/lib/components/booking/components/footer/FooterMenus/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +3 -1
- package/lib/components/booking/components/footer/utils.js +4 -2
- package/lib/components/booking/forms/forms.js +1 -1
- package/lib/components/booking/info/client/index.js +0 -1
- package/lib/components/booking/info/date/index.less +1 -1
- package/lib/components/booking/info/index.js +7 -1
- package/lib/components/booking/info/pet/index.js +5 -7
- package/lib/components/booking/info/service/addService/index.js +25 -10
- package/lib/components/booking/info/service/editService/index.js +7 -5
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/index.less +3 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/model.d.ts +11 -0
- package/lib/components/booking/utils.js +2 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/productExtension/card/index.d.ts +10 -0
- package/lib/components/productExtension/card/index.js +57 -0
- package/lib/components/productExtension/card/index.less +34 -0
- package/lib/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
- package/lib/components/productExtension/fields/Actor/Container/index.js +64 -0
- package/lib/components/productExtension/fields/Actor/Container/index.less +19 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.js +128 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +5 -0
- package/lib/components/productExtension/fields/Actor/index.js +56 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +10 -0
- package/lib/components/productExtension/fields/Forms/index.js +108 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +65 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
- package/lib/components/productExtension/fields/SelectProducts/index.js +111 -0
- package/lib/components/productExtension/fields/SelectProducts/index.less +30 -0
- package/lib/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
- package/lib/components/productExtension/fields/SelectProducts/mock.js +0 -0
- package/lib/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/server.js +33 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.js +179 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/mock.js +12723 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/server.js +39 -0
- package/lib/components/productExtension/fields/index.d.ts +1 -0
- package/lib/components/productExtension/fields/index.js +69 -0
- package/lib/components/productExtension/index.d.ts +7 -0
- package/lib/components/productExtension/index.js +108 -0
- package/lib/components/productExtension/index.less +0 -0
- package/lib/components/productExtension/locales.d.ts +48 -0
- package/lib/components/productExtension/locales.js +71 -0
- package/lib/components/productExtension/server.d.ts +1 -0
- package/lib/components/productExtension/server.js +33 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +11 -6
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +5 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +18 -4
- package/lib/components/selectModal/index.d.ts +24 -0
- package/lib/components/selectModal/index.js +133 -0
- package/lib/components/selectModal/index.less +0 -0
- package/lib/components/tabProduct/card/index.d.ts +2 -2
- package/lib/components/tabProduct/card/index.js +1 -2
- package/lib/components/tabProduct/index.d.ts +4 -2
- package/lib/components/tabProduct/index.js +7 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +22 -0
- package/lib/utils/index.js +59 -0
- package/lowcode/product-extension/meta.ts +120 -0
- package/package.json +1 -1
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from "react";
|
|
9
9
|
import "./index.less";
|
|
10
|
-
interface AddButtonProps {
|
|
11
|
-
onClick
|
|
12
|
-
title
|
|
13
|
-
subTitle
|
|
14
|
-
showSub
|
|
15
|
-
style
|
|
16
|
-
disabled
|
|
17
|
-
loading
|
|
10
|
+
export interface AddButtonProps {
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
title?: string;
|
|
13
|
+
subTitle?: string;
|
|
14
|
+
showSub?: boolean;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
loading?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const AddButton: React.FC<AddButtonProps>;
|
|
20
20
|
export default AddButton;
|
|
@@ -7,7 +7,7 @@ var FooterMenus = function FooterMenus(_ref) {
|
|
|
7
7
|
dispatch = _ref.dispatch;
|
|
8
8
|
var items = useMemo(function () {
|
|
9
9
|
var list = [];
|
|
10
|
-
if (state.bookingId) {
|
|
10
|
+
if (state.bookingId && state.renderType !== 'eventBooking') {
|
|
11
11
|
list.push({
|
|
12
12
|
label: locales.getText("pisell2.text.rebook"),
|
|
13
13
|
key: "rebook"
|
|
@@ -259,7 +259,7 @@ var Footer = function Footer(props) {
|
|
|
259
259
|
*/
|
|
260
260
|
var handleSave = /*#__PURE__*/function () {
|
|
261
261
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref4) {
|
|
262
|
-
var type, _setLoading, saveOtherValue, _state$onSave, callbackData, values, api;
|
|
262
|
+
var type, _setLoading, editApi, createApi, saveOtherValue, _state$onSave, callbackData, values, api;
|
|
263
263
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
264
264
|
while (1) switch (_context4.prev = _context4.next) {
|
|
265
265
|
case 0:
|
|
@@ -267,60 +267,62 @@ var Footer = function Footer(props) {
|
|
|
267
267
|
// 区分loading, 是点击的checkout 还是save
|
|
268
268
|
_setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
|
|
269
269
|
_setLoading(true);
|
|
270
|
+
editApi = state.renderType === 'eventBooking' ? state.apis.editEventBooking : state.apis.editBooking;
|
|
271
|
+
createApi = state.renderType === 'eventBooking' ? state.apis.createEventBooking : state.apis.createBooking;
|
|
270
272
|
saveOtherValue = {};
|
|
271
273
|
if (!(type === "save")) {
|
|
272
|
-
_context4.next =
|
|
274
|
+
_context4.next = 13;
|
|
273
275
|
break;
|
|
274
276
|
}
|
|
275
|
-
_context4.next =
|
|
277
|
+
_context4.next = 9;
|
|
276
278
|
return state === null || state === void 0 ? void 0 : (_state$onSave = state.onSave) === null || _state$onSave === void 0 ? void 0 : _state$onSave.call(state, state.client);
|
|
277
|
-
case
|
|
279
|
+
case 9:
|
|
278
280
|
_context4.t0 = _context4.sent;
|
|
279
281
|
if (_context4.t0) {
|
|
280
|
-
_context4.next =
|
|
282
|
+
_context4.next = 12;
|
|
281
283
|
break;
|
|
282
284
|
}
|
|
283
285
|
_context4.t0 = {};
|
|
284
|
-
case
|
|
286
|
+
case 12:
|
|
285
287
|
saveOtherValue = _context4.t0;
|
|
286
|
-
case
|
|
287
|
-
_context4.prev =
|
|
288
|
+
case 13:
|
|
289
|
+
_context4.prev = 13;
|
|
288
290
|
callbackData = null; // 格式化提交的参数
|
|
289
291
|
values = formatValues(_objectSpread(_objectSpread({}, state), saveOtherValue)); // 区分是新增还是编辑
|
|
290
|
-
api = state.bookingId ?
|
|
292
|
+
api = state.bookingId ? editApi : createApi; // 如果有addons改动, 则先保存
|
|
291
293
|
if (!addonsEdit) {
|
|
292
|
-
_context4.next =
|
|
294
|
+
_context4.next = 20;
|
|
293
295
|
break;
|
|
294
296
|
}
|
|
295
|
-
_context4.next =
|
|
297
|
+
_context4.next = 20;
|
|
296
298
|
return handleSaveAddons();
|
|
297
|
-
case
|
|
299
|
+
case 20:
|
|
298
300
|
if (!infoEdit) {
|
|
299
|
-
_context4.next =
|
|
301
|
+
_context4.next = 25;
|
|
300
302
|
break;
|
|
301
303
|
}
|
|
302
|
-
_context4.next =
|
|
304
|
+
_context4.next = 23;
|
|
303
305
|
return api(values);
|
|
304
|
-
case
|
|
306
|
+
case 23:
|
|
305
307
|
callbackData = _context4.sent;
|
|
306
308
|
message.success(locales.getText(state.bookingId ? "pisell2.text.appointment-updated" : "pisell2.text.created-successfully"));
|
|
307
|
-
case
|
|
309
|
+
case 25:
|
|
308
310
|
// 回调关闭弹窗
|
|
309
311
|
state === null || state === void 0 ? void 0 : state.callback(callbackData);
|
|
310
312
|
_setLoading(false);
|
|
311
313
|
|
|
312
314
|
// return数据 checkout时需要
|
|
313
315
|
return _context4.abrupt("return", callbackData);
|
|
314
|
-
case
|
|
315
|
-
_context4.prev =
|
|
316
|
-
_context4.t1 = _context4["catch"](
|
|
316
|
+
case 30:
|
|
317
|
+
_context4.prev = 30;
|
|
318
|
+
_context4.t1 = _context4["catch"](13);
|
|
317
319
|
console.log(_context4.t1);
|
|
318
320
|
_setLoading(false);
|
|
319
|
-
case
|
|
321
|
+
case 34:
|
|
320
322
|
case "end":
|
|
321
323
|
return _context4.stop();
|
|
322
324
|
}
|
|
323
|
-
}, _callee4, null, [[
|
|
325
|
+
}, _callee4, null, [[13, 30]]);
|
|
324
326
|
}));
|
|
325
327
|
return function handleSave(_x3) {
|
|
326
328
|
return _ref5.apply(this, arguments);
|
|
@@ -26,13 +26,14 @@ var formatCustomer = function formatCustomer(data) {
|
|
|
26
26
|
};
|
|
27
27
|
var formatBookings = function formatBookings(data) {
|
|
28
28
|
var list = data.service.value;
|
|
29
|
+
var eventOtherParams = data.eventOtherParams;
|
|
29
30
|
var bookings = [];
|
|
30
31
|
bookings = list.map(function (item) {
|
|
31
32
|
var start_date = item._extend.startDate.format('YYYY-MM-DD');
|
|
32
33
|
var start_time = item._extend.startDate.format("HH:mm");
|
|
33
34
|
var end_date = item._extend.endDate.format('YYYY-MM-DD');
|
|
34
35
|
var end_time = item._extend.endDate.format("HH:mm");
|
|
35
|
-
return {
|
|
36
|
+
return _objectSpread({
|
|
36
37
|
"product": {
|
|
37
38
|
"num": item._extend.quantity,
|
|
38
39
|
"price": item.price,
|
|
@@ -60,7 +61,7 @@ var formatBookings = function formatBookings(data) {
|
|
|
60
61
|
"start_date": start_date,
|
|
61
62
|
"duration": flexibleObj.getValue(item._extend.duration),
|
|
62
63
|
"number": item._extend.number || 1
|
|
63
|
-
};
|
|
64
|
+
}, eventOtherParams || {});
|
|
64
65
|
});
|
|
65
66
|
return bookings;
|
|
66
67
|
};
|
|
@@ -86,7 +87,7 @@ var formatHolder = function formatHolder(data, values) {
|
|
|
86
87
|
// https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/2778666/detail/53001549?spaceKey=menutech
|
|
87
88
|
export var formatValues = function formatValues(state) {
|
|
88
89
|
var values = {
|
|
89
|
-
type: "appointment_booking",
|
|
90
|
+
type: state.renderType === 'eventBooking' ? "event_booking_v2" : "appointment_booking",
|
|
90
91
|
platform: "shop",
|
|
91
92
|
sales_channel: "my_pisel",
|
|
92
93
|
bookings: [],
|
|
@@ -31,7 +31,8 @@ import "./index.less";
|
|
|
31
31
|
*/
|
|
32
32
|
var Forms = Provider(function (props) {
|
|
33
33
|
var forms = props.forms,
|
|
34
|
-
value = props.value,
|
|
34
|
+
_props$value = props.value,
|
|
35
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
35
36
|
modalOpen = props.modalOpen,
|
|
36
37
|
onChange = props.onChange,
|
|
37
38
|
action = props.action,
|
|
@@ -141,7 +141,6 @@ var Info = function Info() {
|
|
|
141
141
|
return item.name || (item.display_name || "").trim() || (item.nickname || "").trim() || "";
|
|
142
142
|
}, [locales.localeMap]);
|
|
143
143
|
var handleSelectClient = function handleSelectClient(value) {
|
|
144
|
-
console.log("valuevalue", value);
|
|
145
144
|
var _value = (value === null || value === void 0 ? void 0 : value[value.length - 1]) || walkInData;
|
|
146
145
|
if (_value.loading) {
|
|
147
146
|
return;
|
|
@@ -73,12 +73,18 @@ var Info = Provider(function (props) {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
var header = useMemo(function () {
|
|
77
|
+
if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === 'eventBooking') {
|
|
78
|
+
return locales.getText("pisell2.text.enroll");
|
|
79
|
+
}
|
|
80
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
|
|
79
81
|
state: modal.state,
|
|
80
82
|
dispatch: modal.dispatch
|
|
81
|
-
}) : locales.getText("pisell2.text.new-appointment")
|
|
83
|
+
}) : locales.getText("pisell2.text.new-appointment");
|
|
84
|
+
}, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
|
|
85
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, {
|
|
86
|
+
style: style,
|
|
87
|
+
header: header,
|
|
82
88
|
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
83
89
|
state: modal.state,
|
|
84
90
|
dispatch: modal.dispatch,
|
|
@@ -28,7 +28,7 @@ import FormsCom from "../../forms/forms";
|
|
|
28
28
|
import { changeFormValues } from "../../forms/format";
|
|
29
29
|
import { isWalkIn } from "../../utils";
|
|
30
30
|
var Pet = function Pet() {
|
|
31
|
-
var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$
|
|
31
|
+
var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$client$value2, _state$client8, _state$client8$value, _state$client9;
|
|
32
32
|
var _useState = useState(false),
|
|
33
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
34
|
loading = _useState2[0],
|
|
@@ -136,7 +136,6 @@ var Pet = function Pet() {
|
|
|
136
136
|
return _ref2.apply(this, arguments);
|
|
137
137
|
};
|
|
138
138
|
}();
|
|
139
|
-
console.log("values", (_state$pet = state.pet) === null || _state$pet === void 0 ? void 0 : _state$pet.value);
|
|
140
139
|
|
|
141
140
|
/**
|
|
142
141
|
* @title: 获取预约主体表单
|
|
@@ -167,7 +166,7 @@ var Pet = function Pet() {
|
|
|
167
166
|
_context2.prev = 5;
|
|
168
167
|
_context2.next = 8;
|
|
169
168
|
return state.apis.getForms({
|
|
170
|
-
relation_type: "appointment_booking",
|
|
169
|
+
relation_type: state.renderType === 'eventBooking' ? "event_booking_v2" : "appointment_booking",
|
|
171
170
|
relation_id: ((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : (_state$bookingDetail$ = _state$bookingDetail.bookings) === null || _state$bookingDetail$ === void 0 ? void 0 : _state$bookingDetail$.id) || 0
|
|
172
171
|
// _config: { useCache: true },
|
|
173
172
|
});
|
|
@@ -300,11 +299,11 @@ var Pet = function Pet() {
|
|
|
300
299
|
|
|
301
300
|
// 当客户id 发生改变时, 检测当前表单是否是该客户的, 如果不是则移除
|
|
302
301
|
useEffect(function () {
|
|
303
|
-
var _state$
|
|
302
|
+
var _state$pet, _state$client7, _state$client7$value, _state$pet2;
|
|
304
303
|
var changeFormValuesData = changeFormValues({
|
|
305
|
-
values: ((_state$
|
|
304
|
+
values: ((_state$pet = state.pet) === null || _state$pet === void 0 ? void 0 : _state$pet.value) || {},
|
|
306
305
|
clientId: (_state$client7 = state.client) === null || _state$client7 === void 0 ? void 0 : (_state$client7$value = _state$client7.value) === null || _state$client7$value === void 0 ? void 0 : _state$client7$value.id,
|
|
307
|
-
forms: ((_state$
|
|
306
|
+
forms: ((_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.formData) || []
|
|
308
307
|
});
|
|
309
308
|
dispatch({
|
|
310
309
|
type: "setPet",
|
|
@@ -326,7 +325,6 @@ var Pet = function Pet() {
|
|
|
326
325
|
getForms(true);
|
|
327
326
|
}
|
|
328
327
|
}, [state.bookingId, state.bookingDetail, params.form_id, params.type, (_state$client8 = state.client) === null || _state$client8 === void 0 ? void 0 : (_state$client8$value = _state$client8.value) === null || _state$client8$value === void 0 ? void 0 : _state$client8$value.id]);
|
|
329
|
-
console.log("state.pet.formData", state.pet.formData);
|
|
330
328
|
return /*#__PURE__*/React.createElement("div", {
|
|
331
329
|
className: "pisell-lowcode__booking-pet-wraps"
|
|
332
330
|
}, /*#__PURE__*/React.createElement(FormsCom, {
|
|
@@ -34,6 +34,7 @@ var Info = function Info() {
|
|
|
34
34
|
dispatch = _useContext.dispatch;
|
|
35
35
|
var getServices = /*#__PURE__*/function () {
|
|
36
36
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
37
|
+
var _state$eventOtherPara;
|
|
37
38
|
var data;
|
|
38
39
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
40
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -42,12 +43,13 @@ var Info = function Info() {
|
|
|
42
43
|
return state.apis.getServices({
|
|
43
44
|
skip: 1,
|
|
44
45
|
num: 500,
|
|
45
|
-
extension_type: ["product_appointment"],
|
|
46
|
+
extension_type: state.renderType === "eventBooking" ? undefined : ["product_appointment"],
|
|
46
47
|
with: ["category"],
|
|
47
48
|
// include_formula: "no",
|
|
48
49
|
// include_bundle: "no",
|
|
49
50
|
// include_option: "no",
|
|
50
51
|
// include_variant: "no",
|
|
52
|
+
ids: state.renderType === "eventBooking" ? (_state$eventOtherPara = state.eventOtherParams) === null || _state$eventOtherPara === void 0 ? void 0 : _state$eventOtherPara.productIds : undefined,
|
|
51
53
|
open_quotation: 1,
|
|
52
54
|
with_schedule: 0
|
|
53
55
|
});
|
|
@@ -114,7 +116,6 @@ var Info = function Info() {
|
|
|
114
116
|
return isIncludes(item.title);
|
|
115
117
|
} : undefined);
|
|
116
118
|
}, [search, (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.services]);
|
|
117
|
-
console.log("renderList", renderList);
|
|
118
119
|
var isService = useMemo(function () {
|
|
119
120
|
return state.service.value.length > 0;
|
|
120
121
|
}, [state.service.value]);
|
|
@@ -133,16 +134,31 @@ var Info = function Info() {
|
|
|
133
134
|
var showAddButton = useMemo(function () {
|
|
134
135
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
135
136
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
var addButton = useMemo(function () {
|
|
138
|
+
if (state.renderType === "eventBooking") {
|
|
139
|
+
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
style: {
|
|
141
|
+
height: 20
|
|
142
|
+
}
|
|
143
|
+
}) : /*#__PURE__*/React.createElement(AddButton, {
|
|
144
|
+
showSub: false,
|
|
145
|
+
title: locales.getText("pisell2.text.add-a-service"),
|
|
146
|
+
subTitle: locales.getText("pisell2.text.add-another-service"),
|
|
147
|
+
onClick: handleSelectService
|
|
148
|
+
});
|
|
144
149
|
}
|
|
145
|
-
|
|
150
|
+
return showAddButton ? /*#__PURE__*/React.createElement(AddButton, {
|
|
151
|
+
showSub: isService,
|
|
152
|
+
title: locales.getText("pisell2.text.add-a-service"),
|
|
153
|
+
subTitle: locales.getText("pisell2.text.add-another-service"),
|
|
154
|
+
onClick: handleSelectService
|
|
155
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
156
|
+
style: {
|
|
157
|
+
height: 20
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}, [state.renderType, showAddButton, isService, state.service.value]);
|
|
161
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, addButton, /*#__PURE__*/React.createElement(Drawer, {
|
|
146
162
|
open: state.service.addModal,
|
|
147
163
|
title: locales.getText("pisell2.text.select-service"),
|
|
148
164
|
rootClassName: "booking-server-wrap",
|
|
@@ -420,9 +420,10 @@ var Info = function Info() {
|
|
|
420
420
|
if (state.service.editModal) {
|
|
421
421
|
var cacheItem = state.service.cacheItem;
|
|
422
422
|
form.setFieldsValue(getServerItemExtend(state, cacheItem, timeObj));
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
423
|
+
if (state.renderType !== 'eventBooking') {
|
|
424
|
+
// 获取资源列表
|
|
425
|
+
getResources();
|
|
426
|
+
}
|
|
426
427
|
} else {
|
|
427
428
|
form.resetFields();
|
|
428
429
|
}
|
|
@@ -464,10 +465,10 @@ var Info = function Info() {
|
|
|
464
465
|
* @Date: 2024-01-09 14:07
|
|
465
466
|
*/
|
|
466
467
|
useUpdateEffect(function () {
|
|
467
|
-
if (useStartTime && useDuration) {
|
|
468
|
+
if (useStartTime && useDuration && state.renderType !== 'eventBooking') {
|
|
468
469
|
getResources();
|
|
469
470
|
}
|
|
470
|
-
}, [useStartTime, useDuration]);
|
|
471
|
+
}, [useStartTime, useDuration, state.renderType]);
|
|
471
472
|
|
|
472
473
|
/**
|
|
473
474
|
* @title: 打开弹窗时 设置数据
|
|
@@ -601,7 +602,7 @@ var Info = function Info() {
|
|
|
601
602
|
name: "discount_reason"
|
|
602
603
|
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
603
604
|
size: "large"
|
|
604
|
-
}))) : null, /*#__PURE__*/React.createElement(Col, {
|
|
605
|
+
}))) : null, state.renderType !== 'eventBooking' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, {
|
|
605
606
|
span: 12
|
|
606
607
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
607
608
|
label: locales.getText("pisell2.text.start_time"),
|
|
@@ -659,7 +660,7 @@ var Info = function Info() {
|
|
|
659
660
|
}, /*#__PURE__*/React.createElement(InputNumber, null)), /*#__PURE__*/React.createElement(Form.Item, {
|
|
660
661
|
hidden: true,
|
|
661
662
|
name: "like_status"
|
|
662
|
-
}, /*#__PURE__*/React.createElement(Input, null)))), errorList.map(function (d, i) {
|
|
663
|
+
}, /*#__PURE__*/React.createElement(Input, null))))), state.renderType !== 'eventBooking' && errorList.map(function (d, i) {
|
|
663
664
|
return /*#__PURE__*/React.createElement(Alert, {
|
|
664
665
|
key: d.type,
|
|
665
666
|
message: d.label,
|
|
@@ -107,7 +107,7 @@ var Info = function Info() {
|
|
|
107
107
|
}
|
|
108
108
|
}, d.id ? /*#__PURE__*/React.createElement("div", {
|
|
109
109
|
className: "pisell-lowcode__booking-service-item-title"
|
|
110
|
-
}, d.title) : null, d._extend ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
}, d.title) : null, d._extend ? /*#__PURE__*/React.createElement(React.Fragment, null, state.renderType !== 'eventBooking' && /*#__PURE__*/React.createElement("div", {
|
|
111
111
|
className: "pisell-lowcode__booking-service-item-date"
|
|
112
112
|
}, getServiceTime(d, state.date.value)), /*#__PURE__*/React.createElement("div", {
|
|
113
113
|
className: "pisell-lowcode__booking-service-item-technician"
|
|
@@ -40,6 +40,7 @@ declare const _default: {
|
|
|
40
40
|
'pisell2.text.add-notes': string;
|
|
41
41
|
'pisell2.text.notes': string;
|
|
42
42
|
'pisell2.text.new-appointment': string;
|
|
43
|
+
'pisell2.text.enroll': string;
|
|
43
44
|
'pisell2.text.add-products-successfully': string;
|
|
44
45
|
'pisell2.text.add': string;
|
|
45
46
|
'pisell2.text.created-successfully': string;
|
|
@@ -168,6 +169,7 @@ declare const _default: {
|
|
|
168
169
|
'pisell2.text.add-notes': string;
|
|
169
170
|
'pisell2.text.notes': string;
|
|
170
171
|
'pisell2.text.new-appointment': string;
|
|
172
|
+
'pisell2.text.enroll': string;
|
|
171
173
|
'pisell2.text.add-products-successfully': string;
|
|
172
174
|
'pisell2.text.refund': string;
|
|
173
175
|
'pisell2.text.refund-amount': string;
|
|
@@ -291,6 +293,7 @@ declare const _default: {
|
|
|
291
293
|
'pisell2.text.add-notes': string;
|
|
292
294
|
'pisell2.text.notes': string;
|
|
293
295
|
'pisell2.text.new-appointment': string;
|
|
296
|
+
'pisell2.text.enroll': string;
|
|
294
297
|
'pisell2.text.add-products-successfully': string;
|
|
295
298
|
'pisell2.text.add': string;
|
|
296
299
|
'pisell2.text.created-successfully': string;
|
|
@@ -40,6 +40,7 @@ export default {
|
|
|
40
40
|
'pisell2.text.add-notes': 'Add Notes',
|
|
41
41
|
'pisell2.text.notes': 'Notes',
|
|
42
42
|
'pisell2.text.new-appointment': 'New appointment',
|
|
43
|
+
'pisell2.text.enroll': 'Enroll',
|
|
43
44
|
'pisell2.text.add-products-successfully': 'Add products successfully',
|
|
44
45
|
'pisell2.text.add': 'Add',
|
|
45
46
|
'pisell2.text.created-successfully': 'Appointment created',
|
|
@@ -183,6 +184,7 @@ export default {
|
|
|
183
184
|
'pisell2.text.add-notes': '添加备注',
|
|
184
185
|
'pisell2.text.notes': '备注',
|
|
185
186
|
'pisell2.text.new-appointment': '新预约',
|
|
187
|
+
'pisell2.text.enroll': '报名',
|
|
186
188
|
'pisell2.text.add-products-successfully': '添加商品成功',
|
|
187
189
|
'pisell2.text.refund': '退款',
|
|
188
190
|
'pisell2.text.refund-amount': '退款金额',
|
|
@@ -326,6 +328,7 @@ export default {
|
|
|
326
328
|
'pisell2.text.add-notes': '添加備注',
|
|
327
329
|
'pisell2.text.notes': '備注',
|
|
328
330
|
'pisell2.text.new-appointment': '新預約',
|
|
331
|
+
'pisell2.text.enroll': '报名',
|
|
329
332
|
'pisell2.text.add-products-successfully': '添加商品成功',
|
|
330
333
|
//
|
|
331
334
|
'pisell2.text.add': '添加',
|
|
@@ -70,6 +70,17 @@ export interface FormState {
|
|
|
70
70
|
bookingId: string | number;
|
|
71
71
|
bookingDetail: any;
|
|
72
72
|
channelDisabledEdit: boolean;
|
|
73
|
+
renderType?: 'eventBooking';
|
|
74
|
+
eventOtherParams?: {
|
|
75
|
+
relation_id: number;
|
|
76
|
+
number: number;
|
|
77
|
+
registration_type: 'single' | 'all' | 'extra_include';
|
|
78
|
+
start_date: string;
|
|
79
|
+
start_time: string;
|
|
80
|
+
end_date: string;
|
|
81
|
+
end_time: string;
|
|
82
|
+
productIds: number[];
|
|
83
|
+
};
|
|
73
84
|
}
|
|
74
85
|
export declare const walkInData: {
|
|
75
86
|
id: number;
|
|
@@ -443,6 +443,7 @@ export var deleteCacheParams = function deleteCacheParams() {
|
|
|
443
443
|
* @Date: 2024-01-26 14:09
|
|
444
444
|
*/
|
|
445
445
|
export var getServerItemExtend = function getServerItemExtend(state, cacheItem, timeObj) {
|
|
446
|
+
var _cacheItem$duration;
|
|
446
447
|
// 编辑直接返回原数据
|
|
447
448
|
if (!cacheItem.new && cacheItem._extend.endDate) {
|
|
448
449
|
return cacheItem._extend;
|
|
@@ -453,7 +454,7 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
453
454
|
|
|
454
455
|
// 下一个商品的扩展参数
|
|
455
456
|
var _extend = {
|
|
456
|
-
duration: findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem.duration.value)
|
|
457
|
+
duration: findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 ? void 0 : (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value)
|
|
457
458
|
};
|
|
458
459
|
|
|
459
460
|
// 如果有上一个商品, 将上一个商品的某些参数 设置到新商品上
|
package/es/components/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ import BookingNotes from './booking/notes';
|
|
|
5
5
|
import BookingAddons from './booking/addons';
|
|
6
6
|
import BookingForms from './booking/forms';
|
|
7
7
|
import Schedules from './schedules';
|
|
8
|
-
|
|
8
|
+
import ProductExtension from './productExtension';
|
|
9
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension };
|
package/es/components/index.js
CHANGED
|
@@ -5,4 +5,5 @@ import BookingNotes from "./booking/notes";
|
|
|
5
5
|
import BookingAddons from "./booking/addons";
|
|
6
6
|
import BookingForms from "./booking/forms";
|
|
7
7
|
import Schedules from "./schedules";
|
|
8
|
-
|
|
8
|
+
import ProductExtension from "./productExtension";
|
|
9
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
interface LmCardProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
header: React.ReactNode;
|
|
5
|
+
headerClassName: string;
|
|
6
|
+
extra: React.ReactNode;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const LmCard: React.FC<Partial<LmCardProps>>;
|
|
10
|
+
export default LmCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
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; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
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); }
|
|
5
|
+
import React from "react";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import "./index.less";
|
|
8
|
+
var LmCard = function LmCard(props) {
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: classNames("pisell_card", props.className, _defineProperty({}, "pisell_card-hidden", props.hidden)),
|
|
11
|
+
style: props.style
|
|
12
|
+
}, props.header ? /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "pisell_card-header"
|
|
14
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: classNames("pisell_card-title", props.headerClassName)
|
|
16
|
+
}, props.header), props.extra) : null, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: classNames("pisell_card-content")
|
|
18
|
+
}, props.children));
|
|
19
|
+
};
|
|
20
|
+
export default LmCard;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.pisell_card {
|
|
2
|
+
width: 100%;
|
|
3
|
+
background: #ffffff;
|
|
4
|
+
opacity: 1;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
margin-bottom: 20px;
|
|
9
|
+
// overflow: hidden;
|
|
10
|
+
|
|
11
|
+
&.pisell_card-hidden {
|
|
12
|
+
height: 0;
|
|
13
|
+
width: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell_card-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
margin-bottom: 20px;
|
|
24
|
+
|
|
25
|
+
.pisell_card-title {
|
|
26
|
+
height: 28px;
|
|
27
|
+
font-size: 16px;
|
|
28
|
+
// font-weight: 650;
|
|
29
|
+
line-height: 28px;
|
|
30
|
+
color: #252a2d;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
interface ContainerProps {
|
|
4
|
+
title: string;
|
|
5
|
+
children: any;
|
|
6
|
+
desc: string | ReactElement;
|
|
7
|
+
isMargin: boolean;
|
|
8
|
+
hint: string | ReactElement;
|
|
9
|
+
hintProps: object;
|
|
10
|
+
}
|
|
11
|
+
declare const Container: React.FC<Partial<ContainerProps>>;
|
|
12
|
+
export default Container;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Tooltip } from "antd";
|
|
4
|
+
import { QuestionCircleOutlined } from "@ant-design/icons";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
var Container = function Container(_ref) {
|
|
7
|
+
var title = _ref.title,
|
|
8
|
+
children = _ref.children,
|
|
9
|
+
desc = _ref.desc,
|
|
10
|
+
_ref$isMargin = _ref.isMargin,
|
|
11
|
+
isMargin = _ref$isMargin === void 0 ? false : _ref$isMargin,
|
|
12
|
+
hint = _ref.hint,
|
|
13
|
+
hintProps = _ref.hintProps;
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "pisell2_product-extension-container"
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "pisell2_product-extension-container-title-wrap"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "pisell2_product-extension-container-title"
|
|
20
|
+
}, title), hint ? /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
21
|
+
title: hint
|
|
22
|
+
}, hintProps), /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
23
|
+
style: {
|
|
24
|
+
marginLeft: 4,
|
|
25
|
+
cursor: "pointer"
|
|
26
|
+
}
|
|
27
|
+
})) : null), children, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "pisell2_product-extension-container-desc",
|
|
29
|
+
style: {
|
|
30
|
+
marginBottom: isMargin ? "15px" : ""
|
|
31
|
+
}
|
|
32
|
+
}, desc));
|
|
33
|
+
};
|
|
34
|
+
export default Container;
|