@pisell/private-materials 6.3.107 → 6.3.109

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 (108) hide show
  1. package/build/lowcode/meta.js +2 -2
  2. package/build/lowcode/render/default/view.css +1 -1
  3. package/build/lowcode/render/default/view.js +1 -1
  4. package/build/lowcode/view.css +1 -1
  5. package/build/lowcode/view.js +1 -1
  6. package/es/components/booking/addons/model.d.ts +1 -10
  7. package/es/components/booking/forms/model.d.ts +1 -10
  8. package/es/components/booking/hooks/useClearCart.d.ts +1 -1
  9. package/es/components/booking/hooks/useClearCart.js +39 -9
  10. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  11. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  12. package/es/components/booking/info/model.d.ts +1 -10
  13. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  14. package/es/components/booking/info/service/index.less +4 -2
  15. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  16. package/es/components/booking/locales.d.ts +20 -0
  17. package/es/components/booking/locales.js +20 -0
  18. package/es/components/booking/model.d.ts +1 -9
  19. package/es/components/booking/notes/model.d.ts +1 -10
  20. package/es/components/booking/payments/model.d.ts +1 -10
  21. package/es/components/booking/utils.d.ts +2 -2
  22. package/es/components/eftpos/hooks.d.ts +1 -0
  23. package/es/components/eftposPay/amount.d.ts +1 -1
  24. package/es/components/eftposPay/device.d.ts +1 -1
  25. package/es/components/eftposPay/store/index.d.ts +1 -1
  26. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  27. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  28. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  29. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  30. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  31. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  32. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  33. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  34. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  35. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +142 -165
  36. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  37. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  38. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  39. package/es/components/pay/toC/index.js +31 -65
  40. package/es/components/pay/toC/model.d.ts +1 -10
  41. package/es/components/pay/toC/serve.d.ts +0 -18
  42. package/es/components/pay/toC/serve.js +1 -29
  43. package/es/components/pay/toC/utils.d.ts +2 -2
  44. package/es/components/pay/toC/utils.js +0 -4
  45. package/es/components/schedules/model.d.ts +1 -9
  46. package/es/components/shoppingCart/components/Cart/index.less +1 -0
  47. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  48. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  49. package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
  50. package/es/hooks/usePaymentLogger.d.ts +1 -0
  51. package/es/plus/pisellSalesManagement/config/booking.d.ts +1 -0
  52. package/es/plus/walletPassGallery/components/recharge/index.js +13 -5
  53. package/es/plus/walletPassGallery/components/recharge/index.less +70 -1
  54. package/es/plus/walletPassGallery/locales.d.ts +10 -0
  55. package/es/plus/walletPassGallery/locales.js +26 -5
  56. package/lib/components/booking/addons/model.d.ts +1 -10
  57. package/lib/components/booking/forms/model.d.ts +1 -10
  58. package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
  59. package/lib/components/booking/hooks/useClearCart.js +28 -6
  60. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  61. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  62. package/lib/components/booking/info/model.d.ts +1 -10
  63. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  64. package/lib/components/booking/info/service/index.less +4 -2
  65. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  66. package/lib/components/booking/locales.d.ts +20 -0
  67. package/lib/components/booking/locales.js +20 -0
  68. package/lib/components/booking/model.d.ts +1 -9
  69. package/lib/components/booking/notes/model.d.ts +1 -10
  70. package/lib/components/booking/payments/model.d.ts +1 -10
  71. package/lib/components/booking/utils.d.ts +2 -2
  72. package/lib/components/eftpos/hooks.d.ts +1 -0
  73. package/lib/components/eftposPay/amount.d.ts +1 -1
  74. package/lib/components/eftposPay/device.d.ts +1 -1
  75. package/lib/components/eftposPay/store/index.d.ts +1 -1
  76. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  77. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  78. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  79. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  80. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  81. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  82. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  83. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  84. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  85. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +100 -90
  86. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  87. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  88. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  89. package/lib/components/pay/toC/index.js +19 -52
  90. package/lib/components/pay/toC/model.d.ts +1 -10
  91. package/lib/components/pay/toC/serve.d.ts +0 -18
  92. package/lib/components/pay/toC/serve.js +0 -6
  93. package/lib/components/pay/toC/utils.d.ts +2 -2
  94. package/lib/components/pay/toC/utils.js +0 -4
  95. package/lib/components/schedules/model.d.ts +1 -9
  96. package/lib/components/shoppingCart/components/Cart/index.less +1 -0
  97. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  98. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  99. package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
  100. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  101. package/lib/plus/pisellSalesManagement/config/booking.d.ts +1 -0
  102. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -5
  103. package/lib/plus/walletPassGallery/components/recharge/index.less +70 -1
  104. package/lib/plus/walletPassGallery/locales.d.ts +10 -0
  105. package/lib/plus/walletPassGallery/locales.js +20 -5
  106. package/lowcode/eco-cup-list/meta.ts +20 -56
  107. package/lowcode/eco-customer-list/meta.ts +20 -56
  108. package/package.json +2 -2
