@pisell/private-materials 6.2.35 → 6.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +13 -29
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Content/index.js +1 -1
- package/es/components/appointmentBooking/components/Content/index.less +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +2 -2
- package/es/components/appointmentBooking/index.js +8 -2
- package/es/components/booking/components/voucher/index.js +5 -0
- package/es/components/booking/deposit/ClientItem/index.js +1 -1
- package/es/components/booking/deposit/DepositItem/index.js +1 -1
- package/es/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/es/components/booking/forms/single/RenderValueById.js +68 -17
- package/es/components/booking/forms/single/index.less +67 -1
- package/es/components/booking/hooks/useQuotation.js +1 -1
- package/es/components/booking/info/clientVariant/utils.d.ts +2 -0
- package/es/components/booking/info/clientVariant/utils.js +7 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.js +2 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/info2/service/editService/index.js +37 -29
- package/es/components/booking/info2/utilsByBooking.js +4 -4
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- package/es/components/booking/materiels/duration/index.js +1 -1
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/utils.js +3 -3
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/index.js +8 -1
- package/es/components/productSelect/components/TabProduct/index.js +7 -2
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +2 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +172 -91
- package/es/components/ticketBooking/components/timeBar/index.js +3 -3
- package/es/components/ticketBooking/utils/index.d.ts +3 -1
- package/es/components/ticketBooking/utils/index.js +18 -2
- package/es/hooks/useWindowSize.js +8 -1
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.js +29 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/es/plus/productSelect/CategoryTabs/index.js +171 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.js +37 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/es/plus/productSelect/ProductCard/index.js +170 -0
- package/es/plus/productSelect/ProductCard/index.less +270 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/es/plus/productSelect/ProductList/gridComponents.js +149 -0
- package/es/plus/productSelect/ProductList/index.d.ts +22 -0
- package/es/plus/productSelect/ProductList/index.js +72 -0
- package/es/plus/productSelect/ProductList/index.less +0 -0
- package/es/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/es/plus/productSelect/components/IntersectionObserver.js +276 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.js +357 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.js +243 -0
- package/es/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/es/plus/productSelect/components/TabsStructure/index.js +13 -0
- package/es/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/es/plus/productSelect/components/TabsStructure/styles.js +87 -0
- package/es/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/es/plus/productSelect/components/TabsStructure/types.js +1 -0
- package/es/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/es/plus/productSelect/components/TabsStructure/utils.js +56 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +43 -0
- package/es/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/es/plus/productSelect/hooks/useToken.js +34 -0
- package/es/plus/productSelect/index.d.ts +31 -0
- package/es/plus/productSelect/index.js +270 -0
- package/es/plus/productSelect/index.less +56 -0
- package/es/plus/productSelect/locales.d.ts +18 -0
- package/es/plus/productSelect/locales.js +17 -0
- package/es/plus/productSelect/theme/token.d.ts +17 -0
- package/es/plus/productSelect/theme/token.js +19 -0
- package/es/plus/productSelect/utils.d.ts +39 -0
- package/es/plus/productSelect/utils.js +162 -0
- package/es/pro/pisellNumberSelector/index.js +3 -3
- package/es/pro/pisellPhoneKeyboard/index.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Content/index.js +1 -1
- package/lib/components/appointmentBooking/components/Content/index.less +3 -3
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/index.js +6 -1
- package/lib/components/booking/components/voucher/index.js +5 -0
- package/lib/components/booking/deposit/ClientItem/index.js +1 -1
- package/lib/components/booking/deposit/DepositItem/index.js +1 -1
- package/lib/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/lib/components/booking/forms/single/RenderValueById.js +37 -9
- package/lib/components/booking/forms/single/index.less +67 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -1
- package/lib/components/booking/info/clientVariant/utils.d.ts +2 -0
- package/lib/components/booking/info/clientVariant/utils.js +13 -2
- package/lib/components/booking/info/clientVariant/vertical/index.js +7 -6
- package/lib/components/booking/info2/service/addService/utils.js +3 -3
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/info2/service/editService/index.js +22 -12
- package/lib/components/booking/info2/utilsByBooking.js +7 -8
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/materiels/duration/index.js +1 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.js +1 -1
- package/lib/components/booking/utils.js +3 -3
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/index.js +6 -1
- package/lib/components/productSelect/components/TabProduct/index.js +7 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -4
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +87 -14
- package/lib/components/ticketBooking/components/timeBar/index.js +89 -70
- package/lib/components/ticketBooking/utils/index.d.ts +3 -1
- package/lib/components/ticketBooking/utils/index.js +21 -0
- package/lib/hooks/useWindowSize.js +6 -1
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.js +62 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +183 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.js +58 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/lib/plus/productSelect/ProductCard/index.js +184 -0
- package/lib/plus/productSelect/ProductCard/index.less +270 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/lib/plus/productSelect/ProductList/gridComponents.js +148 -0
- package/lib/plus/productSelect/ProductList/index.d.ts +22 -0
- package/lib/plus/productSelect/ProductList/index.js +86 -0
- package/lib/plus/productSelect/ProductList/index.less +0 -0
- package/lib/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/lib/plus/productSelect/components/IntersectionObserver.js +269 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.js +393 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.js +209 -0
- package/lib/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/lib/plus/productSelect/components/TabsStructure/index.js +92 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.js +122 -0
- package/lib/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/lib/plus/productSelect/components/TabsStructure/types.js +17 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.js +72 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +72 -0
- package/lib/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/plus/productSelect/hooks/useToken.js +50 -0
- package/lib/plus/productSelect/index.d.ts +31 -0
- package/lib/plus/productSelect/index.js +299 -0
- package/lib/plus/productSelect/index.less +56 -0
- package/lib/plus/productSelect/locales.d.ts +18 -0
- package/lib/plus/productSelect/locales.js +41 -0
- package/lib/plus/productSelect/theme/token.d.ts +17 -0
- package/lib/plus/productSelect/theme/token.js +47 -0
- package/lib/plus/productSelect/utils.d.ts +39 -0
- package/lib/plus/productSelect/utils.js +138 -0
- package/lib/pro/pisellNumberSelector/index.js +3 -3
- package/lib/pro/pisellPhoneKeyboard/index.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
@@ -251,7 +251,7 @@ var Layout = function Layout() {
|
|
251
251
|
if (isMobile()) {
|
252
252
|
var _header$getBoundingCl, _footer$getBoundingCl;
|
253
253
|
var header = document.querySelector('.event-progress-bar');
|
254
|
-
var footer = document.querySelector('.pisell-section-footers-wrapper');
|
254
|
+
var footer = document.querySelector('.pisell-section-footers-wrapper') || document.querySelector('#layout-footer');
|
255
255
|
var content = document.querySelector('.parallel-content-mobile-wrap');
|
256
256
|
var headerHeight = (header === null || header === void 0 || (_header$getBoundingCl = header.getBoundingClientRect()) === null || _header$getBoundingCl === void 0 ? void 0 : _header$getBoundingCl.height) || 0;
|
257
257
|
var footerHeight = (footer === null || footer === void 0 || (_footer$getBoundingCl = footer.getBoundingClientRect()) === null || _footer$getBoundingCl === void 0 ? void 0 : _footer$getBoundingCl.height) || 0;
|
@@ -7,7 +7,7 @@
|
|
7
7
|
flex: 1;
|
8
8
|
|
9
9
|
.pisell-product-select-wrapper {
|
10
|
-
.pisell-product-
|
10
|
+
.pisell-product-select__tabs-wrapper {
|
11
11
|
top: 77px !important;
|
12
12
|
}
|
13
13
|
}
|
@@ -50,7 +50,7 @@
|
|
50
50
|
flex: none;
|
51
51
|
|
52
52
|
.pisell-product-select-wrapper {
|
53
|
-
.pisell-product-
|
53
|
+
.pisell-product-select__tabs-wrapper {
|
54
54
|
top: 0 !important;
|
55
55
|
}
|
56
56
|
}
|
@@ -97,7 +97,7 @@
|
|
97
97
|
|
98
98
|
.parallel-content-retail-wrap {
|
99
99
|
.pisell-product-select-wrapper {
|
100
|
-
.pisell-product-
|
100
|
+
.pisell-product-select__tabs-wrapper {
|
101
101
|
top: 0px !important;
|
102
102
|
}
|
103
103
|
}
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
|
17
17
|
import dayjs from 'dayjs';
|
18
18
|
import { isMobile, locales } from '@pisell/utils';
|
19
|
-
import ProductSelect from "
|
19
|
+
import ProductSelect from "../../../../plus/productSelect";
|
20
20
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
21
21
|
import { useAppointmentBookingContext } from "../../context";
|
22
22
|
import { useAppointmentBooking, useAppointmentBookingSetting, useAppointmentBookingProduct, useAppointmentBookingStep } from "../../hooks";
|
@@ -236,7 +236,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
236
236
|
var _isMobile = useMemo(function () {
|
237
237
|
if (typeof isMobile === 'function') return isMobile();
|
238
238
|
return isMobile;
|
239
|
-
}, isMobile);
|
239
|
+
}, [isMobile]);
|
240
240
|
return /*#__PURE__*/React.createElement("div", {
|
241
241
|
className: "appointment-service-wrap"
|
242
242
|
}, /*#__PURE__*/React.createElement(ProductSelect, {
|
@@ -30,10 +30,16 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
30
30
|
useEffect(function () {
|
31
31
|
var setRealVH = function setRealVH() {
|
32
32
|
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
33
|
-
var
|
33
|
+
var height = window.innerHeight;
|
34
|
+
|
35
|
+
// 检查 URL 参数中是否有 fromTabbar
|
36
|
+
var urlParams = new URLSearchParams(window.location.search);
|
37
|
+
if (urlParams.has('fromTabbar')) {
|
38
|
+
height = height - 54;
|
39
|
+
}
|
40
|
+
var vh = height * 0.01;
|
34
41
|
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
35
42
|
};
|
36
|
-
|
37
43
|
// 页面加载和窗口大小变化时都重新计算
|
38
44
|
setRealVH();
|
39
45
|
window.addEventListener('resize', setRealVH);
|
@@ -29,6 +29,7 @@ import "./index.less";
|
|
29
29
|
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
30
30
|
import { getServiceAddons } from "./utils";
|
31
31
|
import { useCustomer } from "../../../ticketBooking/hooks/pisellos";
|
32
|
+
import { getClientVariantClose } from "../../info/clientVariant/utils";
|
32
33
|
var ShopDiscountHooks = {
|
33
34
|
onInited: 'shopDiscount:onInited',
|
34
35
|
onDestroy: 'shopDiscount:onDestroy',
|
@@ -175,6 +176,10 @@ var VoucherCard = function VoucherCard(props) {
|
|
175
176
|
useEffect(function () {
|
176
177
|
if (!isBooking4Shop) return;
|
177
178
|
var onScanCustomerChange = function onScanCustomerChange(customer) {
|
179
|
+
var clientVariantClose = getClientVariantClose();
|
180
|
+
if (clientVariantClose) {
|
181
|
+
clientVariantClose();
|
182
|
+
}
|
178
183
|
selectCustomer(customer);
|
179
184
|
};
|
180
185
|
var onDiscountListChange = function onDiscountListChange(discount) {
|
@@ -2,7 +2,7 @@ import React, { useCallback } from "react";
|
|
2
2
|
import { Avatar } from "antd";
|
3
3
|
import { image, locales } from "@pisell/utils";
|
4
4
|
import classnames from 'classnames';
|
5
|
-
import User01 from "@pisell/icon/
|
5
|
+
import User01 from "@pisell/icon/es/User01";
|
6
6
|
import { isWalkIn as getIsWalkIn } from "../../utils";
|
7
7
|
import "./index.less";
|
8
8
|
var ClientItem = function ClientItem(props) {
|
@@ -3,7 +3,7 @@ import { Button, Dropdown } from 'antd';
|
|
3
3
|
import { DownOutlined } from '@ant-design/icons';
|
4
4
|
import { formatAmount, locales } from '@pisell/utils';
|
5
5
|
import ClientItem from "../ClientItem";
|
6
|
-
import Edit05 from '@pisell/icon/
|
6
|
+
import Edit05 from '@pisell/icon/es/Edit05';
|
7
7
|
import "./index.less";
|
8
8
|
var statusTagColor = {
|
9
9
|
unpaid: '#B2DDFF',
|
@@ -1,24 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
8
|
+
import { isArr, isUndefined, locales } from '@pisell/utils';
|
9
|
+
import { Iconfont } from '@pisell/materials';
|
10
|
+
import { Tag, Tooltip } from 'antd';
|
11
|
+
import { useRequest } from 'ahooks';
|
5
12
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
6
13
|
import { getFormData } from "../serve";
|
14
|
+
import "./index.less";
|
7
15
|
var RenderValueById = function RenderValueById(props) {
|
8
|
-
var _field$setting, _field$setting6;
|
16
|
+
var _field$setting, _ref, _ref$toString, _field$setting6;
|
9
17
|
var field = props.field,
|
10
18
|
propsValue = props.value;
|
11
19
|
var _useEngineContext = useEngineContext(),
|
12
20
|
appHelper = _useEngineContext.appHelper;
|
21
|
+
|
22
|
+
// 关联表单展示数量
|
23
|
+
var _useState = useState(10),
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
25
|
+
displayCount = _useState2[0],
|
26
|
+
setDisplayCount = _useState2[1];
|
13
27
|
var _getFormData = useRequest(getFormData, {
|
14
28
|
manual: true,
|
15
|
-
cacheKey: "formOption-".concat((_field$setting = field.setting) === null || _field$setting === void 0 ? void 0 : _field$setting.linkedTable),
|
29
|
+
cacheKey: "formOption-".concat((_field$setting = field.setting) === null || _field$setting === void 0 ? void 0 : _field$setting.linkedTable, "-").concat((_ref = propsValue || []) === null || _ref === void 0 || (_ref$toString = _ref.toString) === null || _ref$toString === void 0 ? void 0 : _ref$toString.call(_ref)),
|
16
30
|
staleTime: 500,
|
17
31
|
cacheTime: 5000
|
18
32
|
});
|
19
33
|
var value = useMemo(function () {
|
20
34
|
var v = propsValue;
|
21
|
-
if (field.filed_type ===
|
35
|
+
if (field.filed_type === 'form_to_form') {
|
22
36
|
if (isArr(propsValue)) {
|
23
37
|
v = propsValue;
|
24
38
|
} else if (propsValue !== null && propsValue !== void 0 && propsValue.form_ids) {
|
@@ -31,7 +45,7 @@ var RenderValueById = function RenderValueById(props) {
|
|
31
45
|
}, [propsValue]);
|
32
46
|
useEffect(function () {
|
33
47
|
var _field$setting2;
|
34
|
-
if (field.filed_type ===
|
48
|
+
if (field.filed_type === 'form_to_form' && (_field$setting2 = field.setting) !== null && _field$setting2 !== void 0 && _field$setting2.linkedTable) {
|
35
49
|
var _field$setting3;
|
36
50
|
_getFormData.run({
|
37
51
|
form_record_ids: value,
|
@@ -43,7 +57,7 @@ var RenderValueById = function RenderValueById(props) {
|
|
43
57
|
}, [field.filed_type, value]);
|
44
58
|
var options = useMemo(function () {
|
45
59
|
var _field$setting4, _field$setting5;
|
46
|
-
if (field.filed_type ===
|
60
|
+
if (field.filed_type === 'form_to_form' && field !== null && field !== void 0 && (_field$setting4 = field.setting) !== null && _field$setting4 !== void 0 && _field$setting4.linkedTable) {
|
47
61
|
var _getFormData$data;
|
48
62
|
return ((_getFormData$data = _getFormData.data) === null || _getFormData$data === void 0 || (_getFormData$data = _getFormData$data.data) === null || _getFormData$data === void 0 || (_getFormData$data = _getFormData$data.list) === null || _getFormData$data === void 0 ? void 0 : _getFormData$data.map(function (item) {
|
49
63
|
return {
|
@@ -55,24 +69,61 @@ var RenderValueById = function RenderValueById(props) {
|
|
55
69
|
return field === null || field === void 0 || (_field$setting5 = field.setting) === null || _field$setting5 === void 0 ? void 0 : _field$setting5.customTypeList;
|
56
70
|
}, [field.filed_type, field === null || field === void 0 || (_field$setting6 = field.setting) === null || _field$setting6 === void 0 ? void 0 : _field$setting6.customTypeList, _getFormData.data]);
|
57
71
|
if (isArr(value)) {
|
72
|
+
var _field$setting7;
|
73
|
+
// 是否是关联表单列表展示样式
|
74
|
+
var formListDisplay = (field === null || field === void 0 || (_field$setting7 = field.setting) === null || _field$setting7 === void 0 ? void 0 : _field$setting7.displayStyle) === 'list' && (field === null || field === void 0 ? void 0 : field.filed_type) === 'form_to_form';
|
58
75
|
var _list = options === null || options === void 0 ? void 0 : options.filter(function (i) {
|
59
76
|
return value === null || value === void 0 ? void 0 : value.includes((i === null || i === void 0 ? void 0 : i.id) || i.value);
|
60
77
|
});
|
61
|
-
var _str = (_list === null || _list === void 0 ? void 0 : _list.map(function (i) {
|
78
|
+
var _str = !formListDisplay && (_list === null || _list === void 0 ? void 0 : _list.map(function (i) {
|
62
79
|
var _appHelper$utils;
|
63
|
-
|
64
|
-
|
65
|
-
|
80
|
+
var title = appHelper === null || appHelper === void 0 || (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.translationShop((i === null || i === void 0 ? void 0 : i.title) || (i === null || i === void 0 ? void 0 : i.label));
|
81
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
82
|
+
title: title
|
83
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
84
|
+
className: "pisell-lowcode__booking-form-link-tag-title"
|
85
|
+
}, title));
|
86
|
+
})) || '-';
|
87
|
+
|
88
|
+
// 如果列表式展示
|
89
|
+
if (formListDisplay) {
|
90
|
+
var displayList = (_list === null || _list === void 0 ? void 0 : _list.slice(0, displayCount)) || [];
|
91
|
+
_str = (displayList === null || displayList === void 0 ? void 0 : displayList.map(function (i, index) {
|
92
|
+
var _appHelper$utils2;
|
93
|
+
var title = appHelper === null || appHelper === void 0 || (_appHelper$utils2 = appHelper.utils) === null || _appHelper$utils2 === void 0 ? void 0 : _appHelper$utils2.translationShop((i === null || i === void 0 ? void 0 : i.title) || (i === null || i === void 0 ? void 0 : i.label));
|
94
|
+
return /*#__PURE__*/React.createElement("div", {
|
95
|
+
className: "pisell-lowcode__booking-form-link-to-list-item"
|
96
|
+
}, /*#__PURE__*/React.createElement("span", {
|
97
|
+
className: "pisell-lowcode__booking-form-link-to-list-item-index"
|
98
|
+
}, index + 1), /*#__PURE__*/React.createElement(Tooltip, {
|
99
|
+
title: title
|
100
|
+
}, /*#__PURE__*/React.createElement("span", {
|
101
|
+
className: "pisell-lowcode__booking-form-link-to-list-item-title"
|
102
|
+
}, title)));
|
103
|
+
})) || '-';
|
104
|
+
}
|
105
|
+
return /*#__PURE__*/React.createElement("span", {
|
106
|
+
className: formListDisplay ? 'pisell-lowcode__booking-form-link-to-list-wrap' : ''
|
107
|
+
}, _str || '-', formListDisplay && (_list === null || _list === void 0 ? void 0 : _list.length) > displayCount && /*#__PURE__*/React.createElement("div", {
|
108
|
+
className: "pisell-lowcode__booking-form-link-to-list-item-more",
|
109
|
+
onClick: function onClick() {
|
110
|
+
return setDisplayCount(function (prev) {
|
111
|
+
return Math.min(prev + 10, (_list === null || _list === void 0 ? void 0 : _list.length) || 0);
|
112
|
+
});
|
113
|
+
}
|
114
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.text.form.link.to.another.record.more')), /*#__PURE__*/React.createElement(Iconfont, {
|
115
|
+
type: "icona-IconStroke"
|
116
|
+
})));
|
66
117
|
}
|
67
118
|
if (!isUndefined(value)) {
|
68
|
-
var _field$
|
69
|
-
if ((field === null || field === void 0 ? void 0 : field.filed_type) ===
|
70
|
-
return /*#__PURE__*/React.createElement("span", null, value ||
|
119
|
+
var _field$setting8, _appHelper$utils3, _item$, _item$2;
|
120
|
+
if ((field === null || field === void 0 ? void 0 : field.filed_type) === 'select' && !(field !== null && field !== void 0 && (_field$setting8 = field.setting) !== null && _field$setting8 !== void 0 && _field$setting8.version)) {
|
121
|
+
return /*#__PURE__*/React.createElement("span", null, value || '-');
|
71
122
|
}
|
72
123
|
var _item = options === null || options === void 0 ? void 0 : options.filter(function (i) {
|
73
124
|
return (i === null || i === void 0 ? void 0 : i.id) == value;
|
74
125
|
});
|
75
|
-
return (appHelper === null || appHelper === void 0 || (_appHelper$
|
126
|
+
return (appHelper === null || appHelper === void 0 || (_appHelper$utils3 = appHelper.utils) === null || _appHelper$utils3 === void 0 ? void 0 : _appHelper$utils3.translationShop((_item === null || _item === void 0 || (_item$ = _item[0]) === null || _item$ === void 0 ? void 0 : _item$.title) || (_item === null || _item === void 0 || (_item$2 = _item[0]) === null || _item$2 === void 0 ? void 0 : _item$2.label))) || '-';
|
76
127
|
}
|
77
128
|
return null;
|
78
129
|
};
|
@@ -1,3 +1,69 @@
|
|
1
1
|
.attachment-item {
|
2
2
|
width: 100%;
|
3
|
-
}
|
3
|
+
}
|
4
|
+
|
5
|
+
.pisell-lowcode__booking-form-link-tag-title {
|
6
|
+
overflow: hidden;
|
7
|
+
text-overflow: ellipsis;
|
8
|
+
white-space: nowrap;
|
9
|
+
display: inline-block;
|
10
|
+
max-width: 100%;
|
11
|
+
}
|
12
|
+
|
13
|
+
.pisell-lowcode__booking-form-link-to-list-wrap {
|
14
|
+
display: flex;
|
15
|
+
flex-direction: column;
|
16
|
+
gap: 12px;
|
17
|
+
|
18
|
+
|
19
|
+
.pisell-lowcode__booking-form-link-to-list-item-more {
|
20
|
+
padding: 4px 6px;
|
21
|
+
color: #705dff;
|
22
|
+
font-size: 14px;
|
23
|
+
cursor: pointer;
|
24
|
+
background-color: #f9fafb;
|
25
|
+
border-radius: 8px;
|
26
|
+
border: 1px solid #eaecf0;
|
27
|
+
display: flex;
|
28
|
+
justify-content: center;
|
29
|
+
align-items: center;
|
30
|
+
gap: 4px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.pisell-lowcode__booking-form-link-to-list-item {
|
34
|
+
display: flex;
|
35
|
+
align-items: center;
|
36
|
+
gap: 8px;
|
37
|
+
background-color: #f9fafb;
|
38
|
+
padding: 12px 14px;
|
39
|
+
border-radius: 8px;
|
40
|
+
border: 1px solid #eaecf0;
|
41
|
+
color: #101828;
|
42
|
+
font-size: 16px;
|
43
|
+
font-weight: 500;
|
44
|
+
white-space: normal;
|
45
|
+
|
46
|
+
.pisell-lowcode__booking-form-link-to-list-item-index {
|
47
|
+
padding: 0 5px;
|
48
|
+
min-width: 20px;
|
49
|
+
min-height: 20px;
|
50
|
+
line-height: 20px;
|
51
|
+
border-radius: 20px;
|
52
|
+
font-size: 14px;
|
53
|
+
font-weight: 600;
|
54
|
+
background-color: #705dff;
|
55
|
+
display: flex;
|
56
|
+
align-items: center;
|
57
|
+
justify-content: center;
|
58
|
+
color: #fff;
|
59
|
+
}
|
60
|
+
|
61
|
+
.pisell-lowcode__booking-form-link-to-list-item-title {
|
62
|
+
flex: 1;
|
63
|
+
overflow: hidden;
|
64
|
+
text-overflow: ellipsis;
|
65
|
+
white-space: nowrap;
|
66
|
+
display: block;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
16
16
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
17
17
|
import { getProductTotalPrice } from "../utils";
|
18
|
-
import useEngineContext from "
|
18
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
19
19
|
import { locales } from "@pisell/utils";
|
20
20
|
import { PisellModal } from "@pisell/materials";
|
21
21
|
import { getProductPrice } from "../info/service/serve";
|
@@ -3,4 +3,11 @@ export var getWaiverTitle = function getWaiverTitle(waiverForm) {
|
|
3
3
|
return (waiverForm || []).map(function (item) {
|
4
4
|
return "".concat(item.form_title || '', ":").concat(item.is_filled ? locales.getText('pisell2.text.filled') : locales.getText('pisell2.text.not-filled'));
|
5
5
|
}).join(';');
|
6
|
+
};
|
7
|
+
var clientVariantClose;
|
8
|
+
export var setClientVariantClose = function setClientVariantClose(fn) {
|
9
|
+
clientVariantClose = fn;
|
10
|
+
};
|
11
|
+
export var getClientVariantClose = function getClientVariantClose() {
|
12
|
+
return clientVariantClose;
|
6
13
|
};
|
@@ -36,10 +36,10 @@ import { getAppointmentService, getPets, isDayBooking, isOpenDeletePet, updateSe
|
|
36
36
|
import { moveItemToFront } from "../../utils";
|
37
37
|
import "./index.less";
|
38
38
|
import useAddHolder, { useFormDataConfig } from "../../hooks/useAddHolder";
|
39
|
-
import { getWaiverTitle } from "../utils";
|
39
|
+
import { getWaiverTitle, setClientVariantClose } from "../utils";
|
40
40
|
import useGetHolderList from "../../hooks/useGetHolderList";
|
41
41
|
var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
42
|
-
var _context$appHelper, _context$appHelper$ge, _state$bookingConfig2, _state$bookingConfig4, _state$pet3, _state$pet4, _state$pet6, _state$pet8, _state$client$value3, _state$bookingConfig7, _state$pet9, _state$bookingConfig8, _state$service2, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11, _state$client$value12, _state$client$value13, _context$appHelper2, _context$appHelper2$i, _state$bookingConfig9, _state$client6;
|
42
|
+
var _context$appHelper, _context$appHelper$ge, _state$bookingConfig2, _state$bookingConfig4, _state$pet3, _state$pet4, _state$pet6, _state$pet8, _state$client$value3, _state$bookingConfig7, _state$pet9, _state$bookingConfig8, _state$service2, _modalRef$current3, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11, _state$client$value12, _state$client$value13, _context$appHelper2, _context$appHelper2$i, _state$bookingConfig9, _state$client6;
|
43
43
|
var globalState = props.globalState,
|
44
44
|
setGlobalState = props.setGlobalState;
|
45
45
|
var modalRef = useRef();
|
@@ -348,6 +348,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
348
348
|
setSearch: (_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 ? void 0 : _modalRef$current2.setSearch
|
349
349
|
};
|
350
350
|
});
|
351
|
+
setClientVariantClose((_modalRef$current3 = modalRef.current) === null || _modalRef$current3 === void 0 ? void 0 : _modalRef$current3.close);
|
351
352
|
|
352
353
|
/**
|
353
354
|
* @title: 是否打开更改商品弹窗
|
@@ -584,7 +584,8 @@ export var getProductExtend = function getProductExtend(_ref11) {
|
|
584
584
|
state: state
|
585
585
|
});
|
586
586
|
if (getDuration(_cacheItem === null || _cacheItem === void 0 ? void 0 : _cacheItem.duration) === 'flexible') {
|
587
|
-
|
587
|
+
var _cacheItem$_data$time;
|
588
|
+
_cacheItem._extend.duration = (_cacheItem$_data$time = _cacheItem._data.timeObj) === null || _cacheItem$_data$time === void 0 || (_cacheItem$_data$time = _cacheItem$_data$time.durationSlicesBasedOnTime) === null || _cacheItem$_data$time === void 0 || (_cacheItem$_data$time = _cacheItem$_data$time[0]) === null || _cacheItem$_data$time === void 0 ? void 0 : _cacheItem$_data$time.value;
|
588
589
|
|
589
590
|
// 计算服务的开始和结束时间
|
590
591
|
var _getServiceTimes = getServiceTimes({
|
@@ -272,7 +272,6 @@ var AddTimeModal = function AddTimeModal() {
|
|
272
272
|
case 3:
|
273
273
|
newList = _context2.sent;
|
274
274
|
list = newList.map(function (d) {
|
275
|
-
debugger;
|
276
275
|
// 是否可用
|
277
276
|
var isUsable = isUsableProduct(d.add_time, state.service.cacheItem);
|
278
277
|
return _objectSpread(_objectSpread({}, d), {}, {
|
@@ -39,7 +39,7 @@ import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBo
|
|
39
39
|
import NoteModal from "../../../../../plus/noteModal";
|
40
40
|
var submitLock = false;
|
41
41
|
var Info = function Info(_, ref) {
|
42
|
-
var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$
|
42
|
+
var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI6, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI11, _state$bookingConfig5, _state$service$cacheI12, _state$service$cacheI13, _state$service9, _state$service$resour2, _state$service$cacheI14, _state$service$cacheI15;
|
43
43
|
var _Form$useForm = Form.useForm(),
|
44
44
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
45
45
|
form = _Form$useForm2[0];
|
@@ -224,7 +224,7 @@ var Info = function Info(_, ref) {
|
|
224
224
|
* @Date: 2024-01-09 14:04
|
225
225
|
*/
|
226
226
|
var onFinish = function onFinish(values) {
|
227
|
-
var _resourcesRef$current, _item$_extend;
|
227
|
+
var _resourcesRef$current, _item$_extend, _state$service$cacheI3;
|
228
228
|
var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
|
229
229
|
if (isShowTimeAndResource && !isSuccess) {
|
230
230
|
return;
|
@@ -283,6 +283,13 @@ var Info = function Info(_, ref) {
|
|
283
283
|
deleteCacheParams();
|
284
284
|
console.log('_onFinish', _list);
|
285
285
|
form.resetFields();
|
286
|
+
if (!!((_state$service$cacheI3 = state.service.cacheItem) !== null && _state$service$cacheI3 !== void 0 && _state$service$cacheI3.new)) {
|
287
|
+
window.dispatchEvent(new CustomEvent('onAddNewService', {
|
288
|
+
detail: {
|
289
|
+
cacheItem: _objectSpread({}, state.service.cacheItem)
|
290
|
+
}
|
291
|
+
}));
|
292
|
+
}
|
286
293
|
dispatch({
|
287
294
|
type: 'setService',
|
288
295
|
payload: {
|
@@ -356,12 +363,12 @@ var Info = function Info(_, ref) {
|
|
356
363
|
* @Date: 2024-01-09 14:06
|
357
364
|
*/
|
358
365
|
var isReason = useMemo(function () {
|
359
|
-
var _state$service$
|
360
|
-
var oPrice = Number(((_state$service$
|
366
|
+
var _state$service$cacheI4;
|
367
|
+
var oPrice = Number(((_state$service$cacheI4 = state.service.cacheItem) === null || _state$service$cacheI4 === void 0 ? void 0 : _state$service$cacheI4._extend.origin_total) || 0);
|
361
368
|
var cPrice = Number(useTotal || 0);
|
362
369
|
// 原价 !== 现价
|
363
370
|
return cPrice !== oPrice;
|
364
|
-
}, [useTotal, (_state$service$
|
371
|
+
}, [useTotal, (_state$service$cacheI5 = state.service.cacheItem) === null || _state$service$cacheI5 === void 0 || (_state$service$cacheI5 = _state$service$cacheI5._extend) === null || _state$service$cacheI5 === void 0 ? void 0 : _state$service$cacheI5.origin_total]);
|
365
372
|
var getResources = function getResources() {
|
366
373
|
var res = formatResources({
|
367
374
|
cacheItem: getCurrentCacheItem(),
|
@@ -435,7 +442,7 @@ var Info = function Info(_, ref) {
|
|
435
442
|
*/
|
436
443
|
useEffect(function () {
|
437
444
|
getDiscount();
|
438
|
-
}, [useTotal, (_state$service$
|
445
|
+
}, [useTotal, (_state$service$cacheI6 = state.service.cacheItem) === null || _state$service$cacheI6 === void 0 || (_state$service$cacheI6 = _state$service$cacheI6._extend) === null || _state$service$cacheI6 === void 0 ? void 0 : _state$service$cacheI6.origin_total]);
|
439
446
|
var bundles = useMemo(function () {
|
440
447
|
var _state$service5;
|
441
448
|
return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.cacheItem) === null || _state$service5 === void 0 || (_state$service5 = _state$service5._extend) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.other) === null || _state$service5 === void 0 ? void 0 : _state$service5.bundle) || [];
|
@@ -588,6 +595,22 @@ var Info = function Info(_, ref) {
|
|
588
595
|
}, [state.renderType, isNormalProduct]);
|
589
596
|
var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
|
590
597
|
var isNoSpecAndPackage = getIsNoSpecAndPackage(state.service.cacheItem);
|
598
|
+
var handleNoteConfirm = function handleNoteConfirm(noteValue) {
|
599
|
+
form.setFieldsValue({
|
600
|
+
note: noteValue
|
601
|
+
});
|
602
|
+
setNoteModalOpen(false);
|
603
|
+
};
|
604
|
+
var handleNoteDelete = function handleNoteDelete() {
|
605
|
+
form.setFieldsValue({
|
606
|
+
note: ''
|
607
|
+
});
|
608
|
+
setNoteModalOpen(false);
|
609
|
+
};
|
610
|
+
var handleNoteCancel = function handleNoteCancel() {
|
611
|
+
setNoteModalOpen(false);
|
612
|
+
};
|
613
|
+
console.log(isShowTimeAndResource, 'isShowTimeAndResource');
|
591
614
|
var productName = useMemo(function () {
|
592
615
|
var _state$service7;
|
593
616
|
return /*#__PURE__*/React.createElement(Col, {
|
@@ -615,7 +638,7 @@ var Info = function Info(_, ref) {
|
|
615
638
|
}))));
|
616
639
|
}, [(_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.cacheItem) === null || _state$service8 === void 0 || (_state$service8 = _state$service8._extend) === null || _state$service8 === void 0 ? void 0 : _state$service8.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
|
617
640
|
var price = useMemo(function () {
|
618
|
-
var _state$service$
|
641
|
+
var _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10;
|
619
642
|
return /*#__PURE__*/React.createElement(Col, {
|
620
643
|
span: 24
|
621
644
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
@@ -624,7 +647,7 @@ var Info = function Info(_, ref) {
|
|
624
647
|
rules: [{
|
625
648
|
required: true
|
626
649
|
}],
|
627
|
-
extra: useTotal !== ((_state$service$
|
650
|
+
extra: useTotal !== ((_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
|
628
651
|
}, /*#__PURE__*/React.createElement(PisellAdjustPriceInputNumber, {
|
629
652
|
style: {
|
630
653
|
width: '100%'
|
@@ -634,10 +657,10 @@ var Info = function Info(_, ref) {
|
|
634
657
|
prefix: state.amountSymbol,
|
635
658
|
onChange: handleTotalChange,
|
636
659
|
disabled: state.channelDisabledEdit,
|
637
|
-
originValue: ((_state$service$
|
638
|
-
placeholder: ((_state$service$
|
660
|
+
originValue: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
|
661
|
+
placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || '0'
|
639
662
|
})));
|
640
|
-
}, [useTotal, (_state$service$
|
663
|
+
}, [useTotal, (_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total, state.amountSymbol, state.channelDisabledEdit]);
|
641
664
|
var reason = useMemo(function () {
|
642
665
|
return isReason ? /*#__PURE__*/React.createElement(Col, {
|
643
666
|
span: 24
|
@@ -701,7 +724,7 @@ var Info = function Info(_, ref) {
|
|
701
724
|
// useStartTime={useStartTime}
|
702
725
|
}));
|
703
726
|
// 只监听内部使用值
|
704
|
-
}, [state.renderType, (_state$service$
|
727
|
+
}, [state.renderType, (_state$service$cacheI12 = state.service.cacheItem) === null || _state$service$cacheI12 === void 0 || (_state$service$cacheI12 = _state$service$cacheI12._data) === null || _state$service$cacheI12 === void 0 ? void 0 : _state$service$cacheI12.resources, (_state$service$cacheI13 = state.service.cacheItem) === null || _state$service$cacheI13 === void 0 || (_state$service$cacheI13 = _state$service$cacheI13._data) === null || _state$service$cacheI13 === void 0 ? void 0 : _state$service$cacheI13.resourceMaps]);
|
705
728
|
var capacity = useMemo(function () {
|
706
729
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
707
730
|
noStyle: true,
|
@@ -788,7 +811,7 @@ var Info = function Info(_, ref) {
|
|
788
811
|
}, locales.getText('pisell2.text.apply')));
|
789
812
|
}, [(_state$service$resour2 = state.service.resourcesOrigin) === null || _state$service$resour2 === void 0 ? void 0 : _state$service$resour2.length, isNormalProduct]);
|
790
813
|
console.log('render edit');
|
791
|
-
console.log(state.service.editModal && !((_state$service$
|
814
|
+
console.log(state.service.editModal && !((_state$service$cacheI14 = state.service.cacheItem) !== null && _state$service$cacheI14 !== void 0 && _state$service$cacheI14.autoClose), performance.now() - window.pp1, '打开商品1');
|
792
815
|
var _useState3 = useState(false),
|
793
816
|
_useState4 = _slicedToArray(_useState3, 2),
|
794
817
|
val = _useState4[0],
|
@@ -802,21 +825,6 @@ var Info = function Info(_, ref) {
|
|
802
825
|
setVal(false);
|
803
826
|
}
|
804
827
|
}, [isShowTimeAndResource]);
|
805
|
-
var handleNoteConfirm = function handleNoteConfirm(noteValue) {
|
806
|
-
form.setFieldsValue({
|
807
|
-
note: noteValue
|
808
|
-
});
|
809
|
-
setNoteModalOpen(false);
|
810
|
-
};
|
811
|
-
var handleNoteDelete = function handleNoteDelete() {
|
812
|
-
form.setFieldsValue({
|
813
|
-
note: ''
|
814
|
-
});
|
815
|
-
setNoteModalOpen(false);
|
816
|
-
};
|
817
|
-
var handleNoteCancel = function handleNoteCancel() {
|
818
|
-
setNoteModalOpen(false);
|
819
|
-
};
|
820
828
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
|
821
829
|
titleNoWrap: true
|
822
830
|
//通过zIndex的方式控制 添加商品 和 编辑服务弹窗的上下层级
|
@@ -824,7 +832,7 @@ var Info = function Info(_, ref) {
|
|
824
832
|
zIndex: state.service.changeService ? 999 : 1000,
|
825
833
|
forceRender: true,
|
826
834
|
mask: state.drawerMask,
|
827
|
-
open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$
|
835
|
+
open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$cacheI15 = state.service.cacheItem) !== null && _state$service$cacheI15 !== void 0 && _state$service$cacheI15.autoClose),
|
828
836
|
title: locales.getText('pisell2.text.edit-service'),
|
829
837
|
onClose: function onClose() {
|
830
838
|
dispatch({
|
@@ -10,7 +10,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
10
10
|
import dayjs from 'dayjs';
|
11
11
|
import { locales } from "@pisell/utils";
|
12
12
|
import { getCacheParams, getServeStartTime, getLastServer, flexibleObj, getServiceTimes, findNextDuration, getDays, isSessionProduct } from "../utils";
|
13
|
-
import { isNormalProductByDurationSchedule } from "../info/service2/utils";
|
14
13
|
import { isOption } from "../../ticketBooking/components/addServiceVariant/utils";
|
15
14
|
|
16
15
|
// 获取当前剩余量
|
@@ -338,7 +337,7 @@ export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTim
|
|
338
337
|
// 下一个商品的扩展参数
|
339
338
|
var _extend = {
|
340
339
|
// 时长: 当前商品时长 > 第一个时长
|
341
|
-
duration: findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 || (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value)
|
340
|
+
duration: findNextDuration(cacheItem.duration, timeObj === null || timeObj === void 0 ? void 0 : timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 || (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value)
|
342
341
|
};
|
343
342
|
|
344
343
|
// 如果有上一个商品, 将上一个商品的某些参数 设置到新商品上
|
@@ -352,7 +351,8 @@ export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTim
|
|
352
351
|
} else {
|
353
352
|
// 如果上个服务商品的结束时间跨天, 那么设置为最后一个时间段, 不跨天则取上一个的结束时间
|
354
353
|
if (dayjs(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
|
355
|
-
|
354
|
+
var _timeObj$timeSlices;
|
355
|
+
_extend.start_time = timeObj === null || timeObj === void 0 ? void 0 : timeObj.timeSlices[(timeObj === null || timeObj === void 0 || (_timeObj$timeSlices = timeObj.timeSlices) === null || _timeObj$timeSlices === void 0 ? void 0 : _timeObj$timeSlices.length) - 1].value;
|
356
356
|
} else {
|
357
357
|
_extend.start_time = lastServerEndDate.format("HH:mm");
|
358
358
|
}
|
@@ -414,7 +414,7 @@ export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTim
|
|
414
414
|
// 是否是无规格无套餐商品的非预约商品
|
415
415
|
export var getIsNoSpecAndPackage = function getIsNoSpecAndPackage(product) {
|
416
416
|
var _product$variant;
|
417
|
-
if (
|
417
|
+
if ((product === null || product === void 0 ? void 0 : product.extension_type) !== 'normal') {
|
418
418
|
return false;
|
419
419
|
}
|
420
420
|
// 编辑状态参数判断
|
@@ -299,6 +299,7 @@ declare const _default: {
|
|
299
299
|
'pisell2.text.quotation.product.change.title': string;
|
300
300
|
'pisell2.text.quotation.product.change.describe': string;
|
301
301
|
'pisell2.booking.notes.placeholder': string;
|
302
|
+
'pisell2.text.form.link.to.another.record.more': string;
|
302
303
|
};
|
303
304
|
'zh-CN': {
|
304
305
|
'pisell2.text.refunded-amount': string;
|
@@ -600,6 +601,7 @@ declare const _default: {
|
|
600
601
|
'pisell2.text.quotation.product.change.title': string;
|
601
602
|
'pisell2.text.quotation.product.change.describe': string;
|
602
603
|
'pisell2.booking.notes.placeholder': string;
|
604
|
+
'pisell2.text.form.link.to.another.record.more': string;
|
603
605
|
};
|
604
606
|
'zh-HK': {
|
605
607
|
'pisell2.text.refunded-amount': string;
|
@@ -901,6 +903,7 @@ declare const _default: {
|
|
901
903
|
'pisell2.text.quotation.product.change.title': string;
|
902
904
|
'pisell2.text.quotation.product.change.describe': string;
|
903
905
|
'pisell2.booking.notes.placeholder': string;
|
906
|
+
'pisell2.text.form.link.to.another.record.more': string;
|
904
907
|
};
|
905
908
|
};
|
906
909
|
export default _default;
|