@pisell/private-materials 6.3.111 → 6.3.113

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 (111) 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 +4 -4
  7. package/build/lowcode/render/default/view.js +4 -4
  8. package/build/lowcode/view.js +4 -4
  9. package/es/components/booking/addons/model.d.ts +10 -1
  10. package/es/components/booking/components/footer/utils.js +4 -4
  11. package/es/components/booking/forms/model.d.ts +10 -1
  12. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  13. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  14. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  15. package/es/components/booking/info/model.d.ts +10 -1
  16. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/info2/service/editService/index.js +36 -6
  19. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  20. package/es/components/booking/info2/service/editService/utils.js +76 -0
  21. package/es/components/booking/model.d.ts +9 -1
  22. package/es/components/booking/notes/model.d.ts +10 -1
  23. package/es/components/booking/payments/model.d.ts +10 -1
  24. package/es/components/booking/utils.d.ts +2 -2
  25. package/es/components/eftpos/hooks.d.ts +0 -1
  26. package/es/components/eftposPay/amount.d.ts +1 -1
  27. package/es/components/eftposPay/device.d.ts +1 -1
  28. package/es/components/eftposPay/hooks.d.ts +1 -1
  29. package/es/components/eftposPay/store/index.d.ts +4 -4
  30. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  31. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  32. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  33. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  34. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  35. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  36. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  37. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  38. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  39. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  40. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  41. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  42. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  43. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +165 -142
  44. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  45. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  46. package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
  47. package/es/components/pay/toC/index.js +65 -31
  48. package/es/components/pay/toC/model.d.ts +10 -1
  49. package/es/components/pay/toC/serve.d.ts +18 -0
  50. package/es/components/pay/toC/serve.js +42 -15
  51. package/es/components/pay/toC/utils.d.ts +2 -2
  52. package/es/components/pay/toC/utils.js +4 -0
  53. package/es/components/schedules/model.d.ts +9 -1
  54. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  55. package/es/hooks/usePaymentLogger.d.ts +0 -1
  56. package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -7
  57. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  58. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  59. package/es/pro/Selector/Selector.d.ts +1 -1
  60. package/lib/components/booking/addons/model.d.ts +10 -1
  61. package/lib/components/booking/components/footer/utils.js +2 -2
  62. package/lib/components/booking/forms/model.d.ts +10 -1
  63. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  64. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  65. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  66. package/lib/components/booking/info/model.d.ts +10 -1
  67. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  68. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  69. package/lib/components/booking/info2/service/editService/index.js +24 -1
  70. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  71. package/lib/components/booking/info2/service/editService/utils.js +38 -2
  72. package/lib/components/booking/model.d.ts +9 -1
  73. package/lib/components/booking/notes/model.d.ts +10 -1
  74. package/lib/components/booking/payments/model.d.ts +10 -1
  75. package/lib/components/booking/utils.d.ts +2 -2
  76. package/lib/components/eftpos/hooks.d.ts +0 -1
  77. package/lib/components/eftposPay/amount.d.ts +1 -1
  78. package/lib/components/eftposPay/device.d.ts +1 -1
  79. package/lib/components/eftposPay/hooks.d.ts +1 -1
  80. package/lib/components/eftposPay/store/index.d.ts +4 -4
  81. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  82. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  83. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  84. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  85. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  86. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  87. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  88. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  89. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  90. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  91. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  92. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  93. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  94. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -100
  95. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  96. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  97. package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
  98. package/lib/components/pay/toC/index.js +52 -19
  99. package/lib/components/pay/toC/model.d.ts +10 -1
  100. package/lib/components/pay/toC/serve.d.ts +18 -0
  101. package/lib/components/pay/toC/serve.js +6 -0
  102. package/lib/components/pay/toC/utils.d.ts +2 -2
  103. package/lib/components/pay/toC/utils.js +6 -2
  104. package/lib/components/schedules/model.d.ts +9 -1
  105. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  106. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  107. package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -7
  108. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  109. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  110. package/lib/pro/Selector/Selector.d.ts +1 -1
  111. package/package.json +4 -4
