@pisell/private-materials 3.3.49 → 3.3.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/assets/resource.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Resource/index.js +44 -5
- package/es/components/appointmentBooking/hooks.js +218 -177
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/drawer/index.js +4 -2
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +25 -17
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/client/index.js +2 -1
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/pet/index.js +3 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +27 -27
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +3 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +3 -3
- package/es/components/booking/info2/service/addService/utils.js +48 -52
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.js +28 -10
- package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
- package/es/components/productSelect/components/productGroup/index.js +20 -7
- package/es/components/productSelect/components/productGroup/index.less +14 -1
- package/es/components/productSelect/index.less +1 -2
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
- package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.js +2 -1
- package/es/components/ticketBooking/locales.d.ts +3 -0
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +35 -3
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/assets/resource.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
- package/lib/components/appointmentBooking/hooks.js +12 -3
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
- package/lib/components/booking/components/drawer/index.js +2 -2
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +31 -27
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/client/index.js +2 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/pet/index.js +3 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info/utils.js +37 -1
- package/lib/components/booking/info2/index.js +7 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +3 -3
- package/lib/components/booking/info2/service/addService/utils.js +20 -13
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.js +19 -6
- package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
- package/lib/components/productSelect/components/productGroup/index.js +24 -4
- package/lib/components/productSelect/components/productGroup/index.less +14 -1
- package/lib/components/productSelect/index.less +1 -2
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +28 -15
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/lib/components/ticketBooking/index.js +2 -1
- package/lib/components/ticketBooking/locales.d.ts +3 -0
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +35 -3
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/model.d.ts +9 -1
- package/package.json +2 -2
|
@@ -106,6 +106,7 @@ declare const _default: {
|
|
|
106
106
|
'pisell2.appointment.add-guests': string;
|
|
107
107
|
'pisell2.appointment.policy': string;
|
|
108
108
|
'pisell2.appointment.policy.confirm': string;
|
|
109
|
+
'pisell2.appointment.resource.tip': (val: string) => string;
|
|
109
110
|
'pisell2.text.apply': string;
|
|
110
111
|
'pisell2.text.goodpass': string;
|
|
111
112
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -223,6 +224,7 @@ declare const _default: {
|
|
|
223
224
|
'pisell2.appointment.add-guests': string;
|
|
224
225
|
'pisell2.appointment.policy': string;
|
|
225
226
|
'pisell2.appointment.policy.confirm': string;
|
|
227
|
+
'pisell2.appointment.resource.tip': (val: string) => string;
|
|
226
228
|
'pisell2.text.apply': string;
|
|
227
229
|
'pisell2.text.goodpass': string;
|
|
228
230
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -340,6 +342,7 @@ declare const _default: {
|
|
|
340
342
|
'pisell2.appointment.add-guests': string;
|
|
341
343
|
'pisell2.appointment.policy': string;
|
|
342
344
|
'pisell2.appointment.policy.confirm': string;
|
|
345
|
+
'pisell2.appointment.resource.tip': (val: string) => string;
|
|
343
346
|
'pisell2.text.apply': string;
|
|
344
347
|
'pisell2.text.goodpass': string;
|
|
345
348
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -122,6 +122,9 @@ export default {
|
|
|
122
122
|
'pisell2.appointment.add-guests': 'Add guests',
|
|
123
123
|
'pisell2.appointment.policy': 'You have read and agreed to this policy',
|
|
124
124
|
'pisell2.appointment.policy.confirm': 'Confirm',
|
|
125
|
+
'pisell2.appointment.resource.tip': function pisell2AppointmentResourceTip(val) {
|
|
126
|
+
return "Tip: Change ".concat(val || 'resource', " using the dropdown in the cart.");
|
|
127
|
+
},
|
|
125
128
|
'pisell2.text.apply': 'Apply',
|
|
126
129
|
'pisell2.text.goodpass': 'GoodPass',
|
|
127
130
|
'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
|
|
@@ -255,6 +258,9 @@ export default {
|
|
|
255
258
|
'pisell2.appointment.add-guests': '添加预约人',
|
|
256
259
|
'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
|
|
257
260
|
'pisell2.appointment.policy.confirm': '确定',
|
|
261
|
+
'pisell2.appointment.resource.tip': function pisell2AppointmentResourceTip(val) {
|
|
262
|
+
return "\u63D0\u793A\uFF1A\u5728\u53F3\u4FA7\u8D2D\u7269\u8F66\u4E2D\uFF0C\u901A\u8FC7\u4E0B\u62C9\u6846\u4FEE\u6539\u201C".concat(val || '资源', "\u201D");
|
|
263
|
+
},
|
|
258
264
|
'pisell2.text.apply': '应用',
|
|
259
265
|
'pisell2.text.goodpass': '商品券',
|
|
260
266
|
'pisell2.text.goodpass.product-vouchers': '商品兑换券',
|
|
@@ -388,6 +394,9 @@ export default {
|
|
|
388
394
|
'pisell2.appointment.add-guests': '添加預約人',
|
|
389
395
|
'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
|
|
390
396
|
'pisell2.appointment.policy.confirm': '確定',
|
|
397
|
+
'pisell2.appointment.resource.tip': function pisell2AppointmentResourceTip(val) {
|
|
398
|
+
return "\u63D0\u793A\uFF1A\u5728\u53F3\u5074\u8CFC\u7269\u8ECA\u4E2D\uFF0C\u900F\u904E\u4E0B\u62C9\u6846\u4FEE\u6539\u201C".concat(val || '資源', "\u201D");
|
|
399
|
+
},
|
|
391
400
|
'pisell2.text.apply': '應用',
|
|
392
401
|
'pisell2.text.goodpass': '商品券',
|
|
393
402
|
'pisell2.text.goodpass.product-vouchers': '商品兌換券',
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { image, locales } from '@pisell/utils';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { getDiscountTime } from "../../../utils";
|
|
5
|
+
import Decimal from 'decimal.js';
|
|
6
|
+
import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
|
|
5
7
|
import "./index.less";
|
|
6
8
|
var ProductItem = function ProductItem(_ref) {
|
|
7
9
|
var item = _ref.item,
|
|
@@ -9,6 +11,13 @@ var ProductItem = function ProductItem(_ref) {
|
|
|
9
11
|
amountSymbol = _ref.amountSymbol,
|
|
10
12
|
style = _ref.style,
|
|
11
13
|
className = _ref.className;
|
|
14
|
+
var price = item.price,
|
|
15
|
+
is_bundle = item.is_bundle,
|
|
16
|
+
minimum_markup_price = item.minimum_markup_price;
|
|
17
|
+
var _price = price;
|
|
18
|
+
if (is_bundle) {
|
|
19
|
+
_price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
|
|
20
|
+
}
|
|
12
21
|
var stockText = useMemo(function () {
|
|
13
22
|
if (item.is_track === 0) {
|
|
14
23
|
return false;
|
|
@@ -45,6 +54,9 @@ var ProductItem = function ProductItem(_ref) {
|
|
|
45
54
|
className: "server-product-time"
|
|
46
55
|
}, stockText), /*#__PURE__*/React.createElement("div", {
|
|
47
56
|
className: "server-product-price"
|
|
48
|
-
},
|
|
57
|
+
}, /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
58
|
+
value: _price,
|
|
59
|
+
isMini: is_bundle
|
|
60
|
+
}))));
|
|
49
61
|
};
|
|
50
62
|
export default ProductItem;
|
|
@@ -6,7 +6,7 @@ import CollapsibleList from "../../collapsibleList";
|
|
|
6
6
|
import { renderBundles } from "../../collapsibleList/utils";
|
|
7
7
|
import "./index.less";
|
|
8
8
|
var SelectProductItem = function SelectProductItem(_ref) {
|
|
9
|
-
var _item$_extend, _item$_extend2;
|
|
9
|
+
var _item$_extend, _item$_extend$other, _item$_extend2, _item$_extend2$other;
|
|
10
10
|
var item = _ref.item,
|
|
11
11
|
_onClick = _ref.onClick,
|
|
12
12
|
onChangeQuantity = _ref.onChangeQuantity,
|
|
@@ -28,7 +28,7 @@ var SelectProductItem = function SelectProductItem(_ref) {
|
|
|
28
28
|
style: style,
|
|
29
29
|
className: classNames("server-select-product", className),
|
|
30
30
|
onClick: function onClick() {
|
|
31
|
-
_onClick === null || _onClick === void 0
|
|
31
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(item);
|
|
32
32
|
}
|
|
33
33
|
}, item.cover ? /*#__PURE__*/React.createElement("img", {
|
|
34
34
|
src: image.ali(item.cover, 100),
|
|
@@ -39,11 +39,11 @@ var SelectProductItem = function SelectProductItem(_ref) {
|
|
|
39
39
|
className: "server-select-product-title"
|
|
40
40
|
}, item.title), /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: "server-select-product-subtitle"
|
|
42
|
-
}, item.subtitle || ""), (((_item$_extend = item._extend) === null || _item$_extend === void 0
|
|
42
|
+
}, item.subtitle || ""), (((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : (_item$_extend$other = _item$_extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle) || []).length ? /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
43
43
|
style: {
|
|
44
44
|
width: "100%"
|
|
45
45
|
},
|
|
46
|
-
list: ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0
|
|
46
|
+
list: ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : (_item$_extend2$other = _item$_extend2.other) === null || _item$_extend2$other === void 0 ? void 0 : _item$_extend2$other.bundle) || [],
|
|
47
47
|
renderItem: function renderItem(item) {
|
|
48
48
|
return renderBundles(item, amountSymbol);
|
|
49
49
|
}
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
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
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
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(
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
|
|
8
8
|
import classNames from "classnames";
|
|
@@ -13,10 +13,6 @@ import "./index.less";
|
|
|
13
13
|
|
|
14
14
|
// tabs 子组件定义
|
|
15
15
|
|
|
16
|
-
// 定义主键类型
|
|
17
|
-
|
|
18
|
-
// Tabs 可传递的参数
|
|
19
|
-
|
|
20
16
|
var Tabs = function Tabs(_ref, ref) {
|
|
21
17
|
var renderTab = _ref.renderTab,
|
|
22
18
|
rowKey = _ref.rowKey,
|
|
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
|
|
|
29
29
|
onChange: function onChange(e) {
|
|
30
30
|
var _resetProps$onChange;
|
|
31
31
|
e.persist();
|
|
32
|
-
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0
|
|
32
|
+
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
|
|
33
33
|
}
|
|
34
34
|
}), _options);
|
|
35
35
|
};
|
|
@@ -16,7 +16,9 @@ var Drawer = function Drawer(props) {
|
|
|
16
16
|
var _props$hideScrollBar = props.hideScrollBar,
|
|
17
17
|
hideScrollBar = _props$hideScrollBar === void 0 ? true : _props$hideScrollBar,
|
|
18
18
|
_props$showGoBack = props.showGoBack,
|
|
19
|
-
showGoBack = _props$showGoBack === void 0 ? true : _props$showGoBack
|
|
19
|
+
showGoBack = _props$showGoBack === void 0 ? true : _props$showGoBack,
|
|
20
|
+
_props$mask = props.mask,
|
|
21
|
+
mask = _props$mask === void 0 ? false : _props$mask;
|
|
20
22
|
return /*#__PURE__*/React.createElement(OriginDrawer, _extends({
|
|
21
23
|
width: '600px',
|
|
22
24
|
closable: false,
|
|
@@ -30,7 +32,7 @@ var Drawer = function Drawer(props) {
|
|
|
30
32
|
padding: 0
|
|
31
33
|
},
|
|
32
34
|
push: false,
|
|
33
|
-
mask:
|
|
35
|
+
mask: mask
|
|
34
36
|
}), /*#__PURE__*/React.createElement("div", {
|
|
35
37
|
className: classNames('pisell-lowcode__booking-drawer-title-wrap')
|
|
36
38
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -22,7 +22,7 @@ import useEngineContext from "../../../../hooks/useEngineContext";
|
|
|
22
22
|
import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
|
|
23
23
|
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
24
24
|
import "./index.less";
|
|
25
|
-
import { useMemoizedFn } from
|
|
25
|
+
import { useMemoizedFn, useDebounceFn } from 'ahooks';
|
|
26
26
|
var ShopDiscountHooks = {
|
|
27
27
|
onInited: 'shopDiscount:onInited',
|
|
28
28
|
onDestroy: 'shopDiscount:onDestroy',
|
|
@@ -98,25 +98,33 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
98
98
|
});
|
|
99
99
|
return val;
|
|
100
100
|
}, [state.service.value]);
|
|
101
|
+
var _useDebounceFn = useDebounceFn(function () {
|
|
102
|
+
var _state$service;
|
|
103
|
+
// console.log('state.service.value1', state.service.value);
|
|
104
|
+
if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (isBooking4Shop) {
|
|
108
|
+
var val = shopDiscount.calcDiscount(state.service.value);
|
|
109
|
+
// console.log('input: ', state.service.value);
|
|
110
|
+
// console.log('output: ', val);
|
|
111
|
+
productRef.current = val.productList;
|
|
112
|
+
// console.log('val.productList', val.productList);
|
|
113
|
+
dispatch({
|
|
114
|
+
type: 'setService',
|
|
115
|
+
payload: _objectSpread(_objectSpread({}, services), {}, {
|
|
116
|
+
value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
wait: 500
|
|
122
|
+
}),
|
|
123
|
+
run = _useDebounceFn.run;
|
|
101
124
|
|
|
102
125
|
// 更新productList
|
|
103
126
|
useEffect(function () {
|
|
104
|
-
|
|
105
|
-
if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (isBooking4Shop) {
|
|
109
|
-
var val = shopDiscount.calcDiscount(state.service.value);
|
|
110
|
-
console.log('input: ', state.service.value);
|
|
111
|
-
console.log('output: ', val);
|
|
112
|
-
productRef.current = val.productList;
|
|
113
|
-
dispatch({
|
|
114
|
-
type: 'setService',
|
|
115
|
-
payload: _objectSpread(_objectSpread({}, services), {}, {
|
|
116
|
-
value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
|
|
117
|
-
})
|
|
118
|
-
});
|
|
119
|
-
}
|
|
127
|
+
run();
|
|
120
128
|
}, [JSON.stringify(serviceMemo), isBooking4Shop]);
|
|
121
129
|
var fn = useMemoizedFn(function (result) {
|
|
122
130
|
var _result$productList;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|
|
@@ -401,7 +401,8 @@ var Client = function Client() {
|
|
|
401
401
|
isPreview: false,
|
|
402
402
|
drawerProps: {
|
|
403
403
|
title: locales.getText('pisell2.text.select-customer'),
|
|
404
|
-
destroyOnClose: true
|
|
404
|
+
destroyOnClose: true,
|
|
405
|
+
mask: state.drawerMask
|
|
405
406
|
},
|
|
406
407
|
mode: "single",
|
|
407
408
|
createItemText: locales.getText('pisell2.text.create-new-customer'),
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -623,6 +623,9 @@ var Pet = function Pet(props) {
|
|
|
623
623
|
form_id: formDataConfig === null || formDataConfig === void 0 ? void 0 : formDataConfig.form_id
|
|
624
624
|
})].concat(_toConsumableArray(((_state$pet11 = state.pet) === null || _state$pet11 === void 0 || (_state$pet11 = _state$pet11.formData) === null || _state$pet11 === void 0 || (_state$pet11 = _state$pet11[0]) === null || _state$pet11 === void 0 ? void 0 : _state$pet11.options) || [])));
|
|
625
625
|
},
|
|
626
|
+
drawerProps: {
|
|
627
|
+
mask: state.drawerMask
|
|
628
|
+
},
|
|
626
629
|
getHolders: getHolders,
|
|
627
630
|
addCallbackService: _addCallback,
|
|
628
631
|
loading: valueLoading,
|
|
@@ -19,7 +19,7 @@ var Like = function Like(_ref) {
|
|
|
19
19
|
}
|
|
20
20
|
e.preventDefault();
|
|
21
21
|
e.stopPropagation();
|
|
22
|
-
onChange === null || onChange === void 0
|
|
22
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(status === "like" ? "common" : "like");
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
};
|
|
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
244
244
|
* @Author: WangHan
|
|
245
245
|
* @Date: 2024-12-24 11:32
|
|
246
246
|
*/
|
|
247
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
247
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -540,7 +540,7 @@ export var isAllNormalProductByState = function isAllNormalProductByState(state)
|
|
|
540
540
|
return isAllNormalProduct(state.service.value);
|
|
541
541
|
};
|
|
542
542
|
var getGeneralParams = function getGeneralParams(item, state, isParallelResource) {
|
|
543
|
-
var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8;
|
|
543
|
+
var _formData$, _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8, _item$_extend9;
|
|
544
544
|
var pet = state.pet,
|
|
545
545
|
service = state.service;
|
|
546
546
|
var _ref8 = pet || {},
|
|
@@ -614,7 +614,8 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
|
|
|
614
614
|
addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
|
|
615
615
|
holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
|
|
616
616
|
start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate : "",
|
|
617
|
-
end_date: !isNormalProduct ? (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date) : ""
|
|
617
|
+
end_date: !isNormalProduct ? (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date) : "",
|
|
618
|
+
rowKey: "rowKey-".concat(item === null || item === void 0 || (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 || (_item$_extend9 = _item$_extend9.other) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.rowKey)
|
|
618
619
|
}, parallelResourceOtherParams);
|
|
619
620
|
};
|
|
620
621
|
var calcAddTimeTotalPrice = function calcAddTimeTotalPrice(total, addTimeProducts) {
|
|
@@ -637,50 +638,49 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
637
638
|
var normalList = [];
|
|
638
639
|
var groupList = [];
|
|
639
640
|
var formItem = function formItem(item) {
|
|
640
|
-
var _item$
|
|
641
|
+
var _item$_extend10, _item$_extend11, _item$_extend12, _item$_extend14, _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20, _item$_extend21, _item$_extend22, _resourceItem, _item$_extend23, _item$_extend24, _item$_extend25, _item$_extend26, _item$_extend27;
|
|
641
642
|
var _isDayBookingProduct = isDayBookingProduct(item, state);
|
|
642
|
-
var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$
|
|
643
|
-
var options = formatOptions(item === null || item === void 0 || (_item$
|
|
644
|
-
var bundle = formatBundle(item === null || item === void 0 || (_item$
|
|
643
|
+
var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.holder_id);
|
|
644
|
+
var options = formatOptions(item === null || item === void 0 || (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.option);
|
|
645
|
+
var bundle = formatBundle(item === null || item === void 0 || (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.bundle);
|
|
645
646
|
// 是否是普通商品
|
|
646
647
|
var isNormalProduct = !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
|
|
647
648
|
var resourceItem = {};
|
|
648
649
|
var errorMessage = '';
|
|
649
650
|
if (_isDayBookingProduct || isGeneral) {
|
|
650
|
-
var _item$
|
|
651
|
-
resourceItem = getResourceItem(item === null || item === void 0 || (_item$
|
|
651
|
+
var _item$_extend13;
|
|
652
|
+
resourceItem = getResourceItem(item === null || item === void 0 || (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.resource, state);
|
|
652
653
|
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
653
654
|
}
|
|
654
655
|
var generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
|
|
655
|
-
console.log(isNormalProduct, 'isNormalProduct');
|
|
656
656
|
return _objectSpread(_objectSpread({
|
|
657
657
|
id: item === null || item === void 0 ? void 0 : item.id,
|
|
658
658
|
_id: item === null || item === void 0 ? void 0 : item._id,
|
|
659
659
|
name: item === null || item === void 0 ? void 0 : item.title,
|
|
660
|
-
price: item === null || item === void 0 || (_item$
|
|
661
|
-
total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$
|
|
662
|
-
origin_total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$
|
|
660
|
+
price: item === null || item === void 0 || (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.price,
|
|
661
|
+
total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.total, item === null || item === void 0 || (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.relation_details),
|
|
662
|
+
origin_total: calcAddTimeTotalPrice(item === null || item === void 0 || (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.origin_total, item === null || item === void 0 || (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.relation_details),
|
|
663
663
|
num: item === null || item === void 0 ? void 0 : item._extend.quantity,
|
|
664
664
|
image: item === null || item === void 0 ? void 0 : item.cover,
|
|
665
665
|
isShowNote: true,
|
|
666
666
|
note: item === null || item === void 0 ? void 0 : item.note,
|
|
667
|
-
like_status: item === null || item === void 0 || (_item$
|
|
667
|
+
like_status: item === null || item === void 0 || (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.like_status,
|
|
668
668
|
bundle: bundle,
|
|
669
669
|
options: options,
|
|
670
670
|
errorMessage: errorMessage,
|
|
671
|
-
product_option_string: item === null || item === void 0 || (_item$
|
|
672
|
-
discount_reason: item === null || item === void 0 || (_item$
|
|
673
|
-
resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$
|
|
671
|
+
product_option_string: item === null || item === void 0 || (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.product_option_string,
|
|
672
|
+
discount_reason: item === null || item === void 0 || (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.discount_reason,
|
|
673
|
+
resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.resource,
|
|
674
674
|
relation_form_name: isNormalProduct ? '' : ((_resourceItem = resourceItem) === null || _resourceItem === void 0 ? void 0 : _resourceItem.labelText) || item.relation_form_name,
|
|
675
675
|
holder_title: clientTitle,
|
|
676
|
-
start_date: !isNormalProduct ? item === null || item === void 0 || (_item$
|
|
677
|
-
end_date: !isNormalProduct ? item === null || item === void 0 || (_item$
|
|
678
|
-
holder_id: (item === null || item === void 0 || (_item$
|
|
676
|
+
start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.start_date : '',
|
|
677
|
+
end_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.end_date : '',
|
|
678
|
+
holder_id: (item === null || item === void 0 || (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.holder_id) || 0,
|
|
679
679
|
isNormalProduct: isNormalProduct,
|
|
680
680
|
locale: state.locale,
|
|
681
681
|
symbol: state.amountSymbol,
|
|
682
|
-
relation_products: (item === null || item === void 0 || (_item$
|
|
683
|
-
items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$
|
|
682
|
+
relation_products: (item === null || item === void 0 || (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.relation_details) || [],
|
|
683
|
+
items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.items) || [])
|
|
684
684
|
}, generalParams), {}, {
|
|
685
685
|
_origin: item
|
|
686
686
|
});
|
|
@@ -688,8 +688,8 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
688
688
|
|
|
689
689
|
// 将商品分为组商品和非组商品
|
|
690
690
|
lists.forEach(function (item) {
|
|
691
|
-
var _item$
|
|
692
|
-
if (!(item !== null && item !== void 0 && (_item$
|
|
691
|
+
var _item$_extend28;
|
|
692
|
+
if (!(item !== null && item !== void 0 && (_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.groupId)) {
|
|
693
693
|
normalList.push(formItem(item));
|
|
694
694
|
} else {
|
|
695
695
|
groupList.push(item);
|
|
@@ -698,8 +698,8 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
698
698
|
|
|
699
699
|
// 根据item._extend.groupId 进行分组
|
|
700
700
|
var groups = groupList.reduce(function (prev, item) {
|
|
701
|
-
var _item$
|
|
702
|
-
var groupId = item === null || item === void 0 || (_item$
|
|
701
|
+
var _item$_extend29;
|
|
702
|
+
var groupId = item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId;
|
|
703
703
|
if (!prev[groupId]) {
|
|
704
704
|
prev[groupId] = [];
|
|
705
705
|
}
|
|
@@ -869,8 +869,8 @@ export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(stat
|
|
|
869
869
|
// 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
|
|
870
870
|
// services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
|
|
871
871
|
services: services.filter(function (item) {
|
|
872
|
-
var _item$
|
|
873
|
-
return ((_item$
|
|
872
|
+
var _item$_extend30;
|
|
873
|
+
return ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.holder_id) == d.form_record_id && checkType(item.extension_type);
|
|
874
874
|
})
|
|
875
875
|
});
|
|
876
876
|
});
|
|
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
|
95
95
|
if (renderType === 'eventBooking') {
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
|
-
var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327,
|
|
98
|
+
var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
|
|
99
99
|
return booking4Shops.includes(shopId);
|
|
100
100
|
};
|
|
101
101
|
function generateDateRange(start, end) {
|
|
@@ -27,8 +27,8 @@ import { updateServiceDate } from "../info/date";
|
|
|
27
27
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
28
28
|
import Notes from "../info/notes";
|
|
29
29
|
import "../info/index.less";
|
|
30
|
-
import { Skeleton } from
|
|
31
|
-
import classNames from
|
|
30
|
+
import { Skeleton } from 'antd';
|
|
31
|
+
import classNames from 'classnames';
|
|
32
32
|
import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
|
|
33
33
|
import { getLocale } from "../../../utils/locales";
|
|
34
34
|
var defaultModules = {
|
|
@@ -76,7 +76,7 @@ var Info = Provider(function (props) {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
}, []);
|
|
79
|
-
|
|
79
|
+
useMemo(function () {
|
|
80
80
|
var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$i, _context$appHelper3;
|
|
81
81
|
var isFranchisee = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.businessUtils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getAppByModal) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, 'franchisee');
|
|
82
82
|
modal.dispatch({
|
|
@@ -55,8 +55,8 @@ export declare const getTimeObj: ({ cacheItem, useStartTime, currentResource, st
|
|
|
55
55
|
* @Author: zhiwei.Wang
|
|
56
56
|
* @Date: 2024-01-09 13:38
|
|
57
57
|
*/
|
|
58
|
-
export declare const formatResources: ({ cacheItem, resourcesOrigin }: any) => {
|
|
59
|
-
list: any
|
|
58
|
+
export declare const formatResources: ({ cacheItem, resourcesOrigin, id }: any) => {
|
|
59
|
+
list: any;
|
|
60
60
|
maps: any;
|
|
61
61
|
};
|
|
62
62
|
export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
|
|
@@ -77,7 +77,7 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
|
|
|
77
77
|
* @Author: zhiwei.Wang
|
|
78
78
|
* @Date: 2024-06-01 13:25
|
|
79
79
|
*/
|
|
80
|
-
export declare const getProductExtend: ({ cacheItem, state }: any) => any;
|
|
80
|
+
export declare const getProductExtend: ({ cacheItem, state, isDisabledTime }: any) => any;
|
|
81
81
|
/**
|
|
82
82
|
* @title: 格式化服务列表
|
|
83
83
|
* @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
|