@pisell/private-materials 6.4.73 → 6.4.74
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/components/booking/components/footer/index.js +62 -53
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +178 -108
- package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/es/components/checkout/components/AdditionalModule/index.js +44 -12
- package/es/components/checkout/components/AmountSummary/index.js +9 -76
- package/es/components/checkout/components/AmountSummary/index.less +1 -1
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +112 -7
- package/es/components/ticketBooking/components/timeBar/index.less +59 -0
- package/es/components/ticketBooking/locales.d.ts +6 -0
- package/es/components/ticketBooking/locales.js +9 -3
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +11 -7
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
- package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lib/components/booking/components/footer/index.js +15 -8
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +73 -11
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +44 -11
- package/lib/components/checkout/components/AmountSummary/index.js +5 -46
- package/lib/components/checkout/components/AmountSummary/index.less +1 -1
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
- package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
- package/lib/components/ticketBooking/locales.d.ts +6 -0
- package/lib/components/ticketBooking/locales.js +9 -3
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +9 -5
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/package.json +1 -1
|
@@ -619,46 +619,50 @@ var Footer = function Footer(props) {
|
|
|
619
619
|
*/
|
|
620
620
|
var handleCheckoutInternal = /*#__PURE__*/function () {
|
|
621
621
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
622
|
-
var
|
|
622
|
+
var _state$bookingConfig5;
|
|
623
|
+
var isToastMode, isNewOrder, isHasDayProducts, res, modalData, _res;
|
|
623
624
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
624
625
|
while (1) switch (_context4.prev = _context4.next) {
|
|
625
626
|
case 0:
|
|
626
|
-
//
|
|
627
|
-
|
|
627
|
+
// 弹窗模式判断
|
|
628
|
+
isToastMode = (state === null || state === void 0 || (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.config) === null || _state$bookingConfig5 === void 0 || (_state$bookingConfig5 = _state$bookingConfig5.payment_setting) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.payment_result_display_mode) !== 'modal';
|
|
629
|
+
if (isToastMode) {
|
|
630
|
+
closeAllPaymentResultToasts();
|
|
631
|
+
}
|
|
628
632
|
isNewOrder = !state.bookingId; // 如果有编辑内容, 则先保存
|
|
629
633
|
if (!isEdit) {
|
|
630
|
-
_context4.next =
|
|
634
|
+
_context4.next = 27;
|
|
631
635
|
break;
|
|
632
636
|
}
|
|
633
637
|
if (!isDayBooking(state)) {
|
|
634
|
-
_context4.next =
|
|
638
|
+
_context4.next = 8;
|
|
635
639
|
break;
|
|
636
640
|
}
|
|
637
641
|
isHasDayProducts = handleDaySubmit();
|
|
638
642
|
if (!isHasDayProducts) {
|
|
639
|
-
_context4.next =
|
|
643
|
+
_context4.next = 8;
|
|
640
644
|
break;
|
|
641
645
|
}
|
|
642
646
|
return _context4.abrupt("return");
|
|
643
|
-
case
|
|
647
|
+
case 8:
|
|
644
648
|
if (!state.isBookingTicket2) {
|
|
645
|
-
_context4.next =
|
|
649
|
+
_context4.next = 21;
|
|
646
650
|
break;
|
|
647
651
|
}
|
|
648
|
-
_context4.next =
|
|
652
|
+
_context4.next = 11;
|
|
649
653
|
return handleSave({
|
|
650
654
|
type: 'checkout',
|
|
651
655
|
messageShow: !(isTerminal !== null && isTerminal !== void 0 && isTerminal()),
|
|
652
656
|
noSubmit: true
|
|
653
657
|
});
|
|
654
|
-
case
|
|
658
|
+
case 11:
|
|
655
659
|
res = _context4.sent;
|
|
656
660
|
if (res) {
|
|
657
|
-
_context4.next =
|
|
661
|
+
_context4.next = 14;
|
|
658
662
|
break;
|
|
659
663
|
}
|
|
660
664
|
return _context4.abrupt("return");
|
|
661
|
-
case
|
|
665
|
+
case 14:
|
|
662
666
|
// 使用新版支付弹窗
|
|
663
667
|
modalData = {
|
|
664
668
|
order_info: res,
|
|
@@ -700,24 +704,24 @@ var Footer = function Footer(props) {
|
|
|
700
704
|
}
|
|
701
705
|
};
|
|
702
706
|
});
|
|
703
|
-
_context4.next =
|
|
707
|
+
_context4.next = 26;
|
|
704
708
|
break;
|
|
705
|
-
case
|
|
706
|
-
_context4.next =
|
|
709
|
+
case 21:
|
|
710
|
+
_context4.next = 23;
|
|
707
711
|
return handleSave({
|
|
708
712
|
type: 'checkout',
|
|
709
713
|
messageShow: !(isTerminal !== null && isTerminal !== void 0 && isTerminal())
|
|
710
714
|
});
|
|
711
|
-
case
|
|
715
|
+
case 23:
|
|
712
716
|
_res = _context4.sent;
|
|
713
717
|
// goCheckout2(res);
|
|
714
718
|
console.log(_res);
|
|
715
719
|
goCheckout((_res === null || _res === void 0 ? void 0 : _res.order_id) || state.bookingId, isNewOrder);
|
|
716
|
-
case 25:
|
|
717
|
-
return _context4.abrupt("return");
|
|
718
720
|
case 26:
|
|
719
|
-
return _context4.abrupt("return"
|
|
721
|
+
return _context4.abrupt("return");
|
|
720
722
|
case 27:
|
|
723
|
+
return _context4.abrupt("return", goCheckout(state.bookingId, isNewOrder));
|
|
724
|
+
case 28:
|
|
721
725
|
case "end":
|
|
722
726
|
return _context4.stop();
|
|
723
727
|
}
|
|
@@ -848,31 +852,36 @@ var Footer = function Footer(props) {
|
|
|
848
852
|
*/
|
|
849
853
|
var handleSave = /*#__PURE__*/function () {
|
|
850
854
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref6) {
|
|
851
|
-
var
|
|
855
|
+
var _state$bookingConfig6;
|
|
856
|
+
var type, _ref6$messageShow, messageShow, _ref6$noSubmit, noSubmit, isToastMode, isHasDayProducts, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, _store$getState, _window7, callbackData, values, checkout, subtotal_info, res, isNeedDeposit, api;
|
|
852
857
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
853
858
|
while (1) switch (_context6.prev = _context6.next) {
|
|
854
859
|
case 0:
|
|
855
860
|
type = _ref6.type, _ref6$messageShow = _ref6.messageShow, messageShow = _ref6$messageShow === void 0 ? true : _ref6$messageShow, _ref6$noSubmit = _ref6.noSubmit, noSubmit = _ref6$noSubmit === void 0 ? false : _ref6$noSubmit;
|
|
856
861
|
// 关闭页面上所有的PaymentResultToast
|
|
857
|
-
|
|
862
|
+
// 弹窗模式判断
|
|
863
|
+
isToastMode = (state === null || state === void 0 || (_state$bookingConfig6 = state.bookingConfig) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.config) === null || _state$bookingConfig6 === void 0 || (_state$bookingConfig6 = _state$bookingConfig6.payment_setting) === null || _state$bookingConfig6 === void 0 ? void 0 : _state$bookingConfig6.payment_result_display_mode) !== 'modal'; // 只有 toast 模式才关闭,modal 模式留着
|
|
864
|
+
if (isToastMode) {
|
|
865
|
+
closeAllPaymentResultToasts();
|
|
866
|
+
}
|
|
858
867
|
// 跨日预约验证是否有预约商品
|
|
859
868
|
if (!isDayBooking(state)) {
|
|
860
|
-
_context6.next =
|
|
869
|
+
_context6.next = 7;
|
|
861
870
|
break;
|
|
862
871
|
}
|
|
863
872
|
isHasDayProducts = handleDaySubmit();
|
|
864
873
|
if (!isHasDayProducts) {
|
|
865
|
-
_context6.next =
|
|
874
|
+
_context6.next = 7;
|
|
866
875
|
break;
|
|
867
876
|
}
|
|
868
877
|
return _context6.abrupt("return");
|
|
869
|
-
case
|
|
878
|
+
case 7:
|
|
870
879
|
if (!(isBooking4Shop && getIsSubjectRequire(state) && checkHolderIsError(state))) {
|
|
871
|
-
_context6.next =
|
|
880
|
+
_context6.next = 9;
|
|
872
881
|
break;
|
|
873
882
|
}
|
|
874
883
|
return _context6.abrupt("return");
|
|
875
|
-
case
|
|
884
|
+
case 9:
|
|
876
885
|
// 区分loading, 是点击的checkout 还是save
|
|
877
886
|
_setLoading = type === 'checkout' ? setCheckoutLoading : setLoading;
|
|
878
887
|
_setLoading(true);
|
|
@@ -881,34 +890,34 @@ var Footer = function Footer(props) {
|
|
|
881
890
|
createApi = state.renderType === 'eventBooking' ? createEventBooking : createBooking;
|
|
882
891
|
saveOtherValue = {};
|
|
883
892
|
if (!(type === 'save')) {
|
|
884
|
-
_context6.next =
|
|
893
|
+
_context6.next = 22;
|
|
885
894
|
break;
|
|
886
895
|
}
|
|
887
|
-
_context6.next =
|
|
896
|
+
_context6.next = 18;
|
|
888
897
|
return state === null || state === void 0 || (_state$onSave = state.onSave) === null || _state$onSave === void 0 ? void 0 : _state$onSave.call(state, state.client);
|
|
889
|
-
case
|
|
898
|
+
case 18:
|
|
890
899
|
_context6.t0 = _context6.sent;
|
|
891
900
|
if (_context6.t0) {
|
|
892
|
-
_context6.next =
|
|
901
|
+
_context6.next = 21;
|
|
893
902
|
break;
|
|
894
903
|
}
|
|
895
904
|
_context6.t0 = {};
|
|
896
|
-
case 20:
|
|
897
|
-
saveOtherValue = _context6.t0;
|
|
898
905
|
case 21:
|
|
899
|
-
|
|
906
|
+
saveOtherValue = _context6.t0;
|
|
907
|
+
case 22:
|
|
908
|
+
_context6.prev = 22;
|
|
900
909
|
callbackData = null; // 格式化提交的参数
|
|
901
910
|
values = formatValues(_objectSpread(_objectSpread({}, state), saveOtherValue)); // checkout 2.0 补充商品总税费字段
|
|
902
911
|
values.product_tax_fee = total.tax || 0;
|
|
903
912
|
if (!noSubmit) {
|
|
904
|
-
_context6.next =
|
|
913
|
+
_context6.next = 28;
|
|
905
914
|
break;
|
|
906
915
|
}
|
|
907
916
|
return _context6.abrupt("return", values);
|
|
908
|
-
case
|
|
917
|
+
case 28:
|
|
909
918
|
checkout = pisellos.getModule('checkout'); // 如果有 orderid,则应该走更新逻辑
|
|
910
919
|
if (!editOrderId) {
|
|
911
|
-
_context6.next =
|
|
920
|
+
_context6.next = 38;
|
|
912
921
|
break;
|
|
913
922
|
}
|
|
914
923
|
subtotal_info = {
|
|
@@ -917,7 +926,7 @@ var Footer = function Footer(props) {
|
|
|
917
926
|
total: cloneDeep(total),
|
|
918
927
|
showDetail: showDetail
|
|
919
928
|
};
|
|
920
|
-
_context6.next =
|
|
929
|
+
_context6.next = 33;
|
|
921
930
|
return checkout.updateLocalOrderAsync({
|
|
922
931
|
orderId: editOrderId,
|
|
923
932
|
orderData: values,
|
|
@@ -925,10 +934,10 @@ var Footer = function Footer(props) {
|
|
|
925
934
|
autoPayment: true,
|
|
926
935
|
totalInfo: subtotal_info
|
|
927
936
|
});
|
|
928
|
-
case
|
|
929
|
-
_context6.next =
|
|
937
|
+
case 33:
|
|
938
|
+
_context6.next = 35;
|
|
930
939
|
return checkout.manualSyncOrderAsync();
|
|
931
|
-
case
|
|
940
|
+
case 35:
|
|
932
941
|
res = _context6.sent;
|
|
933
942
|
if (res.success) {
|
|
934
943
|
// 回调关闭弹窗
|
|
@@ -936,7 +945,7 @@ var Footer = function Footer(props) {
|
|
|
936
945
|
_setLoading(false);
|
|
937
946
|
}
|
|
938
947
|
return _context6.abrupt("return");
|
|
939
|
-
case
|
|
948
|
+
case 38:
|
|
940
949
|
// 如果是保存,检查是否需要支付定金
|
|
941
950
|
if (type === 'save') {
|
|
942
951
|
isNeedDeposit = checkout.checkIsNeedDepositAsync(values.bookings, values.relation_products);
|
|
@@ -1000,43 +1009,43 @@ var Footer = function Footer(props) {
|
|
|
1000
1009
|
|
|
1001
1010
|
// 如果有addons改动, 则先保存
|
|
1002
1011
|
if (!addonsEdit) {
|
|
1003
|
-
_context6.next =
|
|
1012
|
+
_context6.next = 44;
|
|
1004
1013
|
break;
|
|
1005
1014
|
}
|
|
1006
|
-
_context6.next =
|
|
1015
|
+
_context6.next = 44;
|
|
1007
1016
|
return handleSaveAddons();
|
|
1008
|
-
case
|
|
1017
|
+
case 44:
|
|
1009
1018
|
if (!infoEdit) {
|
|
1010
|
-
_context6.next =
|
|
1019
|
+
_context6.next = 49;
|
|
1011
1020
|
break;
|
|
1012
1021
|
}
|
|
1013
|
-
_context6.next =
|
|
1022
|
+
_context6.next = 47;
|
|
1014
1023
|
return api(values, state.bookingId || editOrderId);
|
|
1015
|
-
case
|
|
1024
|
+
case 47:
|
|
1016
1025
|
callbackData = _context6.sent;
|
|
1017
1026
|
if (messageShow) {
|
|
1018
1027
|
message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
|
|
1019
1028
|
}
|
|
1020
|
-
case
|
|
1029
|
+
case 49:
|
|
1021
1030
|
// 回调关闭弹窗
|
|
1022
1031
|
state === null || state === void 0 || state.callback(callbackData, type);
|
|
1023
1032
|
_setLoading(false);
|
|
1024
1033
|
|
|
1025
1034
|
// return数据 checkout时需要
|
|
1026
1035
|
return _context6.abrupt("return", callbackData || values);
|
|
1027
|
-
case
|
|
1028
|
-
_context6.prev =
|
|
1029
|
-
_context6.t1 = _context6["catch"](
|
|
1036
|
+
case 54:
|
|
1037
|
+
_context6.prev = 54;
|
|
1038
|
+
_context6.t1 = _context6["catch"](22);
|
|
1030
1039
|
console.log(_context6.t1);
|
|
1031
1040
|
if ((_context6.t1 === null || _context6.t1 === void 0 ? void 0 : _context6.t1.code) === 70101) {
|
|
1032
1041
|
message.error(_context6.t1 === null || _context6.t1 === void 0 ? void 0 : _context6.t1.message);
|
|
1033
1042
|
}
|
|
1034
1043
|
_setLoading(false);
|
|
1035
|
-
case
|
|
1044
|
+
case 59:
|
|
1036
1045
|
case "end":
|
|
1037
1046
|
return _context6.stop();
|
|
1038
1047
|
}
|
|
1039
|
-
}, _callee6, null, [[
|
|
1048
|
+
}, _callee6, null, [[22, 54]]);
|
|
1040
1049
|
}));
|
|
1041
1050
|
return function handleSave(_x5) {
|
|
1042
1051
|
return _ref7.apply(this, arguments);
|
|
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
248
248
|
* @Author: WangHan
|
|
249
249
|
* @Date: 2024-12-24 11:32
|
|
250
250
|
*/
|
|
251
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
251
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number | {
|
|
168
|
+
}) => number | "flexible" | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
}
|
|
171
|
+
};
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|