@@ -23,13 +23,14 @@ 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, checkPendingPayment } from "./serve";
26
+ import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus, getOrderBasicDetail, checkPendingPayment } 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";
33
34
  import { getIsWalletPassAndTripartitePayment } from "./utils";
34
35
  import { saleChannelMap } from "./status";
35
36
  import "./index.less";
@@ -286,7 +287,7 @@ var ToCPay = function ToCPay(props, ref) {
286
287
  */
287
288
  var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
288
289
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order) {
289
- var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass, withCustomerIdList;
290
+ 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;
290
291
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
291
292
  while (1) switch (_context3.prev = _context3.next) {
292
293
  case 0:
@@ -299,46 +300,79 @@ var ToCPay = function ToCPay(props, ref) {
299
300
  });
300
301
  _context3.prev = 1;
301
302
  _context3.next = 4;
302
- return getPaymentsAndWalletPass({
303
+ return Promise.all([getPaymentsAndWalletPass({
303
304
  order_id: order.order_id,
304
305
  total_amount: order.amount,
305
306
  sale_channel: order.sale_channel || 'online-store'
306
- });
307
+ }), getMachineCodeList({
308
+ order_id: order.order_id,
309
+ available: 2,
310
+ prepare_payments: [],
311
+ filter_prepare_wallet_pass: 1,
312
+ sale_channel: ((_order$_order = order._order) === null || _order$_order === void 0 ? void 0 : _order$_order.sale_channel) || 'online-store',
313
+ other_exact_codes: []
314
+ }), getOrderBasicDetail(order.order_id)]);
307
315
  case 4:
308
- data = _context3.sent;
309
- _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
+ _yield$Promise$all = _context3.sent;
317
+ _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
318
+ data = _yield$Promise$all2[0];
319
+ allList = _yield$Promise$all2[1];
320
+ orderBasicDetail = _yield$Promise$all2[2];
321
+ _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;
322
+ products = (orderBasicDetail.detail || []).map(function (item) {
323
+ var _ref5;
324
+ return _objectSpread(_objectSpread({}, item), {}, {
325
+ is_price_include_tax: orderBasicDetail.is_price_include_tax,
326
+ product_bundle: (_ref5 = item.product_bundle || []) === null || _ref5 === void 0 ? void 0 : _ref5.map(function (bundle) {
327
+ return _objectSpread(_objectSpread({}, bundle), {}, {
328
+ is_price_include_tax: orderBasicDetail.is_price_include_tax
329
+ });
330
+ })
331
+ });
332
+ });
333
+ _res = utils.walletPassEvaluator.getRecommendedVouchers({
334
+ orderTotalAmount: Math.min(orderBasicDetail.product_unpaid_total_pay_amount, order.amount),
335
+ products: products,
336
+ vouchers: allList || []
337
+ });
338
+ recommended = _res.recommended, transformList = _res.transformList, noApplicableVoucher = _res.noApplicableVoucher, recommendedAmount = _res.recommendedAmount; // 记录获取到的数据
310
339
  paymentLogger.addLog({
311
340
  key: '支付数据获取',
312
341
  value: ''
313
342
  });
314
- withCustomerIdList = (wallet_pass_recommend_list || []).map(function (item) {
315
- return _objectSpread(_objectSpread({}, item), {}, {
316
- customer_id: customer_id || item.customer_id
317
- });
318
- }); // 设置交易组
343
+ _waitAmount2 = new Decimal((order === null || order === void 0 ? void 0 : order.amount) || 0).minus(new Decimal(recommendedAmount)).toNumber(); // 设置交易组
319
344
  dispatch({
320
345
  type: 'setPayGroup',
321
346
  payload: {
322
347
  // ...state.payGroup,
323
348
  order_id: order === null || order === void 0 ? void 0 : order.order_id,
324
349
  // total_amount: order?.amount,
350
+ orderDetail: orderBasicDetail,
325
351
  // 原订单信息
326
352
  _order: order,
327
353
  payment_group_id: order === null || order === void 0 ? void 0 : order.payment_group_id,
328
354
  // 支付方式没有walletPass时walletPass设置null
329
355
  walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
330
- amount: wallet_pass_amount,
331
- cards: withCustomerIdList
356
+ // 推荐钱包
357
+ cards: recommended,
358
+ // 推荐金额
359
+ amount: recommendedAmount,
360
+ // 不可用钱包
361
+ noApplicableVoucher: noApplicableVoucher,
362
+ // 转换列表
363
+ transformList: transformList
364
+ // amount: wallet_pass_amount,
365
+ // cards: wallet_pass_recommend_list,
332
366
  }) : null,
333
367
  total_amount: order === null || order === void 0 ? void 0 : order.amount,
334
- wait_amount: remain_amount
368
+ wait_amount: Math.max(0, _waitAmount2)
335
369
  }
336
370
  });
