@pisell/private-materials 6.6.48 → 6.6.49
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.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
- package/es/components/booking/addons/index.js +2 -3
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/amount.js +1 -1
- package/es/components/booking/components/footer/index.js +0 -7
- package/es/components/booking/components/footer/utils.d.ts +1 -1
- package/es/components/booking/components/footer/utils.js +5 -7
- package/es/components/booking/components/voucher/index.js +0 -6
- package/es/components/booking/components/voucher/index.less +1 -4
- package/es/components/booking/components/voucherModal/index.less +0 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/hooks/useClearCart.d.ts +1 -1
- package/es/components/booking/hooks/useClearCart.js +39 -9
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/index.less +4 -2
- package/es/components/booking/info2/cartClientCard/index.js +82 -2
- package/es/components/booking/info2/serve.d.ts +8 -0
- package/es/components/booking/info2/serve.js +52 -0
- package/es/components/booking/info2/service/editService/index.js +3 -9
- package/es/components/booking/info2/service/index.js +4 -5
- package/es/components/booking/locales.d.ts +20 -0
- package/es/components/booking/locales.js +20 -0
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/checkout/components/WalletPassModule/index.js +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +192 -316
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/es/components/pay/toC/index.js +27 -66
- package/es/components/pay/toC/model.d.ts +9 -2
- package/es/components/pay/toC/serve.d.ts +0 -18
- package/es/components/pay/toC/serve.js +1 -29
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +0 -4
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Cart/index.less +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
- package/es/components/ticketBooking/index.js +5 -2
- package/es/plus/clinetSearch/index.d.ts +1 -0
- package/es/plus/clinetSearch/index.js +9 -3
- package/es/plus/clinetSearch/index.less +13 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
- package/lib/components/booking/addons/index.js +2 -3
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/amount.js +1 -1
- package/lib/components/booking/components/footer/index.js +0 -9
- package/lib/components/booking/components/footer/utils.d.ts +1 -1
- package/lib/components/booking/components/footer/utils.js +3 -5
- package/lib/components/booking/components/voucher/index.js +0 -6
- package/lib/components/booking/components/voucher/index.less +1 -4
- package/lib/components/booking/components/voucherModal/index.less +0 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
- package/lib/components/booking/hooks/useClearCart.js +28 -6
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/index.less +4 -2
- package/lib/components/booking/info2/cartClientCard/index.js +46 -2
- package/lib/components/booking/info2/serve.d.ts +8 -0
- package/lib/components/booking/info2/serve.js +12 -0
- package/lib/components/booking/info2/service/editService/index.js +19 -25
- package/lib/components/booking/info2/service/index.js +4 -2
- package/lib/components/booking/locales.d.ts +20 -0
- package/lib/components/booking/locales.js +20 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +108 -157
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/lib/components/pay/toC/index.js +11 -52
- package/lib/components/pay/toC/model.d.ts +9 -2
- package/lib/components/pay/toC/serve.d.ts +0 -18
- package/lib/components/pay/toC/serve.js +0 -6
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +0 -4
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Cart/index.less +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
- package/lib/components/ticketBooking/index.js +4 -2
- package/lib/plus/clinetSearch/index.d.ts +1 -0
- package/lib/plus/clinetSearch/index.js +10 -0
- package/lib/plus/clinetSearch/index.less +13 -0
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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,42 +276,14 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
277
276
|
});
|
|
278
277
|
_context3.prev = 1;
|
|
279
278
|
_context3.next = 4;
|
|
280
|
-
return
|
|
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
|
-
|
|
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: ''
|
|
@@ -321,40 +292,30 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
321
292
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
322
293
|
customer_id: customer_id || item.customer_id
|
|
323
294
|
});
|
|
324
|
-
});
|
|
325
|
-
_waitAmount2 = new Decimal((order === null || order === void 0 ? void 0 : order.amount) || 0).minus(new Decimal(recommendedAmount)).toNumber(); // 设置交易组
|
|
295
|
+
}); // 设置交易组
|
|
326
296
|
dispatch({
|
|
327
297
|
type: 'setPayGroup',
|
|
328
298
|
payload: {
|
|
329
299
|
// ...state.payGroup,
|
|
330
300
|
order_id: order === null || order === void 0 ? void 0 : order.order_id,
|
|
331
301
|
// total_amount: order?.amount,
|
|
332
|
-
orderDetail: orderBasicDetail,
|
|
333
302
|
// 原订单信息
|
|
334
303
|
_order: order,
|
|
335
304
|
payment_group_id: order === null || order === void 0 ? void 0 : order.payment_group_id,
|
|
336
305
|
// 支付方式没有walletPass时walletPass设置null
|
|
337
306
|
walletPass: walletPass ? _objectSpread(_objectSpread(_objectSpread({}, (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.walletPass), walletPass), {}, {
|
|
338
|
-
|
|
339
|
-
cards:
|
|
340
|
-
// 推荐金额
|
|
341
|
-
amount: recommendedAmount,
|
|
342
|
-
// 不可用钱包
|
|
343
|
-
noApplicableVoucher: noApplicableVoucher,
|
|
344
|
-
// 转换列表
|
|
345
|
-
transformList: transformList
|
|
346
|
-
// amount: wallet_pass_amount,
|
|
347
|
-
// cards: wallet_pass_recommend_list,
|
|
307
|
+
amount: wallet_pass_amount,
|
|
308
|
+
cards: withCustomerIdList
|
|
348
309
|
}) : null,
|
|
349
310
|
total_amount: order === null || order === void 0 ? void 0 : order.amount,
|
|
350
|
-
wait_amount:
|
|
311
|
+
wait_amount: remain_amount
|
|
351
312
|
}
|
|
352
313
|
});
|
|
353
314
|
|
|
354
315
|
// 初始化支付列表
|
|
355
|
-
_context3.next =
|
|
316
|
+
_context3.next = 11;
|
|
356
317
|
return (_paymentListRef$curre = paymentListRef.current) === null || _paymentListRef$curre === void 0 ? void 0 : _paymentListRef$curre.init(payment_list, remain_amount || 0);
|
|
357
|
-
case
|
|
318
|
+
case 11:
|
|
358
319
|
// 解除loading
|
|
359
320
|
setTimeout(function () {
|
|
360
321
|
setLoading(false);
|
|
@@ -365,10 +326,10 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
365
326
|
key: '获取支付列表成功',
|
|
366
327
|
value: ''
|
|
367
328
|
});
|
|
368
|
-
_context3.next =
|
|
329
|
+
_context3.next = 21;
|
|
369
330
|
break;
|
|
370
|
-
case
|
|
371
|
-
_context3.prev =
|
|
331
|
+
case 15:
|
|
332
|
+
_context3.prev = 15;
|
|
372
333
|
_context3.t0 = _context3["catch"](1);
|
|
373
334
|
console.log('err', _context3.t0);
|
|
374
335
|
|
|
@@ -391,11 +352,11 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
391
352
|
fn: '_getPaymentsAndWalletPass'
|
|
392
353
|
}
|
|
393
354
|
});
|
|
394
|
-
case
|
|
355
|
+
case 21:
|
|
395
356
|
case "end":
|
|
396
357
|
return _context3.stop();
|
|
397
358
|
}
|
|
398
|
-
}, _callee3, null, [[1,
|
|
359
|
+
}, _callee3, null, [[1, 15]]);
|
|
399
360
|
}));
|
|
400
361
|
return function _getPaymentsAndWalletPass(_x3) {
|
|
401
362
|
return _ref3.apply(this, arguments);
|
|
@@ -412,7 +373,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
412
373
|
* @Date: 2024-08-16 10:46
|
|
413
374
|
*/
|
|
414
375
|
var handlePaymentByType = /*#__PURE__*/function () {
|
|
415
|
-
var
|
|
376
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, payGroup) {
|
|
416
377
|
var _state$payGroup3;
|
|
417
378
|
var paymentType, currentPayGroup, _paymentMethodsRef$cu;
|
|
418
379
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -472,7 +433,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
472
433
|
}, _callee4, null, [[3, 12]]);
|
|
473
434
|
}));
|
|
474
435
|
return function handlePaymentByType(_x4, _x5) {
|
|
475
|
-
return
|
|
436
|
+
return _ref5.apply(this, arguments);
|
|
476
437
|
};
|
|
477
438
|
}();
|
|
478
439
|
|
|
@@ -484,7 +445,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
484
445
|
* @Date: 2024-08-15 13:41
|
|
485
446
|
*/
|
|
486
447
|
var paymentInit = /*#__PURE__*/function () {
|
|
487
|
-
var
|
|
448
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
|
|
488
449
|
var _state$payGroup4;
|
|
489
450
|
var orderId, _state$payGroup5, data;
|
|
490
451
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -558,7 +519,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
558
519
|
}, _callee5, null, [[3, 12]]);
|
|
559
520
|
}));
|
|
560
521
|
return function paymentInit(_x6) {
|
|
561
|
-
return
|
|
522
|
+
return _ref6.apply(this, arguments);
|
|
562
523
|
};
|
|
563
524
|
}();
|
|
564
525
|
|
|
@@ -617,7 +578,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
617
578
|
* @Date: 2024-08-30 10:23:48
|
|
618
579
|
*/
|
|
619
580
|
var getIsShowDetectIncognitoConfirm = /*#__PURE__*/function () {
|
|
620
|
-
var
|
|
581
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payGroup) {
|
|
621
582
|
var _yield$detectIncognit, isPrivate;
|
|
622
583
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
623
584
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -635,7 +596,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
635
596
|
}, _callee6);
|
|
636
597
|
}));
|
|
637
598
|
return function getIsShowDetectIncognitoConfirm(_x7) {
|
|
638
|
-
return
|
|
599
|
+
return _ref7.apply(this, arguments);
|
|
639
600
|
};
|
|
640
601
|
}();
|
|
641
602
|
|
|
@@ -647,7 +608,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
647
608
|
* @Date: 2024-08-15 13:25
|
|
648
609
|
*/
|
|
649
610
|
var onSubmit = /*#__PURE__*/function () {
|
|
650
|
-
var
|
|
611
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(newOrderId) {
|
|
651
612
|
var _state$payGroup10, _state$payGroup11, _state$payGroup12;
|
|
652
613
|
var newPayGroup, _state$payGroup13, _newPayGroup, _newPayGroup2, _state$payGroup14, result, _state$payGroup15;
|
|
653
614
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
@@ -725,7 +686,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
725
686
|
}, _callee7, null, [[2, 20]]);
|
|
726
687
|
}));
|
|
727
688
|
return function onSubmit(_x8) {
|
|
728
|
-
return
|
|
689
|
+
return _ref8.apply(this, arguments);
|
|
729
690
|
};
|
|
730
691
|
}();
|
|
731
692
|
|
|
@@ -782,7 +743,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
782
743
|
* @Date: 2024-08-09 14:25
|
|
783
744
|
*/
|
|
784
745
|
var payCallback = /*#__PURE__*/function () {
|
|
785
|
-
var
|
|
746
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(res) {
|
|
786
747
|
var _res$data, _state$payGroup20, _props$callback;
|
|
787
748
|
var orderId, _res$data2;
|
|
788
749
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
@@ -822,7 +783,7 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
822
783
|
}, _callee8);
|
|
823
784
|
}));
|
|
824
785
|
return function payCallback(_x9) {
|
|
825
|
-
return
|
|
786
|
+
return _ref9.apply(this, arguments);
|
|
826
787
|
};
|
|
827
788
|
}();
|
|
828
789
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -28,6 +29,12 @@ export interface PayGroup {
|
|
|
28
29
|
pay_number?: string;
|
|
29
30
|
_order: any;
|
|
30
31
|
front_order_uuid?: string;
|
|
31
|
-
orderDetail: any;
|
|
32
32
|
}
|
|
33
|
-
export declare const Provider: any, Context:
|
|
33
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
34
|
+
state: FormState;
|
|
35
|
+
} & {
|
|
36
|
+
dispatch: (params: {
|
|
37
|
+
type: string;
|
|
38
|
+
payload: any;
|
|
39
|
+
}) => void;
|
|
40
|
+
}>;
|
|
@@ -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
|
|
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
|
|
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,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:
|
|
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,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
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
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;
|
|
@@ -51,7 +51,7 @@ var productListSetting = {
|
|
|
51
51
|
isStock: 0
|
|
52
52
|
};
|
|
53
53
|
var AddSerivce = function AddSerivce(props) {
|
|
54
|
-
var _context$appHelper, _context$
|
|
54
|
+
var _context$appHelper, _context$appHelper$ge, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _state$bookingConfig2, _state$client2;
|
|
55
55
|
var onEdit = props.onEdit,
|
|
56
56
|
state = props.state,
|
|
57
57
|
dispatch = props.dispatch,
|
|
@@ -59,8 +59,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
59
59
|
renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode,
|
|
60
60
|
productDisplayConfig = props.productDisplayConfig;
|
|
61
61
|
var context = useEngineContext();
|
|
62
|
-
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
63
|
-
getData = _context$appHelper$ut.getData;
|
|
64
62
|
var notAvailableRef = useRef(null);
|
|
65
63
|
request.setRequest(context.appHelper.utils.request);
|
|
66
64
|
var isActive = useIsActive();
|
|
@@ -73,7 +71,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
73
71
|
}),
|
|
74
72
|
createBookingData = _useService.createBookingData,
|
|
75
73
|
createBooking = _useService.createBooking;
|
|
76
|
-
var isBooking4 = isBooking4Shop(((_context$
|
|
74
|
+
var isBooking4 = isBooking4Shop(((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getData) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, 'shop_id')) || ((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.global) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.globalConfig) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.id), state === null || state === void 0 ? void 0 : state.renderType, (_context$appHelper$ut3 = context.appHelper.utils) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.businessUtils);
|
|
77
75
|
var _useState = useState(null),
|
|
78
76
|
_useState2 = _slicedToArray(_useState, 2),
|
|
79
77
|
currentProduct = _useState2[0],
|
|
@@ -221,7 +219,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
221
219
|
var processAddService = useMemoizedFn( /*#__PURE__*/function () {
|
|
222
220
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item, _detail, e, notShowToast, startDate, endDate) {
|
|
223
221
|
var _state$client3, _state$bookingConfig3, _state$bookingConfig4;
|
|
224
|
-
var other, cacheItem, _total, _isEdit, _stateRef$current$ser, isMultiDay, getMultiDayCacheItem, res, _state$bookingConfig5, _addService2, _list, quantity, _context$appHelper$
|
|
222
|
+
var other, cacheItem, _total, _isEdit, _stateRef$current$ser, isMultiDay, getMultiDayCacheItem, res, _state$bookingConfig5, _addService2, _list, quantity, _context$appHelper$ut4, _context$appHelper$ut5, val, sendData, _window$openBookingEd, _window;
|
|
225
223
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
226
224
|
while (1) switch (_context2.prev = _context2.next) {
|
|
227
225
|
case 0:
|
|
@@ -231,7 +229,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
231
229
|
product_id: item.id,
|
|
232
230
|
_id: getUniqueId(),
|
|
233
231
|
_key: e.key,
|
|
234
|
-
is_price_include_tax: getData('is_price_include_tax'),
|
|
235
232
|
_extend: {
|
|
236
233
|
start_date: startDate,
|
|
237
234
|
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
|
|
@@ -341,7 +338,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
341
338
|
}
|
|
342
339
|
}));
|
|
343
340
|
try {
|
|
344
|
-
if (((_context$appHelper$
|
|
341
|
+
if (((_context$appHelper$ut4 = context.appHelper.utils.store) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut4.getState) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.call(_context$appHelper$ut4)) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.global) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id) === 2155) {
|
|
345
342
|
val = _list === null || _list === void 0 ? void 0 : _list.map(function (s) {
|
|
346
343
|
return {
|
|
347
344
|
product_id: s === null || s === void 0 ? void 0 : s.product_id,
|
|
@@ -196,7 +196,8 @@ export default (function (props) {
|
|
|
196
196
|
var context = useEngineContext();
|
|
197
197
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
198
198
|
pisellos = _context$appHelper$ut.pisellos,
|
|
199
|
-
pisellosAllModule = _context$appHelper$ut.pisellosAllModule
|
|
199
|
+
pisellosAllModule = _context$appHelper$ut.pisellosAllModule,
|
|
200
|
+
businessUtils = _context$appHelper$ut.businessUtils;
|
|
200
201
|
var _ref = pisellosAllModule || {},
|
|
201
202
|
BookingTicket = _ref.BookingTicket,
|
|
202
203
|
ShopDiscountImpl = _ref.ShopDiscountImpl;
|
|
@@ -213,11 +214,13 @@ export default (function (props) {
|
|
|
213
214
|
}, [bookingConfigParams, productExtensionType]);
|
|
214
215
|
useMemo(function () {
|
|
215
216
|
if (BookingTicket) {
|
|
217
|
+
var _businessUtils$getApp;
|
|
216
218
|
pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket(getBookingTicketKey(osKey)), {
|
|
217
219
|
initialState: {},
|
|
218
220
|
otherParams: {
|
|
219
221
|
cacheId: getBookingTicketKey(osKey),
|
|
220
|
-
platform: 'shop'
|
|
222
|
+
platform: 'shop',
|
|
223
|
+
isFranchisee: businessUtils === null || businessUtils === void 0 || (_businessUtils$getApp = businessUtils.getAppByModal) === null || _businessUtils$getApp === void 0 ? void 0 : _businessUtils$getApp.call(businessUtils, 'franchisee')
|
|
221
224
|
}
|
|
222
225
|
});
|
|
223
226
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["onRowClick", "resultProps", "onAddClient", "hasMore", "onLoadMore", "state"];
|
|
1
|
+
var _excluded = ["onRowClick", "resultProps", "onAddClient", "hasMore", "onLoadMore", "state", "resultLoading"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
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."); }
|
|
@@ -9,7 +9,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
12
|
-
import { Tag, List } from 'antd';
|
|
12
|
+
import { Tag, List, Spin } from 'antd';
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
import { locales } from '@pisell/utils';
|
|
15
15
|
import dayjs from 'dayjs';
|
|
@@ -29,6 +29,7 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
hasMore = _ref.hasMore,
|
|
30
30
|
onLoadMore = _ref.onLoadMore,
|
|
31
31
|
state = _ref.state,
|
|
32
|
+
resultLoading = _ref.resultLoading,
|
|
32
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
34
|
var _useState = useState(false),
|
|
34
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -89,12 +90,17 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
89
90
|
ref: scrollContainerRef,
|
|
90
91
|
id: "client-search_infinite-scroll",
|
|
91
92
|
style: {
|
|
93
|
+
position: 'relative',
|
|
92
94
|
height: 'calc(100% - 40px)',
|
|
93
95
|
overflowY: 'auto',
|
|
94
96
|
overflowX: 'hidden',
|
|
95
97
|
display: 'flex'
|
|
96
98
|
}
|
|
97
|
-
}, /*#__PURE__*/React.createElement(
|
|
99
|
+
}, resultLoading && /*#__PURE__*/React.createElement(Spin, {
|
|
100
|
+
spinning: resultLoading || false,
|
|
101
|
+
className: "pisell-client-search-result-loading",
|
|
102
|
+
size: "large"
|
|
103
|
+
}), /*#__PURE__*/React.createElement(InfiniteScroll, {
|
|
98
104
|
dataLength: searchResults.length,
|
|
99
105
|
next: function next() {
|
|
100
106
|
console.log('loading more');
|
|
@@ -93,3 +93,16 @@
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
|
|
97
|
+
.pisell-client-search-result-loading {
|
|
98
|
+
position: absolute;
|
|
99
|
+
top: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
align-items: center;
|
|
106
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
107
|
+
z-index: 10;
|
|
108
|
+
}
|