@pisell/private-materials 6.9.3 → 6.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/utils.js +80 -76
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CupActionList/index.d.ts +1 -0
- package/es/components/ecocup/components/CupActionModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/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 +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/es/plus/orderList/components/Reset.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/utils.js +6 -3
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -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/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupActionList/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/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 +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/lib/plus/orderList/components/Reset.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/package.json +3 -3
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -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
|
+
}>;
|
|
@@ -292,9 +292,13 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
292
292
|
* @Date: 2024-12-23 12:05
|
|
293
293
|
*/
|
|
294
294
|
export var formatProductPrice = function formatProductPrice(item) {
|
|
295
|
-
var _item$_extend6, _item$price, _item$_extend7, _item$variant;
|
|
295
|
+
var _item$_extend6, _item$price, _item$_extend7, _item$_extend8, _item$_extend9, _item$variant;
|
|
296
296
|
var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
|
|
297
297
|
var price = Number((_item$price = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price !== void 0 ? _item$price : item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
|
|
298
|
+
if (isString((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.priceOverride) || isNumber((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.priceOverride)) {
|
|
299
|
+
var _item$_extend10;
|
|
300
|
+
price = Number(item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.price);
|
|
301
|
+
}
|
|
298
302
|
|
|
299
303
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
300
304
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant = item.variant) === null || _item$variant === void 0 ? void 0 : _item$variant.length) > 0) {
|
|
@@ -322,8 +326,8 @@ export var formatProductPrice = function formatProductPrice(item) {
|
|
|
322
326
|
* @returns
|
|
323
327
|
*/
|
|
324
328
|
export var formatOriginalPrice = function formatOriginalPrice(item) {
|
|
325
|
-
var _item$
|
|
326
|
-
return Number((_item$
|
|
329
|
+
var _item$_extend11;
|
|
330
|
+
return Number((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.origin_total);
|
|
327
331
|
};
|
|
328
332
|
|
|
329
333
|
/**
|
|
@@ -332,12 +336,12 @@ export var formatOriginalPrice = function formatOriginalPrice(item) {
|
|
|
332
336
|
* @returns
|
|
333
337
|
*/
|
|
334
338
|
var getBundleProductDiscountDifference = function getBundleProductDiscountDifference(item) {
|
|
335
|
-
var _item$
|
|
336
|
-
if (!((_item$
|
|
339
|
+
var _item$_extend12, _item$_extend13, _item$_extend14;
|
|
340
|
+
if (!((_item$_extend12 = item._extend) !== null && _item$_extend12 !== void 0 && (_item$_extend12 = _item$_extend12.other) !== null && _item$_extend12 !== void 0 && _item$_extend12.bundle) || !isArr((_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 || (_item$_extend13 = _item$_extend13.other) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.bundle)) {
|
|
337
341
|
return new Decimal(0).toNumber();
|
|
338
342
|
}
|
|
339
343
|
var discountDifference = new Decimal(0);
|
|
340
|
-
getBundleDiscountList(((_item$
|
|
344
|
+
getBundleDiscountList(((_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 || (_item$_extend14 = _item$_extend14.other) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.bundle) || []).forEach(function (cur) {
|
|
341
345
|
var _cur$metadata2;
|
|
342
346
|
discountDifference = discountDifference.add(new Decimal(((_cur$metadata2 = cur.metadata) === null || _cur$metadata2 === void 0 ? void 0 : _cur$metadata2.product_discount_difference) || 0));
|
|
343
347
|
});
|
|
@@ -350,28 +354,28 @@ var getBundleProductDiscountDifference = function getBundleProductDiscountDiffer
|
|
|
350
354
|
* @returns
|
|
351
355
|
*/
|
|
352
356
|
export var formatSellingPrice = function formatSellingPrice(item) {
|
|
353
|
-
var _item$
|
|
354
|
-
return Number((_item$
|
|
357
|
+
var _item$_extend15;
|
|
358
|
+
return Number((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.total);
|
|
355
359
|
};
|
|
356
360
|
var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
|
|
357
|
-
var _item$
|
|
361
|
+
var _item$_extend16, _item$_extend$holder_, _item$_extend17, _item$_extend18, _item$_extend20;
|
|
358
362
|
var metadata = {};
|
|
359
|
-
if ((_item$
|
|
363
|
+
if ((_item$_extend16 = item._extend) !== null && _item$_extend16 !== void 0 && _item$_extend16.capacity) {
|
|
360
364
|
metadata.capacity = item._extend.capacity;
|
|
361
365
|
}
|
|
362
366
|
if (item._extend.groupId) {
|
|
363
367
|
metadata.groupId = item._extend.groupId;
|
|
364
368
|
}
|
|
365
369
|
// if (item._extend?.holder_id) {
|
|
366
|
-
metadata.holder_id = (_item$_extend$holder_ = (_item$
|
|
370
|
+
metadata.holder_id = (_item$_extend$holder_ = (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.holder_id) !== null && _item$_extend$holder_ !== void 0 ? _item$_extend$holder_ : null;
|
|
367
371
|
// }
|
|
368
|
-
if (isMultiDayPrices && (_item$
|
|
369
|
-
var _item$
|
|
370
|
-
metadata.multiDayPrices = (_item$
|
|
372
|
+
if (isMultiDayPrices && (_item$_extend18 = item._extend) !== null && _item$_extend18 !== void 0 && _item$_extend18.multiDayPrices) {
|
|
373
|
+
var _item$_extend19;
|
|
374
|
+
metadata.multiDayPrices = (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.multiDayPrices;
|
|
371
375
|
}
|
|
372
|
-
if ((_item$
|
|
373
|
-
var _item$
|
|
374
|
-
metadata.unique_identification_number = (_item$
|
|
376
|
+
if ((_item$_extend20 = item._extend) !== null && _item$_extend20 !== void 0 && _item$_extend20.unique_identification_number) {
|
|
377
|
+
var _item$_extend21;
|
|
378
|
+
metadata.unique_identification_number = (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.unique_identification_number;
|
|
375
379
|
}
|
|
376
380
|
if (item.discount_list && isArr(item.discount_list)) {
|
|
377
381
|
metadata.product_discount_difference = item.discount_list.filter(function (item) {
|
|
@@ -385,41 +389,41 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
|
|
|
385
389
|
return metadata;
|
|
386
390
|
};
|
|
387
391
|
var formatProductMetadata = function formatProductMetadata(item) {
|
|
388
|
-
var _item$
|
|
392
|
+
var _item$_extend22, _item$metadata2, _item$_extend24, _item$metadata4, _item$_extend26, _item$metadata6, _item$_extend28, _item$_extend30, _item$metadata8, _item$_extend32, _item$metadata10;
|
|
389
393
|
var metadata = {};
|
|
390
394
|
|
|
391
395
|
// 主商品+非原价(加减价)子商品附加费
|
|
392
|
-
if ((_item$
|
|
393
|
-
var _item$
|
|
394
|
-
metadata.main_product_attached_bundle_surcharge_fee = ((_item$
|
|
396
|
+
if ((_item$_extend22 = item._extend) !== null && _item$_extend22 !== void 0 && _item$_extend22.surcharge_fee || (_item$metadata2 = item.metadata) !== null && _item$metadata2 !== void 0 && _item$metadata2.main_product_attached_bundle_surcharge_fee) {
|
|
397
|
+
var _item$_extend23, _item$metadata3;
|
|
398
|
+
metadata.main_product_attached_bundle_surcharge_fee = ((_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.surcharge_fee) || ((_item$metadata3 = item.metadata) === null || _item$metadata3 === void 0 ? void 0 : _item$metadata3.main_product_attached_bundle_surcharge_fee);
|
|
395
399
|
}
|
|
396
400
|
|
|
397
401
|
// 主商品+非原价(加减价)子商品税费
|
|
398
|
-
if ((_item$
|
|
399
|
-
var _item$
|
|
400
|
-
metadata.main_product_attached_bundle_tax_fee = ((_item$
|
|
402
|
+
if ((_item$_extend24 = item._extend) !== null && _item$_extend24 !== void 0 && _item$_extend24.main_product_attached_bundle_tax_fee || (_item$metadata4 = item.metadata) !== null && _item$metadata4 !== void 0 && _item$metadata4.main_product_attached_bundle_tax_fee) {
|
|
403
|
+
var _item$_extend25, _item$metadata5;
|
|
404
|
+
metadata.main_product_attached_bundle_tax_fee = ((_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.main_product_attached_bundle_tax_fee) || ((_item$metadata5 = item.metadata) === null || _item$metadata5 === void 0 ? void 0 : _item$metadata5.main_product_attached_bundle_tax_fee);
|
|
401
405
|
}
|
|
402
406
|
|
|
403
407
|
// 可选,附加费均摊舍入金额
|
|
404
|
-
if ((_item$
|
|
405
|
-
var _item$
|
|
406
|
-
metadata.surcharge_rounding_remainder = ((_item$
|
|
408
|
+
if ((_item$_extend26 = item._extend) !== null && _item$_extend26 !== void 0 && _item$_extend26.surcharge_rounding_remainder || (_item$metadata6 = item.metadata) !== null && _item$metadata6 !== void 0 && _item$metadata6.surcharge_rounding_remainder) {
|
|
409
|
+
var _item$_extend27, _item$metadata7;
|
|
410
|
+
metadata.surcharge_rounding_remainder = ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.surcharge_rounding_remainder) || ((_item$metadata7 = item.metadata) === null || _item$metadata7 === void 0 ? void 0 : _item$metadata7.surcharge_rounding_remainder);
|
|
407
411
|
}
|
|
408
412
|
|
|
409
413
|
// 可选,税费均摊舍入金额(折后税费)
|
|
410
|
-
if ((_item$
|
|
411
|
-
var _item$
|
|
412
|
-
metadata.tax_fee_rounding_remainder = (_item$
|
|
414
|
+
if ((_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.tax_fee_rounding_remainder) {
|
|
415
|
+
var _item$_extend29;
|
|
416
|
+
metadata.tax_fee_rounding_remainder = (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.tax_fee_rounding_remainder;
|
|
413
417
|
}
|
|
414
418
|
|
|
415
419
|
// 使用的附加费id列表
|
|
416
|
-
if ((_item$
|
|
417
|
-
var _item$
|
|
418
|
-
metadata.relation_surcharge_ids = ((_item$
|
|
420
|
+
if ((_item$_extend30 = item._extend) !== null && _item$_extend30 !== void 0 && _item$_extend30.relation_surcharge_ids || (_item$metadata8 = item.metadata) !== null && _item$metadata8 !== void 0 && _item$metadata8.relation_surcharge_ids) {
|
|
421
|
+
var _item$_extend31, _item$metadata9;
|
|
422
|
+
metadata.relation_surcharge_ids = ((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.relation_surcharge_ids) || ((_item$metadata9 = item.metadata) === null || _item$metadata9 === void 0 ? void 0 : _item$metadata9.relation_surcharge_ids);
|
|
419
423
|
}
|
|
420
|
-
if ((_item$
|
|
421
|
-
var _item$
|
|
422
|
-
metadata.unique_identification_number = ((_item$
|
|
424
|
+
if ((_item$_extend32 = item._extend) !== null && _item$_extend32 !== void 0 && _item$_extend32.unique_identification_number || (_item$metadata10 = item.metadata) !== null && _item$metadata10 !== void 0 && _item$metadata10.unique_identification_number) {
|
|
425
|
+
var _item$_extend33, _item$metadata11;
|
|
426
|
+
metadata.unique_identification_number = ((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.unique_identification_number) || ((_item$metadata11 = item.metadata) === null || _item$metadata11 === void 0 ? void 0 : _item$metadata11.unique_identification_number);
|
|
423
427
|
}
|
|
424
428
|
if (item.discount_list && isArr(item.discount_list)) {
|
|
425
429
|
metadata.product_discount_difference = item.discount_list.filter(function (item) {
|
|
@@ -449,9 +453,9 @@ var formatProductMetadata = function formatProductMetadata(item) {
|
|
|
449
453
|
|
|
450
454
|
// 获取商品价格 包含组合规格
|
|
451
455
|
export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
452
|
-
var _item$
|
|
453
|
-
var other = (_item$
|
|
454
|
-
var price = Number((_item$
|
|
456
|
+
var _item$_extend34, _item$_extend35, _item$variant2;
|
|
457
|
+
var other = (_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.other;
|
|
458
|
+
var price = Number((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.price);
|
|
455
459
|
|
|
456
460
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
457
461
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
|
|
@@ -467,8 +471,8 @@ export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
|
467
471
|
|
|
468
472
|
// 获取主商品价格 要增加option
|
|
469
473
|
export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
|
|
470
|
-
var _item$
|
|
471
|
-
if (!isNumber((_item$
|
|
474
|
+
var _item$_extend36, _item$_extend37, _item$_extend$other, _item$_extend$other2, _item$_extend38;
|
|
475
|
+
if (!isNumber((_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.main_product_selling_price) && !isString((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.main_product_selling_price)) {
|
|
472
476
|
return undefined;
|
|
473
477
|
}
|
|
474
478
|
var optionPrice = new Decimal(0);
|
|
@@ -481,7 +485,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
481
485
|
return accumulator.add(currentPrice.mul(currentNum));
|
|
482
486
|
}, optionPrice);
|
|
483
487
|
}
|
|
484
|
-
return new Decimal((_item$
|
|
488
|
+
return new Decimal((_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.main_product_selling_price).add(optionPrice).toNumber();
|
|
485
489
|
};
|
|
486
490
|
|
|
487
491
|
/**
|
|
@@ -493,7 +497,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
493
497
|
* @Date: 2024-12-07 14:21
|
|
494
498
|
*/
|
|
495
499
|
var formatProducts = function formatProducts(item, quantity) {
|
|
496
|
-
var _item$
|
|
500
|
+
var _item$_extend39, _getMainProductSellin, _item$_extend40, _item$_extend41, _item$_extend42, _item$_extend43, _item$_extend$tax_fee, _item$metadata13;
|
|
497
501
|
if (item !== null && item !== void 0 && item.discount_list) {
|
|
498
502
|
item === null || item === void 0 || item.discount_list.forEach(function (d) {
|
|
499
503
|
if (d !== null && d !== void 0 && d.id) {
|
|
@@ -504,7 +508,7 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
504
508
|
var total = Number(item._extend.total);
|
|
505
509
|
var origin_total = Number(item._extend.origin_total);
|
|
506
510
|
var discount_amount = origin_total - total;
|
|
507
|
-
var bundleDiscountList = getBundleDiscountList(((_item$
|
|
511
|
+
var bundleDiscountList = getBundleDiscountList(((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 || (_item$_extend39 = _item$_extend39.other) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.bundle) || []);
|
|
508
512
|
var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
|
|
509
513
|
discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
|
|
510
514
|
|
|
@@ -533,15 +537,15 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
533
537
|
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
534
538
|
"product_discount_reason": item._extend.discount_reason || '',
|
|
535
539
|
"is_charge_tax": item.is_charge_tax,
|
|
536
|
-
"note": ((_item$
|
|
540
|
+
"note": ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.note) || '',
|
|
537
541
|
"discountway": item._extend.discountway || "num",
|
|
538
542
|
"discount_per": item._extend.discount_per,
|
|
539
543
|
"discount_type": item._extend.discount_type || discount_type,
|
|
540
544
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
541
|
-
"product_bundle": formatProductBundle((_item$
|
|
545
|
+
"product_bundle": formatProductBundle((_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 || (_item$_extend41 = _item$_extend41.other) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.bundle, item.is_price_include_tax),
|
|
542
546
|
"bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
|
|
543
|
-
"product_option_item": formatProductOption((_item$
|
|
544
|
-
"product_variant_id": ((_item$
|
|
547
|
+
"product_option_item": formatProductOption((_item$_extend42 = item._extend) === null || _item$_extend42 === void 0 || (_item$_extend42 = _item$_extend42.other) === null || _item$_extend42 === void 0 ? void 0 : _item$_extend42.option),
|
|
548
|
+
"product_variant_id": ((_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 || (_item$_extend43 = _item$_extend43.other) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.product_variant_id) || 0,
|
|
545
549
|
"discount_list": notManualDiscount,
|
|
546
550
|
metadata: formatProductMetadata(item),
|
|
547
551
|
// checkout 需求新增字段
|
|
@@ -567,8 +571,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
567
571
|
|
|
568
572
|
// 过滤出卡片中的普通商品
|
|
569
573
|
var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
|
|
570
|
-
var _item$
|
|
571
|
-
var holderId = (_item$
|
|
574
|
+
var _item$_extend44;
|
|
575
|
+
var holderId = (_item$_extend44 = item._extend) === null || _item$_extend44 === void 0 ? void 0 : _item$_extend44.holder_id;
|
|
572
576
|
var bookingHolderId = booking_item._extend.holder_id;
|
|
573
577
|
var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
|
|
574
578
|
return holderId && holderId === bookingHolderId && !isDayBookingProduct;
|
|
@@ -594,15 +598,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
|
|
|
594
598
|
|
|
595
599
|
// 找出预约商品
|
|
596
600
|
list = list.filter(function (item) {
|
|
597
|
-
var _item$
|
|
598
|
-
return ((_item$
|
|
601
|
+
var _item$_extend45;
|
|
602
|
+
return ((_item$_extend45 = item._extend) === null || _item$_extend45 === void 0 ? void 0 : _item$_extend45.holder_id) && !isNormalProductByDurationSchedule(item);
|
|
599
603
|
});
|
|
600
604
|
|
|
601
605
|
// 对预约商品列表根据holder_id进行分组
|
|
602
606
|
var groupMap = new Map();
|
|
603
607
|
list.forEach(function (item) {
|
|
604
|
-
var _item$
|
|
605
|
-
var key = (_item$
|
|
608
|
+
var _item$_extend46;
|
|
609
|
+
var key = (_item$_extend46 = item._extend) === null || _item$_extend46 === void 0 ? void 0 : _item$_extend46.holder_id; // 分组键
|
|
606
610
|
if (!groupMap.has(key)) {
|
|
607
611
|
groupMap.set(key, []);
|
|
608
612
|
}
|
|
@@ -638,8 +642,8 @@ var getHolderByIndex = function getHolderByIndex(holder, index) {
|
|
|
638
642
|
export var getHasMultiDayProduct = function getHasMultiDayProduct(data) {
|
|
639
643
|
var list = data.service.value;
|
|
640
644
|
var isHas = list.some(function (item) {
|
|
641
|
-
var _item$
|
|
642
|
-
return (_item$
|
|
645
|
+
var _item$_extend47;
|
|
646
|
+
return (_item$_extend47 = item._extend) === null || _item$_extend47 === void 0 ? void 0 : _item$_extend47.groupId;
|
|
643
647
|
});
|
|
644
648
|
return isHas;
|
|
645
649
|
};
|
|
@@ -679,7 +683,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
679
683
|
var bookings = [];
|
|
680
684
|
var obj = {};
|
|
681
685
|
list.forEach(function (item) {
|
|
682
|
-
var _item$
|
|
686
|
+
var _item$_extend48, _item$_extend53, _item$_extend54, _item$_extend55;
|
|
683
687
|
// 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
|
|
684
688
|
if (item.isCustomItem) {
|
|
685
689
|
bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
|
|
@@ -689,7 +693,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
689
693
|
}
|
|
690
694
|
|
|
691
695
|
// 当前商品是跨日预约商品
|
|
692
|
-
var isMultiDay = (_item$
|
|
696
|
+
var isMultiDay = (_item$_extend48 = item._extend) === null || _item$_extend48 === void 0 ? void 0 : _item$_extend48.groupId;
|
|
693
697
|
var start_date = item._extend.startDate.format('YYYY-MM-DD');
|
|
694
698
|
var end_date = item._extend.endDate.format('YYYY-MM-DD');
|
|
695
699
|
var end_time = item._extend.endDate.format('HH:mm');
|
|
@@ -703,9 +707,9 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
703
707
|
|
|
704
708
|
// 跨日预约下的普通商品
|
|
705
709
|
if (isDay) {
|
|
706
|
-
var _item$
|
|
707
|
-
var startDate = ((_item$
|
|
708
|
-
var endDate = ((_item$
|
|
710
|
+
var _item$_extend49, _item$_extend50, _item$_extend51, _item$_extend52;
|
|
711
|
+
var startDate = ((_item$_extend49 = item._extend) === null || _item$_extend49 === void 0 ? void 0 : _item$_extend49.startDate) || ((_item$_extend50 = item._extend) === null || _item$_extend50 === void 0 ? void 0 : _item$_extend50.start_date);
|
|
712
|
+
var endDate = ((_item$_extend51 = item._extend) === null || _item$_extend51 === void 0 ? void 0 : _item$_extend51.endDate) || ((_item$_extend52 = item._extend) === null || _item$_extend52 === void 0 ? void 0 : _item$_extend52.end_date);
|
|
709
713
|
var _formatDayTime = formatDayTime({
|
|
710
714
|
startDate: startDate,
|
|
711
715
|
endDate: endDate
|
|
@@ -727,7 +731,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
727
731
|
}
|
|
728
732
|
}, 'minutes');
|
|
729
733
|
}
|
|
730
|
-
if (!((_item$
|
|
734
|
+
if (!((_item$_extend53 = item._extend) !== null && _item$_extend53 !== void 0 && _item$_extend53.unique_identification_number)) {
|
|
731
735
|
var unique_identification_number = getUniqueId();
|
|
732
736
|
item._extend.unique_identification_number = unique_identification_number;
|
|
733
737
|
}
|
|
@@ -735,8 +739,8 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
735
739
|
// 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
|
|
736
740
|
// 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
|
|
737
741
|
// 后续出现不需要设置 metadata.multiDayPrices. 节省体积
|
|
738
|
-
var isSetGroupId = obj[item === null || item === void 0 || (_item$
|
|
739
|
-
if (!((_item$
|
|
742
|
+
var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend54 = item._extend) === null || _item$_extend54 === void 0 ? void 0 : _item$_extend54.groupId];
|
|
743
|
+
if (!((_item$_extend55 = item._extend) !== null && _item$_extend55 !== void 0 && _item$_extend55.unique_identification_number)) {
|
|
740
744
|
var _unique_identification_number = getUniqueId();
|
|
741
745
|
item._extend.unique_identification_number = _unique_identification_number;
|
|
742
746
|
}
|
|
@@ -816,16 +820,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
|
|
|
816
820
|
var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
|
|
817
821
|
// open items 下的商品
|
|
818
822
|
list = list.filter(function (item) {
|
|
819
|
-
var _item$
|
|
823
|
+
var _item$_extend56;
|
|
820
824
|
return (
|
|
821
825
|
// 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
|
|
822
|
-
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$
|
|
826
|
+
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend56 = item._extend) === null || _item$_extend56 === void 0 ? void 0 : _item$_extend56.holder_id) && appointmentTypes.includes(item.extension_type)
|
|
823
827
|
);
|
|
824
828
|
});
|
|
825
829
|
var relationProducts = [];
|
|
826
830
|
relationProducts = list.map(function (item) {
|
|
827
|
-
var _item$
|
|
828
|
-
if (!((_item$
|
|
831
|
+
var _item$_extend57;
|
|
832
|
+
if (!((_item$_extend57 = item._extend) !== null && _item$_extend57 !== void 0 && _item$_extend57.unique_identification_number)) {
|
|
829
833
|
var unique_identification_number = getUniqueId();
|
|
830
834
|
item._extend.unique_identification_number = unique_identification_number;
|
|
831
835
|
}
|
|
@@ -844,8 +848,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
844
848
|
});
|
|
845
849
|
var relationProducts = [];
|
|
846
850
|
relationProducts = list.map(function (item) {
|
|
847
|
-
var _item$
|
|
848
|
-
if (!((_item$
|
|
851
|
+
var _item$_extend58;
|
|
852
|
+
if (!((_item$_extend58 = item._extend) !== null && _item$_extend58 !== void 0 && _item$_extend58.unique_identification_number)) {
|
|
849
853
|
var unique_identification_number = getUniqueId();
|
|
850
854
|
item._extend.unique_identification_number = unique_identification_number;
|
|
851
855
|
}
|
|
@@ -970,19 +974,19 @@ export var checkHolderIsError = function checkHolderIsError(state) {
|
|
|
970
974
|
var _state$client;
|
|
971
975
|
var errorRowKey = '';
|
|
972
976
|
var holderError = state.service.value.some(function (item) {
|
|
973
|
-
var _item$_extend$holder_2, _item$
|
|
977
|
+
var _item$_extend$holder_2, _item$_extend60;
|
|
974
978
|
// 普通商品不需要检测holder
|
|
975
979
|
if (isNormalProductByDurationSchedule(item)) {
|
|
976
980
|
return false;
|
|
977
981
|
}
|
|
978
982
|
if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_item$_extend$holder_2 = item._extend.holder_id) === null || _item$_extend$holder_2 === void 0 ? void 0 : _item$_extend$holder_2.length) === 0)) {
|
|
979
|
-
var _item$
|
|
980
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$
|
|
983
|
+
var _item$_extend59;
|
|
984
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend59 = item._extend) === null || _item$_extend59 === void 0 || (_item$_extend59 = _item$_extend59.other) === null || _item$_extend59 === void 0 ? void 0 : _item$_extend59.rowKey);
|
|
981
985
|
return true;
|
|
982
986
|
}
|
|
983
|
-
if (item._extend.quantity > 1 && ((_item$
|
|
984
|
-
var _item$
|
|
985
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$
|
|
987
|
+
if (item._extend.quantity > 1 && ((_item$_extend60 = item._extend) === null || _item$_extend60 === void 0 || (_item$_extend60 = _item$_extend60.holder_id) === null || _item$_extend60 === void 0 ? void 0 : _item$_extend60.length) !== item._extend.quantity) {
|
|
988
|
+
var _item$_extend61;
|
|
989
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend61 = item._extend) === null || _item$_extend61 === void 0 || (_item$_extend61 = _item$_extend61.other) === null || _item$_extend61 === void 0 ? void 0 : _item$_extend61.rowKey);
|
|
986
990
|
return true;
|
|
987
991
|
}
|
|
988
992
|
return false;
|
|
@@ -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,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
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -110,4 +111,11 @@ export declare const walkInData: {
|
|
|
110
111
|
id: number;
|
|
111
112
|
nickname: string;
|
|
112
113
|
};
|
|
113
|
-
export declare const Provider: any, Context:
|
|
114
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
115
|
+
state: FormState;
|
|
116
|
+
} & {
|
|
117
|
+
dispatch: (params: {
|
|
118
|
+
type: string;
|
|
119
|
+
payload: any;
|
|
120
|
+
}) => void;
|
|
121
|
+
}>;
|