@@ -23,14 +23,13 @@ import PayAmount from "./PayAmount";
23
23
  import WalletPassBlock from "./WalletPassBlock";
24
24
  import PaymentList from "./PaymentList";
25
25
  import PaymentMethods from "./PaymentMethods";
26
- import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus, getOrderBasicDetail } from "./serve";
26
+ import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus } from "./serve";
27
27
  import { Provider, Context } from "./model";
28
28
  import useEngineContext from "../../../hooks/useEngineContext";
29
29
  import usePaymentLogger from "../../../hooks/usePaymentLogger";
30
30
  import { request } from "../../../utils";
31
31
  import { removePayGroupFromStorage } from "./payGroup";
32
32
  import localeTexts from "./locales";
33
- import { getMachineCodeList } from "./PaymentMethods/WalletPass/serve";
34
33
  import { getIsWalletPassAndTripartitePayment } from "./utils";
35
34
  import { saleChannelMap } from "./status";
36
35
  import "./index.less";
@@ -264,7 +263,7 @@ var ToCPay = function ToCPay(props, ref) {
264
263
  */
265
264
  var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
266
265
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order) {
267
- var _order$_order, _state$payGroup2, _paymentListRef$curre, _yield$Promise$all, _yield$Promise$all2, data, allList, orderBasicDetail, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass, products, _res, recommended, transformList, noApplicableVoucher, recommendedAmount, _waitAmount2;
266
+ var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass, withCustomerIdList;
268
267
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
269
268
  while (1) switch (_context3.prev = _context3.next) {
270
269
  case 0:
@@ -277,79 +276,46 @@ var ToCPay = function ToCPay(props, ref) {
277
276
  });
278
277
  _context3.prev = 1;
279
278
  _context3.next = 4;
280
- return Promise.all([getPaymentsAndWalletPass({
279
+ return getPaymentsAndWalletPass({
281
280
  order_id: order.order_id,
282
281
  total_amount: order.amount,
283
282
  sale_channel: order.sale_channel || 'online-store'
284
- }), getMachineCodeList({
285
- order_id: order.order_id,
286
- available: 2,
287
- prepare_payments: [],
288
- filter_prepare_wallet_pass: 1,
289
- sale_channel: ((_order$_order = order._order) === null || _order$_order === void 0 ? void 0 : _order$_order.sale_channel) || 'online-store',
290
- other_exact_codes: []
291
- }), getOrderBasicDetail(order.order_id)]);
292
- case 4:
293
- _yield$Promise$all = _context3.sent;
294
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
295
- data = _yield$Promise$all2[0];
296
- allList = _yield$Promise$all2[1];
297
- orderBasicDetail = _yield$Promise$all2[2];
298
- _ref4 = data || {}, _ref4$remain_amount = _ref4.remain_amount, remain_amount = _ref4$remain_amount === void 0 ? 0 : _ref4$remain_amount, wallet_pass_recommend_list = _ref4.wallet_pass_recommend_list, wallet_pass_amount = _ref4.wallet_pass_amount, payment_list = _ref4.payment_list, walletPass = _ref4.walletPass;
299
- products = (orderBasicDetail.detail || []).map(function (item) {
300
- var _ref5;
301
- return _objectSpread(_objectSpread({}, item), {}, {
302
- is_price_include_tax: orderBasicDetail.is_price_include_tax,
303
- product_bundle: (_ref5 = item.product_bundle || []) === null || _ref5 === void 0 ? void 0 : _ref5.map(function (bundle) {
304
- return _objectSpread(_objectSpread({}, bundle), {}, {
305
- is_price_include_tax: orderBasicDetail.is_price_include_tax
306
- });
307
- })
308
- });
309
- });
310
- _res = utils.walletPassEvaluator.getRecommendedVouchers({
311
- orderTotalAmount: Math.min(orderBasicDetail.product_unpaid_total_pay_amount, order.amount),
312
- products: products,
313
- vouchers: allList || []
314
283
  });
315
- recommended = _res.recommended, transformList = _res.transformList, noApplicableVoucher = _res.noApplicableVoucher, recommendedAmount = _res.recommendedAmount; // 记录获取到的数据
284
+ case 4:
285
+ data = _context3.sent;
286
+ _ref4 = data || {}, _ref4$remain_amount = _ref4.remain_amount, remain_amount = _ref4$remain_amount === void 0 ? 0 : _ref4$remain_amount, wallet_pass_recommend_list = _ref4.wallet_pass_recommend_list, wallet_pass_amount = _ref4.wallet_pass_amount, payment_list = _ref4.payment_list, walletPass = _ref4.walletPass; // 记录获取到的数据
316
287
  paymentLogger.addLog({
317
288
  key: '支付数据获取',
318
289
  value: ''
319
290
  });
320
- _waitAmount2 = new Decimal((order === null || order === void 0 ? void 0 : order.amount) || 0).minus(new Decimal(recommendedAmount)).toNumber(); // 设置交易组
291
+ withCustomerIdList = (wallet_pass_recommend_list || []).map(function (item) {
292
+ return _objectSpread(_objectSpread({}, item), {}, {
293
+ customer_id: customer_id || item.customer_id
294
+ });
295
+ }); // 设置交易组
321
296
  dispatch({
322
297
  type: 'setPayGroup',
323
298
  payload: {
324
299
  // ...state.payGroup,
325
300
  order_id: order === null || order === void 0 ? void 0 : order.order_id,
326
301
  // total_amount: order?.amount,
327
- orderDetail: orderBasicDetail,
328
302
  // 原订单信息
329
303
  _order: order,
330
304
  payment_group_id: order === null || order === void 0 ? void 0 : order.payment_group_id,
331
305
  // 支付方式没有walletPass时walletPass设置null
332
306
  walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
333
- // 推荐钱包
334
- cards: recommended,
335
- // 推荐金额
336
- amount: recommendedAmount,
337
- // 不可用钱包
338
- noApplicableVoucher: noApplicableVoucher,
339
- // 转换列表
340
- transformList: transformList
341
- // amount: wallet_pass_amount,
342
- // cards: wallet_pass_recommend_list,
307
+ amount: wallet_pass_amount,
308
+ cards: withCustomerIdList
343
309
  }) : null,
344
310
  total_amount: order === null || order === void 0 ? void 0 : order.amount,
345
- wait_amount: Math.max(0, _waitAmount2)
311
+ wait_amount: remain_amount
346
312
  }
347
313
  });
348
314
 
349
315
  // 初始化支付列表
350
- _context3.next = 18;
316
+ _context3.next = 11;
351
317
  return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list, remain_amount || 0);
