@pisell/private-materials 6.3.139 → 6.3.141
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 +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CupActionList/index.d.ts +1 -0
- package/es/components/ecocup/components/CupActionModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/es/components/ecocup/components/SettingModal/index.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/es/components/ecocup/cupList/index.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/scanOrder/components/Cart/index.js +127 -56
- package/es/components/scanOrder/components/Cart/index.less +11 -5
- package/es/components/scanOrder/components/Check/index.js +85 -80
- package/es/components/scanOrder/components/Content/index.js +356 -164
- package/es/components/scanOrder/components/Menu/index.d.ts +11 -0
- package/es/components/scanOrder/components/Menu/index.js +140 -169
- package/es/components/scanOrder/components/Voucher/index.d.ts +8 -0
- package/es/components/scanOrder/components/Voucher/index.js +250 -0
- package/es/components/scanOrder/context.js +38 -13
- package/es/components/scanOrder/hooks.js +4 -1
- package/es/components/scanOrder/locales.d.ts +65 -0
- package/es/components/scanOrder/locales.js +65 -0
- package/es/components/scanOrder/types.d.ts +10 -0
- package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
- package/es/components/scanOrder/utils/toShoppingCartProducts.js +137 -9
- package/es/components/scanOrder/utils/transformProductDetail.js +21 -4
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/venueBooking/components/Addons/index.js +42 -33
- package/es/components/venueBooking/components/Cart/index.js +26 -14
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/es/plus/orderList/components/Reset.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupActionList/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/lib/components/ecocup/components/SettingModal/index.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/lib/components/ecocup/cupList/index.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/scanOrder/components/Cart/index.js +79 -24
- package/lib/components/scanOrder/components/Cart/index.less +11 -5
- package/lib/components/scanOrder/components/Check/index.js +28 -23
- package/lib/components/scanOrder/components/Content/index.js +136 -42
- package/lib/components/scanOrder/components/Menu/index.d.ts +11 -0
- package/lib/components/scanOrder/components/Menu/index.js +23 -36
- package/lib/components/scanOrder/components/Voucher/index.d.ts +8 -0
- package/lib/components/scanOrder/components/Voucher/index.js +162 -0
- package/lib/components/scanOrder/context.js +21 -10
- package/lib/components/scanOrder/hooks.js +4 -1
- package/lib/components/scanOrder/locales.d.ts +65 -0
- package/lib/components/scanOrder/locales.js +65 -0
- package/lib/components/scanOrder/types.d.ts +10 -0
- package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
- package/lib/components/scanOrder/utils/toShoppingCartProducts.js +88 -6
- package/lib/components/scanOrder/utils/transformProductDetail.js +10 -3
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/venueBooking/components/Addons/index.js +15 -8
- package/lib/components/venueBooking/components/Cart/index.js +8 -2
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/lib/plus/orderList/components/Reset.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,10 +8,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
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; }
|
|
9
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
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import React, { useMemo, useState } from 'react';
|
|
11
|
+
import React, { useMemo, useState, useCallback, useEffect } from 'react';
|
|
12
12
|
import { Input, message } from 'antd';
|
|
13
13
|
import { locales } from '@pisell/utils';
|
|
14
|
-
import { PisellToast } from '@pisell/materials';
|
|
15
14
|
import Cart from "../Cart";
|
|
16
15
|
import FulfillmentMode from "../FulfillmentMode";
|
|
17
16
|
import ManualPickupRefModal from "../ManualPickupRefModal";
|
|
@@ -45,31 +44,28 @@ export default function Check() {
|
|
|
45
44
|
dineInConfig = _useState8[0],
|
|
46
45
|
setDineInConfig = _useState8[1];
|
|
47
46
|
// 去读 pisellos 内的配置
|
|
48
|
-
var getConfig = /*#__PURE__*/function () {
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
}();
|
|
72
|
-
getConfig();
|
|
47
|
+
var getConfig = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
48
|
+
var _otherParams$dineInCo;
|
|
49
|
+
var otherParams, dineInConfig;
|
|
50
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
51
|
+
while (1) switch (_context.prev = _context.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
_context.next = 2;
|
|
54
|
+
return runModuleAction('getOtherParams');
|
|
55
|
+
case 2:
|
|
56
|
+
otherParams = _context.sent;
|
|
57
|
+
console.log('otherParams >>>>> ', otherParams);
|
|
58
|
+
dineInConfig = (_otherParams$dineInCo = otherParams === null || otherParams === void 0 ? void 0 : otherParams.dineInConfig) !== null && _otherParams$dineInCo !== void 0 ? _otherParams$dineInCo : {};
|
|
59
|
+
setDineInConfig(dineInConfig);
|
|
60
|
+
case 6:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context.stop();
|
|
63
|
+
}
|
|
64
|
+
}, _callee);
|
|
65
|
+
})), [runModuleAction]);
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
getConfig();
|
|
68
|
+
}, []);
|
|
73
69
|
|
|
74
70
|
// 是否展示订单级备注
|
|
75
71
|
var isShowOrderNote = useMemo(function () {
|
|
@@ -87,54 +83,66 @@ export default function Check() {
|
|
|
87
83
|
var productsTitle = useMemo(function () {
|
|
88
84
|
return String(locales.getText('pisell2.scan.order.products.title') || 'Products');
|
|
89
85
|
}, []);
|
|
86
|
+
var showCheckStepEmptyCartTip = function showCheckStepEmptyCartTip() {
|
|
87
|
+
message.error(locales.getText('pisell2.scan.order.check.cart.empty.tip') || 'Please go back to add products');
|
|
88
|
+
};
|
|
90
89
|
var doSubmit = /*#__PURE__*/function () {
|
|
91
90
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
92
|
-
var res, _res$data, _viewModel$summary, _res$
|
|
91
|
+
var items, res, _res$data, _res$data2, _viewModel$summary, _res$data3, _res$data4, _utils$getApp, _app$history, _app$history2, link, app;
|
|
93
92
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
94
93
|
while (1) switch (_context3.prev = _context3.next) {
|
|
95
94
|
case 0:
|
|
96
|
-
|
|
95
|
+
items = (viewModel === null || viewModel === void 0 ? void 0 : viewModel.cartItems) || [];
|
|
96
|
+
if (!(items.length === 0)) {
|
|
97
|
+
_context3.next = 5;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
showCheckStepEmptyCartTip();
|
|
101
|
+
setSubmitting(false);
|
|
102
|
+
return _context3.abrupt("return");
|
|
103
|
+
case 5:
|
|
104
|
+
_context3.prev = 5;
|
|
97
105
|
setSubmitting(true);
|
|
98
|
-
_context3.next =
|
|
106
|
+
_context3.next = 9;
|
|
99
107
|
return runModuleAction('updateTempOrderNote', note);
|
|
100
|
-
case
|
|
101
|
-
_context3.next =
|
|
108
|
+
case 9:
|
|
109
|
+
_context3.next = 11;
|
|
102
110
|
return runModuleAction('submitScanOrder');
|
|
103
|
-
case
|
|
111
|
+
case 11:
|
|
104
112
|
res = _context3.sent;
|
|
105
113
|
console.log('submitScanOrder >>>>> ', res);
|
|
106
114
|
// 下单成功:清空步骤缓存(step / gate / entryContext),避免残留影响下次扫码
|
|
107
115
|
clearStepCache();
|
|
108
|
-
if (!(dineInConfig !== null && dineInConfig !== void 0 && dineInConfig['
|
|
109
|
-
_context3.next =
|
|
116
|
+
if (!(dineInConfig !== null && dineInConfig !== void 0 && dineInConfig['sale.require_payment_on_submit'] && !isAdditionalOrder)) {
|
|
117
|
+
_context3.next = 26;
|
|
110
118
|
break;
|
|
111
119
|
}
|
|
120
|
+
_context3.prev = 15;
|
|
121
|
+
_context3.next = 18;
|
|
122
|
+
return runModuleAction('restoreOrder');
|
|
123
|
+
case 18:
|
|
124
|
+
_context3.next = 23;
|
|
125
|
+
break;
|
|
126
|
+
case 20:
|
|
127
|
+
_context3.prev = 20;
|
|
128
|
+
_context3.t0 = _context3["catch"](15);
|
|
129
|
+
console.warn('[scanOrder] restoreOrder after payment failed', _context3.t0);
|
|
130
|
+
case 23:
|
|
112
131
|
utils.action({
|
|
113
132
|
type: 'pisell1.payment',
|
|
114
133
|
data: {
|
|
115
134
|
order_id: res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.order_id,
|
|
116
|
-
total_amount: viewModel === null || viewModel === void 0 || (_viewModel$summary = viewModel.summary) === null || _viewModel$summary === void 0 ? void 0 : _viewModel$summary.total_amount
|
|
135
|
+
total_amount: (res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.order_wait_pay_amount) || (viewModel === null || viewModel === void 0 || (_viewModel$summary = viewModel.summary) === null || _viewModel$summary === void 0 ? void 0 : _viewModel$summary.total_amount)
|
|
117
136
|
},
|
|
118
137
|
callback: function () {
|
|
119
138
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_e) {
|
|
120
139
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
121
140
|
while (1) switch (_context2.prev = _context2.next) {
|
|
122
141
|
case 0:
|
|
123
|
-
_context2.prev = 0;
|
|
124
|
-
_context2.next = 3;
|
|
125
|
-
return runModuleAction('restoreOrder');
|
|
126
|
-
case 3:
|
|
127
|
-
_context2.next = 8;
|
|
128
|
-
break;
|
|
129
|
-
case 5:
|
|
130
|
-
_context2.prev = 5;
|
|
131
|
-
_context2.t0 = _context2["catch"](0);
|
|
132
|
-
console.warn('[scanOrder] restoreOrder after payment failed', _context2.t0);
|
|
133
|
-
case 8:
|
|
134
142
|
case "end":
|
|
135
143
|
return _context2.stop();
|
|
136
144
|
}
|
|
137
|
-
}, _callee2
|
|
145
|
+
}, _callee2);
|
|
138
146
|
}));
|
|
139
147
|
function callback(_x) {
|
|
140
148
|
return _callback.apply(this, arguments);
|
|
@@ -142,25 +150,25 @@ export default function Check() {
|
|
|
142
150
|
return callback;
|
|
143
151
|
}()
|
|
144
152
|
});
|
|
145
|
-
_context3.next =
|
|
153
|
+
_context3.next = 38;
|
|
146
154
|
break;
|
|
147
|
-
case
|
|
148
|
-
if (!(res !== null && res !== void 0 && (_res$
|
|
149
|
-
_context3.next =
|
|
155
|
+
case 26:
|
|
156
|
+
if (!(res !== null && res !== void 0 && (_res$data3 = res.data) !== null && _res$data3 !== void 0 && _res$data3.order_id)) {
|
|
157
|
+
_context3.next = 38;
|
|
150
158
|
break;
|
|
151
159
|
}
|
|
152
|
-
_context3.prev =
|
|
153
|
-
_context3.next =
|
|
160
|
+
_context3.prev = 27;
|
|
161
|
+
_context3.next = 30;
|
|
154
162
|
return runModuleAction('restoreOrder');
|
|
155
|
-
case
|
|
156
|
-
_context3.next =
|
|
163
|
+
case 30:
|
|
164
|
+
_context3.next = 35;
|
|
157
165
|
break;
|
|
158
|
-
case
|
|
159
|
-
_context3.prev =
|
|
160
|
-
_context3.
|
|
161
|
-
console.warn('[scanOrder] restoreOrder before redirect failed', _context3.
|
|
162
|
-
case
|
|
163
|
-
link = "/order/details?id=".concat(res === null || res === void 0 || (_res$
|
|
166
|
+
case 32:
|
|
167
|
+
_context3.prev = 32;
|
|
168
|
+
_context3.t1 = _context3["catch"](27);
|
|
169
|
+
console.warn('[scanOrder] restoreOrder before redirect failed', _context3.t1);
|
|
170
|
+
case 35:
|
|
171
|
+
link = "/order/details?id=".concat(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.order_id);
|
|
164
172
|
app = utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
|
|
165
173
|
if (app !== null && app !== void 0 && (_app$history = app.history) !== null && _app$history !== void 0 && _app$history.replace) {
|
|
166
174
|
app.history.replace(link);
|
|
@@ -169,26 +177,26 @@ export default function Check() {
|
|
|
169
177
|
} else {
|
|
170
178
|
location.replace(link);
|
|
171
179
|
}
|
|
172
|
-
case
|
|
173
|
-
_context3.next =
|
|
180
|
+
case 38:
|
|
181
|
+
_context3.next = 40;
|
|
174
182
|
return refreshViewModel();
|
|
175
|
-
case
|
|
176
|
-
_context3.next =
|
|
183
|
+
case 40:
|
|
184
|
+
_context3.next = 46;
|
|
177
185
|
break;
|
|
178
|
-
case
|
|
179
|
-
_context3.prev =
|
|
180
|
-
_context3.
|
|
181
|
-
console.error('[scanOrder] submitScanOrder failed', _context3.
|
|
182
|
-
message.error((_context3.
|
|
183
|
-
case
|
|
184
|
-
_context3.prev =
|
|
186
|
+
case 42:
|
|
187
|
+
_context3.prev = 42;
|
|
188
|
+
_context3.t2 = _context3["catch"](5);
|
|
189
|
+
console.error('[scanOrder] submitScanOrder failed', _context3.t2);
|
|
190
|
+
message.error((_context3.t2 === null || _context3.t2 === void 0 ? void 0 : _context3.t2.message) || 'Submit order failed');
|
|
191
|
+
case 46:
|
|
192
|
+
_context3.prev = 46;
|
|
185
193
|
setSubmitting(false);
|
|
186
|
-
return _context3.finish(
|
|
187
|
-
case
|
|
194
|
+
return _context3.finish(46);
|
|
195
|
+
case 49:
|
|
188
196
|
case "end":
|
|
189
197
|
return _context3.stop();
|
|
190
198
|
}
|
|
191
|
-
}, _callee3, null, [[
|
|
199
|
+
}, _callee3, null, [[5, 42, 46, 49], [15, 20], [27, 32]]);
|
|
192
200
|
}));
|
|
193
201
|
return function doSubmit() {
|
|
194
202
|
return _ref2.apply(this, arguments);
|
|
@@ -211,10 +219,7 @@ export default function Check() {
|
|
|
211
219
|
_context4.next = 6;
|
|
212
220
|
break;
|
|
213
221
|
}
|
|
214
|
-
|
|
215
|
-
content: String(locales.getText('pisell2.scan.order.products.empty.tip') || 'Please select products'),
|
|
216
|
-
duration: 2
|
|
217
|
-
});
|
|
222
|
+
showCheckStepEmptyCartTip();
|
|
218
223
|
return _context4.abrupt("return");
|
|
219
224
|
case 6:
|
|
220
225
|
if (!isAdditionalOrder) {
|