@pisell/private-materials 3.0.162-gray → 3.0.162
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/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 +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/components/footer/index.js +5 -34
- package/es/components/booking/forms/forms.d.ts +0 -1
- package/es/components/booking/forms/forms.js +2 -4
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +6 -4
- package/es/components/booking/info/client/index.js +1 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
- package/es/components/booking/info/clientVariant/vertical/index.js +5 -6
- package/es/components/booking/info/clientVariant/vertical/index.less +0 -8
- package/es/components/booking/info/index.less +0 -19
- package/es/components/booking/info/main.js +5 -11
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +3 -9
- package/es/components/booking/info/service/addService/index.js +36 -82
- package/es/components/booking/info/service/addService/index.less +1 -27
- package/es/components/booking/info/service/editService/index.js +13 -11
- package/es/components/booking/info/service/index.js +2 -5
- package/es/components/booking/info/service/index.less +0 -18
- package/es/components/booking/info/service/serviceItem/index.d.ts +3 -3
- package/es/components/booking/info/service/serviceItem/index.js +8 -22
- package/es/components/booking/info/service/serviceItem/index.less +0 -8
- package/es/components/booking/info/service/serviceList/index.js +1 -20
- package/es/components/booking/info2/index.js +3 -9
- package/es/components/booking/info2/service/addService/index.d.ts +2 -8
- package/es/components/booking/info2/service/addService/index.js +36 -82
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/info2/service/editService/index.js +4 -11
- package/es/components/booking/info2/service/index.js +2 -5
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -1
- package/es/components/booking/info2/service/serviceItem/index.js +3 -16
- package/es/components/booking/info2/service/serviceList/index.js +1 -20
- package/es/components/booking/info2/utilsByBooking.js +2 -6
- package/es/components/booking/locales.d.ts +0 -60
- package/es/components/booking/locales.js +3 -63
- package/es/components/booking/model.d.ts +0 -2
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +51 -54
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/components/booking/components/footer/index.js +5 -30
- package/lib/components/booking/forms/forms.d.ts +0 -1
- package/lib/components/booking/forms/forms.js +2 -5
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +5 -4
- package/lib/components/booking/info/client/index.js +1 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +76 -88
- package/lib/components/booking/info/clientVariant/vertical/index.less +0 -8
- package/lib/components/booking/info/index.less +0 -19
- package/lib/components/booking/info/main.js +3 -9
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +3 -9
- package/lib/components/booking/info/service/addService/index.js +29 -66
- package/lib/components/booking/info/service/addService/index.less +1 -27
- package/lib/components/booking/info/service/editService/index.js +6 -9
- package/lib/components/booking/info/service/index.js +2 -4
- package/lib/components/booking/info/service/index.less +0 -18
- package/lib/components/booking/info/service/serviceItem/index.d.ts +3 -3
- package/lib/components/booking/info/service/serviceItem/index.js +1 -15
- package/lib/components/booking/info/service/serviceItem/index.less +0 -8
- package/lib/components/booking/info/service/serviceList/index.js +1 -18
- package/lib/components/booking/info2/index.js +2 -8
- package/lib/components/booking/info2/service/addService/index.d.ts +2 -8
- package/lib/components/booking/info2/service/addService/index.js +29 -66
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/info2/service/editService/index.js +1 -7
- package/lib/components/booking/info2/service/index.js +2 -4
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.js +1 -14
- package/lib/components/booking/info2/service/serviceList/index.js +1 -18
- package/lib/components/booking/info2/utilsByBooking.js +1 -5
- package/lib/components/booking/locales.d.ts +0 -60
- package/lib/components/booking/locales.js +3 -63
- package/lib/components/booking/model.d.ts +0 -2
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +22 -57
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +4 -4
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/dashboard/index.js +0 -298
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/dashboard/serve.js +0 -27
- package/es/components/booking/hooks/useClearCart.d.ts +0 -3
- package/es/components/booking/hooks/useClearCart.js +0 -27
- package/es/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
- package/es/components/booking/hooks/useCreateBookingPageHeader.js +0 -21
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/es/components/booking/info/addServiceVariant/index.js +0 -42
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/dashboard/index.js +0 -279
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.js +0 -33
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -3
- package/lib/components/booking/hooks/useClearCart.js +0 -62
- package/lib/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
- package/lib/components/booking/hooks/useCreateBookingPageHeader.js +0 -53
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/info/addServiceVariant/index.js +0 -70
- package/lowcode/booking-dashboard/meta.ts +0 -137
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -156,7 +156,7 @@ var Info = function Info(_, ref) {
|
|
|
156
156
|
* @Date: 2024-01-09 13:38
|
|
157
157
|
*/
|
|
158
158
|
var getResources = /*#__PURE__*/function () {
|
|
159
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cacheItem
|
|
159
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cacheItem) {
|
|
160
160
|
var _list, _cacheItem, autoClose;
|
|
161
161
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
162
162
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -190,7 +190,7 @@ var Info = function Info(_, ref) {
|
|
|
190
190
|
}, 200);
|
|
191
191
|
} else {
|
|
192
192
|
setTimeout(function () {
|
|
193
|
-
if (selectOpen === undefined
|
|
193
|
+
if (selectOpen === undefined) {
|
|
194
194
|
setSelectOpen(true);
|
|
195
195
|
}
|
|
196
196
|
}, 500);
|
|
@@ -207,7 +207,7 @@ var Info = function Info(_, ref) {
|
|
|
207
207
|
}
|
|
208
208
|
}, _callee, null, [[1, 11]]);
|
|
209
209
|
}));
|
|
210
|
-
return function getResources(_x2
|
|
210
|
+
return function getResources(_x2) {
|
|
211
211
|
return _ref.apply(this, arguments);
|
|
212
212
|
};
|
|
213
213
|
}();
|
|
@@ -402,13 +402,13 @@ var Info = function Info(_, ref) {
|
|
|
402
402
|
}
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
|
-
var setEditData = useMemoizedFn(function (_cacheItem
|
|
405
|
+
var setEditData = useMemoizedFn(function (_cacheItem) {
|
|
406
406
|
var cacheItem = _cacheItem || state.service.cacheItem;
|
|
407
407
|
var values = cacheItem._extend;
|
|
408
408
|
form.setFieldsValue(values);
|
|
409
409
|
if (state.renderType !== 'eventBooking') {
|
|
410
410
|
// 获取资源列表
|
|
411
|
-
getResources(
|
|
411
|
+
getResources(_cacheItem);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
|
|
@@ -457,11 +457,13 @@ var Info = function Info(_, ref) {
|
|
|
457
457
|
}
|
|
458
458
|
}, [useStartTime, useDuration, state.renderType, state.service.resourcesOrigin, (_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.autoClose]);
|
|
459
459
|
useEffect(function () {
|
|
460
|
-
//
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
460
|
+
// if (!state.service.editModal) {
|
|
461
|
+
// setTimeout(() => {
|
|
462
|
+
// setSelectOpen(undefined);
|
|
463
|
+
// form.resetFields();
|
|
464
|
+
// }, 200);
|
|
465
|
+
// }
|
|
466
|
+
}, [state.service.editModal]);
|
|
465
467
|
|
|
466
468
|
/**
|
|
467
469
|
* @title: 资源 时间 发生变化时, 重新计算错误信息
|
|
@@ -702,7 +704,7 @@ var Info = function Info(_, ref) {
|
|
|
702
704
|
className: "current-service-info-name"
|
|
703
705
|
}, ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : (_state$service6$cache = _state$service6.cacheItem) === null || _state$service6$cache === void 0 ? void 0 : (_state$service6$cache2 = _state$service6$cache._extend) === null || _state$service6$cache2 === void 0 ? void 0 : _state$service6$cache2.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
|
|
704
706
|
onClick: handleEdit
|
|
705
|
-
}, locales.getText('pisell2.text.edit')),
|
|
707
|
+
}, locales.getText('pisell2.text.edit')), /*#__PURE__*/React.createElement(Button, {
|
|
706
708
|
onClick: handleChange
|
|
707
709
|
}, locales.getText('pisell2.text.change'))), /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
708
710
|
style: {
|
|
@@ -5,12 +5,10 @@ import EditService from "./editService";
|
|
|
5
5
|
import "./index.less";
|
|
6
6
|
import ServiceList from "./serviceList";
|
|
7
7
|
import AddTimeModal from "./addTimeModal";
|
|
8
|
-
import useClearCart from "../../hooks/useClearCart";
|
|
9
8
|
var Service = function Service() {
|
|
10
9
|
var _state$bookingConfig2, _state$bookingConfig3;
|
|
11
10
|
var _useContext = useContext(Context),
|
|
12
|
-
state = _useContext.state
|
|
13
|
-
dispatch = _useContext.dispatch;
|
|
11
|
+
state = _useContext.state;
|
|
14
12
|
var detailRef = useRef();
|
|
15
13
|
useEffect(function () {
|
|
16
14
|
document.body.id = 'body';
|
|
@@ -44,10 +42,9 @@ var Service = function Service() {
|
|
|
44
42
|
(_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 ? void 0 : (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 ? void 0 : _detailRef$current$in.call(_detailRef$current, cacheItem);
|
|
45
43
|
}, 100);
|
|
46
44
|
};
|
|
47
|
-
var clearCart = useClearCart(state, dispatch);
|
|
48
45
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
49
46
|
className: "pisell-lowcode__booking-service-wrap"
|
|
50
|
-
},
|
|
47
|
+
}, /*#__PURE__*/React.createElement(ServiceList, {
|
|
51
48
|
onEdit: handleEdit
|
|
52
49
|
}), /*#__PURE__*/React.createElement(AddService, {
|
|
53
50
|
onEdit: handleEdit
|
|
@@ -1,21 +1,3 @@
|
|
|
1
1
|
.pisell-lowcode__booking-service-wrap {
|
|
2
2
|
margin-top: 16px;
|
|
3
|
-
.pisell-lowcode__booking-service-clear-btn {
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
margin-top: -12px;
|
|
6
|
-
color: var(--Blue-700, #175CD3);
|
|
7
|
-
font-weight: 600;
|
|
8
|
-
line-height: 24px; /* 150% */
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
margin-bottom: 4px;
|
|
12
|
-
padding: 12px 0;
|
|
13
|
-
.anticon {
|
|
14
|
-
font-size: 18px;
|
|
15
|
-
margin-right: 6px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
.pisell-lowcode__booking-service-clear-btn-disabled {
|
|
19
|
-
color: #98A2B3
|
|
20
|
-
}
|
|
21
3
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage,
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, }: any) => React.JSX.Element;
|
|
4
4
|
export default ServiceItem;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import React, { useMemo } from
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import Like from "../like";
|
|
3
3
|
import { getServiceTime } from "../../../utils";
|
|
4
|
-
import { formatAmount, locales } from
|
|
4
|
+
import { formatAmount, locales } from "@pisell/utils";
|
|
5
5
|
import CollapsibleList from "../../../components/collapsibleList";
|
|
6
6
|
import { renderBundles } from "../../../components/collapsibleList/utils";
|
|
7
|
-
import { Alert
|
|
7
|
+
import { Alert } from "antd";
|
|
8
8
|
import Actions from "../actions";
|
|
9
9
|
import "./index.less";
|
|
10
|
-
import { Iconfont } from '@pisell/materials';
|
|
11
10
|
var ServiceItem = function ServiceItem(_ref) {
|
|
12
11
|
var _d$_extend3, _d$_extend4, _d$_extend5, _d$_extend5$other, _d$_extend6, _d$_extend6$other, _d$_extend7, _d$_extend8, _d$_extend9, _d$_extend$relation_d;
|
|
13
12
|
var d = _ref.d,
|
|
@@ -15,9 +14,7 @@ var ServiceItem = function ServiceItem(_ref) {
|
|
|
15
14
|
state = _ref.state,
|
|
16
15
|
handleLike = _ref.handleLike,
|
|
17
16
|
resourceItem = _ref.resourceItem,
|
|
18
|
-
errorMessage = _ref.errorMessage
|
|
19
|
-
handleDeleteService = _ref.handleDeleteService;
|
|
20
|
-
console.log(d, 'dddddd');
|
|
17
|
+
errorMessage = _ref.errorMessage;
|
|
21
18
|
var resourceName = (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.labelText) || d.relation_form_name;
|
|
22
19
|
var isDiscount = useMemo(function () {
|
|
23
20
|
var _d$_extend, _d$_extend2;
|
|
@@ -29,20 +26,9 @@ var ServiceItem = function ServiceItem(_ref) {
|
|
|
29
26
|
onClick: function onClick() {
|
|
30
27
|
handleEditService(d);
|
|
31
28
|
}
|
|
32
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
33
|
-
className: "pisell-lowcode__booking-service-item-delete",
|
|
34
|
-
onClick: function onClick(e) {
|
|
35
|
-
e.stopPropagation();
|
|
36
|
-
handleDeleteService(d);
|
|
37
|
-
}
|
|
38
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
39
|
-
type: "text",
|
|
40
|
-
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
41
|
-
type: "pisell2-trash-01"
|
|
42
|
-
})
|
|
43
|
-
})), d.id ? /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
}, d.id ? /*#__PURE__*/React.createElement("div", {
|
|
44
30
|
className: "pisell-lowcode__booking-service-item-title"
|
|
45
|
-
}, d.title) : null, d._extend ? /*#__PURE__*/React.createElement(React.Fragment, null, state.renderType !==
|
|
31
|
+
}, d.title) : null, d._extend ? /*#__PURE__*/React.createElement(React.Fragment, null, state.renderType !== "eventBooking" && /*#__PURE__*/React.createElement("div", {
|
|
46
32
|
className: "pisell-lowcode__booking-service-item-date"
|
|
47
33
|
}, getServiceTime(d, state.date.value)), /*#__PURE__*/React.createElement("div", {
|
|
48
34
|
className: "pisell-lowcode__booking-service-item-technician"
|
|
@@ -68,11 +54,11 @@ var ServiceItem = function ServiceItem(_ref) {
|
|
|
68
54
|
className: "pisell-lowcode__booking-service-item-original-price"
|
|
69
55
|
}, formatAmount(d._extend.origin_total, 2, state.amountSymbol)) : null)) : null, isDiscount && (_d$_extend8 = d._extend) !== null && _d$_extend8 !== void 0 && _d$_extend8.discount_reason ? /*#__PURE__*/React.createElement("div", {
|
|
70
56
|
className: "pisell-lowcode__booking-service-item-discount-reason"
|
|
71
|
-
}, /*#__PURE__*/React.createElement("span", null, locales.getText(
|
|
57
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText("pisell2.text.discount-reason"), ":"), " ", (_d$_extend9 = d._extend) === null || _d$_extend9 === void 0 ? void 0 : _d$_extend9.discount_reason) : null, (_d$_extend$relation_d = d._extend.relation_details) !== null && _d$_extend$relation_d !== void 0 && _d$_extend$relation_d.length ? /*#__PURE__*/React.createElement("div", {
|
|
72
58
|
className: "pisell-lowcode__booking-service-item-relation-details"
|
|
73
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
74
60
|
className: "pisell-lowcode__booking-service-item-title"
|
|
75
|
-
}, locales.getText(
|
|
61
|
+
}, locales.getText("page.booking.text.sales")), d._extend.relation_details.map(function (item, index) {
|
|
76
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
77
63
|
className: "pisell-lowcode__booking-service-item-relation-detail",
|
|
78
64
|
key: item.id
|
|
@@ -94,14 +94,6 @@
|
|
|
94
94
|
margin: 0 -20px -16px;
|
|
95
95
|
border-radius: 0 0 8px 8px;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
.pisell-lowcode__booking-service-item-delete {
|
|
99
|
-
position: absolute;
|
|
100
|
-
padding: 10px;
|
|
101
|
-
top: 0;
|
|
102
|
-
right: 0;
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
}
|
|
105
97
|
}
|
|
106
98
|
|
|
107
99
|
.pisell-lowcode__booking-service-item-relation-details {
|
|
@@ -45,24 +45,6 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
45
45
|
new: 0
|
|
46
46
|
}));
|
|
47
47
|
};
|
|
48
|
-
var handleDeleteService = function handleDeleteService(item) {
|
|
49
|
-
if (state.disabledEdit || state.disableEventBookingEdit || state.channelDisabledEdit) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
var _list = _toConsumableArray(state.service.value);
|
|
53
|
-
_list = _list.filter(function (d) {
|
|
54
|
-
return d._id !== item._id;
|
|
55
|
-
});
|
|
56
|
-
dispatch({
|
|
57
|
-
type: 'setService',
|
|
58
|
-
payload: {
|
|
59
|
-
editModal: false,
|
|
60
|
-
value: _list,
|
|
61
|
-
edit: true,
|
|
62
|
-
cacheItem: null
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
48
|
var getResourceItem = useCallback(function (id) {
|
|
67
49
|
if (id === 0) {
|
|
68
50
|
return getNoResource();
|
|
@@ -121,8 +103,7 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
121
103
|
d: d,
|
|
122
104
|
handleEditService: handleEditService,
|
|
123
105
|
state: state,
|
|
124
|
-
handleLike: handleLike
|
|
125
|
-
handleDeleteService: handleDeleteService
|
|
106
|
+
handleLike: handleLike
|
|
126
107
|
});
|
|
127
108
|
}));
|
|
128
109
|
};
|
|
@@ -28,8 +28,6 @@ import useEngineContext from "../../../hooks/useEngineContext";
|
|
|
28
28
|
import Notes from "../info/notes";
|
|
29
29
|
import "../info/index.less";
|
|
30
30
|
import { Skeleton } from "antd";
|
|
31
|
-
import classNames from "classnames";
|
|
32
|
-
import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
|
|
33
31
|
var defaultModules = {
|
|
34
32
|
client: 1,
|
|
35
33
|
date: 1,
|
|
@@ -39,7 +37,7 @@ var defaultModules = {
|
|
|
39
37
|
};
|
|
40
38
|
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
41
39
|
var Info = Provider(function (props) {
|
|
42
|
-
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _modal$state6, _modal$state6$date, _modal$state6$date$va, _context$appHelper4, _context$appHelper4$u,
|
|
40
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _modal$state6, _modal$state6$date, _modal$state6$date$va, _context$appHelper4, _context$appHelper4$u, _modal$state7, _React$createElement;
|
|
43
41
|
// return <Payments {...props} />;
|
|
44
42
|
var style = props.style,
|
|
45
43
|
globalState = props.globalState,
|
|
@@ -53,10 +51,6 @@ var Info = Provider(function (props) {
|
|
|
53
51
|
var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
|
|
54
52
|
return ((_modal$state = modal.state) === null || _modal$state === void 0 ? void 0 : (_modal$state$bookingC = _modal$state.bookingConfig) === null || _modal$state$bookingC === void 0 ? void 0 : (_modal$state$bookingC2 = _modal$state$bookingC.config) === null || _modal$state$bookingC2 === void 0 ? void 0 : (_modal$state$bookingC3 = _modal$state$bookingC2.basic) === null || _modal$state$bookingC3 === void 0 ? void 0 : _modal$state$bookingC3.appointment_subject) || {};
|
|
55
53
|
}, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 ? void 0 : (_modal$state2$booking = _modal$state2.bookingConfig) === null || _modal$state2$booking === void 0 ? void 0 : (_modal$state2$booking2 = _modal$state2$booking.config) === null || _modal$state2$booking2 === void 0 ? void 0 : (_modal$state2$booking3 = _modal$state2$booking2.basic) === null || _modal$state2$booking3 === void 0 ? void 0 : _modal$state2$booking3.appointment_subject]);
|
|
56
|
-
var _useCreateBookingPage = useCreateBookingPageHeader(globalState),
|
|
57
|
-
createHeader = _useCreateBookingPage.createHeader,
|
|
58
|
-
isBookingCreatePage = _useCreateBookingPage.isBookingCreatePage,
|
|
59
|
-
isBookingCreatePageCreateMode = _useCreateBookingPage.isBookingCreatePageCreateMode;
|
|
60
54
|
useEffect(function () {
|
|
61
55
|
document.body.id = 'body';
|
|
62
56
|
// 注入函数到页面的state内
|
|
@@ -216,9 +210,9 @@ var Info = Provider(function (props) {
|
|
|
216
210
|
})
|
|
217
211
|
}, _defineProperty(_React$createElement, "style", {
|
|
218
212
|
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
|
|
219
|
-
}), _defineProperty(_React$createElement, "bodyClassName",
|
|
213
|
+
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
220
214
|
className: "booking-info"
|
|
221
|
-
},
|
|
215
|
+
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state7 = modal.state) !== null && _modal$state7 !== void 0 && _modal$state7.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
222
216
|
loading: globalState.loading,
|
|
223
217
|
round: true,
|
|
224
218
|
active: true,
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PisellDrawerProps } from '../../../components/drawer';
|
|
3
2
|
import '../../../info/service/addService/index.less';
|
|
4
|
-
|
|
3
|
+
declare const Info: ({ onEdit }: {
|
|
5
4
|
onEdit: any;
|
|
6
|
-
|
|
7
|
-
state?: any;
|
|
8
|
-
drawerProps?: PisellDrawerProps;
|
|
9
|
-
renderMode?: 'current' | 'drawer';
|
|
10
|
-
}
|
|
11
|
-
declare const Info: (props: AddServiceProps) => React.JSX.Element;
|
|
5
|
+
}) => React.JSX.Element;
|
|
12
6
|
export default Info;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 _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); }
|
|
3
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -34,11 +33,9 @@ import { formatProductListByCategory, getProductTotalPrice, request } from "../.
|
|
|
34
33
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
35
34
|
import { useUpdateEffect } from 'ahooks';
|
|
36
35
|
var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
|
|
37
|
-
var Info = function Info(
|
|
36
|
+
var Info = function Info(_ref) {
|
|
38
37
|
var _state$service2, _state$service4, _state$service5, _state$service5$cache;
|
|
39
|
-
var onEdit =
|
|
40
|
-
drawerProps = props.drawerProps,
|
|
41
|
-
renderMode = props.renderMode;
|
|
38
|
+
var onEdit = _ref.onEdit;
|
|
42
39
|
var _useState = useState(''),
|
|
43
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
41
|
search = _useState2[0],
|
|
@@ -52,8 +49,6 @@ var Info = function Info(props) {
|
|
|
52
49
|
setLoading = _useState4[1];
|
|
53
50
|
var searchRef = useRef();
|
|
54
51
|
var context = useEngineContext();
|
|
55
|
-
state = state || (props === null || props === void 0 ? void 0 : props.state);
|
|
56
|
-
dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
|
|
57
52
|
request.setRequest(context.appHelper.utils.request);
|
|
58
53
|
|
|
59
54
|
/**
|
|
@@ -65,7 +60,7 @@ var Info = function Info(props) {
|
|
|
65
60
|
* @Date: 2024-05-14 13:55
|
|
66
61
|
*/
|
|
67
62
|
var setDefaultService = /*#__PURE__*/function () {
|
|
68
|
-
var
|
|
63
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(list) {
|
|
69
64
|
var _list, product, detail, isBundleOrCombination, _item;
|
|
70
65
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
71
66
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -145,11 +140,11 @@ var Info = function Info(props) {
|
|
|
145
140
|
}, _callee);
|
|
146
141
|
}));
|
|
147
142
|
return function setDefaultService(_x2) {
|
|
148
|
-
return
|
|
143
|
+
return _ref2.apply(this, arguments);
|
|
149
144
|
};
|
|
150
145
|
}();
|
|
151
146
|
var getServices = /*#__PURE__*/function () {
|
|
152
|
-
var
|
|
147
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
153
148
|
var _state$eventOtherPara;
|
|
154
149
|
var data;
|
|
155
150
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -157,7 +152,7 @@ var Info = function Info(props) {
|
|
|
157
152
|
case 0:
|
|
158
153
|
setLoading(true);
|
|
159
154
|
_context2.next = 3;
|
|
160
|
-
return state.apis.getServices(
|
|
155
|
+
return state.apis.getServices({
|
|
161
156
|
skip: 1,
|
|
162
157
|
num: 500,
|
|
163
158
|
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product'],
|
|
@@ -167,14 +162,11 @@ var Info = function Info(props) {
|
|
|
167
162
|
with_schedule: 1,
|
|
168
163
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
169
164
|
order_by_string: 'sort:desc',
|
|
170
|
-
status: 'published'
|
|
171
|
-
}, state.isBookingCreatePage ? {
|
|
172
|
-
schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
|
|
173
|
-
} : {
|
|
165
|
+
status: 'published',
|
|
174
166
|
_config: {
|
|
175
167
|
useCache: true
|
|
176
168
|
}
|
|
177
|
-
})
|
|
169
|
+
});
|
|
178
170
|
case 3:
|
|
179
171
|
data = _context2.sent;
|
|
180
172
|
setLoading(false);
|
|
@@ -195,8 +187,8 @@ var Info = function Info(props) {
|
|
|
195
187
|
}
|
|
196
188
|
}, _callee2);
|
|
197
189
|
}));
|
|
198
|
-
return function getServices(
|
|
199
|
-
return
|
|
190
|
+
return function getServices() {
|
|
191
|
+
return _ref3.apply(this, arguments);
|
|
200
192
|
};
|
|
201
193
|
}();
|
|
202
194
|
var handleSelectService = function handleSelectService() {
|
|
@@ -265,11 +257,6 @@ var Info = function Info(props) {
|
|
|
265
257
|
cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
|
|
266
258
|
cacheItem.new = 0;
|
|
267
259
|
}
|
|
268
|
-
// 渲染到当前位置模式时,默认无资源 时间默认取顶部设置的时间
|
|
269
|
-
if (renderMode === 'current') {
|
|
270
|
-
// cacheItem._extend.resource = 0;
|
|
271
|
-
cacheItem.currentDefaultTime = state.date.value.format('HH:mm');
|
|
272
|
-
}
|
|
273
260
|
cacheItem = getProductExtend({
|
|
274
261
|
cacheItem: cacheItem,
|
|
275
262
|
state: state
|
|
@@ -341,29 +328,12 @@ var Info = function Info(props) {
|
|
|
341
328
|
setSearch('');
|
|
342
329
|
}
|
|
343
330
|
}, [state.service.addModal]);
|
|
344
|
-
var currentDate = useMemo(function () {
|
|
345
|
-
return state.date.value.format('YYYY-MM-DD');
|
|
346
|
-
}, [state.date.value]);
|
|
347
|
-
useEffect(function () {
|
|
348
|
-
if (renderMode === 'current') {
|
|
349
|
-
getServices({
|
|
350
|
-
schedule_date: currentDate
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
}, [renderMode, currentDate]);
|
|
354
331
|
useEffect(function () {
|
|
355
332
|
if (state.renderType === 'eventBooking' && state.modalOpen) {
|
|
356
333
|
getServices();
|
|
357
334
|
}
|
|
358
335
|
}, [state.renderType, state.modalOpen]);
|
|
359
336
|
var addButton = useMemo(function () {
|
|
360
|
-
if (state.isBookingCreatePage) {
|
|
361
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
362
|
-
style: {
|
|
363
|
-
height: 20
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
337
|
if (state.renderType === 'eventBooking') {
|
|
368
338
|
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
369
339
|
style: {
|
|
@@ -388,50 +358,12 @@ var Info = function Info(props) {
|
|
|
388
358
|
}
|
|
389
359
|
});
|
|
390
360
|
}, [state.renderType, showAddButton, isService, state.service.value, loading]);
|
|
391
|
-
var isRenderCurrent = useMemo(function () {
|
|
392
|
-
return renderMode === 'current';
|
|
393
|
-
}, [renderMode]);
|
|
394
|
-
var header = /*#__PURE__*/React.createElement("div", {
|
|
395
|
-
className: "pisell-lowcode__booking-service-header"
|
|
396
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
397
|
-
ref: searchRef,
|
|
398
|
-
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
399
|
-
style: {
|
|
400
|
-
marginTop: 16,
|
|
401
|
-
height: 44
|
|
402
|
-
},
|
|
403
|
-
placeholder: locales.getText('pisell2.text.search'),
|
|
404
|
-
allowClear: true,
|
|
405
|
-
value: search,
|
|
406
|
-
onChange: function onChange(e) {
|
|
407
|
-
setSearch(e.target.value);
|
|
408
|
-
}
|
|
409
|
-
}));
|
|
410
|
-
var content = /*#__PURE__*/React.createElement("div", {
|
|
411
|
-
className: "pisell-lowcode__booking-service-body"
|
|
412
|
-
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
413
|
-
list: renderList,
|
|
414
|
-
amountSymbol: state.amountSymbol,
|
|
415
|
-
onChange: handleSelectProduct,
|
|
416
|
-
scrollDom: isRenderCurrent ? '.pisell-lowcode__booking-vertical-add-service-wrap' : '.booking-server-wrap .pisell-lowcode-drawer-body '
|
|
417
|
-
}));
|
|
418
|
-
if (isRenderCurrent) {
|
|
419
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
420
|
-
className: "pisell-lowcode__booking-vertical-add-service-wrap",
|
|
421
|
-
style: {
|
|
422
|
-
width: '100%',
|
|
423
|
-
height: '100%',
|
|
424
|
-
overflow: 'auto'
|
|
425
|
-
}
|
|
426
|
-
}, header, content);
|
|
427
|
-
}
|
|
428
361
|
return /*#__PURE__*/React.createElement(React.Fragment, null, ((_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : (_state$service5$cache = _state$service5.cacheItem) === null || _state$service5$cache === void 0 ? void 0 : _state$service5$cache.autoClose) && /*#__PURE__*/React.createElement(Skeleton, {
|
|
429
362
|
loading: true,
|
|
430
363
|
active: true,
|
|
431
364
|
round: true
|
|
432
|
-
}), addButton, /*#__PURE__*/React.createElement(Drawer,
|
|
433
|
-
|
|
434
|
-
open: state.service.addModal && !state.isBookingCreatePage,
|
|
365
|
+
}), addButton, /*#__PURE__*/React.createElement(Drawer, {
|
|
366
|
+
open: state.service.addModal,
|
|
435
367
|
title: locales.getText('pisell2.text.select-service'),
|
|
436
368
|
rootClassName: "booking-server-wrap",
|
|
437
369
|
onClose: function onClose() {
|
|
@@ -443,7 +375,29 @@ var Info = function Info(props) {
|
|
|
443
375
|
}
|
|
444
376
|
});
|
|
445
377
|
},
|
|
446
|
-
header:
|
|
447
|
-
|
|
378
|
+
header: /*#__PURE__*/React.createElement("div", {
|
|
379
|
+
className: "pisell-lowcode__booking-service-header"
|
|
380
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
381
|
+
ref: searchRef,
|
|
382
|
+
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
383
|
+
style: {
|
|
384
|
+
marginTop: 16,
|
|
385
|
+
height: 44
|
|
386
|
+
},
|
|
387
|
+
placeholder: locales.getText('pisell2.text.search'),
|
|
388
|
+
allowClear: true,
|
|
389
|
+
value: search,
|
|
390
|
+
onChange: function onChange(e) {
|
|
391
|
+
setSearch(e.target.value);
|
|
392
|
+
}
|
|
393
|
+
}))
|
|
394
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
395
|
+
className: "pisell-lowcode__booking-service-body"
|
|
396
|
+
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
397
|
+
list: renderList,
|
|
398
|
+
amountSymbol: state.amountSymbol,
|
|
399
|
+
onChange: handleSelectProduct,
|
|
400
|
+
scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
|
|
401
|
+
}))));
|
|
448
402
|
};
|
|
449
403
|
export default Info;
|
|
@@ -574,7 +574,6 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
574
574
|
return "".concat(locales.getText('page.booking.text.update-time'), ": ").concat(startTime, " ~ ").concat(endTime, " (").concat(hours, ")");
|
|
575
575
|
}, [newService, state.locale]);
|
|
576
576
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
577
|
-
titleNoWrap: true,
|
|
578
577
|
open: state.service.addTimeModal,
|
|
579
578
|
title: locales.getText('page.booking.text.add-time'),
|
|
580
579
|
rootClassName: "booking-server-wrap",
|
|
@@ -336,12 +336,6 @@ var Info = function Info(_, ref) {
|
|
|
336
336
|
getResources();
|
|
337
337
|
}
|
|
338
338
|
}, [useStartTime, useDuration, state.renderType, state.service.resourcesOrigin]);
|
|
339
|
-
useEffect(function () {
|
|
340
|
-
// 预约创建页面并且打开了编辑弹窗
|
|
341
|
-
if (state.isBookingCreatePage && state.service.editModal) {
|
|
342
|
-
setEditData(null);
|
|
343
|
-
}
|
|
344
|
-
}, [state.service.editModal, state.isBookingCreatePage]);
|
|
345
339
|
|
|
346
340
|
/**
|
|
347
341
|
* @title: 价格发生变化,重新计算折扣
|
|
@@ -464,10 +458,9 @@ var Info = function Info(_, ref) {
|
|
|
464
458
|
});
|
|
465
459
|
console.log('state.service.value', state.service.value);
|
|
466
460
|
var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
|
|
467
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
,
|
|
461
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer
|
|
462
|
+
//通过zIndex的方式控制 添加商品 和 编辑服务弹窗的上下层级
|
|
463
|
+
, {
|
|
471
464
|
zIndex: state.service.changeService ? 999 : 1000,
|
|
472
465
|
forceRender: true,
|
|
473
466
|
open: state.service.editModal && !((_state$service$cacheI9 = state.service.cacheItem) !== null && _state$service$cacheI9 !== void 0 && _state$service$cacheI9.autoClose),
|
|
@@ -505,7 +498,7 @@ var Info = function Info(_, ref) {
|
|
|
505
498
|
className: "current-service-info-name"
|
|
506
499
|
}, ((_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : (_state$service8$cache = _state$service8.cacheItem) === null || _state$service8$cache === void 0 ? void 0 : (_state$service8$cache2 = _state$service8$cache._extend) === null || _state$service8$cache2 === void 0 ? void 0 : _state$service8$cache2.product_name) || '-'), /*#__PURE__*/React.createElement(Button, {
|
|
507
500
|
onClick: handleEdit
|
|
508
|
-
}, locales.getText('pisell2.text.edit')),
|
|
501
|
+
}, locales.getText('pisell2.text.edit')), /*#__PURE__*/React.createElement(Button, {
|
|
509
502
|
onClick: handleChange
|
|
510
503
|
}, locales.getText('pisell2.text.change'))), /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
511
504
|
style: {
|
|
@@ -5,12 +5,10 @@ import EditService from "./editService";
|
|
|
5
5
|
import "../../info/service/index.less";
|
|
6
6
|
import ServiceList from "./serviceList";
|
|
7
7
|
import AddTimeModal from "./addTimeModal";
|
|
8
|
-
import useClearCart from "../../hooks/useClearCart";
|
|
9
8
|
var Service = function Service() {
|
|
10
9
|
var _state$bookingConfig2, _state$bookingConfig3;
|
|
11
10
|
var _useContext = useContext(Context),
|
|
12
|
-
state = _useContext.state
|
|
13
|
-
dispatch = _useContext.dispatch;
|
|
11
|
+
state = _useContext.state;
|
|
14
12
|
var detailRef = useRef();
|
|
15
13
|
useEffect(function () {
|
|
16
14
|
document.body.id = 'body';
|
|
@@ -44,10 +42,9 @@ var Service = function Service() {
|
|
|
44
42
|
(_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 ? void 0 : (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 ? void 0 : _detailRef$current$in.call(_detailRef$current, cacheItem);
|
|
45
43
|
}, 100);
|
|
46
44
|
};
|
|
47
|
-
var clearCart = useClearCart(state, dispatch);
|
|
48
45
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
49
46
|
className: "pisell-lowcode__booking-service-wrap"
|
|
50
|
-
},
|
|
47
|
+
}, /*#__PURE__*/React.createElement(ServiceList, {
|
|
51
48
|
onEdit: handleEdit
|
|
52
49
|
}), /*#__PURE__*/React.createElement(AddService, {
|
|
53
50
|
onEdit: handleEdit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage,
|
|
3
|
+
declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, }: any) => React.JSX.Element;
|
|
4
4
|
export default ServiceItem;
|