@pisell/private-materials 6.3.56 → 6.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +165 -145
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/es/components/pay/toC/index.js +65 -31
- package/es/components/pay/toC/model.d.ts +1 -0
- package/es/components/pay/toC/serve.d.ts +18 -0
- package/es/components/pay/toC/serve.js +29 -1
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +4 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +9 -12
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/pro/pisellPaymentList/example.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/lib/components/pay/toC/index.js +52 -19
- package/lib/components/pay/toC/model.d.ts +1 -0
- package/lib/components/pay/toC/serve.d.ts +18 -0
- package/lib/components/pay/toC/serve.js +6 -0
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +4 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -5
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/pro/pisellPaymentList/example.d.ts +1 -0
- package/package.json +3 -3
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/pay/toC/locales.d.ts +0 -301
- package/es/components/pay/toC/status.d.ts +0 -13
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/walletList/locales.d.ts +0 -27
- package/es/components/walletList/types/index.d.ts +0 -194
- package/es/plus/selectHolder/types.d.ts +0 -104
- package/es/plus/selectHolder/utils.d.ts +0 -9
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
- package/es/plus/walletEditor/locales.d.ts +0 -135
- package/es/plus/walletEditor/types.d.ts +0 -52
- package/es/plus/walletPassGallery/locales.d.ts +0 -285
- package/es/plus/walletPassGallery/utils.d.ts +0 -48
- package/es/pro/Login2.0/hooks/index.d.ts +0 -2
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
- package/es/pro/Login2.0/locales.d.ts +0 -543
- package/es/pro/Login2.0/shared/Header.d.ts +0 -11
- package/es/pro/Login2.0/shared/registerFlow.d.ts +0 -116
- package/es/pro/Login2.0/shared/types.d.ts +0 -232
- package/es/pro/Login2.0/types.d.ts +0 -167
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/pay/toC/locales.d.ts +0 -301
- package/lib/components/pay/toC/status.d.ts +0 -13
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/walletList/locales.d.ts +0 -27
- package/lib/components/walletList/types/index.d.ts +0 -194
- package/lib/plus/selectHolder/types.d.ts +0 -104
- package/lib/plus/selectHolder/utils.d.ts +0 -9
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
- package/lib/plus/walletEditor/locales.d.ts +0 -135
- package/lib/plus/walletEditor/types.d.ts +0 -52
- package/lib/plus/walletPassGallery/locales.d.ts +0 -285
- package/lib/plus/walletPassGallery/utils.d.ts +0 -48
- package/lib/pro/Login2.0/hooks/index.d.ts +0 -2
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
- package/lib/pro/Login2.0/locales.d.ts +0 -543
- package/lib/pro/Login2.0/shared/Header.d.ts +0 -11
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +0 -116
- package/lib/pro/Login2.0/shared/types.d.ts +0 -232
- package/lib/pro/Login2.0/types.d.ts +0 -167
|
@@ -163,7 +163,9 @@ var WalletPassBlock = function WalletPassBlock(props, ref) {
|
|
|
163
163
|
ref: walletPassRef,
|
|
164
164
|
walletSetting: walletSetting,
|
|
165
165
|
onWalletPassChange: onWalletPassChange,
|
|
166
|
-
walletPass: payGroup === null || payGroup === void 0 ? void 0 : payGroup.walletPass
|
|
166
|
+
walletPass: payGroup === null || payGroup === void 0 ? void 0 : payGroup.walletPass,
|
|
167
|
+
orderDetail: payGroup === null || payGroup === void 0 ? void 0 : payGroup.orderDetail,
|
|
168
|
+
total_amount: payGroup === null || payGroup === void 0 ? void 0 : payGroup.total_amount
|
|
167
169
|
}), /*#__PURE__*/React.createElement(WalletAvailable, {
|
|
168
170
|
ref: walletAvailableRef,
|
|
169
171
|
walletSetting: walletSetting,
|
|
@@ -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 } from "./serve";
|
|
26
|
+
import { getPaymentsAndWalletPass, getPaymentInit, getWalletNameAndPopupStatus, getOrderBasicDetail } 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";
|
|
@@ -263,7 +264,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
263
264
|
*/
|
|
264
265
|
var _getPaymentsAndWalletPass = /*#__PURE__*/function () {
|
|
265
266
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order) {
|
|
266
|
-
var _state$payGroup2, _paymentListRef$curre, data, _ref4, _ref4$remain_amount, remain_amount, wallet_pass_recommend_list, wallet_pass_amount, payment_list, walletPass,
|
|
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;
|
|
267
268
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
268
269
|
while (1) switch (_context3.prev = _context3.next) {
|
|
269
270
|
case 0:
|
|
@@ -276,46 +277,79 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
276
277
|
});
|
|
277
278
|
_context3.prev = 1;
|
|
278
279
|
_context3.next = 4;
|
|
279
|
-
return getPaymentsAndWalletPass({
|
|
280
|
+
return Promise.all([getPaymentsAndWalletPass({
|
|
280
281
|
order_id: order.order_id,
|
|
281
282
|
total_amount: order.amount,
|
|
282
283
|
sale_channel: order.sale_channel || 'online-store'
|
|
283
|
-
})
|
|
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)]);
|
|
284
292
|
case 4:
|
|
285
|
-
|
|
286
|
-
|
|
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
|
+
});
|
|
315
|
+
recommended = _res.recommended, transformList = _res.transformList, noApplicableVoucher = _res.noApplicableVoucher, recommendedAmount = _res.recommendedAmount; // 记录获取到的数据
|
|
287
316
|
paymentLogger.addLog({
|
|
288
317
|
key: '支付数据获取',
|
|
289
318
|
value: ''
|
|
290
319
|
});
|
|
291
|
-
|
|
292
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293
|
-
customer_id: customer_id || item.customer_id
|
|
294
|
-
});
|
|
295
|
-
}); // 设置交易组
|
|
320
|
+
_waitAmount2 = new Decimal((order === null || order === void 0 ? void 0 : order.amount) || 0).minus(new Decimal(recommendedAmount)).toNumber(); // 设置交易组
|
|
296
321
|
dispatch({
|
|
297
322
|
type: 'setPayGroup',
|
|
298
323
|
payload: {
|
|
299
324
|
// ...state.payGroup,
|
|
300
325
|
order_id: order === null || order === void 0 ? void 0 : order.order_id,
|
|
301
326
|
// total_amount: order?.amount,
|
|
327
|
+
orderDetail: orderBasicDetail,
|
|
302
328
|
// 原订单信息
|
|
303
329
|
_order: order,
|
|
304
330
|
payment_group_id: order === null || order === void 0 ? void 0 : order.payment_group_id,
|
|
305
331
|
// 支付方式没有walletPass时walletPass设置null
|
|
306
332
|
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
|
|
307
|
-
|
|
308
|
-
cards:
|
|
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,
|
|
309
343
|
}) : null,
|
|
310
344
|
total_amount: order === null || order === void 0 ? void 0 : order.amount,
|
|
311
|
-
wait_amount:
|
|
345
|
+
wait_amount: Math.max(0, _waitAmount2)
|
|
312
346
|
}
|
|
313
347
|
});
|
|
314
348
|
|
|
315
349
|
// 初始化支付列表
|
|
316
|
-
_context3.next =
|
|
350
|
+
_context3.next = 18;
|
|
317
351
|
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list);
|
|
318
|
-
case
|
|
352
|
+
case 18:
|
|
319
353
|
// 解除loading
|
|
320
354
|
setTimeout(function () {
|
|
321
355
|
setLoading(false);
|
|
@@ -326,10 +360,10 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
326
360
|
key: '获取支付列表成功',
|
|
327
361
|
value: ''
|
|
328
362
|
});
|
|
329
|
-
_context3.next =
|
|
363
|
+
_context3.next = 28;
|
|
330
364
|
break;
|
|
331
|
-
case
|
|
332
|
-
_context3.prev =
|
|
365
|
+
case 22:
|
|
366
|
+
_context3.prev = 22;
|
|
333
367
|
_context3.t0 = _context3["catch"](1);
|
|
334
368
|
console.log('err', _context3.t0);
|
|
335
369
|
|
|
@@ -352,11 +386,11 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
352
386
|
fn: '_getPaymentsAndWalletPass'
|
|
353
387
|
}
|
|
354
388
|
});
|
|
355
|
-
case
|
|
389
|
+
case 28:
|
|
356
390
|
case "end":
|
|
357
391
|
return _context3.stop();
|
|
358
392
|
}
|
|
359
|
-
}, _callee3, null, [[1,
|
|
393
|
+
}, _callee3, null, [[1, 22]]);
|
|
360
394
|
}));
|
|
361
395
|
return function _getPaymentsAndWalletPass(_x3) {
|
|
362
396
|
return _ref3.apply(this, arguments);
|
|
@@ -373,7 +407,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
373
407
|
* @Date: 2024-08-16 10:46
|
|
374
408
|
*/
|
|
375
409
|
var handlePaymentByType = /*#__PURE__*/function () {
|
|
376
|
-
var
|
|
410
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
|
|
377
411
|
var _state$payGroup3;
|
|
378
412
|
var paymentType, currentPayGroup, _paymentMethodsRef$cu;
|
|
379
413
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -433,7 +467,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
433
467
|
}, _callee4, null, [[3, 12]]);
|
|
434
468
|
}));
|
|
435
469
|
return function handlePaymentByType(_x4, _x5) {
|
|
436
|
-
return
|
|
470
|
+
return _ref6.apply(this, arguments);
|
|
437
471
|
};
|
|
438
472
|
}();
|
|
439
473
|
|
|
@@ -445,7 +479,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
445
479
|
* @Date: 2024-08-15 13:41
|
|
446
480
|
*/
|
|
447
481
|
var paymentInit = /*#__PURE__*/function () {
|
|
448
|
-
var
|
|
482
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
|
|
449
483
|
var _state$payGroup4;
|
|
450
484
|
var orderId, _state$payGroup5, data;
|
|
451
485
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -519,7 +553,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
519
553
|
}, _callee5, null, [[3, 12]]);
|
|
520
554
|
}));
|
|
521
555
|
return function paymentInit(_x6) {
|
|
522
|
-
return
|
|
556
|
+
return _ref7.apply(this, arguments);
|
|
523
557
|
};
|
|
524
558
|
}();
|
|
525
559
|
|
|
@@ -578,7 +612,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
578
612
|
* @Date: 2024-08-30 10:23:48
|
|
579
613
|
*/
|
|
580
614
|
var getIsShowDetectIncognitoConfirm = /*#__PURE__*/function () {
|
|
581
|
-
var
|
|
615
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
|
|
582
616
|
var _yield$detectIncognit, isPrivate;
|
|
583
617
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
584
618
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -596,7 +630,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
596
630
|
}, _callee6);
|
|
597
631
|
}));
|
|
598
632
|
return function getIsShowDetectIncognitoConfirm(_x7) {
|
|
599
|
-
return
|
|
633
|
+
return _ref8.apply(this, arguments);
|
|
600
634
|
};
|
|
601
635
|
}();
|
|
602
636
|
|
|
@@ -608,7 +642,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
608
642
|
* @Date: 2024-08-15 13:25
|
|
609
643
|
*/
|
|
610
644
|
var onSubmit = /*#__PURE__*/function () {
|
|
611
|
-
var
|
|
645
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
|
|
612
646
|
var _state$payGroup10, _state$payGroup11, _state$payGroup12;
|
|
613
647
|
var newPayGroup, _state$payGroup13, _newPayGroup, _newPayGroup2, _state$payGroup14, result, _state$payGroup15;
|
|
614
648
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
@@ -686,7 +720,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
686
720
|
}, _callee7, null, [[2, 20]]);
|
|
687
721
|
}));
|
|
688
722
|
return function onSubmit(_x8) {
|
|
689
|
-
return
|
|
723
|
+
return _ref9.apply(this, arguments);
|
|
690
724
|
};
|
|
691
725
|
}();
|
|
692
726
|
|
|
@@ -743,7 +777,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
743
777
|
* @Date: 2024-08-09 14:25
|
|
744
778
|
*/
|
|
745
779
|
var payCallback = /*#__PURE__*/function () {
|
|
746
|
-
var
|
|
780
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
|
|
747
781
|
var _res$data, _state$payGroup20, _props$callback;
|
|
748
782
|
var orderId, _res$data2;
|
|
749
783
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
@@ -783,7 +817,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
783
817
|
}, _callee8);
|
|
784
818
|
}));
|
|
785
819
|
return function payCallback(_x9) {
|
|
786
|
-
return
|
|
820
|
+
return _ref10.apply(this, arguments);
|
|
787
821
|
};
|
|
788
822
|
}();
|
|
789
823
|
|
|
@@ -60,3 +60,21 @@ export declare const getWalletNameAndPopupStatus: (values: {
|
|
|
60
60
|
* @description: 获取支付结果
|
|
61
61
|
*/
|
|
62
62
|
export declare const getPaymentResult: (values: any) => Promise<any>;
|
|
63
|
+
declare type OrderBasicDetail = {
|
|
64
|
+
id: number;
|
|
65
|
+
status: string;
|
|
66
|
+
payment_status: string;
|
|
67
|
+
order_time: string;
|
|
68
|
+
detail: any[];
|
|
69
|
+
product_unpaid_total_pay_amount: number;
|
|
70
|
+
product_paid_total_pay_amount: number;
|
|
71
|
+
is_price_include_tax: 1 | 0;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @title: 查询订单基础信息和订单商品信息
|
|
75
|
+
* @description: 查询订单基础信息和订单商品信息
|
|
76
|
+
* @param {string} order_id
|
|
77
|
+
* @return {*}
|
|
78
|
+
*/
|
|
79
|
+
export declare const getOrderBasicDetail: (order_id: string) => Promise<OrderBasicDetail>;
|
|
80
|
+
export {};
|
|
@@ -185,4 +185,32 @@ 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
|
-
};
|
|
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
|
+
}();
|
|
@@ -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
|
/**
|
|
10
11
|
* 计算walletPass列表数据的总金额
|
|
11
12
|
* @param list
|
|
@@ -95,6 +96,9 @@ export var formatFranchiseeRoute = function formatFranchiseeRoute(url, history)
|
|
|
95
96
|
|
|
96
97
|
// 获取walletPass可用最大金额
|
|
97
98
|
export var getAvailableMaxAmount = function getAvailableMaxAmount(data) {
|
|
99
|
+
if (isNumber(data._available_max_amount)) {
|
|
100
|
+
return data._available_max_amount;
|
|
101
|
+
}
|
|
98
102
|
return data.tag !== 'point_card' ? data.available_max_amount : data === null || data === void 0 ? void 0 : data.recommended_usage_amount;
|
|
99
103
|
};
|
|
100
104
|
export var clientPayment = function clientPayment(params) {
|
|
@@ -14,7 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { locales } from '@pisell/utils';
|
|
15
15
|
import "./index.less";
|
|
16
16
|
var TimeBar = function TimeBar(props) {
|
|
17
|
-
var _state$
|
|
17
|
+
var _state$modalState6;
|
|
18
18
|
var state = props.globalState,
|
|
19
19
|
setGlobalState = props.setGlobalState,
|
|
20
20
|
locale = props.locale;
|
|
@@ -33,11 +33,8 @@ var TimeBar = function TimeBar(props) {
|
|
|
33
33
|
(_props$setIntervalTim2 = props.setIntervalTime) === null || _props$setIntervalTim2 === void 0 || _props$setIntervalTim2.call(props, false);
|
|
34
34
|
});
|
|
35
35
|
var _onClickToday = useMemoizedFn(function () {
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
var newTime = currentTime['subtract'](1, 'day');
|
|
39
|
-
(_props$onDateChange3 = props.onDateChange) === null || _props$onDateChange3 === void 0 || _props$onDateChange3.call(props, newTime, newTime.format('YYYY-MM-DD HH:mm:ss'));
|
|
40
|
-
(_props$setIntervalTim3 = props.setIntervalTime) === null || _props$setIntervalTim3 === void 0 || _props$setIntervalTim3.call(props, false);
|
|
36
|
+
var _props$setIntervalTim3;
|
|
37
|
+
(_props$setIntervalTim3 = props.setIntervalTime) === null || _props$setIntervalTim3 === void 0 || _props$setIntervalTim3.call(props, true);
|
|
41
38
|
});
|
|
42
39
|
var _onClickNow = useMemoizedFn(function () {
|
|
43
40
|
var _props$setIntervalTim4;
|
|
@@ -46,8 +43,8 @@ var TimeBar = function TimeBar(props) {
|
|
|
46
43
|
|
|
47
44
|
// 时间选择变更事件
|
|
48
45
|
var _onDateTimeChange = useMemoizedFn(function (timeString) {
|
|
49
|
-
var _state$
|
|
50
|
-
var currentTime = (_state$
|
|
46
|
+
var _state$modalState3, _props$onDateTimeChan, _props$setIntervalTim5;
|
|
47
|
+
var currentTime = (_state$modalState3 = state.modalState) === null || _state$modalState3 === void 0 || (_state$modalState3 = _state$modalState3.date) === null || _state$modalState3 === void 0 ? void 0 : _state$modalState3.value;
|
|
51
48
|
var _timeString$split$map = timeString.split(':').map(Number),
|
|
52
49
|
_timeString$split$map2 = _slicedToArray(_timeString$split$map, 2),
|
|
53
50
|
hours = _timeString$split$map2[0],
|
|
@@ -60,7 +57,7 @@ var TimeBar = function TimeBar(props) {
|
|
|
60
57
|
(_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props, timeString === dayjs().format('HH:mm'));
|
|
61
58
|
});
|
|
62
59
|
return useMemo(function () {
|
|
63
|
-
var _state$
|
|
60
|
+
var _state$modalState4, _state$modalState5;
|
|
64
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
65
62
|
className: "pisell-ticket-booking-time-bar"
|
|
66
63
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -84,7 +81,7 @@ var TimeBar = function TimeBar(props) {
|
|
|
84
81
|
}
|
|
85
82
|
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
86
83
|
inputReadOnly: true,
|
|
87
|
-
value: state === null || state === void 0 || (_state$
|
|
84
|
+
value: state === null || state === void 0 || (_state$modalState4 = state.modalState) === null || _state$modalState4 === void 0 || (_state$modalState4 = _state$modalState4.date) === null || _state$modalState4 === void 0 ? void 0 : _state$modalState4.value,
|
|
88
85
|
format: locale === 'en' ? 'dddd, DD MMM YYYY' : 'YYYY年MM月DD日',
|
|
89
86
|
onChange: props === null || props === void 0 ? void 0 : props.onDateChange,
|
|
90
87
|
size: "large",
|
|
@@ -100,7 +97,7 @@ var TimeBar = function TimeBar(props) {
|
|
|
100
97
|
'booking-page-date-picker-select': state.isTimeChange
|
|
101
98
|
})
|
|
102
99
|
}, /*#__PURE__*/React.createElement(SelectTime, {
|
|
103
|
-
value: state === null || state === void 0 || (_state$
|
|
100
|
+
value: state === null || state === void 0 || (_state$modalState5 = state.modalState) === null || _state$modalState5 === void 0 || (_state$modalState5 = _state$modalState5.date) === null || _state$modalState5 === void 0 ? void 0 : _state$modalState5.value.format('HH:mm'),
|
|
104
101
|
onChange: _onDateTimeChange,
|
|
105
102
|
popoverProps: {
|
|
106
103
|
style: {
|
|
@@ -118,6 +115,6 @@ var TimeBar = function TimeBar(props) {
|
|
|
118
115
|
color: '#fff'
|
|
119
116
|
} : undefined
|
|
120
117
|
}, locales.getText('pisell2.ticket-booking.now')));
|
|
121
|
-
}, [(_state$
|
|
118
|
+
}, [(_state$modalState6 = state.modalState) === null || _state$modalState6 === void 0 || (_state$modalState6 = _state$modalState6.date) === null || _state$modalState6 === void 0 ? void 0 : _state$modalState6.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale]);
|
|
122
119
|
};
|
|
123
120
|
export default TimeBar;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
|
|
5
5
|
* 包括如何通过 Context 访问父组件配置
|
|
6
6
|
*/
|
|
7
|
+
/// <reference types="react" />
|
|
7
8
|
export declare const BasicExample: () => JSX.Element;
|
|
8
9
|
export declare const ChildrenExample: () => JSX.Element;
|
|
9
10
|
export declare const CustomItemExample: () => JSX.Element;
|
|
@@ -15,11 +15,16 @@ export interface WalletPassProps {
|
|
|
15
15
|
walletPass: {
|
|
16
16
|
cards: WalletPassDataType[];
|
|
17
17
|
amount: number;
|
|
18
|
+
recommended?: WalletPassDataType[];
|
|
19
|
+
transformList?: WalletPassDataType[];
|
|
20
|
+
noApplicableVoucher?: WalletPassDataType[];
|
|
18
21
|
};
|
|
19
22
|
walletSetting: {
|
|
20
23
|
name: string;
|
|
21
24
|
popup_status: 0 | 1;
|
|
22
25
|
};
|
|
26
|
+
orderDetail: any;
|
|
27
|
+
total_amount: number;
|
|
23
28
|
}
|
|
24
29
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
|
|
25
30
|
export default _default;
|