337
371
 
338
372
  // 初始化支付列表
339
- _context3.next = 11;
373
+ _context3.next = 18;
340
374
  return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list, remain_amount || 0);
341
- case 11:
375
+ case 18:
342
376
  // 解除loading
343
377
  setTimeout(function () {
344
378
  setLoading(false);
@@ -349,10 +383,10 @@ var ToCPay = function ToCPay(props, ref) {
349
383
  key: '获取支付列表成功',
350
384
  value: ''
351
385
  });
352
- _context3.next = 21;
386
+ _context3.next = 28;
353
387
  break;
354
- case 15:
355
- _context3.prev = 15;
388
+ case 22:
389
+ _context3.prev = 22;
356
390
  _context3.t0 = _context3["catch"](1);
357
391
  console.log('err', _context3.t0);
358
392
 
@@ -375,11 +409,11 @@ var ToCPay = function ToCPay(props, ref) {
375
409
  fn: '_getPaymentsAndWalletPass'
376
410
  }
377
411
  });
378
- case 21:
412
+ case 28:
379
413
  case "end":
380
414
  return _context3.stop();
381
415
  }
382
- }, _callee3, null, [[1, 15]]);
416
+ }, _callee3, null, [[1, 22]]);
383
417
  }));
384
418
  return function _getPaymentsAndWalletPass(_x3) {
385
419
  return _ref3.apply(this, arguments);
@@ -396,7 +430,7 @@ var ToCPay = function ToCPay(props, ref) {
396
430
  * @Date: 2024-08-16 10:46
397
431
  */
398
432
  var handlePaymentByType = /*#__PURE__*/function () {
399
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
433
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
400
434
  var _state$payGroup3;
401
435
  var paymentType, currentPayGroup, _paymentMethodsRef$cu;
402
436
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -456,7 +490,7 @@ var ToCPay = function ToCPay(props, ref) {
456
490
  }, _callee4, null, [[3, 12]]);
457
491
  }));
458
492
  return function handlePaymentByType(_x4, _x5) {
459
- return _ref5.apply(this, arguments);
493
+ return _ref6.apply(this, arguments);
460
494
  };
461
495
  }();
462
496
 
@@ -468,7 +502,7 @@ var ToCPay = function ToCPay(props, ref) {
468
502
  * @Date: 2024-08-15 13:41
469
503
  */
470
504
  var paymentInit = /*#__PURE__*/function () {
471
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
505
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
472
506
  var _state$payGroup4;
473
507
  var orderId, _state$payGroup5, data;
474
508
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -542,7 +576,7 @@ var ToCPay = function ToCPay(props, ref) {
542
576
  }, _callee5, null, [[3, 12]]);
543
577
  }));
544
578
  return function paymentInit(_x6) {
545
- return _ref6.apply(this, arguments);
579
+ return _ref7.apply(this, arguments);
546
580
  };
547
581
  }();
548
582
 