352
- case 18:
318
+ case 11:
353
319
  // 解除loading
354
320
  setTimeout(function () {
355
321
  setLoading(false);
@@ -360,10 +326,10 @@ var ToCPay = function ToCPay(props, ref) {
360
326
  key: '获取支付列表成功',
361
327
  value: ''
362
328
  });
363
- _context3.next = 28;
329
+ _context3.next = 21;
364
330
  break;
365
- case 22:
366
- _context3.prev = 22;
331
+ case 15:
332
+ _context3.prev = 15;
367
333
  _context3.t0 = _context3["catch"](1);
368
334
  console.log('err', _context3.t0);
369
335
 
@@ -386,11 +352,11 @@ var ToCPay = function ToCPay(props, ref) {
386
352
  fn: '_getPaymentsAndWalletPass'
387
353
  }
388
354
  });
389
- case 28:
355
+ case 21:
390
356
  case "end":
391
357
  return _context3.stop();
392
358
  }
393
- }, _callee3, null, [[1, 22]]);
359
+ }, _callee3, null, [[1, 15]]);
394
360
  }));
395
361
  return function _getPaymentsAndWalletPass(_x3) {
396
362
  return _ref3.apply(this, arguments);
@@ -407,7 +373,7 @@ var ToCPay = function ToCPay(props, ref) {
407
373
  * @Date: 2024-08-16 10:46
408
374
  */
409
375
  var handlePaymentByType = /*#__PURE__*/function () {
410
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
376
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
411
377
  var _state$payGroup3;
412
378
  var paymentType, currentPayGroup, _paymentMethodsRef$cu;
413
379
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -467,7 +433,7 @@ var ToCPay = function ToCPay(props, ref) {
467
433
  }, _callee4, null, [[3, 12]]);
468
434
  }));
