@pisell/pisellos 2.2.274 → 2.2.276
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/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +7 -0
- package/dist/model/strategy/adapter/promotion/adapter.d.ts +4 -0
- package/dist/model/strategy/adapter/promotion/adapter.js +23 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +17 -0
- package/dist/model/strategy/adapter/promotion/evaluator.js +279 -6
- package/dist/model/strategy/adapter/promotion/examples.d.ts +86 -0
- package/dist/model/strategy/adapter/promotion/examples.js +99 -0
- package/dist/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/dist/model/strategy/adapter/promotion/index.js +1 -1
- package/dist/model/strategy/adapter/promotion/type.d.ts +90 -2
- package/dist/model/strategy/adapter/promotion/type.js +45 -0
- package/dist/modules/OpenData/index.d.ts +2 -0
- package/dist/modules/OpenData/index.js +8 -0
- package/dist/modules/Order/index.d.ts +28 -8
- package/dist/modules/Order/index.js +907 -588
- package/dist/modules/Order/payment-utils.d.ts +26 -0
- package/dist/modules/Order/payment-utils.js +225 -0
- package/dist/modules/Order/types.d.ts +35 -1
- package/dist/modules/Order/utils/orderCollectionIdentity.js +7 -2
- package/dist/modules/Order/utils.js +10 -6
- package/dist/modules/Payment/index.d.ts +2 -0
- package/dist/modules/Payment/index.js +78 -49
- package/dist/modules/Payment/types.d.ts +104 -25
- package/dist/modules/Payment/types.js +17 -0
- package/dist/modules/Payment/walletpass.d.ts +38 -1
- package/dist/modules/Payment/walletpass.js +917 -114
- package/dist/modules/Rules/index.d.ts +3 -0
- package/dist/modules/Rules/index.js +100 -70
- package/dist/server/index.d.ts +25 -0
- package/dist/server/index.js +1993 -1061
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +70 -4
- package/dist/server/modules/order/index.js +1816 -728
- package/dist/server/modules/order/types.d.ts +25 -3
- package/dist/server/modules/order/types.js +7 -1
- package/dist/solution/BaseSales/index.d.ts +104 -5
- package/dist/solution/BaseSales/index.js +1767 -436
- package/dist/solution/BaseSales/types.d.ts +55 -1
- package/dist/solution/BaseSales/types.js +2 -1
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +3 -1
- package/dist/solution/BaseSales/utils/cartPromotion.js +94 -32
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +6 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +7 -4
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +21 -5
- package/dist/solution/BookingTicket/index.js +139 -56
- package/dist/solution/BookingTicket/types.d.ts +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +8 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +173 -83
- package/dist/solution/Sales/index.d.ts +2 -0
- package/dist/solution/Sales/index.js +26 -4
- package/dist/solution/ScanOrder/index.js +31 -20
- package/dist/solution/VenueBooking/index.d.ts +1 -0
- package/dist/solution/VenueBooking/index.js +30 -19
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/payment-number.d.ts +9 -0
- package/dist/utils/payment-number.js +69 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +4 -0
- package/lib/model/strategy/adapter/promotion/adapter.d.ts +4 -0
- package/lib/model/strategy/adapter/promotion/adapter.js +20 -0
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +17 -0
- package/lib/model/strategy/adapter/promotion/evaluator.js +235 -0
- package/lib/model/strategy/adapter/promotion/examples.d.ts +86 -0
- package/lib/model/strategy/adapter/promotion/examples.js +91 -0
- package/lib/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +2 -0
- package/lib/model/strategy/adapter/promotion/type.d.ts +90 -2
- package/lib/model/strategy/adapter/promotion/type.js +2 -0
- package/lib/modules/OpenData/index.d.ts +2 -0
- package/lib/modules/OpenData/index.js +5 -0
- package/lib/modules/Order/index.d.ts +28 -8
- package/lib/modules/Order/index.js +252 -84
- package/lib/modules/Order/payment-utils.d.ts +26 -0
- package/lib/modules/Order/payment-utils.js +224 -0
- package/lib/modules/Order/types.d.ts +35 -1
- package/lib/modules/Order/utils/orderCollectionIdentity.js +3 -0
- package/lib/modules/Order/utils.js +11 -4
- package/lib/modules/Payment/index.d.ts +2 -0
- package/lib/modules/Payment/index.js +33 -12
- package/lib/modules/Payment/types.d.ts +104 -25
- package/lib/modules/Payment/types.js +1 -0
- package/lib/modules/Payment/walletpass.d.ts +38 -1
- package/lib/modules/Payment/walletpass.js +730 -21
- package/lib/modules/Rules/index.d.ts +3 -0
- package/lib/modules/Rules/index.js +38 -9
- package/lib/server/index.d.ts +25 -0
- package/lib/server/index.js +726 -31
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +70 -4
- package/lib/server/modules/order/index.js +818 -69
- package/lib/server/modules/order/types.d.ts +25 -3
- package/lib/server/modules/order/types.js +1 -0
- package/lib/solution/BaseSales/index.d.ts +104 -5
- package/lib/solution/BaseSales/index.js +858 -27
- package/lib/solution/BaseSales/types.d.ts +55 -1
- package/lib/solution/BaseSales/types.js +2 -1
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +3 -1
- package/lib/solution/BaseSales/utils/cartPromotion.js +66 -12
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +6 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +4 -3
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +21 -5
- package/lib/solution/BookingTicket/index.js +64 -13
- package/lib/solution/BookingTicket/types.d.ts +1 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +8 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +37 -5
- package/lib/solution/Sales/index.d.ts +2 -0
- package/lib/solution/Sales/index.js +20 -6
- package/lib/solution/ScanOrder/index.js +8 -0
- package/lib/solution/VenueBooking/index.d.ts +1 -0
- package/lib/solution/VenueBooking/index.js +8 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/payment-number.d.ts +9 -0
- package/lib/utils/payment-number.js +64 -0
- package/package.json +1 -1
|
@@ -337,11 +337,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
337
337
|
key: "getOpenData",
|
|
338
338
|
value: function () {
|
|
339
339
|
var _getOpenData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
340
|
-
var _this$store$openData;
|
|
341
340
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
342
341
|
while (1) switch (_context3.prev = _context3.next) {
|
|
343
342
|
case 0:
|
|
344
|
-
return _context3.abrupt("return",
|
|
343
|
+
return _context3.abrupt("return", this.loadOpenDataConfig());
|
|
345
344
|
case 1:
|
|
346
345
|
case "end":
|
|
347
346
|
return _context3.stop();
|
|
@@ -352,7 +351,15 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
352
351
|
return _getOpenData.apply(this, arguments);
|
|
353
352
|
}
|
|
354
353
|
return getOpenData;
|
|
355
|
-
}()
|
|
354
|
+
}() /** 清除店铺级 OpenData;下一次 getOpenData 时会重新拉取。 */
|
|
355
|
+
}, {
|
|
356
|
+
key: "clearOpenDataCache",
|
|
357
|
+
value: function clearOpenDataCache() {
|
|
358
|
+
var _this$store$openData;
|
|
359
|
+
this.loadOpenDataConfigInFlight = null;
|
|
360
|
+
this.otherParams.openData = null;
|
|
361
|
+
(_this$store$openData = this.store.openData) === null || _this$store$openData === void 0 || _this$store$openData.clearCache();
|
|
362
|
+
}
|
|
356
363
|
}, {
|
|
357
364
|
key: "getShortNumberOrDeviceId",
|
|
358
365
|
value: function () {
|
|
@@ -397,49 +404,52 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
397
404
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
398
405
|
while (1) switch (_context5.prev = _context5.next) {
|
|
399
406
|
case 0:
|
|
407
|
+
// 业务码切换或配置失败时不能复用上一次初始化的短号。
|
|
408
|
+
this.setPaymentNumberDevicePrefix(null);
|
|
400
409
|
openDataConfig = null;
|
|
401
|
-
_context5.prev =
|
|
402
|
-
_context5.next =
|
|
410
|
+
_context5.prev = 2;
|
|
411
|
+
_context5.next = 5;
|
|
403
412
|
return this.loadOpenDataConfig();
|
|
404
|
-
case
|
|
413
|
+
case 5:
|
|
405
414
|
openDataConfig = _context5.sent;
|
|
406
|
-
_context5.next =
|
|
415
|
+
_context5.next = 12;
|
|
407
416
|
break;
|
|
408
|
-
case
|
|
409
|
-
_context5.prev =
|
|
410
|
-
_context5.t0 = _context5["catch"](
|
|
417
|
+
case 8:
|
|
418
|
+
_context5.prev = 8;
|
|
419
|
+
_context5.t0 = _context5["catch"](2);
|
|
411
420
|
console.warn('[BookingTicket] OpenData 配置加载失败,跳过 idGenerator 配置', _context5.t0);
|
|
412
421
|
return _context5.abrupt("return");
|
|
413
|
-
case
|
|
422
|
+
case 12:
|
|
414
423
|
// if (!openDataConfig) return;
|
|
415
424
|
idGenerator = this.getIdGeneratorPlugin();
|
|
416
425
|
if (idGenerator !== null && idGenerator !== void 0 && idGenerator.configure) {
|
|
417
|
-
_context5.next =
|
|
426
|
+
_context5.next = 16;
|
|
418
427
|
break;
|
|
419
428
|
}
|
|
420
429
|
console.warn('[BookingTicket] idGenerator 插件不可用,跳过配置');
|
|
421
430
|
return _context5.abrupt("return");
|
|
422
|
-
case
|
|
431
|
+
case 16:
|
|
423
432
|
receiptSequenceLength = this.normalizePositiveInteger((_openDataConfig = openDataConfig) === null || _openDataConfig === void 0 ? void 0 : _openDataConfig['sale.short_number_digits'], 5);
|
|
424
433
|
receiptSequenceStart = this.normalizePositiveInteger((_openDataConfig2 = openDataConfig) === null || _openDataConfig2 === void 0 ? void 0 : _openDataConfig2['sale.short_number_start_number'], 1);
|
|
425
434
|
prefix = this.normalizeIdPrefix((_openDataConfig3 = openDataConfig) === null || _openDataConfig3 === void 0 ? void 0 : _openDataConfig3['sale.short_number_prefix'], '');
|
|
426
435
|
shopOrderPrefix = this.normalizeIdPrefix((_openDataConfig4 = openDataConfig) === null || _openDataConfig4 === void 0 ? void 0 : _openDataConfig4['sale.sale_number_prefix'], '');
|
|
427
436
|
resetReceiptSequenceDaily = typeof ((_openDataConfig5 = openDataConfig) === null || _openDataConfig5 === void 0 ? void 0 : _openDataConfig5['sale.short_number_daily_reset']) === 'boolean' ? (_openDataConfig6 = openDataConfig) === null || _openDataConfig6 === void 0 ? void 0 : _openDataConfig6['sale.short_number_daily_reset'] : false;
|
|
428
437
|
operatingDayBoundary = this.getAppData('operating_day_boundary');
|
|
429
|
-
_context5.next =
|
|
438
|
+
_context5.next = 24;
|
|
430
439
|
return this.getShortNumberOrDeviceId();
|
|
431
|
-
case
|
|
440
|
+
case 24:
|
|
432
441
|
deviceId = _context5.sent;
|
|
442
|
+
this.setPaymentNumberDevicePrefix(deviceId);
|
|
433
443
|
businessCode = this.getBookingTicketBusinessCode();
|
|
434
444
|
if (businessCode) {
|
|
435
|
-
_context5.next =
|
|
445
|
+
_context5.next = 30;
|
|
436
446
|
break;
|
|
437
447
|
}
|
|
438
448
|
console.warn('[BookingTicket] businessCode 缺失,跳过 idGenerator 配置');
|
|
439
449
|
return _context5.abrupt("return");
|
|
440
|
-
case
|
|
441
|
-
_context5.prev =
|
|
442
|
-
_context5.next =
|
|
450
|
+
case 30:
|
|
451
|
+
_context5.prev = 30;
|
|
452
|
+
_context5.next = 33;
|
|
443
453
|
return idGenerator.configure({
|
|
444
454
|
biz: businessCode,
|
|
445
455
|
config: {
|
|
@@ -454,18 +464,18 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
454
464
|
shopOrderPrefix: shopOrderPrefix
|
|
455
465
|
}
|
|
456
466
|
});
|
|
457
|
-
case 31:
|
|
458
|
-
_context5.next = 36;
|
|
459
|
-
break;
|
|
460
467
|
case 33:
|
|
461
|
-
_context5.
|
|
462
|
-
|
|
468
|
+
_context5.next = 38;
|
|
469
|
+
break;
|
|
470
|
+
case 35:
|
|
471
|
+
_context5.prev = 35;
|
|
472
|
+
_context5.t1 = _context5["catch"](30);
|
|
463
473
|
console.warn('[BookingTicket] idGenerator 配置失败', _context5.t1);
|
|
464
|
-
case
|
|
474
|
+
case 38:
|
|
465
475
|
case "end":
|
|
466
476
|
return _context5.stop();
|
|
467
477
|
}
|
|
468
|
-
}, _callee5, this, [[
|
|
478
|
+
}, _callee5, this, [[2, 8], [30, 35]]);
|
|
469
479
|
}));
|
|
470
480
|
function configureIdGeneratorFromOpenData() {
|
|
471
481
|
return _configureIdGeneratorFromOpenData.apply(this, arguments);
|
|
@@ -592,12 +602,15 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
592
602
|
tempOrder: tempOrder
|
|
593
603
|
});
|
|
594
604
|
case 18:
|
|
595
|
-
return _context7.abrupt("return", {
|
|
596
|
-
isAvailable: raw.isAvailable
|
|
605
|
+
return _context7.abrupt("return", _objectSpread(_objectSpread({
|
|
606
|
+
isAvailable: raw.isAvailable
|
|
607
|
+
}, raw.isAccepted !== undefined ? {
|
|
608
|
+
isAccepted: raw.isAccepted
|
|
609
|
+
} : {}), {}, {
|
|
597
610
|
type: raw.type,
|
|
598
611
|
unavailableReason: raw.unavailableReason,
|
|
599
612
|
scannedDiscountList: raw.scannedDiscountList
|
|
600
|
-
});
|
|
613
|
+
}));
|
|
601
614
|
case 19:
|
|
602
615
|
case "end":
|
|
603
616
|
return _context7.stop();
|
|
@@ -1260,24 +1273,88 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1260
1273
|
}
|
|
1261
1274
|
|
|
1262
1275
|
/**
|
|
1263
|
-
* 通过 ids
|
|
1264
|
-
*
|
|
1276
|
+
* 通过 ids 获取商品列表;默认只读取内存,显式开启 loadMissing 时按当前订单上下文补查缺失商品。
|
|
1277
|
+
* 补查直接写入 ProductList,不更新 BookingTicket.productCatalog,避免当前商品列表被查询子集覆盖。
|
|
1265
1278
|
*/
|
|
1266
1279
|
}, {
|
|
1267
1280
|
key: "getProductByIds",
|
|
1268
1281
|
value: (function () {
|
|
1269
|
-
var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(ids) {
|
|
1282
|
+
var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(ids, options) {
|
|
1283
|
+
var _this$getOrderCustome, _this$getOrderCustome2, _this$getOrderCustome3;
|
|
1284
|
+
var normalizedIds, localProducts, localProductIds, missingIds, rawBookingDate, bookingDate, customerId, loadedProducts, productById;
|
|
1270
1285
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1271
1286
|
while (1) switch (_context18.prev = _context18.next) {
|
|
1272
1287
|
case 0:
|
|
1273
|
-
|
|
1274
|
-
|
|
1288
|
+
normalizedIds = Array.from(new Set((ids || []).map(function (id) {
|
|
1289
|
+
return Number(id);
|
|
1290
|
+
}).filter(function (id) {
|
|
1291
|
+
return Number.isFinite(id);
|
|
1292
|
+
})));
|
|
1293
|
+
_context18.next = 3;
|
|
1294
|
+
return this.store.products.getProductByIds(normalizedIds);
|
|
1295
|
+
case 3:
|
|
1296
|
+
_context18.t0 = _context18.sent;
|
|
1297
|
+
if (_context18.t0) {
|
|
1298
|
+
_context18.next = 6;
|
|
1299
|
+
break;
|
|
1300
|
+
}
|
|
1301
|
+
_context18.t0 = [];
|
|
1302
|
+
case 6:
|
|
1303
|
+
localProducts = _context18.t0;
|
|
1304
|
+
if (options !== null && options !== void 0 && options.loadMissing) {
|
|
1305
|
+
_context18.next = 9;
|
|
1306
|
+
break;
|
|
1307
|
+
}
|
|
1308
|
+
return _context18.abrupt("return", localProducts);
|
|
1309
|
+
case 9:
|
|
1310
|
+
localProductIds = new Set(localProducts.map(function (product) {
|
|
1311
|
+
return Number(product.id);
|
|
1312
|
+
}));
|
|
1313
|
+
missingIds = normalizedIds.filter(function (id) {
|
|
1314
|
+
return !localProductIds.has(id);
|
|
1315
|
+
});
|
|
1316
|
+
if (missingIds.length) {
|
|
1317
|
+
_context18.next = 13;
|
|
1318
|
+
break;
|
|
1319
|
+
}
|
|
1320
|
+
return _context18.abrupt("return", localProducts);
|
|
1321
|
+
case 13:
|
|
1322
|
+
rawBookingDate = this.getBookingDate();
|
|
1323
|
+
bookingDate = rawBookingDate && dayjs(rawBookingDate).isValid() ? dayjs(rawBookingDate) : null;
|
|
1324
|
+
customerId = Number((_this$getOrderCustome = (_this$getOrderCustome2 = this.getOrderCustomerSnapshot()) === null || _this$getOrderCustome2 === void 0 ? void 0 : _this$getOrderCustome2.id) !== null && _this$getOrderCustome !== void 0 ? _this$getOrderCustome : (_this$getOrderCustome3 = this.getOrderCustomer()) === null || _this$getOrderCustome3 === void 0 ? void 0 : _this$getOrderCustome3.customer_id);
|
|
1325
|
+
_context18.next = 18;
|
|
1326
|
+
return this.store.products.loadProducts(_objectSpread(_objectSpread({
|
|
1327
|
+
product_ids: missingIds,
|
|
1328
|
+
with_count: ['bundleGroup', 'optionGroup'],
|
|
1329
|
+
with_schedule: 1,
|
|
1330
|
+
cacheId: this.cacheId
|
|
1331
|
+
}, bookingDate ? {
|
|
1332
|
+
schedule_date: bookingDate.format('YYYY-MM-DD'),
|
|
1333
|
+
schedule_datetime: bookingDate.format('YYYY-MM-DD HH:mm:ss')
|
|
1334
|
+
} : {}), Number.isFinite(customerId) && customerId > 0 ? {
|
|
1335
|
+
customer_id: customerId
|
|
1336
|
+
} : {}));
|
|
1337
|
+
case 18:
|
|
1338
|
+
loadedProducts = _context18.sent;
|
|
1339
|
+
productById = new Map();
|
|
1340
|
+
[].concat(_toConsumableArray(localProducts), _toConsumableArray(loadedProducts || [])).forEach(function (product) {
|
|
1341
|
+
var productId = Number(product.id);
|
|
1342
|
+
if (Number.isFinite(productId)) {
|
|
1343
|
+
productById.set(productId, product);
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
return _context18.abrupt("return", normalizedIds.map(function (id) {
|
|
1347
|
+
return productById.get(id);
|
|
1348
|
+
}).filter(function (product) {
|
|
1349
|
+
return Boolean(product);
|
|
1350
|
+
}));
|
|
1351
|
+
case 22:
|
|
1275
1352
|
case "end":
|
|
1276
1353
|
return _context18.stop();
|
|
1277
1354
|
}
|
|
1278
1355
|
}, _callee18, this);
|
|
1279
1356
|
}));
|
|
1280
|
-
function getProductByIds(_x13) {
|
|
1357
|
+
function getProductByIds(_x13, _x14) {
|
|
1281
1358
|
return _getProductByIds.apply(this, arguments);
|
|
1282
1359
|
}
|
|
1283
1360
|
return getProductByIds;
|
|
@@ -1311,7 +1388,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1311
1388
|
}
|
|
1312
1389
|
}, _callee19, this);
|
|
1313
1390
|
}));
|
|
1314
|
-
function getScheduleTimePoints(
|
|
1391
|
+
function getScheduleTimePoints(_x15) {
|
|
1315
1392
|
return _getScheduleTimePoints.apply(this, arguments);
|
|
1316
1393
|
}
|
|
1317
1394
|
return getScheduleTimePoints;
|
|
@@ -1701,7 +1778,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1701
1778
|
}
|
|
1702
1779
|
}, _callee23, this, [[0, 7]]);
|
|
1703
1780
|
}));
|
|
1704
|
-
function changeCustomerPage(
|
|
1781
|
+
function changeCustomerPage(_x16, _x17) {
|
|
1705
1782
|
return _changeCustomerPage.apply(this, arguments);
|
|
1706
1783
|
}
|
|
1707
1784
|
return changeCustomerPage;
|
|
@@ -1993,7 +2070,8 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1993
2070
|
}, {
|
|
1994
2071
|
key: "getBookingConfig",
|
|
1995
2072
|
value: function getBookingConfig() {
|
|
1996
|
-
|
|
2073
|
+
var _this$store$bookingCo;
|
|
2074
|
+
return (_this$store$bookingCo = this.store.bookingContext) === null || _this$store$bookingCo === void 0 ? void 0 : _this$store$bookingCo.getBookingConfig();
|
|
1997
2075
|
}
|
|
1998
2076
|
|
|
1999
2077
|
/** 写入资源全集(来源:`/form/schedule`),同步派生 resourcesOriginMap。 */
|
|
@@ -2154,10 +2232,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2154
2232
|
}, {
|
|
2155
2233
|
key: "buildAddProductCtx",
|
|
2156
2234
|
value: function buildAddProductCtx(extra) {
|
|
2157
|
-
var _extra$date2, _ref12, _this$
|
|
2235
|
+
var _extra$date2, _ref12, _this$getOrderCustome4, _this$getOrderCustome5, _this$store$order$get4, _extra$presetStartTim2;
|
|
2158
2236
|
var bookingContextState = this.store.bookingContext.getState();
|
|
2159
2237
|
var date = (_extra$date2 = extra === null || extra === void 0 ? void 0 : extra.date) !== null && _extra$date2 !== void 0 ? _extra$date2 : bookingContextState.date;
|
|
2160
|
-
var orderCustomerId = (_ref12 = (_this$
|
|
2238
|
+
var orderCustomerId = (_ref12 = (_this$getOrderCustome4 = (_this$getOrderCustome5 = this.getOrderCustomerSnapshot()) === null || _this$getOrderCustome5 === void 0 ? void 0 : _this$getOrderCustome5.id) !== null && _this$getOrderCustome4 !== void 0 ? _this$getOrderCustome4 : (_this$store$order$get4 = this.store.order.getTempOrder()) === null || _this$store$order$get4 === void 0 ? void 0 : _this$store$order$get4.customer_id) !== null && _ref12 !== void 0 ? _ref12 : undefined;
|
|
2161
2239
|
return _objectSpread({
|
|
2162
2240
|
bookingConfig: bookingContextState.bookingConfig,
|
|
2163
2241
|
resourcesOrigin: bookingContextState.resourcesOrigin,
|
|
@@ -2274,7 +2352,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2274
2352
|
}
|
|
2275
2353
|
}, _callee27, this);
|
|
2276
2354
|
}));
|
|
2277
|
-
function updateProductInOrder(
|
|
2355
|
+
function updateProductInOrder(_x18) {
|
|
2278
2356
|
return _updateProductInOrder.apply(this, arguments);
|
|
2279
2357
|
}
|
|
2280
2358
|
return updateProductInOrder;
|
|
@@ -2362,6 +2440,12 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2362
2440
|
},
|
|
2363
2441
|
addProductToOrder: function addProductToOrder(product, booking) {
|
|
2364
2442
|
return _this6.addProductToOrder(product, booking);
|
|
2443
|
+
},
|
|
2444
|
+
refreshWalletAssets: function refreshWalletAssets(params) {
|
|
2445
|
+
return _this6.refreshWalletAssets(params);
|
|
2446
|
+
},
|
|
2447
|
+
scanWalletAsset: function scanWalletAsset(scanCode) {
|
|
2448
|
+
return _this6.scanWalletAsset(scanCode);
|
|
2365
2449
|
}
|
|
2366
2450
|
}, formatted, bridge);
|
|
2367
2451
|
case 16:
|
|
@@ -2383,7 +2467,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2383
2467
|
}
|
|
2384
2468
|
}, _callee28, this, [[4, 21]]);
|
|
2385
2469
|
}));
|
|
2386
|
-
function handleGlobalScanCode(
|
|
2470
|
+
function handleGlobalScanCode(_x19, _x20) {
|
|
2387
2471
|
return _handleGlobalScanCode.apply(this, arguments);
|
|
2388
2472
|
}
|
|
2389
2473
|
return handleGlobalScanCode;
|
|
@@ -2481,7 +2565,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2481
2565
|
}
|
|
2482
2566
|
}, _callee29, this);
|
|
2483
2567
|
}));
|
|
2484
|
-
function addAddTimeProductToBooking(
|
|
2568
|
+
function addAddTimeProductToBooking(_x21) {
|
|
2485
2569
|
return _addAddTimeProductToBooking.apply(this, arguments);
|
|
2486
2570
|
}
|
|
2487
2571
|
return addAddTimeProductToBooking;
|
|
@@ -2536,10 +2620,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2536
2620
|
_context30.next = 11;
|
|
2537
2621
|
break;
|
|
2538
2622
|
}
|
|
2539
|
-
return _context30.abrupt("return", this.store.order.addProductsToOrder(orderLines
|
|
2540
|
-
skipEditDiscountConfigRefresh: true,
|
|
2541
|
-
skipDiscountRecalculation: true
|
|
2542
|
-
}));
|
|
2623
|
+
return _context30.abrupt("return", this.store.order.addProductsToOrder(orderLines));
|
|
2543
2624
|
case 11:
|
|
2544
2625
|
result = [];
|
|
2545
2626
|
_iterator2 = _createForOfIteratorHelper(orderLines);
|
|
@@ -2584,7 +2665,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2584
2665
|
}
|
|
2585
2666
|
}, _callee30, this, [[13, 31, 34, 37]]);
|
|
2586
2667
|
}));
|
|
2587
|
-
function addAddTimeProductsToBooking(
|
|
2668
|
+
function addAddTimeProductsToBooking(_x22) {
|
|
2588
2669
|
return _addAddTimeProductsToBooking.apply(this, arguments);
|
|
2589
2670
|
}
|
|
2590
2671
|
return addAddTimeProductsToBooking;
|
|
@@ -2601,22 +2682,24 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2601
2682
|
while (1) switch (_context31.prev = _context31.next) {
|
|
2602
2683
|
case 0:
|
|
2603
2684
|
_ref19 = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : {}, _ref19$cover = _ref19.cover, cover = _ref19$cover === void 0 ? false : _ref19$cover;
|
|
2604
|
-
|
|
2685
|
+
_context31.next = 3;
|
|
2686
|
+
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "setOtherParams", this).call(this, params, {
|
|
2605
2687
|
cover: cover
|
|
2606
2688
|
});
|
|
2607
|
-
|
|
2608
|
-
|
|
2689
|
+
case 3:
|
|
2690
|
+
if (!((params === null || params === void 0 ? void 0 : params.businessCode) !== undefined || (params === null || params === void 0 ? void 0 : params.business_code) !== undefined)) {
|
|
2691
|
+
_context31.next = 6;
|
|
2609
2692
|
break;
|
|
2610
2693
|
}
|
|
2611
|
-
_context31.next =
|
|
2694
|
+
_context31.next = 6;
|
|
2612
2695
|
return this.configureIdGeneratorFromOpenData();
|
|
2613
|
-
case
|
|
2696
|
+
case 6:
|
|
2614
2697
|
case "end":
|
|
2615
2698
|
return _context31.stop();
|
|
2616
2699
|
}
|
|
2617
2700
|
}, _callee31, this);
|
|
2618
2701
|
}));
|
|
2619
|
-
function setOtherParams(
|
|
2702
|
+
function setOtherParams(_x23) {
|
|
2620
2703
|
return _setOtherParams.apply(this, arguments);
|
|
2621
2704
|
}
|
|
2622
2705
|
return setOtherParams;
|
|
@@ -2687,7 +2770,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2687
2770
|
}
|
|
2688
2771
|
}, _callee32, this);
|
|
2689
2772
|
}));
|
|
2690
|
-
function handlePrintWristband(
|
|
2773
|
+
function handlePrintWristband(_x24) {
|
|
2691
2774
|
return _handlePrintWristband.apply(this, arguments);
|
|
2692
2775
|
}
|
|
2693
2776
|
return handlePrintWristband;
|
|
@@ -2762,7 +2845,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2762
2845
|
}
|
|
2763
2846
|
}, _callee33, this);
|
|
2764
2847
|
}));
|
|
2765
|
-
function handleRedeem(
|
|
2848
|
+
function handleRedeem(_x25) {
|
|
2766
2849
|
return _handleRedeem.apply(this, arguments);
|
|
2767
2850
|
}
|
|
2768
2851
|
return handleRedeem;
|
|
@@ -24,6 +24,14 @@ export interface GlobalScanApplyHost {
|
|
|
24
24
|
cacheItem: any;
|
|
25
25
|
};
|
|
26
26
|
addProductToOrder(product: any, booking?: any): Promise<any>;
|
|
27
|
+
refreshWalletAssets?(params?: {
|
|
28
|
+
preserveSelection?: boolean;
|
|
29
|
+
}): Promise<any>;
|
|
30
|
+
scanWalletAsset?(code: string): Promise<{
|
|
31
|
+
type: 'walletCode' | 'normalCode';
|
|
32
|
+
asset?: any;
|
|
33
|
+
selected: boolean;
|
|
34
|
+
}>;
|
|
27
35
|
}
|
|
28
36
|
/**
|
|
29
37
|
* 应用全局扫码格式化结果:设客户 / 加车 / 开单 / 弹窗链。
|