@pisell/private-materials 6.2.20 → 6.2.22
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 +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Cart/utils.d.ts +63 -0
- package/es/components/Sales/Checkout/index.d.ts +37 -0
- package/es/components/Sales/Checkout/serve.d.ts +15 -0
- package/es/components/Sales/Customer/index.d.ts +25 -0
- package/es/components/Sales/Event/Detail.d.ts +30 -0
- package/es/components/Sales/Event/serve.d.ts +49 -0
- package/es/components/Sales/Summary/index.d.ts +35 -0
- package/es/components/Sales/Summary/serve.d.ts +1 -0
- package/es/components/Sales/Summary/utils.d.ts +51 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Content/index.js +19 -12
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +9 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/hooks.d.ts +106 -0
- package/es/components/appointmentBooking/index.d.ts +3 -0
- package/es/components/booking/components/customSelect/index.d.ts +38 -0
- package/es/components/booking/components/customSelect/index.js +0 -1
- package/es/components/booking/components/footer/index.d.ts +11 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/editBookingModal/index.js +58 -29
- package/es/components/booking/editBookingModal/serve.d.ts +1 -0
- package/es/components/booking/editBookingModal/serve.js +19 -11
- package/es/components/booking/hooks/useClearCart.d.ts +2 -0
- package/es/components/booking/hooks/useClearCart.js +8 -11
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
- package/es/components/booking/info/client/index.d.ts +4 -0
- package/es/components/booking/info/client/index.js +2 -3
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
- package/es/components/booking/info/index.d.ts +4 -0
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/Lists.js +26 -36
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/index.js +10 -15
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service2/utils.d.ts +247 -0
- package/es/components/booking/info/service2/utils.js +21 -20
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/index.js +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +11 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/es/components/booking/info2/service/addService/utils.js +4 -7
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/es/components/booking/info2/service/editService/index.js +168 -264
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/service/index.js +15 -19
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +35 -0
- package/es/components/booking/locales.d.ts +828 -0
- package/es/components/booking/materiels/duration/index.d.ts +13 -0
- package/es/components/booking/materiels/duration/index.js +2 -9
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +108 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/const.d.ts +184 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +35 -0
- package/es/components/eftposPay/index.d.ts +4 -0
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/manufacturer.d.ts +7 -0
- package/es/components/eftposPay/pay.d.ts +20 -0
- package/es/components/eftposPay/store/index.d.ts +355 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +3 -0
- package/es/components/eventBooking/locales.d.ts +246 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/pay/toC/locales.d.ts +289 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/index.d.ts +26 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +3 -0
- package/es/components/shoppingCart/components/Cart/Product.js +41 -48
- package/es/components/shoppingCart/components/Cart/index.d.ts +3 -0
- package/es/components/shoppingCart/components/Cart/index.js +18 -21
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -177
- package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/es/components/ticketBooking/components/timeBar/index.js +71 -78
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/ticketBooking/locales.d.ts +174 -0
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/walletList/index.d.ts +28 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/utils/index.d.ts +23 -0
- package/lib/components/Sales/Cart/utils.d.ts +63 -0
- package/lib/components/Sales/Checkout/index.d.ts +37 -0
- package/lib/components/Sales/Checkout/serve.d.ts +15 -0
- package/lib/components/Sales/Customer/index.d.ts +25 -0
- package/lib/components/Sales/Event/Detail.d.ts +30 -0
- package/lib/components/Sales/Event/serve.d.ts +49 -0
- package/lib/components/Sales/Summary/index.d.ts +35 -0
- package/lib/components/Sales/Summary/serve.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +51 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Content/index.js +7 -2
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +9 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/hooks.d.ts +106 -0
- package/lib/components/appointmentBooking/index.d.ts +3 -0
- package/lib/components/booking/components/customSelect/index.d.ts +38 -0
- package/lib/components/booking/components/customSelect/index.js +0 -1
- package/lib/components/booking/components/footer/index.d.ts +11 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/editBookingModal/index.js +56 -21
- package/lib/components/booking/editBookingModal/serve.d.ts +1 -0
- package/lib/components/booking/editBookingModal/serve.js +12 -6
- package/lib/components/booking/hooks/useClearCart.d.ts +2 -0
- package/lib/components/booking/hooks/useClearCart.js +13 -16
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
- package/lib/components/booking/info/client/index.d.ts +4 -0
- package/lib/components/booking/info/client/index.js +4 -5
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
- package/lib/components/booking/info/index.d.ts +4 -0
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/Lists.js +23 -35
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/index.js +1 -7
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service2/utils.d.ts +247 -0
- package/lib/components/booking/info/service2/utils.js +17 -17
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/lib/components/booking/info2/service/addService/utils.js +3 -5
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/lib/components/booking/info2/service/editService/index.js +72 -137
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/service/index.js +9 -13
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +35 -0
- package/lib/components/booking/locales.d.ts +828 -0
- package/lib/components/booking/materiels/duration/index.d.ts +13 -0
- package/lib/components/booking/materiels/duration/index.js +2 -7
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +108 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/const.d.ts +184 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +35 -0
- package/lib/components/eftposPay/index.d.ts +4 -0
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/manufacturer.d.ts +7 -0
- package/lib/components/eftposPay/pay.d.ts +20 -0
- package/lib/components/eftposPay/store/index.d.ts +355 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +3 -0
- package/lib/components/eventBooking/locales.d.ts +246 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/pay/toC/locales.d.ts +289 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/index.d.ts +26 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +3 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
- package/lib/components/shoppingCart/components/Cart/index.d.ts +3 -0
- package/lib/components/shoppingCart/components/Cart/index.js +15 -18
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +127 -145
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/ticketBooking/locales.d.ts +174 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/walletList/index.d.ts +28 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/utils/index.d.ts +23 -0
- package/package.json +3 -3
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.js +0 -3
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.js +0 -31
@@ -65,7 +65,6 @@ var AddTimeModal = () => {
|
|
65
65
|
const [number, setNumber] = (0, import_react.useState)(1);
|
66
66
|
const originServices = (0, import_react.useRef)([]);
|
67
67
|
const [renderList, setRenderList] = (0, import_react.useState)([]);
|
68
|
-
console.log(renderList, "renderListrenderList");
|
69
68
|
const context = (0, import_useEngineContext.default)();
|
70
69
|
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
71
70
|
const statusMap = {
|
@@ -127,7 +126,6 @@ var AddTimeModal = () => {
|
|
127
126
|
}
|
128
127
|
return arr.filter(Boolean);
|
129
128
|
}, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
|
130
|
-
console.log(currentResource, "currentResource");
|
131
129
|
const getTimeUsableStatus = (time) => {
|
132
130
|
var _a2, _b2;
|
133
131
|
if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
|
@@ -208,7 +206,6 @@ var AddTimeModal = () => {
|
|
208
206
|
setLoading("list");
|
209
207
|
const newList = await _getAddTimeProducts();
|
210
208
|
let list = newList.map((d) => {
|
211
|
-
debugger;
|
212
209
|
let isUsable = (0, import_utils2.isUsableProduct)(d.add_time, state.service.cacheItem);
|
213
210
|
return {
|
214
211
|
...d,
|
@@ -168,11 +168,9 @@ var Resources = ({
|
|
168
168
|
const getIsAutoAllocation = (id) => {
|
169
169
|
return (0, import_utils2.getAutoAllocationStorage)(id);
|
170
170
|
};
|
171
|
-
console.log("resourcesss");
|
172
171
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
|
173
172
|
var _a2;
|
174
173
|
const cur = _value[item.form_id];
|
175
|
-
console.log(cur, "curcur");
|
176
174
|
const errors = (cur || []).reduce((pre, d) => {
|
177
175
|
return pre.concat((d == null ? void 0 : d.errors) || []);
|
178
176
|
}, []);
|
@@ -72,7 +72,7 @@ var Resources = ({
|
|
72
72
|
const originData = (0, import_react.useMemo)(() => {
|
73
73
|
var _a2;
|
74
74
|
return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resources) || [];
|
75
|
-
}, [(_b = originCacheItem == null ? void 0 : originCacheItem._data) == null ? void 0 : _b.
|
75
|
+
}, [(_b = originCacheItem == null ? void 0 : originCacheItem._data) == null ? void 0 : _b.resources]);
|
76
76
|
const resourceMaps = (0, import_react.useMemo)(() => {
|
77
77
|
var _a2;
|
78
78
|
return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resourceMaps) || [];
|
@@ -54,7 +54,7 @@ var import_utils6 = require("../../../info/service2/utils");
|
|
54
54
|
var import_utils7 = require("../../../../ticketBooking/utils");
|
55
55
|
var submitLock = false;
|
56
56
|
var Info = (_, ref) => {
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
58
58
|
const [form] = import_antd.Form.useForm();
|
59
59
|
const useTotal = import_antd.Form.useWatch("total", form);
|
60
60
|
const useResource = import_antd.Form.useWatch("resource", form);
|
@@ -64,13 +64,10 @@ var Info = (_, ref) => {
|
|
64
64
|
const resourcesRef = (0, import_react.useRef)(null);
|
65
65
|
const isChangeTotal = (0, import_react.useRef)(false);
|
66
66
|
const isNormalProduct = (0, import_react.useMemo)(() => {
|
67
|
-
var _a2, _b2
|
68
|
-
|
69
|
-
return true;
|
70
|
-
}
|
71
|
-
return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils6.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
|
67
|
+
var _a2, _b2;
|
68
|
+
return ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem) && (0, import_utils6.isNormalProductByDurationSchedule)((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem);
|
72
69
|
}, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
|
73
|
-
const getCurrentCacheItem = (
|
70
|
+
const getCurrentCacheItem = (_cacheItem) => {
|
74
71
|
let values = form.getFieldsValue();
|
75
72
|
let _item = _cacheItem || state.service.cacheItem;
|
76
73
|
return {
|
@@ -80,43 +77,40 @@ var Info = (_, ref) => {
|
|
80
77
|
...values
|
81
78
|
}
|
82
79
|
};
|
83
|
-
}
|
80
|
+
};
|
84
81
|
const currentResource = (0, import_react.useMemo)(() => {
|
85
82
|
return null;
|
86
|
-
}, []);
|
83
|
+
}, [useResource]);
|
87
84
|
const durationProps = (0, import_react.useMemo)(() => {
|
88
85
|
var _a2, _b2, _c2;
|
89
86
|
let _cacheItem = getCurrentCacheItem();
|
90
|
-
|
87
|
+
return (0, import_utils4.getDurationProps)({
|
91
88
|
cacheItem: _cacheItem,
|
92
89
|
useStartTime,
|
93
|
-
|
90
|
+
currentResource,
|
94
91
|
slice: (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time
|
95
92
|
});
|
96
|
-
return val2;
|
97
93
|
}, [
|
98
|
-
|
94
|
+
currentResource,
|
99
95
|
state.service.cacheItem,
|
100
96
|
useStartTime,
|
101
97
|
useResource,
|
102
98
|
(_d = (_c = (_b = state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.service_time
|
103
99
|
]);
|
104
100
|
const flexibleOption = (0, import_react.useMemo)(() => {
|
105
|
-
|
101
|
+
return (0, import_utils4.getFlexibleOption)({
|
106
102
|
durationProps
|
107
103
|
});
|
108
|
-
return op;
|
109
104
|
}, [durationProps, import_utils.locales.locale]);
|
110
105
|
const timeObj = (0, import_react.useMemo)(() => {
|
111
|
-
|
106
|
+
return (0, import_utils4.getTimeObj)({
|
112
107
|
durationProps,
|
113
108
|
useStartTime,
|
114
109
|
currentResource,
|
115
110
|
state,
|
116
111
|
useDuration
|
117
112
|
});
|
118
|
-
|
119
|
-
}, [durationProps, useStartTime, currentResource, (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time, useDuration]);
|
113
|
+
}, [durationProps, useStartTime, currentResource, state, useDuration]);
|
120
114
|
(0, import_react.useEffect)(() => {
|
121
115
|
try {
|
122
116
|
if (useDuration.indexOf("flexible_") == 0) {
|
@@ -224,32 +218,13 @@ var Info = (_, ref) => {
|
|
224
218
|
}
|
225
219
|
});
|
226
220
|
};
|
227
|
-
const { run: setEditDataRun } = (0, import_ahooks.useDebounceFn)(
|
228
|
-
(...params) => {
|
229
|
-
setEditData(...params);
|
230
|
-
},
|
231
|
-
{
|
232
|
-
wait: 50,
|
233
|
-
leading: true,
|
234
|
-
trailing: false
|
235
|
-
}
|
236
|
-
);
|
237
221
|
const setEditData = (0, import_ahooks.useMemoizedFn)(
|
238
222
|
(_cacheItem, open, openProductDetail) => {
|
239
|
-
|
240
|
-
console.log("setEditDatasetEditData", _cacheItem, open);
|
223
|
+
form.resetFields();
|
241
224
|
isChangeTotal.current = false;
|
242
225
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
243
226
|
let values = cacheItem._extend;
|
244
|
-
const startTime2 = performance.now();
|
245
|
-
console.log(startTime2, "startTime");
|
246
|
-
form.resetFields();
|
247
227
|
form.setFieldsValue(values);
|
248
|
-
const endTime = performance.now();
|
249
|
-
console.log(endTime - window.pp1, "打开商品5");
|
250
|
-
console.log("执行时间", endTime - startTime2, values);
|
251
|
-
setTimeout(() => {
|
252
|
-
}, 20);
|
253
228
|
if (openProductDetail) {
|
254
229
|
setTimeout(() => {
|
255
230
|
handleEdit({});
|
@@ -262,7 +237,7 @@ var Info = (_, ref) => {
|
|
262
237
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
263
238
|
let cPrice = Number(useTotal || 0);
|
264
239
|
return cPrice !== oPrice;
|
265
|
-
}, [useTotal, (
|
240
|
+
}, [useTotal, (_f = (_e = state.service.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.origin_total]);
|
266
241
|
const getResources = () => {
|
267
242
|
let res = (0, import_utils4.formatResources)({
|
268
243
|
cacheItem: getCurrentCacheItem(),
|
@@ -284,9 +259,9 @@ var Info = (_, ref) => {
|
|
284
259
|
updateResourceErrors(res.maps);
|
285
260
|
};
|
286
261
|
const updateResourceErrors = (resourceMaps) => {
|
287
|
-
let { resource
|
288
|
-
if (
|
289
|
-
let _resource = { ...
|
262
|
+
let { resource } = form.getFieldsValue();
|
263
|
+
if (resource) {
|
264
|
+
let _resource = { ...resource };
|
290
265
|
for (let form_id in _resource) {
|
291
266
|
_resource[form_id] = _resource[form_id].map((d) => {
|
292
267
|
var _a2, _b2;
|
@@ -320,17 +295,24 @@ var Info = (_, ref) => {
|
|
320
295
|
]);
|
321
296
|
(0, import_react.useEffect)(() => {
|
322
297
|
if (state.isBookingCreatePage && state.service.editModal) {
|
323
|
-
|
298
|
+
setEditData(null);
|
324
299
|
}
|
325
300
|
}, [state.service.editModal, state.isBookingCreatePage]);
|
326
301
|
(0, import_react.useEffect)(() => {
|
327
302
|
getDiscount();
|
328
|
-
}, [useTotal, (
|
303
|
+
}, [useTotal, (_h = (_g = state.service.cacheItem) == null ? void 0 : _g._extend) == null ? void 0 : _h.origin_total]);
|
304
|
+
const isDiscount = (0, import_react.useMemo)(() => {
|
305
|
+
var _a2, _b2, _c2;
|
306
|
+
if (!((_a2 = state.service) == null ? void 0 : _a2.cacheItem)) {
|
307
|
+
return false;
|
308
|
+
}
|
309
|
+
return useTotal != ((_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend.origin_total);
|
310
|
+
}, [useTotal, (_j = (_i = state.service) == null ? void 0 : _i.cacheItem) == null ? void 0 : _j._extend.origin_total]);
|
329
311
|
const bundles = (0, import_react.useMemo)(() => {
|
330
312
|
var _a2, _b2, _c2, _d2;
|
331
313
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
332
|
-
}, [(
|
333
|
-
const handleEdit = (
|
314
|
+
}, [(_n = (_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.other) == null ? void 0 : _n.bundle]);
|
315
|
+
const handleEdit = (e) => {
|
334
316
|
var _a2, _b2, _c2, _d2, _e2;
|
335
317
|
const item = state.service.cacheItem;
|
336
318
|
let values = form.getFieldsValue();
|
@@ -416,8 +398,8 @@ var Info = (_, ref) => {
|
|
416
398
|
});
|
417
399
|
}
|
418
400
|
});
|
419
|
-
}
|
420
|
-
const handleChange = (
|
401
|
+
};
|
402
|
+
const handleChange = (e) => {
|
421
403
|
if (state.channelDisabledEdit) {
|
422
404
|
return;
|
423
405
|
}
|
@@ -431,10 +413,10 @@ var Info = (_, ref) => {
|
|
431
413
|
// changeService: true,
|
432
414
|
}
|
433
415
|
});
|
434
|
-
}
|
416
|
+
};
|
435
417
|
(0, import_react.useImperativeHandle)(ref, () => {
|
436
418
|
return {
|
437
|
-
init:
|
419
|
+
init: setEditData
|
438
420
|
};
|
439
421
|
});
|
440
422
|
const handleTotalChange = (number) => {
|
@@ -446,30 +428,43 @@ var Info = (_, ref) => {
|
|
446
428
|
}
|
447
429
|
return false;
|
448
430
|
}, [state.renderType, isNormalProduct]);
|
449
|
-
const SelectTime = (
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
431
|
+
const SelectTime = (_o = window.BaseMaterials) == null ? void 0 : _o.SelectTime;
|
432
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
433
|
+
import_drawer.default,
|
434
|
+
{
|
435
|
+
titleNoWrap: true,
|
436
|
+
zIndex: state.service.changeService ? 999 : 1e3,
|
437
|
+
forceRender: true,
|
438
|
+
mask: state.drawerMask,
|
439
|
+
open: state.service.editModal && !((_p = state.service.cacheItem) == null ? void 0 : _p.autoClose),
|
440
|
+
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
441
|
+
onClose: () => {
|
442
|
+
dispatch({
|
443
|
+
type: "setService",
|
444
|
+
payload: {
|
445
|
+
editModal: false,
|
446
|
+
cacheItem: null,
|
447
|
+
changeService: false
|
448
|
+
}
|
449
|
+
});
|
450
|
+
}
|
451
|
+
},
|
452
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), !state.isBookingCreatePage && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
|
454
453
|
import_collapsibleList.default,
|
455
454
|
{
|
456
455
|
style: { marginTop: bundles.length ? "8px" : 0 },
|
457
456
|
list: bundles,
|
458
457
|
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
459
458
|
}
|
460
|
-
))))
|
461
|
-
}, [(_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
|
462
|
-
const price = (0, import_react.useMemo)(() => {
|
463
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
464
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
459
|
+
)))), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
465
460
|
import_antd.Form.Item,
|
466
461
|
{
|
467
462
|
label: import_utils.locales.getText("pisell2.text.price"),
|
468
463
|
name: "total",
|
469
464
|
rules: [{ required: true }],
|
470
|
-
extra: useTotal !== ((
|
465
|
+
extra: useTotal !== ((_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total) && import_utils.locales.getText("page.booking.text.price-extra")(
|
471
466
|
(0, import_utils.formatAmount)(
|
472
|
-
(
|
467
|
+
(_w = (_v = state.service.cacheItem) == null ? void 0 : _v._extend) == null ? void 0 : _w.origin_total,
|
473
468
|
2,
|
474
469
|
state.amountSymbol
|
475
470
|
),
|
@@ -485,25 +480,18 @@ var Info = (_, ref) => {
|
|
485
480
|
prefix: state.amountSymbol,
|
486
481
|
onChange: handleTotalChange,
|
487
482
|
disabled: state.channelDisabledEdit,
|
488
|
-
originValue: ((
|
489
|
-
placeholder: ((
|
483
|
+
originValue: ((_y = (_x = state.service.cacheItem) == null ? void 0 : _x._extend) == null ? void 0 : _y.origin_total) || 0,
|
484
|
+
placeholder: ((_A = (_z = state.service.cacheItem) == null ? void 0 : _z._extend) == null ? void 0 : _A.origin_total) || "0"
|
490
485
|
}
|
491
486
|
)
|
492
|
-
))
|
493
|
-
}, [useTotal, (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total, state.amountSymbol, state.channelDisabledEdit]);
|
494
|
-
const reason = (0, import_react.useMemo)(() => {
|
495
|
-
return isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
487
|
+
)), isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
496
488
|
import_antd.Form.Item,
|
497
489
|
{
|
498
490
|
label: import_utils.locales.getText("pisell2.text.discount-reason"),
|
499
491
|
name: "discount_reason"
|
500
492
|
},
|
501
493
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
502
|
-
)) : null
|
503
|
-
}, [isReason]);
|
504
|
-
const startTime = (0, import_react.useMemo)(() => {
|
505
|
-
var _a2, _b2, _c2, _d2;
|
506
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
494
|
+
)) : null, isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
507
495
|
import_antd.Form.Item,
|
508
496
|
{
|
509
497
|
label: import_utils.locales.getText("pisell2.text.start_time"),
|
@@ -513,7 +501,7 @@ var Info = (_, ref) => {
|
|
513
501
|
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
514
502
|
SelectTime,
|
515
503
|
{
|
516
|
-
slice: (
|
504
|
+
slice: (_E = (_D = (_C = (_B = state.bookingConfig) == null ? void 0 : _B.config) == null ? void 0 : _C.basic) == null ? void 0 : _D.service_time) == null ? void 0 : _E.value,
|
517
505
|
timePickerProps: {
|
518
506
|
style: { width: "100%" }
|
519
507
|
},
|
@@ -522,11 +510,7 @@ var Info = (_, ref) => {
|
|
522
510
|
}
|
523
511
|
}
|
524
512
|
) : null
|
525
|
-
))
|
526
|
-
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value]);
|
527
|
-
const duration = (0, import_react.useMemo)(() => {
|
528
|
-
console.log("render form duration");
|
529
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
513
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
530
514
|
import_antd.Form.Item,
|
531
515
|
{
|
532
516
|
label: import_utils.locales.getText("pisell2.text.duration"),
|
@@ -534,34 +518,23 @@ var Info = (_, ref) => {
|
|
534
518
|
rules: [{ required: true }]
|
535
519
|
},
|
536
520
|
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
537
|
-
))
|
538
|
-
}, [durationProps, timeObj]);
|
539
|
-
const resource = (0, import_react.useMemo)(() => {
|
540
|
-
console.log("render form resource");
|
541
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
|
521
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
|
542
522
|
import_Resources.default,
|
543
523
|
{
|
544
524
|
ref: resourcesRef,
|
545
525
|
state,
|
546
526
|
cacheItem: state.service.cacheItem,
|
547
|
-
getCurrentCacheItem
|
527
|
+
getCurrentCacheItem,
|
528
|
+
useDuration,
|
529
|
+
useStartTime
|
548
530
|
}
|
549
|
-
))
|
550
|
-
}, [state.renderType, (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources, (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps]);
|
551
|
-
const capacity = (0, import_react.useMemo)(() => {
|
552
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(
|
531
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(
|
553
532
|
import_Capacity.default,
|
554
533
|
{
|
555
534
|
state,
|
556
535
|
cacheItem: state.service.cacheItem
|
557
536
|
}
|
558
|
-
))
|
559
|
-
}, [state.locale, state.isTerminal, (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys]);
|
560
|
-
const hiddenQuantity = (0, import_react.useMemo)(() => {
|
561
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
|
562
|
-
}, []);
|
563
|
-
const quantity = (0, import_react.useMemo)(() => {
|
564
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
537
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null))), isNormalProduct && /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
|
565
538
|
import_antd.Form.Item,
|
566
539
|
{
|
567
540
|
label: import_utils.locales.getText("pisell2.text.quantity"),
|
@@ -583,11 +556,7 @@ var Info = (_, ref) => {
|
|
583
556
|
}
|
584
557
|
}
|
585
558
|
)
|
586
|
-
))
|
587
|
-
}, []);
|
588
|
-
const footer = (0, import_react.useMemo)(() => {
|
589
|
-
var _a2;
|
590
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
559
|
+
)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
591
560
|
"div",
|
592
561
|
{
|
593
562
|
className: "pisell-lowcode__booking-service-delete-wrap",
|
@@ -599,47 +568,13 @@ var Info = (_, ref) => {
|
|
599
568
|
{
|
600
569
|
type: "primary",
|
601
570
|
className: "pisell-lowcode__booking-service-body-edit-footer-apple",
|
602
|
-
disabled: !isNormalProduct && !((
|
571
|
+
disabled: !isNormalProduct && !((_F = state.service.resourcesOrigin) == null ? void 0 : _F.length),
|
603
572
|
onClick: () => {
|
604
573
|
form.submit();
|
605
574
|
}
|
606
575
|
},
|
607
576
|
import_utils.locales.getText("pisell2.text.apply")
|
608
|
-
))
|
609
|
-
}, [isNormalProduct, (_G = state.service.resourcesOrigin) == null ? void 0 : _G.length]);
|
610
|
-
console.log("render edit");
|
611
|
-
console.log(state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose), performance.now() - window.pp1, "打开商品1");
|
612
|
-
const [val, setVal] = (0, import_react.useState)(false);
|
613
|
-
(0, import_react.useEffect)(() => {
|
614
|
-
if (isShowTimeAndResource) {
|
615
|
-
setTimeout(() => {
|
616
|
-
setVal(true);
|
617
|
-
}, 200);
|
618
|
-
} else {
|
619
|
-
setVal(false);
|
620
|
-
}
|
621
|
-
}, [isShowTimeAndResource]);
|
622
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
623
|
-
import_drawer.default,
|
624
|
-
{
|
625
|
-
titleNoWrap: true,
|
626
|
-
zIndex: state.service.changeService ? 999 : 1e3,
|
627
|
-
forceRender: true,
|
628
|
-
mask: state.drawerMask,
|
629
|
-
open: state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
|
630
|
-
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
631
|
-
onClose: () => {
|
632
|
-
dispatch({
|
633
|
-
type: "setService",
|
634
|
-
payload: {
|
635
|
-
editModal: false,
|
636
|
-
cacheItem: null,
|
637
|
-
changeService: false
|
638
|
-
}
|
639
|
-
});
|
640
|
-
}
|
641
|
-
},
|
642
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)), footer)
|
577
|
+
)))
|
643
578
|
));
|
644
579
|
};
|
645
580
|
var editService_default = (0, import_react.forwardRef)(Info);
|
@@ -56,18 +56,14 @@ var Service = () => {
|
|
56
56
|
}, []);
|
57
57
|
const clearCart = (0, import_useClearCart.default)(state, dispatch);
|
58
58
|
const { dom } = (0, import_useQuotation.default)(state, dispatch);
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
}
|
69
|
-
), !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit }) : null), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null), dom);
|
70
|
-
}, [clearCart, dom, showAddTimeModal, clearCart]);
|
71
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderMemo);
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, clearCart, /* @__PURE__ */ import_react.default.createElement(
|
60
|
+
import_Lists.default,
|
61
|
+
{
|
62
|
+
isParallelResource: true,
|
63
|
+
onEdit: handleEdit,
|
64
|
+
onAction: handleAction,
|
65
|
+
onChange: (e, type) => dispatchService(type || "setService", e)
|
66
|
+
}
|
67
|
+
), !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit }) : null), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null), dom);
|
72
68
|
};
|
73
69
|
var service_default = import_react.default.memo(Service);
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export declare const getResourceTimeIsUsable: (item: any, cacheItem: any, resourceItem: any) => any;
|
2
|
+
export declare const getSumCapacity: ({ cacheItem }: any, isCalcQuantity?: boolean) => number;
|
3
|
+
/**
|
4
|
+
* @title: 查找是否有可用的time
|
5
|
+
* @description:
|
6
|
+
* @param {any} resourceItem
|
7
|
+
* @return {*}
|
8
|
+
* @Author: zhiwei.Wang
|
9
|
+
* @Date: 2024-01-09 13:57
|
10
|
+
*/
|
11
|
+
export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
|
12
|
+
export declare const getErrorList: (resource: any, cacheItem: any) => {
|
13
|
+
label: any;
|
14
|
+
type: string;
|
15
|
+
}[];
|
16
|
+
/**
|
17
|
+
* @title: 格式化资源, 添加自定义参数
|
18
|
+
* @description:
|
19
|
+
* @param {any} resourceItem
|
20
|
+
* @return {*}
|
21
|
+
* @Author: zhiwei.Wang
|
22
|
+
* @Date: 2024-01-09 13:40
|
23
|
+
*/
|
24
|
+
export declare const formatResource: (resourceItem: any, cacheItem?: any, formatLabel?: any) => any;
|
25
|
+
export declare const getAppointmentTimingPreference: (state: any) => any;
|
26
|
+
/**
|
27
|
+
* @title: 创建服务的开始时间和结束时间
|
28
|
+
* @description:
|
29
|
+
* @param {any} state
|
30
|
+
* @param {any} item
|
31
|
+
* @return {*}
|
32
|
+
* @Author: zhiwei.Wang
|
33
|
+
* @Date: 2024-01-26 14:09
|
34
|
+
*/
|
35
|
+
export declare const getServiceStartTimeAndEndTime: (state: any, cacheItem: any, timeObj: any) => any;
|