469
435
  return function handlePaymentByType(_x4, _x5) {
470
- return _ref6.apply(this, arguments);
436
+ return _ref5.apply(this, arguments);
471
437
  };
472
438
  }();
473
439
 
@@ -479,7 +445,7 @@ var ToCPay = function ToCPay(props, ref) {
479
445
  * @Date: 2024-08-15 13:41
480
446
  */
481
447
  var paymentInit = /*#__PURE__*/function () {
482
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
448
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
483
449
  var _state$payGroup4;
484
450
  var orderId, _state$payGroup5, data;
485
451
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -553,7 +519,7 @@ var ToCPay = function ToCPay(props, ref) {
553
519
  }, _callee5, null, [[3, 12]]);
554
520
  }));
555
521
  return function paymentInit(_x6) {
556
- return _ref7.apply(this, arguments);
522
+ return _ref6.apply(this, arguments);
557
523
  };
558
524
  }();
559
525
 
@@ -612,7 +578,7 @@ var ToCPay = function ToCPay(props, ref) {
612
578
  * @Date: 2024-08-30 10:23:48
613
579
  */
614
580
  var getIsShowDetectIncognitoConfirm = /*#__PURE__*/function () {
615
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
581
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
616
582
  var _yield$detectIncognit, isPrivate;
617
583
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
618
584
  while (1) switch (_context6.prev = _context6.next) {
@@ -630,7 +596,7 @@ var ToCPay = function ToCPay(props, ref) {
630
596
  }, _callee6);
631
597
  }));
632
598
  return function getIsShowDetectIncognitoConfirm(_x7) {
633
- return _ref8.apply(this, arguments);
599
+ return _ref7.apply(this, arguments);
634
600
  };
635
601
  }();
636
602
 
@@ -642,7 +608,7 @@ var ToCPay = function ToCPay(props, ref) {
642
608
  * @Date: 2024-08-15 13:25
643
609
  */
644
610
  var onSubmit = /*#__PURE__*/function () {
645
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
611
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
646
612
  var _state$payGroup10, _state$payGroup11, _state$payGroup12;
647
613
  var newPayGroup, _state$payGroup13, _newPayGroup, _newPayGroup2, _state$payGroup14, result, _state$payGroup15;
648
614
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
@@ -720,7 +686,7 @@ var ToCPay = function ToCPay(props, ref) {
720
686
  }, _callee7, null, [[2, 20]]);
721
687
  }));
722
688
  return function onSubmit(_x8) {
723
- return _ref9.apply(this, arguments);
689
+ return _ref8.apply(this, arguments);
724
690
  };
