@pisell/private-materials 6.4.45 → 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/footer/amount.js +0 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +22 -13
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- 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/booking/utils.js +10 -5
- package/es/components/checkout/PaymentModal.js +68 -24
- 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/SearchAndClientModule/index.d.ts +0 -1
- 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/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/addService.d.ts +0 -1
- 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/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- 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/footer/amount.js +0 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +8 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- 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/booking/utils.js +10 -5
- package/lib/components/checkout/PaymentModal.js +58 -20
- 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/SearchAndClientModule/index.d.ts +0 -1
- 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/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/addService.d.ts +0 -1
- 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/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- 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
@@ -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;
|
@@ -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;
|
@@ -66,6 +66,7 @@ var import_utils = require("@pisell/utils");
|
|
66
66
|
var import_utils2 = require("./info/service2/utils");
|
67
67
|
var import_lodash = require("lodash");
|
68
68
|
var import_utilsByBooking = require("./info2/utilsByBooking");
|
69
|
+
var import_decimal = __toESM(require("decimal.js"));
|
69
70
|
var Request = class {
|
70
71
|
request = {};
|
71
72
|
constructor() {
|
@@ -611,22 +612,26 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
611
612
|
};
|
612
613
|
var getProductTotalPrice = (item) => {
|
613
614
|
var _a;
|
614
|
-
let price =
|
615
|
+
let price = new import_decimal.default(item._extend.price || 0);
|
615
616
|
let other = (_a = item._extend) == null ? void 0 : _a.other;
|
616
617
|
if (other == null ? void 0 : other.product_variant_id) {
|
617
|
-
price =
|
618
|
+
price = new import_decimal.default((other == null ? void 0 : other.price) || 0);
|
618
619
|
}
|
619
620
|
if (other == null ? void 0 : other.bundle) {
|
620
621
|
price = other == null ? void 0 : other.bundle.reduce((accumulator, currentValue) => {
|
621
|
-
|
622
|
+
const currentPrice = new import_decimal.default(currentValue.price || 0);
|
623
|
+
const currentNum = new import_decimal.default(currentValue.num || 0);
|
624
|
+
return accumulator.add(currentPrice.mul(currentNum));
|
622
625
|
}, price);
|
623
626
|
}
|
624
627
|
if (other == null ? void 0 : other.option) {
|
625
628
|
price = other == null ? void 0 : other.option.reduce((accumulator, currentValue) => {
|
626
|
-
|
629
|
+
const currentPrice = new import_decimal.default(currentValue.price || 0);
|
630
|
+
const currentNum = new import_decimal.default(currentValue.num || 0);
|
631
|
+
return accumulator.add(currentPrice.mul(currentNum));
|
627
632
|
}, price);
|
628
633
|
}
|
629
|
-
return price;
|
634
|
+
return price.toNumber();
|
630
635
|
};
|
631
636
|
var getDuration = (duration) => {
|
632
637
|
if (typeof duration === "number") {
|
@@ -151,6 +151,19 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
151
151
|
return method.code === "CASHMANUAL" || method.type === "CASHMANUAL" || ((_a3 = method.name) == null ? void 0 : _a3.toLowerCase().includes("cash"));
|
152
152
|
}
|
153
153
|
);
|
154
|
+
logger == null ? void 0 : logger.addLog({
|
155
|
+
type: "info",
|
156
|
+
title: "open_till",
|
157
|
+
metadata: {}
|
158
|
+
});
|
159
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
160
|
+
module: "till",
|
161
|
+
key: "open_till",
|
162
|
+
data: {
|
163
|
+
type: "cash"
|
164
|
+
// cash 不需要验证钱箱权限
|
165
|
+
}
|
166
|
+
});
|
154
167
|
await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
|
155
168
|
amount: result.amount,
|
156
169
|
/** 支付类型,跟支付列表上对应的支付方式保持一致 */
|
@@ -165,23 +178,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
165
178
|
voucher_id: 0,
|
166
179
|
rounding_amount: result.roundingAmount
|
167
180
|
}));
|
168
|
-
logger == null ? void 0 : logger.addLog({
|
169
|
-
type: "info",
|
170
|
-
title: "open_till",
|
171
|
-
metadata: {}
|
172
|
-
});
|
173
|
-
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
174
|
-
module: "till",
|
175
|
-
key: "open_till",
|
176
|
-
data: {
|
177
|
-
type: "cash"
|
178
|
-
// cash 不需要验证钱箱权限
|
179
|
-
}
|
180
|
-
});
|
181
181
|
};
|
182
182
|
const processSurcharge = (surcharge) => {
|
183
183
|
if (typeof surcharge === "string") {
|
184
|
-
|
184
|
+
const match = surcharge.match(/\d+(?:\.\d+)?/);
|
185
|
+
return match ? match[0] : void 0;
|
185
186
|
}
|
186
187
|
if (typeof surcharge === "number") {
|
187
188
|
return String(surcharge);
|
@@ -286,7 +287,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
286
287
|
});
|
287
288
|
(_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.postMessageToApp) == null ? void 0 : _d.call(_c2, {
|
288
289
|
module: "till",
|
289
|
-
key: "open_till"
|
290
|
+
key: "open_till",
|
291
|
+
data: {
|
292
|
+
type: "cash"
|
293
|
+
// cash 不需要验证钱箱权限
|
294
|
+
}
|
290
295
|
});
|
291
296
|
}
|
292
297
|
await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
|
@@ -487,7 +492,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
487
492
|
});
|
488
493
|
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
489
494
|
module: "till",
|
490
|
-
key: "open_till"
|
495
|
+
key: "open_till",
|
496
|
+
data: {
|
497
|
+
type: "cash"
|
498
|
+
// cash 不需要验证钱箱权限
|
499
|
+
}
|
491
500
|
});
|
492
501
|
}
|
493
502
|
}
|
@@ -664,7 +673,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
664
673
|
select.forEach((item) => {
|
665
674
|
var _a2, _b2, _c2, _d;
|
666
675
|
const mapCode = item.code ? import_constants.WALLET_PASS_CODE_MAP[item.code] : null;
|
667
|
-
if (mapCode) {
|
676
|
+
if (mapCode && walletPassDetail.map[mapCode]) {
|
668
677
|
voucherItems.push({
|
669
678
|
/** 支付金额 */
|
670
679
|
amount: item.amount,
|
@@ -1721,6 +1730,17 @@ var PaymentModal = ({
|
|
1721
1730
|
}
|
1722
1731
|
),
|
1723
1732
|
onClick: handleOrderNoteClick
|
1733
|
+
},
|
1734
|
+
enabledAutoPrint ? {
|
1735
|
+
key: "print",
|
1736
|
+
label: import_utils.locales.getText("payment.result.printReceipt"),
|
1737
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.Printer, { className: getClassName("action-icon") }),
|
1738
|
+
onClick: handlePrintReceiptClick
|
1739
|
+
} : {
|
1740
|
+
key: "details",
|
1741
|
+
label: import_utils.locales.getText("payment.result.details"),
|
1742
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
|
1743
|
+
onClick: handleDetailsClick
|
1724
1744
|
}
|
1725
1745
|
],
|
1726
1746
|
buttonProps: {
|
@@ -1733,7 +1753,7 @@ var PaymentModal = ({
|
|
1733
1753
|
case "partially_paid":
|
1734
1754
|
return [
|
1735
1755
|
[
|
1736
|
-
{
|
1756
|
+
enabledAutoPrint ? {
|
1737
1757
|
id: "details",
|
1738
1758
|
buttonProps: {
|
1739
1759
|
className: getClassName("action-button"),
|
@@ -1741,6 +1761,14 @@ var PaymentModal = ({
|
|
1741
1761
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
|
1742
1762
|
children: import_utils.locales.getText("payment.result.details")
|
1743
1763
|
}
|
1764
|
+
} : {
|
1765
|
+
id: "print",
|
1766
|
+
buttonProps: {
|
1767
|
+
className: getClassName("action-button"),
|
1768
|
+
onClick: handlePrintReceiptClick,
|
1769
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.Printer, { className: getClassName("action-icon") }),
|
1770
|
+
children: import_utils.locales.getText("payment.result.printReceipt")
|
1771
|
+
}
|
1744
1772
|
},
|
1745
1773
|
{
|
1746
1774
|
id: "more",
|
@@ -1756,6 +1784,17 @@ var PaymentModal = ({
|
|
1756
1784
|
}
|
1757
1785
|
),
|
1758
1786
|
onClick: handleOrderNoteClick
|
1787
|
+
},
|
1788
|
+
enabledAutoPrint ? {
|
1789
|
+
key: "print",
|
1790
|
+
label: import_utils.locales.getText("payment.result.printReceipt"),
|
1791
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.Printer, { className: getClassName("action-icon") }),
|
1792
|
+
onClick: handlePrintReceiptClick
|
1793
|
+
} : {
|
1794
|
+
key: "details",
|
1795
|
+
label: import_utils.locales.getText("payment.result.details"),
|
1796
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.FileCheck02, { className: getClassName("action-icon") }),
|
1797
|
+
onClick: handleDetailsClick
|
1759
1798
|
}
|
1760
1799
|
],
|
1761
1800
|
buttonProps: {
|
@@ -1963,10 +2002,9 @@ var PaymentModal = ({
|
|
1963
2002
|
open: showRetryModal,
|
1964
2003
|
title: import_utils.locales.getText("pisell2.checkout.tips"),
|
1965
2004
|
footer: null,
|
1966
|
-
closable: false,
|
1967
|
-
maskClosable: false,
|
1968
2005
|
keyboard: false,
|
1969
2006
|
onCancel: () => {
|
2007
|
+
setShowRetryModal(false);
|
1970
2008
|
}
|
1971
2009
|
// 禁用关闭
|
1972
2010
|
}
|
@@ -229,15 +229,11 @@ function AmountSummary({
|
|
229
229
|
return totalDecimal.toNumber();
|
230
230
|
};
|
231
231
|
const getKeyboardLimits = () => {
|
232
|
-
const walletTotal = getWalletTotalAmount();
|
233
|
-
const walletTotalDecimal = new import_decimal.default(walletTotal);
|
234
232
|
const orderDueDecimal = new import_decimal.default(Number(balanceDueAmount || 0));
|
235
233
|
const minDecimal = new import_decimal.default(0.01);
|
236
|
-
const diffDecimal = orderDueDecimal.minus(walletTotalDecimal);
|
237
|
-
const maxAmountDecimal = import_decimal.default.max(minDecimal, diffDecimal);
|
238
234
|
return {
|
239
235
|
min: minDecimal.toNumber(),
|
240
|
-
max:
|
236
|
+
max: orderDueDecimal.toNumber()
|
241
237
|
};
|
242
238
|
};
|
243
239
|
const _formatInputAmount = (value) => {
|
@@ -266,9 +262,6 @@ function AmountSummary({
|
|
266
262
|
);
|
267
263
|
return;
|
268
264
|
}
|
269
|
-
if (!inputStr || numericValue <= 0) {
|
270
|
-
numericValue = getOrderDueAmount();
|
271
|
-
}
|
272
265
|
const minDecimal = new import_decimal.default(limits.min);
|
273
266
|
const maxDecimal = new import_decimal.default(limits.max);
|
274
267
|
const valueDecimal = new import_decimal.default(numericValue);
|
@@ -463,6 +456,9 @@ function AmountSummary({
|
|
463
456
|
return depositPaidAmount < new import_decimal.default(totalAmount).toNumber();
|
464
457
|
}
|
465
458
|
}, [paymentItems, paymentType, totalAmount]);
|
459
|
+
const showCancelSplitPayment = (0, import_react.useMemo)(() => {
|
460
|
+
return balanceDueAmount !== customAmount;
|
461
|
+
}, [customAmount, balanceDueAmount]);
|
466
462
|
const handleChangeDepositAmount = (value) => {
|
467
463
|
console.log("handleChangeDepositAmount", value);
|
468
464
|
checkoutModule == null ? void 0 : checkoutModule.setDepositAmountAsync(value);
|
@@ -511,7 +507,7 @@ function AmountSummary({
|
|
511
507
|
shouldShowConfirmMode() ? renderConfirmMode() : /* @__PURE__ */ import_react2.default.createElement("div", { className: (0, import_classnames.default)("balance-due-info") }, paymentType === "deposit" ? /* @__PURE__ */ import_react2.default.createElement(
|
512
508
|
import_pisellSimplePriceKeyboardPopover.default,
|
513
509
|
{
|
514
|
-
value:
|
510
|
+
value: balanceDueAmount || "0",
|
515
511
|
onConfirm: handleChangeDepositAmount,
|
516
512
|
showCurrencySymbol: true,
|
517
513
|
useThousandsSeparator: true,
|
@@ -570,7 +566,7 @@ function AmountSummary({
|
|
570
566
|
))
|
571
567
|
)
|
572
568
|
),
|
573
|
-
!shouldShowConfirmMode() && /* @__PURE__ */ import_react2.default.createElement(
|
569
|
+
!shouldShowConfirmMode() && (showCancelSplitPayment ? /* @__PURE__ */ import_react2.default.createElement(import_antd.Button, { className: (0, import_classnames.default)("cancel-split-payment-button"), onClick: () => onAmountChange == null ? void 0 : onAmountChange(balanceDueAmount) }, getText("split.cancel") || "取消部\n分支付") : /* @__PURE__ */ import_react2.default.createElement(
|
574
570
|
import_antd.Popover,
|
575
571
|
{
|
576
572
|
content: /* @__PURE__ */ import_react2.default.createElement("div", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react2.default.createElement(
|
@@ -610,7 +606,7 @@ function AmountSummary({
|
|
610
606
|
destroyTooltipOnHide: true
|
611
607
|
},
|
612
608
|
/* @__PURE__ */ import_react2.default.createElement(import_antd.Button, { className: (0, import_classnames.default)("split-payment-button") }, getText("split.payment") || "拆分支付")
|
613
|
-
),
|
609
|
+
)),
|
614
610
|
/* @__PURE__ */ import_react2.default.createElement(
|
615
611
|
import_materials.PisellModal,
|
616
612
|
{
|
@@ -476,6 +476,7 @@
|
|
476
476
|
}
|
477
477
|
|
478
478
|
.split-payment-button {
|
479
|
+
width: 80px;
|
479
480
|
padding: 0 8px;
|
480
481
|
background: #079455;
|
481
482
|
color: white;
|
@@ -485,4 +486,16 @@
|
|
485
486
|
white-space: pre-line; // 让换行符(\n)生效
|
486
487
|
text-align: left; // 确保文本居中对齐
|
487
488
|
min-width: 68px;
|
489
|
+
}
|
490
|
+
.cancel-split-payment-button {
|
491
|
+
width: 80px;
|
492
|
+
padding: 0 8px;
|
493
|
+
background: #DF5342;
|
494
|
+
color: white;
|
495
|
+
font-size: 14px;
|
496
|
+
border: 1px solid #C3B2E7;
|
497
|
+
height: 80px;
|
498
|
+
white-space: pre-line; // 让换行符(\n)生效
|
499
|
+
text-align: left; // 确保文本居中对齐
|
500
|
+
min-width: 68px;
|
488
501
|
}
|
@@ -97,7 +97,9 @@ function CashPaymentModule({
|
|
97
97
|
}
|
98
98
|
};
|
99
99
|
const { run: handleCashPay } = (0, import_ahooks.useDebounceFn)(handleCashPayInternal, {
|
100
|
-
wait: 500
|
100
|
+
wait: 500,
|
101
|
+
leading: true,
|
102
|
+
trailing: false
|
101
103
|
});
|
102
104
|
const handleKeyboardConfirm = async (value) => {
|
103
105
|
if (isInputDisabled) {
|