@pisell/private-materials 6.3.137 → 6.3.138
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/hooks.d.ts +107 -0
- package/es/components/appointmentBooking/utils.d.ts +227 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.d.ts +47 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.d.ts +7 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +248 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +11 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +1489 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +112 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/amount.d.ts +21 -0
- package/es/components/eftposPay/app.d.ts +11 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/es/components/eftposPay/component/fail/index.d.ts +3 -0
- package/es/components/eftposPay/component/fail/network.d.ts +8 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +9 -0
- package/es/components/eftposPay/component/manual/index.d.ts +9 -0
- package/es/components/eftposPay/component/signature/index.d.ts +8 -0
- package/es/components/eftposPay/device.d.ts +24 -0
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +5 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/index.d.ts +3 -0
- package/es/components/eftposPay/pay.d.ts +21 -0
- package/es/components/eftposPay/payo/config.d.ts +12 -0
- package/es/components/eftposPay/payo/hooks.d.ts +10 -0
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tip.d.ts +9 -0
- package/es/components/eftposPay/tyro/index.d.ts +9 -0
- package/es/components/eftposPay/utils/payLog.d.ts +81 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +22 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/kioskSkuDetail/index.d.ts +39 -0
- package/es/components/kioskSkuDetail/locales.d.ts +48 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +16 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +15 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +83 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +22 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +25 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +16 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/pay/toC/locales.d.ts +631 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/payGroup.d.ts +59 -0
- package/es/components/pay/toC/serve.d.ts +87 -0
- package/es/components/pay/toC/utils.d.ts +65 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/locales.d.ts +78 -0
- package/es/components/scanOrder/components/Content/index.js +251 -69
- package/es/components/scanOrder/context.js +6 -18
- package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +2 -1
- package/es/components/scanOrder/utils/toShoppingCartProducts.js +15 -9
- package/es/components/scanOrder/utils/transformProductDetail.d.ts +2 -1
- package/es/components/scanOrder/utils/transformProductDetail.js +7 -6
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.js +1 -1
- package/es/components/venueBooking/context.js +32 -6
- package/es/index.d.ts +87 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/es/plus/pisellSalesProductCard/index.js +16 -1
- package/es/plus/pisellSalesProductCard/types.d.ts +21 -1
- package/es/plus/productSelect/ProductCard/ProductCardV2.js +6 -2
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +5 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +3 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +15 -0
- package/es/plus/skuOptionsSelection/index.d.ts +5 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +58 -0
- package/es/plus/skuOptionsSelection/types.d.ts +458 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/pro/Cards/components/SKUCard/index.d.ts +5 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/NumericStepper/index.d.ts +19 -0
- package/es/pro/NumericStepper/index.js +37 -6
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/hooks.d.ts +107 -0
- package/lib/components/appointmentBooking/utils.d.ts +227 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.d.ts +47 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +248 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +1489 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +112 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/amount.d.ts +21 -0
- package/lib/components/eftposPay/app.d.ts +11 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +3 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +8 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +9 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +9 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +8 -0
- package/lib/components/eftposPay/device.d.ts +24 -0
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +5 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/index.d.ts +3 -0
- package/lib/components/eftposPay/pay.d.ts +21 -0
- package/lib/components/eftposPay/payo/config.d.ts +12 -0
- package/lib/components/eftposPay/payo/hooks.d.ts +10 -0
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tip.d.ts +9 -0
- package/lib/components/eftposPay/tyro/index.d.ts +9 -0
- package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +22 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/kioskSkuDetail/index.d.ts +39 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +48 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +16 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +15 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +83 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +22 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +25 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +16 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/pay/toC/locales.d.ts +631 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/payGroup.d.ts +59 -0
- package/lib/components/pay/toC/serve.d.ts +87 -0
- package/lib/components/pay/toC/utils.d.ts +65 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/locales.d.ts +78 -0
- package/lib/components/scanOrder/components/Content/index.js +150 -41
- package/lib/components/scanOrder/context.js +0 -10
- package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +2 -1
- package/lib/components/scanOrder/utils/toShoppingCartProducts.js +8 -5
- package/lib/components/scanOrder/utils/transformProductDetail.d.ts +2 -1
- package/lib/components/scanOrder/utils/transformProductDetail.js +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.js +1 -1
- package/lib/components/venueBooking/context.js +14 -6
- package/lib/index.d.ts +87 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/lib/plus/pisellSalesProductCard/index.js +10 -0
- package/lib/plus/pisellSalesProductCard/types.d.ts +21 -1
- package/lib/plus/productSelect/ProductCard/ProductCardV2.js +6 -2
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/index.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +58 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +458 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/pro/Cards/components/SKUCard/index.d.ts +5 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/NumericStepper/index.d.ts +19 -0
- package/lib/pro/NumericStepper/index.js +21 -4
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PayGroup } from './model';
|
|
2
|
+
/**
|
|
3
|
+
* 生成 `/h5/core/stash` 的 token:前缀 + 订单号
|
|
4
|
+
*/
|
|
5
|
+
export declare const buildPayGroupStashToken: (orderId: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* @title: 同步交易组到storage
|
|
8
|
+
* @description:
|
|
9
|
+
* @param {PayGroup} payGroup
|
|
10
|
+
* @return {*}
|
|
11
|
+
* @Author: zhiwei.Wang
|
|
12
|
+
* @Date: 2024-08-16 10:40
|
|
13
|
+
*/
|
|
14
|
+
export declare const syncPayGroupToStorage: (payGroup: PayGroup) => void;
|
|
15
|
+
/**
|
|
16
|
+
* @title: 通过订单id获取交易组
|
|
17
|
+
* @description:
|
|
18
|
+
* @param {string} orderId
|
|
19
|
+
* @return {*}
|
|
20
|
+
* @Author: zhiwei.Wang
|
|
21
|
+
* @Date: 2024-08-16 10:40
|
|
22
|
+
*/
|
|
23
|
+
export declare const getPayGroupFromStorage: (orderId: string) => PayGroup | null;
|
|
24
|
+
/**
|
|
25
|
+
* @title: 删除交易组
|
|
26
|
+
* @description:
|
|
27
|
+
* @param {string} orderId
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: zhiwei.Wang
|
|
30
|
+
* @Date: 2024-08-16 10:40
|
|
31
|
+
*/
|
|
32
|
+
export declare const removePayGroupFromStorage: (orderId: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* @title: 获取交易组参数
|
|
35
|
+
* @description:
|
|
36
|
+
* @param {string} orderId
|
|
37
|
+
* @param {any} rest
|
|
38
|
+
* @return {*}
|
|
39
|
+
* @Author: zhiwei.Wang
|
|
40
|
+
* @Date: 2024-08-16 10:40
|
|
41
|
+
*/
|
|
42
|
+
export declare const getPayGroupParamsFromStorage: (orderId: string, rest?: any) => any;
|
|
43
|
+
/**
|
|
44
|
+
* @title: 通过订单id设置交易号
|
|
45
|
+
* @description: 合并 pay_number 后调用 `/h5/core/stash` 最多 3 次;无论 stash 成败均写入 localStorage
|
|
46
|
+
* @param {string} orderId
|
|
47
|
+
* @param {string} payNumber
|
|
48
|
+
* @param {string} [token] 引擎 utils.token.get(),写入 stash 的 data.token
|
|
49
|
+
* @Author: zhiwei.Wang
|
|
50
|
+
* @Date: 2024-08-16 10:41
|
|
51
|
+
*/
|
|
52
|
+
export declare const setPayNumber: (orderId: string, payNumber: string, token?: string) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* @title: 清除服务端暂存
|
|
55
|
+
* @description:
|
|
56
|
+
* @param {string} orderId
|
|
57
|
+
* @return {*}
|
|
58
|
+
*/
|
|
59
|
+
export declare const clearStashPayGroup: (orderId: string) => Promise<void>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const getPaymentList: (values: any) => Promise<{
|
|
2
|
+
message: string;
|
|
3
|
+
status: string;
|
|
4
|
+
paymentList?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
message: string;
|
|
7
|
+
status: string;
|
|
8
|
+
paymentList: any;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* @title: 聚合接口, 根据订单 返回支付列表和钱包
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {object} values
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @Author: zhiwei.Wang
|
|
16
|
+
* @Date: 2024-08-15 11:52
|
|
17
|
+
*/
|
|
18
|
+
export declare const getPaymentsAndWalletPass: (values: {
|
|
19
|
+
order_id: string;
|
|
20
|
+
total_amount: number;
|
|
21
|
+
sale_channel: string;
|
|
22
|
+
}) => Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* @title: 初始化交易组
|
|
25
|
+
* @description:
|
|
26
|
+
* @param {object} values
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: zhiwei.Wang
|
|
29
|
+
* @Date: 2024-08-16 10:42
|
|
30
|
+
*/
|
|
31
|
+
export declare const getPaymentInit: (values: {
|
|
32
|
+
order_id?: string;
|
|
33
|
+
amount?: number;
|
|
34
|
+
}) => Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* @title: 获取钱包名称和弹窗状态
|
|
37
|
+
* @description:
|
|
38
|
+
* @param {object} values
|
|
39
|
+
* @return {*}
|
|
40
|
+
* @Author: shengjie.zuo
|
|
41
|
+
* @member: 马天宇
|
|
42
|
+
* @Date: 2025-02-21 10:42
|
|
43
|
+
*/
|
|
44
|
+
export declare const getWalletNameAndPopupStatus: (values: {
|
|
45
|
+
setting_type?: string;
|
|
46
|
+
}) => Promise<{
|
|
47
|
+
wallet: {
|
|
48
|
+
name?: {
|
|
49
|
+
en: string;
|
|
50
|
+
'zh-CN': string;
|
|
51
|
+
'zh-HK': string;
|
|
52
|
+
'ja': string;
|
|
53
|
+
'pt': string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
wallet_setting: {
|
|
57
|
+
popup_status?: 1 | 0;
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* @title: 获取支付结果
|
|
62
|
+
* @description: 获取支付结果
|
|
63
|
+
*/
|
|
64
|
+
export declare const getPaymentResult: (values: any) => Promise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* @title: 检测订单是否有正在处理中的交易
|
|
67
|
+
* @param {object} values - { order_id: string }
|
|
68
|
+
* @return {Promise<{ has_pending: boolean }>}
|
|
69
|
+
*/
|
|
70
|
+
export declare const checkPendingPayment: (values: {
|
|
71
|
+
order_id: string;
|
|
72
|
+
}) => Promise<{
|
|
73
|
+
has_pending: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
/** `/h5/core/stash` 请求体 */
|
|
76
|
+
export interface CoreStashParams {
|
|
77
|
+
/** 缓存 key,由前端生成 */
|
|
78
|
+
token: string;
|
|
79
|
+
/** 暂存数据,如完整 PayGroup */
|
|
80
|
+
data: unknown;
|
|
81
|
+
/** 生命周期(秒),默认 86400(1 天) */
|
|
82
|
+
ttl?: number;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 调用服务端暂存接口,写入 payGroup 等数据。
|
|
86
|
+
*/
|
|
87
|
+
export declare const postCoreStash: (params: CoreStashParams) => Promise<void>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PayGroup } from "./model";
|
|
2
|
+
import { WalletPassDataType } from "./PaymentMethods/WalletPass/serve";
|
|
3
|
+
/**
|
|
4
|
+
* 计算walletPass列表数据的总金额
|
|
5
|
+
* @param list
|
|
6
|
+
*/
|
|
7
|
+
export declare const calcWalletPassListAmount: (list: any[]) => any;
|
|
8
|
+
/**
|
|
9
|
+
* 将walletPass列表数据转换为prepare_payments需要的数据格式
|
|
10
|
+
* @param list
|
|
11
|
+
*/
|
|
12
|
+
export declare const formatWalletPassList2PreparePayments: (list?: any[]) => {
|
|
13
|
+
voucher_id: any;
|
|
14
|
+
amount: number;
|
|
15
|
+
tag: any;
|
|
16
|
+
}[];
|
|
17
|
+
/**
|
|
18
|
+
* walletPass支付params
|
|
19
|
+
* @param payGroup
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatWalletPassParams: (payGroup: PayGroup) => {
|
|
22
|
+
order_id: string;
|
|
23
|
+
payment_group_id: number;
|
|
24
|
+
payments: {
|
|
25
|
+
amount: string;
|
|
26
|
+
wallet_pass_use_value: any;
|
|
27
|
+
voucher_id: any;
|
|
28
|
+
tag: any;
|
|
29
|
+
wallet_pass_usage_unit: any;
|
|
30
|
+
metadata: {
|
|
31
|
+
unique_payment_number: any;
|
|
32
|
+
};
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @title: 获取是否walletPass和三方支付的组合支付
|
|
37
|
+
* @description: 三方支付 (stripe 支付宝 微信 苹果 谷歌)
|
|
38
|
+
* @return: *
|
|
39
|
+
* @Author: shengjie.zuo
|
|
40
|
+
* @Date: 2024-08-30 10:06:17
|
|
41
|
+
*/
|
|
42
|
+
export declare const getIsWalletPassAndTripartitePayment: (payGroup: PayGroup) => boolean | 0 | undefined;
|
|
43
|
+
export declare const isFranchiseeShop: (path?: any, history?: any) => any;
|
|
44
|
+
/**
|
|
45
|
+
* @title: 获取当前连锁加盟店铺shopid
|
|
46
|
+
* @description:
|
|
47
|
+
* @param {any} param1
|
|
48
|
+
* @return {*}
|
|
49
|
+
* @Author: chensheng.gu
|
|
50
|
+
* @Date: 2024-08-07 10:04
|
|
51
|
+
*/
|
|
52
|
+
export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
|
|
53
|
+
export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
|
|
54
|
+
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
|
|
55
|
+
export declare const clientPayment: (params: {
|
|
56
|
+
order_id: number;
|
|
57
|
+
type: "aliPay" | "wxPay" | 'google_pay';
|
|
58
|
+
values: any;
|
|
59
|
+
interaction?: any;
|
|
60
|
+
}) => void;
|
|
61
|
+
/**
|
|
62
|
+
* 获取唯一幂等token
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
export declare const getUniqueIdempotencyToken: () => string;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.satisfy_any_condition': string;
|
|
4
|
+
'pisell2.text.add': string;
|
|
5
|
+
'pisell2.text.and': string;
|
|
6
|
+
'pisell2.text.or': string;
|
|
7
|
+
'pisell2.text.all': string;
|
|
8
|
+
'pisell2.text.rule-setting.Contain': string;
|
|
9
|
+
'pisell2.text.rule-setting.Exclude': string;
|
|
10
|
+
'pisell2.text.rule-setting.order_type': string;
|
|
11
|
+
'pisell2.text.rule-setting.sales_channel': string;
|
|
12
|
+
'pisell2.text.rule-setting.staff': string;
|
|
13
|
+
'pisell2.text.rule-setting.payment_method': string;
|
|
14
|
+
'pisell2.text.rule-setting.pisell_terminal_device': string;
|
|
15
|
+
'pisell2.text.rule-setting.current_device': string;
|
|
16
|
+
};
|
|
17
|
+
'zh-CN': {
|
|
18
|
+
'pisell2.text.satisfy_any_condition': string;
|
|
19
|
+
'pisell2.text.and': string;
|
|
20
|
+
'pisell2.text.or': string;
|
|
21
|
+
'pisell2.text.all': string;
|
|
22
|
+
'pisell2.text.add': string;
|
|
23
|
+
'pisell2.text.rule-setting.Contain': string;
|
|
24
|
+
'pisell2.text.rule-setting.Exclude': string;
|
|
25
|
+
'pisell2.text.rule-setting.order_type': string;
|
|
26
|
+
'pisell2.text.rule-setting.sales_channel': string;
|
|
27
|
+
'pisell2.text.rule-setting.staff': string;
|
|
28
|
+
'pisell2.text.rule-setting.payment_method': string;
|
|
29
|
+
'pisell2.text.rule-setting.pisell_terminal_device': string;
|
|
30
|
+
'pisell2.text.rule-setting.current_device': string;
|
|
31
|
+
};
|
|
32
|
+
'zh-HK': {
|
|
33
|
+
'pisell2.text.satisfy_any_condition': string;
|
|
34
|
+
'pisell2.text.and': string;
|
|
35
|
+
'pisell2.text.or': string;
|
|
36
|
+
'pisell2.text.all': string;
|
|
37
|
+
'pisell2.text.add': string;
|
|
38
|
+
'pisell2.text.rule-setting.Contain': string;
|
|
39
|
+
'pisell2.text.rule-setting.Exclude': string;
|
|
40
|
+
'pisell2.text.rule-setting.order_type': string;
|
|
41
|
+
'pisell2.text.rule-setting.sales_channel': string;
|
|
42
|
+
'pisell2.text.rule-setting.staff': string;
|
|
43
|
+
'pisell2.text.rule-setting.payment_method': string;
|
|
44
|
+
'pisell2.text.rule-setting.pisell_terminal_device': string;
|
|
45
|
+
'pisell2.text.rule-setting.current_device': string;
|
|
46
|
+
};
|
|
47
|
+
ja: {
|
|
48
|
+
'pisell2.text.satisfy_any_condition': string;
|
|
49
|
+
'pisell2.text.add': string;
|
|
50
|
+
'pisell2.text.and': string;
|
|
51
|
+
'pisell2.text.or': string;
|
|
52
|
+
'pisell2.text.all': string;
|
|
53
|
+
'pisell2.text.rule-setting.Contain': string;
|
|
54
|
+
'pisell2.text.rule-setting.Exclude': string;
|
|
55
|
+
'pisell2.text.rule-setting.order_type': string;
|
|
56
|
+
'pisell2.text.rule-setting.sales_channel': string;
|
|
57
|
+
'pisell2.text.rule-setting.staff': string;
|
|
58
|
+
'pisell2.text.rule-setting.payment_method': string;
|
|
59
|
+
'pisell2.text.rule-setting.pisell_terminal_device': string;
|
|
60
|
+
'pisell2.text.rule-setting.current_device': string;
|
|
61
|
+
};
|
|
62
|
+
pt: {
|
|
63
|
+
'pisell2.text.satisfy_any_condition': string;
|
|
64
|
+
'pisell2.text.add': string;
|
|
65
|
+
'pisell2.text.and': string;
|
|
66
|
+
'pisell2.text.or': string;
|
|
67
|
+
'pisell2.text.all': string;
|
|
68
|
+
'pisell2.text.rule-setting.Contain': string;
|
|
69
|
+
'pisell2.text.rule-setting.Exclude': string;
|
|
70
|
+
'pisell2.text.rule-setting.order_type': string;
|
|
71
|
+
'pisell2.text.rule-setting.sales_channel': string;
|
|
72
|
+
'pisell2.text.rule-setting.staff': string;
|
|
73
|
+
'pisell2.text.rule-setting.payment_method': string;
|
|
74
|
+
'pisell2.text.rule-setting.pisell_terminal_device': string;
|
|
75
|
+
'pisell2.text.rule-setting.current_device': string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export default _default;
|
|
@@ -48,6 +48,28 @@ var import_Check = __toESM(require("../Check"));
|
|
|
48
48
|
var import_PolicyModal = __toESM(require("../../../appointmentBooking/deposit/components/PolicyModal"));
|
|
49
49
|
var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
|
|
50
50
|
var import_index = require("./index.less");
|
|
51
|
+
function extractEntryPaxNumber(payload) {
|
|
52
|
+
if (payload == null) return null;
|
|
53
|
+
if (typeof payload === "number" && Number.isFinite(payload) && payload >= 1) {
|
|
54
|
+
return Math.floor(payload);
|
|
55
|
+
}
|
|
56
|
+
if (typeof payload === "string") {
|
|
57
|
+
const n = Number(payload);
|
|
58
|
+
if (Number.isFinite(n) && n >= 1) return Math.floor(n);
|
|
59
|
+
}
|
|
60
|
+
if (typeof payload === "object") {
|
|
61
|
+
const o = payload;
|
|
62
|
+
for (const k of ["entryPaxNumber", "pax", "num", "count", "value"]) {
|
|
63
|
+
const v = o[k];
|
|
64
|
+
if (typeof v === "number" && Number.isFinite(v) && v >= 1) return Math.floor(v);
|
|
65
|
+
if (typeof v === "string") {
|
|
66
|
+
const n = Number(v);
|
|
67
|
+
if (Number.isFinite(n) && n >= 1) return Math.floor(n);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
51
73
|
function ReadyState() {
|
|
52
74
|
var _a, _b, _c, _d;
|
|
53
75
|
const {
|
|
@@ -78,6 +100,16 @@ function ReadyState() {
|
|
|
78
100
|
content: null
|
|
79
101
|
});
|
|
80
102
|
const [pendingFormPayload, setPendingFormPayload] = (0, import_react.useState)(null);
|
|
103
|
+
const [entryMode, setEntryMode] = (0, import_react.useState)("default");
|
|
104
|
+
const requestEntryPaxRef = (0, import_react.useRef)(0);
|
|
105
|
+
const requestPaxMinRef = (0, import_react.useRef)(1);
|
|
106
|
+
const requestPaxMaxRef = (0, import_react.useRef)(1);
|
|
107
|
+
const tableFormRecordRef = (0, import_react.useRef)(null);
|
|
108
|
+
const getLocalizedName = (nameMap) => {
|
|
109
|
+
if (!nameMap) return "";
|
|
110
|
+
const currentLocale = import_utils.locales.getLocale();
|
|
111
|
+
return nameMap[currentLocale] || nameMap.original || nameMap.en || "";
|
|
112
|
+
};
|
|
81
113
|
const normalizeFormPayload = (formPayload, partyroomBookingPayload) => {
|
|
82
114
|
const sourcePayload = formPayload ?? partyroomBookingPayload;
|
|
83
115
|
if (!sourcePayload) return null;
|
|
@@ -97,6 +129,17 @@ function ReadyState() {
|
|
|
97
129
|
const link = `/order/details?id=${order_id}`;
|
|
98
130
|
location.replace(link);
|
|
99
131
|
};
|
|
132
|
+
const handleBack = () => {
|
|
133
|
+
if (currentStep !== "product") {
|
|
134
|
+
prevStep();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (entryMode === "additional_order" && (entryContext == null ? void 0 : entryContext.order_id)) {
|
|
138
|
+
handleOrderDetail(entryContext.order_id);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
location.replace("/");
|
|
142
|
+
};
|
|
100
143
|
const enterProductStep = async () => {
|
|
101
144
|
try {
|
|
102
145
|
await runModuleAction("applyItemRulePrefill");
|
|
@@ -107,6 +150,40 @@ function ReadyState() {
|
|
|
107
150
|
goToStep("product");
|
|
108
151
|
}
|
|
109
152
|
};
|
|
153
|
+
const runEntryPaxGateThenEnterProduct = async () => {
|
|
154
|
+
if (requestEntryPaxRef.current !== 1) {
|
|
155
|
+
await enterProductStep();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const pax = await new Promise((resolve) => {
|
|
159
|
+
var _a2;
|
|
160
|
+
if (typeof (utils == null ? void 0 : utils.action) !== "function") {
|
|
161
|
+
resolve(null);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
utils.action({
|
|
165
|
+
type: "pisell1.handlePaxModal",
|
|
166
|
+
data: {
|
|
167
|
+
tableName: getLocalizedName((_a2 = tableFormRecordRef.current) == null ? void 0 : _a2.name),
|
|
168
|
+
requestPaxMin: requestPaxMinRef.current,
|
|
169
|
+
requestPaxMax: requestPaxMaxRef.current
|
|
170
|
+
},
|
|
171
|
+
callback: (result) => {
|
|
172
|
+
resolve(extractEntryPaxNumber(result));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
if (pax == null) {
|
|
177
|
+
location.replace("/");
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
await runModuleAction("setEntryPaxNumber", pax);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
console.warn("[scanOrder] setOtherParams failed", error);
|
|
184
|
+
}
|
|
185
|
+
await enterProductStep();
|
|
186
|
+
};
|
|
110
187
|
const closePolicyAndBack = () => {
|
|
111
188
|
setPolicyModal({
|
|
112
189
|
open: false,
|
|
@@ -139,7 +216,7 @@ function ReadyState() {
|
|
|
139
216
|
content: null
|
|
140
217
|
});
|
|
141
218
|
setPendingFormPayload(null);
|
|
142
|
-
void
|
|
219
|
+
void runEntryPaxGateThenEnterProduct();
|
|
143
220
|
};
|
|
144
221
|
const handleFormConfirm = () => {
|
|
145
222
|
var _a2, _b2;
|
|
@@ -156,7 +233,7 @@ function ReadyState() {
|
|
|
156
233
|
openFormModal(pendingFormPayload);
|
|
157
234
|
return;
|
|
158
235
|
}
|
|
159
|
-
void
|
|
236
|
+
void runEntryPaxGateThenEnterProduct();
|
|
160
237
|
};
|
|
161
238
|
const depositProtocolRequest = (id) => {
|
|
162
239
|
var _a2, _b2;
|
|
@@ -165,28 +242,45 @@ function ReadyState() {
|
|
|
165
242
|
(0, import_react.useEffect)(() => {
|
|
166
243
|
const checkResourceAvailable = async () => {
|
|
167
244
|
const hasOrderId = !!(entryContext == null ? void 0 : entryContext.order_id);
|
|
168
|
-
const {
|
|
245
|
+
const {
|
|
246
|
+
mode,
|
|
247
|
+
order_id,
|
|
248
|
+
errorTips,
|
|
249
|
+
policy,
|
|
250
|
+
form,
|
|
251
|
+
partyroom_booking,
|
|
252
|
+
requestEntryPax,
|
|
253
|
+
requestPaxMin,
|
|
254
|
+
requestPaxMax,
|
|
255
|
+
table_form_record
|
|
256
|
+
} = await runModuleAction(
|
|
169
257
|
"checkResourceAvailable",
|
|
170
258
|
entryContext == null ? void 0 : entryContext.resource_id,
|
|
171
259
|
hasOrderId
|
|
172
260
|
);
|
|
261
|
+
requestEntryPaxRef.current = Number(requestEntryPax) === 1 ? 1 : 0;
|
|
262
|
+
requestPaxMinRef.current = Number(requestPaxMin) || 1;
|
|
263
|
+
requestPaxMaxRef.current = Number(requestPaxMax) || 1;
|
|
264
|
+
tableFormRecordRef.current = table_form_record || {};
|
|
173
265
|
const normalizedFormPayload = normalizeFormPayload(form, partyroom_booking);
|
|
174
|
-
|
|
266
|
+
const isAdditionalOrder = mode === "additional_order" || mode === "additional_order_with_code";
|
|
267
|
+
setEntryMode(isAdditionalOrder ? "additional_order" : "default");
|
|
268
|
+
if (mode === "idle") {
|
|
175
269
|
const normalizedPolicyPayload = typeof policy === "object" && policy !== null ? policy : { id: policy };
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
270
|
+
if (normalizedPolicyPayload == null ? void 0 : normalizedPolicyPayload.id) {
|
|
271
|
+
setPendingFormPayload(normalizedFormPayload);
|
|
272
|
+
setPolicyModal({
|
|
273
|
+
open: true,
|
|
274
|
+
content: normalizedPolicyPayload
|
|
275
|
+
});
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (normalizedFormPayload) {
|
|
279
|
+
openFormModal(normalizedFormPayload);
|
|
280
|
+
return;
|
|
189
281
|
}
|
|
282
|
+
await runEntryPaxGateThenEnterProduct();
|
|
283
|
+
} else if (isAdditionalOrder) {
|
|
190
284
|
await enterProductStep();
|
|
191
285
|
} else if (mode === "resource_busy") {
|
|
192
286
|
if (!isLogin) {
|
|
@@ -251,37 +345,52 @@ function ReadyState() {
|
|
|
251
345
|
check: /* @__PURE__ */ import_react.default.createElement(import_Check.default, null),
|
|
252
346
|
error: /* @__PURE__ */ import_react.default.createElement(import_ErrorState.default, { message: import_utils.locales.getText("pisell2.scan.order.store.status.exception") })
|
|
253
347
|
};
|
|
254
|
-
const
|
|
348
|
+
const getFirstFailedProductIds = () => {
|
|
255
349
|
const firstFailure = Array.isArray(cartValidation == null ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
350
|
+
const targets = Array.isArray(firstFailure == null ? void 0 : firstFailure.targets) ? firstFailure.targets : [];
|
|
351
|
+
const ids = [];
|
|
352
|
+
const seen = /* @__PURE__ */ new Set();
|
|
353
|
+
for (const target of targets) {
|
|
354
|
+
const id = Number(target == null ? void 0 : target.product_id);
|
|
355
|
+
if (Number.isFinite(id) && id > 0 && !seen.has(id)) {
|
|
356
|
+
seen.add(id);
|
|
357
|
+
ids.push(id);
|
|
358
|
+
}
|
|
260
359
|
}
|
|
261
|
-
return
|
|
360
|
+
return ids;
|
|
262
361
|
};
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
});
|
|
273
|
-
failedProductElement.classList.add("highlight-product-item");
|
|
274
|
-
setTimeout(() => {
|
|
362
|
+
const scrollAndHighlightProductsByIds = (productIds) => {
|
|
363
|
+
if (!(productIds == null ? void 0 : productIds.length)) return false;
|
|
364
|
+
let scrolled = false;
|
|
365
|
+
let highlighted = false;
|
|
366
|
+
for (const productId of productIds) {
|
|
367
|
+
const failedProductElement = document.querySelector(
|
|
368
|
+
`[data-product-id="${String(productId)}"]`
|
|
369
|
+
);
|
|
370
|
+
if (!failedProductElement) continue;
|
|
275
371
|
failedProductElement.classList.remove("highlight-product-item");
|
|
276
|
-
|
|
277
|
-
|
|
372
|
+
if (!scrolled) {
|
|
373
|
+
failedProductElement.scrollIntoView({
|
|
374
|
+
behavior: "smooth",
|
|
375
|
+
block: "center"
|
|
376
|
+
});
|
|
377
|
+
scrolled = true;
|
|
378
|
+
}
|
|
379
|
+
void failedProductElement.offsetWidth;
|
|
380
|
+
failedProductElement.classList.add("highlight-product-item");
|
|
381
|
+
setTimeout(() => {
|
|
382
|
+
failedProductElement.classList.remove("highlight-product-item");
|
|
383
|
+
}, 3e3);
|
|
384
|
+
highlighted = true;
|
|
385
|
+
}
|
|
386
|
+
return highlighted;
|
|
278
387
|
};
|
|
279
388
|
const gotoCheckOrder = async () => {
|
|
280
389
|
const firstFailure = Array.isArray(cartValidation == null ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
|
|
281
390
|
if ((cartValidation == null ? void 0 : cartValidation.passed) === false) {
|
|
282
|
-
const
|
|
283
|
-
if (
|
|
284
|
-
|
|
391
|
+
const failedProductIds = getFirstFailedProductIds();
|
|
392
|
+
if (failedProductIds.length) {
|
|
393
|
+
scrollAndHighlightProductsByIds(failedProductIds);
|
|
285
394
|
}
|
|
286
395
|
const failureTips = String((firstFailure == null ? void 0 : firstFailure.validationMessage) || "").trim();
|
|
287
396
|
(0, import_materials.PisellToast)({
|
|
@@ -326,7 +435,7 @@ function ReadyState() {
|
|
|
326
435
|
if (isMobileView) return false;
|
|
327
436
|
return currentStep === "product";
|
|
328
437
|
}, [currentStep, isMobileView]);
|
|
329
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, { currentStep, onBack:
|
|
438
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, { currentStep, onBack: handleBack }), /* @__PURE__ */ import_react.default.createElement(
|
|
330
439
|
"div",
|
|
331
440
|
{
|
|
332
441
|
className: `pisell-scan-order-content-wrap ${isMobileView ? "pisell-scan-order-content-mobile-wrap" : ""}`,
|
|
@@ -149,16 +149,6 @@ function ScanOrderProvider({
|
|
|
149
149
|
if (typeof scanOrderModule.getPageConfig === "function") {
|
|
150
150
|
await scanOrderModule.getPageConfig(entryContext);
|
|
151
151
|
}
|
|
152
|
-
await (0, import_hooks.safeRunModuleAction)(scanOrderModule, "setItemRuleRuntimeConfig", {
|
|
153
|
-
pax: {
|
|
154
|
-
total: 2,
|
|
155
|
-
adult: 2,
|
|
156
|
-
child: 0
|
|
157
|
-
},
|
|
158
|
-
serviceType: "dine-in",
|
|
159
|
-
submissionIndex: 0,
|
|
160
|
-
historicalItems: []
|
|
161
|
-
});
|
|
162
152
|
await refreshViewModel();
|
|
163
153
|
if (!unmounted) {
|
|
164
154
|
setErrorMessage("");
|
|
@@ -2,8 +2,9 @@ interface ScanOrderOrderProduct {
|
|
|
2
2
|
product_id: number | null;
|
|
3
3
|
product_variant_id: number;
|
|
4
4
|
num?: number;
|
|
5
|
-
|
|
5
|
+
/** 券后单品单价(订单域成交单价)。 */
|
|
6
6
|
selling_price?: string | number;
|
|
7
|
+
/** 券前单品单价(店铺售价)。 */
|
|
7
8
|
original_price?: string | number;
|
|
8
9
|
product_option_item?: any[];
|
|
9
10
|
product_bundle?: any[];
|