725
691
  }();
726
692
 
@@ -777,7 +743,7 @@ var ToCPay = function ToCPay(props, ref) {
777
743
  * @Date: 2024-08-09 14:25
778
744
  */
779
745
  var payCallback = /*#__PURE__*/function () {
780
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
746
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
781
747
  var _res$data, _state$payGroup20, _props$callback;
782
748
  var orderId, _res$data2;
783
749
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
@@ -817,7 +783,7 @@ var ToCPay = function ToCPay(props, ref) {
817
783
  }, _callee8);
818
784
  }));
819
785
  return function payCallback(_x9) {
820
- return _ref10.apply(this, arguments);
786
+ return _ref9.apply(this, arguments);
821
787
  };
822
788
  }();
823
789
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  platform: 'pc' | 'h5' | '' | undefined;
4
3
  order: any;
@@ -29,13 +28,5 @@ export interface PayGroup {
29
28
  pay_number?: string;
30
29
  _order: any;
31
30
  front_order_uuid?: string;
32
- orderDetail: any;
33
31
  }
34
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
35
- state: FormState;
36
- } & {
37
- dispatch: (params: {
38
- type: string;
39
- payload: any;
40
- }) => void;
41
- }>;
32
+ export declare const Provider: any, Context: any;
@@ -62,21 +62,3 @@ export declare const getWalletNameAndPopupStatus: (values: {
62
62
  * @description: 获取支付结果
63
63
  */
64
64
  export declare const getPaymentResult: (values: any) => Promise<any>;
65
- declare type OrderBasicDetail = {
66
- id: number;
67
- status: string;
68
- payment_status: string;
69
- order_time: string;
70
- detail: any[];
71
- product_unpaid_total_pay_amount: number;
72
- product_paid_total_pay_amount: number;
73
- is_price_include_tax: 1 | 0;
74
- };
75
- /**
76
- * @title: 查询订单基础信息和订单商品信息
77
- * @description: 查询订单基础信息和订单商品信息
78
- * @param {string} order_id
79
- * @return {*}
80
- */
81
- export declare const getOrderBasicDetail: (order_id: string) => Promise<OrderBasicDetail>;
82
- export {};
@@ -185,32 +185,4 @@ export var getWalletNameAndPopupStatus = /*#__PURE__*/function () {
185
185
  */
186
186
  export var getPaymentResult = function getPaymentResult(values) {
187
187
  return request.getRequest().get("/h5/pay/order/payment/result", values);
188
- };
189
- /**
190
- * @title: 查询订单基础信息和订单商品信息
191
- * @description: 查询订单基础信息和订单商品信息
192
- * @param {string} order_id
193
- * @return {*}
194
- */
195
- export var getOrderBasicDetail = /*#__PURE__*/function () {
196
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(order_id) {
197
- var _yield$request$getReq5, data;
198
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
199
- while (1) switch (_context5.prev = _context5.next) {
200
- case 0:
201
- _context5.next = 2;
202
- return request.getRequest().get("/h5/order/order/".concat(order_id, "/basic-detail"), {});
203
- case 2:
204
- _yield$request$getReq5 = _context5.sent;
205
- data = _yield$request$getReq5.data;
206
- return _context5.abrupt("return", data);
207
- case 5:
208
- case "end":
209
- return _context5.stop();
210
- }
211
- }, _callee5);
212
- }));
213
- return function getOrderBasicDetail(_x5) {
214
- return _ref5.apply(this, arguments);
215
- };
216
- }();
188
+ };
@@ -22,7 +22,7 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
22
22
  order_id: string;
23
23
  payment_group_id: number;
