@pisell/private-materials 6.4.46 → 6.4.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- 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/footer/amount.js +0 -1
- package/es/components/booking/components/footer/index.js +22 -13
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/checkout/PaymentModal.js +60 -22
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +18 -14
- package/es/components/checkout/components/AmountSummary/index.less +13 -0
- package/es/components/checkout/components/CashPaymentModule/index.js +4 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +48 -44
- package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -6
- package/es/components/checkout/components/PaymentResultToast/index.js +38 -8
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.js +6 -5
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +9 -4
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +4 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/pay/toB/components/Cache/index.d.ts +0 -1
- package/es/components/pay/toB/components/Card/index.d.ts +0 -1
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Footer.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- 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/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.js +3 -1
- package/es/components/ticketBooking/components/menuBar/index.less +7 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/plus/noteModal/AddTempModal.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/pro/pisellPhoneKeyboard/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -15
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +55 -32
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +3 -3
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +0 -1
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- 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/footer/amount.js +0 -1
- package/lib/components/booking/components/footer/index.js +8 -1
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/checkout/PaymentModal.js +48 -18
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +7 -11
- package/lib/components/checkout/components/AmountSummary/index.less +13 -0
- package/lib/components/checkout/components/CashPaymentModule/index.js +3 -1
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +47 -56
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -6
- package/lib/components/checkout/components/PaymentResultToast/index.js +26 -1
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.js +5 -4
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +9 -6
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +4 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Cache/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Card/index.d.ts +0 -1
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Footer.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- 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/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/ticketBooking/components/menuBar/index.less +7 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/plus/noteModal/AddTempModal.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +66 -38
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +51 -32
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +3 -3
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +0 -1
- package/package.json +12 -12
@@ -29,6 +29,11 @@ import { setKeyboardTheme } from "../../utils";
|
|
29
29
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
30
30
|
import localeTexts from "./locales";
|
31
31
|
import "./index.less";
|
32
|
+
var TIP_COLORS = {
|
33
|
+
positive: '#CA8504',
|
34
|
+
negative: '#1570EF',
|
35
|
+
overflow: '#D92D20'
|
36
|
+
};
|
32
37
|
|
33
38
|
/**
|
34
39
|
* originalValue: 当前订单原始值
|
@@ -120,10 +125,16 @@ var DiscountKeyboardBase = function DiscountKeyboardBase(props) {
|
|
120
125
|
}
|
121
126
|
return discountAmount.toNumber();
|
122
127
|
}, [updateMode, discountMode, internalValue, discountValue, originalValue]);
|
123
|
-
var
|
124
|
-
var
|
125
|
-
|
126
|
-
|
128
|
+
var isDiscountOverflow = useMemo(function () {
|
129
|
+
var _original = new Decimal(originalValue || 0);
|
130
|
+
if (updateMode === 'priceOverride') {
|
131
|
+
return new Decimal(internalValue || 0).greaterThan(_original);
|
132
|
+
}
|
133
|
+
if (discountMode === 'amount') {
|
134
|
+
return new Decimal(discountValue || 0).greaterThan(_original);
|
135
|
+
}
|
136
|
+
return false;
|
137
|
+
}, [updateMode, discountMode, internalValue, discountValue, originalValue]);
|
127
138
|
var payableAmount = useMemo(function () {
|
128
139
|
return new Decimal(originalValue || 0).minus(discountAmount).toNumber();
|
129
140
|
}, [originalValue, discountAmount]);
|
@@ -134,7 +145,7 @@ var DiscountKeyboardBase = function DiscountKeyboardBase(props) {
|
|
134
145
|
return;
|
135
146
|
}
|
136
147
|
// 折扣模式、或一口价有限额,则进行折扣值的校验
|
137
|
-
if (
|
148
|
+
if (isDiscountOverflow) {
|
138
149
|
return;
|
139
150
|
}
|
140
151
|
onEnter === null || onEnter === void 0 || onEnter(String(discountAmount));
|
@@ -155,7 +166,9 @@ var DiscountKeyboardBase = function DiscountKeyboardBase(props) {
|
|
155
166
|
var rightItems = useRightItems({
|
156
167
|
rightItemsStyle: {
|
157
168
|
doneButtonStyle: {
|
158
|
-
boxShadow: '0px 0px 1px #898A8D'
|
169
|
+
boxShadow: '0px 0px 1px #898A8D',
|
170
|
+
cursor: updateMode !== 'priceOverride' && isDiscountOverflow ? 'not-allowed' : undefined,
|
171
|
+
backgroundColor: updateMode !== 'priceOverride' && isDiscountOverflow ? '#D0D5DD' : undefined
|
159
172
|
}
|
160
173
|
},
|
161
174
|
doneText: doneText || locales.getText('discount-keyboard-done'),
|
@@ -182,39 +195,46 @@ var DiscountKeyboardBase = function DiscountKeyboardBase(props) {
|
|
182
195
|
}
|
183
196
|
}, [amountSymbol, updateMode, discountMode]);
|
184
197
|
var renderBottomContent = function renderBottomContent() {
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
198
|
+
// 没改价,则为空
|
199
|
+
if (new Decimal(discountAmount).equals(0)) {
|
200
|
+
return /*#__PURE__*/React.createElement("div", null, "\xA0");
|
201
|
+
}
|
202
|
+
if (updateMode === 'priceOverride' || discountMode === 'percentage') {
|
203
|
+
var color;
|
204
|
+
var sign = '';
|
205
|
+
// 折扣为正值, 展示为负
|
206
|
+
if (new Decimal(discountAmount).greaterThan(0)) {
|
207
|
+
color = TIP_COLORS.negative;
|
208
|
+
sign = '-';
|
209
|
+
} else {
|
210
|
+
sign = '+';
|
211
|
+
color = TIP_COLORS.positive;
|
212
|
+
}
|
213
|
+
var style = {
|
214
|
+
color: color
|
215
|
+
};
|
216
|
+
return /*#__PURE__*/React.createElement("div", {
|
217
|
+
style: style,
|
218
|
+
className: "ellipsis"
|
219
|
+
}, /*#__PURE__*/React.createElement("span", null, sign, /*#__PURE__*/React.createElement(PisellText.Amount, {
|
220
|
+
hideDecimalForWholeNumbers: false,
|
221
|
+
precision: 2,
|
222
|
+
value: Math.abs(discountAmount)
|
223
|
+
})));
|
224
|
+
}
|
225
|
+
return /*#__PURE__*/React.createElement("div", {
|
226
|
+
style: {
|
227
|
+
color: isDiscountOverflow ? TIP_COLORS.overflow : ''
|
228
|
+
},
|
191
229
|
className: "ellipsis"
|
192
230
|
}, locales.getText('discount-keyboard-max-discount'), ":", ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
193
231
|
hideDecimalForWholeNumbers: false,
|
194
232
|
precision: 2,
|
195
233
|
value: originalValue
|
196
234
|
}));
|
197
|
-
var _discountText = /*#__PURE__*/React.createElement("div", {
|
198
|
-
style: style,
|
199
|
-
className: "ellipsis"
|
200
|
-
}, locales.getText('discount-keyboard-discount-amount'), ":", ' ', /*#__PURE__*/React.createElement("span", null, sign, /*#__PURE__*/React.createElement(PisellText.Amount, {
|
201
|
-
hideDecimalForWholeNumbers: false,
|
202
|
-
precision: 2,
|
203
|
-
value: Math.abs(discountAmount)
|
204
|
-
})));
|
205
|
-
if (updateMode === 'priceOverride') {
|
206
|
-
if (isFirstInput) {
|
207
|
-
return _maxDiscount;
|
208
|
-
} else {
|
209
|
-
return _discountText;
|
210
|
-
}
|
211
|
-
}
|
212
|
-
if (updateMode === 'discount' && discountMode === 'amount') {
|
213
|
-
return _maxDiscount;
|
214
|
-
}
|
215
|
-
return _discountText;
|
216
235
|
};
|
217
236
|
var customDisplay = function customDisplay() {
|
237
|
+
var _color = updateMode === 'discount' && discountMode === 'amount' && isDiscountOverflow ? TIP_COLORS.overflow : undefined;
|
218
238
|
return /*#__PURE__*/React.createElement("div", {
|
219
239
|
style: {
|
220
240
|
display: 'flex',
|
@@ -231,6 +251,9 @@ var DiscountKeyboardBase = function DiscountKeyboardBase(props) {
|
|
231
251
|
flex: '2',
|
232
252
|
overflow: 'hidden'
|
233
253
|
},
|
254
|
+
style: {
|
255
|
+
color: _color
|
256
|
+
},
|
234
257
|
placeholder: placeholder,
|
235
258
|
bottomContent: renderBottomContent()
|
236
259
|
}), /*#__PURE__*/React.createElement("div", {
|
@@ -277,7 +300,7 @@ var DiscountKeyboardBase = function DiscountKeyboardBase(props) {
|
|
277
300
|
}
|
278
301
|
}, locales.getText('discount-keyboard-payable')), /*#__PURE__*/React.createElement("div", {
|
279
302
|
style: {
|
280
|
-
color:
|
303
|
+
color: '#475467',
|
281
304
|
fontSize: 14,
|
282
305
|
fontWeight: 700,
|
283
306
|
wordWrap: 'break-word'
|
@@ -5,7 +5,7 @@ export default {
|
|
5
5
|
'discount-keyboard-discount': 'Discount',
|
6
6
|
'discount-keyboard-amount': 'Amount',
|
7
7
|
'discount-keyboard-percentage': 'Percentage',
|
8
|
-
'discount-keyboard-max-discount': 'Max
|
8
|
+
'discount-keyboard-max-discount': 'Max',
|
9
9
|
'discount-keyboard-discount-amount': 'Discount Amount',
|
10
10
|
'discount-keyboard-total': 'Total',
|
11
11
|
'discount-keyboard-payable': 'Payable',
|
@@ -19,7 +19,7 @@ export default {
|
|
19
19
|
'discount-keyboard-discount': '折扣',
|
20
20
|
'discount-keyboard-amount': '金额',
|
21
21
|
'discount-keyboard-percentage': '百分比',
|
22
|
-
'discount-keyboard-max-discount': '
|
22
|
+
'discount-keyboard-max-discount': '最高',
|
23
23
|
'discount-keyboard-discount-amount': '折扣金额',
|
24
24
|
'discount-keyboard-total': '待支付金额',
|
25
25
|
'discount-keyboard-payable': '需支付金额',
|
@@ -33,7 +33,7 @@ export default {
|
|
33
33
|
'discount-keyboard-discount': '折扣',
|
34
34
|
'discount-keyboard-amount': '金額',
|
35
35
|
'discount-keyboard-percentage': '百分比',
|
36
|
-
'discount-keyboard-max-discount': '
|
36
|
+
'discount-keyboard-max-discount': '最高',
|
37
37
|
'discount-keyboard-discount-amount': '折扣金額',
|
38
38
|
'discount-keyboard-total': '待支付金額',
|
39
39
|
'discount-keyboard-payable': '需支付金額',
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
30
30
|
* @return {*}
|
31
31
|
* @Author: xiangfeng.xue
|
32
32
|
*/
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
34
34
|
/**
|
35
35
|
* 计算所有价格明细
|
36
36
|
* @param items - 购物车商品数组
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -613,8 +613,8 @@ var Footer = (props) => {
|
|
613
613
|
if (noSubmit) {
|
614
614
|
return values;
|
615
615
|
}
|
616
|
+
const checkout = pisellos.getModule("checkout");
|
616
617
|
if (editOrderId) {
|
617
|
-
const checkout = pisellos.getModule("checkout");
|
618
618
|
const subtotal_info = {
|
619
619
|
subTotalList: (0, import_lodash.cloneDeep)(subTotalList),
|
620
620
|
orderTotalList: (0, import_lodash.cloneDeep)(orderTotalList),
|
@@ -635,6 +635,13 @@ var Footer = (props) => {
|
|
635
635
|
}
|
636
636
|
return;
|
637
637
|
}
|
638
|
+
if (type === "save") {
|
639
|
+
const isNeedDeposit = checkout.checkIsNeedDepositAsync(values.bookings, values.relation_products);
|
640
|
+
if (isNeedDeposit == null ? void 0 : isNeedDeposit.hasDeposit) {
|
641
|
+
values.is_deposit = 1;
|
642
|
+
values.deposit_amount = isNeedDeposit == null ? void 0 : isNeedDeposit.total;
|
643
|
+
}
|
644
|
+
}
|
638
645
|
let api = state.bookingId ? editApi : createApi;
|
639
646
|
(0, import_utils4.sendWarningLog)({
|
640
647
|
title: "saveBooking",
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,14 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { FormState } from '../model';
|
3
1
|
export declare const walkInData: {
|
4
2
|
id: number;
|
5
3
|
nickname: string;
|
6
4
|
};
|
7
|
-
export declare const Provider:
|
8
|
-
state: FormState;
|
9
|
-
} & {
|
10
|
-
dispatch: (params: {
|
11
|
-
type: string;
|
12
|
-
payload: any;
|
13
|
-
}) => void;
|
14
|
-
}>;
|
5
|
+
export declare const Provider: any, Context: any;
|
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
248
248
|
* @Author: WangHan
|
249
249
|
* @Date: 2024-12-24 11:32
|
250
250
|
*/
|
251
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
251
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
amountSymbol: string;
|
4
3
|
apis: {
|
@@ -106,11 +105,4 @@ export declare const walkInData: {
|
|
106
105
|
id: number;
|
107
106
|
nickname: string;
|
108
107
|
};
|
109
|
-
export declare const Provider:
|
110
|
-
state: FormState;
|
111
|
-
} & {
|
112
|
-
dispatch: (params: {
|
113
|
-
type: string;
|
114
|
-
payload: any;
|
115
|
-
}) => void;
|
116
|
-
}>;
|
108
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|