@pisell/private-materials 6.2.44 → 6.2.45

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.
Files changed (67) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +29 -13
  7. package/build/lowcode/render/default/view.js +8 -8
  8. package/build/lowcode/view.js +8 -8
  9. package/es/components/Sales/Summary/utils.d.ts +1 -1
  10. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  11. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/index.d.ts +0 -1
  14. package/es/components/booking/components/footer/index.js +19 -9
  15. package/es/components/booking/components/footer/utils.js +13 -9
  16. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  17. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/info/service2/utils.d.ts +1 -1
  19. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  20. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  21. package/es/components/booking/utils.d.ts +2 -2
  22. package/es/components/eftposPay/amount.d.ts +1 -1
  23. package/es/components/eftposPay/device.d.ts +1 -1
  24. package/es/components/eftposPay/hooks.d.ts +1 -1
  25. package/es/components/eftposPay/store/index.d.ts +4 -4
  26. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
  27. package/es/components/eventBooking/components/progressBar/index.js +20 -0
  28. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +20 -7
  29. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +1 -0
  30. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +12 -2
  31. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +31 -24
  32. package/es/components/pay/toC/utils.d.ts +1 -1
  33. package/es/components/schedules/utils.d.ts +1 -1
  34. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  35. package/es/components/wallet/Detail/index.js +2 -2
  36. package/es/components/wallet/components/WalletCard.js +3 -2
  37. package/es/utils/index.d.ts +1 -1
  38. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  39. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  40. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  41. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  42. package/lib/components/appointmentBooking/index.d.ts +0 -1
  43. package/lib/components/booking/components/footer/index.js +15 -8
  44. package/lib/components/booking/components/footer/utils.js +11 -3
  45. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  46. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  47. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  48. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  49. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  50. package/lib/components/booking/utils.d.ts +2 -2
  51. package/lib/components/eftposPay/amount.d.ts +1 -1
  52. package/lib/components/eftposPay/device.d.ts +1 -1
  53. package/lib/components/eftposPay/hooks.d.ts +1 -1
  54. package/lib/components/eftposPay/store/index.d.ts +4 -4
  55. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
  56. package/lib/components/eventBooking/components/progressBar/index.js +18 -0
  57. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +11 -7
  58. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +1 -0
  59. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +9 -2
  60. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +6 -2
  61. package/lib/components/pay/toC/utils.d.ts +1 -1
  62. package/lib/components/schedules/utils.d.ts +1 -1
  63. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  64. package/lib/components/wallet/Detail/index.js +3 -3
  65. package/lib/components/wallet/components/WalletCard.js +1 -1
  66. package/lib/utils/index.d.ts +1 -1
  67. package/package.json +4 -4
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Layout: () => JSX.Element;
4
3
  export default Layout;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../booking/components/voucher/index.less';
3
2
  import './index.less';
4
3
  declare const VoucherCard: (props: any) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const DepositModal: (props: any) => JSX.Element;
3
4
  export default DepositModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AppointmentBooking: () => JSX.Element;
4
3
  export default AppointmentBooking;
@@ -25,7 +25,7 @@ import classNames from 'classnames';
25
25
  import React, { useEffect, useMemo, useRef, useState } from 'react';
26
26
  import useEngineContext from "../../../../hooks/useEngineContext";
27
27
  import { formatProducts } from "../../addons";
28
- import { getIsSubjectRequire, isDayBooking, isHasDayAppointmentProduct } from "../../info/service2/utils";
28
+ import { getIsSubjectRequire, isDayBooking, isEventBooking, isHasDayAppointmentProduct } from "../../info/service2/utils";
29
29
  import { createBookings, editBookings } from "../../info2/serve";
30
30
  import AppointmentProductModal from "./AppointmentProductModal";
31
31
  import FooterMenus from "./FooterMenus";
@@ -1008,9 +1008,21 @@ var Footer = function Footer(props) {
1008
1008
  }
1009
1009
  }, [state.bookingDetail, total.notPaidAmount]);
