@pisell/private-materials 6.11.48 → 6.11.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +5 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +26 -3
- package/es/components/booking/info/service2/Group/utils.js +8 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +2 -23
- 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 +2 -2
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/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/pay/toC/utils.d.ts +2 -2
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/plus/orderList/config.d.ts +2 -2
- package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +5 -0
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +29 -6
- package/lib/components/booking/info/service2/Group/utils.js +8 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +8 -22
- 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 +2 -2
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/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/pay/toC/utils.d.ts +2 -2
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/plus/orderList/config.d.ts +2 -2
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/package.json +3 -3
- package/es/components/Sales/Cart/utils.d.ts +0 -68
- package/es/components/Sales/Checkout/utils.d.ts +0 -41
- package/es/components/Sales/Summary/index.d.ts +0 -37
- package/es/components/Sales/Summary/utils.d.ts +0 -58
- package/es/components/appointmentBooking/locales.d.ts +0 -606
- package/es/components/booking/components/voucher/utils.d.ts +0 -4
- package/es/components/booking/dashboard/serve.d.ts +0 -2
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/forms/serve.d.ts +0 -18
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/es/components/booking/info/client/serve.d.ts +0 -2
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +0 -10
- package/es/components/booking/info/pet/serve.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/booking/info/service/serve.d.ts +0 -34
- package/es/components/booking/info2/cartClientCard/locales.d.ts +0 -33
- package/es/components/booking/info2/cartClientCard/types.d.ts +0 -19
- package/es/components/booking/info2/cartClientCard/utils.d.ts +0 -3
- package/es/components/booking/info2/model/index.d.ts +0 -1
- package/es/components/booking/info2/model/strategy/adapter/index.d.ts +0 -7
- package/es/components/booking/info2/model/strategy/adapter/promotion/evaluator.d.ts +0 -185
- package/es/components/booking/info2/model/strategy/adapter/promotion/type.d.ts +0 -420
- package/es/components/booking/info2/model/strategy/adapter/type.d.ts +0 -28
- package/es/components/booking/info2/model/strategy/adapter/walletPass/evaluator.d.ts +0 -84
- package/es/components/booking/info2/model/strategy/adapter/walletPass/example.d.ts +0 -4
- package/es/components/booking/info2/model/strategy/adapter/walletPass/index.d.ts +0 -32
- package/es/components/booking/info2/model/strategy/adapter/walletPass/locales.d.ts +0 -1
- package/es/components/booking/info2/model/strategy/adapter/walletPass/type.d.ts +0 -165
- package/es/components/booking/info2/model/strategy/adapter/walletPass/utils.d.ts +0 -50
- package/es/components/booking/info2/model/strategy/index.d.ts +0 -107
- package/es/components/booking/info2/model/strategy/strategy-example.d.ts +0 -5
- package/es/components/booking/info2/model/strategy/type.d.ts +0 -228
- package/es/components/booking/info2/serve.d.ts +0 -6
- package/es/components/booking/info2/service/openNormalService.d.ts +0 -37
- package/es/components/booking/locales.d.ts +0 -1586
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +0 -58
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +0 -59
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +0 -44
- package/es/components/checkout/components/ScrollableList/index.d.ts +0 -5
- package/es/components/checkout/components/ScrollableList/types.d.ts +0 -53
- package/es/components/checkout/components/WalletPassModule/types.d.ts +0 -134
- package/es/components/checkout/constants.d.ts +0 -2
- package/es/components/checkout/hooks/usePaymentLogger.d.ts +0 -2
- package/es/components/checkout/locales.d.ts +0 -856
- package/es/components/checkout/styles.d.ts +0 -67
- package/es/components/checkout/types.d.ts +0 -130
- package/es/components/checkout/utils.d.ts +0 -3
- package/es/components/ecocup/components/CupActionModal/hooks.d.ts +0 -5
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +0 -36
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +0 -14
- package/es/components/ecocup/components/SearchBar/const.d.ts +0 -4
- package/es/components/ecocup/components/SettingModal/const.d.ts +0 -6
- package/es/components/ecocup/cupList/const.d.ts +0 -144
- package/es/components/ecocup/cupProject/const.d.ts +0 -7
- package/es/components/ecocup/customerList/const.d.ts +0 -44
- package/es/components/ecocup/customerList/hooks/index.d.ts +0 -3
- package/es/components/ecocup/customerList/hooks/useColumns.d.ts +0 -15
- package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +0 -15
- package/es/components/ecocup/hooks.d.ts +0 -57
- package/es/components/ecocup/locales.d.ts +0 -653
- package/es/components/ecocup/types.d.ts +0 -103
- package/es/components/ecocup/utils/download.d.ts +0 -7
- package/es/components/ecocup/utils/index.d.ts +0 -2
- package/es/components/ecocup/utils/scanListener.d.ts +0 -20
- package/es/components/eftpos/const.d.ts +0 -64
- package/es/components/eftpos/hooks.d.ts +0 -33
- package/es/components/eftpos/locales.d.ts +0 -163
- package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -106
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
- package/es/components/eftposPay/const.d.ts +0 -195
- package/es/components/eftposPay/huifu/hooks.d.ts +0 -25
- package/es/components/eftposPay/huifu/types.d.ts +0 -14
- package/es/components/eftposPay/locales.d.ts +0 -608
- package/es/components/eftposPay/manufacturer.d.ts +0 -8
- package/es/components/eftposPay/store/index.d.ts +0 -362
- package/es/components/eventBooking/components/Voucher/components/locales.d.ts +0 -61
- package/es/components/eventBooking/components/Voucher/hooks.d.ts +0 -7
- package/es/components/kioskSkuDetail/locales.d.ts +0 -43
- package/es/components/list/TestResponsiveWrapper.d.ts +0 -8
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +0 -13
- package/es/components/list/components/ListItemSkeleton/index.d.ts +0 -2
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +0 -18
- package/es/components/list/components/ScrollLoader/index.d.ts +0 -2
- package/es/components/list/components/Tab/Tab.d.ts +0 -5
- package/es/components/list/components/Tab/index.d.ts +0 -2
- package/es/components/list/components/Tab/types.d.ts +0 -14
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +0 -11
- package/es/components/list/components/TabSkeleton/index.d.ts +0 -2
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +0 -33
- package/es/components/list/components/WaterfallList/index.d.ts +0 -2
- package/es/components/list/hooks/useDevice.d.ts +0 -24
- package/es/components/list/hooks/useWaterfall.d.ts +0 -34
- package/es/components/list/locales.d.ts +0 -108
- package/es/components/list/types.d.ts +0 -181
- package/es/components/list/utils/getText.d.ts +0 -53
- package/es/components/list/utils/index.d.ts +0 -19
- package/es/components/pay/toB/components/Content/utils.d.ts +0 -16
- package/es/components/pay/toB/components/MX51/index.d.ts +0 -3
- package/es/components/pay/toB/hooks.d.ts +0 -12
- package/es/components/pay/toB/locales.d.ts +0 -88
- package/es/components/pay/toB/store/context.d.ts +0 -3
- package/es/components/pay/toB/store/hooks.d.ts +0 -15
- package/es/components/pay/toB/store/index.d.ts +0 -3
- package/es/components/pay/toB/store/provider.d.ts +0 -4
- package/es/components/pay/toB/types/index.d.ts +0 -81
- package/es/components/pay/toB/types/storeTypes.d.ts +0 -143
- package/es/components/pay/toC/PaymentList/utils.d.ts +0 -36
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -7
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -3
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -3
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -4
- package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +0 -10
- package/es/components/pay/toC/locales.d.ts +0 -511
- package/es/components/pisellSelectCustomerModal/locales.d.ts +0 -133
- package/es/components/ruleSetting/locales.d.ts +0 -78
- package/es/components/schedules/locales.d.ts +0 -143
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/locales.d.ts +0 -93
- package/es/components/shoppingCart/mock.d.ts +0 -54
- package/es/components/shoppingCart/type.d.ts +0 -58
- package/es/components/subTotal/locales.d.ts +0 -71
- package/es/components/systemSettings/registry/locales.d.ts +0 -525
- package/es/components/systemSettings/registry/services.d.ts +0 -97
- package/es/components/systemSettings/registry/types.d.ts +0 -139
- package/es/components/taxSelect/locales.d.ts +0 -38
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +0 -115
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +0 -6
- package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +0 -26
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +0 -29
- package/es/components/ticketBooking/context/index.d.ts +0 -2
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +0 -4
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +0 -21
- package/es/components/ticketBooking/hooks/pisellos/useCartChangeEffect.d.ts +0 -5
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
- package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +0 -6
- package/es/components/ticketBooking/locales.d.ts +0 -340
- package/es/components/ticketBooking/utils/edit.d.ts +0 -1
- package/es/components/ticketBooking/utils/productCache.d.ts +0 -75
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/es/hooks/printer.d.ts +0 -4
- package/es/hooks/useEngineContext.d.ts +0 -4
- package/es/hooks/useLocale.d.ts +0 -2
- package/es/hooks/useLogger.d.ts +0 -2
- package/es/hooks/useThemeTokens.d.ts +0 -7
- package/es/hooks/useToast.d.ts +0 -2
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/plus/clientCard/types.d.ts +0 -135
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +0 -46
- package/es/plus/noteModal/locales.d.ts +0 -53
- package/es/plus/noteModal/types.d.ts +0 -19
- package/es/plus/orderList/locales.d.ts +0 -618
- package/es/plus/pisellSalesGrid/locales.d.ts +0 -9
- package/es/plus/pisellSalesGrid/types.d.ts +0 -170
- package/es/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +0 -15
- package/es/plus/pisellSalesManagement/locales.d.ts +0 -303
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +0 -6
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +0 -68
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +0 -173
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +0 -298
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +0 -9
- package/es/plus/productSelect/ProductCard/utils.d.ts +0 -49
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +0 -46
- package/es/plus/productSelect/ProductList/index.d.ts +0 -22
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +0 -30
- package/es/plus/saasAttendance/locales.d.ts +0 -591
- package/es/plus/saasAttendance/settings/types.d.ts +0 -136
- package/es/plus/saasTeamMembers/locales.d.ts +0 -546
- package/es/plus/selectHolder/locales.d.ts +0 -38
- package/es/plus/skuOptionsSelection/hooks/index.d.ts +0 -3
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +0 -2
- package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +0 -2
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +0 -2
- package/es/plus/skuOptionsSelection/locales.d.ts +0 -53
- package/es/plus/skuOptionsSelection/store/actions.d.ts +0 -22
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +0 -15
- package/es/plus/skuOptionsSelection/store/index.d.ts +0 -2
- package/es/plus/skuOptionsSelection/store/store.d.ts +0 -4
- package/es/plus/skuOptionsSelection/types.d.ts +0 -445
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +0 -6
- package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +0 -37
- package/es/plus/skuOptionsSelection/utils/index.d.ts +0 -7
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +0 -1
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +0 -4
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +0 -1
- package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +0 -54
- package/es/plus/webPosLogin/locales.d.ts +0 -92
- package/es/plus/webPosLogin/types.d.ts +0 -288
- package/es/pro/Cards/components/SKUCard/locales.d.ts +0 -12
- package/es/pro/Cards/components/SKUCard/types.d.ts +0 -73
- package/es/pro/Login2.0/locales.d.ts +0 -903
- package/es/pro/Login2.0/shared/types.d.ts +0 -234
- package/es/pro/NumberKeyboardPopover/types.d.ts +0 -31
- package/es/pro/Selector/BatchSelectorDemo.d.ts +0 -3
- package/es/pro/Selector/Selector.stories.d.ts +0 -78
- package/es/pro/Selector/components/Card/index.d.ts +0 -57
- package/es/pro/Selector/components/Card/types.d.ts +0 -1
- package/es/pro/Selector/components/Indicator/index.d.ts +0 -20
- package/es/pro/Selector/components/IntersectionObserver.d.ts +0 -105
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +0 -18
- package/es/pro/Selector/components/Media/index.d.ts +0 -6
- package/es/pro/Selector/components/Media/types.d.ts +0 -47
- package/es/pro/Selector/components/index.d.ts +0 -4
- package/es/pro/Selector/demo.d.ts +0 -3
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +0 -43
- package/es/pro/Selector/hooks/usePresetProps.d.ts +0 -24
- package/es/pro/Selector/locales.d.ts +0 -58
- package/es/pro/Selector/types.d.ts +0 -223
- package/es/pro/Selector/utils/index.d.ts +0 -49
- package/es/pro/keyboards/locales.d.ts +0 -38
- package/es/pro/keyboards/numberKeyboard/types.d.ts +0 -63
- package/es/pro/multiDayTimeSelect/types.d.ts +0 -28
- package/es/pro/pisellPriceKeyboardModal/types.d.ts +0 -25
- package/es/pro/pisellPriceKeyboardPopover/index.d.ts +0 -2
- package/es/pro/pisellPriceKeyboardPopover/types.d.ts +0 -33
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +0 -33
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +0 -63
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -98
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +0 -68
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +0 -17
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +0 -73
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +0 -39
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -18
- package/es/pro/skuDetailModal/locales.d.ts +0 -159
- package/es/pro/skuDetailModal/types.d.ts +0 -395
- package/es/pro/skuDetailModal/utils.d.ts +0 -4
- package/es/test/setup.d.ts +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +0 -68
- package/lib/components/Sales/Checkout/utils.d.ts +0 -41
- package/lib/components/Sales/Summary/index.d.ts +0 -37
- package/lib/components/Sales/Summary/utils.d.ts +0 -58
- package/lib/components/appointmentBooking/locales.d.ts +0 -606
- package/lib/components/booking/components/voucher/utils.d.ts +0 -4
- package/lib/components/booking/dashboard/serve.d.ts +0 -2
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/forms/serve.d.ts +0 -18
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/lib/components/booking/info/client/serve.d.ts +0 -2
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +0 -10
- package/lib/components/booking/info/pet/serve.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/booking/info/service/serve.d.ts +0 -34
- package/lib/components/booking/info2/cartClientCard/locales.d.ts +0 -33
- package/lib/components/booking/info2/cartClientCard/types.d.ts +0 -19
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +0 -3
- package/lib/components/booking/info2/model/index.d.ts +0 -1
- package/lib/components/booking/info2/model/strategy/adapter/index.d.ts +0 -7
- package/lib/components/booking/info2/model/strategy/adapter/promotion/evaluator.d.ts +0 -185
- package/lib/components/booking/info2/model/strategy/adapter/promotion/type.d.ts +0 -420
- package/lib/components/booking/info2/model/strategy/adapter/type.d.ts +0 -28
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/evaluator.d.ts +0 -84
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/example.d.ts +0 -4
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/index.d.ts +0 -32
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/locales.d.ts +0 -1
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/type.d.ts +0 -165
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/utils.d.ts +0 -50
- package/lib/components/booking/info2/model/strategy/index.d.ts +0 -107
- package/lib/components/booking/info2/model/strategy/strategy-example.d.ts +0 -5
- package/lib/components/booking/info2/model/strategy/type.d.ts +0 -228
- package/lib/components/booking/info2/serve.d.ts +0 -6
- package/lib/components/booking/info2/service/openNormalService.d.ts +0 -37
- package/lib/components/booking/locales.d.ts +0 -1586
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +0 -58
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +0 -59
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +0 -44
- package/lib/components/checkout/components/ScrollableList/index.d.ts +0 -5
- package/lib/components/checkout/components/ScrollableList/types.d.ts +0 -53
- package/lib/components/checkout/components/WalletPassModule/types.d.ts +0 -134
- package/lib/components/checkout/constants.d.ts +0 -2
- package/lib/components/checkout/hooks/usePaymentLogger.d.ts +0 -2
- package/lib/components/checkout/locales.d.ts +0 -856
- package/lib/components/checkout/styles.d.ts +0 -67
- package/lib/components/checkout/types.d.ts +0 -130
- package/lib/components/checkout/utils.d.ts +0 -3
- package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +0 -5
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +0 -36
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +0 -14
- package/lib/components/ecocup/components/SearchBar/const.d.ts +0 -4
- package/lib/components/ecocup/components/SettingModal/const.d.ts +0 -6
- package/lib/components/ecocup/cupList/const.d.ts +0 -144
- package/lib/components/ecocup/cupProject/const.d.ts +0 -7
- package/lib/components/ecocup/customerList/const.d.ts +0 -44
- package/lib/components/ecocup/customerList/hooks/index.d.ts +0 -3
- package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +0 -15
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +0 -15
- package/lib/components/ecocup/hooks.d.ts +0 -57
- package/lib/components/ecocup/locales.d.ts +0 -653
- package/lib/components/ecocup/types.d.ts +0 -103
- package/lib/components/ecocup/utils/download.d.ts +0 -7
- package/lib/components/ecocup/utils/index.d.ts +0 -2
- package/lib/components/ecocup/utils/scanListener.d.ts +0 -20
- package/lib/components/eftpos/const.d.ts +0 -64
- package/lib/components/eftpos/hooks.d.ts +0 -33
- package/lib/components/eftpos/locales.d.ts +0 -163
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -106
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
- package/lib/components/eftposPay/const.d.ts +0 -195
- package/lib/components/eftposPay/huifu/hooks.d.ts +0 -25
- package/lib/components/eftposPay/huifu/types.d.ts +0 -14
- package/lib/components/eftposPay/locales.d.ts +0 -608
- package/lib/components/eftposPay/manufacturer.d.ts +0 -8
- package/lib/components/eftposPay/store/index.d.ts +0 -362
- package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +0 -61
- package/lib/components/eventBooking/components/Voucher/hooks.d.ts +0 -7
- package/lib/components/kioskSkuDetail/locales.d.ts +0 -43
- package/lib/components/list/TestResponsiveWrapper.d.ts +0 -8
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +0 -13
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +0 -2
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +0 -18
- package/lib/components/list/components/ScrollLoader/index.d.ts +0 -2
- package/lib/components/list/components/Tab/Tab.d.ts +0 -5
- package/lib/components/list/components/Tab/index.d.ts +0 -2
- package/lib/components/list/components/Tab/types.d.ts +0 -14
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +0 -11
- package/lib/components/list/components/TabSkeleton/index.d.ts +0 -2
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +0 -33
- package/lib/components/list/components/WaterfallList/index.d.ts +0 -2
- package/lib/components/list/hooks/useDevice.d.ts +0 -24
- package/lib/components/list/hooks/useWaterfall.d.ts +0 -34
- package/lib/components/list/locales.d.ts +0 -108
- package/lib/components/list/types.d.ts +0 -181
- package/lib/components/list/utils/getText.d.ts +0 -53
- package/lib/components/list/utils/index.d.ts +0 -19
- package/lib/components/pay/toB/components/Content/utils.d.ts +0 -16
- package/lib/components/pay/toB/components/MX51/index.d.ts +0 -3
- package/lib/components/pay/toB/hooks.d.ts +0 -12
- package/lib/components/pay/toB/locales.d.ts +0 -88
- package/lib/components/pay/toB/store/context.d.ts +0 -3
- package/lib/components/pay/toB/store/hooks.d.ts +0 -15
- package/lib/components/pay/toB/store/index.d.ts +0 -3
- package/lib/components/pay/toB/store/provider.d.ts +0 -4
- package/lib/components/pay/toB/types/index.d.ts +0 -81
- package/lib/components/pay/toB/types/storeTypes.d.ts +0 -143
- package/lib/components/pay/toC/PaymentList/utils.d.ts +0 -36
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -7
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -4
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +0 -10
- package/lib/components/pay/toC/locales.d.ts +0 -511
- package/lib/components/pisellSelectCustomerModal/locales.d.ts +0 -133
- package/lib/components/ruleSetting/locales.d.ts +0 -78
- package/lib/components/schedules/locales.d.ts +0 -143
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/locales.d.ts +0 -93
- package/lib/components/shoppingCart/mock.d.ts +0 -54
- package/lib/components/shoppingCart/type.d.ts +0 -58
- package/lib/components/subTotal/locales.d.ts +0 -71
- package/lib/components/systemSettings/registry/locales.d.ts +0 -525
- package/lib/components/systemSettings/registry/services.d.ts +0 -97
- package/lib/components/systemSettings/registry/types.d.ts +0 -139
- package/lib/components/taxSelect/locales.d.ts +0 -38
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +0 -115
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +0 -6
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +0 -26
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +0 -29
- package/lib/components/ticketBooking/context/index.d.ts +0 -2
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +0 -4
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +0 -21
- package/lib/components/ticketBooking/hooks/pisellos/useCartChangeEffect.d.ts +0 -5
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
- package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +0 -6
- package/lib/components/ticketBooking/locales.d.ts +0 -340
- package/lib/components/ticketBooking/utils/edit.d.ts +0 -1
- package/lib/components/ticketBooking/utils/productCache.d.ts +0 -75
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/lib/hooks/printer.d.ts +0 -4
- package/lib/hooks/useEngineContext.d.ts +0 -4
- package/lib/hooks/useLocale.d.ts +0 -2
- package/lib/hooks/useLogger.d.ts +0 -2
- package/lib/hooks/useThemeTokens.d.ts +0 -7
- package/lib/hooks/useToast.d.ts +0 -2
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/plus/clientCard/types.d.ts +0 -135
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +0 -46
- package/lib/plus/noteModal/locales.d.ts +0 -53
- package/lib/plus/noteModal/types.d.ts +0 -19
- package/lib/plus/orderList/locales.d.ts +0 -618
- package/lib/plus/pisellSalesGrid/locales.d.ts +0 -9
- package/lib/plus/pisellSalesGrid/types.d.ts +0 -170
- package/lib/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +0 -15
- package/lib/plus/pisellSalesManagement/locales.d.ts +0 -303
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +0 -6
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +0 -68
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +0 -173
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +0 -298
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +0 -9
- package/lib/plus/productSelect/ProductCard/utils.d.ts +0 -49
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +0 -46
- package/lib/plus/productSelect/ProductList/index.d.ts +0 -22
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +0 -30
- package/lib/plus/saasAttendance/locales.d.ts +0 -591
- package/lib/plus/saasAttendance/settings/types.d.ts +0 -136
- package/lib/plus/saasTeamMembers/locales.d.ts +0 -546
- package/lib/plus/selectHolder/locales.d.ts +0 -38
- package/lib/plus/skuOptionsSelection/hooks/index.d.ts +0 -3
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/locales.d.ts +0 -53
- package/lib/plus/skuOptionsSelection/store/actions.d.ts +0 -22
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +0 -15
- package/lib/plus/skuOptionsSelection/store/index.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/store/store.d.ts +0 -4
- package/lib/plus/skuOptionsSelection/types.d.ts +0 -445
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +0 -6
- package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +0 -37
- package/lib/plus/skuOptionsSelection/utils/index.d.ts +0 -7
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +0 -4
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +0 -1
- package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +0 -54
- package/lib/plus/webPosLogin/locales.d.ts +0 -92
- package/lib/plus/webPosLogin/types.d.ts +0 -288
- package/lib/pro/Cards/components/SKUCard/locales.d.ts +0 -12
- package/lib/pro/Cards/components/SKUCard/types.d.ts +0 -73
- package/lib/pro/Login2.0/locales.d.ts +0 -903
- package/lib/pro/Login2.0/shared/types.d.ts +0 -234
- package/lib/pro/NumberKeyboardPopover/types.d.ts +0 -31
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +0 -3
- package/lib/pro/Selector/Selector.stories.d.ts +0 -78
- package/lib/pro/Selector/components/Card/index.d.ts +0 -57
- package/lib/pro/Selector/components/Card/types.d.ts +0 -1
- package/lib/pro/Selector/components/Indicator/index.d.ts +0 -20
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +0 -105
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +0 -18
- package/lib/pro/Selector/components/Media/index.d.ts +0 -6
- package/lib/pro/Selector/components/Media/types.d.ts +0 -47
- package/lib/pro/Selector/components/index.d.ts +0 -4
- package/lib/pro/Selector/demo.d.ts +0 -3
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +0 -43
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +0 -24
- package/lib/pro/Selector/locales.d.ts +0 -58
- package/lib/pro/Selector/types.d.ts +0 -223
- package/lib/pro/Selector/utils/index.d.ts +0 -49
- package/lib/pro/keyboards/locales.d.ts +0 -38
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +0 -63
- package/lib/pro/multiDayTimeSelect/types.d.ts +0 -28
- package/lib/pro/pisellPriceKeyboardModal/types.d.ts +0 -25
- package/lib/pro/pisellPriceKeyboardPopover/index.d.ts +0 -2
- package/lib/pro/pisellPriceKeyboardPopover/types.d.ts +0 -33
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +0 -33
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +0 -63
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -98
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +0 -68
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +0 -17
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +0 -73
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +0 -39
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -18
- package/lib/pro/skuDetailModal/locales.d.ts +0 -159
- package/lib/pro/skuDetailModal/types.d.ts +0 -395
- package/lib/pro/skuDetailModal/utils.d.ts +0 -4
- package/lib/test/setup.d.ts +0 -1
|
@@ -5,6 +5,11 @@ interface Product {
|
|
|
5
5
|
total: number;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* 根据 total 与 origin_total 的折扣比例,重新计算主商品单价 main_product_selling_price
|
|
10
|
+
* 如果存在子商品(bundle),会先按折扣比例计算子商品总价,再用总价减去子商品总价得到主商品总价
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateMainProductSellingPrice(extend: any): void;
|
|
8
13
|
export declare function distributeDiscountOrIncrease(products: Product[], // 商品列表
|
|
9
14
|
totalAdjustment: number, // 总折扣或加价金额,可能为负数(折扣)或正数(加价)
|
|
10
15
|
totalPrice: number): Product[];
|
|
@@ -5,6 +5,26 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import Decimal from 'decimal.js';
|
|
8
|
+
/**
|
|
9
|
+
* 根据 total 与 origin_total 的折扣比例,重新计算主商品单价 main_product_selling_price
|
|
10
|
+
* 如果存在子商品(bundle),会先按折扣比例计算子商品总价,再用总价减去子商品总价得到主商品总价
|
|
11
|
+
*/
|
|
12
|
+
export function updateMainProductSellingPrice(extend) {
|
|
13
|
+
var _extend$other, _extend$other2;
|
|
14
|
+
var bundles = (extend === null || extend === void 0 || (_extend$other = extend.other) === null || _extend$other === void 0 ? void 0 : _extend$other.bundle) || [];
|
|
15
|
+
var childProductsTotal = new Decimal(0);
|
|
16
|
+
if (bundles.length > 0) {
|
|
17
|
+
var discountRatio = new Decimal(extend.total).div(extend.origin_total);
|
|
18
|
+
bundles.forEach(function (bundle) {
|
|
19
|
+
var discountedPrice = new Decimal(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
20
|
+
bundle.bundle_selling_price = discountedPrice.toNumber();
|
|
21
|
+
childProductsTotal = childProductsTotal.add(discountedPrice.mul(bundle.quantity));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
var mainProductTotal = new Decimal(extend.total).sub(childProductsTotal);
|
|
25
|
+
var mainProductQuantity = ((_extend$other2 = extend.other) === null || _extend$other2 === void 0 ? void 0 : _extend$other2.quantity) || extend.quantity || 1;
|
|
26
|
+
extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
|
|
27
|
+
}
|
|
8
28
|
export function distributeDiscountOrIncrease(products,
|
|
9
29
|
// 商品列表
|
|
10
30
|
totalAdjustment,
|
|
@@ -27,10 +47,12 @@ totalPrice) {
|
|
|
27
47
|
// 防止价格变负,调整均摊金额
|
|
28
48
|
var newPrice = productPrice.plus(adjustmentAmount).toFixed(2, Decimal.ROUND_HALF_UP);
|
|
29
49
|
var adjustedPrice = new Decimal(newPrice).lessThan(0) ? '0.00' : newPrice;
|
|
50
|
+
var newExtend = _objectSpread(_objectSpread({}, product._extend), {}, {
|
|
51
|
+
total: parseFloat(adjustedPrice)
|
|
52
|
+
});
|
|
53
|
+
updateMainProductSellingPrice(newExtend);
|
|
30
54
|
adjustedProducts.push(_objectSpread(_objectSpread({}, product), {}, {
|
|
31
|
-
_extend:
|
|
32
|
-
total: parseFloat(adjustedPrice)
|
|
33
|
-
})
|
|
55
|
+
_extend: newExtend
|
|
34
56
|
}));
|
|
35
57
|
totalAdjustmentApplied = totalAdjustmentApplied.plus(new Decimal(adjustmentAmount));
|
|
36
58
|
});
|
|
@@ -48,6 +70,7 @@ totalPrice) {
|
|
|
48
70
|
// 确保最后调整后的价格不为负数
|
|
49
71
|
lastPrice = new Decimal(lastPrice).lessThan(0) ? '0.00' : lastPrice;
|
|
50
72
|
lastProduct._extend.total = parseFloat(lastPrice);
|
|
73
|
+
updateMainProductSellingPrice(lastProduct._extend);
|
|
51
74
|
}
|
|
52
75
|
|
|
53
76
|
// 将结果格式化为以 _id 为键的对象
|
|
@@ -8,6 +8,7 @@ import { getUniqueId } from "@pisell/utils";
|
|
|
8
8
|
import { getProductTotalPrice } from "../../../utils";
|
|
9
9
|
import { distributeDiscountOrIncrease } from "../../service/serviceManager/distributeDiscount";
|
|
10
10
|
import { genServiceKey } from "../../../../ticketBooking/utils";
|
|
11
|
+
import { setProductPrice } from "../../../info2/service/editService/utils";
|
|
11
12
|
|
|
12
13
|
// 创建group
|
|
13
14
|
|
|
@@ -120,6 +121,13 @@ export var createBookingItemsByGroup = function createBookingItemsByGroup(item,
|
|
|
120
121
|
var discountAmount = (groupOriginTotalPrice - groupTotalPrice) * -1;
|
|
121
122
|
if (discountAmount !== 0) {
|
|
122
123
|
bookings = distributeDiscountOrIncrease(bookings, discountAmount, groupOriginTotalPrice);
|
|
124
|
+
bookings = bookings.map(function (booking) {
|
|
125
|
+
var _booking$_extend, _booking$_extend2;
|
|
126
|
+
return setProductPrice(booking, {
|
|
127
|
+
newTotal: booking === null || booking === void 0 || (_booking$_extend = booking._extend) === null || _booking$_extend === void 0 ? void 0 : _booking$_extend.total,
|
|
128
|
+
origin_total: booking === null || booking === void 0 || (_booking$_extend2 = booking._extend) === null || _booking$_extend2 === void 0 ? void 0 : _booking$_extend2.origin_total
|
|
129
|
+
});
|
|
130
|
+
});
|
|
123
131
|
}
|
|
124
132
|
}
|
|
125
133
|
console.log('bookings', bookings);
|
|
@@ -216,7 +216,7 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
216
216
|
* @Author: WangHan
|
|
217
217
|
* @Date: 2024-12-24 11:32
|
|
218
218
|
*/
|
|
219
|
-
export declare const updateServicePrice: (state: any) => never[]
|
|
219
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
|
220
220
|
/**
|
|
221
221
|
* @description: 根据_id和sourceProductId来获取主商品已选择的赠品
|
|
222
222
|
* @param {string} productId 主商品_id
|
|
@@ -49,9 +49,9 @@ import BookingList from "../../../info/service/editService/BookingList";
|
|
|
49
49
|
import dayjs from "dayjs";
|
|
50
50
|
import { createBookingItemsByGroup, getGroupTotalPrice } from "../../../info/service2/Group/utils";
|
|
51
51
|
import { getOpenNormalServiceHandler } from "../openNormalService";
|
|
52
|
-
import Decimal from 'decimal.js';
|
|
53
52
|
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
54
53
|
import useCartChangeEffect from "../../../../ticketBooking/hooks/pisellos/useCartChangeEffect";
|
|
54
|
+
import { updateMainProductSellingPrice } from "../../../info/service/serviceManager/distributeDiscount";
|
|
55
55
|
var submitLock = false;
|
|
56
56
|
var Info = function Info(_, ref) {
|
|
57
57
|
var _context$appHelper, _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI7, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI12, _state$bookingConfig5, _state$service$cacheI13, _state$service$cacheI14, _state$service9, _state$service$resour2, _state$service$cacheI16, _state$service$cacheI18, _state$client2;
|
|
@@ -316,28 +316,7 @@ var Info = function Info(_, ref) {
|
|
|
316
316
|
_extend.endDate = endDate;
|
|
317
317
|
}
|
|
318
318
|
if (isChangeTotal.current) {
|
|
319
|
-
|
|
320
|
-
// 计算折扣比例
|
|
321
|
-
var discountRatio = new Decimal(values.total).div(_item._extend.origin_total);
|
|
322
|
-
|
|
323
|
-
// 处理子商品
|
|
324
|
-
var _bundles = (_extend === null || _extend === void 0 || (_extend$other = _extend.other) === null || _extend$other === void 0 ? void 0 : _extend$other.bundle) || [];
|
|
325
|
-
var childProductsTotal = new Decimal(0);
|
|
326
|
-
if (_bundles.length > 0) {
|
|
327
|
-
_bundles.forEach(function (bundle) {
|
|
328
|
-
// 计算子商品折扣后的单价(保留两位小数)
|
|
329
|
-
var discountedPrice = new Decimal(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
330
|
-
bundle.bundle_selling_price = discountedPrice.toNumber();
|
|
331
|
-
|
|
332
|
-
// 累计子商品折扣后总价
|
|
333
|
-
childProductsTotal = childProductsTotal.add(discountedPrice.mul(bundle.quantity));
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// 计算主商品折扣后的单价
|
|
338
|
-
var mainProductTotal = new Decimal(values.total).sub(childProductsTotal);
|
|
339
|
-
var mainProductQuantity = ((_extend$other2 = _extend.other) === null || _extend$other2 === void 0 ? void 0 : _extend$other2.quantity) || _extend.quantity || 1;
|
|
340
|
-
_extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
|
|
319
|
+
updateMainProductSellingPrice(_extend);
|
|
341
320
|
}
|
|
342
321
|
if (_extend.bundle_edit !== undefined) {
|
|
343
322
|
_extend.bundle_edit = 1;
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "init" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -22,7 +22,7 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
|
|
|
22
22
|
order_id: string;
|
|
23
23
|
payment_group_id: number;
|
|
24
24
|
payments: {
|
|
25
|
-
amount: string | number;
|
|
25
|
+
amount: string | number | undefined;
|
|
26
26
|
wallet_pass_use_value: any;
|
|
27
27
|
voucher_id: any;
|
|
28
28
|
tag: any;
|
|
@@ -48,7 +48,7 @@ export declare const isFranchiseeShop: (path?: any, history?: any) => any;
|
|
|
48
48
|
*/
|
|
49
49
|
export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
|
|
50
50
|
export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
|
|
51
|
-
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string | number;
|
|
51
|
+
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string | number | undefined;
|
|
52
52
|
export declare const clientPayment: (params: {
|
|
53
53
|
order_id: number;
|
|
54
54
|
type: "aliPay" | "wxPay" | 'google_pay';
|
|
@@ -47,7 +47,7 @@ declare type ScanData = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
-
searchType: "
|
|
50
|
+
searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
|
|
51
51
|
data: any;
|
|
52
52
|
scanCode: string;
|
|
53
53
|
} | null;
|
|
@@ -9,7 +9,7 @@ export declare const getTableColumns: (locales: any) => ({
|
|
|
9
9
|
dataIndex: string;
|
|
10
10
|
key: string;
|
|
11
11
|
width: number;
|
|
12
|
-
render: (value: any, record: any) => React.JSX.Element
|
|
12
|
+
render: (value: any, record: any) => "-" | React.JSX.Element;
|
|
13
13
|
isShow?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
title: any;
|
|
@@ -38,7 +38,7 @@ export declare const getTableColumns: (locales: any) => ({
|
|
|
38
38
|
key: string;
|
|
39
39
|
isShow: boolean;
|
|
40
40
|
width: number;
|
|
41
|
-
render: (value: any) => React.JSX.Element
|
|
41
|
+
render: (value: any) => "-" | React.JSX.Element;
|
|
42
42
|
})[];
|
|
43
43
|
export declare const getQuickFilterList: (locales: any) => ({
|
|
44
44
|
name: string;
|
|
@@ -19,7 +19,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
19
19
|
}[];
|
|
20
20
|
minInputNumberProps?: undefined;
|
|
21
21
|
maxInputNumberProps?: undefined;
|
|
22
|
-
component?: undefined;
|
|
22
|
+
readonly component?: undefined;
|
|
23
23
|
isSearchServer?: undefined;
|
|
24
24
|
showSearch?: undefined;
|
|
25
25
|
showTime?: undefined;
|
|
@@ -45,7 +45,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
45
45
|
mode?: undefined;
|
|
46
46
|
maxTagCount?: undefined;
|
|
47
47
|
options?: undefined;
|
|
48
|
-
component?: undefined;
|
|
48
|
+
readonly component?: undefined;
|
|
49
49
|
isSearchServer?: undefined;
|
|
50
50
|
showSearch?: undefined;
|
|
51
51
|
showTime?: undefined;
|
|
@@ -90,7 +90,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
90
90
|
options: () => Promise<any>;
|
|
91
91
|
minInputNumberProps?: undefined;
|
|
92
92
|
maxInputNumberProps?: undefined;
|
|
93
|
-
component?: undefined;
|
|
93
|
+
readonly component?: undefined;
|
|
94
94
|
isSearchServer?: undefined;
|
|
95
95
|
showSearch?: undefined;
|
|
96
96
|
showTime?: undefined;
|
|
@@ -110,7 +110,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
110
110
|
options?: undefined;
|
|
111
111
|
minInputNumberProps?: undefined;
|
|
112
112
|
maxInputNumberProps?: undefined;
|
|
113
|
-
component?: undefined;
|
|
113
|
+
readonly component?: undefined;
|
|
114
114
|
isSearchServer?: undefined;
|
|
115
115
|
showSearch?: undefined;
|
|
116
116
|
showTime?: undefined;
|
|
@@ -132,7 +132,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
132
132
|
maxTagCount?: undefined;
|
|
133
133
|
minInputNumberProps?: undefined;
|
|
134
134
|
maxInputNumberProps?: undefined;
|
|
135
|
-
component?: undefined;
|
|
135
|
+
readonly component?: undefined;
|
|
136
136
|
showTime?: undefined;
|
|
137
137
|
};
|
|
138
138
|
sort?: undefined;
|
|
@@ -151,7 +151,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
151
151
|
options?: undefined;
|
|
152
152
|
minInputNumberProps?: undefined;
|
|
153
153
|
maxInputNumberProps?: undefined;
|
|
154
|
-
component?: undefined;
|
|
154
|
+
readonly component?: undefined;
|
|
155
155
|
isSearchServer?: undefined;
|
|
156
156
|
showSearch?: undefined;
|
|
157
157
|
};
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Capacity: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Capacity;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const Countdown: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true | React.
|
|
6
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
7
7
|
export default Countdown;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const MemberPrice: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true | React.
|
|
6
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
7
7
|
export default MemberPrice;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Stock: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Stock;
|
|
@@ -3,7 +3,7 @@ import { ItemLayout, ItemProps, PresetConfig, SelectorProps, SelectorVariant } f
|
|
|
3
3
|
import './selector.less';
|
|
4
4
|
export declare const SelectorContext: React.Context<{
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
|
-
mode?: "
|
|
6
|
+
mode?: "single" | "multiple" | undefined;
|
|
7
7
|
itemLayout?: ItemLayout | undefined;
|
|
8
8
|
valueType?: "object" | "primitive" | undefined;
|
|
9
9
|
variant?: SelectorVariant | undefined;
|
|
@@ -5,6 +5,11 @@ interface Product {
|
|
|
5
5
|
total: number;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* 根据 total 与 origin_total 的折扣比例,重新计算主商品单价 main_product_selling_price
|
|
10
|
+
* 如果存在子商品(bundle),会先按折扣比例计算子商品总价,再用总价减去子商品总价得到主商品总价
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateMainProductSellingPrice(extend: any): void;
|
|
8
13
|
export declare function distributeDiscountOrIncrease(products: Product[], // 商品列表
|
|
9
14
|
totalAdjustment: number, // 总折扣或加价金额,可能为负数(折扣)或正数(加价)
|
|
10
15
|
totalPrice: number): Product[];
|
|
@@ -29,10 +29,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/booking/info/service/serviceManager/distributeDiscount.ts
|
|
30
30
|
var distributeDiscount_exports = {};
|
|
31
31
|
__export(distributeDiscount_exports, {
|
|
32
|
-
distributeDiscountOrIncrease: () => distributeDiscountOrIncrease
|
|
32
|
+
distributeDiscountOrIncrease: () => distributeDiscountOrIncrease,
|
|
33
|
+
updateMainProductSellingPrice: () => updateMainProductSellingPrice
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(distributeDiscount_exports);
|
|
35
36
|
var import_decimal = __toESM(require("decimal.js"));
|
|
37
|
+
function updateMainProductSellingPrice(extend) {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const bundles = ((_a = extend == null ? void 0 : extend.other) == null ? void 0 : _a.bundle) || [];
|
|
40
|
+
let childProductsTotal = new import_decimal.default(0);
|
|
41
|
+
if (bundles.length > 0) {
|
|
42
|
+
const discountRatio = new import_decimal.default(extend.total).div(extend.origin_total);
|
|
43
|
+
bundles.forEach((bundle) => {
|
|
44
|
+
const discountedPrice = new import_decimal.default(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
|
|
45
|
+
bundle.bundle_selling_price = discountedPrice.toNumber();
|
|
46
|
+
childProductsTotal = childProductsTotal.add(
|
|
47
|
+
discountedPrice.mul(bundle.quantity)
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const mainProductTotal = new import_decimal.default(extend.total).sub(childProductsTotal);
|
|
52
|
+
const mainProductQuantity = ((_b = extend.other) == null ? void 0 : _b.quantity) || extend.quantity || 1;
|
|
53
|
+
extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
|
|
54
|
+
}
|
|
36
55
|
function distributeDiscountOrIncrease(products, totalAdjustment, totalPrice) {
|
|
37
56
|
const totalAdjustmentDecimal = new import_decimal.default(totalAdjustment);
|
|
38
57
|
let totalAdjustmentApplied = new import_decimal.default(0);
|
|
@@ -42,12 +61,14 @@ function distributeDiscountOrIncrease(products, totalAdjustment, totalPrice) {
|
|
|
42
61
|
let adjustmentAmount = productPrice.div(totalPrice).times(totalAdjustmentDecimal).toFixed(2, import_decimal.default.ROUND_HALF_UP);
|
|
43
62
|
const newPrice = productPrice.plus(adjustmentAmount).toFixed(2, import_decimal.default.ROUND_HALF_UP);
|
|
44
63
|
const adjustedPrice = new import_decimal.default(newPrice).lessThan(0) ? "0.00" : newPrice;
|
|
64
|
+
const newExtend = {
|
|
65
|
+
...product._extend,
|
|
66
|
+
total: parseFloat(adjustedPrice)
|
|
67
|
+
};
|
|
68
|
+
updateMainProductSellingPrice(newExtend);
|
|
45
69
|
adjustedProducts.push({
|
|
46
70
|
...product,
|
|
47
|
-
_extend:
|
|
48
|
-
...product._extend,
|
|
49
|
-
total: parseFloat(adjustedPrice)
|
|
50
|
-
}
|
|
71
|
+
_extend: newExtend
|
|
51
72
|
});
|
|
52
73
|
totalAdjustmentApplied = totalAdjustmentApplied.plus(new import_decimal.default(adjustmentAmount));
|
|
53
74
|
});
|
|
@@ -61,10 +82,12 @@ function distributeDiscountOrIncrease(products, totalAdjustment, totalPrice) {
|
|
|
61
82
|
let lastPrice = new import_decimal.default(lastProduct._extend.total).plus(adjustmentDifference).toFixed(2, import_decimal.default.ROUND_HALF_UP);
|
|
62
83
|
lastPrice = new import_decimal.default(lastPrice).lessThan(0) ? "0.00" : lastPrice;
|
|
63
84
|
lastProduct._extend.total = parseFloat(lastPrice);
|
|
85
|
+
updateMainProductSellingPrice(lastProduct._extend);
|
|
64
86
|
}
|
|
65
87
|
return adjustedProducts;
|
|
66
88
|
}
|
|
67
89
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68
90
|
0 && (module.exports = {
|
|
69
|
-
distributeDiscountOrIncrease
|
|
91
|
+
distributeDiscountOrIncrease,
|
|
92
|
+
updateMainProductSellingPrice
|
|
70
93
|
});
|
|
@@ -32,6 +32,7 @@ var import_utils = require("@pisell/utils");
|
|
|
32
32
|
var import_utils2 = require("../../../utils");
|
|
33
33
|
var import_distributeDiscount = require("../../service/serviceManager/distributeDiscount");
|
|
34
34
|
var import_utils3 = require("../../../../ticketBooking/utils");
|
|
35
|
+
var import_utils4 = require("../../../info2/service/editService/utils");
|
|
35
36
|
var getGroupTotalPrice = (items) => {
|
|
36
37
|
return items.reduce((prev, next) => {
|
|
37
38
|
prev.duration += next._extend.duration;
|
|
@@ -108,6 +109,13 @@ var createBookingItemsByGroup = (item, isBatchEdit) => {
|
|
|
108
109
|
const discountAmount = (groupOriginTotalPrice - groupTotalPrice) * -1;
|
|
109
110
|
if (discountAmount !== 0) {
|
|
110
111
|
bookings = (0, import_distributeDiscount.distributeDiscountOrIncrease)(bookings, discountAmount, groupOriginTotalPrice);
|
|
112
|
+
bookings = bookings.map((booking) => {
|
|
113
|
+
var _a2, _b2;
|
|
114
|
+
return (0, import_utils4.setProductPrice)(booking, {
|
|
115
|
+
newTotal: (_a2 = booking == null ? void 0 : booking._extend) == null ? void 0 : _a2.total,
|
|
116
|
+
origin_total: (_b2 = booking == null ? void 0 : booking._extend) == null ? void 0 : _b2.origin_total
|
|
117
|
+
});
|
|
118
|
+
});
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
console.log("bookings", bookings);
|
|
@@ -216,7 +216,7 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
216
216
|
* @Author: WangHan
|
|
217
217
|
* @Date: 2024-12-24 11:32
|
|
218
218
|
*/
|
|
219
|
-
export declare const updateServicePrice: (state: any) => never[]
|
|
219
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
|
220
220
|
/**
|
|
221
221
|
* @description: 根据_id和sourceProductId来获取主商品已选择的赠品
|
|
222
222
|
* @param {string} productId 主商品_id
|
|
@@ -62,9 +62,9 @@ var import_BookingList = __toESM(require("../../../info/service/editService/Book
|
|
|
62
62
|
var import_dayjs = __toESM(require("dayjs"));
|
|
63
63
|
var import_utils9 = require("../../../info/service2/Group/utils");
|
|
64
64
|
var import_openNormalService = require("../openNormalService");
|
|
65
|
-
var import_decimal = __toESM(require("decimal.js"));
|
|
66
65
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
67
66
|
var import_useCartChangeEffect = __toESM(require("../../../../ticketBooking/hooks/pisellos/useCartChangeEffect"));
|
|
67
|
+
var import_distributeDiscount = require("../../../info/service/serviceManager/distributeDiscount");
|
|
68
68
|
var submitLock = false;
|
|
69
69
|
var Info = (_, ref) => {
|
|
70
70
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
@@ -210,7 +210,7 @@ var Info = (_, ref) => {
|
|
|
210
210
|
form.setFieldsValue({ discount });
|
|
211
211
|
};
|
|
212
212
|
const onFinish = (values) => {
|
|
213
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2
|
|
213
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
214
214
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
215
215
|
if (isShowTimeAndResource && !isSuccess) {
|
|
216
216
|
return;
|
|
@@ -246,21 +246,7 @@ var Info = (_, ref) => {
|
|
|
246
246
|
_extend.endDate = endDate;
|
|
247
247
|
}
|
|
248
248
|
if (isChangeTotal.current) {
|
|
249
|
-
|
|
250
|
-
const bundles2 = ((_c2 = _extend == null ? void 0 : _extend.other) == null ? void 0 : _c2.bundle) || [];
|
|
251
|
-
let childProductsTotal = new import_decimal.default(0);
|
|
252
|
-
if (bundles2.length > 0) {
|
|
253
|
-
bundles2.forEach((bundle) => {
|
|
254
|
-
const discountedPrice = new import_decimal.default(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
|
|
255
|
-
bundle.bundle_selling_price = discountedPrice.toNumber();
|
|
256
|
-
childProductsTotal = childProductsTotal.add(
|
|
257
|
-
discountedPrice.mul(bundle.quantity)
|
|
258
|
-
);
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
const mainProductTotal = new import_decimal.default(values.total).sub(childProductsTotal);
|
|
262
|
-
const mainProductQuantity = ((_d2 = _extend.other) == null ? void 0 : _d2.quantity) || _extend.quantity || 1;
|
|
263
|
-
_extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
|
|
249
|
+
(0, import_distributeDiscount.updateMainProductSellingPrice)(_extend);
|
|
264
250
|
}
|
|
265
251
|
if (_extend.bundle_edit !== void 0) {
|
|
266
252
|
_extend.bundle_edit = 1;
|
|
@@ -269,7 +255,7 @@ var Info = (_, ref) => {
|
|
|
269
255
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
270
256
|
_item._serviceKey = (0, import_utils3.genServiceKey)(_item);
|
|
271
257
|
_item._holderKey = (0, import_utils3.genHolderKey)(_item);
|
|
272
|
-
if (((
|
|
258
|
+
if (((_d2 = (_c2 = _item._extend) == null ? void 0 : _c2.holder_id) == null ? void 0 : _d2.length) > 1 || ((_e2 = _item._extend) == null ? void 0 : _e2.quantity) > 1 && ((_g2 = (_f2 = _item._extend) == null ? void 0 : _f2.holder_id) == null ? void 0 : _g2.length) >= 1) {
|
|
273
259
|
let holder_ids = _item._extend.holder_id;
|
|
274
260
|
_item._extend.holder_id = holder_ids[0];
|
|
275
261
|
holder_ids = holder_ids.slice(1);
|
|
@@ -288,7 +274,7 @@ var Info = (_, ref) => {
|
|
|
288
274
|
}
|
|
289
275
|
}
|
|
290
276
|
let _id = _item == null ? void 0 : _item._id;
|
|
291
|
-
let groupId = (
|
|
277
|
+
let groupId = (_h2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _h2.groupId;
|
|
292
278
|
if (groupId) {
|
|
293
279
|
_list = _list.filter((d) => {
|
|
294
280
|
var _a3;
|
|
@@ -298,7 +284,7 @@ var Info = (_, ref) => {
|
|
|
298
284
|
} else {
|
|
299
285
|
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
300
286
|
newTotal: values.total,
|
|
301
|
-
origin_total: (
|
|
287
|
+
origin_total: (_i2 = _item._extend) == null ? void 0 : _i2.origin_total
|
|
302
288
|
});
|
|
303
289
|
if (!_list.some((d) => d._id === _id)) {
|
|
304
290
|
const detail = (0, import_utils3.addService)(_list, _item, state);
|
|
@@ -313,7 +299,7 @@ var Info = (_, ref) => {
|
|
|
313
299
|
(0, import_utils6.deleteCacheParams)();
|
|
314
300
|
console.log("_onFinish", _list);
|
|
315
301
|
form.resetFields();
|
|
316
|
-
if (!!((
|
|
302
|
+
if (!!((_j2 = state.service.cacheItem) == null ? void 0 : _j2.new)) {
|
|
317
303
|
window.dispatchEvent(
|
|
318
304
|
new CustomEvent("onAddNewService", {
|
|
319
305
|
detail: {
|
|
@@ -322,7 +308,7 @@ var Info = (_, ref) => {
|
|
|
322
308
|
})
|
|
323
309
|
);
|
|
324
310
|
}
|
|
325
|
-
(
|
|
311
|
+
(_k2 = window.closeBookingEditModal) == null ? void 0 : _k2.call(window);
|
|
326
312
|
_list.sort((a, b) => {
|
|
327
313
|
var _a3, _b3;
|
|
328
314
|
const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|