24
24
  payments: {
25
- amount: string | number;
25
+ amount: string;
26
26
  wallet_pass_use_value: any;
27
27
  voucher_id: any;
28
28
  tag: any;
@@ -48,7 +48,7 @@ export declare const isFranchiseeShop: (path?: any, history?: any) => any;
48
48
  */
49
49
  export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
50
50
  export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
51
- export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string | number;
51
+ export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
52
52
  export declare const clientPayment: (params: {
53
53
  order_id: number;
54
54
  type: "aliPay" | "wxPay" | 'google_pay';
@@ -6,7 +6,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { Decimal } from 'decimal.js';
8
8
  import { isTripartitePayment } from "./status";
9
- import { isNumber } from "@pisell/utils";
10
9
  /**
11
10
  * 计算walletPass列表数据的总金额
12
11
  * @param list
@@ -96,9 +95,6 @@ export var formatFranchiseeRoute = function formatFranchiseeRoute(url, history)
96
95
 
97
96
  // 获取walletPass可用最大金额
98
97
  export var getAvailableMaxAmount = function getAvailableMaxAmount(data) {
99
- if (isNumber(data._available_max_amount)) {
100
- return data._available_max_amount;
101
- }
102
98
  return data.tag !== 'point_card' ? data.available_max_amount : data === null || data === void 0 ? void 0 : data.recommended_usage_amount;
103
99
  };
104
100
  export var clientPayment = function clientPayment(params) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,11 +68,4 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
- state: FormState;
74
- } & {
75
- dispatch: (params: {
76
- type: string;
77
- payload: any;
78
- }) => void;
79
- }>;
71
+ export declare const Provider: any, Context: any;
@@ -40,6 +40,7 @@
40
40
  line-height: 24px; /* 150% */
41
41
  display: flex;
42
42
  align-items: center;
43
+ width: max-content;
43
44
  .anticon {
44
45
  font-size: 18px;
45
46
  margin-right: 6px;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Empty: (props: any) => import("react").JSX.Element;
3
4
  export default Empty;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const useClearCart: (key?: number | undefined) => React.JSX.Element | null;
2
+ declare const useClearCart: (key?: number | undefined) => React.JSX.Element;
3
3
  export default useClearCart;
@@ -1,15 +1,23 @@
1
1
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
2
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
3
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
4
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
- import React from 'react';
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import React, { useState, useCallback, useMemo } from 'react';
8
12
  import classNames from 'classnames';
9
- import { Iconfont } from '@pisell/materials';
13
+ import { Iconfont, PisellModal } from '@pisell/materials';
10
14
  import { useContext } from "./useContext";
11
15
  import { locales } from '@pisell/utils';
12
16
  var useClearCart = function useClearCart(key) {
17
+ var _useState = useState(false),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ open = _useState2[0],
20
+ setOpen = _useState2[1];
13
21
  var _useContext = useContext(),
14
22
  state = _useContext.state,
15
23
  onChange = _useContext.onChange;
@@ -36,6 +44,7 @@ var useClearCart = function useClearCart(key) {
36
44
  return item === null || item === void 0 ? void 0 : item._id;
37
45
  });
38
46
  onChange(ids, 'delete_holders', key);
47
+ setOpen(false);
39
48
  return;
40
49
  products = products.filter(function (item) {
41
50
  return (item === null || item === void 0 ? void 0 : item.holder_id) !== key;
@@ -46,13 +55,34 @@ var useClearCart = function useClearCart(key) {
46
55
  // updateState(updateProduct(state, products));
47
56
  // onChange(products);
48
57
  };
49
- return !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 && !isHideClearCart ? /*#__PURE__*/React.createElement("span", {
50
- className: classNames('pisell-lowcode__shopping-cart-clear-btn', {
51
- 'pisell-lowcode__shopping-cart-clear-btn-empty': isProductList
52
- }),
53
- onClick: handleClear
54
- }, /*#__PURE__*/React.createElement(Iconfont, {
55
- type: "pisell2-trash-01"
56
- }), /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart'))) : null;
58
+ var handleOpenModal = useCallback(function () {
59
+ setOpen(true);
60
+ }, []);
61
+ var handleCancel = useCallback(function () {
62
+ setOpen(false);
63
+ }, []);
64
+ return useMemo(function () {
65
+ var showClearBtn = !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 && !isHideClearCart;
66
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showClearBtn ? /*#__PURE__*/React.createElement("span", {
67
+ className: classNames('pisell-lowcode__shopping-cart-clear-btn', {
68
+ 'pisell-lowcode__shopping-cart-clear-btn-empty': isProductList
69
+ }),
70
+ onClick: handleOpenModal
71
+ }, /*#__PURE__*/React.createElement(Iconfont, {
72
+ type: "pisell2-trash-01"
73
+ }), /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart'))) : null, /*#__PURE__*/React.createElement(PisellModal, {
74
+ open: open,
75
+ title: locales.getText('pisell2.booking.info.text.clear-cart-modal.title'),
76
+ onOk: handleClear,
77
+ onCancel: handleCancel,
78
+ okText: locales.getText('pisell2.booking.info.text.clear-cart-modal.confirm'),
79
+ cancelText: locales.getText('pisell2.booking.info.text.clear-cart-modal.cancel'),
80
+ destroyOnClose: true
81
+ }, /*#__PURE__*/React.createElement("div", {
82
+ style: {
83
+ margin: '24px 0'
84
+ }
85
+ }, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart-modal.content')))));
86
+ }, [open, disabledEdit, holders === null || holders === void 0 ? void 0 : holders.length, isHideClearCart, isProductList]);
57
87
  };
58
88
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface LogData {
2
3
  key: string;
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const getBookingStatusMap: () => Record<string, string>;
2
3
  export declare const BOOKING_STATUS_COLOR_MAP: Record<string, string>;
3
4
  export declare const getBookingPlatformMap: () => Record<string, string>;
@@ -129,17 +129,25 @@ var Recharge = function Recharge(_ref) {
129
129
  className: "card-content-left"
130
130
  }, /*#__PURE__*/React.createElement("p", {
131
131
  className: "pisell-card-amount-item-name"
132
- }, item.name), /*#__PURE__*/React.createElement(PisellText.Amount, {
132
+ }, item.name), /*#__PURE__*/React.createElement("div", {
133
+ className: "pisell-card-amount-item-arrival"
134
+ }, /*#__PURE__*/React.createElement("span", {
135
+ className: "pisell-card-amount-item-label"
136
+ }, locales.getText('wallet-pass-gallery.rechargeArrivalAmount')), /*#__PURE__*/React.createElement(PisellText.Amount, {
133
137
  showCurrencySymbol: true,
134
- className: "pisell-card-amount-item-value",
138
+ className: "highlight-amount",
135
139
  useThousandsSeparator: true,
136
140
  value: item.gift_price
137
- })), /*#__PURE__*/React.createElement(PisellText.Amount, {
141
+ }))), /*#__PURE__*/React.createElement("div", {
142
+ className: "card-content-right"
143
+ }, /*#__PURE__*/React.createElement("span", {
144
+ className: "pay-label"
145
+ }, locales.getText('wallet-pass-gallery.rechargePayAmount')), /*#__PURE__*/React.createElement(PisellText.Amount, {
138
146
  showCurrencySymbol: true,
139
- className: "pisell-card-amount-item-value",
147
+ className: "pay-amount",
140
148
  useThousandsSeparator: true,
141
149
  value: item.price
142
- }))));
150
+ })))));
143
151
  }))));