@@ -601,7 +635,7 @@ var ToCPay = function ToCPay(props, ref) {
601
635
  * @Date: 2024-08-30 10:23:48
602
636
  */
603
637
  var getIsShowDetectIncognitoConfirm = /*#__PURE__*/function () {
604
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
638
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
605
639
  var _yield$detectIncognit, isPrivate;
606
640
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
607
641
  while (1) switch (_context6.prev = _context6.next) {
@@ -619,7 +653,7 @@ var ToCPay = function ToCPay(props, ref) {
619
653
  }, _callee6);
620
654
  }));
621
655
  return function getIsShowDetectIncognitoConfirm(_x7) {
622
- return _ref7.apply(this, arguments);
656
+ return _ref8.apply(this, arguments);
623
657
  };
624
658
  }();
625
659
 
@@ -631,7 +665,7 @@ var ToCPay = function ToCPay(props, ref) {
631
665
  * @Date: 2024-08-15 13:25
632
666
  */
633
667
  var onSubmit = /*#__PURE__*/function () {
634
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
668
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
635
669
  var _state$payGroup10, _state$payGroup11, _state$payGroup12;
636
670
  var newPayGroup, _state$payGroup13, _newPayGroup, _newPayGroup2, _state$payGroup14, result, _state$payGroup15;
637
671
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
@@ -709,7 +743,7 @@ var ToCPay = function ToCPay(props, ref) {
709
743
  }, _callee7, null, [[2, 20]]);
710
744
  }));
711
745
  return function onSubmit(_x8) {
712
- return _ref8.apply(this, arguments);
746
+ return _ref9.apply(this, arguments);
713
747
  };
714
748
  }();
715
749
 
@@ -766,7 +800,7 @@ var ToCPay = function ToCPay(props, ref) {
766
800
  * @Date: 2024-08-09 14:25
767
801
  */
768
802
  var payCallback = /*#__PURE__*/function () {
769
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
803
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
770
804
  var _res$data, _state$payGroup20, _props$callback;
771
805
  var orderId, _res$data2;
772
806
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
@@ -806,7 +840,7 @@ var ToCPay = function ToCPay(props, ref) {
806
840
  }, _callee8);
807
841
  }));
808
842
  return function payCallback(_x9) {
809
- return _ref9.apply(this, arguments);
843
+ return _ref10.apply(this, arguments);
810
844
  };
811
845
  }();
812
846
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -28,5 +29,13 @@ export interface PayGroup {
28
29
  pay_number?: string;
29
30
  _order: any;
30
31
  front_order_uuid?: string;
32
+ orderDetail: any;
31
33
  }
