@pisell/private-materials 6.9.6 → 6.10.2
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/README.md +1 -5
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +164 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/Sales/Cart/index.js +3 -20
- package/es/components/Sales/Cart/utils.d.ts +0 -5
- package/es/components/Sales/Cart/utils.js +0 -16
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/Sales/Summary/utils.js +4 -5
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +12 -12
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +5 -46
- package/es/components/appointmentBooking/components/Voucher/index.js +5 -26
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +1 -1
- package/es/components/appointmentBooking/hooks.js +13 -6
- package/es/components/appointmentBooking/locales.d.ts +0 -3
- package/es/components/appointmentBooking/locales.js +0 -3
- package/es/components/appointmentBooking/utils.d.ts +0 -23
- package/es/components/appointmentBooking/utils.js +0 -159
- package/es/components/booking/addons/index.js +2 -3
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +0 -10
- package/es/components/booking/components/customiseItemModal/index.js +7 -4
- package/es/components/booking/components/footer/amount.d.ts +0 -1
- package/es/components/booking/components/footer/amount.js +165 -358
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +170 -497
- package/es/components/booking/components/footer/utils.d.ts +1 -1
- package/es/components/booking/components/footer/utils.js +83 -144
- package/es/components/booking/components/voucher/index.js +6 -15
- package/es/components/booking/components/voucher/index.less +1 -4
- package/es/components/booking/components/voucherModal/index.less +0 -1
- package/es/components/booking/dashboard/index.js +92 -78
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/dashboard/serve.js +0 -22
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +10 -32
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/client/index.js +6 -16
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Group/utils.js +2 -2
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +41 -45
- package/es/components/booking/info2/cartClientCard/index.js +10 -16
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editNormalService/index.js +17 -22
- package/es/components/booking/info2/service/editService/index.js +2 -33
- package/es/components/booking/info2/service/editService/utils.js +5 -9
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +3 -6
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/booking/utils.js +4 -4
- package/es/components/checkout/PaymentModal.d.ts +0 -1
- package/es/components/checkout/PaymentModal.js +64 -175
- package/es/components/checkout/components/PaymentDetailModal/index.less +429 -426
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -3
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -0
- package/es/components/checkout/components/PaymentResultToast/index.js +0 -2
- package/es/components/checkout/components/WalletPassModule/index.js +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
- package/es/components/checkout/hooks/useWalletPass.d.ts +2 -2
- package/es/components/checkout/hooks/useWalletPass.js +198 -324
- package/es/components/checkout/index.less +0 -6
- package/es/components/checkout/plugin.js +12 -59
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/EFTPos.js +6 -15
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.js +0 -5
- package/es/components/eftposPay/component/fail/failCustom.js +12 -16
- package/es/components/eftposPay/component/fail/index.js +5 -12
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/const.d.ts +1 -6
- package/es/components/eftposPay/const.js +0 -3
- package/es/components/eftposPay/hooks.d.ts +2 -3
- package/es/components/eftposPay/hooks.js +0 -12
- package/es/components/eftposPay/index.js +1 -5
- package/es/components/eftposPay/locales.d.ts +0 -36
- package/es/components/eftposPay/locales.js +3 -42
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -5
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +5 -12
- package/es/components/eftposPay/tyro/index.js +4 -97
- package/es/components/eftposPay/windcave/windcave.js +9 -9
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +1 -2
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/kioskSkuDetail/index.d.ts +0 -3
- package/es/components/kioskSkuDetail/index.js +173 -268
- package/es/components/kioskSkuDetail/index.less +7 -49
- package/es/components/kioskSkuDetail/locales.d.ts +0 -6
- package/es/components/kioskSkuDetail/locales.js +3 -9
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +1 -8
- package/es/components/pay/toB/components/MX51/index.js +1 -2
- package/es/components/pay/toB/paymentMethods/index.js +1 -2
- package/es/components/pay/toB/types/index.d.ts +0 -9
- package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/index.js +5 -54
- package/es/components/pay/toC/PaymentList/index.less +1 -58
- package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/serve.js +0 -22
- package/es/components/pay/toC/PaymentList/utils.d.ts +0 -26
- package/es/components/pay/toC/PaymentList/utils.js +6 -188
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +42 -139
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/es/components/pay/toC/index.js +28 -68
- package/es/components/pay/toC/locales.d.ts +0 -6
- package/es/components/pay/toC/locales.js +3 -9
- package/es/components/pay/toC/model.d.ts +1 -10
- package/es/components/pay/toC/serve.d.ts +0 -18
- package/es/components/pay/toC/serve.js +1 -29
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +0 -4
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.js +1 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.js +1 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/systemSettings/registry/components/SectionList.js +1 -5
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +8 -5
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +63 -142
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +1 -2
- package/es/components/ticketBooking/components/ticketBooking/index.js +5 -19
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +0 -3
- package/es/components/ticketBooking/context/OsKeyContext.js +2 -12
- package/es/components/ticketBooking/context/index.d.ts +1 -1
- package/es/components/ticketBooking/context/index.js +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +1 -1
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +11 -14
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +10 -69
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.js +1 -2
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/walletList/index.js +2 -7
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/index.d.ts +4 -7
- package/es/index.js +4 -7
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/clinetSearch/index.d.ts +0 -1
- package/es/plus/clinetSearch/index.js +5 -27
- package/es/plus/clinetSearch/locales.d.ts +0 -3
- package/es/plus/clinetSearch/locales.js +3 -6
- package/es/plus/clinetSearch/types.d.ts +0 -9
- package/es/plus/myTeamLogin/MyTeamLoginCpt.d.ts +9 -0
- package/es/plus/myTeamLogin/MyTeamLoginCpt.js +205 -0
- package/es/plus/myTeamLogin/index.d.ts +11 -0
- package/es/{components/ecocup/cupList/hooks/useCupApi.js → plus/myTeamLogin/index.js} +259 -129
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/index.js +3 -12
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +4 -6
- package/es/plus/productSelect/ProductList/gridComponents.js +10 -30
- package/es/plus/productSelect/index.d.ts +1 -3
- package/es/plus/productSelect/index.js +14 -85
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.js +0 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
- package/es/plus/skuOptionsSelection/locales.d.ts +0 -3
- package/es/plus/skuOptionsSelection/locales.js +0 -3
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +2 -11
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +0 -10
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +0 -1
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +0 -2
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +0 -10
- package/es/plus/walletPassGallery/components/passDetail/index.js +5 -6
- package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -2
- package/es/plus/walletPassGallery/components/timelineSection/index.js +3 -9
- package/es/plus/walletPassGallery/index.js +2 -2
- package/es/plus/walletPassGallery/index.less +1 -1
- package/es/plus/walletPassGallery/serve.d.ts +0 -8
- package/es/plus/walletPassGallery/serve.js +50 -78
- package/es/plus/webPosLogin/WebPosLogin.d.ts +2 -2
- package/es/plus/webPosLogin/WebPosLogin.js +2 -7
- package/es/plus/webPosLogin/components/LoginPanel/index.js +3 -0
- package/es/plus/webPosLogin/components/MediaDisplay/index.js +5 -5
- package/es/plus/webPosLogin/components/MediaDisplay/index.less +6 -10
- package/es/plus/webPosLogin/service.js +1 -2
- package/es/pro/Login2.0/AuthModal.js +4 -12
- package/es/pro/Login2.0/Login2.js +10 -16
- package/es/pro/Login2.0/components/LoginCodeInput.js +3 -36
- package/es/pro/Login2.0/index.less +3 -15
- package/es/pro/Login2.0/shared/types.d.ts +4 -0
- package/es/pro/Login2.0/steps/CodeInput.js +7 -37
- package/es/pro/NumericStepper/index.d.ts +1 -27
- package/es/pro/NumericStepper/index.js +68 -84
- package/es/pro/NumericStepper/index.less +136 -261
- package/es/pro/Selector/Selector.js +10 -17
- package/es/pro/Selector/demo.d.ts +1 -0
- package/es/pro/Selector/hooks/usePresetItemProps.js +0 -2
- package/es/pro/Selector/hooks/usePresetProps.js +2 -4
- package/es/pro/Selector/types.d.ts +0 -1
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/pisellNumberSelector/example.d.ts +3 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +1 -2
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -2
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +3 -6
- package/es/pro/skuDetailModal/index.js +55 -61
- package/es/pro/skuDetailModal/index.less +4 -46
- package/es/pro/skuDetailModal/types.d.ts +0 -7
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/Sales/Cart/index.js +7 -25
- package/lib/components/Sales/Cart/utils.d.ts +0 -5
- package/lib/components/Sales/Cart/utils.js +1 -13
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/Sales/Summary/utils.js +4 -2
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +8 -3
- package/lib/components/appointmentBooking/components/Services/index.js +1 -5
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -27
- package/lib/components/appointmentBooking/components/Voucher/index.js +6 -37
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +1 -1
- package/lib/components/appointmentBooking/hooks.js +11 -6
- package/lib/components/appointmentBooking/locales.d.ts +0 -3
- package/lib/components/appointmentBooking/locales.js +0 -3
- package/lib/components/appointmentBooking/utils.d.ts +0 -23
- package/lib/components/appointmentBooking/utils.js +0 -103
- package/lib/components/booking/addons/index.js +2 -3
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +0 -10
- package/lib/components/booking/components/customiseItemModal/index.js +5 -4
- package/lib/components/booking/components/footer/amount.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.js +25 -122
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +5 -244
- package/lib/components/booking/components/footer/utils.d.ts +1 -1
- package/lib/components/booking/components/footer/utils.js +22 -59
- package/lib/components/booking/components/voucher/index.js +4 -18
- package/lib/components/booking/components/voucher/index.less +1 -4
- package/lib/components/booking/components/voucherModal/index.less +0 -1
- package/lib/components/booking/dashboard/index.js +59 -38
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.js +2 -8
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +21 -65
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/client/index.js +8 -16
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Group/utils.js +2 -2
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +2 -6
- package/lib/components/booking/info2/cartClientCard/index.js +11 -17
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +16 -20
- package/lib/components/booking/info2/service/editService/index.js +24 -48
- package/lib/components/booking/info2/service/editService/utils.js +4 -7
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +3 -6
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/booking/utils.js +3 -3
- package/lib/components/checkout/PaymentModal.d.ts +0 -1
- package/lib/components/checkout/PaymentModal.js +30 -98
- package/lib/components/checkout/components/PaymentDetailModal/index.less +429 -426
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +2 -6
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -0
- package/lib/components/checkout/components/PaymentResultToast/index.js +0 -2
- package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
- package/lib/components/checkout/hooks/useWalletPass.d.ts +2 -2
- package/lib/components/checkout/hooks/useWalletPass.js +109 -160
- package/lib/components/checkout/index.less +0 -6
- package/lib/components/checkout/plugin.js +150 -195
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/EFTPos.js +7 -11
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.js +0 -5
- package/lib/components/eftposPay/component/fail/failCustom.js +9 -15
- package/lib/components/eftposPay/component/fail/index.js +1 -4
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/const.d.ts +1 -6
- package/lib/components/eftposPay/const.js +0 -3
- package/lib/components/eftposPay/hooks.d.ts +2 -3
- package/lib/components/eftposPay/hooks.js +0 -16
- package/lib/components/eftposPay/index.js +1 -5
- package/lib/components/eftposPay/locales.d.ts +0 -36
- package/lib/components/eftposPay/locales.js +3 -42
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -7
- package/lib/components/eftposPay/pay.js +2 -3
- package/lib/components/eftposPay/store/index.d.ts +5 -12
- package/lib/components/eftposPay/tyro/index.js +7 -64
- package/lib/components/eftposPay/windcave/windcave.js +9 -9
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +1 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/kioskSkuDetail/index.d.ts +0 -3
- package/lib/components/kioskSkuDetail/index.js +113 -180
- package/lib/components/kioskSkuDetail/index.less +7 -49
- package/lib/components/kioskSkuDetail/locales.d.ts +0 -6
- package/lib/components/kioskSkuDetail/locales.js +3 -9
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +1 -8
- package/lib/components/pay/toB/components/MX51/index.js +1 -2
- package/lib/components/pay/toB/paymentMethods/index.js +1 -2
- package/lib/components/pay/toB/types/index.d.ts +0 -9
- package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/index.js +5 -36
- package/lib/components/pay/toC/PaymentList/index.less +1 -58
- package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/serve.js +1 -21
- package/lib/components/pay/toC/PaymentList/utils.d.ts +0 -26
- package/lib/components/pay/toC/PaymentList/utils.js +7 -156
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -97
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/lib/components/pay/toC/index.js +11 -53
- package/lib/components/pay/toC/locales.d.ts +0 -6
- package/lib/components/pay/toC/locales.js +3 -9
- package/lib/components/pay/toC/model.d.ts +1 -10
- package/lib/components/pay/toC/serve.d.ts +0 -18
- package/lib/components/pay/toC/serve.js +0 -6
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +0 -4
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.js +1 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/systemSettings/registry/components/SectionList.js +1 -4
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +7 -3
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +16 -46
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +2 -3
- package/lib/components/ticketBooking/components/ticketBooking/index.js +7 -21
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +0 -3
- package/lib/components/ticketBooking/context/OsKeyContext.js +3 -13
- package/lib/components/ticketBooking/context/index.d.ts +1 -1
- package/lib/components/ticketBooking/context/index.js +0 -2
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +1 -1
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +2 -3
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +0 -59
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.js +1 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/walletList/index.js +1 -5
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/index.d.ts +4 -7
- package/lib/index.js +6 -15
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/index.d.ts +0 -1
- package/lib/plus/clinetSearch/index.js +7 -31
- package/lib/plus/clinetSearch/locales.d.ts +0 -3
- package/lib/plus/clinetSearch/locales.js +3 -6
- package/lib/plus/clinetSearch/types.d.ts +0 -9
- package/lib/plus/myTeamLogin/MyTeamLoginCpt.d.ts +9 -0
- package/lib/plus/myTeamLogin/MyTeamLoginCpt.js +188 -0
- package/lib/plus/myTeamLogin/index.d.ts +11 -0
- package/lib/plus/myTeamLogin/index.js +198 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/index.js +3 -3
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +4 -6
- package/lib/plus/productSelect/ProductList/gridComponents.js +1 -7
- package/lib/plus/productSelect/index.d.ts +1 -3
- package/lib/plus/productSelect/index.js +11 -56
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.js +0 -1
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +0 -2
- package/lib/plus/skuOptionsSelection/locales.d.ts +0 -3
- package/lib/plus/skuOptionsSelection/locales.js +0 -3
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +0 -10
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +0 -10
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +0 -1
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +0 -2
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +0 -10
- package/lib/plus/walletPassGallery/components/passDetail/index.js +6 -24
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -2
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +10 -17
- package/lib/plus/walletPassGallery/index.js +2 -2
- package/lib/plus/walletPassGallery/index.less +1 -1
- package/lib/plus/walletPassGallery/serve.d.ts +0 -8
- package/lib/plus/walletPassGallery/serve.js +8 -23
- package/lib/plus/webPosLogin/WebPosLogin.d.ts +2 -2
- package/lib/plus/webPosLogin/WebPosLogin.js +2 -7
- package/lib/plus/webPosLogin/components/LoginPanel/index.js +3 -0
- package/lib/plus/webPosLogin/components/MediaDisplay/index.js +1 -1
- package/lib/plus/webPosLogin/components/MediaDisplay/index.less +6 -10
- package/lib/plus/webPosLogin/service.js +1 -2
- package/lib/pro/Login2.0/AuthModal.js +7 -15
- package/lib/pro/Login2.0/Login2.js +15 -21
- package/lib/pro/Login2.0/components/LoginCodeInput.js +4 -26
- package/lib/pro/Login2.0/index.less +3 -15
- package/lib/pro/Login2.0/shared/types.d.ts +4 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +5 -27
- package/lib/pro/NumericStepper/index.d.ts +1 -27
- package/lib/pro/NumericStepper/index.js +70 -73
- package/lib/pro/NumericStepper/index.less +136 -261
- package/lib/pro/Selector/Selector.js +4 -11
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.js +0 -2
- package/lib/pro/Selector/hooks/usePresetProps.js +2 -4
- package/lib/pro/Selector/types.d.ts +0 -1
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +1 -2
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -2
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +3 -6
- package/lib/pro/skuDetailModal/index.js +64 -117
- package/lib/pro/skuDetailModal/index.less +4 -46
- package/lib/pro/skuDetailModal/types.d.ts +0 -7
- package/lowcode/kiosk-sku-detail/meta.ts +94 -229
- package/lowcode/login2/meta.ts +20 -15
- package/lowcode/my-team-login/meta.ts +71 -0
- package/package.json +23 -8
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -3
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +0 -82
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +0 -9
- package/es/components/ecocup/components/AddCustomerModal/index.js +0 -216
- package/es/components/ecocup/components/AddCustomerModal/index.less +0 -9
- package/es/components/ecocup/components/CupActionList/index.d.ts +0 -13
- package/es/components/ecocup/components/CupActionList/index.js +0 -91
- package/es/components/ecocup/components/CupActionList/index.less +0 -102
- package/es/components/ecocup/components/CupActionModal/hooks.d.ts +0 -5
- package/es/components/ecocup/components/CupActionModal/hooks.js +0 -68
- package/es/components/ecocup/components/CupActionModal/index.d.ts +0 -14
- package/es/components/ecocup/components/CupActionModal/index.js +0 -92
- package/es/components/ecocup/components/CupActionModal/index.less +0 -38
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +0 -7
- package/es/components/ecocup/components/CupInfoCard/index.js +0 -12
- package/es/components/ecocup/components/CupInfoCard/index.less +0 -11
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +0 -5
- package/es/components/ecocup/components/CupStatusModal/hooks.js +0 -68
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +0 -13
- package/es/components/ecocup/components/CupStatusModal/index.js +0 -147
- package/es/components/ecocup/components/CupStatusModal/index.less +0 -35
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +0 -14
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.js +0 -133
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +0 -16
- package/es/components/ecocup/components/CustomerAndCupModal/index.js +0 -227
- package/es/components/ecocup/components/CustomerAndCupModal/index.less +0 -68
- package/es/components/ecocup/components/CustomerCard/index.d.ts +0 -6
- package/es/components/ecocup/components/CustomerCard/index.js +0 -34
- package/es/components/ecocup/components/CustomerCard/index.less +0 -50
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +0 -8
- package/es/components/ecocup/components/MoreDropdown/index.js +0 -33
- package/es/components/ecocup/components/PageHeader/index.d.ts +0 -6
- package/es/components/ecocup/components/PageHeader/index.js +0 -37
- package/es/components/ecocup/components/PageHeader/index.less +0 -19
- package/es/components/ecocup/components/SearchBar/const.d.ts +0 -4
- package/es/components/ecocup/components/SearchBar/const.js +0 -16
- package/es/components/ecocup/components/SearchBar/hooks.d.ts +0 -44
- package/es/components/ecocup/components/SearchBar/hooks.js +0 -184
- package/es/components/ecocup/components/SearchBar/index.d.ts +0 -12
- package/es/components/ecocup/components/SearchBar/index.js +0 -218
- package/es/components/ecocup/components/SearchBar/index.less +0 -88
- package/es/components/ecocup/cupList/const.d.ts +0 -133
- package/es/components/ecocup/cupList/const.js +0 -306
- package/es/components/ecocup/cupList/hooks/index.d.ts +0 -4
- package/es/components/ecocup/cupList/hooks/index.js +0 -4
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +0 -43
- package/es/components/ecocup/cupList/hooks/useColumns.js +0 -168
- package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +0 -32
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +0 -2
- package/es/components/ecocup/cupList/hooks/useSummary.js +0 -40
- package/es/components/ecocup/cupList/index.d.ts +0 -6
- package/es/components/ecocup/cupList/index.js +0 -220
- package/es/components/ecocup/cupList/index.less +0 -113
- package/es/components/ecocup/cupProject/const.d.ts +0 -7
- package/es/components/ecocup/cupProject/const.js +0 -27
- package/es/components/ecocup/cupProject/index.d.ts +0 -3
- package/es/components/ecocup/cupProject/index.js +0 -103
- package/es/components/ecocup/cupProject/index.less +0 -41
- package/es/components/ecocup/customerList/const.d.ts +0 -44
- package/es/components/ecocup/customerList/const.js +0 -67
- package/es/components/ecocup/customerList/hooks/index.d.ts +0 -3
- package/es/components/ecocup/customerList/hooks/index.js +0 -3
- package/es/components/ecocup/customerList/hooks/useColumns.d.ts +0 -15
- package/es/components/ecocup/customerList/hooks/useColumns.js +0 -44
- package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +0 -15
- package/es/components/ecocup/customerList/hooks/useCustomerApi.js +0 -70
- package/es/components/ecocup/customerList/index.d.ts +0 -7
- package/es/components/ecocup/customerList/index.js +0 -127
- package/es/components/ecocup/customerList/index.less +0 -15
- package/es/components/ecocup/hooks.d.ts +0 -49
- package/es/components/ecocup/hooks.js +0 -151
- package/es/components/ecocup/locales.d.ts +0 -339
- package/es/components/ecocup/locales.js +0 -372
- package/es/components/ecocup/types.d.ts +0 -103
- package/es/components/ecocup/types.js +0 -36
- package/es/components/ecocup/utils/scanListener.d.ts +0 -20
- package/es/components/ecocup/utils/scanListener.js +0 -107
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -120
- package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/es/components/eftposPay/aggregatePayment/index.js +0 -3
- package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/es/components/eftposPay/aggregatePayment/service.js +0 -69
- package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -106
- package/es/components/eftposPay/aggregatePayment/types.js +0 -65
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -371
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1138
- package/es/components/eftposPay/huifu/Action.d.ts +0 -8
- package/es/components/eftposPay/huifu/Action.js +0 -146
- package/es/components/eftposPay/huifu/const.d.ts +0 -5
- package/es/components/eftposPay/huifu/const.js +0 -70
- package/es/components/eftposPay/huifu/hooks.d.ts +0 -25
- package/es/components/eftposPay/huifu/hooks.js +0 -184
- package/es/components/eftposPay/huifu/index.d.ts +0 -5
- package/es/components/eftposPay/huifu/index.js +0 -196
- package/es/components/eftposPay/huifu/index.less +0 -180
- package/es/components/eftposPay/huifu/types.d.ts +0 -14
- package/es/components/eftposPay/huifu/types.js +0 -1
- package/es/components/eventBooking/components/Voucher/components/Voucher.d.ts +0 -20
- package/es/components/eventBooking/components/Voucher/components/Voucher.js +0 -99
- package/es/components/eventBooking/components/Voucher/components/index.less +0 -124
- package/es/components/eventBooking/components/Voucher/components/locales.d.ts +0 -39
- package/es/components/eventBooking/components/Voucher/components/locales.js +0 -38
- package/es/components/eventBooking/components/Voucher/hooks.d.ts +0 -7
- package/es/components/eventBooking/components/Voucher/hooks.js +0 -212
- package/es/components/eventBooking/components/Voucher/index.d.ts +0 -2
- package/es/components/eventBooking/components/Voucher/index.js +0 -266
- package/es/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/es/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/es/plus/orderList/components/BatchActionBar.d.ts +0 -9
- package/es/plus/orderList/components/BatchActionBar.js +0 -835
- package/es/plus/orderList/components/FilterList.d.ts +0 -8
- package/es/plus/orderList/components/FilterList.js +0 -78
- package/es/plus/orderList/components/HandleActions.d.ts +0 -5
- package/es/plus/orderList/components/HandleActions.js +0 -27
- package/es/plus/orderList/components/QuickFilter.d.ts +0 -4
- package/es/plus/orderList/components/QuickFilter.js +0 -14
- package/es/plus/orderList/components/Reset.d.ts +0 -6
- package/es/plus/orderList/components/Reset.js +0 -23
- package/es/plus/orderList/components/Toolbar.d.ts +0 -6
- package/es/plus/orderList/components/Toolbar.js +0 -59
- package/es/plus/orderList/config.d.ts +0 -154
- package/es/plus/orderList/config.js +0 -786
- package/es/plus/orderList/index.d.ts +0 -10
- package/es/plus/orderList/index.js +0 -133
- package/es/plus/orderList/index.less +0 -125
- package/es/plus/orderList/locales.d.ts +0 -372
- package/es/plus/orderList/locales.js +0 -459
- package/es/plus/orderList/serve.d.ts +0 -42
- package/es/plus/orderList/serve.js +0 -351
- package/es/pro/keyboards/index.d.ts +0 -2
- package/es/pro/keyboards/index.js +0 -1
- package/es/pro/keyboards/locales.d.ts +0 -24
- package/es/pro/keyboards/locales.js +0 -35
- package/es/pro/keyboards/numberKeyboard/index.d.ts +0 -16
- package/es/pro/keyboards/numberKeyboard/index.js +0 -523
- package/es/pro/keyboards/numberKeyboard/index.less +0 -59
- package/es/pro/keyboards/numberKeyboard/types.d.ts +0 -63
- package/es/pro/keyboards/numberKeyboard/types.js +0 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -3
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +0 -89
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +0 -9
- package/lib/components/ecocup/components/AddCustomerModal/index.js +0 -212
- package/lib/components/ecocup/components/AddCustomerModal/index.less +0 -9
- package/lib/components/ecocup/components/CupActionList/index.d.ts +0 -13
- package/lib/components/ecocup/components/CupActionList/index.js +0 -116
- package/lib/components/ecocup/components/CupActionList/index.less +0 -102
- package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +0 -5
- package/lib/components/ecocup/components/CupActionModal/hooks.js +0 -55
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +0 -14
- package/lib/components/ecocup/components/CupActionModal/index.js +0 -125
- package/lib/components/ecocup/components/CupActionModal/index.less +0 -38
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +0 -7
- package/lib/components/ecocup/components/CupInfoCard/index.js +0 -43
- package/lib/components/ecocup/components/CupInfoCard/index.less +0 -11
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +0 -5
- package/lib/components/ecocup/components/CupStatusModal/hooks.js +0 -55
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +0 -13
- package/lib/components/ecocup/components/CupStatusModal/index.js +0 -140
- package/lib/components/ecocup/components/CupStatusModal/index.less +0 -35
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +0 -14
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.js +0 -89
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +0 -16
- package/lib/components/ecocup/components/CustomerAndCupModal/index.js +0 -178
- package/lib/components/ecocup/components/CustomerAndCupModal/index.less +0 -68
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +0 -6
- package/lib/components/ecocup/components/CustomerCard/index.js +0 -48
- package/lib/components/ecocup/components/CustomerCard/index.less +0 -50
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +0 -8
- package/lib/components/ecocup/components/MoreDropdown/index.js +0 -68
- package/lib/components/ecocup/components/PageHeader/index.d.ts +0 -6
- package/lib/components/ecocup/components/PageHeader/index.js +0 -59
- package/lib/components/ecocup/components/PageHeader/index.less +0 -19
- package/lib/components/ecocup/components/SearchBar/const.d.ts +0 -4
- package/lib/components/ecocup/components/SearchBar/const.js +0 -50
- package/lib/components/ecocup/components/SearchBar/hooks.d.ts +0 -44
- package/lib/components/ecocup/components/SearchBar/hooks.js +0 -135
- package/lib/components/ecocup/components/SearchBar/index.d.ts +0 -12
- package/lib/components/ecocup/components/SearchBar/index.js +0 -213
- package/lib/components/ecocup/components/SearchBar/index.less +0 -88
- package/lib/components/ecocup/cupList/const.d.ts +0 -133
- package/lib/components/ecocup/cupList/const.js +0 -326
- package/lib/components/ecocup/cupList/hooks/index.d.ts +0 -4
- package/lib/components/ecocup/cupList/hooks/index.js +0 -39
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +0 -43
- package/lib/components/ecocup/cupList/hooks/useColumns.js +0 -202
- package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +0 -32
- package/lib/components/ecocup/cupList/hooks/useCupApi.js +0 -112
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +0 -2
- package/lib/components/ecocup/cupList/hooks/useSummary.js +0 -75
- package/lib/components/ecocup/cupList/index.d.ts +0 -6
- package/lib/components/ecocup/cupList/index.js +0 -208
- package/lib/components/ecocup/cupList/index.less +0 -113
- package/lib/components/ecocup/cupProject/const.d.ts +0 -7
- package/lib/components/ecocup/cupProject/const.js +0 -58
- package/lib/components/ecocup/cupProject/index.d.ts +0 -3
- package/lib/components/ecocup/cupProject/index.js +0 -126
- package/lib/components/ecocup/cupProject/index.less +0 -41
- package/lib/components/ecocup/customerList/const.d.ts +0 -44
- package/lib/components/ecocup/customerList/const.js +0 -93
- package/lib/components/ecocup/customerList/hooks/index.d.ts +0 -3
- package/lib/components/ecocup/customerList/hooks/index.js +0 -32
- package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +0 -15
- package/lib/components/ecocup/customerList/hooks/useColumns.js +0 -89
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +0 -15
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.js +0 -56
- package/lib/components/ecocup/customerList/index.d.ts +0 -7
- package/lib/components/ecocup/customerList/index.js +0 -138
- package/lib/components/ecocup/customerList/index.less +0 -15
- package/lib/components/ecocup/hooks.d.ts +0 -49
- package/lib/components/ecocup/hooks.js +0 -155
- package/lib/components/ecocup/locales.d.ts +0 -339
- package/lib/components/ecocup/locales.js +0 -389
- package/lib/components/ecocup/types.d.ts +0 -103
- package/lib/components/ecocup/types.js +0 -57
- package/lib/components/ecocup/utils/scanListener.d.ts +0 -20
- package/lib/components/ecocup/utils/scanListener.js +0 -90
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -133
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/lib/components/eftposPay/aggregatePayment/index.js +0 -42
- package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -106
- package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -294
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -752
- package/lib/components/eftposPay/huifu/Action.d.ts +0 -8
- package/lib/components/eftposPay/huifu/Action.js +0 -174
- package/lib/components/eftposPay/huifu/const.d.ts +0 -5
- package/lib/components/eftposPay/huifu/const.js +0 -86
- package/lib/components/eftposPay/huifu/hooks.d.ts +0 -25
- package/lib/components/eftposPay/huifu/hooks.js +0 -186
- package/lib/components/eftposPay/huifu/index.d.ts +0 -5
- package/lib/components/eftposPay/huifu/index.js +0 -200
- package/lib/components/eftposPay/huifu/index.less +0 -180
- package/lib/components/eftposPay/huifu/types.d.ts +0 -14
- package/lib/components/eftposPay/huifu/types.js +0 -17
- package/lib/components/eventBooking/components/Voucher/components/Voucher.d.ts +0 -20
- package/lib/components/eventBooking/components/Voucher/components/Voucher.js +0 -116
- package/lib/components/eventBooking/components/Voucher/components/index.less +0 -124
- package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +0 -39
- package/lib/components/eventBooking/components/Voucher/components/locales.js +0 -59
- package/lib/components/eventBooking/components/Voucher/hooks.d.ts +0 -7
- package/lib/components/eventBooking/components/Voucher/hooks.js +0 -176
- package/lib/components/eventBooking/components/Voucher/index.d.ts +0 -2
- package/lib/components/eventBooking/components/Voucher/index.js +0 -197
- package/lib/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/lib/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/lib/plus/orderList/components/BatchActionBar.d.ts +0 -9
- package/lib/plus/orderList/components/BatchActionBar.js +0 -567
- package/lib/plus/orderList/components/FilterList.d.ts +0 -8
- package/lib/plus/orderList/components/FilterList.js +0 -121
- package/lib/plus/orderList/components/HandleActions.d.ts +0 -5
- package/lib/plus/orderList/components/HandleActions.js +0 -52
- package/lib/plus/orderList/components/QuickFilter.d.ts +0 -4
- package/lib/plus/orderList/components/QuickFilter.js +0 -43
- package/lib/plus/orderList/components/Reset.d.ts +0 -6
- package/lib/plus/orderList/components/Reset.js +0 -58
- package/lib/plus/orderList/components/Toolbar.d.ts +0 -6
- package/lib/plus/orderList/components/Toolbar.js +0 -68
- package/lib/plus/orderList/config.d.ts +0 -154
- package/lib/plus/orderList/config.js +0 -766
- package/lib/plus/orderList/index.d.ts +0 -10
- package/lib/plus/orderList/index.js +0 -132
- package/lib/plus/orderList/index.less +0 -125
- package/lib/plus/orderList/locales.d.ts +0 -372
- package/lib/plus/orderList/locales.js +0 -471
- package/lib/plus/orderList/serve.d.ts +0 -42
- package/lib/plus/orderList/serve.js +0 -177
- package/lib/pro/keyboards/index.d.ts +0 -2
- package/lib/pro/keyboards/index.js +0 -39
- package/lib/pro/keyboards/locales.d.ts +0 -24
- package/lib/pro/keyboards/locales.js +0 -47
- package/lib/pro/keyboards/numberKeyboard/index.d.ts +0 -16
- package/lib/pro/keyboards/numberKeyboard/index.js +0 -400
- package/lib/pro/keyboards/numberKeyboard/index.less +0 -59
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +0 -63
- package/lib/pro/keyboards/numberKeyboard/types.js +0 -17
- package/lowcode/eco-cup-list/meta.ts +0 -63
- package/lowcode/eco-customer-list/meta.ts +0 -63
- package/lowcode/ecocup-cup-list/meta.ts +0 -38
- package/lowcode/ecocup-cup-project/meta.ts +0 -35
- package/lowcode/ecocup-customer-list/meta.ts +0 -38
- package/lowcode/order-list/meta.ts +0 -87
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
7
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
8
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
@@ -8,10 +12,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
14
|
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); }
|
|
11
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
15
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
16
16
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -20,7 +20,6 @@ import { formatAmount } from '@pisell/utils';
|
|
|
20
20
|
import Decimal from 'decimal.js';
|
|
21
21
|
import { isDayBooking, isNormalProductByDurationSchedule } from "../../info/service2/utils";
|
|
22
22
|
import { isMultiDayProduct } from "../../info2/service/addService/utils";
|
|
23
|
-
import { getBundleDiscountList } from "./utils";
|
|
24
23
|
export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_details) {
|
|
25
24
|
var total = new Decimal(0);
|
|
26
25
|
var _iterator = _createForOfIteratorHelper(relation_details),
|
|
@@ -39,17 +38,6 @@ export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_d
|
|
|
39
38
|
}
|
|
40
39
|
return total.toNumber();
|
|
41
40
|
};
|
|
42
|
-
export var getProductDiscountProductDiscountDifference = function getProductDiscountProductDiscountDifference(product) {
|
|
43
|
-
var _product$_extend;
|
|
44
|
-
var mainDiscountList = product.discount_list || [];
|
|
45
|
-
var bundleDiscountList = getBundleDiscountList(((_product$_extend = product._extend) === null || _product$_extend === void 0 || (_product$_extend = _product$_extend.other) === null || _product$_extend === void 0 ? void 0 : _product$_extend.bundle) || []);
|
|
46
|
-
var discountList = [].concat(_toConsumableArray(mainDiscountList), _toConsumableArray(bundleDiscountList));
|
|
47
|
-
return discountList.reduce(function (pre, cur) {
|
|
48
|
-
var _cur$metadata;
|
|
49
|
-
return pre + ((cur === null || cur === void 0 || (_cur$metadata = cur.metadata) === null || _cur$metadata === void 0 ? void 0 : _cur$metadata.product_discount_difference) || 0);
|
|
50
|
-
}, 0);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
41
|
/**
|
|
54
42
|
* 总金额
|
|
55
43
|
* @param state
|
|
@@ -80,9 +68,6 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
80
68
|
var itemOriginTotal = new Decimal(item._extend.origin_total || 0);
|
|
81
69
|
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
82
70
|
|
|
83
|
-
// 商品折扣差价
|
|
84
|
-
price = price.sub(getProductDiscountProductDiscountDifference(item));
|
|
85
|
-
|
|
86
71
|
// 普通商品不能加到时长上
|
|
87
72
|
var _duration = !isNormalProductByDurationSchedule(item) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
|
|
88
73
|
if (isDay || isMultiDayProduct(item)) {
|
|
@@ -99,9 +84,6 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
99
84
|
// 附加商品
|
|
100
85
|
var relationTotal = new Decimal(getRelationDetailsTotal(item._extend.relation_details || []));
|
|
101
86
|
price = price.add(relationTotal);
|
|
102
|
-
|
|
103
|
-
// 商品折扣差价
|
|
104
|
-
price = price.sub(getProductDiscountProductDiscountDifference(item));
|
|
105
87
|
var itemDuration = new Decimal(flexibleObj.getValue(item._extend.duration) || 0);
|
|
106
88
|
duration = duration.add(itemDuration);
|
|
107
89
|
if (isMultiDayProduct(item)) {
|
|
@@ -164,14 +146,6 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
164
146
|
duration: getDiscountTimeByDayMinutes(dayDuration.toNumber(), minuteDuration.toNumber())
|
|
165
147
|
};
|
|
166
148
|
};
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* 计算单个商品的税费(返回精确值,不四舍五入)
|
|
170
|
-
* @param item 商品信息
|
|
171
|
-
* @param state 状态
|
|
172
|
-
* @param options 选项
|
|
173
|
-
* @returns 精确的税费值(Decimal类型)
|
|
174
|
-
*/
|
|
175
149
|
var getProductItemTax = function getProductItemTax(item, state, options) {
|
|
176
150
|
var _bookingDetail$tax_ra, _ref, _bookingDetail$is_pri;
|
|
177
151
|
var bookingDetail = state.bookingDetail;
|
|
@@ -217,8 +191,8 @@ var getProductItemTax = function getProductItemTax(item, state, options) {
|
|
|
217
191
|
}
|
|
218
192
|
}
|
|
219
193
|
|
|
220
|
-
// 结果 = 单个商品税费 ×
|
|
221
|
-
return singleItemTax.times(quantity);
|
|
194
|
+
// 结果 = 单个商品税费 × 数量
|
|
195
|
+
return singleItemTax.times(quantity).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
222
196
|
};
|
|
223
197
|
|
|
224
198
|
/**
|
|
@@ -268,7 +242,6 @@ var getProductSurchargeFee = function getProductSurchargeFee(product) {
|
|
|
268
242
|
|
|
269
243
|
/**
|
|
270
244
|
* 处理商品税费计算(折扣前后)
|
|
271
|
-
* 支持税费舍入差值追加到最后一个含税商品的 tax_fee_rounding_remainder / original_tax_fee_rounding_remainder 字段
|
|
272
245
|
* @param items 商品数组
|
|
273
246
|
* @param state 状态
|
|
274
247
|
* @param options 选项
|
|
@@ -281,19 +254,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
281
254
|
computed = options.computed;
|
|
282
255
|
var shopDiscount = computed.shopDiscount,
|
|
283
256
|
productExpectAmount = computed.productExpectAmount;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
var preciseOriginTax = new Decimal(0);
|
|
287
|
-
var preciseTax = new Decimal(0);
|
|
288
|
-
// 四舍五入后的税费累加
|
|
289
|
-
var roundedOriginTax = new Decimal(0);
|
|
290
|
-
var roundedTax = new Decimal(0);
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* 最后一个含税商品的引用(按物理位置)
|
|
294
|
-
* 用于追加税费舍入差值
|
|
295
|
-
*/
|
|
296
|
-
var lastTaxableItem = null;
|
|
257
|
+
var originTax = new Decimal(0);
|
|
258
|
+
var tax = new Decimal(0);
|
|
297
259
|
var _iterator5 = _createForOfIteratorHelper(items),
|
|
298
260
|
_step5;
|
|
299
261
|
try {
|
|
@@ -304,8 +266,10 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
304
266
|
var unitPrice = new Decimal(item._extend.total || 0);
|
|
305
267
|
var mainProductPrice = new Decimal(getMainProductTotal(item) || 0);
|
|
306
268
|
|
|
307
|
-
//
|
|
308
|
-
|
|
269
|
+
// const surchargeFee = getProductSurchargeFee(item);
|
|
270
|
+
|
|
271
|
+
// 计算原始税费(折扣前)- 单个商品
|
|
272
|
+
var originalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
309
273
|
total: mainProductPrice.add(((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.surcharge_fee) || 0).toNumber(),
|
|
310
274
|
quantity: 1
|
|
311
275
|
}), state, {
|
|
@@ -319,6 +283,21 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
319
283
|
itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
320
284
|
}
|
|
321
285
|
|
|
286
|
+
// // 商品折后单价 = 商品单价 - 商品折后单价
|
|
287
|
+
// const itemDiscountedUnitPrice = unitPrice.minus(itemDiscount).add(surchargeFee);
|
|
288
|
+
|
|
289
|
+
// // 计算折后税费(折扣后)- 单个商品 加子商品的税费
|
|
290
|
+
// const discountedTaxPerItem = getProductItemTax(
|
|
291
|
+
// {
|
|
292
|
+
// ...item,
|
|
293
|
+
// total: itemDiscountedUnitPrice.toNumber(),
|
|
294
|
+
// price: item._extend.total,
|
|
295
|
+
// quantity: 1,
|
|
296
|
+
// },
|
|
297
|
+
// state,
|
|
298
|
+
// { tax_rate, is_price_include_tax }
|
|
299
|
+
// );
|
|
300
|
+
|
|
322
301
|
// 按比例计算主商品应分摊的折扣
|
|
323
302
|
var mainItemDiscount = new Decimal(0);
|
|
324
303
|
if (unitPrice.greaterThan(0)) {
|
|
@@ -326,8 +305,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
326
305
|
}
|
|
327
306
|
var mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.surcharge_fee) || 0);
|
|
328
307
|
|
|
329
|
-
// 计算折后税费(折扣后)-
|
|
330
|
-
var
|
|
308
|
+
// 计算折后税费(折扣后)- 主商品的税费
|
|
309
|
+
var maxDiscountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
331
310
|
total: mainItemDiscountedUnitPrice.toNumber(),
|
|
332
311
|
price: item._extend.total,
|
|
333
312
|
quantity: 1
|
|
@@ -336,23 +315,14 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
336
315
|
is_price_include_tax: is_price_include_tax
|
|
337
316
|
});
|
|
338
317
|
|
|
339
|
-
//
|
|
340
|
-
var maxDiscountedTaxPerItemRounded = maxDiscountedTaxPerItemPrecise.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
341
|
-
|
|
318
|
+
// item._extend.payment_price = itemDiscountedUnitPrice;
|
|
342
319
|
// 保存到商品扩展信息中(保留两位小数)
|
|
343
|
-
item._extend.
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (maxDiscountedTaxPerItemPrecise.gt(0)) {
|
|
347
|
-
lastTaxableItem = {
|
|
348
|
-
type: 'main',
|
|
349
|
-
item: item
|
|
350
|
-
};
|
|
351
|
-
}
|
|
320
|
+
// item._extend.original_tax_fee = originalTaxPerItem.toNumber();
|
|
321
|
+
// item._extend.tax_fee = discountedTaxPerItem.toNumber();
|
|
322
|
+
item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItem.toNumber();
|
|
352
323
|
|
|
353
324
|
// 注意:加时商品独立计算,不考虑主商品数量
|
|
354
|
-
var
|
|
355
|
-
var addTimeRoundedTax = new Decimal(0);
|
|
325
|
+
var addTimeTotalTax = new Decimal(0);
|
|
356
326
|
if (Array.isArray(item._extend.relation_details)) {
|
|
357
327
|
var _iterator6 = _createForOfIteratorHelper(item._extend.relation_details),
|
|
358
328
|
_step6;
|
|
@@ -365,27 +335,14 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
365
335
|
if (productExpectAmount > 0) {
|
|
366
336
|
_discountedTotal = _originTotal.minus(_originTotal.dividedBy(productExpectAmount).times(shopDiscount));
|
|
367
337
|
}
|
|
368
|
-
var
|
|
338
|
+
var addTimeTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, atItem), {}, {
|
|
369
339
|
total: _discountedTotal.add((atItem === null || atItem === void 0 ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
|
|
370
340
|
quantity: atItem.product_quantity || atItem.num || 1
|
|
371
341
|
}), state, {
|
|
372
342
|
tax_rate: tax_rate,
|
|
373
343
|
is_price_include_tax: is_price_include_tax
|
|
374
344
|
});
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
// 保存到加时商品上(四舍五入后的值)
|
|
378
|
-
atItem.tax_fee = addTimeTaxPerItemRounded.toNumber();
|
|
379
|
-
addTimePreciseTax = addTimePreciseTax.plus(addTimeTaxPerItemPrecise);
|
|
380
|
-
addTimeRoundedTax = addTimeRoundedTax.plus(addTimeTaxPerItemRounded);
|
|
381
|
-
|
|
382
|
-
// 如果加时商品有税费,记录为最后一个含税商品
|
|
383
|
-
if (addTimeTaxPerItemPrecise.gt(0)) {
|
|
384
|
-
lastTaxableItem = {
|
|
385
|
-
type: 'addTime',
|
|
386
|
-
item: atItem
|
|
387
|
-
};
|
|
388
|
-
}
|
|
345
|
+
addTimeTotalTax = addTimeTotalTax.plus(addTimeTaxPerItem);
|
|
389
346
|
}
|
|
390
347
|
} catch (err) {
|
|
391
348
|
_iterator6.e(err);
|
|
@@ -395,10 +352,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
395
352
|
}
|
|
396
353
|
|
|
397
354
|
// 处理 bundle 子商品(仅原价子商品)
|
|
398
|
-
var
|
|
399
|
-
var
|
|
400
|
-
var bundleRoundedOriginTax = new Decimal(0);
|
|
401
|
-
var bundleRoundedTax = new Decimal(0);
|
|
355
|
+
var bundleTotalOriginTax = new Decimal(0);
|
|
356
|
+
var bundleTotalTax = new Decimal(0);
|
|
402
357
|
if (Array.isArray((_item$_extend$other = item._extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle)) {
|
|
403
358
|
var _iterator7 = _createForOfIteratorHelper(item._extend.other.bundle),
|
|
404
359
|
_step7;
|
|
@@ -411,8 +366,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
411
366
|
var bundleQuantity = new Decimal(bundleItem.quantity || 1);
|
|
412
367
|
var bundleUnitPrice = new Decimal((_ref2 = (_bundleItem$bundle_se = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se !== void 0 ? _bundleItem$bundle_se : bundleItem.price) !== null && _ref2 !== void 0 ? _ref2 : 0);
|
|
413
368
|
|
|
414
|
-
// 计算原始税费(折扣前)-
|
|
415
|
-
var
|
|
369
|
+
// 计算原始税费(折扣前)- 单个商品
|
|
370
|
+
var bundleOriginalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
416
371
|
total: bundleUnitPrice.add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
|
|
417
372
|
quantity: 1
|
|
418
373
|
}), state, {
|
|
@@ -429,8 +384,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
429
384
|
// bundle商品折后单价
|
|
430
385
|
var bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0);
|
|
431
386
|
|
|
432
|
-
// 计算折后税费(折扣后)-
|
|
433
|
-
var
|
|
387
|
+
// 计算折后税费(折扣后)- 单个商品
|
|
388
|
+
var bundleDiscountedTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
434
389
|
total: bundleDiscountedUnitPrice.toNumber(),
|
|
435
390
|
quantity: 1
|
|
436
391
|
}), state, {
|
|
@@ -438,27 +393,15 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
438
393
|
is_price_include_tax: is_price_include_tax
|
|
439
394
|
});
|
|
440
395
|
|
|
441
|
-
//
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
bundlePreciseOriginTax = bundlePreciseOriginTax.plus(bundleOriginalTaxPerItemPrecise.times(bundleQuantity));
|
|
451
|
-
bundlePreciseTax = bundlePreciseTax.plus(bundleDiscountedTaxPerItemPrecise.times(bundleQuantity));
|
|
452
|
-
bundleRoundedOriginTax = bundleRoundedOriginTax.plus(bundleOriginalTaxPerItemRounded.times(bundleQuantity));
|
|
453
|
-
bundleRoundedTax = bundleRoundedTax.plus(bundleDiscountedTaxPerItemRounded.times(bundleQuantity));
|
|
454
|
-
|
|
455
|
-
// 如果bundle商品有税费,记录为最后一个含税商品
|
|
456
|
-
if (bundleDiscountedTaxPerItemPrecise.gt(0)) {
|
|
457
|
-
lastTaxableItem = {
|
|
458
|
-
type: 'bundle',
|
|
459
|
-
item: bundleItem
|
|
460
|
-
};
|
|
461
|
-
}
|
|
396
|
+
// bundle商品折后单价
|
|
397
|
+
// bundleItem.bundle_payment_price = bundleDiscountedUnitPrice;
|
|
398
|
+
// 保存到bundle商品上(单个商品的税费,保留两位小数)
|
|
399
|
+
bundleItem.original_tax_fee = new Decimal(bundleOriginalTaxPerItem).toNumber();
|
|
400
|
+
bundleItem.tax_fee = new Decimal(bundleDiscountedTaxPerItem).toNumber();
|
|
401
|
+
|
|
402
|
+
// 累加bundle税费(需要乘以bundle数量和主商品数量)
|
|
403
|
+
bundleTotalOriginTax = bundleTotalOriginTax.plus(bundleOriginalTaxPerItem.times(bundleQuantity));
|
|
404
|
+
bundleTotalTax = bundleTotalTax.plus(bundleDiscountedTaxPerItem.times(bundleQuantity));
|
|
462
405
|
}
|
|
463
406
|
}
|
|
464
407
|
} catch (err) {
|
|
@@ -467,156 +410,26 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
467
410
|
_iterator7.f();
|
|
468
411
|
}
|
|
469
412
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
// 主商品的原始税费和折后税费(四舍五入后)
|
|
476
|
-
var originalTaxFeeRounded = originalTaxPerItemPrecise.toDecimalPlaces(2, Decimal.ROUND_HALF_UP).plus(bundleRoundedOriginTax);
|
|
477
|
-
var taxFeeRounded = maxDiscountedTaxPerItemRounded.plus(bundleRoundedTax);
|
|
478
|
-
|
|
479
|
-
// 保存到商品扩展信息中(四舍五入后的值)
|
|
480
|
-
item._extend.original_tax_fee = originalTaxFeeRounded.toDecimalPlaces(2, Decimal.ROUND_HALF_UP).toNumber();
|
|
481
|
-
item._extend.tax_fee = taxFeeRounded.toDecimalPlaces(2, Decimal.ROUND_HALF_UP).toNumber();
|
|
413
|
+
var original_tax_fee = originalTaxPerItem.add(bundleTotalOriginTax);
|
|
414
|
+
var tax_fee = maxDiscountedTaxPerItem.add(bundleTotalTax);
|
|
415
|
+
item._extend.original_tax_fee = original_tax_fee.toNumber();
|
|
416
|
+
item._extend.tax_fee = tax_fee.toNumber();
|
|
482
417
|
|
|
483
418
|
// 累加到总税费(乘以数量)
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
roundedOriginTax = roundedOriginTax.plus(originalTaxFeeRounded.times(quantity)).plus(addTimeRoundedTax);
|
|
487
|
-
roundedTax = roundedTax.plus(taxFeeRounded.times(quantity)).plus(addTimeRoundedTax);
|
|
419
|
+
originTax = originTax.plus(original_tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
420
|
+
tax = tax.plus(tax_fee.times(quantity)).plus(addTimeTotalTax);
|
|
488
421
|
}
|
|
489
|
-
|
|
490
|
-
// 计算期望的总税费(精确累加后四舍五入)
|
|
491
422
|
} catch (err) {
|
|
492
423
|
_iterator5.e(err);
|
|
493
424
|
} finally {
|
|
494
425
|
_iterator5.f();
|
|
495
426
|
}
|
|
496
|
-
var expectedOriginTax = preciseOriginTax.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
497
|
-
var expectedTax = preciseTax.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
498
|
-
|
|
499
|
-
// 计算舍入差值
|
|
500
|
-
var originTaxRemainder = expectedOriginTax.minus(roundedOriginTax).toNumber();
|
|
501
|
-
var taxRemainder = expectedTax.minus(roundedTax).toNumber();
|
|
502
|
-
|
|
503
|
-
// 将差值追加到最后一个含税商品
|
|
504
|
-
if (lastTaxableItem) {
|
|
505
|
-
if (originTaxRemainder !== 0) {
|
|
506
|
-
if (lastTaxableItem.type === 'main') {
|
|
507
|
-
lastTaxableItem.item._extend.original_tax_fee_rounding_remainder = originTaxRemainder;
|
|
508
|
-
} else {
|
|
509
|
-
lastTaxableItem.item.original_tax_fee_rounding_remainder = originTaxRemainder;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
if (taxRemainder !== 0) {
|
|
513
|
-
if (lastTaxableItem.type === 'main') {
|
|
514
|
-
lastTaxableItem.item._extend.tax_fee_rounding_remainder = taxRemainder;
|
|
515
|
-
} else {
|
|
516
|
-
lastTaxableItem.item.tax_fee_rounding_remainder = taxRemainder;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
427
|
return {
|
|
521
|
-
originTax:
|
|
522
|
-
tax:
|
|
428
|
+
originTax: originTax,
|
|
429
|
+
tax: tax
|
|
523
430
|
};
|
|
524
431
|
};
|
|
525
432
|
|
|
526
|
-
/**
|
|
527
|
-
* 清除税费相关字段
|
|
528
|
-
* 在重新计算税费之前调用,避免残留数据影响计算结果
|
|
529
|
-
*/
|
|
530
|
-
var clearTaxFee = function clearTaxFee(state) {
|
|
531
|
-
var service = state.service,
|
|
532
|
-
addons = state.addons;
|
|
533
|
-
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
534
|
-
var _iterator8 = _createForOfIteratorHelper(service.value),
|
|
535
|
-
_step8;
|
|
536
|
-
try {
|
|
537
|
-
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
538
|
-
var _item$_extend$other2;
|
|
539
|
-
var item = _step8.value;
|
|
540
|
-
// 清除主商品税费字段
|
|
541
|
-
item._extend.tax_fee = 0;
|
|
542
|
-
item._extend.original_tax_fee = 0;
|
|
543
|
-
item._extend.tax_fee_rounding_remainder = undefined;
|
|
544
|
-
item._extend.main_product_attached_bundle_tax_fee = 0;
|
|
545
|
-
|
|
546
|
-
// 清除 bundle 子商品税费字段
|
|
547
|
-
var _iterator9 = _createForOfIteratorHelper(((_item$_extend$other2 = item._extend.other) === null || _item$_extend$other2 === void 0 ? void 0 : _item$_extend$other2.bundle) || []),
|
|
548
|
-
_step9;
|
|
549
|
-
try {
|
|
550
|
-
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
551
|
-
var bundleItem = _step9.value;
|
|
552
|
-
bundleItem.tax_fee = 0;
|
|
553
|
-
bundleItem.original_tax_fee = 0;
|
|
554
|
-
bundleItem.tax_fee_rounding_remainder = undefined;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
// 清除加时商品税费字段
|
|
558
|
-
} catch (err) {
|
|
559
|
-
_iterator9.e(err);
|
|
560
|
-
} finally {
|
|
561
|
-
_iterator9.f();
|
|
562
|
-
}
|
|
563
|
-
var _iterator10 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
564
|
-
_step10;
|
|
565
|
-
try {
|
|
566
|
-
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
567
|
-
var relationDetail = _step10.value;
|
|
568
|
-
relationDetail.tax_fee = 0;
|
|
569
|
-
relationDetail.tax_fee_rounding_remainder = undefined;
|
|
570
|
-
}
|
|
571
|
-
} catch (err) {
|
|
572
|
-
_iterator10.e(err);
|
|
573
|
-
} finally {
|
|
574
|
-
_iterator10.f();
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
} catch (err) {
|
|
578
|
-
_iterator8.e(err);
|
|
579
|
-
} finally {
|
|
580
|
-
_iterator8.f();
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
584
|
-
var _iterator11 = _createForOfIteratorHelper(addons.value),
|
|
585
|
-
_step11;
|
|
586
|
-
try {
|
|
587
|
-
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
588
|
-
var _item2$_extend$other;
|
|
589
|
-
var _item2 = _step11.value;
|
|
590
|
-
// 清除主商品税费字段
|
|
591
|
-
_item2._extend.tax_fee = 0;
|
|
592
|
-
_item2._extend.original_tax_fee = 0;
|
|
593
|
-
_item2._extend.tax_fee_rounding_remainder = undefined;
|
|
594
|
-
_item2._extend.main_product_attached_bundle_tax_fee = 0;
|
|
595
|
-
|
|
596
|
-
// 清除 bundle 子商品税费字段
|
|
597
|
-
var _iterator12 = _createForOfIteratorHelper(((_item2$_extend$other = _item2._extend.other) === null || _item2$_extend$other === void 0 ? void 0 : _item2$_extend$other.bundle) || []),
|
|
598
|
-
_step12;
|
|
599
|
-
try {
|
|
600
|
-
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
601
|
-
var _bundleItem = _step12.value;
|
|
602
|
-
_bundleItem.tax_fee = 0;
|
|
603
|
-
_bundleItem.original_tax_fee = 0;
|
|
604
|
-
_bundleItem.tax_fee_rounding_remainder = undefined;
|
|
605
|
-
}
|
|
606
|
-
} catch (err) {
|
|
607
|
-
_iterator12.e(err);
|
|
608
|
-
} finally {
|
|
609
|
-
_iterator12.f();
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
} catch (err) {
|
|
613
|
-
_iterator11.e(err);
|
|
614
|
-
} finally {
|
|
615
|
-
_iterator11.f();
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
};
|
|
619
|
-
|
|
620
433
|
/**
|
|
621
434
|
* 税费
|
|
622
435
|
* @param state
|
|
@@ -636,9 +449,6 @@ var getTax = function getTax(state, options) {
|
|
|
636
449
|
tax: Number((_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : _state$bookingDetail2.tax_fee) || 0
|
|
637
450
|
};
|
|
638
451
|
}
|
|
639
|
-
|
|
640
|
-
// 清除之前计算的税费数据
|
|
641
|
-
clearTaxFee(state);
|
|
642
452
|
var totalOriginTax = new Decimal(0);
|
|
643
453
|
var totalTax = new Decimal(0);
|
|
644
454
|
if (state !== null && state !== void 0 && state.service || state !== null && state !== void 0 && state.addons) {
|
|
@@ -812,21 +622,21 @@ var getDiscountAmount = function getDiscountAmount(discounts) {
|
|
|
812
622
|
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
813
623
|
*/
|
|
814
624
|
var getMainProductTotal = function getMainProductTotal(item) {
|
|
815
|
-
var _ref3, _ref4, _item$_extend$main_pr, _item$_extend3, _item$metadata, _item$_extend$
|
|
625
|
+
var _ref3, _ref4, _item$_extend$main_pr, _item$_extend3, _item$metadata, _item$_extend$other2, _item$_extend$other3, _item$_extend$other5;
|
|
816
626
|
var total = new Decimal((_ref3 = (_ref4 = (_item$_extend$main_pr = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.main_product_selling_price) !== null && _item$_extend$main_pr !== void 0 ? _item$_extend$main_pr : item === null || item === void 0 || (_item$metadata = item.metadata) === null || _item$metadata === void 0 ? void 0 : _item$metadata.main_product_selling_price) !== null && _ref4 !== void 0 ? _ref4 : item._extend.price) !== null && _ref3 !== void 0 ? _ref3 : 0);
|
|
817
627
|
|
|
818
|
-
// 单规格
|
|
819
|
-
if ((_item$_extend$
|
|
820
|
-
var _item$_extend$
|
|
821
|
-
total = total.add((_item$_extend$
|
|
628
|
+
// 单规格
|
|
629
|
+
if ((_item$_extend$other2 = item._extend.other) !== null && _item$_extend$other2 !== void 0 && _item$_extend$other2.option && Array.isArray((_item$_extend$other3 = item._extend.other) === null || _item$_extend$other3 === void 0 ? void 0 : _item$_extend$other3.option)) {
|
|
630
|
+
var _item$_extend$other4;
|
|
631
|
+
total = total.add((_item$_extend$other4 = item._extend.other) === null || _item$_extend$other4 === void 0 ? void 0 : _item$_extend$other4.option.reduce(function (t, option) {
|
|
822
632
|
return t.add(new Decimal(option.price || 0).mul(option.num || 1));
|
|
823
633
|
}, new Decimal(0)));
|
|
824
634
|
}
|
|
825
|
-
var
|
|
826
|
-
|
|
635
|
+
var _iterator8 = _createForOfIteratorHelper(((_item$_extend$other5 = item._extend.other) === null || _item$_extend$other5 === void 0 ? void 0 : _item$_extend$other5.bundle) || []),
|
|
636
|
+
_step8;
|
|
827
637
|
try {
|
|
828
|
-
for (
|
|
829
|
-
var bundleItem =
|
|
638
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
639
|
+
var bundleItem = _step8.value;
|
|
830
640
|
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
831
641
|
var _ref5, _bundleItem$bundle_se2;
|
|
832
642
|
// 子商品折扣金额
|
|
@@ -834,14 +644,14 @@ var getMainProductTotal = function getMainProductTotal(item) {
|
|
|
834
644
|
// 子商品价格
|
|
835
645
|
var bundleItemPrice = new Decimal((_ref5 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
836
646
|
// todo: 套餐子商品后不需要处理 子商品价格 - 子商品折扣金额
|
|
837
|
-
var bundleItemTotal = bundleItemPrice;
|
|
647
|
+
var bundleItemTotal = bundleItemPrice.minus(discountAmount);
|
|
838
648
|
total = total.add(bundleItemTotal);
|
|
839
649
|
}
|
|
840
650
|
}
|
|
841
651
|
} catch (err) {
|
|
842
|
-
|
|
652
|
+
_iterator8.e(err);
|
|
843
653
|
} finally {
|
|
844
|
-
|
|
654
|
+
_iterator8.f();
|
|
845
655
|
}
|
|
846
656
|
return total.toNumber();
|
|
847
657
|
};
|
|
@@ -853,74 +663,74 @@ var clearSurchargeFee = function clearSurchargeFee(state) {
|
|
|
853
663
|
var service = state.service,
|
|
854
664
|
addons = state.addons;
|
|
855
665
|
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
856
|
-
var
|
|
857
|
-
|
|
666
|
+
var _iterator9 = _createForOfIteratorHelper(service.value),
|
|
667
|
+
_step9;
|
|
858
668
|
try {
|
|
859
|
-
for (
|
|
860
|
-
var _item$_extend$
|
|
861
|
-
var item =
|
|
669
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
670
|
+
var _item$_extend$other6;
|
|
671
|
+
var item = _step9.value;
|
|
862
672
|
item._extend.surcharge_fee = 0;
|
|
863
673
|
item._extend.relation_surcharge_ids = [];
|
|
864
|
-
var
|
|
865
|
-
|
|
674
|
+
var _iterator10 = _createForOfIteratorHelper(((_item$_extend$other6 = item._extend.other) === null || _item$_extend$other6 === void 0 ? void 0 : _item$_extend$other6.bundle) || []),
|
|
675
|
+
_step10;
|
|
866
676
|
try {
|
|
867
|
-
for (
|
|
868
|
-
var bundleItem =
|
|
677
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
678
|
+
var bundleItem = _step10.value;
|
|
869
679
|
bundleItem.surcharge_fee = 0;
|
|
870
680
|
bundleItem.relation_surcharge_ids = [];
|
|
871
681
|
}
|
|
872
682
|
} catch (err) {
|
|
873
|
-
|
|
683
|
+
_iterator10.e(err);
|
|
874
684
|
} finally {
|
|
875
|
-
|
|
685
|
+
_iterator10.f();
|
|
876
686
|
}
|
|
877
|
-
var
|
|
878
|
-
|
|
687
|
+
var _iterator11 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
688
|
+
_step11;
|
|
879
689
|
try {
|
|
880
|
-
for (
|
|
881
|
-
var relationDetail =
|
|
690
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
691
|
+
var relationDetail = _step11.value;
|
|
882
692
|
relationDetail.surcharge_fee = 0;
|
|
883
693
|
relationDetail.relation_surcharge_ids = [];
|
|
884
694
|
}
|
|
885
695
|
} catch (err) {
|
|
886
|
-
|
|
696
|
+
_iterator11.e(err);
|
|
887
697
|
} finally {
|
|
888
|
-
|
|
698
|
+
_iterator11.f();
|
|
889
699
|
}
|
|
890
700
|
}
|
|
891
701
|
} catch (err) {
|
|
892
|
-
|
|
702
|
+
_iterator9.e(err);
|
|
893
703
|
} finally {
|
|
894
|
-
|
|
704
|
+
_iterator9.f();
|
|
895
705
|
}
|
|
896
706
|
}
|
|
897
707
|
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
898
|
-
var
|
|
899
|
-
|
|
708
|
+
var _iterator12 = _createForOfIteratorHelper(addons.value),
|
|
709
|
+
_step12;
|
|
900
710
|
try {
|
|
901
|
-
for (
|
|
902
|
-
var
|
|
903
|
-
var
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
var
|
|
907
|
-
|
|
711
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
712
|
+
var _item2$_extend$other;
|
|
713
|
+
var _item2 = _step12.value;
|
|
714
|
+
_item2._extend.surcharge_fee = 0;
|
|
715
|
+
_item2._extend.relation_surcharge_ids = [];
|
|
716
|
+
var _iterator13 = _createForOfIteratorHelper(((_item2$_extend$other = _item2._extend.other) === null || _item2$_extend$other === void 0 ? void 0 : _item2$_extend$other.bundle) || []),
|
|
717
|
+
_step13;
|
|
908
718
|
try {
|
|
909
|
-
for (
|
|
910
|
-
var
|
|
911
|
-
|
|
912
|
-
|
|
719
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
720
|
+
var _bundleItem = _step13.value;
|
|
721
|
+
_bundleItem.surcharge_fee = 0;
|
|
722
|
+
_bundleItem.relation_surcharge_ids = [];
|
|
913
723
|
}
|
|
914
724
|
} catch (err) {
|
|
915
|
-
|
|
725
|
+
_iterator13.e(err);
|
|
916
726
|
} finally {
|
|
917
|
-
|
|
727
|
+
_iterator13.f();
|
|
918
728
|
}
|
|
919
729
|
}
|
|
920
730
|
} catch (err) {
|
|
921
|
-
|
|
731
|
+
_iterator12.e(err);
|
|
922
732
|
} finally {
|
|
923
|
-
|
|
733
|
+
_iterator12.f();
|
|
924
734
|
}
|
|
925
735
|
}
|
|
926
736
|
};
|
|
@@ -990,12 +800,12 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
990
800
|
|
|
991
801
|
// 检查service中符合条件的商品
|
|
992
802
|
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
993
|
-
var
|
|
994
|
-
|
|
803
|
+
var _iterator14 = _createForOfIteratorHelper(service.value),
|
|
804
|
+
_step14;
|
|
995
805
|
try {
|
|
996
|
-
for (
|
|
997
|
-
var _item$_extend$
|
|
998
|
-
var item =
|
|
806
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
807
|
+
var _item$_extend$other7;
|
|
808
|
+
var item = _step14.value;
|
|
999
809
|
// 主商品符合附加费条件
|
|
1000
810
|
if (isProductMatchSurchargeCondition({
|
|
1001
811
|
isCustomItem: item.isCustomItem,
|
|
@@ -1021,11 +831,11 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1021
831
|
});
|
|
1022
832
|
}
|
|
1023
833
|
// 遍历子商品 原价商品符合附加费条件
|
|
1024
|
-
var
|
|
1025
|
-
|
|
834
|
+
var _iterator15 = _createForOfIteratorHelper(((_item$_extend$other7 = item._extend.other) === null || _item$_extend$other7 === void 0 ? void 0 : _item$_extend$other7.bundle) || []),
|
|
835
|
+
_step15;
|
|
1026
836
|
try {
|
|
1027
|
-
for (
|
|
1028
|
-
var bundleItem =
|
|
837
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
838
|
+
var bundleItem = _step15.value;
|
|
1029
839
|
// bundle商品是原价且符合附加费条件
|
|
1030
840
|
if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition({
|
|
1031
841
|
isCustomItem: false,
|
|
@@ -1050,15 +860,15 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1050
860
|
|
|
1051
861
|
// 加时商品符合附加费条件
|
|
1052
862
|
} catch (err) {
|
|
1053
|
-
|
|
863
|
+
_iterator15.e(err);
|
|
1054
864
|
} finally {
|
|
1055
|
-
|
|
865
|
+
_iterator15.f();
|
|
1056
866
|
}
|
|
1057
|
-
var
|
|
1058
|
-
|
|
867
|
+
var _iterator16 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
868
|
+
_step16;
|
|
1059
869
|
try {
|
|
1060
|
-
for (
|
|
1061
|
-
var relationDetail =
|
|
870
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
871
|
+
var relationDetail = _step16.value;
|
|
1062
872
|
if (isProductMatchSurchargeCondition({
|
|
1063
873
|
isCustomItem: false,
|
|
1064
874
|
startDate: item._extend.startDate,
|
|
@@ -1079,43 +889,43 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1079
889
|
}
|
|
1080
890
|
}
|
|
1081
891
|
} catch (err) {
|
|
1082
|
-
|
|
892
|
+
_iterator16.e(err);
|
|
1083
893
|
} finally {
|
|
1084
|
-
|
|
894
|
+
_iterator16.f();
|
|
1085
895
|
}
|
|
1086
896
|
}
|
|
1087
897
|
} catch (err) {
|
|
1088
|
-
|
|
898
|
+
_iterator14.e(err);
|
|
1089
899
|
} finally {
|
|
1090
|
-
|
|
900
|
+
_iterator14.f();
|
|
1091
901
|
}
|
|
1092
902
|
}
|
|
1093
903
|
|
|
1094
904
|
// 检查addons中符合条件的商品
|
|
1095
905
|
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
1096
|
-
var
|
|
1097
|
-
|
|
906
|
+
var _iterator17 = _createForOfIteratorHelper(addons.value),
|
|
907
|
+
_step17;
|
|
1098
908
|
try {
|
|
1099
|
-
for (
|
|
1100
|
-
var
|
|
1101
|
-
if (isProductMatchSurchargeCondition(
|
|
909
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
910
|
+
var _item3 = _step17.value;
|
|
911
|
+
if (isProductMatchSurchargeCondition(_item3, {
|
|
1102
912
|
surchargeConfig: surchargeConfig,
|
|
1103
913
|
scheduleById: scheduleById || {},
|
|
1104
914
|
ScheduleModule: ScheduleModule
|
|
1105
915
|
})) {
|
|
1106
916
|
matchedItems.push({
|
|
1107
917
|
isMain: true,
|
|
1108
|
-
total: Number(
|
|
1109
|
-
quantity:
|
|
1110
|
-
item:
|
|
918
|
+
total: Number(_item3._extend.total),
|
|
919
|
+
quantity: _item3._extend.quantity || 1,
|
|
920
|
+
item: _item3,
|
|
1111
921
|
mainQuantity: 1 // addons独立商品,mainQuantity为1
|
|
1112
922
|
});
|
|
1113
923
|
}
|
|
1114
924
|
}
|
|
1115
925
|
} catch (err) {
|
|
1116
|
-
|
|
926
|
+
_iterator17.e(err);
|
|
1117
927
|
} finally {
|
|
1118
|
-
|
|
928
|
+
_iterator17.f();
|
|
1119
929
|
}
|
|
1120
930
|
}
|
|
1121
931
|
var finalAmount = 0;
|
|
@@ -1149,18 +959,18 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1149
959
|
// 计算百分比附加费 - 对每个商品单独计算
|
|
1150
960
|
if (percentage && new Decimal(percentage).gt(0) || fixed) {
|
|
1151
961
|
var percentageRate = new Decimal(percentage);
|
|
1152
|
-
var
|
|
1153
|
-
|
|
962
|
+
var _iterator18 = _createForOfIteratorHelper(matchedItems.entries()),
|
|
963
|
+
_step18;
|
|
1154
964
|
try {
|
|
1155
|
-
for (
|
|
1156
|
-
var
|
|
1157
|
-
index =
|
|
1158
|
-
|
|
965
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
966
|
+
var _step18$value = _slicedToArray(_step18.value, 2),
|
|
967
|
+
index = _step18$value[0],
|
|
968
|
+
_item4 = _step18$value[1];
|
|
1159
969
|
var isLast = index === matchedItems.length - 1;
|
|
1160
970
|
// 对每个商品:max(0, 价格) * 数量 * 费率
|
|
1161
|
-
var itemPrice = new Decimal(Math.max(0,
|
|
1162
|
-
var itemQuantity = new Decimal(
|
|
1163
|
-
var addTimeTotal = new Decimal(
|
|
971
|
+
var itemPrice = new Decimal(Math.max(0, _item4.total || 0));
|
|
972
|
+
var itemQuantity = new Decimal(_item4.isMain ? _item4.quantity || 1 : _item4.quantity * _item4.mainQuantity || 1);
|
|
973
|
+
var addTimeTotal = new Decimal(_item4.addTimeTotal || 0);
|
|
1164
974
|
// 单个商品总附加费
|
|
1165
975
|
var itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
|
|
1166
976
|
configTotal = configTotal.plus(itemTotalSurcharge);
|
|
@@ -1169,11 +979,8 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1169
979
|
var itemSurcharge = itemPrice.times(percentageRate);
|
|
1170
980
|
|
|
1171
981
|
// 固定附加费 = 1 / 商品数量 * 固定附加费(向下取整保留两位小数)
|
|
1172
|
-
// 固定附加费的平摊计算逻辑
|
|
1173
|
-
// 一个商品内,不管他本身有多少数量 以及他 bundle 有多少,都应该累加成为一个数量总数
|
|
1174
|
-
// 以这个总数为基础去平摊每个商品应该占这一笔固定附加费的多少
|
|
1175
982
|
var fixedSurcharge = new Decimal(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
|
|
1176
|
-
var quantity =
|
|
983
|
+
var quantity = _item4.isMain ? _item4.quantity : _item4.quantity * _item4.mainQuantity;
|
|
1177
984
|
fixedTotal = fixedTotal.plus(new Decimal(fixedSurcharge).times(quantity).toNumber());
|
|
1178
985
|
|
|
1179
986
|
// 如果是最后一个商品 判断fixed - fixedTotal 是否有剩余小数 如果有的话,追加抹平字段
|
|
@@ -1181,53 +988,53 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
1181
988
|
var remaining = new Decimal(fixed).minus(fixedTotal).toNumber();
|
|
1182
989
|
if (remaining > 0) {
|
|
1183
990
|
productTotalSurcharge = productTotalSurcharge.plus(remaining);
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
991
|
+
if (_item4.isMain) {
|
|
992
|
+
_item4.item._extend.surcharge_rounding_remainder = remaining;
|
|
1186
993
|
} else {
|
|
1187
|
-
|
|
994
|
+
_item4.item.surcharge_rounding_remainder = remaining;
|
|
1188
995
|
}
|
|
1189
996
|
}
|
|
1190
997
|
}
|
|
1191
998
|
// 只有当 open_product !== 0 时,才将附加费追加到商品身上
|
|
1192
999
|
// open_product === 0 表示商品未开启该附加费,只在订单级别累加
|
|
1193
1000
|
if (open_product !== 0) {
|
|
1194
|
-
if (
|
|
1195
|
-
var
|
|
1196
|
-
var originSurchargeFee = new Decimal(
|
|
1001
|
+
if (_item4.isMain) {
|
|
1002
|
+
var _item4$item$_extend;
|
|
1003
|
+
var originSurchargeFee = new Decimal(_item4.item._extend.surcharge_fee || 0);
|
|
1197
1004
|
// 保留两位小数
|
|
1198
1005
|
var surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
1199
1006
|
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(surchargeFee).times(itemQuantity).toNumber());
|
|
1200
|
-
|
|
1201
|
-
|
|
1007
|
+
_item4.item._extend.surcharge_fee = surchargeFee;
|
|
1008
|
+
_item4.item._extend.relation_surcharge_ids = [].concat(_toConsumableArray(((_item4$item$_extend = _item4.item._extend) === null || _item4$item$_extend === void 0 ? void 0 : _item4$item$_extend.relation_surcharge_ids) || []), [id]);
|
|
1202
1009
|
} else {
|
|
1203
|
-
var
|
|
1204
|
-
var _originSurchargeFee = new Decimal(
|
|
1010
|
+
var _item4$item;
|
|
1011
|
+
var _originSurchargeFee = new Decimal(_item4.item.surcharge_fee || 0);
|
|
1205
1012
|
// 保留两位小数
|
|
1206
1013
|
var _surchargeFee = _originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
1207
1014
|
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(_surchargeFee).times(itemQuantity).toNumber());
|
|
1208
|
-
|
|
1209
|
-
|
|
1015
|
+
_item4.item.surcharge_fee = _surchargeFee;
|
|
1016
|
+
_item4.item.relation_surcharge_ids = [].concat(_toConsumableArray(((_item4$item = _item4.item) === null || _item4$item === void 0 ? void 0 : _item4$item.relation_surcharge_ids) || []), [id]);
|
|
1210
1017
|
}
|
|
1211
1018
|
}
|
|
1212
1019
|
// 最后一个商品 判断configTotal - productTotalSurcharge 是否有剩余小数 如果有的话,追加抹平字段
|
|
1213
1020
|
if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
|
|
1214
1021
|
// 四舍五入configTotal
|
|
1215
1022
|
var configTotalRounded = configTotal.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
1216
|
-
if (
|
|
1217
|
-
var newRoundingRemainder = new Decimal(
|
|
1023
|
+
if (_item4.isMain) {
|
|
1024
|
+
var newRoundingRemainder = new Decimal(_item4.item._extend.surcharge_rounding_remainder || 0);
|
|
1218
1025
|
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
1219
|
-
|
|
1026
|
+
_item4.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
1220
1027
|
} else {
|
|
1221
|
-
var _newRoundingRemainder = new Decimal(
|
|
1028
|
+
var _newRoundingRemainder = new Decimal(_item4.item.surcharge_rounding_remainder || 0);
|
|
1222
1029
|
_newRoundingRemainder = _newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
1223
|
-
|
|
1030
|
+
_item4.item.surcharge_rounding_remainder = _newRoundingRemainder.toNumber();
|
|
1224
1031
|
}
|
|
1225
1032
|
}
|
|
1226
1033
|
}
|
|
1227
1034
|
} catch (err) {
|
|
1228
|
-
|
|
1035
|
+
_iterator18.e(err);
|
|
1229
1036
|
} finally {
|
|
1230
|
-
|
|
1037
|
+
_iterator18.f();
|
|
1231
1038
|
}
|
|
1232
1039
|
}
|
|
1233
1040
|
|