144
152
  };
145
153
  export default Recharge;
@@ -7,10 +7,79 @@
7
7
 
8
8
  &-card-item {
9
9
  cursor: pointer;
10
+ min-width: 0;
11
+ }
12
+
13
+ .pisell-card-item {
14
+ border-radius: 8px;
15
+ border: 1px solid transparent;
16
+ transition: all 0.3s;
17
+ background: #fff;
18
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
19
+ min-width: 0;
10
20
  }
11
21
 
12
22
  .pisell-card-selected {
13
- border: 1px solid var(--theme-color, #7f56d9);
23
+ border-color: var(--theme-color, #7f56d9);
14
24
  background: var(--Primary-50, #f9f5ff);
25
+ box-shadow: 0 4px 12px rgba(127, 86, 217, 0.1);
26
+ }
27
+
28
+ .card-content {
29
+ display: flex;
30
+ justify-content: space-between;
31
+ align-items: center;
32
+ gap: 16px;
33
+ }
34
+
35
+ .card-content-left {
36
+ display: flex;
37
+ flex-direction: column;
38
+ gap: 8px;
39
+ flex: 1;
40
+ min-width: 0;
41
+ }
42
+
43
+ .pisell-card-amount-item-name {
44
+ font-size: 16px;
45
+ font-weight: 600;
46
+ color: #333;
47
+ margin: 0;
48
+ white-space: nowrap;
49
+ overflow: hidden;
50
+ text-overflow: ellipsis;
51
+ }
52
+
53
+ .pisell-card-amount-item-arrival {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 4px;
57
+ font-size: 13px;
58
+ color: #666;
59
+ flex-wrap: wrap;
60
+
61
+ .highlight-amount {
62
+ color: #ff4d4f;
63
+ font-weight: 500;
64
+ }
65
+ }
66
+
67
+ .card-content-right {
68
+ display: flex;
69
+ flex-direction: column;
70
+ align-items: flex-end;
71
+ margin-top: 4px;
72
+ flex-shrink: 0;
73
+ }
74
+
75
+ .pay-label {
76
+ font-size: 12px;
77
+ color: #666;
78
+ }
79
+
80
+ .pay-amount {
81
+ font-size: 20px;
82
+ font-weight: bold;
83
+ color: var(--theme-color, #7f56d9);
15
84
  }
16
85
  }
@@ -92,6 +92,8 @@ declare const _default: {
92
92
  'page.wallet.tempHolderSelector.confirm': string;
93
93
  'page.wallet.notValidDate': string;
94
94
  'page.wallet.includedDate': string;
95
+ 'wallet-pass-gallery.rechargeArrivalAmount': string;
96
+ 'wallet-pass-gallery.rechargePayAmount': string;
95
97
  };
96
98
  'zh-CN': {
97
99
  'wallet-pass-gallery.rechargeableCard': string;
@@ -186,6 +188,8 @@ declare const _default: {
186
188
  'page.wallet.tempHolderSelector.confirm': string;
187
189
  'page.wallet.notValidDate': string;
188
190
  'page.wallet.includedDate': string;
191
+ 'wallet-pass-gallery.rechargeArrivalAmount': string;
192
+ 'wallet-pass-gallery.rechargePayAmount': string;
189
193
  };
190
194
  'zh-HK': {
191
195
  'wallet-pass-gallery.rechargeableCard': string;
@@ -280,6 +284,8 @@ declare const _default: {
280
284
  'page.wallet.tempHolderSelector.confirm': string;
281
285
  'page.wallet.notValidDate': string;
282
286
  'page.wallet.includedDate': string;
287
+ 'wallet-pass-gallery.rechargeArrivalAmount': string;
288
+ 'wallet-pass-gallery.rechargePayAmount': string;
283
289
  };
284
290
  ja: {
285
291
  'wallet-pass-gallery.rechargeableCard': string;
@@ -374,6 +380,8 @@ declare const _default: {
374
380
  'page.wallet.tempHolderSelector.confirm': string;
375
381
  'page.wallet.notValidDate': string;
376
382
  'page.wallet.includedDate': string;
383
+ 'wallet-pass-gallery.rechargeArrivalAmount': string;
384
+ 'wallet-pass-gallery.rechargePayAmount': string;
377
385
  };
378
386
  pt: {
379
387
  'wallet-pass-gallery.rechargeableCard': string;
@@ -468,6 +476,8 @@ declare const _default: {
468
476
  'page.wallet.tempHolderSelector.confirm': string;
469
477
  'page.wallet.notValidDate': string;
470
478
  'page.wallet.includedDate': string;
479
+ 'wallet-pass-gallery.rechargeArrivalAmount': string;
480
+ 'wallet-pass-gallery.rechargePayAmount': string;
471
481
  };
472
482
  };
473
483
  export default _default;