1010
1010
  var _buttons = useMemo(function () {
1011
+ var isEvent = isEventBooking(state);
1012
+
1011
1013
  // 如果预约是取消状态,则不展示任何按钮
1012
- // 如果订单已退款 | 部分退款,则展示再次预约按钮
1013
- if (state.appointment_status === 'cancelled' || paymentRefundedStatus) {
1014
+ if (state.appointment_status === 'cancelled') {
1015
+ return [buttonMap.rebook];
1016
+ }
1017
+
1018
+ // 如果订单已退款 | 部分退款
1019
+ if (paymentRefundedStatus) {
1020
+ // 如果是活动预约, 则不展示任何按钮
1021
+ if (isEvent) {
1022
+ return [''];
1023
+ }
1024
+
1025
+ // 显示再次预约按钮
1014
1026
  return [buttonMap.rebook];
1015
1027
  }
1016
1028
 
@@ -1174,17 +1186,15 @@ var Footer = function Footer(props) {
1174
1186
  var totalText = useMemo(function () {
1175
1187
  var str = '';
1176
1188
 
1189
+ // 有退款金额时, 直接展示 退款:$8.00
1190
+ if (total.totalRefundAmount > 0) {
1191
+ return "".concat(locales.getText('pisell2.text.refunded-amount'), ": ").concat(formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
1192
+ }
1177
1193
  // 只有定金支付时,直接展示
1178
1194
  if (isOnlyDeposit) {
1179
1195
  var _state$bookingDetail12;
1180
1196
  return "".concat(locales.getText('pisell2.text.deposit-paid'), " ").concat(formatAmount(state === null || state === void 0 || (_state$bookingDetail12 = state.bookingDetail) === null || _state$bookingDetail12 === void 0 ? void 0 : _state$bookingDetail12.deposit_paid_amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'), " ").concat(total.duration ? "(".concat(total.duration, ")") : '');
1181
1197
  }
1182
-
1183
- // 有退款金额时, 直接展示 退款:$8.00
1184
- if (total.totalRefundAmount > 0) {
1185
- return "".concat(locales.getText('pisell2.text.refunded-amount'), ": ").concat(formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
1186
- }
1187
-
1188
1198
  // 如果待支付金额小于0 则展示全额支付
1189
1199
  if (total.notPaidAmount <= 0 && state.bookingId) {
1190
1200
  str = "".concat(locales.getText('pisell1.text.fully-paid'), ": ").concat(formatAmount(total.sumTotalAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
@@ -551,12 +551,16 @@ var formatBookings = function formatBookings(data, values) {
551
551
  * @Author: WangHan
552
552
  * @Date: 2024-12-06 21:26
553
553
  */
554
- var formatRelationProducts = function formatRelationProducts(data) {
554
+ var formatRelationProducts = function formatRelationProducts(data, type) {
555
555
  var _data$service;
556
556
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
557
557
  // open items 下的商品
558
558
  list = list.filter(function (item) {
559
- return isNormalProductByDurationSchedule(item);
559
+ var _item$_extend26;
560
+ return (
561
+ // 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
562
+ type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.holder_id) && appointmentTypes.includes(item.extension_type)
563
+ );
560
564
  });
561
565
  var relationProducts = [];
562
566
  relationProducts = list.map(function (item) {
@@ -652,7 +656,7 @@ export var formatValues = function formatValues(state) {
652
656
  // 主体
653
657
  values.holder = formatHolder(state, values);
654
658
  if (isDay || isEvent) {
655
- values.relation_products = formatRelationProducts(state);
659
+ values.relation_products = formatRelationProducts(state, isDay ? "day" : "event");
656
660
  } else {
657
661
  var _values$relation_prod;
658
662
  values.relation_products = formatNormalProducts(state);
@@ -689,19 +693,19 @@ export var checkHolderIsError = function checkHolderIsError(state) {
689
693
  var _state$client;
690
694
  var errorRowKey = "";
691
695
  var holderError = state.service.value.some(function (item) {
692
- var _item$_extend27;
696
+ var _item$_extend28;
693
697
  // 普通商品不需要检测holder
694
698
  if (isNormalProductByDurationSchedule(item)) {
695
699
  return false;
696
700
  }
697
701
  if (item._extend.quantity === 1 && !item._extend.holder_id) {
698
- var _item$_extend26;
699
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 || (_item$_extend26 = _item$_extend26.other) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.rowKey);
702
+ var _item$_extend27;
703
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 || (_item$_extend27 = _item$_extend27.other) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.rowKey);
700
704
  return true;
701
705
  }
702
- if (item._extend.quantity > 1 && ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 || (_item$_extend27 = _item$_extend27.holder_id) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.length) !== item._extend.quantity) {
703
- var _item$_extend28;
704
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 || (_item$_extend28 = _item$_extend28.other) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.rowKey);
706
+ if (item._extend.quantity > 1 && ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 || (_item$_extend28 = _item$_extend28.holder_id) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.length) !== item._extend.quantity) {
707
+ var _item$_extend29;
708
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 || (_item$_extend29 = _item$_extend29.other) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.rowKey);
705
709
  return true;
706
710
  }
707
711
  return false;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface IProps {
3
4
  modal: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
248
248
  * @Author: WangHan
249
249
  * @Date: 2024-12-24 11:32
250
250
  */
251
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
251
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import '../../../info/service/addService/index.less';
3
4
  interface AddServiceProps {
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | {
168
+ }) => number | "flexible" | {
169
169
  type: string;
170
170
  value: number;
171
- } | "flexible";
171
+ };
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
300
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
301
  action?: "amount" | "deviceList" | "pay" | undefined;
@@ -303,12 +303,12 @@ export declare const backUpFree: (payload: Partial<State>) => {
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ContinueButton: () => JSX.Element;
4
3
  export default ContinueButton;
@@ -61,6 +61,26 @@ var ProgressBar = function ProgressBar(_ref) {
61
61
  var handleOk = function handleOk() {
62
62
  var _interaction$utils, _interaction$utils$is;
63
63
  if (interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils)) {
64
+ var url = window.location.href;
65
+
66
+ // 如果 url中包含 isByTabbar 删除url中的cacheId 并刷新页面
67
+ if (url.includes('isByTabbar')) {
68
+ removeSessionStorage === null || removeSessionStorage === void 0 || removeSessionStorage();
69
+ var urlParams = new URLSearchParams(window.location.search);
70
+ urlParams.delete('cacheId');
71
+ setOpen(false);
72
+ interaction.utils.postMessageToApp({
73
+ module: 'global',
74
+ key: 'openNative',
75
+ data: {
76
+ link: {
77
+ page: "home"
78
+ }
79
+ }
80
+ });
81
+ window.location.href = window.location.pathname + '?' + urlParams.toString();
82
+ return;
83
+ }
64
84
  interaction.utils.postMessageToApp({
65
85
  module: 'global',
66
86
  key: 'paymentResultAction',
@@ -15,7 +15,7 @@ import ThreedsLoading from "../MWCreditCard/TDSPay/ThreedsLoading";
15
15
  import { Context } from "../../model";
16
16
  import { getPayGroupParamsFromStorage } from "../../payGroup";
17
17
  import useEngineContext from "../../../../../hooks/useEngineContext";
18
- import { formatFranchiseeRoute } from "../../utils";
18
+ import { clientPayment, formatFranchiseeRoute } from "../../utils";
19
19
  /**
20
20
  * @title: 谷歌支付
21
21
  * @description:
@@ -26,7 +26,7 @@ import { formatFranchiseeRoute } from "../../utils";
26
26
  * @Date: 2024-08-16 11:01
27
27
  */
28
28
  var GooglePay = function GooglePay(props, ref) {
29
- var _context$appHelper;
29
+ var _context$appHelper, _context$appHelper2;
30
30
  var _useContext = useContext(Context),
31
31
  state = _useContext.state;
32
32
  var _useState = useState(false),
@@ -36,6 +36,8 @@ var GooglePay = function GooglePay(props, ref) {
36
36
  var context = useEngineContext();
37
37
  var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
38
38
  config = _ref.config;
39
+ var _context$appHelper$ut = (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils,
40
+ interaction = _context$appHelper$ut.interaction;
39
41
 
40
42
  /**
41
43
  * @title: 初始化
@@ -47,23 +49,34 @@ var GooglePay = function GooglePay(props, ref) {
47
49
  */
48
50
  var init = /*#__PURE__*/function () {
49
51
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
50
- var _utils$getStore;
52
+ var _utils$getStore, _interaction$utils, _interaction$utils$is, _interaction$utils2, _interaction$utils2$i;
51
53
  var payGroup, utils, dvaStore, values, _dvaStore$core, _dvaStore$core2, _state$payGroup, locale, shopId, currentURL, linkElement, shop_domain, _href;
52
54
  return _regeneratorRuntime().wrap(function _callee$(_context) {
53
55
  while (1) switch (_context.prev = _context.next) {
54
56
  case 0:
55
57
  payGroup = _ref2.payGroup;
56
- setOpen(true);
57
58
  utils = context.appHelper.utils || {};
58
59
  dvaStore = utils === null || utils === void 0 || (_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 ? void 0 : _utils$getStore.getState(); // 获取交易组
59
60
  values = getPayGroupParamsFromStorage(payGroup.order_id);
61
+ if (!(interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils) && (interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$i = _interaction$utils2.isAndroid_ios) === null || _interaction$utils2$i === void 0 ? void 0 : _interaction$utils2$i.call(_interaction$utils2)) === 'android')) {
62
+ _context.next = 6;
63
+ break;
64
+ }
65
+ return _context.abrupt("return", clientPayment({
66
+ order_id: payGroup.order_id,
67
+ type: 'google_pay',
68
+ values: values,
69
+ interaction: interaction
70
+ }));
71
+ case 6:
72
+ setOpen(true);
60
73
  if (values) {
61
- _context.next = 8;
74
+ _context.next = 10;
62
75
  break;
63
76
  }
64
77
  setOpen(false);
65
78
  return _context.abrupt("return");
66
- case 8:
79
+ case 10:
67
80
  try {
68
81
  locale = ((_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en';
69
82
  shopId = (_dvaStore$core2 = dvaStore.core) === null || _dvaStore$core2 === void 0 || (_dvaStore$core2 = _dvaStore$core2.core) === null || _dvaStore$core2 === void 0 || (_dvaStore$core2 = _dvaStore$core2.shop) === null || _dvaStore$core2 === void 0 ? void 0 : _dvaStore$core2.id;
@@ -78,7 +91,7 @@ var GooglePay = function GooglePay(props, ref) {
78
91
  } catch (err) {
79
92
  setOpen(false);
80
93
  }
81
- case 9:
94
+ case 11:
82
95
  case "end":
83
96
  return _context.stop();
84
97
  }
@@ -10,6 +10,7 @@ export interface WalletPassListProps {
10
10
  walletSetting: {
11
11
  name: string;
12
12
  };
13
+ onChangeDebounce?: boolean;
13
14
  }
14
15
  export declare type WalletPassListRef = {
15
16
  init: (params: MachineCodeListParams, formatList?: (val: WalletPassDataType[]) => WalletPassDataType[]) => void;
@@ -20,7 +20,10 @@ var WalletPassList = /*#__PURE__*/forwardRef(function (props, ref) {
20
20
  onChange = props.onChange,
21
21
  propsData = props.data,
22
22
  value = props.value,
23
- walletSetting = props.walletSetting;
23
+ walletSetting = props.walletSetting,
24
+ onLoadingChange = props.onLoadingChange,
25
+ propsLoading = props.loading,
26
+ onChangeDebounce = props.onChangeDebounce;
24
27
  var _useState = useState(propsData || []),
25
28
  _useState2 = _slicedToArray(_useState, 2),
26
29
  data = _useState2[0],
@@ -34,6 +37,9 @@ var WalletPassList = /*#__PURE__*/forwardRef(function (props, ref) {
34
37
  setData(propsData);
35
38
  }
36
39
  }, [propsData]);
40
+ useEffect(function () {
41
+ setLoading(!!propsLoading);
42
+ }, [propsLoading]);
37
43
  var getList = /*#__PURE__*/function () {
38
44
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, formatList) {
39
45
  var list;
@@ -84,6 +90,9 @@ var WalletPassList = /*#__PURE__*/forwardRef(function (props, ref) {
84
90
  init: init
85
91
  };
86
92
  });
93
+ useEffect(function () {
94
+ onLoadingChange === null || onLoadingChange === void 0 || onLoadingChange(loading);
95
+ }, [loading]);
87
96
 
88
97
  /**
89
98
  * 拆分出可用的和不可用的列表
@@ -131,7 +140,8 @@ var WalletPassList = /*#__PURE__*/forwardRef(function (props, ref) {
131
140
  value: value,
132
141
  onChange: handleChange,
133
142
  showEmpty: data.length === 0,
134
- empty: empty
143
+ empty: empty,
144
+ onChangeDebounce: onChangeDebounce
135
145
  }), !!disabledList.length && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
136
146
  className: "pisell-walletPass-list-disabled"
137
147
  }, locales.getText('tocPay.text.walletPassDisabled')), /*#__PURE__*/React.createElement(PisellCardList, {
@@ -42,41 +42,45 @@ var WalletPass = /*#__PURE__*/forwardRef(function (props, ref) {
42
42
  setCurrentWalletPass = _useState2[1];
43
43
  var _useState3 = useState(false),
44
44
  _useState4 = _slicedToArray(_useState3, 2),
45
- open = _useState4[0],
46
- setOpen = _useState4[1];
47
-
48
- /** 搜索 modal */
45
+ loading = _useState4[0],
46
+ setLoading = _useState4[1];
49
47
  var _useState5 = useState(false),
50
48
  _useState6 = _slicedToArray(_useState5, 2),
51
- searchOpen = _useState6[0],
52
- setSearchOpen = _useState6[1];
49
+ open = _useState6[0],
50
+ setOpen = _useState6[1];
53
51
 
54
- /** 搜索后添加的walletPass */
55
- var _useState7 = useState([]),
52
+ /** 搜索 modal */
53
+ var _useState7 = useState(false),
56
54
  _useState8 = _slicedToArray(_useState7, 2),
57
- addList = _useState8[0],
58
- setAddList = _useState8[1];
55
+ searchOpen = _useState8[0],
56
+ setSearchOpen = _useState8[1];
59
57
 
60
- /** 当前order信息 */
61
- var _useState9 = useState(null),
58
+ /** 搜索后添加的walletPass */
59
+ var _useState9 = useState([]),
62
60
  _useState10 = _slicedToArray(_useState9, 2),
63
- order = _useState10[0],
64
- setOrder = _useState10[1];
61
+ addList = _useState10[0],
62
+ setAddList = _useState10[1];
65
63
 
66
- /** 当前搜索modal内list数据 */
67
- var _useState11 = useState([]),
64
+ /** 当前order信息 */
65
+ var _useState11 = useState(null),
68
66
  _useState12 = _slicedToArray(_useState11, 2),
69
- searchData = _useState12[0],
70
- setSearchData = _useState12[1];
67
+ order = _useState12[0],
68
+ setOrder = _useState12[1];
69
+
70
+ /** 当前搜索modal内list数据 */
71
+ var _useState13 = useState([]),
72
+ _useState14 = _slicedToArray(_useState13, 2),
73
+ searchData = _useState14[0],
74
+ setSearchData = _useState14[1];
71
75
 
72
76
  /** 当前搜索modal内选中数据 */
73
- var _useState13 = useState({
77
+ var _useState15 = useState({
74
78
  ids: [],
75
79
  details: []
76
80
  }),
77
- _useState14 = _slicedToArray(_useState13, 2),
78
- searchSelectData = _useState14[0],
79
- setSearchSelectData = _useState14[1];
81
+ _useState16 = _slicedToArray(_useState15, 2),
82
+ searchSelectData = _useState16[0],
83
+ setSearchSelectData = _useState16[1];
80
84
 
81
85
  /** 是否默认选中 搜索时默认选中 列表select变更更新列表时不默认选中 */
82
86
  var isAutoSelect = useRef(false);
@@ -361,13 +365,16 @@ var WalletPass = /*#__PURE__*/forwardRef(function (props, ref) {
361
365
  data: otherCustomerWalletPassList,
362
366
  title: locales.getText('tocPay.text.couponCodesAdded'),
363
367
  onChange: handleOtherChange,
364
- value: selectValue
368
+ value: selectValue,
369
+ loading: loading,
370
+ onChangeDebounce: true
365
371
  }), /*#__PURE__*/React.createElement(List, {
366
372
  walletSetting: walletSetting,
367
373
  title: walletSetting.name,
368
374
  onChange: handleCurrentChange,
369
375
  ref: listRef,
370
- value: selectValue
376
+ value: selectValue,
377
+ onLoadingChange: setLoading
371
378
  }))), /*#__PURE__*/React.createElement(PisellModal, {
372
379
  title: /*#__PURE__*/React.createElement("div", null, locales.getText('tocPay.text.searchResult')),
373
380
  mobileModalHeight: '90%',
@@ -51,7 +51,7 @@ export declare const formatFranchiseeRoute: (url: string, history?: any) => stri
51
51
  export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
52
52
  export declare const clientPayment: (params: {
53
53
  order_id: number;
54
- type: "aliPay" | "wxPay";
54
+ type: "aliPay" | "wxPay" | 'google_pay';
55
55
  values: any;
56
56
  interaction?: any;
57
57
  }) => void;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -41,7 +41,7 @@ declare type ScanData = {
41
41
  };
42
42
  };
43
43
  export declare const formatScanCustomer: (data: ScanData) => {
44
- searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
44
+ searchType: "wallet" | "walletPass" | "product" | "local_product" | "customer";
45
45
  data: any;
46
46
  scanCode: string;
47
47
  } | null;
@@ -30,7 +30,7 @@ var Text = Typography.Text;
30
30
  dayjs.extend(timezone);
31
31
  dayjs.extend(utc);
32
32
  var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
33
- var _context$appHelper, _utils$getStore, _dvaStore$core, _context$appHelper2, _store$getState, _detail$machinecode_c;
33
+ var _context$appHelper, _utils$getStore, _dvaStore$core, _context$appHelper2, _store$getState, _utils$interaction, _utils$interaction$is, _detail$machinecode_c;
34
34
  var _props$detail = props.detail,
35
35
  detail = _props$detail === void 0 ? {} : _props$detail,
36
36
  _props$buttonGroupLis = props.buttonGroupList,
@@ -817,7 +817,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
817
817
  return /*#__PURE__*/React.createElement("div", {
818
818
  className: "wallet-detail".concat(platform === 'h5' ? ' wallet-detail-h5' : ' wallet-detail-pc', " ").concat(className || ''),
819
819
  ref: detailWrapperRef
820
- }, (platform === 'h5' || showWalletBar) && /*#__PURE__*/React.createElement("div", {
820
+ }, (platform === 'h5' || showWalletBar) && !(utils !== null && utils !== void 0 && (_utils$interaction = utils.interaction) !== null && _utils$interaction !== void 0 && (_utils$interaction = _utils$interaction.utils) !== null && _utils$interaction !== void 0 && (_utils$interaction$is = _utils$interaction.isAppEnv) !== null && _utils$interaction$is !== void 0 && _utils$interaction$is.call(_utils$interaction)) && /*#__PURE__*/React.createElement("div", {
821
821
  className: "wallet-detail-header"
822
822
  }, /*#__PURE__*/React.createElement(WalletBar, {
823
823
  setup: "detail",
@@ -62,8 +62,9 @@ var WalletCard = function WalletCard(_ref) {
62
62
  disabled: isDisabled,
63
63
  showDisabledReason: isDisabled,
64
64
  disabledReason: disabledReason,
65
- propStyle: {
66
- marginBottom: 16
65
+ style: {
66
+ marginBottom: 16,
67
+ width: '100%'
67
68
  },
68
69
  showBalanceSymbol: !['point_card', 'good_pass'].includes(tag),
69
70
  active: isActive,
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Layout: () => JSX.Element;
4
3
  export default Layout;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../booking/components/voucher/index.less';
3
2
  import './index.less';
4
3
  declare const VoucherCard: (props: any) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const DepositModal: (props: any) => JSX.Element;
3
4
  export default DepositModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AppointmentBooking: () => JSX.Element;
4
3
  export default AppointmentBooking;