@pisell/private-materials 6.9.2 → 6.9.3
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 +5 -1
- 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 +150 -164
- 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 +20 -3
- package/es/components/Sales/Cart/utils.d.ts +5 -0
- package/es/components/Sales/Cart/utils.js +16 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/Sales/Summary/utils.js +5 -4
- package/es/components/appointmentBooking/components/Header/index.js +12 -12
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +2 -0
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +82 -0
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +46 -5
- package/es/components/appointmentBooking/components/Voucher/index.js +26 -5
- package/es/components/appointmentBooking/hooks.d.ts +1 -1
- package/es/components/appointmentBooking/hooks.js +6 -13
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +3 -0
- package/es/components/appointmentBooking/utils.d.ts +23 -0
- package/es/components/appointmentBooking/utils.js +159 -0
- package/es/components/booking/addons/index.js +3 -2
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/actionButtons/index.js +10 -0
- package/es/components/booking/components/customiseItemModal/index.js +4 -7
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +358 -165
- package/es/components/booking/components/footer/index.js +496 -170
- package/es/components/booking/components/footer/utils.d.ts +1 -1
- package/es/components/booking/components/footer/utils.js +134 -78
- package/es/components/booking/components/voucher/index.js +15 -6
- package/es/components/booking/components/voucher/index.less +4 -1
- package/es/components/booking/components/voucherModal/index.less +1 -0
- package/es/components/booking/dashboard/index.js +78 -92
- package/es/components/booking/dashboard/serve.d.ts +1 -0
- package/es/components/booking/dashboard/serve.js +22 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.js +32 -10
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/client/index.js +16 -6
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- 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/index.d.ts +1 -0
- 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 +45 -41
- package/es/components/booking/info2/cartClientCard/index.js +16 -10
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/editNormalService/index.js +21 -18
- package/es/components/booking/info2/service/editService/index.js +33 -2
- package/es/components/booking/info2/service/editService/utils.js +9 -5
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- 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/utils.js +4 -4
- package/es/components/checkout/PaymentModal.d.ts +1 -0
- package/es/components/checkout/PaymentModal.js +172 -65
- package/es/components/checkout/components/PaymentDetailModal/index.less +426 -429
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +1 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +3 -2
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +0 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +2 -0
- package/es/components/checkout/components/WalletPassModule/index.js +1 -0
- package/es/components/checkout/components/WalletPassModule/utils.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/utils.js +17 -3
- package/es/components/checkout/hooks/useWalletPass.d.ts +2 -2
- package/es/components/checkout/hooks/useWalletPass.js +324 -198
- package/es/components/checkout/index.less +6 -0
- package/es/components/checkout/plugin.js +59 -12
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
- package/es/components/ecocup/components/AddCustomerModal/index.js +216 -0
- package/es/components/ecocup/components/AddCustomerModal/index.less +9 -0
- package/es/components/ecocup/components/CupActionList/index.d.ts +13 -0
- package/es/components/ecocup/components/CupActionList/index.js +91 -0
- package/es/components/ecocup/components/CupActionList/index.less +102 -0
- package/es/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupActionModal/hooks.js +68 -0
- package/es/components/ecocup/components/CupActionModal/index.d.ts +14 -0
- package/es/components/ecocup/components/CupActionModal/index.js +92 -0
- package/es/components/ecocup/components/CupActionModal/index.less +38 -0
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +8 -0
- package/es/components/ecocup/components/CupInfoCard/index.js +12 -0
- package/es/components/ecocup/components/CupInfoCard/index.less +11 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.js +68 -0
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
- package/es/components/ecocup/components/CupStatusModal/index.js +147 -0
- package/es/components/ecocup/components/CupStatusModal/index.less +35 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.js +133 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.js +227 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
- package/es/components/ecocup/components/CustomerCard/index.d.ts +7 -0
- package/es/components/ecocup/components/CustomerCard/index.js +34 -0
- package/es/components/ecocup/components/CustomerCard/index.less +50 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
- package/es/components/ecocup/components/MoreDropdown/index.js +33 -0
- package/es/components/ecocup/components/PageHeader/index.d.ts +6 -0
- package/es/components/ecocup/components/PageHeader/index.js +37 -0
- package/es/components/ecocup/components/PageHeader/index.less +19 -0
- package/es/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/es/components/ecocup/components/SearchBar/const.js +16 -0
- package/es/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
- package/es/components/ecocup/components/SearchBar/hooks.js +184 -0
- package/es/components/ecocup/components/SearchBar/index.d.ts +12 -0
- package/es/components/ecocup/components/SearchBar/index.js +218 -0
- package/es/components/ecocup/components/SearchBar/index.less +88 -0
- package/es/components/ecocup/cupList/const.d.ts +133 -0
- package/es/components/ecocup/cupList/const.js +306 -0
- package/es/components/ecocup/cupList/hooks/index.d.ts +4 -0
- package/es/components/ecocup/cupList/hooks/index.js +4 -0
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
- package/es/components/ecocup/cupList/hooks/useColumns.js +168 -0
- package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
- package/es/{plus/myTeamLogin/index.js → components/ecocup/cupList/hooks/useCupApi.js} +129 -259
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
- package/es/components/ecocup/cupList/hooks/useSummary.js +40 -0
- package/es/components/ecocup/cupList/index.d.ts +6 -0
- package/es/components/ecocup/cupList/index.js +220 -0
- package/es/components/ecocup/cupList/index.less +113 -0
- package/es/components/ecocup/cupProject/const.d.ts +7 -0
- package/es/components/ecocup/cupProject/const.js +27 -0
- package/es/components/ecocup/cupProject/index.d.ts +3 -0
- package/es/components/ecocup/cupProject/index.js +103 -0
- package/es/components/ecocup/cupProject/index.less +41 -0
- package/es/components/ecocup/customerList/const.d.ts +44 -0
- package/es/components/ecocup/customerList/const.js +67 -0
- package/es/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/es/components/ecocup/customerList/hooks/index.js +3 -0
- package/es/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useColumns.js +44 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.js +70 -0
- package/es/components/ecocup/customerList/index.d.ts +7 -0
- package/es/components/ecocup/customerList/index.js +127 -0
- package/es/components/ecocup/customerList/index.less +15 -0
- package/es/components/ecocup/hooks.d.ts +49 -0
- package/es/components/ecocup/hooks.js +151 -0
- package/es/components/ecocup/locales.d.ts +339 -0
- package/es/components/ecocup/locales.js +372 -0
- package/es/components/ecocup/types.d.ts +103 -0
- package/es/components/ecocup/types.js +36 -0
- package/es/components/ecocup/utils/scanListener.d.ts +20 -0
- package/es/components/ecocup/utils/scanListener.js +107 -0
- package/es/components/eftposPay/EFTPos.js +15 -6
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +120 -0
- package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
- package/es/components/eftposPay/aggregatePayment/index.js +3 -0
- package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
- package/es/components/eftposPay/aggregatePayment/service.js +69 -0
- package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
- package/es/components/eftposPay/aggregatePayment/types.js +65 -0
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
- package/es/components/eftposPay/aggregatePayment/utils/logs.js +371 -0
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +1138 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/app.js +5 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.js +16 -12
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.js +12 -5
- package/es/components/eftposPay/const.d.ts +6 -1
- package/es/components/eftposPay/const.js +3 -0
- package/es/components/eftposPay/hooks.d.ts +3 -2
- package/es/components/eftposPay/hooks.js +12 -0
- package/es/components/eftposPay/huifu/Action.d.ts +8 -0
- package/es/components/eftposPay/huifu/Action.js +146 -0
- package/es/components/eftposPay/huifu/const.d.ts +5 -0
- package/es/components/eftposPay/huifu/const.js +70 -0
- package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/es/components/eftposPay/huifu/hooks.js +184 -0
- package/es/components/eftposPay/huifu/index.d.ts +5 -0
- package/es/components/eftposPay/huifu/index.js +196 -0
- package/es/components/eftposPay/huifu/index.less +180 -0
- package/es/components/eftposPay/huifu/types.d.ts +14 -0
- package/es/components/eftposPay/huifu/types.js +1 -0
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/index.js +5 -1
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/locales.d.ts +36 -0
- package/es/components/eftposPay/locales.js +42 -3
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +5 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/store/index.d.ts +9 -2
- package/es/components/eftposPay/tyro/index.js +97 -4
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/Voucher/components/Voucher.d.ts +20 -0
- package/es/components/eventBooking/components/Voucher/components/Voucher.js +99 -0
- package/es/components/eventBooking/components/Voucher/components/index.less +124 -0
- package/es/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
- package/es/components/eventBooking/components/Voucher/components/locales.js +38 -0
- package/es/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
- package/es/components/eventBooking/components/Voucher/hooks.js +212 -0
- package/es/components/eventBooking/components/Voucher/index.d.ts +2 -0
- package/es/components/eventBooking/components/Voucher/index.js +266 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/kioskSkuDetail/index.d.ts +3 -0
- package/es/components/kioskSkuDetail/index.js +268 -173
- package/es/components/kioskSkuDetail/index.less +49 -7
- package/es/components/kioskSkuDetail/locales.d.ts +6 -0
- package/es/components/kioskSkuDetail/locales.js +9 -3
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +8 -1
- package/es/components/pay/toB/components/MX51/index.js +2 -1
- package/es/components/pay/toB/paymentMethods/index.js +2 -1
- package/es/components/pay/toB/types/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/index.js +54 -5
- package/es/components/pay/toC/PaymentList/index.less +58 -1
- 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/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/serve.js +22 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +26 -0
- package/es/components/pay/toC/PaymentList/utils.js +188 -6
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -3
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +139 -42
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +166 -145
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/es/components/pay/toC/index.js +68 -28
- package/es/components/pay/toC/locales.d.ts +6 -0
- package/es/components/pay/toC/locales.js +9 -3
- package/es/components/pay/toC/model.d.ts +1 -0
- package/es/components/pay/toC/serve.d.ts +18 -0
- package/es/components/pay/toC/serve.js +29 -1
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +4 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/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/ruleSetting/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.js +1 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/systemSettings/registry/components/SectionList.js +5 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +5 -8
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +142 -63
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +2 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +18 -4
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +3 -0
- package/es/components/ticketBooking/context/OsKeyContext.js +12 -2
- 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 +14 -11
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +69 -10
- package/es/components/ticketBooking/index.d.ts +2 -0
- package/es/components/ticketBooking/index.js +2 -1
- package/es/components/walletList/index.js +7 -2
- package/es/index.d.ts +7 -4
- package/es/index.js +7 -4
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/clinetSearch/index.d.ts +1 -0
- package/es/plus/clinetSearch/index.js +27 -5
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +6 -3
- package/es/plus/clinetSearch/types.d.ts +9 -0
- package/es/plus/orderList/components/BatchActionBar.d.ts +9 -0
- package/es/plus/orderList/components/BatchActionBar.js +861 -0
- package/es/plus/orderList/components/FilterList.d.ts +8 -0
- package/es/plus/orderList/components/FilterList.js +78 -0
- package/es/plus/orderList/components/HandleActions.d.ts +4 -0
- package/es/plus/orderList/components/HandleActions.js +24 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +4 -0
- package/es/plus/orderList/components/QuickFilter.js +14 -0
- package/es/plus/orderList/components/Reset.d.ts +6 -0
- package/es/plus/orderList/components/Reset.js +23 -0
- package/es/plus/orderList/components/Toolbar.d.ts +5 -0
- package/es/plus/orderList/components/Toolbar.js +57 -0
- package/es/plus/orderList/config.d.ts +152 -0
- package/es/plus/orderList/config.js +785 -0
- package/es/plus/orderList/index.d.ts +9 -0
- package/es/plus/orderList/index.js +128 -0
- package/es/plus/orderList/index.less +125 -0
- package/es/plus/orderList/locales.d.ts +372 -0
- package/es/plus/orderList/locales.js +459 -0
- package/es/plus/orderList/serve.d.ts +42 -0
- package/es/plus/orderList/serve.js +351 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/index.js +12 -3
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +6 -4
- package/es/plus/productSelect/ProductList/gridComponents.js +30 -10
- package/es/plus/productSelect/index.d.ts +3 -1
- package/es/plus/productSelect/index.js +85 -14
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.js +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
- package/es/plus/skuOptionsSelection/locales.d.ts +3 -0
- package/es/plus/skuOptionsSelection/locales.js +3 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +11 -2
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +10 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +1 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +2 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +10 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +6 -5
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +9 -3
- package/es/plus/walletPassGallery/index.js +2 -2
- package/es/plus/walletPassGallery/index.less +1 -1
- package/es/plus/walletPassGallery/serve.d.ts +8 -0
- package/es/plus/walletPassGallery/serve.js +78 -50
- package/es/plus/webPosLogin/WebPosLogin.d.ts +2 -2
- package/es/plus/webPosLogin/WebPosLogin.js +7 -2
- package/es/plus/webPosLogin/components/MediaDisplay/index.js +5 -5
- package/es/plus/webPosLogin/components/MediaDisplay/index.less +10 -6
- package/es/plus/webPosLogin/service.js +2 -1
- package/es/pro/Login2.0/AuthModal.js +12 -4
- package/es/pro/Login2.0/Login2.js +7 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +36 -3
- package/es/pro/Login2.0/index.less +15 -3
- package/es/pro/Login2.0/steps/CodeInput.js +37 -7
- package/es/pro/NumericStepper/index.d.ts +27 -1
- package/es/pro/NumericStepper/index.js +84 -68
- package/es/pro/NumericStepper/index.less +261 -136
- package/es/pro/Selector/Selector.js +17 -10
- package/es/pro/Selector/demo.d.ts +1 -0
- package/es/pro/Selector/hooks/usePresetItemProps.js +2 -0
- package/es/pro/Selector/hooks/usePresetProps.js +4 -2
- package/es/pro/Selector/types.d.ts +1 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/keyboards/index.d.ts +2 -0
- package/es/pro/keyboards/index.js +1 -0
- package/es/pro/keyboards/locales.d.ts +24 -0
- package/es/pro/keyboards/locales.js +35 -0
- package/es/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/es/pro/keyboards/numberKeyboard/index.js +523 -0
- package/es/pro/keyboards/numberKeyboard/index.less +59 -0
- package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/es/pro/keyboards/numberKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +2 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +2 -1
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +6 -3
- package/es/pro/skuDetailModal/index.js +57 -55
- package/es/pro/skuDetailModal/index.less +46 -4
- package/es/pro/skuDetailModal/types.d.ts +7 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/Sales/Cart/index.js +25 -7
- package/lib/components/Sales/Cart/utils.d.ts +5 -0
- package/lib/components/Sales/Cart/utils.js +13 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/Sales/Summary/utils.js +2 -4
- package/lib/components/appointmentBooking/components/Header/index.js +3 -8
- package/lib/components/appointmentBooking/components/Services/index.js +5 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +2 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +89 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +27 -7
- package/lib/components/appointmentBooking/components/Voucher/index.js +37 -6
- package/lib/components/appointmentBooking/hooks.d.ts +1 -1
- package/lib/components/appointmentBooking/hooks.js +6 -11
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/appointmentBooking/utils.d.ts +23 -0
- package/lib/components/appointmentBooking/utils.js +103 -0
- package/lib/components/booking/addons/index.js +3 -2
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/actionButtons/index.js +10 -0
- package/lib/components/booking/components/customiseItemModal/index.js +4 -5
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +122 -25
- package/lib/components/booking/components/footer/index.js +243 -5
- package/lib/components/booking/components/footer/utils.d.ts +1 -1
- package/lib/components/booking/components/footer/utils.js +52 -18
- package/lib/components/booking/components/voucher/index.js +18 -4
- package/lib/components/booking/components/voucher/index.less +4 -1
- package/lib/components/booking/components/voucherModal/index.less +1 -0
- package/lib/components/booking/dashboard/index.js +38 -59
- package/lib/components/booking/dashboard/serve.d.ts +1 -0
- package/lib/components/booking/dashboard/serve.js +8 -2
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.js +65 -21
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/client/index.js +16 -8
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- 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/index.d.ts +1 -0
- 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 +6 -2
- package/lib/components/booking/info2/cartClientCard/index.js +17 -11
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +20 -17
- package/lib/components/booking/info2/service/editService/index.js +48 -24
- package/lib/components/booking/info2/service/editService/utils.js +7 -4
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- 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/utils.js +3 -3
- package/lib/components/checkout/PaymentModal.d.ts +1 -0
- package/lib/components/checkout/PaymentModal.js +105 -31
- package/lib/components/checkout/components/PaymentDetailModal/index.less +426 -429
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +1 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -2
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +0 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +2 -0
- package/lib/components/checkout/components/WalletPassModule/index.js +1 -0
- package/lib/components/checkout/components/WalletPassModule/utils.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/utils.js +18 -2
- package/lib/components/checkout/hooks/useWalletPass.d.ts +2 -2
- package/lib/components/checkout/hooks/useWalletPass.js +160 -109
- package/lib/components/checkout/index.less +6 -0
- package/lib/components/checkout/plugin.js +195 -150
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.js +212 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.less +9 -0
- package/lib/components/ecocup/components/CupActionList/index.d.ts +13 -0
- package/lib/components/ecocup/components/CupActionList/index.js +116 -0
- package/lib/components/ecocup/components/CupActionList/index.less +102 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.js +55 -0
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +14 -0
- package/lib/components/ecocup/components/CupActionModal/index.js +125 -0
- package/lib/components/ecocup/components/CupActionModal/index.less +38 -0
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +8 -0
- package/lib/components/ecocup/components/CupInfoCard/index.js +43 -0
- package/lib/components/ecocup/components/CupInfoCard/index.less +11 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.js +55 -0
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
- package/lib/components/ecocup/components/CupStatusModal/index.js +140 -0
- package/lib/components/ecocup/components/CupStatusModal/index.less +35 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.js +89 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.js +178 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +7 -0
- package/lib/components/ecocup/components/CustomerCard/index.js +48 -0
- package/lib/components/ecocup/components/CustomerCard/index.less +50 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
- package/lib/components/ecocup/components/MoreDropdown/index.js +68 -0
- package/lib/components/ecocup/components/PageHeader/index.d.ts +6 -0
- package/lib/components/ecocup/components/PageHeader/index.js +59 -0
- package/lib/components/ecocup/components/PageHeader/index.less +19 -0
- package/lib/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/lib/components/ecocup/components/SearchBar/const.js +50 -0
- package/lib/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
- package/lib/components/ecocup/components/SearchBar/hooks.js +135 -0
- package/lib/components/ecocup/components/SearchBar/index.d.ts +12 -0
- package/lib/components/ecocup/components/SearchBar/index.js +213 -0
- package/lib/components/ecocup/components/SearchBar/index.less +88 -0
- package/lib/components/ecocup/cupList/const.d.ts +133 -0
- package/lib/components/ecocup/cupList/const.js +326 -0
- package/lib/components/ecocup/cupList/hooks/index.d.ts +4 -0
- package/lib/components/ecocup/cupList/hooks/index.js +39 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.js +202 -0
- package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
- package/lib/components/ecocup/cupList/hooks/useCupApi.js +112 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.js +75 -0
- package/lib/components/ecocup/cupList/index.d.ts +6 -0
- package/lib/components/ecocup/cupList/index.js +208 -0
- package/lib/components/ecocup/cupList/index.less +113 -0
- package/lib/components/ecocup/cupProject/const.d.ts +7 -0
- package/lib/components/ecocup/cupProject/const.js +58 -0
- package/lib/components/ecocup/cupProject/index.d.ts +3 -0
- package/lib/components/ecocup/cupProject/index.js +126 -0
- package/lib/components/ecocup/cupProject/index.less +41 -0
- package/lib/components/ecocup/customerList/const.d.ts +44 -0
- package/lib/components/ecocup/customerList/const.js +93 -0
- package/lib/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/lib/components/ecocup/customerList/hooks/index.js +32 -0
- package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useColumns.js +89 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.js +56 -0
- package/lib/components/ecocup/customerList/index.d.ts +7 -0
- package/lib/components/ecocup/customerList/index.js +138 -0
- package/lib/components/ecocup/customerList/index.less +15 -0
- package/lib/components/ecocup/hooks.d.ts +49 -0
- package/lib/components/ecocup/hooks.js +155 -0
- package/lib/components/ecocup/locales.d.ts +339 -0
- package/lib/components/ecocup/locales.js +389 -0
- package/lib/components/ecocup/types.d.ts +103 -0
- package/lib/components/ecocup/types.js +57 -0
- package/lib/components/ecocup/utils/scanListener.d.ts +20 -0
- package/lib/components/ecocup/utils/scanListener.js +90 -0
- package/lib/components/eftposPay/EFTPos.js +11 -7
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +133 -0
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
- package/lib/components/eftposPay/aggregatePayment/index.js +42 -0
- package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
- package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
- package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
- package/lib/components/eftposPay/aggregatePayment/utils/logs.js +294 -0
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +752 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/app.js +5 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.js +4 -1
- package/lib/components/eftposPay/const.d.ts +6 -1
- package/lib/components/eftposPay/const.js +3 -0
- package/lib/components/eftposPay/hooks.d.ts +3 -2
- package/lib/components/eftposPay/hooks.js +16 -0
- package/lib/components/eftposPay/huifu/Action.d.ts +8 -0
- package/lib/components/eftposPay/huifu/Action.js +174 -0
- package/lib/components/eftposPay/huifu/const.d.ts +5 -0
- package/lib/components/eftposPay/huifu/const.js +86 -0
- package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/lib/components/eftposPay/huifu/hooks.js +186 -0
- package/lib/components/eftposPay/huifu/index.d.ts +5 -0
- package/lib/components/eftposPay/huifu/index.js +200 -0
- package/lib/components/eftposPay/huifu/index.less +180 -0
- package/lib/components/eftposPay/huifu/types.d.ts +14 -0
- package/lib/components/eftposPay/huifu/types.js +17 -0
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/index.js +5 -1
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/locales.d.ts +36 -0
- package/lib/components/eftposPay/locales.js +42 -3
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +7 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/pay.js +3 -2
- package/lib/components/eftposPay/store/index.d.ts +9 -2
- package/lib/components/eftposPay/tyro/index.js +64 -7
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Voucher/components/Voucher.d.ts +20 -0
- package/lib/components/eventBooking/components/Voucher/components/Voucher.js +116 -0
- package/lib/components/eventBooking/components/Voucher/components/index.less +124 -0
- package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
- package/lib/components/eventBooking/components/Voucher/components/locales.js +59 -0
- package/lib/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
- package/lib/components/eventBooking/components/Voucher/hooks.js +176 -0
- package/lib/components/eventBooking/components/Voucher/index.d.ts +2 -0
- package/lib/components/eventBooking/components/Voucher/index.js +197 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/kioskSkuDetail/index.d.ts +3 -0
- package/lib/components/kioskSkuDetail/index.js +180 -113
- package/lib/components/kioskSkuDetail/index.less +49 -7
- package/lib/components/kioskSkuDetail/locales.d.ts +6 -0
- package/lib/components/kioskSkuDetail/locales.js +9 -3
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +8 -1
- package/lib/components/pay/toB/components/MX51/index.js +2 -1
- package/lib/components/pay/toB/paymentMethods/index.js +2 -1
- package/lib/components/pay/toB/types/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/index.js +36 -5
- package/lib/components/pay/toC/PaymentList/index.less +58 -1
- 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/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/serve.js +21 -1
- package/lib/components/pay/toC/PaymentList/utils.d.ts +26 -0
- package/lib/components/pay/toC/PaymentList/utils.js +156 -7
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +97 -7
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/lib/components/pay/toC/index.js +53 -11
- package/lib/components/pay/toC/locales.d.ts +6 -0
- package/lib/components/pay/toC/locales.js +9 -3
- package/lib/components/pay/toC/model.d.ts +1 -0
- package/lib/components/pay/toC/serve.d.ts +18 -0
- package/lib/components/pay/toC/serve.js +6 -0
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +4 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.js +1 -1
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/components/SectionList.js +4 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +3 -7
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +46 -16
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +3 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.js +20 -6
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +3 -0
- package/lib/components/ticketBooking/context/OsKeyContext.js +13 -3
- package/lib/components/ticketBooking/context/index.d.ts +1 -1
- package/lib/components/ticketBooking/context/index.js +2 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +1 -1
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +3 -2
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +59 -0
- package/lib/components/ticketBooking/index.d.ts +2 -0
- package/lib/components/ticketBooking/index.js +1 -1
- package/lib/components/walletList/index.js +5 -1
- package/lib/index.d.ts +7 -4
- package/lib/index.js +15 -6
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/index.d.ts +1 -0
- package/lib/plus/clinetSearch/index.js +31 -7
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +6 -3
- package/lib/plus/clinetSearch/types.d.ts +9 -0
- package/lib/plus/orderList/components/BatchActionBar.d.ts +9 -0
- package/lib/plus/orderList/components/BatchActionBar.js +584 -0
- package/lib/plus/orderList/components/FilterList.d.ts +8 -0
- package/lib/plus/orderList/components/FilterList.js +121 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +4 -0
- package/lib/plus/orderList/components/HandleActions.js +52 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +4 -0
- package/lib/plus/orderList/components/QuickFilter.js +43 -0
- package/lib/plus/orderList/components/Reset.d.ts +6 -0
- package/lib/plus/orderList/components/Reset.js +58 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +5 -0
- package/lib/plus/orderList/components/Toolbar.js +68 -0
- package/lib/plus/orderList/config.d.ts +152 -0
- package/lib/plus/orderList/config.js +763 -0
- package/lib/plus/orderList/index.d.ts +9 -0
- package/lib/plus/orderList/index.js +132 -0
- package/lib/plus/orderList/index.less +125 -0
- package/lib/plus/orderList/locales.d.ts +372 -0
- package/lib/plus/orderList/locales.js +471 -0
- package/lib/plus/orderList/serve.d.ts +42 -0
- package/lib/plus/orderList/serve.js +177 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/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/Price/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/index.js +3 -3
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +6 -4
- package/lib/plus/productSelect/ProductList/gridComponents.js +7 -1
- package/lib/plus/productSelect/index.d.ts +3 -1
- package/lib/plus/productSelect/index.js +56 -11
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.js +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +2 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/locales.js +3 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +10 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +10 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +1 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +2 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +10 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +24 -6
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -10
- package/lib/plus/walletPassGallery/index.js +2 -2
- package/lib/plus/walletPassGallery/index.less +1 -1
- package/lib/plus/walletPassGallery/serve.d.ts +8 -0
- package/lib/plus/walletPassGallery/serve.js +23 -8
- package/lib/plus/webPosLogin/WebPosLogin.d.ts +2 -2
- package/lib/plus/webPosLogin/WebPosLogin.js +7 -2
- package/lib/plus/webPosLogin/components/MediaDisplay/index.js +1 -1
- package/lib/plus/webPosLogin/components/MediaDisplay/index.less +10 -6
- package/lib/plus/webPosLogin/service.js +2 -1
- package/lib/pro/Login2.0/AuthModal.js +15 -7
- package/lib/pro/Login2.0/Login2.js +7 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +26 -4
- package/lib/pro/Login2.0/index.less +15 -3
- package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
- package/lib/pro/NumericStepper/index.d.ts +27 -1
- package/lib/pro/NumericStepper/index.js +73 -70
- package/lib/pro/NumericStepper/index.less +261 -136
- package/lib/pro/Selector/Selector.js +11 -4
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.js +2 -0
- package/lib/pro/Selector/hooks/usePresetProps.js +4 -2
- package/lib/pro/Selector/types.d.ts +1 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/keyboards/index.d.ts +2 -0
- package/lib/pro/keyboards/index.js +39 -0
- package/lib/pro/keyboards/locales.d.ts +24 -0
- package/lib/pro/keyboards/locales.js +47 -0
- package/lib/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/lib/pro/keyboards/numberKeyboard/index.js +400 -0
- package/lib/pro/keyboards/numberKeyboard/index.less +59 -0
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/lib/pro/keyboards/numberKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +2 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +2 -1
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +6 -3
- package/lib/pro/skuDetailModal/index.js +114 -64
- package/lib/pro/skuDetailModal/index.less +46 -4
- package/lib/pro/skuDetailModal/types.d.ts +7 -0
- package/lowcode/eco-cup-list/meta.ts +63 -0
- package/lowcode/eco-customer-list/meta.ts +63 -0
- package/lowcode/ecocup-cup-list/meta.ts +38 -0
- package/lowcode/ecocup-cup-project/meta.ts +35 -0
- package/lowcode/ecocup-customer-list/meta.ts +38 -0
- package/lowcode/kiosk-sku-detail/meta.ts +229 -94
- package/lowcode/login2/meta.ts +15 -0
- package/lowcode/order-list/meta.ts +87 -0
- package/package.json +8 -23
- package/es/plus/myTeamLogin/MyTeamLoginCpt.d.ts +0 -9
- package/es/plus/myTeamLogin/MyTeamLoginCpt.js +0 -157
- package/es/plus/myTeamLogin/index.d.ts +0 -11
- package/es/pro/pisellNumberSelector/example.d.ts +0 -3
- package/es/pro/pisellNumberSelector/example.js +0 -68
- package/lib/plus/myTeamLogin/MyTeamLoginCpt.d.ts +0 -9
- package/lib/plus/myTeamLogin/MyTeamLoginCpt.js +0 -156
- package/lib/plus/myTeamLogin/index.d.ts +0 -11
- package/lib/plus/myTeamLogin/index.js +0 -198
- package/lib/pro/pisellNumberSelector/example.d.ts +0 -3
- package/lib/pro/pisellNumberSelector/example.js +0 -93
- package/lowcode/my-team-login/meta.ts +0 -71
|
@@ -1,8 +1,4 @@
|
|
|
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); }
|
|
6
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
3
|
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."); }
|
|
8
4
|
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; } }
|
|
@@ -12,6 +8,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
8
|
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; }
|
|
13
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
10
|
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,6 +20,7 @@ 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";
|
|
23
24
|
export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_details) {
|
|
24
25
|
var total = new Decimal(0);
|
|
25
26
|
var _iterator = _createForOfIteratorHelper(relation_details),
|
|
@@ -38,6 +39,17 @@ export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_d
|
|
|
38
39
|
}
|
|
39
40
|
return total.toNumber();
|
|
40
41
|
};
|
|
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
|
+
|
|
41
53
|
/**
|
|
42
54
|
* 总金额
|
|
43
55
|
* @param state
|
|
@@ -68,6 +80,9 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
68
80
|
var itemOriginTotal = new Decimal(item._extend.origin_total || 0);
|
|
69
81
|
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
70
82
|
|
|
83
|
+
// 商品折扣差价
|
|
84
|
+
price = price.sub(getProductDiscountProductDiscountDifference(item));
|
|
85
|
+
|
|
71
86
|
// 普通商品不能加到时长上
|
|
72
87
|
var _duration = !isNormalProductByDurationSchedule(item) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
|
|
73
88
|
if (isDay || isMultiDayProduct(item)) {
|
|
@@ -84,6 +99,9 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
84
99
|
// 附加商品
|
|
85
100
|
var relationTotal = new Decimal(getRelationDetailsTotal(item._extend.relation_details || []));
|
|
86
101
|
price = price.add(relationTotal);
|
|
102
|
+
|
|
103
|
+
// 商品折扣差价
|
|
104
|
+
price = price.sub(getProductDiscountProductDiscountDifference(item));
|
|
87
105
|
var itemDuration = new Decimal(flexibleObj.getValue(item._extend.duration) || 0);
|
|
88
106
|
duration = duration.add(itemDuration);
|
|
89
107
|
if (isMultiDayProduct(item)) {
|
|
@@ -146,6 +164,14 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
146
164
|
duration: getDiscountTimeByDayMinutes(dayDuration.toNumber(), minuteDuration.toNumber())
|
|
147
165
|
};
|
|
148
166
|
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* 计算单个商品的税费(返回精确值,不四舍五入)
|
|
170
|
+
* @param item 商品信息
|
|
171
|
+
* @param state 状态
|
|
172
|
+
* @param options 选项
|
|
173
|
+
* @returns 精确的税费值(Decimal类型)
|
|
174
|
+
*/
|
|
149
175
|
var getProductItemTax = function getProductItemTax(item, state, options) {
|
|
150
176
|
var _bookingDetail$tax_ra, _ref, _bookingDetail$is_pri;
|
|
151
177
|
var bookingDetail = state.bookingDetail;
|
|
@@ -191,8 +217,8 @@ var getProductItemTax = function getProductItemTax(item, state, options) {
|
|
|
191
217
|
}
|
|
192
218
|
}
|
|
193
219
|
|
|
194
|
-
// 结果 = 单个商品税费 ×
|
|
195
|
-
return singleItemTax.times(quantity)
|
|
220
|
+
// 结果 = 单个商品税费 × 数量(返回精确值,不四舍五入)
|
|
221
|
+
return singleItemTax.times(quantity);
|
|
196
222
|
};
|
|
197
223
|
|
|
198
224
|
/**
|
|
@@ -242,6 +268,7 @@ var getProductSurchargeFee = function getProductSurchargeFee(product) {
|
|
|
242
268
|
|
|
243
269
|
/**
|
|
244
270
|
* 处理商品税费计算(折扣前后)
|
|
271
|
+
* 支持税费舍入差值追加到最后一个含税商品的 tax_fee_rounding_remainder / original_tax_fee_rounding_remainder 字段
|
|
245
272
|
* @param items 商品数组
|
|
246
273
|
* @param state 状态
|
|
247
274
|
* @param options 选项
|
|
@@ -254,8 +281,19 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
254
281
|
computed = options.computed;
|
|
255
282
|
var shopDiscount = computed.shopDiscount,
|
|
256
283
|
productExpectAmount = computed.productExpectAmount;
|
|
257
|
-
|
|
258
|
-
|
|
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;
|
|
259
297
|
var _iterator5 = _createForOfIteratorHelper(items),
|
|
260
298
|
_step5;
|
|
261
299
|
try {
|
|
@@ -266,10 +304,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
266
304
|
var unitPrice = new Decimal(item._extend.total || 0);
|
|
267
305
|
var mainProductPrice = new Decimal(getMainProductTotal(item) || 0);
|
|
268
306
|
|
|
269
|
-
//
|
|
270
|
-
|
|
271
|
-
// 计算原始税费(折扣前)- 单个商品
|
|
272
|
-
var originalTaxPerItem = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
307
|
+
// 计算原始税费(折扣前)- 单个商品(精确值)
|
|
308
|
+
var originalTaxPerItemPrecise = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
273
309
|
total: mainProductPrice.add(((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.surcharge_fee) || 0).toNumber(),
|
|
274
310
|
quantity: 1
|
|
275
311
|
}), state, {
|
|
@@ -283,21 +319,6 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
283
319
|
itemDiscount = unitPrice.dividedBy(productExpectAmount).times(shopDiscount);
|
|
284
320
|
}
|
|
285
321
|
|
|
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
|
-
|
|
301
322
|
// 按比例计算主商品应分摊的折扣
|
|
302
323
|
var mainItemDiscount = new Decimal(0);
|
|
303
324
|
if (unitPrice.greaterThan(0)) {
|
|
@@ -305,8 +326,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
305
326
|
}
|
|
306
327
|
var mainItemDiscountedUnitPrice = mainProductPrice.minus(mainItemDiscount).add(((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.surcharge_fee) || 0);
|
|
307
328
|
|
|
308
|
-
// 计算折后税费(折扣后)-
|
|
309
|
-
var
|
|
329
|
+
// 计算折后税费(折扣后)- 主商品的税费(精确值)
|
|
330
|
+
var maxDiscountedTaxPerItemPrecise = getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
|
|
310
331
|
total: mainItemDiscountedUnitPrice.toNumber(),
|
|
311
332
|
price: item._extend.total,
|
|
312
333
|
quantity: 1
|
|
@@ -315,14 +336,23 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
315
336
|
is_price_include_tax: is_price_include_tax
|
|
316
337
|
});
|
|
317
338
|
|
|
318
|
-
//
|
|
339
|
+
// 四舍五入后的值
|
|
340
|
+
var maxDiscountedTaxPerItemRounded = maxDiscountedTaxPerItemPrecise.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
341
|
+
|
|
319
342
|
// 保存到商品扩展信息中(保留两位小数)
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
343
|
+
item._extend.main_product_attached_bundle_tax_fee = maxDiscountedTaxPerItemRounded.toNumber();
|
|
344
|
+
|
|
345
|
+
// 如果主商品有税费,记录为最后一个含税商品
|
|
346
|
+
if (maxDiscountedTaxPerItemPrecise.gt(0)) {
|
|
347
|
+
lastTaxableItem = {
|
|
348
|
+
type: 'main',
|
|
349
|
+
item: item
|
|
350
|
+
};
|
|
351
|
+
}
|
|
323
352
|
|
|
324
353
|
// 注意:加时商品独立计算,不考虑主商品数量
|
|
325
|
-
var
|
|
354
|
+
var addTimePreciseTax = new Decimal(0);
|
|
355
|
+
var addTimeRoundedTax = new Decimal(0);
|
|
326
356
|
if (Array.isArray(item._extend.relation_details)) {
|
|
327
357
|
var _iterator6 = _createForOfIteratorHelper(item._extend.relation_details),
|
|
328
358
|
_step6;
|
|
@@ -335,14 +365,27 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
335
365
|
if (productExpectAmount > 0) {
|
|
336
366
|
_discountedTotal = _originTotal.minus(_originTotal.dividedBy(productExpectAmount).times(shopDiscount));
|
|
337
367
|
}
|
|
338
|
-
var
|
|
368
|
+
var addTimeTaxPerItemPrecise = getProductItemTax(_objectSpread(_objectSpread({}, atItem), {}, {
|
|
339
369
|
total: _discountedTotal.add((atItem === null || atItem === void 0 ? void 0 : atItem.surcharge_fee) || 0).toNumber(),
|
|
340
370
|
quantity: atItem.product_quantity || atItem.num || 1
|
|
341
371
|
}), state, {
|
|
342
372
|
tax_rate: tax_rate,
|
|
343
373
|
is_price_include_tax: is_price_include_tax
|
|
344
374
|
});
|
|
345
|
-
|
|
375
|
+
var addTimeTaxPerItemRounded = addTimeTaxPerItemPrecise.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
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
|
+
}
|
|
346
389
|
}
|
|
347
390
|
} catch (err) {
|
|
348
391
|
_iterator6.e(err);
|
|
@@ -352,8 +395,10 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
352
395
|
}
|
|
353
396
|
|
|
354
397
|
// 处理 bundle 子商品(仅原价子商品)
|
|
355
|
-
var
|
|
356
|
-
var
|
|
398
|
+
var bundlePreciseOriginTax = new Decimal(0);
|
|
399
|
+
var bundlePreciseTax = new Decimal(0);
|
|
400
|
+
var bundleRoundedOriginTax = new Decimal(0);
|
|
401
|
+
var bundleRoundedTax = new Decimal(0);
|
|
357
402
|
if (Array.isArray((_item$_extend$other = item._extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle)) {
|
|
358
403
|
var _iterator7 = _createForOfIteratorHelper(item._extend.other.bundle),
|
|
359
404
|
_step7;
|
|
@@ -366,8 +411,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
366
411
|
var bundleQuantity = new Decimal(bundleItem.quantity || 1);
|
|
367
412
|
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);
|
|
368
413
|
|
|
369
|
-
// 计算原始税费(折扣前)-
|
|
370
|
-
var
|
|
414
|
+
// 计算原始税费(折扣前)- 单个商品(精确值)
|
|
415
|
+
var bundleOriginalTaxPerItemPrecise = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
371
416
|
total: bundleUnitPrice.add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0).toNumber(),
|
|
372
417
|
quantity: 1
|
|
373
418
|
}), state, {
|
|
@@ -384,8 +429,8 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
384
429
|
// bundle商品折后单价
|
|
385
430
|
var bundleDiscountedUnitPrice = bundleUnitPrice.minus(bundleItemDiscount).add((bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.surcharge_fee) || 0);
|
|
386
431
|
|
|
387
|
-
// 计算折后税费(折扣后)-
|
|
388
|
-
var
|
|
432
|
+
// 计算折后税费(折扣后)- 单个商品(精确值)
|
|
433
|
+
var bundleDiscountedTaxPerItemPrecise = getProductItemTax(_objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
389
434
|
total: bundleDiscountedUnitPrice.toNumber(),
|
|
390
435
|
quantity: 1
|
|
391
436
|
}), state, {
|
|
@@ -393,15 +438,27 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
393
438
|
is_price_include_tax: is_price_include_tax
|
|
394
439
|
});
|
|
395
440
|
|
|
396
|
-
//
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
441
|
+
// 四舍五入后的值
|
|
442
|
+
var bundleOriginalTaxPerItemRounded = bundleOriginalTaxPerItemPrecise.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
443
|
+
var bundleDiscountedTaxPerItemRounded = bundleDiscountedTaxPerItemPrecise.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
444
|
+
|
|
445
|
+
// 保存到bundle商品上(单个商品的税费,四舍五入后)
|
|
446
|
+
bundleItem.original_tax_fee = bundleOriginalTaxPerItemRounded.toNumber();
|
|
447
|
+
bundleItem.tax_fee = bundleDiscountedTaxPerItemRounded.toNumber();
|
|
448
|
+
|
|
449
|
+
// 累加bundle税费(需要乘以bundle数量)
|
|
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
|
+
}
|
|
405
462
|
}
|
|
406
463
|
}
|
|
407
464
|
} catch (err) {
|
|
@@ -410,26 +467,156 @@ var processItemsTax = function processItemsTax(items, state, options) {
|
|
|
410
467
|
_iterator7.f();
|
|
411
468
|
}
|
|
412
469
|
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
470
|
+
|
|
471
|
+
// 主商品的原始税费和折后税费(精确值)
|
|
472
|
+
var originalTaxFeePrecise = originalTaxPerItemPrecise.plus(bundlePreciseOriginTax);
|
|
473
|
+
var taxFeePrecise = maxDiscountedTaxPerItemPrecise.plus(bundlePreciseTax);
|
|
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();
|
|
417
482
|
|
|
418
483
|
// 累加到总税费(乘以数量)
|
|
419
|
-
|
|
420
|
-
|
|
484
|
+
preciseOriginTax = preciseOriginTax.plus(originalTaxFeePrecise.times(quantity)).plus(addTimePreciseTax);
|
|
485
|
+
preciseTax = preciseTax.plus(taxFeePrecise.times(quantity)).plus(addTimePreciseTax);
|
|
486
|
+
roundedOriginTax = roundedOriginTax.plus(originalTaxFeeRounded.times(quantity)).plus(addTimeRoundedTax);
|
|
487
|
+
roundedTax = roundedTax.plus(taxFeeRounded.times(quantity)).plus(addTimeRoundedTax);
|
|
421
488
|
}
|
|
489
|
+
|
|
490
|
+
// 计算期望的总税费(精确累加后四舍五入)
|
|
422
491
|
} catch (err) {
|
|
423
492
|
_iterator5.e(err);
|
|
424
493
|
} finally {
|
|
425
494
|
_iterator5.f();
|
|
426
495
|
}
|
|
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
|
+
}
|
|
427
520
|
return {
|
|
428
|
-
originTax:
|
|
429
|
-
tax:
|
|
521
|
+
originTax: expectedOriginTax,
|
|
522
|
+
tax: expectedTax
|
|
430
523
|
};
|
|
431
524
|
};
|
|
432
525
|
|
|
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
|
+
|
|
433
620
|
/**
|
|
434
621
|
* 税费
|
|
435
622
|
* @param state
|
|
@@ -449,6 +636,9 @@ var getTax = function getTax(state, options) {
|
|
|
449
636
|
tax: Number((_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 ? void 0 : _state$bookingDetail2.tax_fee) || 0
|
|
450
637
|
};
|
|
451
638
|
}
|
|
639
|
+
|
|
640
|
+
// 清除之前计算的税费数据
|
|
641
|
+
clearTaxFee(state);
|
|
452
642
|
var totalOriginTax = new Decimal(0);
|
|
453
643
|
var totalTax = new Decimal(0);
|
|
454
644
|
if (state !== null && state !== void 0 && state.service || state !== null && state !== void 0 && state.addons) {
|
|
@@ -622,21 +812,21 @@ var getDiscountAmount = function getDiscountAmount(discounts) {
|
|
|
622
812
|
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
623
813
|
*/
|
|
624
814
|
var getMainProductTotal = function getMainProductTotal(item) {
|
|
625
|
-
var _ref3, _ref4, _item$_extend$main_pr, _item$_extend3, _item$metadata, _item$_extend$
|
|
815
|
+
var _ref3, _ref4, _item$_extend$main_pr, _item$_extend3, _item$metadata, _item$_extend$other3, _item$_extend$other4, _item$_extend$other6;
|
|
626
816
|
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);
|
|
627
817
|
|
|
628
|
-
// 单规格
|
|
629
|
-
if ((_item$_extend$
|
|
630
|
-
var _item$_extend$
|
|
631
|
-
total = total.add((_item$_extend$
|
|
818
|
+
// 单规格
|
|
819
|
+
if ((_item$_extend$other3 = item._extend.other) !== null && _item$_extend$other3 !== void 0 && _item$_extend$other3.option && Array.isArray((_item$_extend$other4 = item._extend.other) === null || _item$_extend$other4 === void 0 ? void 0 : _item$_extend$other4.option)) {
|
|
820
|
+
var _item$_extend$other5;
|
|
821
|
+
total = total.add((_item$_extend$other5 = item._extend.other) === null || _item$_extend$other5 === void 0 ? void 0 : _item$_extend$other5.option.reduce(function (t, option) {
|
|
632
822
|
return t.add(new Decimal(option.price || 0).mul(option.num || 1));
|
|
633
823
|
}, new Decimal(0)));
|
|
634
824
|
}
|
|
635
|
-
var
|
|
636
|
-
|
|
825
|
+
var _iterator13 = _createForOfIteratorHelper(((_item$_extend$other6 = item._extend.other) === null || _item$_extend$other6 === void 0 ? void 0 : _item$_extend$other6.bundle) || []),
|
|
826
|
+
_step13;
|
|
637
827
|
try {
|
|
638
|
-
for (
|
|
639
|
-
var bundleItem =
|
|
828
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
829
|
+
var bundleItem = _step13.value;
|
|
640
830
|
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
641
831
|
var _ref5, _bundleItem$bundle_se2;
|
|
642
832
|
// 子商品折扣金额
|
|
@@ -644,14 +834,14 @@ var getMainProductTotal = function getMainProductTotal(item) {
|
|
|
644
834
|
// 子商品价格
|
|
645
835
|
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);
|
|
646
836
|
// todo: 套餐子商品后不需要处理 子商品价格 - 子商品折扣金额
|
|
647
|
-
var bundleItemTotal = bundleItemPrice
|
|
837
|
+
var bundleItemTotal = bundleItemPrice;
|
|
648
838
|
total = total.add(bundleItemTotal);
|
|
649
839
|
}
|
|
650
840
|
}
|
|
651
841
|
} catch (err) {
|
|
652
|
-
|
|
842
|
+
_iterator13.e(err);
|
|
653
843
|
} finally {
|
|
654
|
-
|
|
844
|
+
_iterator13.f();
|
|
655
845
|
}
|
|
656
846
|
return total.toNumber();
|
|
657
847
|
};
|
|
@@ -663,74 +853,74 @@ var clearSurchargeFee = function clearSurchargeFee(state) {
|
|
|
663
853
|
var service = state.service,
|
|
664
854
|
addons = state.addons;
|
|
665
855
|
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
666
|
-
var
|
|
667
|
-
|
|
856
|
+
var _iterator14 = _createForOfIteratorHelper(service.value),
|
|
857
|
+
_step14;
|
|
668
858
|
try {
|
|
669
|
-
for (
|
|
670
|
-
var _item$_extend$
|
|
671
|
-
var item =
|
|
859
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
860
|
+
var _item$_extend$other7;
|
|
861
|
+
var item = _step14.value;
|
|
672
862
|
item._extend.surcharge_fee = 0;
|
|
673
863
|
item._extend.relation_surcharge_ids = [];
|
|
674
|
-
var
|
|
675
|
-
|
|
864
|
+
var _iterator15 = _createForOfIteratorHelper(((_item$_extend$other7 = item._extend.other) === null || _item$_extend$other7 === void 0 ? void 0 : _item$_extend$other7.bundle) || []),
|
|
865
|
+
_step15;
|
|
676
866
|
try {
|
|
677
|
-
for (
|
|
678
|
-
var bundleItem =
|
|
867
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
868
|
+
var bundleItem = _step15.value;
|
|
679
869
|
bundleItem.surcharge_fee = 0;
|
|
680
870
|
bundleItem.relation_surcharge_ids = [];
|
|
681
871
|
}
|
|
682
872
|
} catch (err) {
|
|
683
|
-
|
|
873
|
+
_iterator15.e(err);
|
|
684
874
|
} finally {
|
|
685
|
-
|
|
875
|
+
_iterator15.f();
|
|
686
876
|
}
|
|
687
|
-
var
|
|
688
|
-
|
|
877
|
+
var _iterator16 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
878
|
+
_step16;
|
|
689
879
|
try {
|
|
690
|
-
for (
|
|
691
|
-
var relationDetail =
|
|
880
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
881
|
+
var relationDetail = _step16.value;
|
|
692
882
|
relationDetail.surcharge_fee = 0;
|
|
693
883
|
relationDetail.relation_surcharge_ids = [];
|
|
694
884
|
}
|
|
695
885
|
} catch (err) {
|
|
696
|
-
|
|
886
|
+
_iterator16.e(err);
|
|
697
887
|
} finally {
|
|
698
|
-
|
|
888
|
+
_iterator16.f();
|
|
699
889
|
}
|
|
700
890
|
}
|
|
701
891
|
} catch (err) {
|
|
702
|
-
|
|
892
|
+
_iterator14.e(err);
|
|
703
893
|
} finally {
|
|
704
|
-
|
|
894
|
+
_iterator14.f();
|
|
705
895
|
}
|
|
706
896
|
}
|
|
707
897
|
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
708
|
-
var
|
|
709
|
-
|
|
898
|
+
var _iterator17 = _createForOfIteratorHelper(addons.value),
|
|
899
|
+
_step17;
|
|
710
900
|
try {
|
|
711
|
-
for (
|
|
712
|
-
var
|
|
713
|
-
var
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
var
|
|
717
|
-
|
|
901
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
|
902
|
+
var _item3$_extend$other;
|
|
903
|
+
var _item3 = _step17.value;
|
|
904
|
+
_item3._extend.surcharge_fee = 0;
|
|
905
|
+
_item3._extend.relation_surcharge_ids = [];
|
|
906
|
+
var _iterator18 = _createForOfIteratorHelper(((_item3$_extend$other = _item3._extend.other) === null || _item3$_extend$other === void 0 ? void 0 : _item3$_extend$other.bundle) || []),
|
|
907
|
+
_step18;
|
|
718
908
|
try {
|
|
719
|
-
for (
|
|
720
|
-
var
|
|
721
|
-
|
|
722
|
-
|
|
909
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
910
|
+
var _bundleItem2 = _step18.value;
|
|
911
|
+
_bundleItem2.surcharge_fee = 0;
|
|
912
|
+
_bundleItem2.relation_surcharge_ids = [];
|
|
723
913
|
}
|
|
724
914
|
} catch (err) {
|
|
725
|
-
|
|
915
|
+
_iterator18.e(err);
|
|
726
916
|
} finally {
|
|
727
|
-
|
|
917
|
+
_iterator18.f();
|
|
728
918
|
}
|
|
729
919
|
}
|
|
730
920
|
} catch (err) {
|
|
731
|
-
|
|
921
|
+
_iterator17.e(err);
|
|
732
922
|
} finally {
|
|
733
|
-
|
|
923
|
+
_iterator17.f();
|
|
734
924
|
}
|
|
735
925
|
}
|
|
736
926
|
};
|
|
@@ -800,12 +990,12 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
800
990
|
|
|
801
991
|
// 检查service中符合条件的商品
|
|
802
992
|
if (Array.isArray(service === null || service === void 0 ? void 0 : service.value)) {
|
|
803
|
-
var
|
|
804
|
-
|
|
993
|
+
var _iterator19 = _createForOfIteratorHelper(service.value),
|
|
994
|
+
_step19;
|
|
805
995
|
try {
|
|
806
|
-
for (
|
|
807
|
-
var _item$_extend$
|
|
808
|
-
var item =
|
|
996
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
|
997
|
+
var _item$_extend$other8;
|
|
998
|
+
var item = _step19.value;
|
|
809
999
|
// 主商品符合附加费条件
|
|
810
1000
|
if (isProductMatchSurchargeCondition({
|
|
811
1001
|
isCustomItem: item.isCustomItem,
|
|
@@ -831,11 +1021,11 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
831
1021
|
});
|
|
832
1022
|
}
|
|
833
1023
|
// 遍历子商品 原价商品符合附加费条件
|
|
834
|
-
var
|
|
835
|
-
|
|
1024
|
+
var _iterator20 = _createForOfIteratorHelper(((_item$_extend$other8 = item._extend.other) === null || _item$_extend$other8 === void 0 ? void 0 : _item$_extend$other8.bundle) || []),
|
|
1025
|
+
_step20;
|
|
836
1026
|
try {
|
|
837
|
-
for (
|
|
838
|
-
var bundleItem =
|
|
1027
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
|
|
1028
|
+
var bundleItem = _step20.value;
|
|
839
1029
|
// bundle商品是原价且符合附加费条件
|
|
840
1030
|
if (getBundleItemIsOriginalPrice(bundleItem) && isProductMatchSurchargeCondition({
|
|
841
1031
|
isCustomItem: false,
|
|
@@ -860,15 +1050,15 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
860
1050
|
|
|
861
1051
|
// 加时商品符合附加费条件
|
|
862
1052
|
} catch (err) {
|
|
863
|
-
|
|
1053
|
+
_iterator20.e(err);
|
|
864
1054
|
} finally {
|
|
865
|
-
|
|
1055
|
+
_iterator20.f();
|
|
866
1056
|
}
|
|
867
|
-
var
|
|
868
|
-
|
|
1057
|
+
var _iterator21 = _createForOfIteratorHelper(item._extend.relation_details || []),
|
|
1058
|
+
_step21;
|
|
869
1059
|
try {
|
|
870
|
-
for (
|
|
871
|
-
var relationDetail =
|
|
1060
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
1061
|
+
var relationDetail = _step21.value;
|
|
872
1062
|
if (isProductMatchSurchargeCondition({
|
|
873
1063
|
isCustomItem: false,
|
|
874
1064
|
startDate: item._extend.startDate,
|
|
@@ -889,43 +1079,43 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
889
1079
|
}
|
|
890
1080
|
}
|
|
891
1081
|
} catch (err) {
|
|
892
|
-
|
|
1082
|
+
_iterator21.e(err);
|
|
893
1083
|
} finally {
|
|
894
|
-
|
|
1084
|
+
_iterator21.f();
|
|
895
1085
|
}
|
|
896
1086
|
}
|
|
897
1087
|
} catch (err) {
|
|
898
|
-
|
|
1088
|
+
_iterator19.e(err);
|
|
899
1089
|
} finally {
|
|
900
|
-
|
|
1090
|
+
_iterator19.f();
|
|
901
1091
|
}
|
|
902
1092
|
}
|
|
903
1093
|
|
|
904
1094
|
// 检查addons中符合条件的商品
|
|
905
1095
|
if (Array.isArray(addons === null || addons === void 0 ? void 0 : addons.value)) {
|
|
906
|
-
var
|
|
907
|
-
|
|
1096
|
+
var _iterator22 = _createForOfIteratorHelper(addons.value),
|
|
1097
|
+
_step22;
|
|
908
1098
|
try {
|
|
909
|
-
for (
|
|
910
|
-
var
|
|
911
|
-
if (isProductMatchSurchargeCondition(
|
|
1099
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
|
|
1100
|
+
var _item4 = _step22.value;
|
|
1101
|
+
if (isProductMatchSurchargeCondition(_item4, {
|
|
912
1102
|
surchargeConfig: surchargeConfig,
|
|
913
1103
|
scheduleById: scheduleById || {},
|
|
914
1104
|
ScheduleModule: ScheduleModule
|
|
915
1105
|
})) {
|
|
916
1106
|
matchedItems.push({
|
|
917
1107
|
isMain: true,
|
|
918
|
-
total: Number(
|
|
919
|
-
quantity:
|
|
920
|
-
item:
|
|
1108
|
+
total: Number(_item4._extend.total),
|
|
1109
|
+
quantity: _item4._extend.quantity || 1,
|
|
1110
|
+
item: _item4,
|
|
921
1111
|
mainQuantity: 1 // addons独立商品,mainQuantity为1
|
|
922
1112
|
});
|
|
923
1113
|
}
|
|
924
1114
|
}
|
|
925
1115
|
} catch (err) {
|
|
926
|
-
|
|
1116
|
+
_iterator22.e(err);
|
|
927
1117
|
} finally {
|
|
928
|
-
|
|
1118
|
+
_iterator22.f();
|
|
929
1119
|
}
|
|
930
1120
|
}
|
|
931
1121
|
var finalAmount = 0;
|
|
@@ -959,18 +1149,18 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
959
1149
|
// 计算百分比附加费 - 对每个商品单独计算
|
|
960
1150
|
if (percentage && new Decimal(percentage).gt(0) || fixed) {
|
|
961
1151
|
var percentageRate = new Decimal(percentage);
|
|
962
|
-
var
|
|
963
|
-
|
|
1152
|
+
var _iterator23 = _createForOfIteratorHelper(matchedItems.entries()),
|
|
1153
|
+
_step23;
|
|
964
1154
|
try {
|
|
965
|
-
for (
|
|
966
|
-
var
|
|
967
|
-
index =
|
|
968
|
-
|
|
1155
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
|
|
1156
|
+
var _step23$value = _slicedToArray(_step23.value, 2),
|
|
1157
|
+
index = _step23$value[0],
|
|
1158
|
+
_item5 = _step23$value[1];
|
|
969
1159
|
var isLast = index === matchedItems.length - 1;
|
|
970
1160
|
// 对每个商品:max(0, 价格) * 数量 * 费率
|
|
971
|
-
var itemPrice = new Decimal(Math.max(0,
|
|
972
|
-
var itemQuantity = new Decimal(
|
|
973
|
-
var addTimeTotal = new Decimal(
|
|
1161
|
+
var itemPrice = new Decimal(Math.max(0, _item5.total || 0));
|
|
1162
|
+
var itemQuantity = new Decimal(_item5.isMain ? _item5.quantity || 1 : _item5.quantity * _item5.mainQuantity || 1);
|
|
1163
|
+
var addTimeTotal = new Decimal(_item5.addTimeTotal || 0);
|
|
974
1164
|
// 单个商品总附加费
|
|
975
1165
|
var itemTotalSurcharge = itemPrice.times(itemQuantity).plus(addTimeTotal).times(percentageRate);
|
|
976
1166
|
configTotal = configTotal.plus(itemTotalSurcharge);
|
|
@@ -979,8 +1169,11 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
979
1169
|
var itemSurcharge = itemPrice.times(percentageRate);
|
|
980
1170
|
|
|
981
1171
|
// 固定附加费 = 1 / 商品数量 * 固定附加费(向下取整保留两位小数)
|
|
1172
|
+
// 固定附加费的平摊计算逻辑
|
|
1173
|
+
// 一个商品内,不管他本身有多少数量 以及他 bundle 有多少,都应该累加成为一个数量总数
|
|
1174
|
+
// 以这个总数为基础去平摊每个商品应该占这一笔固定附加费的多少
|
|
982
1175
|
var fixedSurcharge = new Decimal(1).div(productCount).times(fixed).times(100).floor().div(100).toFixed(2);
|
|
983
|
-
var quantity =
|
|
1176
|
+
var quantity = _item5.isMain ? _item5.quantity : _item5.quantity * _item5.mainQuantity;
|
|
984
1177
|
fixedTotal = fixedTotal.plus(new Decimal(fixedSurcharge).times(quantity).toNumber());
|
|
985
1178
|
|
|
986
1179
|
// 如果是最后一个商品 判断fixed - fixedTotal 是否有剩余小数 如果有的话,追加抹平字段
|
|
@@ -988,53 +1181,53 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
988
1181
|
var remaining = new Decimal(fixed).minus(fixedTotal).toNumber();
|
|
989
1182
|
if (remaining > 0) {
|
|
990
1183
|
productTotalSurcharge = productTotalSurcharge.plus(remaining);
|
|
991
|
-
if (
|
|
992
|
-
|
|
1184
|
+
if (_item5.isMain) {
|
|
1185
|
+
_item5.item._extend.surcharge_rounding_remainder = remaining;
|
|
993
1186
|
} else {
|
|
994
|
-
|
|
1187
|
+
_item5.item.surcharge_rounding_remainder = remaining;
|
|
995
1188
|
}
|
|
996
1189
|
}
|
|
997
1190
|
}
|
|
998
1191
|
// 只有当 open_product !== 0 时,才将附加费追加到商品身上
|
|
999
1192
|
// open_product === 0 表示商品未开启该附加费,只在订单级别累加
|
|
1000
1193
|
if (open_product !== 0) {
|
|
1001
|
-
if (
|
|
1002
|
-
var
|
|
1003
|
-
var originSurchargeFee = new Decimal(
|
|
1194
|
+
if (_item5.isMain) {
|
|
1195
|
+
var _item5$item$_extend;
|
|
1196
|
+
var originSurchargeFee = new Decimal(_item5.item._extend.surcharge_fee || 0);
|
|
1004
1197
|
// 保留两位小数
|
|
1005
1198
|
var surchargeFee = originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
1006
1199
|
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(surchargeFee).times(itemQuantity).toNumber());
|
|
1007
|
-
|
|
1008
|
-
|
|
1200
|
+
_item5.item._extend.surcharge_fee = surchargeFee;
|
|
1201
|
+
_item5.item._extend.relation_surcharge_ids = [].concat(_toConsumableArray(((_item5$item$_extend = _item5.item._extend) === null || _item5$item$_extend === void 0 ? void 0 : _item5$item$_extend.relation_surcharge_ids) || []), [id]);
|
|
1009
1202
|
} else {
|
|
1010
|
-
var
|
|
1011
|
-
var _originSurchargeFee = new Decimal(
|
|
1203
|
+
var _item5$item;
|
|
1204
|
+
var _originSurchargeFee = new Decimal(_item5.item.surcharge_fee || 0);
|
|
1012
1205
|
// 保留两位小数
|
|
1013
1206
|
var _surchargeFee = _originSurchargeFee.plus(itemSurcharge).plus(fixedSurcharge).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
|
|
1014
1207
|
productTotalSurcharge = productTotalSurcharge.plus(new Decimal(_surchargeFee).times(itemQuantity).toNumber());
|
|
1015
|
-
|
|
1016
|
-
|
|
1208
|
+
_item5.item.surcharge_fee = _surchargeFee;
|
|
1209
|
+
_item5.item.relation_surcharge_ids = [].concat(_toConsumableArray(((_item5$item = _item5.item) === null || _item5$item === void 0 ? void 0 : _item5$item.relation_surcharge_ids) || []), [id]);
|
|
1017
1210
|
}
|
|
1018
1211
|
}
|
|
1019
1212
|
// 最后一个商品 判断configTotal - productTotalSurcharge 是否有剩余小数 如果有的话,追加抹平字段
|
|
1020
1213
|
if (isLast && configTotal.minus(productTotalSurcharge).gt(0)) {
|
|
1021
1214
|
// 四舍五入configTotal
|
|
1022
1215
|
var configTotalRounded = configTotal.toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
1023
|
-
if (
|
|
1024
|
-
var newRoundingRemainder = new Decimal(
|
|
1216
|
+
if (_item5.isMain) {
|
|
1217
|
+
var newRoundingRemainder = new Decimal(_item5.item._extend.surcharge_rounding_remainder || 0);
|
|
1025
1218
|
newRoundingRemainder = newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
1026
|
-
|
|
1219
|
+
_item5.item._extend.surcharge_rounding_remainder = newRoundingRemainder.toNumber();
|
|
1027
1220
|
} else {
|
|
1028
|
-
var _newRoundingRemainder = new Decimal(
|
|
1221
|
+
var _newRoundingRemainder = new Decimal(_item5.item.surcharge_rounding_remainder || 0);
|
|
1029
1222
|
_newRoundingRemainder = _newRoundingRemainder.plus(configTotalRounded.minus(productTotalSurcharge));
|
|
1030
|
-
|
|
1223
|
+
_item5.item.surcharge_rounding_remainder = _newRoundingRemainder.toNumber();
|
|
1031
1224
|
}
|
|
1032
1225
|
}
|
|
1033
1226
|
}
|
|
1034
1227
|
} catch (err) {
|
|
1035
|
-
|
|
1228
|
+
_iterator23.e(err);
|
|
1036
1229
|
} finally {
|
|
1037
|
-
|
|
1230
|
+
_iterator23.f();
|
|
1038
1231
|
}
|
|
1039
1232
|
}
|
|
1040
1233
|
|