@pisell/private-materials 6.4.33 → 6.5.1
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 +5 -5
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +6 -6
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- 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/index.js +7 -23
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +33 -23
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/es/components/checkout/components/ScrollableList/index.js +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -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/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/es/components/pay/toB/components/MX51/index.js +44 -14
- package/es/components/pay/toB/types/index.d.ts +12 -0
- package/es/components/pay/toB/types/index.js +4 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/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/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- 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/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/index.js +5 -2
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/printer.js +35 -0
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- 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/index.js +7 -8
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +17 -7
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/lib/components/checkout/components/ScrollableList/index.js +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -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/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
- package/lib/components/pay/toB/components/MX51/index.js +37 -12
- package/lib/components/pay/toB/types/index.d.ts +12 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/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/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- 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/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +8 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +11 -9
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/printer.js +60 -0
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/package.json +1 -1
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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
|
+
}>;
|
@@ -45,8 +45,6 @@ import { Iconfont } from '@pisell/materials';
|
|
45
45
|
import { useCustomer } from "../../../ticketBooking/hooks/pisellos/useCustomer";
|
46
46
|
import { useDebounceEffect, useMemoizedFn } from 'ahooks';
|
47
47
|
import { cloneDeep } from 'lodash';
|
48
|
-
import { useShopDiscount } from "../../../appointmentBooking/hooks";
|
49
|
-
|
50
48
|
/**
|
51
49
|
* @title: 底部
|
52
50
|
* @description:
|
@@ -656,12 +654,12 @@ var Footer = function Footer(props) {
|
|
656
654
|
setPaymentCallback(function () {
|
657
655
|
return function (paymentResult) {
|
658
656
|
console.log('Payment result:', paymentResult);
|
659
|
-
setIsPaymentModalOpen(false);
|
660
657
|
if ((paymentResult === null || paymentResult === void 0 ? void 0 : paymentResult.status) === 'success') {
|
661
658
|
var _window5;
|
662
659
|
console.log('Payment completed successfully');
|
663
660
|
(_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.shopApi) === null || _window5 === void 0 || (_window5 = _window5.bookingTicket) === null || _window5 === void 0 || _window5.clearAllCart();
|
664
661
|
// 支付成功后关闭弹窗
|
662
|
+
setIsPaymentModalOpen(false);
|
665
663
|
setPaymentModalData(null);
|
666
664
|
setPaymentCallback(null);
|
667
665
|
} else if ((paymentResult === null || paymentResult === void 0 ? void 0 : paymentResult.status) === 'cancelled') {
|
@@ -671,11 +669,13 @@ var Footer = function Footer(props) {
|
|
671
669
|
(_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.shopApi) === null || _window6 === void 0 || (_window6 = _window6.booking) === null || _window6 === void 0 || _window6.voidBooking(res.order_id);
|
672
670
|
}
|
673
671
|
// 支付取消后关闭弹窗
|
672
|
+
setIsPaymentModalOpen(false);
|
674
673
|
setPaymentModalData(null);
|
675
674
|
setPaymentCallback(null);
|
676
675
|
} else {
|
677
676
|
console.log('Payment status:', paymentResult === null || paymentResult === void 0 ? void 0 : paymentResult.status);
|
678
677
|
// 其他状态也关闭弹窗
|
678
|
+
setIsPaymentModalOpen(false);
|
679
679
|
setPaymentModalData(null);
|
680
680
|
setPaymentCallback(null);
|
681
681
|
}
|
@@ -1656,15 +1656,12 @@ var Footer = function Footer(props) {
|
|
1656
1656
|
changeCustomerToGlobalState: changeCustomerToGlobalState
|
1657
1657
|
}),
|
1658
1658
|
selectCustomer = _useCustomer.selectCustomer;
|
1659
|
-
var shopDiscount = useShopDiscount();
|
1660
1659
|
var _useScanManager2 = useScanManager(),
|
1661
1660
|
clearAllScanListenersTaskQueue = _useScanManager2.clearAllScanListenersTaskQueue;
|
1662
1661
|
// 清空所有内容并重置购物车
|
1663
1662
|
var handleClearAllAndReset = function handleClearAllAndReset() {
|
1664
|
-
var
|
1665
|
-
|
1666
|
-
// (window as any)?.shopApi?.bookingTicket?.clearAllCart();
|
1667
|
-
// }, 0);
|
1663
|
+
var _window7;
|
1664
|
+
(_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.shopApi) === null || _window7 === void 0 || (_window7 = _window7.bookingTicket) === null || _window7 === void 0 || _window7.clearAllCart();
|
1668
1665
|
clearAllScanListenersTaskQueue();
|
1669
1666
|
// 清空服务项目
|
1670
1667
|
dispatch({
|
@@ -1719,9 +1716,6 @@ var Footer = function Footer(props) {
|
|
1719
1716
|
orderNote: ''
|
1720
1717
|
}
|
1721
1718
|
});
|
1722
|
-
|
1723
|
-
// 清空商品券
|
1724
|
-
shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$clear = shopDiscount.clear) === null || _shopDiscount$clear === void 0 || _shopDiscount$clear.call(shopDiscount);
|
1725
1719
|
};
|
1726
1720
|
return /*#__PURE__*/React.createElement(Skeleton, {
|
1727
1721
|
title: false,
|
@@ -1806,23 +1800,13 @@ var Footer = function Footer(props) {
|
|
1806
1800
|
state: state,
|
1807
1801
|
dispatch: dispatch,
|
1808
1802
|
onClose: function onClose(reset) {
|
1809
|
-
|
1803
|
+
console.log('🔄 Footer: Closing PaymentModal');
|
1810
1804
|
setIsPaymentModalOpen(false);
|
1811
1805
|
setPaymentModalData(null);
|
1812
1806
|
setPaymentCallback(null);
|
1813
|
-
// if (reset) {
|
1814
|
-
// handleClearAllAndReset();
|
1815
|
-
// }
|
1816
1807
|
if (reset) {
|
1817
|
-
|
1818
|
-
handleClearAllAndReset();
|
1819
|
-
}, 0);
|
1808
|
+
handleClearAllAndReset();
|
1820
1809
|
}
|
1821
|
-
// setPaymentModalData(null);
|
1822
|
-
// setPaymentCallback(null);
|
1823
|
-
// if (reset) {
|
1824
|
-
// handleClearAllAndReset();
|
1825
|
-
// }
|
1826
1810
|
}
|
1827
1811
|
}));
|
1828
1812
|
};
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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,5 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { FormState } from '../model';
|
1
3
|
export declare const walkInData: {
|
2
4
|
id: number;
|
3
5
|
nickname: string;
|
4
6
|
};
|
5
|
-
export declare const Provider: any, Context:
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
8
|
+
state: FormState;
|
9
|
+
} & {
|
10
|
+
dispatch: (params: {
|
11
|
+
type: string;
|
12
|
+
payload: any;
|
13
|
+
}) => void;
|
14
|
+
}>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
export interface FormState {
|
2
3
|
amountSymbol: string;
|
3
4
|
apis: {
|
@@ -105,4 +106,11 @@ export declare const walkInData: {
|
|
105
106
|
id: number;
|
106
107
|
nickname: string;
|
107
108
|
};
|
108
|
-
export declare const Provider: any, Context:
|
109
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
110
|
+
state: FormState;
|
111
|
+
} & {
|
112
|
+
dispatch: (params: {
|
113
|
+
type: string;
|
114
|
+
payload: any;
|
115
|
+
}) => void;
|
116
|
+
}>;
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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 +1,10 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
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
|
+
}>;
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
166
166
|
type: string;
|
167
167
|
value: number;
|
168
|
-
}) => number | {
|
168
|
+
}) => number | "flexible" | {
|
169
169
|
type: string;
|
170
170
|
value: number;
|
171
|
-
}
|
171
|
+
};
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
174
174
|
export {};
|
@@ -16,7 +16,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
16
16
|
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; } }
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
import React, { useRef, useState, useEffect, useCallback, useMemo, useImperativeHandle, forwardRef } from 'react';
|
19
|
-
import { locales
|
19
|
+
import { locales } from '@pisell/utils';
|
20
20
|
import { getLocale } from "../../utils/locales";
|
21
21
|
import { useMemoizedFn } from 'ahooks';
|
22
22
|
import { createPortal } from 'react-dom';
|
@@ -47,6 +47,7 @@ import { cloneDeep } from 'lodash';
|
|
47
47
|
import { getShopWalletPassId, reorderPaymentMethodList } from "./utils";
|
48
48
|
import usePaymentLogger from "./hooks/usePaymentLogger";
|
49
49
|
import { Button } from 'antd';
|
50
|
+
import usePrinter from "../../hooks/printer";
|
50
51
|
|
51
52
|
// Checkout 模块的事件常量
|
52
53
|
var CheckoutHooks = {
|
@@ -139,6 +140,8 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
139
140
|
_useState16 = _slicedToArray(_useState15, 2),
|
140
141
|
walletPassData = _useState16[0],
|
141
142
|
setWalletPassData = _useState16[1];
|
143
|
+
var _usePrinter = usePrinter(),
|
144
|
+
nativePrint = _usePrinter.nativePrint;
|
142
145
|
var isOrderFree = useMemo(function () {
|
143
146
|
if (!customAmount) return false;
|
144
147
|
var amount = parseFloat(customAmount);
|
@@ -675,11 +678,12 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
675
678
|
data: {
|
676
679
|
order_id: responseData.order_id,
|
677
680
|
machine_code_print_info: responseData === null || responseData === void 0 ? void 0 : responseData.machine_code_print_info,
|
678
|
-
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment = responseData.payment_info) === null || _responseData$payment === void 0 ? void 0 : _responseData$payment.small_ticket_data
|
681
|
+
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment = responseData.payment_info) === null || _responseData$payment === void 0 ? void 0 : _responseData$payment.small_ticket_data,
|
682
|
+
machine_code_print_info_v2: responseData === null || responseData === void 0 ? void 0 : responseData.machine_code_print_info_v2
|
679
683
|
}
|
680
684
|
};
|
681
685
|
console.log('print_order_onOrderSynced_params>>>>', params);
|
682
|
-
|
686
|
+
nativePrint(params, function (res) {
|
683
687
|
console.log('print_order_onOrderSynced_res>>>>', res);
|
684
688
|
});
|
685
689
|
} catch (error) {
|
@@ -969,7 +973,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
969
973
|
}
|
970
974
|
};
|
971
975
|
try {
|
972
|
-
|
976
|
+
nativePrint(params, function (res) {
|
973
977
|
console.log('handleButtonClick_print-receipt_res>>>>', res);
|
974
978
|
if (!(res !== null && res !== void 0 && res.result)) {
|
975
979
|
Toast === null || Toast === void 0 || Toast.error((res === null || res === void 0 ? void 0 : res.msg) || '');
|
@@ -1284,6 +1288,8 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1284
1288
|
showRetryModal = _useState30[0],
|
1285
1289
|
setShowRetryModal = _useState30[1];
|
1286
1290
|
var Toast = useToast();
|
1291
|
+
var _usePrinter2 = usePrinter(),
|
1292
|
+
nativePrint = _usePrinter2.nativePrint;
|
1287
1293
|
|
1288
1294
|
// 重试处理函数(逻辑由用户自己实现)
|
1289
1295
|
var handleRetry = /*#__PURE__*/function () {
|
@@ -1613,7 +1619,7 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1613
1619
|
// 获取 checkout 模块并处理订单数据
|
1614
1620
|
checkout = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
1615
1621
|
if (!(checkout && data && !isLocalOrderCreated.current)) {
|
1616
|
-
_context17.next =
|
1622
|
+
_context17.next = 20;
|
1617
1623
|
break;
|
1618
1624
|
}
|
1619
1625
|
isLocalOrderCreated.current = true;
|
@@ -1633,16 +1639,19 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1633
1639
|
order_rounding_setting: getData('order_rounding_setting'),
|
1634
1640
|
shop_wallet_pass_id: shop_wallet_pass_id
|
1635
1641
|
});
|
1642
|
+
console.time('initCheckoutData');
|
1636
1643
|
newData = cloneDeep(data); // setTotalAmount(newData.total.expectAmount);
|
1637
1644
|
// 先往 checkout 解决方案推送一条 local 数据
|
1638
|
-
_context17.next =
|
1645
|
+
_context17.next = 12;
|
1639
1646
|
return checkout.createLocalOrderAsync({
|
1640
1647
|
orderData: newData.order_info,
|
1641
1648
|
cartSummary: (_newData$subtotal_inf = newData.subtotal_info) === null || _newData$subtotal_inf === void 0 ? void 0 : _newData$subtotal_inf.subTotalList,
|
1642
1649
|
autoPayment: true,
|
1643
1650
|
totalInfo: newData.subtotal_info
|
1644
1651
|
});
|
1645
|
-
case
|
1652
|
+
case 12:
|
1653
|
+
console.timeEnd('initCheckoutData');
|
1654
|
+
|
1646
1655
|
// 获取订单总金额
|
1647
1656
|
_orderInfo2 = checkout.getCurrentOrderInfo();
|
1648
1657
|
if (_orderInfo2 && _orderInfo2.totalAmount) {
|
@@ -1699,7 +1708,8 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1699
1708
|
data: {
|
1700
1709
|
order_id: responseData.order_id,
|
1701
1710
|
machine_code_print_info: responseData === null || responseData === void 0 ? void 0 : responseData.machine_code_print_info,
|
1702
|
-
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment3 = responseData.payment_info) === null || _responseData$payment3 === void 0 ? void 0 : _responseData$payment3.small_ticket_data
|
1711
|
+
small_ticket_data: responseData === null || responseData === void 0 || (_responseData$payment3 = responseData.payment_info) === null || _responseData$payment3 === void 0 ? void 0 : _responseData$payment3.small_ticket_data,
|
1712
|
+
machine_code_print_info_v2: responseData === null || responseData === void 0 ? void 0 : responseData.machine_code_print_info_v2
|
1703
1713
|
}
|
1704
1714
|
};
|
1705
1715
|
console.log('print_order_onOrderSynced_params>>>>', params);
|
@@ -1710,7 +1720,7 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1710
1720
|
params: params
|
1711
1721
|
}
|
1712
1722
|
});
|
1713
|
-
|
1723
|
+
nativePrint(params, function (res) {
|
1714
1724
|
console.log('print_order_onOrderSynced_res>>>>', res);
|
1715
1725
|
logger === null || logger === void 0 || logger.addLog({
|
1716
1726
|
type: 'info',
|
@@ -1761,27 +1771,27 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1761
1771
|
// 可以在这里执行同步完成后的业务逻辑
|
1762
1772
|
// 比如:通知其他系统、更新UI状态等
|
1763
1773
|
});
|
1764
|
-
_context17.next =
|
1774
|
+
_context17.next = 31;
|
1765
1775
|
break;
|
1766
|
-
case
|
1776
|
+
case 20:
|
1767
1777
|
if (!isLocalOrderCreated.current) {
|
1768
|
-
_context17.next =
|
1778
|
+
_context17.next = 31;
|
1769
1779
|
break;
|
1770
1780
|
}
|
1771
1781
|
// // 如果本地订单已创建,这时候还更新了 data,则需要销毁当前的订单数据,然后更新新的订单数据了
|
1772
1782
|
console.log('🔄 PaymentModal: data changed, updating checkout data...');
|
1773
1783
|
isLocalOrderCreated.current = false;
|
1774
|
-
_context17.next = 23;
|
1775
|
-
return checkout.cancelCurrentOrderAsync();
|
1776
|
-
case 23:
|
1777
1784
|
_context17.next = 25;
|
1785
|
+
return checkout.cancelCurrentOrderAsync();
|
1786
|
+
case 25:
|
1787
|
+
_context17.next = 27;
|
1778
1788
|
return checkout.createLocalOrderAsync({
|
1779
1789
|
orderData: data === null || data === void 0 ? void 0 : data.order_info,
|
1780
1790
|
cartSummary: data === null || data === void 0 || (_data$subtotal_info = data.subtotal_info) === null || _data$subtotal_info === void 0 ? void 0 : _data$subtotal_info.subTotalList,
|
1781
1791
|
autoPayment: true,
|
1782
1792
|
totalInfo: data === null || data === void 0 ? void 0 : data.subtotal_info
|
1783
1793
|
});
|
1784
|
-
case
|
1794
|
+
case 27:
|
1785
1795
|
// 获取订单总金额
|
1786
1796
|
_orderInfo3 = checkout.getCurrentOrderInfo();
|
1787
1797
|
if (_orderInfo3 && _orderInfo3.totalAmount) {
|
@@ -1789,11 +1799,11 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1789
1799
|
}
|
1790
1800
|
setOrderInfo(_orderInfo3);
|
1791
1801
|
isLocalOrderCreated.current = true;
|
1792
|
-
case 29:
|
1793
|
-
_context17.next = 35;
|
1794
|
-
break;
|
1795
1802
|
case 31:
|
1796
|
-
_context17.
|
1803
|
+
_context17.next = 37;
|
1804
|
+
break;
|
1805
|
+
case 33:
|
1806
|
+
_context17.prev = 33;
|
1797
1807
|
_context17.t0 = _context17["catch"](0);
|
1798
1808
|
console.error('Failed to initialize checkout data:', _context17.t0);
|
1799
1809
|
logger === null || logger === void 0 || logger.addLog({
|
@@ -1803,11 +1813,11 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1803
1813
|
error: _context17.t0
|
1804
1814
|
}
|
1805
1815
|
});
|
1806
|
-
case
|
1816
|
+
case 37:
|
1807
1817
|
case "end":
|
1808
1818
|
return _context17.stop();
|
1809
1819
|
}
|
1810
|
-
}, _callee17, null, [[0,
|
1820
|
+
}, _callee17, null, [[0, 33]]);
|
1811
1821
|
}));
|
1812
1822
|
return function initCheckoutData() {
|
1813
1823
|
return _ref22.apply(this, arguments);
|
@@ -1931,7 +1941,7 @@ var PaymentModal = function PaymentModal(_ref17) {
|
|
1931
1941
|
}
|
1932
1942
|
};
|
1933
1943
|
try {
|
1934
|
-
|
1944
|
+
nativePrint(params, function (res) {
|
1935
1945
|
console.log('handleButtonClick_print-receipt_res>>>>', res);
|
1936
1946
|
if (!(res !== null && res !== void 0 && res.result)) {
|
1937
1947
|
Toast === null || Toast === void 0 || Toast.error((res === null || res === void 0 ? void 0 : res.msg) || '');
|
@@ -51,7 +51,7 @@ var PaymentResultToast = /*#__PURE__*/memo(function (props) {
|
|
51
51
|
_props$mask = props.mask,
|
52
52
|
mask = _props$mask === void 0 ? true : _props$mask,
|
53
53
|
_props$maskClosable = props.maskClosable,
|
54
|
-
maskClosable = _props$maskClosable === void 0 ?
|
54
|
+
maskClosable = _props$maskClosable === void 0 ? false : _props$maskClosable,
|
55
55
|
_props$closable = props.closable,
|
56
56
|
closable = _props$closable === void 0 ? true : _props$closable,
|
57
57
|
zIndex = props.zIndex;
|
@@ -241,6 +241,7 @@ var ScrollableList = function ScrollableList(_ref) {
|
|
241
241
|
style: getGridStyle()
|
242
242
|
}, children)), isScrollable && /*#__PURE__*/React.createElement("button", {
|
243
243
|
style: _objectSpread(_objectSpread({}, bottomGradientStyle), {}, {
|
244
|
+
width: '100%',
|
244
245
|
border: 'none',
|
245
246
|
background: 'linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #A78BE1 100%)'
|
246
247
|
}, gradientStyle),
|
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
18
|
-
readonly statusRef: React.MutableRefObject<"loading" | "
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
175
175
|
type: EActionTypes;
|
176
176
|
payload: {
|
177
|
-
status: "loading" | "
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -295,10 +295,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "
|
298
|
+
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
301
|
-
action?: "
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "loading" | "
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|