@pisell/private-materials 6.7.7 → 6.7.9
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 +2 -2
- package/build/lowcode/preview.js +17 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/es/components/booking/addons/index.js +17 -25
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/amount.d.ts +0 -1
- package/es/components/booking/components/footer/amount.js +84 -548
- package/es/components/booking/components/footer/index.js +56 -77
- package/es/components/booking/components/footer/utils.d.ts +0 -19
- package/es/components/booking/components/footer/utils.js +73 -194
- package/es/components/booking/components/voucher/index.js +7 -23
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/hooks/useQuotation.js +1 -4
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +6 -30
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editNormalService/index.js +0 -6
- package/es/components/booking/info2/service/editService/index.js +6 -16
- package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/es/components/booking/info2/service/editService/utils.js +0 -66
- 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 +0 -1
- package/es/components/booking/utils.js +3 -16
- package/es/components/checkout/PaymentModal.d.ts +5 -13
- package/es/components/checkout/PaymentModal.js +252 -304
- package/es/components/checkout/PaymentPlugin.d.ts +3 -0
- package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/es/components/checkout/components/AdditionalModule/index.js +12 -52
- package/es/components/checkout/components/AmountSummary/index.js +76 -9
- package/es/components/checkout/components/AmountSummary/index.less +6 -5
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
- package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/hooks/useWalletPass.js +1 -1
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +0 -6
- package/es/components/checkout/locales.js +0 -6
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
- package/es/components/eftposPay/payo/config.js +32 -70
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/index.js +0 -12
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.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/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/list/List.js +40 -56
- package/es/components/list/hooks/useListState.d.ts +3 -5
- package/es/components/list/hooks/useListState.js +2 -17
- package/es/components/list/styles/header.less +3 -3
- package/es/components/list/utils/index.d.ts +1 -13
- package/es/components/list/utils/index.js +1 -43
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/es/components/pay/toC/index.js +4 -7
- package/es/components/pay/toC/locales.d.ts +0 -3
- package/es/components/pay/toC/locales.js +3 -6
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/status.d.ts +0 -1
- package/es/components/pay/toC/status.js +0 -3
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
- package/es/components/ticketBooking/components/menuBar/index.js +12 -109
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +7 -112
- package/es/components/ticketBooking/components/timeBar/index.less +0 -59
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
- package/es/components/ticketBooking/locales.d.ts +0 -6
- package/es/components/ticketBooking/locales.js +3 -9
- package/es/components/ticketBooking/utils/index.d.ts +0 -3
- package/es/components/ticketBooking/utils/index.js +13 -36
- package/es/components/wallet/Detail/index.js +2 -34
- package/es/components/wallet/Detail/index.less +0 -11
- package/es/components/wallet/Detail/locales.d.ts +0 -6
- package/es/components/wallet/Detail/locales.js +2 -14
- 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/index.js +10 -11
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +1 -5
- package/es/components/wallet/index.js +2 -4
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/wallet/serve.d.ts +0 -7
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +1 -5
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +30 -28
- package/es/plus/clinetSearch/locales.d.ts +0 -3
- package/es/plus/clinetSearch/locales.js +4 -7
- package/es/plus/clinetSearch/types.d.ts +0 -12
- package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
- package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
- package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
- package/es/plus/walletPassGallery/index.js +3 -7
- package/es/plus/walletPassGallery/serve.d.ts +0 -3
- package/es/plus/walletPassGallery/serve.js +2 -4
- package/es/pro/Login2.0/index.less +8 -15
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -45
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
- package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/lib/components/booking/addons/index.js +7 -15
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/amount.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.js +41 -293
- package/lib/components/booking/components/footer/index.js +11 -30
- package/lib/components/booking/components/footer/utils.d.ts +0 -19
- package/lib/components/booking/components/footer/utils.js +41 -138
- package/lib/components/booking/components/voucher/index.js +9 -25
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +5 -25
- package/lib/components/booking/info2/index.js +2 -7
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
- package/lib/components/booking/info2/service/editService/index.js +3 -12
- package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/lib/components/booking/info2/service/editService/utils.js +3 -40
- 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 +0 -1
- package/lib/components/booking/utils.js +0 -11
- package/lib/components/checkout/PaymentModal.d.ts +5 -13
- package/lib/components/checkout/PaymentModal.js +147 -190
- package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
- package/lib/components/checkout/PaymentPlugin.js +181 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
- package/lib/components/checkout/components/AmountSummary/index.js +46 -5
- package/lib/components/checkout/components/AmountSummary/index.less +6 -5
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/hooks/useWalletPass.js +1 -1
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +0 -6
- package/lib/components/checkout/locales.js +0 -6
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
- package/lib/components/eftposPay/payo/config.js +73 -98
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/index.js +0 -12
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.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/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/list/List.js +16 -34
- package/lib/components/list/hooks/useListState.d.ts +3 -5
- package/lib/components/list/hooks/useListState.js +1 -14
- package/lib/components/list/styles/header.less +3 -3
- package/lib/components/list/utils/index.d.ts +1 -13
- package/lib/components/list/utils/index.js +0 -27
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/lib/components/pay/toC/index.js +1 -4
- package/lib/components/pay/toC/locales.d.ts +0 -3
- package/lib/components/pay/toC/locales.js +3 -6
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/status.d.ts +0 -1
- package/lib/components/pay/toC/status.js +0 -5
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
- package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
- package/lib/components/ticketBooking/locales.d.ts +0 -6
- package/lib/components/ticketBooking/locales.js +3 -9
- package/lib/components/ticketBooking/utils/index.d.ts +0 -3
- package/lib/components/ticketBooking/utils/index.js +6 -20
- package/lib/components/wallet/Detail/index.js +3 -31
- package/lib/components/wallet/Detail/index.less +0 -11
- package/lib/components/wallet/Detail/locales.d.ts +0 -6
- package/lib/components/wallet/Detail/locales.js +2 -14
- 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/index.js +8 -8
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +0 -4
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/wallet/serve.d.ts +0 -7
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -12
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +8 -17
- package/lib/plus/clinetSearch/locales.d.ts +0 -3
- package/lib/plus/clinetSearch/locales.js +4 -7
- package/lib/plus/clinetSearch/types.d.ts +0 -12
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
- package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
- package/lib/plus/walletPassGallery/index.js +3 -7
- package/lib/plus/walletPassGallery/serve.d.ts +0 -3
- package/lib/plus/walletPassGallery/serve.js +2 -3
- package/lib/pro/Login2.0/index.less +8 -15
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +43 -42
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/checkout/plugin.d.ts +0 -2
- package/es/components/checkout/plugin.js +0 -303
- package/es/components/eftposPay/payo/payment.d.ts +0 -66
- package/es/components/eftposPay/payo/payment.js +0 -579
- package/es/components/eftposPay/utils/log/index.d.ts +0 -110
- package/es/components/eftposPay/utils/log/index.js +0 -371
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
- package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SectionList.js +0 -174
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
- package/es/components/systemSettings/registry/components/index.d.ts +0 -4
- package/es/components/systemSettings/registry/components/index.js +0 -4
- package/es/components/systemSettings/registry/index.d.ts +0 -5
- package/es/components/systemSettings/registry/index.js +0 -1059
- package/es/components/systemSettings/registry/index.less +0 -410
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/locales.js +0 -300
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/services.js +0 -472
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/types.js +0 -1
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/systemSettings/registry/utils/validators.js +0 -44
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/wallet/utils.js +0 -342
- package/lib/components/checkout/plugin.d.ts +0 -2
- package/lib/components/checkout/plugin.js +0 -263
- package/lib/components/eftposPay/payo/payment.d.ts +0 -66
- package/lib/components/eftposPay/payo/payment.js +0 -357
- package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
- package/lib/components/eftposPay/utils/log/index.js +0 -294
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
- package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/index.js +0 -48
- package/lib/components/systemSettings/registry/index.d.ts +0 -5
- package/lib/components/systemSettings/registry/index.js +0 -529
- package/lib/components/systemSettings/registry/index.less +0 -410
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/locales.js +0 -324
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/services.js +0 -290
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/types.js +0 -17
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/systemSettings/registry/utils/validators.js +0 -54
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/wallet/utils.js +0 -287
- package/lowcode/payment-modal/meta.ts +0 -135
- package/lowcode/settings-registry/meta.ts +0 -29
- package/lowcode/wallet-pass-detail/meta.ts +0 -89
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -29,9 +30,10 @@ import SendPaymentLinkModal from "./components/SendPaymentLinkModal";
|
|
|
29
30
|
import AmountSummary from "./components/AmountSummary/index";
|
|
30
31
|
import SavePayLaterHandler from "./components/SavePayLaterHandler";
|
|
31
32
|
import WalletPassModule from "./components/WalletPassModule";
|
|
32
|
-
import PaymentOptionsModule
|
|
33
|
+
import PaymentOptionsModule from "./components/PaymentOptionsModule";
|
|
33
34
|
import CashPaymentModule from "./components/CashPaymentModule";
|
|
34
35
|
import AdditionalModule from "./components/AdditionalModule";
|
|
36
|
+
import { getSumTotal } from "../booking/components/footer/amount";
|
|
35
37
|
import { closePaymentResultToast, closeAllPaymentResultToasts, setTillButton } from "./components/PaymentResultToast";
|
|
36
38
|
import { formatCurrency, calculateStatusClassName, calculateAutoCloseConfig, displayPaymentResultToast, createShowSuccessToast } from "./utils/PaymentResultToastUtils";
|
|
37
39
|
import { Printer, FileCheck02, RefreshCw05, CreditCard02, MessageTextSquare02, ArrowLeft, DotsVertical } from '@pisell/icon';
|
|
@@ -45,7 +47,7 @@ import { getShopWalletPassId, reorderPaymentMethodList } from "./utils";
|
|
|
45
47
|
import usePaymentLogger from "./hooks/usePaymentLogger";
|
|
46
48
|
import { Button } from 'antd';
|
|
47
49
|
import usePrinter from "../../hooks/printer";
|
|
48
|
-
import { DiscountKeyboard
|
|
50
|
+
import { DiscountKeyboard } from "../../pro/priceKeyboard";
|
|
49
51
|
import { useActiveExecute } from "../ticketBooking/hooks/pisellos";
|
|
50
52
|
|
|
51
53
|
// Checkout 模块的事件常量
|
|
@@ -64,13 +66,15 @@ var CheckoutHooks = {
|
|
|
64
66
|
|
|
65
67
|
// 支付弹窗主体内容组件
|
|
66
68
|
var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
67
|
-
var _parentModuleConfig$s;
|
|
69
|
+
var _parentModuleConfig$s, _state$client2, _state$client3;
|
|
68
70
|
var cartData = _ref.cartData,
|
|
69
71
|
orderInfo = _ref.orderInfo,
|
|
70
72
|
isModalOpen = _ref.isModalOpen,
|
|
71
73
|
onPaymentComplete = _ref.onPaymentComplete,
|
|
72
74
|
onPaymentCancel = _ref.onPaymentCancel,
|
|
73
75
|
onStatusChange = _ref.onStatusChange,
|
|
76
|
+
dispatch = _ref.dispatch,
|
|
77
|
+
state = _ref.state,
|
|
74
78
|
showingCashToastRef = _ref.showingCashToastRef,
|
|
75
79
|
onToastClose = _ref.onToastClose,
|
|
76
80
|
orderNote = _ref.orderNote,
|
|
@@ -88,16 +92,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
88
92
|
generateActionButtons = _ref.generateActionButtons,
|
|
89
93
|
paymentResultToastConfig = _ref.paymentResultToastConfig,
|
|
90
94
|
updateOrderInfo = _ref.updateOrderInfo,
|
|
91
|
-
setCurrentEditOrderId = _ref.setCurrentEditOrderId
|
|
92
|
-
config = _ref.config,
|
|
93
|
-
paymentResultDisplayMode = _ref.paymentResultDisplayMode,
|
|
94
|
-
shopDiscount = _ref.shopDiscount,
|
|
95
|
-
client = _ref.client,
|
|
96
|
-
currentTotalPrice = _ref.currentTotalPrice,
|
|
97
|
-
onChangeShopDiscount = _ref.onChangeShopDiscount,
|
|
98
|
-
onChangeOrderNote = _ref.onChangeOrderNote,
|
|
99
|
-
onDeleteOrderNote = _ref.onDeleteOrderNote,
|
|
100
|
-
any = _ref.config;
|
|
95
|
+
setCurrentEditOrderId = _ref.setCurrentEditOrderId;
|
|
101
96
|
var context = useEngineContext();
|
|
102
97
|
var utils = context.appHelper.utils || {};
|
|
103
98
|
var pisellos = utils.pisellos,
|
|
@@ -130,46 +125,37 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
130
125
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
131
126
|
recommendAmounts = _useState8[0],
|
|
132
127
|
setRecommendAmounts = _useState8[1];
|
|
133
|
-
var _useState9 = useState(false),
|
|
134
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
135
|
-
showSplitPaymentKeyboard = _useState10[0],
|
|
136
|
-
setShowSplitPaymentKeyboard = _useState10[1];
|
|
137
128
|
var paymentMethodsRef = useRef(null);
|
|
138
|
-
var
|
|
129
|
+
var _useState9 = useState([]),
|
|
130
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
131
|
+
paymentMethods = _useState10[0],
|
|
132
|
+
setPaymentMethods = _useState10[1];
|
|
133
|
+
var _useState11 = useState(false),
|
|
139
134
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
var _useState13 = useState(
|
|
135
|
+
showCashPayment = _useState12[0],
|
|
136
|
+
setShowCashPayment = _useState12[1];
|
|
137
|
+
var _useState13 = useState(locales.getText('cards.and.digitals') || 'Cards & Digitals'),
|
|
143
138
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var _useState15 = useState(locales.getText('cards.and.digitals') || 'Cards & Digitals'),
|
|
147
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
148
|
-
paymentOptionsTitle = _useState16[0],
|
|
149
|
-
setPaymentOptionsTitle = _useState16[1];
|
|
150
|
-
var paymentOptionList = useMemo(function () {
|
|
151
|
-
return paymentMethods.filter(function (item) {
|
|
152
|
-
return !(item.type === 'app' && item.code === 'EFTPOS_LINKLY') && (['custom'].includes(item.type) || SHOW_METHODS_CODE.includes(item.code));
|
|
153
|
-
});
|
|
154
|
-
}, [paymentMethods]);
|
|
139
|
+
paymentOptionsTitle = _useState14[0],
|
|
140
|
+
setPaymentOptionsTitle = _useState14[1];
|
|
155
141
|
var clientChangedRef = useRef(false);
|
|
156
142
|
var walletPassRef = useRef(null);
|
|
157
143
|
// 已保存的支付项数据
|
|
158
|
-
var
|
|
159
|
-
|
|
160
|
-
paymentItems =
|
|
161
|
-
setPaymentItems =
|
|
144
|
+
var _useState15 = useState([]),
|
|
145
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
146
|
+
paymentItems = _useState16[0],
|
|
147
|
+
setPaymentItems = _useState16[1];
|
|
162
148
|
// 钱包卡券数据
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
walletPassData =
|
|
166
|
-
setWalletPassData =
|
|
149
|
+
var _useState17 = useState({}),
|
|
150
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
151
|
+
walletPassData = _useState18[0],
|
|
152
|
+
setWalletPassData = _useState18[1];
|
|
167
153
|
var _usePrinter = usePrinter(),
|
|
168
154
|
nativePrint = _usePrinter.nativePrint;
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
syncingLock =
|
|
172
|
-
setSyncingLock =
|
|
155
|
+
var _useState19 = useState(false),
|
|
156
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
157
|
+
syncingLock = _useState20[0],
|
|
158
|
+
setSyncingLock = _useState20[1];
|
|
173
159
|
var isOrderFree = useMemo(function () {
|
|
174
160
|
if (!customAmount) return false;
|
|
175
161
|
var amount = parseFloat(customAmount);
|
|
@@ -177,14 +163,14 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
177
163
|
}, [customAmount]);
|
|
178
164
|
|
|
179
165
|
// 新增状态:订单备注和手动折扣
|
|
166
|
+
var _useState21 = useState(false),
|
|
167
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
168
|
+
paymentLinkModalOpen = _useState22[0],
|
|
169
|
+
setPaymentLinkModalOpen = _useState22[1];
|
|
180
170
|
var _useState23 = useState(false),
|
|
181
171
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
var _useState25 = useState(false),
|
|
185
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
186
|
-
showPriceAdjustModal = _useState26[0],
|
|
187
|
-
setShowPriceAdjustModal = _useState26[1];
|
|
172
|
+
showPriceAdjustModal = _useState24[0],
|
|
173
|
+
setShowPriceAdjustModal = _useState24[1];
|
|
188
174
|
var logger = usePaymentLogger();
|
|
189
175
|
var currency = getData('shop_currency_code') || 'USD';
|
|
190
176
|
|
|
@@ -237,7 +223,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
237
223
|
/** 支付类型,跟支付列表上对应的支付方式保持一致 */
|
|
238
224
|
code: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.code,
|
|
239
225
|
/** 支付类型id,跟支付列表上对应的支付方式保持一致 */
|
|
240
|
-
|
|
226
|
+
id: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.id,
|
|
241
227
|
/** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
|
|
242
228
|
name: cashPaymentMethod === null || cashPaymentMethod === void 0 ? void 0 : cashPaymentMethod.name,
|
|
243
229
|
/** 支付类型type,跟支付列表上对应的支付方式保持一致 */
|
|
@@ -349,7 +335,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
349
335
|
// 支付金额
|
|
350
336
|
code: code,
|
|
351
337
|
// 支付类型code
|
|
352
|
-
|
|
338
|
+
id: id,
|
|
353
339
|
// 支付类型id
|
|
354
340
|
name: name,
|
|
355
341
|
// 支付类型name
|
|
@@ -417,7 +403,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
417
403
|
/** 支付类型,跟支付列表上对应的支付方式保持一致 */
|
|
418
404
|
code: method.code,
|
|
419
405
|
/** 支付类型id,跟支付列表上对应的支付方式保持一致 */
|
|
420
|
-
|
|
406
|
+
id: method.id,
|
|
421
407
|
/** 支付类型名称,跟支付列表上对应的支付方式保持一致 */
|
|
422
408
|
name: method.name,
|
|
423
409
|
/** 支付类型type,跟支付列表上对应的支付方式保持一致 */
|
|
@@ -584,7 +570,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
584
570
|
// );
|
|
585
571
|
var orderPaymentAddedUnsubscribe = core.effects.on(CheckoutHooks.OnOrderPaymentAdded, executeIfActive( /*#__PURE__*/function () {
|
|
586
572
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) {
|
|
587
|
-
var orderInfo, balanceDueAmount, autoCloseConfig, _paymentItems, _totalAmount, serviceChargeTotal,
|
|
573
|
+
var orderInfo, balanceDueAmount, autoCloseConfig, _paymentItems, _totalAmount, serviceChargeTotal, paymentMethodName, isCashPayment, _interaction$utils3, _interaction$utils3$p;
|
|
588
574
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
589
575
|
while (1) switch (_context5.prev = _context5.next) {
|
|
590
576
|
case 0:
|
|
@@ -594,7 +580,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
594
580
|
updateOrderInfo === null || updateOrderInfo === void 0 || updateOrderInfo(orderInfo);
|
|
595
581
|
balanceDueAmount = checkoutModule.getBalanceDueAmount();
|
|
596
582
|
if (!(Number(balanceDueAmount) > 0)) {
|
|
597
|
-
_context5.next =
|
|
583
|
+
_context5.next = 14;
|
|
598
584
|
break;
|
|
599
585
|
}
|
|
600
586
|
autoCloseConfig = calculateAutoCloseConfig('partially_paid', false); // 获取订单总金额
|
|
@@ -624,16 +610,9 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
624
610
|
_totalAmount = _totalAmount.add(serviceChargeTotal);
|
|
625
611
|
}
|
|
626
612
|
console.log(_totalAmount, _paymentItems);
|
|
627
|
-
// 弹窗模式判断
|
|
628
|
-
isToastMode = paymentResultDisplayMode !== 'modal';
|
|
629
|
-
if (!isToastMode) {
|
|
630
|
-
autoCloseConfig.autoClose = false;
|
|
631
|
-
autoCloseConfig.autoCloseDelay = 0;
|
|
632
|
-
autoCloseConfig.maskClosable = false;
|
|
633
|
-
}
|
|
634
613
|
|
|
635
614
|
// 根据支付状态展示不同的 toast
|
|
636
|
-
_context5.next =
|
|
615
|
+
_context5.next = 14;
|
|
637
616
|
return displayPaymentResultToast({
|
|
638
617
|
paymentStatus: 'partially_paid',
|
|
639
618
|
orderTotalAmount: _totalAmount.toNumber(),
|
|
@@ -651,7 +630,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
651
630
|
// 不自动关闭Modal,让两个弹窗独立管理
|
|
652
631
|
}
|
|
653
632
|
}));
|
|
654
|
-
case
|
|
633
|
+
case 14:
|
|
655
634
|
// 判断是否为现金支付
|
|
656
635
|
paymentMethodName = data.paymentMethodName || data.name || '';
|
|
657
636
|
isCashPayment = data.paymentMethodCode === 'CASHMANUAL' || /现金|現金/i.test(paymentMethodName) || /cash/i.test(paymentMethodName);
|
|
@@ -670,7 +649,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
670
649
|
}
|
|
671
650
|
});
|
|
672
651
|
}
|
|
673
|
-
case
|
|
652
|
+
case 17:
|
|
674
653
|
case "end":
|
|
675
654
|
return _context5.stop();
|
|
676
655
|
}
|
|
@@ -919,11 +898,64 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
919
898
|
return walletPassRef.current.handleSearchIdentificationCode(keyword);
|
|
920
899
|
}
|
|
921
900
|
}, []);
|
|
901
|
+
var getDataFromHost = function getDataFromHost() {
|
|
902
|
+
try {
|
|
903
|
+
var is_price_include_tax = getData('is_price_include_tax');
|
|
904
|
+
var tax_rate = getData('tax_rate') || '10';
|
|
905
|
+
var tax_title = getData('tax_title') || 'GST';
|
|
906
|
+
var surcharge_list = getData('surcharge_list');
|
|
907
|
+
var schedule_list = getData('schedule_list');
|
|
908
|
+
var scheduleById = {};
|
|
909
|
+
// 提前转换,节省附加费计算时的遍历时间
|
|
910
|
+
if (Array.isArray(schedule_list)) {
|
|
911
|
+
var _iterator = _createForOfIteratorHelper(schedule_list),
|
|
912
|
+
_step;
|
|
913
|
+
try {
|
|
914
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
915
|
+
var item = _step.value;
|
|
916
|
+
scheduleById[item.id] = item;
|
|
917
|
+
}
|
|
918
|
+
} catch (err) {
|
|
919
|
+
_iterator.e(err);
|
|
920
|
+
} finally {
|
|
921
|
+
_iterator.f();
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
return {
|
|
925
|
+
is_price_include_tax: is_price_include_tax,
|
|
926
|
+
tax_rate: tax_rate,
|
|
927
|
+
tax_title: tax_title,
|
|
928
|
+
surcharge_list: surcharge_list,
|
|
929
|
+
schedule_list: schedule_list,
|
|
930
|
+
scheduleById: scheduleById
|
|
931
|
+
};
|
|
932
|
+
} catch (error) {
|
|
933
|
+
console.error(error);
|
|
934
|
+
return {};
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
// 计算当前订单总价(不包含税费那些,所以应该是产品总价)
|
|
939
|
+
var currentTotalPrice = useMemo(function () {
|
|
940
|
+
if (!showPriceAdjustModal) return 0;
|
|
941
|
+
var ScheduleModule = pisellosAllModule.ScheduleModule;
|
|
942
|
+
try {
|
|
943
|
+
var _getSumTotal = getSumTotal(state, _objectSpread({
|
|
944
|
+
isEdit: true,
|
|
945
|
+
ScheduleModule: ScheduleModule
|
|
946
|
+
}, getDataFromHost())),
|
|
947
|
+
productAmount = _getSumTotal.productAmount;
|
|
948
|
+
return productAmount;
|
|
949
|
+
} catch (error) {
|
|
950
|
+
console.error('计算总价失败:', error);
|
|
951
|
+
return 0;
|
|
952
|
+
}
|
|
953
|
+
}, [state, showPriceAdjustModal]);
|
|
922
954
|
|
|
923
955
|
// 手动折扣后订单总价
|
|
924
956
|
var currentTotalPriceAfterDiscount = useMemo(function () {
|
|
925
|
-
return new Decimal(currentTotalPrice
|
|
926
|
-
}, [
|
|
957
|
+
return new Decimal(currentTotalPrice).minus(state.shop_discount || 0).toNumber();
|
|
958
|
+
}, [state.shop_discount, currentTotalPrice]);
|
|
927
959
|
var handleSelectWalletChange = useMemoizedFn( /*#__PURE__*/function () {
|
|
928
960
|
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(select) {
|
|
929
961
|
var voucherItems, data;
|
|
@@ -987,7 +1019,14 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
987
1019
|
case 0:
|
|
988
1020
|
try {
|
|
989
1021
|
if (checkoutModule && orderInfo !== null && orderInfo !== void 0 && orderInfo.totalAmount) {
|
|
990
|
-
|
|
1022
|
+
if (dispatch) {
|
|
1023
|
+
dispatch({
|
|
1024
|
+
type: 'setState',
|
|
1025
|
+
payload: {
|
|
1026
|
+
shop_discount: discountAmount
|
|
1027
|
+
}
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
991
1030
|
}
|
|
992
1031
|
} catch (error) {
|
|
993
1032
|
console.error('Failed to adjust price:', error);
|
|
@@ -1012,42 +1051,38 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1012
1051
|
case 0:
|
|
1013
1052
|
console.log('handleButtonClick', key);
|
|
1014
1053
|
_context12.t0 = key;
|
|
1015
|
-
_context12.next = _context12.t0 === 'order-note' ? 4 : _context12.t0 === 'send-link' ? 6 : _context12.t0 === '
|
|
1054
|
+
_context12.next = _context12.t0 === 'order-note' ? 4 : _context12.t0 === 'send-link' ? 6 : _context12.t0 === 'print-receipt' ? 8 : _context12.t0 === 'manual-discount' ? 24 : _context12.t0 === 'save-pay-later' ? 38 : 40;
|
|
1016
1055
|
break;
|
|
1017
1056
|
case 4:
|
|
1018
1057
|
setNoteModalOpen(true);
|
|
1019
|
-
return _context12.abrupt("break",
|
|
1058
|
+
return _context12.abrupt("break", 40);
|
|
1020
1059
|
case 6:
|
|
1021
1060
|
setPaymentLinkModalOpen(true);
|
|
1022
|
-
return _context12.abrupt("break",
|
|
1061
|
+
return _context12.abrupt("break", 40);
|
|
1023
1062
|
case 8:
|
|
1024
|
-
|
|
1025
|
-
setShowSplitPaymentKeyboard(true);
|
|
1026
|
-
return _context12.abrupt("break", 42);
|
|
1027
|
-
case 10:
|
|
1028
|
-
_context12.next = 12;
|
|
1063
|
+
_context12.next = 10;
|
|
1029
1064
|
return checkoutModule.isCurrentOrderSynced();
|
|
1030
|
-
case
|
|
1065
|
+
case 10:
|
|
1031
1066
|
isSynced = _context12.sent;
|
|
1032
1067
|
if (isSynced) {
|
|
1033
|
-
_context12.next =
|
|
1068
|
+
_context12.next = 17;
|
|
1034
1069
|
break;
|
|
1035
1070
|
}
|
|
1036
|
-
_context12.next =
|
|
1071
|
+
_context12.next = 14;
|
|
1037
1072
|
return checkoutModule.manualSyncOrderAsync();
|
|
1038
|
-
case
|
|
1073
|
+
case 14:
|
|
1039
1074
|
data = _context12.sent;
|
|
1040
|
-
_context12.next = 23;
|
|
1041
|
-
break;
|
|
1042
|
-
case 19:
|
|
1043
1075
|
_context12.next = 21;
|
|
1076
|
+
break;
|
|
1077
|
+
case 17:
|
|
1078
|
+
_context12.next = 19;
|
|
1044
1079
|
return checkoutModule.getCurrentOrderId();
|
|
1045
|
-
case
|
|
1080
|
+
case 19:
|
|
1046
1081
|
_orderId2 = _context12.sent;
|
|
1047
1082
|
data = {
|
|
1048
1083
|
orderId: _orderId2
|
|
1049
1084
|
};
|
|
1050
|
-
case
|
|
1085
|
+
case 21:
|
|
1051
1086
|
console.log('handleButtonClick_print-receipt_data>>>>', data);
|
|
1052
1087
|
// data.orderId 就是订单号,可以用来打印小票
|
|
1053
1088
|
if (data.orderId) {
|
|
@@ -1068,40 +1103,40 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1068
1103
|
console.error('handleButtonClick_print-receipt_error>>>>', error);
|
|
1069
1104
|
}
|
|
1070
1105
|
}
|
|
1071
|
-
return _context12.abrupt("break",
|
|
1072
|
-
case
|
|
1106
|
+
return _context12.abrupt("break", 40);
|
|
1107
|
+
case 24:
|
|
1073
1108
|
if (orderInfo !== null && orderInfo !== void 0 && orderInfo.totalAmount) {
|
|
1074
|
-
_context12.next =
|
|
1109
|
+
_context12.next = 27;
|
|
1075
1110
|
break;
|
|
1076
1111
|
}
|
|
1077
1112
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.manual-discount.no-amount'));
|
|
1078
1113
|
return _context12.abrupt("return");
|
|
1079
|
-
case
|
|
1080
|
-
_context12.next =
|
|
1114
|
+
case 27:
|
|
1115
|
+
_context12.next = 29;
|
|
1081
1116
|
return checkoutModule.getCurrentOrderPaymentItemsAsync();
|
|
1082
|
-
case
|
|
1117
|
+
case 29:
|
|
1083
1118
|
_paymentItems2 = _context12.sent;
|
|
1084
1119
|
if (!(_paymentItems2 !== null && _paymentItems2 !== void 0 && _paymentItems2.length)) {
|
|
1085
|
-
_context12.next =
|
|
1120
|
+
_context12.next = 33;
|
|
1086
1121
|
break;
|
|
1087
1122
|
}
|
|
1088
1123
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.manual-discount.has-payment-items'));
|
|
1089
1124
|
return _context12.abrupt("return");
|
|
1090
|
-
case
|
|
1125
|
+
case 33:
|
|
1091
1126
|
if (!(Number(customAmount) <= 0 && Number(orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.totalAmount) >= 0)) {
|
|
1092
|
-
_context12.next =
|
|
1127
|
+
_context12.next = 36;
|
|
1093
1128
|
break;
|
|
1094
1129
|
}
|
|
1095
1130
|
Toast === null || Toast === void 0 || Toast.fail(locales.getText('pisell2.checkout.manual-discount.no-amount'));
|
|
1096
1131
|
return _context12.abrupt("return");
|
|
1097
|
-
case
|
|
1132
|
+
case 36:
|
|
1098
1133
|
setShowPriceAdjustModal(true);
|
|
1099
|
-
return _context12.abrupt("break",
|
|
1100
|
-
case
|
|
1134
|
+
return _context12.abrupt("break", 40);
|
|
1135
|
+
case 38:
|
|
1101
1136
|
// 通过 ref 调用 SavePayLaterHandler 的处理方法
|
|
1102
1137
|
(_savePayLaterHandlerR = savePayLaterHandlerRef.current) === null || _savePayLaterHandlerR === void 0 || _savePayLaterHandlerR.handleSavePayLaterClick();
|
|
1103
|
-
return _context12.abrupt("break",
|
|
1104
|
-
case
|
|
1138
|
+
return _context12.abrupt("break", 40);
|
|
1139
|
+
case 40:
|
|
1105
1140
|
case "end":
|
|
1106
1141
|
return _context12.stop();
|
|
1107
1142
|
}
|
|
@@ -1119,8 +1154,8 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1119
1154
|
};
|
|
1120
1155
|
});
|
|
1121
1156
|
var getCustomerInfo = function getCustomerInfo() {
|
|
1122
|
-
var _client$contacts;
|
|
1123
|
-
|
|
1157
|
+
var _state$client, _client$contacts;
|
|
1158
|
+
var client = state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
|
|
1124
1159
|
|
|
1125
1160
|
// 修复逻辑:只有在 undefined 或 null 时才使用默认值,空字符串应该保留
|
|
1126
1161
|
var getValidName = function getValidName(value) {
|
|
@@ -1185,11 +1220,13 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1185
1220
|
};
|
|
1186
1221
|
}();
|
|
1187
1222
|
var searchAndClientProps = useMemo(function () {
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1223
|
+
if ((paymentItems === null || paymentItems === void 0 ? void 0 : paymentItems.length) > 0) {
|
|
1224
|
+
return {
|
|
1225
|
+
disabledSwitch: true
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
return {};
|
|
1229
|
+
}, [paymentItems]);
|
|
1193
1230
|
var roundingFunction = /*#__PURE__*/function () {
|
|
1194
1231
|
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(amount) {
|
|
1195
1232
|
var res;
|
|
@@ -1215,10 +1252,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1215
1252
|
// 处理PaymentModal区域的点击事件
|
|
1216
1253
|
var handleModalClick = useCallback(function (event) {
|
|
1217
1254
|
// 关闭所有Toast
|
|
1218
|
-
|
|
1219
|
-
if (isToastMode) {
|
|
1220
|
-
closeAllPaymentResultToasts();
|
|
1221
|
-
}
|
|
1255
|
+
closeAllPaymentResultToasts();
|
|
1222
1256
|
}, []);
|
|
1223
1257
|
return /*#__PURE__*/React.createElement("div", {
|
|
1224
1258
|
ref: checkoutRef,
|
|
@@ -1239,14 +1273,14 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1239
1273
|
},
|
|
1240
1274
|
onSearch: handleSearch
|
|
1241
1275
|
}, searchAndClientProps)), moduleConfig.showWalletPass && /*#__PURE__*/React.createElement(WalletPassModule, {
|
|
1242
|
-
clientId:
|
|
1276
|
+
clientId: state === null || state === void 0 || (_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id,
|
|
1243
1277
|
customAmount: balanceDueAmount,
|
|
1244
1278
|
orderInfo: orderInfo || undefined,
|
|
1245
1279
|
ref: walletPassRef,
|
|
1246
1280
|
paymentItems: paymentItems,
|
|
1247
1281
|
onSelectChange: handleSelectWalletChange
|
|
1248
1282
|
})), /*#__PURE__*/React.createElement(AmountSummary, {
|
|
1249
|
-
amountSymbol:
|
|
1283
|
+
amountSymbol: state.amountSymbol,
|
|
1250
1284
|
orderInfo: orderInfo || undefined,
|
|
1251
1285
|
cartData: cartData,
|
|
1252
1286
|
open_deposit: open_deposit,
|
|
@@ -1254,7 +1288,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1254
1288
|
balanceDueAmount: balanceDueAmount,
|
|
1255
1289
|
paymentItems: paymentItems,
|
|
1256
1290
|
walletPassData: walletPassData,
|
|
1257
|
-
clientInfo: client,
|
|
1291
|
+
clientInfo: state === null || state === void 0 || (_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.value,
|
|
1258
1292
|
onAmountChange: handleAmountChange,
|
|
1259
1293
|
onDepositStatusChange: handleDepositStatusChange,
|
|
1260
1294
|
onBalanceDueAmountClick: handleButtonClick,
|
|
@@ -1265,7 +1299,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1265
1299
|
}, showCashPayment && /*#__PURE__*/React.createElement("div", {
|
|
1266
1300
|
style: showCashPayment ? {
|
|
1267
1301
|
gridColumn: '1',
|
|
1268
|
-
gridRow:
|
|
1302
|
+
gridRow: '1'
|
|
1269
1303
|
} : {}
|
|
1270
1304
|
}, /*#__PURE__*/React.createElement(CashPaymentModule, {
|
|
1271
1305
|
disabled: isOrderFree,
|
|
@@ -1278,16 +1312,15 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1278
1312
|
customAmount: customAmount,
|
|
1279
1313
|
roundingFunction: roundingFunction,
|
|
1280
1314
|
balanceDueAmount: balanceDueAmount,
|
|
1281
|
-
balanceDueTotalAmount: balanceDueTotalAmount
|
|
1282
|
-
|
|
1283
|
-
})), moduleConfig.showPaymentOptions && (paymentOptionList === null || paymentOptionList === void 0 ? void 0 : paymentOptionList.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
1315
|
+
balanceDueTotalAmount: balanceDueTotalAmount
|
|
1316
|
+
})), moduleConfig.showPaymentOptions && /*#__PURE__*/React.createElement("div", {
|
|
1284
1317
|
className: showCashPayment ? '' : 'payment-options-module-container',
|
|
1285
1318
|
style: showCashPayment ? {
|
|
1286
1319
|
gridColumn: '2',
|
|
1287
|
-
gridRow:
|
|
1320
|
+
gridRow: '1 / 3'
|
|
1288
1321
|
} : {}
|
|
1289
1322
|
}, /*#__PURE__*/React.createElement(PaymentOptionsModule, {
|
|
1290
|
-
amountSymbol:
|
|
1323
|
+
amountSymbol: state.amountSymbol,
|
|
1291
1324
|
orderInfo: orderInfo || undefined,
|
|
1292
1325
|
onClick: onPaymentOptionClick,
|
|
1293
1326
|
paymentMethods: paymentMethods,
|
|
@@ -1298,8 +1331,8 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1298
1331
|
})), moduleConfig.showAdditionalModule && /*#__PURE__*/React.createElement("div", {
|
|
1299
1332
|
className: showCashPayment ? '' : 'additional-module-container',
|
|
1300
1333
|
style: showCashPayment ? {
|
|
1301
|
-
gridColumn:
|
|
1302
|
-
gridRow:
|
|
1334
|
+
gridColumn: '1',
|
|
1335
|
+
gridRow: '2'
|
|
1303
1336
|
} : {}
|
|
1304
1337
|
}, /*#__PURE__*/React.createElement(AdditionalModule, {
|
|
1305
1338
|
orderInfo: orderInfo || undefined,
|
|
@@ -1307,9 +1340,7 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1307
1340
|
handleButtonClick: handleButtonClick,
|
|
1308
1341
|
hasOrderNote: !!orderNote && orderNote.trim().length > 0,
|
|
1309
1342
|
disabled: isOrderFree,
|
|
1310
|
-
showCashPayment: showCashPayment
|
|
1311
|
-
isFullWidth: !((paymentOptionList === null || paymentOptionList === void 0 ? void 0 : paymentOptionList.length) > 3 || (paymentOptionList === null || paymentOptionList === void 0 ? void 0 : paymentOptionList.length) <= 1),
|
|
1312
|
-
showMore: !(showCashPayment && (paymentOptionList === null || paymentOptionList === void 0 ? void 0 : paymentOptionList.length) === 0)
|
|
1343
|
+
showCashPayment: showCashPayment
|
|
1313
1344
|
}))), /*#__PURE__*/React.createElement(PaymentMethods, {
|
|
1314
1345
|
ref: paymentMethodsRef,
|
|
1315
1346
|
dynamicMaxHeight: dynamicMaxHeight,
|
|
@@ -1331,7 +1362,6 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1331
1362
|
return setShowPriceAdjustModal(false);
|
|
1332
1363
|
}
|
|
1333
1364
|
},
|
|
1334
|
-
tips: locales.getText('pisell2.checkout.modal.price-adjustment-tips') || 'Changing amount will update order total',
|
|
1335
1365
|
selectType: "dark",
|
|
1336
1366
|
originalValue: currentTotalPrice,
|
|
1337
1367
|
defaultValue: currentTotalPriceAfterDiscount,
|
|
@@ -1339,43 +1369,9 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1339
1369
|
onEnter: handlePriceAdjustConfirm
|
|
1340
1370
|
}), /*#__PURE__*/React.createElement(SavePayLaterHandler, {
|
|
1341
1371
|
ref: savePayLaterHandlerRef,
|
|
1342
|
-
amountSymbol:
|
|
1372
|
+
amountSymbol: state.amountSymbol,
|
|
1343
1373
|
walletPassData: walletPassData,
|
|
1344
1374
|
onSavePayLater: handleSavePayLater
|
|
1345
|
-
}), /*#__PURE__*/React.createElement(PaymentKeyboard, {
|
|
1346
|
-
containerProps: {
|
|
1347
|
-
renderType: 'modal',
|
|
1348
|
-
open: showSplitPaymentKeyboard,
|
|
1349
|
-
onCancel: function onCancel() {
|
|
1350
|
-
return setShowSplitPaymentKeyboard(false);
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
// 原始值:此支付阶段的待支付金额,reset时还原为此值
|
|
1354
|
-
,
|
|
1355
|
-
paymentOriginalValue: balanceDueAmount,
|
|
1356
|
-
paymentDefaultValue: String(customAmount || 0),
|
|
1357
|
-
enableExceedMaxAmount: false,
|
|
1358
|
-
payment: {
|
|
1359
|
-
enable: true
|
|
1360
|
-
},
|
|
1361
|
-
surcharge: {
|
|
1362
|
-
enable: false
|
|
1363
|
-
},
|
|
1364
|
-
surchargeDefaultValue: {
|
|
1365
|
-
percent: '0',
|
|
1366
|
-
fixed: '0'
|
|
1367
|
-
},
|
|
1368
|
-
selectType: "light",
|
|
1369
|
-
onChange: function onChange(value) {
|
|
1370
|
-
console.log(value);
|
|
1371
|
-
},
|
|
1372
|
-
doneText: locales.getText('confirm') || '确认',
|
|
1373
|
-
onPay: function onPay(args) {
|
|
1374
|
-
console.log(args);
|
|
1375
|
-
// 处理支付逻辑
|
|
1376
|
-
setShowSplitPaymentKeyboard(false);
|
|
1377
|
-
handleAmountChange(String(args.amount));
|
|
1378
|
-
}
|
|
1379
1375
|
}));
|
|
1380
1376
|
});
|
|
1381
1377
|
|
|
@@ -1387,20 +1383,10 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1387
1383
|
data = _ref18.data,
|
|
1388
1384
|
callback = _ref18.callback,
|
|
1389
1385
|
onClose = _ref18.onClose,
|
|
1386
|
+
dispatch = _ref18.dispatch,
|
|
1387
|
+
state = _ref18.state,
|
|
1390
1388
|
setEditCartMode = _ref18.setEditCartMode,
|
|
1391
|
-
editOrderId = _ref18.editOrderId
|
|
1392
|
-
paymentResultDisplayMode = _ref18.paymentResultDisplayMode,
|
|
1393
|
-
shopDiscount = _ref18.shopDiscount,
|
|
1394
|
-
client = _ref18.client,
|
|
1395
|
-
currentTotalPrice = _ref18.currentTotalPrice,
|
|
1396
|
-
onChangeShopDiscount = _ref18.onChangeShopDiscount,
|
|
1397
|
-
onChangeOrderNote = _ref18.onChangeOrderNote,
|
|
1398
|
-
onDeleteOrderNote = _ref18.onDeleteOrderNote,
|
|
1399
|
-
_ref18$config = _ref18.config,
|
|
1400
|
-
config = _ref18$config === void 0 ? {
|
|
1401
|
-
showHeaderCenter: true,
|
|
1402
|
-
showHeaderRightButton: true
|
|
1403
|
-
} : _ref18$config;
|
|
1389
|
+
editOrderId = _ref18.editOrderId;
|
|
1404
1390
|
var context = useEngineContext();
|
|
1405
1391
|
locales.init(checkoutLocales, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get('umi_locale')) || 'en');
|
|
1406
1392
|
var _ref19 = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
|
@@ -1408,34 +1394,30 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1408
1394
|
getData = _ref19.getData,
|
|
1409
1395
|
interaction = _ref19.interaction,
|
|
1410
1396
|
isWebPos = _ref19.isWebPos;
|
|
1411
|
-
var
|
|
1397
|
+
var _useState25 = useState(null),
|
|
1398
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
1399
|
+
orderInfo = _useState26[0],
|
|
1400
|
+
setOrderInfo = _useState26[1];
|
|
1401
|
+
var _useState27 = useState(0),
|
|
1412
1402
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
var _useState29 = useState(
|
|
1403
|
+
totalAmount = _useState28[0],
|
|
1404
|
+
setTotalAmount = _useState28[1];
|
|
1405
|
+
var _useState29 = useState(true),
|
|
1416
1406
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
var _useState31 = useState(
|
|
1407
|
+
actualShowCashPayment = _useState30[0],
|
|
1408
|
+
setActualShowCashPayment = _useState30[1];
|
|
1409
|
+
var _useState31 = useState(0),
|
|
1420
1410
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
var _useState33 = useState(
|
|
1411
|
+
windowHeight = _useState32[0],
|
|
1412
|
+
setWindowHeight = _useState32[1];
|
|
1413
|
+
var _useState33 = useState(false),
|
|
1424
1414
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
var _useState35 = useState(
|
|
1415
|
+
showRetryModal = _useState34[0],
|
|
1416
|
+
setShowRetryModal = _useState34[1];
|
|
1417
|
+
var _useState35 = useState(editOrderId || 0),
|
|
1428
1418
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
var _useState37 = useState(false),
|
|
1432
|
-
_useState38 = _slicedToArray(_useState37, 2),
|
|
1433
|
-
showCreateErrorModal = _useState38[0],
|
|
1434
|
-
setShowCreateErrorModal = _useState38[1];
|
|
1435
|
-
var _useState39 = useState(editOrderId || 0),
|
|
1436
|
-
_useState40 = _slicedToArray(_useState39, 2),
|
|
1437
|
-
currentEditOrderId = _useState40[0],
|
|
1438
|
-
_setCurrentEditOrderId = _useState40[1];
|
|
1419
|
+
currentEditOrderId = _useState36[0],
|
|
1420
|
+
_setCurrentEditOrderId = _useState36[1];
|
|
1439
1421
|
var _useActiveExecute2 = useActiveExecute(),
|
|
1440
1422
|
executeIfActive = _useActiveExecute2.executeIfActive;
|
|
1441
1423
|
var Toast = useToast();
|
|
@@ -1572,18 +1554,18 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1572
1554
|
}, []);
|
|
1573
1555
|
|
|
1574
1556
|
// 订单备注相关状态
|
|
1575
|
-
var
|
|
1557
|
+
var _useState37 = useState(false),
|
|
1558
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
1559
|
+
noteModalOpen = _useState38[0],
|
|
1560
|
+
setNoteModalOpen = _useState38[1];
|
|
1561
|
+
var _useState39 = useState(''),
|
|
1562
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
1563
|
+
orderNote = _useState40[0],
|
|
1564
|
+
setOrderNote = _useState40[1];
|
|
1565
|
+
var _useState41 = useState('payment-content'),
|
|
1576
1566
|
_useState42 = _slicedToArray(_useState41, 2),
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
var _useState43 = useState(''),
|
|
1580
|
-
_useState44 = _slicedToArray(_useState43, 2),
|
|
1581
|
-
orderNote = _useState44[0],
|
|
1582
|
-
setOrderNote = _useState44[1];
|
|
1583
|
-
var _useState45 = useState('payment-content'),
|
|
1584
|
-
_useState46 = _slicedToArray(_useState45, 2),
|
|
1585
|
-
noteModalSource = _useState46[0],
|
|
1586
|
-
setNoteModalSource = _useState46[1];
|
|
1567
|
+
noteModalSource = _useState42[0],
|
|
1568
|
+
setNoteModalSource = _useState42[1];
|
|
1587
1569
|
|
|
1588
1570
|
// 订单备注相关处理函数
|
|
1589
1571
|
var handleNoteConfirm = /*#__PURE__*/function () {
|
|
@@ -1619,7 +1601,15 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1619
1601
|
Toast === null || Toast === void 0 || Toast.success(locales.getText('pisell2.checkout.order-note.updated-successfully'));
|
|
1620
1602
|
case 13:
|
|
1621
1603
|
// 同时把购物车的也给改了
|
|
1622
|
-
|
|
1604
|
+
if (dispatch) {
|
|
1605
|
+
dispatch({
|
|
1606
|
+
type: 'setNotes',
|
|
1607
|
+
payload: {
|
|
1608
|
+
orderNote: noteValue,
|
|
1609
|
+
edit: true
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1623
1613
|
|
|
1624
1614
|
// 根据打开来源执行不同的逻辑
|
|
1625
1615
|
if (noteModalSource === 'payment-result-toast') {
|
|
@@ -1668,7 +1658,15 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1668
1658
|
Toast === null || Toast === void 0 || Toast.success(locales.getText('pisell2.checkout.order-note.deleted-successfully'));
|
|
1669
1659
|
case 7:
|
|
1670
1660
|
// 同时把购物车的也给改了
|
|
1671
|
-
|
|
1661
|
+
if (dispatch) {
|
|
1662
|
+
dispatch({
|
|
1663
|
+
type: 'setNotes',
|
|
1664
|
+
payload: {
|
|
1665
|
+
orderNote: '',
|
|
1666
|
+
edit: true
|
|
1667
|
+
}
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1672
1670
|
_context18.next = 14;
|
|
1673
1671
|
break;
|
|
1674
1672
|
case 10:
|
|
@@ -1992,9 +1990,9 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
1992
1990
|
handlePaymentCancel(false);
|
|
1993
1991
|
}
|
|
1994
1992
|
}
|
|
1995
|
-
})),
|
|
1993
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1996
1994
|
className: "header__center"
|
|
1997
|
-
}, translation('order.total'), "\uFF1A", formatCurrency(totalAmount,
|
|
1995
|
+
}, translation('order.total'), "\uFF1A", formatCurrency(totalAmount, state === null || state === void 0 ? void 0 : state.amountSymbol)), /*#__PURE__*/React.createElement("div", {
|
|
1998
1996
|
className: "header__right"
|
|
1999
1997
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
2000
1998
|
size: "small",
|
|
@@ -2020,7 +2018,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2020
2018
|
useEffect(function () {
|
|
2021
2019
|
var initCheckoutData = /*#__PURE__*/function () {
|
|
2022
2020
|
var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
2023
|
-
var checkout, shop_wallet_pass_id, newData,
|
|
2021
|
+
var checkout, shop_wallet_pass_id, newData, _newData$subtotal_inf, _newData$subtotal_inf2, _orderInfo2, _data$subtotal_info, _data$subtotal_info2, _orderInfo4;
|
|
2024
2022
|
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
2025
2023
|
while (1) switch (_context23.prev = _context23.next) {
|
|
2026
2024
|
case 0:
|
|
@@ -2028,7 +2026,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2028
2026
|
// 获取 checkout 模块并处理订单数据
|
|
2029
2027
|
checkout = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule('checkout');
|
|
2030
2028
|
if (!(checkout && data && !isLocalOrderCreated.current)) {
|
|
2031
|
-
_context23.next =
|
|
2029
|
+
_context23.next = 25;
|
|
2032
2030
|
break;
|
|
2033
2031
|
}
|
|
2034
2032
|
isLocalOrderCreated.current = true;
|
|
@@ -2048,26 +2046,24 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2048
2046
|
order_rounding_setting: getData('order_rounding_setting'),
|
|
2049
2047
|
shop_wallet_pass_id: shop_wallet_pass_id
|
|
2050
2048
|
});
|
|
2051
|
-
newData = cloneDeep(data);
|
|
2052
|
-
existPayment = newData.existPayment; // setTotalAmount(newData.total.expectAmount);
|
|
2049
|
+
newData = cloneDeep(data); // setTotalAmount(newData.total.expectAmount);
|
|
2053
2050
|
// 先往 checkout 解决方案推送一条 local 数据
|
|
2054
2051
|
if (!(editOrderId || currentEditOrderId)) {
|
|
2055
|
-
_context23.next =
|
|
2052
|
+
_context23.next = 14;
|
|
2056
2053
|
break;
|
|
2057
2054
|
}
|
|
2058
|
-
_context23.next =
|
|
2055
|
+
_context23.next = 12;
|
|
2059
2056
|
return checkout.updateLocalOrderAsync({
|
|
2060
2057
|
orderId: editOrderId || currentEditOrderId,
|
|
2061
2058
|
orderData: newData.order_info,
|
|
2062
2059
|
cartSummary: (_newData$subtotal_inf = newData.subtotal_info) === null || _newData$subtotal_inf === void 0 ? void 0 : _newData$subtotal_inf.subTotalList,
|
|
2063
2060
|
autoPayment: true,
|
|
2064
|
-
totalInfo: newData.subtotal_info
|
|
2065
|
-
existPayment: existPayment
|
|
2061
|
+
totalInfo: newData.subtotal_info
|
|
2066
2062
|
});
|
|
2067
|
-
case
|
|
2068
|
-
_context23.next =
|
|
2063
|
+
case 12:
|
|
2064
|
+
_context23.next = 17;
|
|
2069
2065
|
break;
|
|
2070
|
-
case
|
|
2066
|
+
case 14:
|
|
2071
2067
|
logger === null || logger === void 0 || logger.addLog({
|
|
2072
2068
|
type: 'info',
|
|
2073
2069
|
title: '正常创建 createLocalOrderAsync',
|
|
@@ -2075,14 +2071,14 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2075
2071
|
data: data
|
|
2076
2072
|
}
|
|
2077
2073
|
});
|
|
2078
|
-
_context23.next =
|
|
2074
|
+
_context23.next = 17;
|
|
2079
2075
|
return checkout.createLocalOrderAsync({
|
|
2080
2076
|
orderData: newData.order_info,
|
|
2081
2077
|
cartSummary: (_newData$subtotal_inf2 = newData.subtotal_info) === null || _newData$subtotal_inf2 === void 0 ? void 0 : _newData$subtotal_inf2.subTotalList,
|
|
2082
2078
|
autoPayment: true,
|
|
2083
2079
|
totalInfo: newData.subtotal_info
|
|
2084
2080
|
});
|
|
2085
|
-
case
|
|
2081
|
+
case 17:
|
|
2086
2082
|
// 获取订单总金额
|
|
2087
2083
|
_orderInfo2 = checkout.getCurrentOrderInfo();
|
|
2088
2084
|
console.log(_orderInfo2);
|
|
@@ -2103,7 +2099,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2103
2099
|
unsubscribeRef.current = checkout.core.effects.on('checkout:onOrderSynced', executeIfActive( /*#__PURE__*/function () {
|
|
2104
2100
|
var _ref29 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(data) {
|
|
2105
2101
|
var _data$response, _responseData$payment2;
|
|
2106
|
-
var currentOrderId, responseData, paymentStatus, orderTotalAmount, gapAmount, currentChangeGivenAmount, failureReason, _responseData$payment3, params, statusClassName, autoCloseConfig, enabledAutoPrint, _interaction$utils6, _interaction$utils6$a, _orderInfo3,
|
|
2102
|
+
var currentOrderId, responseData, paymentStatus, orderTotalAmount, gapAmount, currentChangeGivenAmount, failureReason, _responseData$payment3, params, statusClassName, autoCloseConfig, enabledAutoPrint, _interaction$utils6, _interaction$utils6$a, _orderInfo3, paymentResult;
|
|
2107
2103
|
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
2108
2104
|
while (1) switch (_context22.prev = _context22.next) {
|
|
2109
2105
|
case 0:
|
|
@@ -2134,7 +2130,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2134
2130
|
// 获取失败原因
|
|
2135
2131
|
failureReason = responseData === null || responseData === void 0 ? void 0 : responseData.failure_reason; // 根据支付状态弹出对应的支付结果toast
|
|
2136
2132
|
if (!paymentStatus) {
|
|
2137
|
-
_context22.next =
|
|
2133
|
+
_context22.next = 35;
|
|
2138
2134
|
break;
|
|
2139
2135
|
}
|
|
2140
2136
|
// 打印订单完整信息
|
|
@@ -2207,16 +2203,8 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2207
2203
|
case 26:
|
|
2208
2204
|
enabledAutoPrint = _context22.sent;
|
|
2209
2205
|
case 27:
|
|
2210
|
-
_orderInfo3 = checkout.getCurrentOrderInfo(); //
|
|
2211
|
-
|
|
2212
|
-
if (!isToastMode) {
|
|
2213
|
-
autoCloseConfig.autoClose = false;
|
|
2214
|
-
autoCloseConfig.autoCloseDelay = 0;
|
|
2215
|
-
autoCloseConfig.maskClosable = false;
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
// 根据支付状态展示不同的 toast
|
|
2219
|
-
_context22.next = 32;
|
|
2206
|
+
_orderInfo3 = checkout.getCurrentOrderInfo(); // 根据支付状态展示不同的 toast
|
|
2207
|
+
_context22.next = 30;
|
|
2220
2208
|
return displayPaymentResultToast({
|
|
2221
2209
|
paymentStatus: paymentStatus,
|
|
2222
2210
|
orderTotalAmount: _orderInfo3.isDeposit ? _orderInfo3.depositAmount : orderTotalAmount,
|
|
@@ -2225,7 +2213,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2225
2213
|
autoCloseConfig: autoCloseConfig,
|
|
2226
2214
|
actionButtons: generateActionButtons(paymentStatus, enabledAutoPrint)
|
|
2227
2215
|
}, paymentResultToastConfig);
|
|
2228
|
-
case
|
|
2216
|
+
case 30:
|
|
2229
2217
|
// 当支付状态为 paid 时,关闭 paymentModal
|
|
2230
2218
|
if (paymentStatus === 'paid') {
|
|
2231
2219
|
handleModalClose();
|
|
@@ -2241,11 +2229,11 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2241
2229
|
}
|
|
2242
2230
|
});
|
|
2243
2231
|
handlePaymentComplete(paymentResult);
|
|
2244
|
-
_context22.next =
|
|
2232
|
+
_context22.next = 36;
|
|
2245
2233
|
break;
|
|
2246
|
-
case
|
|
2234
|
+
case 35:
|
|
2247
2235
|
handlePaymentComplete(data);
|
|
2248
|
-
case
|
|
2236
|
+
case 36:
|
|
2249
2237
|
case "end":
|
|
2250
2238
|
return _context22.stop();
|
|
2251
2239
|
}
|
|
@@ -2255,24 +2243,24 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2255
2243
|
return _ref29.apply(this, arguments);
|
|
2256
2244
|
};
|
|
2257
2245
|
}()));
|
|
2258
|
-
_context23.next =
|
|
2246
|
+
_context23.next = 42;
|
|
2259
2247
|
break;
|
|
2260
|
-
case
|
|
2248
|
+
case 25:
|
|
2261
2249
|
if (!isLocalOrderCreated.current) {
|
|
2262
|
-
_context23.next =
|
|
2250
|
+
_context23.next = 42;
|
|
2263
2251
|
break;
|
|
2264
2252
|
}
|
|
2265
2253
|
// // 如果本地订单已创建,这时候还更新了 data,则需要销毁当前的订单数据,然后更新新的订单数据了
|
|
2266
2254
|
console.log('🔄 PaymentModal: data changed, updating checkout data...');
|
|
2267
2255
|
isLocalOrderCreated.current = false;
|
|
2268
|
-
_context23.next =
|
|
2256
|
+
_context23.next = 30;
|
|
2269
2257
|
return checkout.cancelCurrentOrderAsync();
|
|
2270
|
-
case
|
|
2258
|
+
case 30:
|
|
2271
2259
|
if (!(editOrderId || currentEditOrderId)) {
|
|
2272
|
-
_context23.next =
|
|
2260
|
+
_context23.next = 35;
|
|
2273
2261
|
break;
|
|
2274
2262
|
}
|
|
2275
|
-
_context23.next =
|
|
2263
|
+
_context23.next = 33;
|
|
2276
2264
|
return checkout.updateLocalOrderAsync({
|
|
2277
2265
|
orderId: editOrderId || currentEditOrderId,
|
|
2278
2266
|
orderData: data === null || data === void 0 ? void 0 : data.order_info,
|
|
@@ -2280,10 +2268,10 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2280
2268
|
autoPayment: true,
|
|
2281
2269
|
totalInfo: data === null || data === void 0 ? void 0 : data.subtotal_info
|
|
2282
2270
|
});
|
|
2283
|
-
case
|
|
2284
|
-
_context23.next =
|
|
2271
|
+
case 33:
|
|
2272
|
+
_context23.next = 38;
|
|
2285
2273
|
break;
|
|
2286
|
-
case
|
|
2274
|
+
case 35:
|
|
2287
2275
|
logger === null || logger === void 0 || logger.addLog({
|
|
2288
2276
|
type: 'info',
|
|
2289
2277
|
title: '含有 localOrderCreate, 调用 createLocalOrderAsync',
|
|
@@ -2291,14 +2279,14 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2291
2279
|
data: data
|
|
2292
2280
|
}
|
|
2293
2281
|
});
|
|
2294
|
-
_context23.next =
|
|
2282
|
+
_context23.next = 38;
|
|
2295
2283
|
return checkout.createLocalOrderAsync({
|
|
2296
2284
|
orderData: data === null || data === void 0 ? void 0 : data.order_info,
|
|
2297
2285
|
cartSummary: data === null || data === void 0 || (_data$subtotal_info2 = data.subtotal_info) === null || _data$subtotal_info2 === void 0 ? void 0 : _data$subtotal_info2.subTotalList,
|
|
2298
2286
|
autoPayment: true,
|
|
2299
2287
|
totalInfo: data === null || data === void 0 ? void 0 : data.subtotal_info
|
|
2300
2288
|
});
|
|
2301
|
-
case
|
|
2289
|
+
case 38:
|
|
2302
2290
|
// 获取订单总金额
|
|
2303
2291
|
_orderInfo4 = checkout.getCurrentOrderInfo();
|
|
2304
2292
|
if (_orderInfo4 && _orderInfo4.totalAmount) {
|
|
@@ -2306,11 +2294,11 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2306
2294
|
}
|
|
2307
2295
|
setOrderInfo(_orderInfo4);
|
|
2308
2296
|
isLocalOrderCreated.current = true;
|
|
2309
|
-
case
|
|
2310
|
-
_context23.next =
|
|
2297
|
+
case 42:
|
|
2298
|
+
_context23.next = 48;
|
|
2311
2299
|
break;
|
|
2312
|
-
case
|
|
2313
|
-
_context23.prev =
|
|
2300
|
+
case 44:
|
|
2301
|
+
_context23.prev = 44;
|
|
2314
2302
|
_context23.t0 = _context23["catch"](0);
|
|
2315
2303
|
console.error('Failed to initialize checkout data:', _context23.t0);
|
|
2316
2304
|
logger === null || logger === void 0 || logger.addLog({
|
|
@@ -2320,13 +2308,11 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2320
2308
|
error: _context23.t0
|
|
2321
2309
|
}
|
|
2322
2310
|
});
|
|
2323
|
-
|
|
2324
|
-
setShowCreateErrorModal(true);
|
|
2325
|
-
case 50:
|
|
2311
|
+
case 48:
|
|
2326
2312
|
case "end":
|
|
2327
2313
|
return _context23.stop();
|
|
2328
2314
|
}
|
|
2329
|
-
}, _callee23, null, [[0,
|
|
2315
|
+
}, _callee23, null, [[0, 44]]);
|
|
2330
2316
|
}));
|
|
2331
2317
|
return function initCheckoutData() {
|
|
2332
2318
|
return _ref28.apply(this, arguments);
|
|
@@ -2353,12 +2339,12 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2353
2339
|
getData: getData,
|
|
2354
2340
|
interaction: interaction,
|
|
2355
2341
|
Toast: Toast,
|
|
2342
|
+
state: state,
|
|
2356
2343
|
onToastClose: handleToastClose
|
|
2357
2344
|
};
|
|
2358
2345
|
|
|
2359
2346
|
// 支付结果弹窗按钮生成函数
|
|
2360
|
-
var generateActionButtons = function generateActionButtons(paymentStatus) {
|
|
2361
|
-
var enabledAutoPrint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2347
|
+
var generateActionButtons = function generateActionButtons(paymentStatus, enabledAutoPrint) {
|
|
2362
2348
|
var getClassName = function getClassName(suffix) {
|
|
2363
2349
|
return "payment-result-toast-".concat(suffix);
|
|
2364
2350
|
};
|
|
@@ -2767,13 +2753,8 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2767
2753
|
onPaymentCancel: handlePaymentCancel
|
|
2768
2754
|
// onStatusChange={(status) => console.log('Status changed:', status)}
|
|
2769
2755
|
,
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
client: client,
|
|
2773
|
-
currentTotalPrice: currentTotalPrice,
|
|
2774
|
-
onChangeShopDiscount: onChangeShopDiscount,
|
|
2775
|
-
onChangeOrderNote: onChangeOrderNote,
|
|
2776
|
-
onDeleteOrderNote: onDeleteOrderNote,
|
|
2756
|
+
dispatch: dispatch,
|
|
2757
|
+
state: state,
|
|
2777
2758
|
showingCashToastRef: showingCashToastRef,
|
|
2778
2759
|
onToastClose: handleToastClose,
|
|
2779
2760
|
orderNote: orderNote,
|
|
@@ -2795,8 +2776,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2795
2776
|
},
|
|
2796
2777
|
setCurrentEditOrderId: function setCurrentEditOrderId(orderId) {
|
|
2797
2778
|
return _setCurrentEditOrderId(orderId);
|
|
2798
|
-
}
|
|
2799
|
-
config: config
|
|
2779
|
+
}
|
|
2800
2780
|
})), noteModalOpen && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NoteModal, {
|
|
2801
2781
|
open: noteModalOpen,
|
|
2802
2782
|
title: locales.getText('pisell2.text.add-order-notes'),
|
|
@@ -2834,39 +2814,7 @@ var PaymentModal = function PaymentModal(_ref18) {
|
|
|
2834
2814
|
width: '100%',
|
|
2835
2815
|
marginTop: '80px'
|
|
2836
2816
|
}
|
|
2837
|
-
}, locales.getText('retry') || '重试')))
|
|
2838
|
-
renderType: "modal",
|
|
2839
|
-
props: {
|
|
2840
|
-
open: showCreateErrorModal,
|
|
2841
|
-
title: locales.getText('pisell2.checkout.tips'),
|
|
2842
|
-
footer: null,
|
|
2843
|
-
keyboard: false,
|
|
2844
|
-
onCancel: function onCancel() {
|
|
2845
|
-
setShowCreateErrorModal(false);
|
|
2846
|
-
} // 禁用关闭
|
|
2847
|
-
}
|
|
2848
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2849
|
-
style: {
|
|
2850
|
-
textAlign: 'center',
|
|
2851
|
-
padding: '20px'
|
|
2852
|
-
}
|
|
2853
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2854
|
-
style: {
|
|
2855
|
-
marginBottom: '16px',
|
|
2856
|
-
fontSize: '16px'
|
|
2857
|
-
}
|
|
2858
|
-
}, locales.getText('pisell2.checkout.order-create-failed')), /*#__PURE__*/React.createElement(Button, {
|
|
2859
|
-
type: "primary",
|
|
2860
|
-
size: "large",
|
|
2861
|
-
onClick: function onClick() {
|
|
2862
|
-
setShowCreateErrorModal(false);
|
|
2863
|
-
window.location.reload();
|
|
2864
|
-
},
|
|
2865
|
-
style: {
|
|
2866
|
-
width: '100%',
|
|
2867
|
-
marginTop: '80px'
|
|
2868
|
-
}
|
|
2869
|
-
}, locales.getText('confirm') || '确认'))));
|
|
2817
|
+
}, locales.getText('retry') || '重试'))));
|
|
2870
2818
|
};
|
|
2871
2819
|
|
|
2872
2820
|
// 导出类型供外部使用
|