32
- export declare const Provider: any, Context: any;
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
+ }>;
@@ -62,6 +62,23 @@ 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>;
65
82
  /**
66
83
  * @title: 检测订单是否有正在处理中的交易
67
84
  * @param {object} values - { order_id: string }
@@ -72,3 +89,4 @@ export declare const checkPendingPayment: (values: {
72
89
  }) => Promise<{
73
90
  has_pending: boolean;
74
91
  }>;
92
+ export {};
@@ -186,42 +186,69 @@ export var getWalletNameAndPopupStatus = /*#__PURE__*/function () {
186
186
  export var getPaymentResult = function getPaymentResult(values) {
187
187
  return request.getRequest().get("/h5/pay/order/payment/result", values);
188
188
  };
189
-
190
189
  /**
191
- * @title: 检测订单是否有正在处理中的交易
192
- * @param {object} values - { order_id: string }
193
- * @return {Promise<{ has_pending: boolean }>}
190
+ * @title: 查询订单基础信息和订单商品信息
191
+ * @description: 查询订单基础信息和订单商品信息
192
+ * @param {string} order_id
193
+ * @return {*}
194
194
  */
195
- export var checkPendingPayment = /*#__PURE__*/function () {
196
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(values) {
197
- var _data$payment_handlin;
195
+ export var getOrderBasicDetail = /*#__PURE__*/function () {
196
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(order_id) {
198
197
  var _yield$request$getReq5, data;
199
198
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
200
199
  while (1) switch (_context5.prev = _context5.next) {
201
200
  case 0:
202
201
  _context5.next = 2;
203
- return request.getRequest().post("/h5/pay/payment/check", values);
202
+ return request.getRequest().get("/h5/order/order/".concat(order_id, "/basic-detail"), {});
204
203
  case 2:
205
204
  _yield$request$getReq5 = _context5.sent;
206
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
+ }();
217
+ /**
218
+ * @title: 检测订单是否有正在处理中的交易
219
+ * @param {object} values - { order_id: string }
220
+ * @return {Promise<{ has_pending: boolean }>}
221
+ */
222
+ export var checkPendingPayment = /*#__PURE__*/function () {
223
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(values) {
224
+ var _data$payment_handlin;
225
+ var _yield$request$getReq6, data;
226
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
227
+ while (1) switch (_context6.prev = _context6.next) {
228
+ case 0:
229
+ _context6.next = 2;
230
+ return request.getRequest().post("/h5/pay/payment/check", values);
231
+ case 2:
232
+ _yield$request$getReq6 = _context6.sent;
233
+ data = _yield$request$getReq6.data;
207
234
  if (!(data !== null && data !== void 0 && data.payment_handling_list && (data === null || data === void 0 || (_data$payment_handlin = data.payment_handling_list) === null || _data$payment_handlin === void 0 ? void 0 : _data$payment_handlin.length) > 0)) {
208
- _context5.next = 6;
235
+ _context6.next = 6;
209
236
  break;
210
237
  }
211
- return _context5.abrupt("return", {
238
+ return _context6.abrupt("return", {
212
239
  has_pending: true
213
240
  });
214
241
  case 6:
215
- return _context5.abrupt("return", {
242
+ return _context6.abrupt("return", {
216
243
  has_pending: false
217
244
  });
218
245
  case 7:
219
246
  case "end":
220
- return _context5.stop();
247
+ return _context6.stop();
221
248
  }
222
- }, _callee5);
249
+ }, _callee6);
223
250
  }));
224
- return function checkPendingPayment(_x5) {
225
- return _ref5.apply(this, arguments);
251
+ return function checkPendingPayment(_x6) {
252
+ return _ref6.apply(this, arguments);
226
253
  };
227
254
  }();
@@ -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;
25
+ amount: string | number;
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;
51
+ export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string | number;
52
52
  export declare const clientPayment: (params: {
53
53
  order_id: number;
54
54
  type: "aliPay" | "wxPay" | 'google_pay';
@@ -6,6 +6,7 @@ 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";
9
10
  import dayjs from "dayjs";
10
11
  import { getUniqueId } from "@pisell/utils";
11
12
  /**
@@ -97,6 +98,9 @@ export var formatFranchiseeRoute = function formatFranchiseeRoute(url, history)
97
98
 
98
99
  // 获取walletPass可用最大金额
99
100
  export var getAvailableMaxAmount = function getAvailableMaxAmount(data) {
101
+ if (isNumber(data._available_max_amount)) {
102
+ return data._available_max_amount;
103
+ }
100
104
  return data.tag !== 'point_card' ? data.available_max_amount : data === null || data === void 0 ? void 0 : data.recommended_usage_amount;
101
105
  };
102
106
  export var clientPayment = function clientPayment(params) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
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
+ }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Empty: (props: any) => import("react").JSX.Element;
4
3
  export default Empty;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface LogData {
3
2
  key: string;
4
3
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const getBookingStatusMap: () => Record<string, string>;
3
2
  export declare const BOOKING_STATUS_COLOR_MAP: Record<string, string>;
4
3
  export declare const getBookingPlatformMap: () => Record<string, string>;
@@ -20,7 +19,7 @@ export declare const getFilterButtonList: () => ({
20
19
  }[];
21
20
  minInputNumberProps?: undefined;
22
21
  maxInputNumberProps?: undefined;
23
- readonly component?: undefined;
22
+ component?: undefined;
24
23
  isSearchServer?: undefined;
25
24
  showSearch?: undefined;
26
25
  showTime?: undefined;
@@ -46,7 +45,7 @@ export declare const getFilterButtonList: () => ({
46
45
  mode?: undefined;
47
46
  maxTagCount?: undefined;
48
47
  options?: undefined;
49
- readonly component?: undefined;
48
+ component?: undefined;
50
49
  isSearchServer?: undefined;
51
50
  showSearch?: undefined;
52
51
  showTime?: undefined;
@@ -91,7 +90,7 @@ export declare const getFilterButtonList: () => ({
91
90
  options: () => Promise<any>;
92
91
  minInputNumberProps?: undefined;
93
92
  maxInputNumberProps?: undefined;
94
- readonly component?: undefined;
93
+ component?: undefined;
95
94
  isSearchServer?: undefined;
96
95
  showSearch?: undefined;
97
96
  showTime?: undefined;
@@ -111,7 +110,7 @@ export declare const getFilterButtonList: () => ({
111
110
  options?: undefined;
112
111
  minInputNumberProps?: undefined;
113
112
  maxInputNumberProps?: undefined;
114
- readonly component?: undefined;
113
+ component?: undefined;
115
114
  isSearchServer?: undefined;
116
115
  showSearch?: undefined;
117
116
  showTime?: undefined;
@@ -133,7 +132,7 @@ export declare const getFilterButtonList: () => ({
133
132
  maxTagCount?: undefined;
134
133
  minInputNumberProps?: undefined;
135
134
  maxInputNumberProps?: undefined;
136
- readonly component?: undefined;
135
+ component?: undefined;
137
136
  showTime?: undefined;
138
137
  };
139
138
  sort?: undefined;
@@ -152,7 +151,7 @@ export declare const getFilterButtonList: () => ({
152
151
  options?: undefined;
153
152
  minInputNumberProps?: undefined;
154
153
  maxInputNumberProps?: undefined;
155
- readonly component?: undefined;
154
+ component?: undefined;
156
155
  isSearchServer?: undefined;
157
156
  showSearch?: undefined;
158
157
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
4
3
  export default ErrorTip;
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
3
3
  value?: string;
4
4
  onChange?: (val: string) => void;
5
5
  }
6
- export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
6
+ export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
7
7
  declare const ImageUpload: React.FC<ImageUploadProps>;
8
8
  export default ImageUpload;
@@ -3,7 +3,7 @@ import { ItemLayout, ItemProps, PresetConfig, SelectorProps, SelectorVariant } f
3
3
  import './selector.less';
4
4
  export declare const SelectorContext: React.Context<{
5
5
  disabled?: boolean | undefined;
6
- mode?: "single" | "multiple" | undefined;
6
+ mode?: "multiple" | "single" | undefined;
7
7
  itemLayout?: ItemLayout | undefined;
8
8
  valueType?: "object" | "primitive" | undefined;
9
9
  variant?: SelectorVariant | undefined;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -234,7 +234,7 @@ var formatHolders = (state, item, values) => {
234
234
  var formatProductPrice = (item) => {
235
235
  var _a, _b, _c, _d;
236
236
  const other = (_a = item._extend) == null ? void 0 : _a.other;
237
- let price = Number((_b = item._extend) == null ? void 0 : _b.price);
237
+ let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
238
238
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
239
239
  const variant = item.variant.find(
240
240
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -280,7 +280,7 @@ var formatMetaData = (item, isMultiDayPrices) => {
280
280
  var getSourceProductPrice = (item) => {
281
281
  var _a, _b, _c;
282
282
  const other = (_a = item._extend) == null ? void 0 : _a.other;
283
- let price = Number((_b = item._extend) == null ? void 0 : _b.price);
283
+ let price = Number((item == null ? void 0 : item.price) ?? ((_b = item._extend) == null ? void 0 : _b.price));
284
284
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
285
285
  const variant = item.variant.find(
286
286
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -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;
@@ -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;