@pisell/pisellos 2.2.277 → 2.2.800
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 +0 -2
- package/dist/core/index.js +1 -7
- package/dist/model/strategy/adapter/promotion/adapter.d.ts +0 -4
- package/dist/model/strategy/adapter/promotion/adapter.js +0 -23
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +0 -17
- package/dist/model/strategy/adapter/promotion/evaluator.js +6 -279
- package/dist/model/strategy/adapter/promotion/examples.d.ts +0 -86
- package/dist/model/strategy/adapter/promotion/examples.js +0 -99
- package/dist/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/model/strategy/adapter/promotion/type.d.ts +2 -90
- package/dist/model/strategy/adapter/promotion/type.js +0 -45
- package/dist/model/strategy/adapter/walletPass/evaluator.js +2 -0
- package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -5
- package/dist/model/strategy/adapter/walletPass/utils.js +26 -57
- package/dist/modules/OpenData/index.d.ts +0 -2
- package/dist/modules/OpenData/index.js +0 -8
- package/dist/modules/Order/index.d.ts +8 -28
- package/dist/modules/Order/index.js +496 -808
- package/dist/modules/Order/types.d.ts +1 -35
- package/dist/modules/Order/utils/orderCollectionIdentity.js +2 -7
- package/dist/modules/Order/utils.js +6 -10
- package/dist/modules/Payment/index.d.ts +0 -2
- package/dist/modules/Payment/index.js +49 -78
- package/dist/modules/Payment/types.d.ts +25 -106
- package/dist/modules/Payment/types.js +0 -17
- package/dist/modules/Payment/utils.js +1 -4
- package/dist/modules/Payment/walletpass.d.ts +1 -49
- package/dist/modules/Payment/walletpass.js +124 -1081
- package/dist/modules/Rules/index.d.ts +0 -3
- package/dist/modules/Rules/index.js +70 -100
- package/dist/server/index.d.ts +0 -25
- package/dist/server/index.js +1069 -2001
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +4 -70
- package/dist/server/modules/order/index.js +728 -1816
- package/dist/server/modules/order/types.d.ts +3 -25
- package/dist/server/modules/order/types.js +1 -7
- package/dist/server/utils/small-ticket.js +2 -1
- package/dist/solution/BaseSales/index.d.ts +5 -109
- package/dist/solution/BaseSales/index.js +436 -1802
- package/dist/solution/BaseSales/types.d.ts +1 -55
- package/dist/solution/BaseSales/types.js +1 -2
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +1 -3
- package/dist/solution/BaseSales/utils/cartPromotion.js +31 -90
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -6
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +4 -7
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +5 -21
- package/dist/solution/BookingTicket/index.js +56 -139
- package/dist/solution/BookingTicket/types.d.ts +0 -1
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -8
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +83 -173
- package/dist/solution/Sales/index.d.ts +0 -2
- package/dist/solution/Sales/index.js +4 -26
- package/dist/solution/ScanOrder/index.js +20 -31
- package/dist/solution/VenueBooking/index.d.ts +0 -1
- package/dist/solution/VenueBooking/index.js +19 -30
- package/dist/types/index.d.ts +0 -1
- package/lib/core/index.d.ts +0 -2
- package/lib/core/index.js +1 -4
- package/lib/model/strategy/adapter/promotion/adapter.d.ts +0 -4
- package/lib/model/strategy/adapter/promotion/adapter.js +0 -20
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +0 -17
- package/lib/model/strategy/adapter/promotion/evaluator.js +0 -235
- package/lib/model/strategy/adapter/promotion/examples.d.ts +0 -86
- package/lib/model/strategy/adapter/promotion/examples.js +0 -91
- package/lib/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +49 -0
- package/lib/model/strategy/adapter/promotion/type.d.ts +2 -90
- package/lib/model/strategy/adapter/promotion/type.js +0 -2
- package/lib/model/strategy/adapter/walletPass/evaluator.js +2 -0
- package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -5
- package/lib/model/strategy/adapter/walletPass/utils.js +11 -62
- package/lib/modules/OpenData/index.d.ts +0 -2
- package/lib/modules/OpenData/index.js +0 -5
- package/lib/modules/Order/index.d.ts +8 -28
- package/lib/modules/Order/index.js +69 -231
- package/lib/modules/Order/types.d.ts +1 -35
- package/lib/modules/Order/utils/orderCollectionIdentity.js +0 -3
- package/lib/modules/Order/utils.js +4 -11
- package/lib/modules/Payment/index.d.ts +0 -2
- package/lib/modules/Payment/index.js +12 -33
- package/lib/modules/Payment/types.d.ts +25 -106
- package/lib/modules/Payment/types.js +0 -1
- package/lib/modules/Payment/utils.js +1 -5
- package/lib/modules/Payment/walletpass.d.ts +1 -49
- package/lib/modules/Payment/walletpass.js +22 -898
- package/lib/modules/Rules/index.d.ts +0 -3
- package/lib/modules/Rules/index.js +9 -38
- package/lib/server/index.d.ts +0 -25
- package/lib/server/index.js +31 -726
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +4 -70
- package/lib/server/modules/order/index.js +69 -818
- package/lib/server/modules/order/types.d.ts +3 -25
- package/lib/server/modules/order/types.js +0 -1
- package/lib/server/utils/small-ticket.js +1 -1
- package/lib/solution/BaseSales/index.d.ts +5 -109
- package/lib/solution/BaseSales/index.js +27 -874
- package/lib/solution/BaseSales/types.d.ts +1 -55
- package/lib/solution/BaseSales/types.js +1 -2
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +1 -3
- package/lib/solution/BaseSales/utils/cartPromotion.js +12 -63
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -6
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -4
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +5 -21
- package/lib/solution/BookingTicket/index.js +13 -64
- package/lib/solution/BookingTicket/types.d.ts +0 -1
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -8
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +5 -37
- package/lib/solution/Sales/index.d.ts +0 -2
- package/lib/solution/Sales/index.js +6 -20
- package/lib/solution/ScanOrder/index.js +0 -8
- package/lib/solution/VenueBooking/index.d.ts +0 -1
- package/lib/solution/VenueBooking/index.js +0 -8
- package/lib/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/modules/Order/payment-utils.d.ts +0 -26
- package/dist/modules/Order/payment-utils.js +0 -225
- package/dist/utils/payment-number.d.ts +0 -9
- package/dist/utils/payment-number.js +0 -69
- package/lib/modules/Order/payment-utils.d.ts +0 -26
- package/lib/modules/Order/payment-utils.js +0 -224
- package/lib/utils/payment-number.d.ts +0 -9
- package/lib/utils/payment-number.js +0 -64
|
@@ -337,10 +337,11 @@ 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;
|
|
340
341
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
341
342
|
while (1) switch (_context3.prev = _context3.next) {
|
|
342
343
|
case 0:
|
|
343
|
-
return _context3.abrupt("return", this.
|
|
344
|
+
return _context3.abrupt("return", (_this$store$openData = this.store.openData) === null || _this$store$openData === void 0 ? void 0 : _this$store$openData.getOpenData());
|
|
344
345
|
case 1:
|
|
345
346
|
case "end":
|
|
346
347
|
return _context3.stop();
|
|
@@ -351,15 +352,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
351
352
|
return _getOpenData.apply(this, arguments);
|
|
352
353
|
}
|
|
353
354
|
return getOpenData;
|
|
354
|
-
}()
|
|
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
|
-
}
|
|
355
|
+
}()
|
|
363
356
|
}, {
|
|
364
357
|
key: "getShortNumberOrDeviceId",
|
|
365
358
|
value: function () {
|
|
@@ -404,52 +397,49 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
404
397
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
405
398
|
while (1) switch (_context5.prev = _context5.next) {
|
|
406
399
|
case 0:
|
|
407
|
-
// 业务码切换或配置失败时不能复用上一次初始化的短号。
|
|
408
|
-
this.setPaymentNumberDevicePrefix(null);
|
|
409
400
|
openDataConfig = null;
|
|
410
|
-
_context5.prev =
|
|
411
|
-
_context5.next =
|
|
401
|
+
_context5.prev = 1;
|
|
402
|
+
_context5.next = 4;
|
|
412
403
|
return this.loadOpenDataConfig();
|
|
413
|
-
case
|
|
404
|
+
case 4:
|
|
414
405
|
openDataConfig = _context5.sent;
|
|
415
|
-
_context5.next =
|
|
406
|
+
_context5.next = 11;
|
|
416
407
|
break;
|
|
417
|
-
case
|
|
418
|
-
_context5.prev =
|
|
419
|
-
_context5.t0 = _context5["catch"](
|
|
408
|
+
case 7:
|
|
409
|
+
_context5.prev = 7;
|
|
410
|
+
_context5.t0 = _context5["catch"](1);
|
|
420
411
|
console.warn('[BookingTicket] OpenData 配置加载失败,跳过 idGenerator 配置', _context5.t0);
|
|
421
412
|
return _context5.abrupt("return");
|
|
422
|
-
case
|
|
413
|
+
case 11:
|
|
423
414
|
// if (!openDataConfig) return;
|
|
424
415
|
idGenerator = this.getIdGeneratorPlugin();
|
|
425
416
|
if (idGenerator !== null && idGenerator !== void 0 && idGenerator.configure) {
|
|
426
|
-
_context5.next =
|
|
417
|
+
_context5.next = 15;
|
|
427
418
|
break;
|
|
428
419
|
}
|
|
429
420
|
console.warn('[BookingTicket] idGenerator 插件不可用,跳过配置');
|
|
430
421
|
return _context5.abrupt("return");
|
|
431
|
-
case
|
|
422
|
+
case 15:
|
|
432
423
|
receiptSequenceLength = this.normalizePositiveInteger((_openDataConfig = openDataConfig) === null || _openDataConfig === void 0 ? void 0 : _openDataConfig['sale.short_number_digits'], 5);
|
|
433
424
|
receiptSequenceStart = this.normalizePositiveInteger((_openDataConfig2 = openDataConfig) === null || _openDataConfig2 === void 0 ? void 0 : _openDataConfig2['sale.short_number_start_number'], 1);
|
|
434
425
|
prefix = this.normalizeIdPrefix((_openDataConfig3 = openDataConfig) === null || _openDataConfig3 === void 0 ? void 0 : _openDataConfig3['sale.short_number_prefix'], '');
|
|
435
426
|
shopOrderPrefix = this.normalizeIdPrefix((_openDataConfig4 = openDataConfig) === null || _openDataConfig4 === void 0 ? void 0 : _openDataConfig4['sale.sale_number_prefix'], '');
|
|
436
427
|
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;
|
|
437
428
|
operatingDayBoundary = this.getAppData('operating_day_boundary');
|
|
438
|
-
_context5.next =
|
|
429
|
+
_context5.next = 23;
|
|
439
430
|
return this.getShortNumberOrDeviceId();
|
|
440
|
-
case
|
|
431
|
+
case 23:
|
|
441
432
|
deviceId = _context5.sent;
|
|
442
|
-
this.setPaymentNumberDevicePrefix(deviceId);
|
|
443
433
|
businessCode = this.getBookingTicketBusinessCode();
|
|
444
434
|
if (businessCode) {
|
|
445
|
-
_context5.next =
|
|
435
|
+
_context5.next = 28;
|
|
446
436
|
break;
|
|
447
437
|
}
|
|
448
438
|
console.warn('[BookingTicket] businessCode 缺失,跳过 idGenerator 配置');
|
|
449
439
|
return _context5.abrupt("return");
|
|
450
|
-
case
|
|
451
|
-
_context5.prev =
|
|
452
|
-
_context5.next =
|
|
440
|
+
case 28:
|
|
441
|
+
_context5.prev = 28;
|
|
442
|
+
_context5.next = 31;
|
|
453
443
|
return idGenerator.configure({
|
|
454
444
|
biz: businessCode,
|
|
455
445
|
config: {
|
|
@@ -464,18 +454,18 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
464
454
|
shopOrderPrefix: shopOrderPrefix
|
|
465
455
|
}
|
|
466
456
|
});
|
|
467
|
-
case
|
|
468
|
-
_context5.next =
|
|
457
|
+
case 31:
|
|
458
|
+
_context5.next = 36;
|
|
469
459
|
break;
|
|
470
|
-
case
|
|
471
|
-
_context5.prev =
|
|
472
|
-
_context5.t1 = _context5["catch"](
|
|
460
|
+
case 33:
|
|
461
|
+
_context5.prev = 33;
|
|
462
|
+
_context5.t1 = _context5["catch"](28);
|
|
473
463
|
console.warn('[BookingTicket] idGenerator 配置失败', _context5.t1);
|
|
474
|
-
case
|
|
464
|
+
case 36:
|
|
475
465
|
case "end":
|
|
476
466
|
return _context5.stop();
|
|
477
467
|
}
|
|
478
|
-
}, _callee5, this, [[
|
|
468
|
+
}, _callee5, this, [[1, 7], [28, 33]]);
|
|
479
469
|
}));
|
|
480
470
|
function configureIdGeneratorFromOpenData() {
|
|
481
471
|
return _configureIdGeneratorFromOpenData.apply(this, arguments);
|
|
@@ -602,15 +592,12 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
602
592
|
tempOrder: tempOrder
|
|
603
593
|
});
|
|
604
594
|
case 18:
|
|
605
|
-
return _context7.abrupt("return",
|
|
606
|
-
isAvailable: raw.isAvailable
|
|
607
|
-
}, raw.isAccepted !== undefined ? {
|
|
608
|
-
isAccepted: raw.isAccepted
|
|
609
|
-
} : {}), {}, {
|
|
595
|
+
return _context7.abrupt("return", {
|
|
596
|
+
isAvailable: raw.isAvailable,
|
|
610
597
|
type: raw.type,
|
|
611
598
|
unavailableReason: raw.unavailableReason,
|
|
612
599
|
scannedDiscountList: raw.scannedDiscountList
|
|
613
|
-
})
|
|
600
|
+
});
|
|
614
601
|
case 19:
|
|
615
602
|
case "end":
|
|
616
603
|
return _context7.stop();
|
|
@@ -1273,88 +1260,24 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1273
1260
|
}
|
|
1274
1261
|
|
|
1275
1262
|
/**
|
|
1276
|
-
* 通过 ids
|
|
1277
|
-
*
|
|
1263
|
+
* 通过 ids 获取商品列表(不加载到模块中)
|
|
1264
|
+
* @returns 商品列表
|
|
1278
1265
|
*/
|
|
1279
1266
|
}, {
|
|
1280
1267
|
key: "getProductByIds",
|
|
1281
1268
|
value: (function () {
|
|
1282
|
-
var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(ids
|
|
1283
|
-
var _this$getOrderCustome, _this$getOrderCustome2, _this$getOrderCustome3;
|
|
1284
|
-
var normalizedIds, localProducts, localProductIds, missingIds, rawBookingDate, bookingDate, customerId, loadedProducts, productById;
|
|
1269
|
+
var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(ids) {
|
|
1285
1270
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1286
1271
|
while (1) switch (_context18.prev = _context18.next) {
|
|
1287
1272
|
case 0:
|
|
1288
|
-
|
|
1289
|
-
|
|
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:
|
|
1273
|
+
return _context18.abrupt("return", this.store.products.getProductByIds(ids));
|
|
1274
|
+
case 1:
|
|
1352
1275
|
case "end":
|
|
1353
1276
|
return _context18.stop();
|
|
1354
1277
|
}
|
|
1355
1278
|
}, _callee18, this);
|
|
1356
1279
|
}));
|
|
1357
|
-
function getProductByIds(_x13
|
|
1280
|
+
function getProductByIds(_x13) {
|
|
1358
1281
|
return _getProductByIds.apply(this, arguments);
|
|
1359
1282
|
}
|
|
1360
1283
|
return getProductByIds;
|
|
@@ -1388,7 +1311,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1388
1311
|
}
|
|
1389
1312
|
}, _callee19, this);
|
|
1390
1313
|
}));
|
|
1391
|
-
function getScheduleTimePoints(
|
|
1314
|
+
function getScheduleTimePoints(_x14) {
|
|
1392
1315
|
return _getScheduleTimePoints.apply(this, arguments);
|
|
1393
1316
|
}
|
|
1394
1317
|
return getScheduleTimePoints;
|
|
@@ -1778,7 +1701,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1778
1701
|
}
|
|
1779
1702
|
}, _callee23, this, [[0, 7]]);
|
|
1780
1703
|
}));
|
|
1781
|
-
function changeCustomerPage(
|
|
1704
|
+
function changeCustomerPage(_x15, _x16) {
|
|
1782
1705
|
return _changeCustomerPage.apply(this, arguments);
|
|
1783
1706
|
}
|
|
1784
1707
|
return changeCustomerPage;
|
|
@@ -2070,8 +1993,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2070
1993
|
}, {
|
|
2071
1994
|
key: "getBookingConfig",
|
|
2072
1995
|
value: function getBookingConfig() {
|
|
2073
|
-
|
|
2074
|
-
return (_this$store$bookingCo = this.store.bookingContext) === null || _this$store$bookingCo === void 0 ? void 0 : _this$store$bookingCo.getBookingConfig();
|
|
1996
|
+
return this.store.bookingContext.getBookingConfig();
|
|
2075
1997
|
}
|
|
2076
1998
|
|
|
2077
1999
|
/** 写入资源全集(来源:`/form/schedule`),同步派生 resourcesOriginMap。 */
|
|
@@ -2232,10 +2154,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2232
2154
|
}, {
|
|
2233
2155
|
key: "buildAddProductCtx",
|
|
2234
2156
|
value: function buildAddProductCtx(extra) {
|
|
2235
|
-
var _extra$date2, _ref12, _this$
|
|
2157
|
+
var _extra$date2, _ref12, _this$getOrderCustome, _this$getOrderCustome2, _this$store$order$get4, _extra$presetStartTim2;
|
|
2236
2158
|
var bookingContextState = this.store.bookingContext.getState();
|
|
2237
2159
|
var date = (_extra$date2 = extra === null || extra === void 0 ? void 0 : extra.date) !== null && _extra$date2 !== void 0 ? _extra$date2 : bookingContextState.date;
|
|
2238
|
-
var orderCustomerId = (_ref12 = (_this$
|
|
2160
|
+
var orderCustomerId = (_ref12 = (_this$getOrderCustome = (_this$getOrderCustome2 = this.getOrderCustomerSnapshot()) === null || _this$getOrderCustome2 === void 0 ? void 0 : _this$getOrderCustome2.id) !== null && _this$getOrderCustome !== void 0 ? _this$getOrderCustome : (_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;
|
|
2239
2161
|
return _objectSpread({
|
|
2240
2162
|
bookingConfig: bookingContextState.bookingConfig,
|
|
2241
2163
|
resourcesOrigin: bookingContextState.resourcesOrigin,
|
|
@@ -2352,7 +2274,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2352
2274
|
}
|
|
2353
2275
|
}, _callee27, this);
|
|
2354
2276
|
}));
|
|
2355
|
-
function updateProductInOrder(
|
|
2277
|
+
function updateProductInOrder(_x17) {
|
|
2356
2278
|
return _updateProductInOrder.apply(this, arguments);
|
|
2357
2279
|
}
|
|
2358
2280
|
return updateProductInOrder;
|
|
@@ -2440,12 +2362,6 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2440
2362
|
},
|
|
2441
2363
|
addProductToOrder: function addProductToOrder(product, booking) {
|
|
2442
2364
|
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);
|
|
2449
2365
|
}
|
|
2450
2366
|
}, formatted, bridge);
|
|
2451
2367
|
case 16:
|
|
@@ -2467,7 +2383,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2467
2383
|
}
|
|
2468
2384
|
}, _callee28, this, [[4, 21]]);
|
|
2469
2385
|
}));
|
|
2470
|
-
function handleGlobalScanCode(
|
|
2386
|
+
function handleGlobalScanCode(_x18, _x19) {
|
|
2471
2387
|
return _handleGlobalScanCode.apply(this, arguments);
|
|
2472
2388
|
}
|
|
2473
2389
|
return handleGlobalScanCode;
|
|
@@ -2565,7 +2481,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2565
2481
|
}
|
|
2566
2482
|
}, _callee29, this);
|
|
2567
2483
|
}));
|
|
2568
|
-
function addAddTimeProductToBooking(
|
|
2484
|
+
function addAddTimeProductToBooking(_x20) {
|
|
2569
2485
|
return _addAddTimeProductToBooking.apply(this, arguments);
|
|
2570
2486
|
}
|
|
2571
2487
|
return addAddTimeProductToBooking;
|
|
@@ -2620,7 +2536,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2620
2536
|
_context30.next = 11;
|
|
2621
2537
|
break;
|
|
2622
2538
|
}
|
|
2623
|
-
return _context30.abrupt("return", this.store.order.addProductsToOrder(orderLines
|
|
2539
|
+
return _context30.abrupt("return", this.store.order.addProductsToOrder(orderLines, {
|
|
2540
|
+
skipEditDiscountConfigRefresh: true,
|
|
2541
|
+
skipDiscountRecalculation: true
|
|
2542
|
+
}));
|
|
2624
2543
|
case 11:
|
|
2625
2544
|
result = [];
|
|
2626
2545
|
_iterator2 = _createForOfIteratorHelper(orderLines);
|
|
@@ -2665,7 +2584,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2665
2584
|
}
|
|
2666
2585
|
}, _callee30, this, [[13, 31, 34, 37]]);
|
|
2667
2586
|
}));
|
|
2668
|
-
function addAddTimeProductsToBooking(
|
|
2587
|
+
function addAddTimeProductsToBooking(_x21) {
|
|
2669
2588
|
return _addAddTimeProductsToBooking.apply(this, arguments);
|
|
2670
2589
|
}
|
|
2671
2590
|
return addAddTimeProductsToBooking;
|
|
@@ -2682,24 +2601,22 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2682
2601
|
while (1) switch (_context31.prev = _context31.next) {
|
|
2683
2602
|
case 0:
|
|
2684
2603
|
_ref19 = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : {}, _ref19$cover = _ref19.cover, cover = _ref19$cover === void 0 ? false : _ref19$cover;
|
|
2685
|
-
|
|
2686
|
-
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "setOtherParams", this).call(this, params, {
|
|
2604
|
+
_get(_getPrototypeOf(BookingTicketImpl.prototype), "setOtherParams", this).call(this, params, {
|
|
2687
2605
|
cover: cover
|
|
2688
2606
|
});
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
_context31.next = 6;
|
|
2607
|
+
if (!(params !== null && params !== void 0 && params.businessCode)) {
|
|
2608
|
+
_context31.next = 5;
|
|
2692
2609
|
break;
|
|
2693
2610
|
}
|
|
2694
|
-
_context31.next =
|
|
2611
|
+
_context31.next = 5;
|
|
2695
2612
|
return this.configureIdGeneratorFromOpenData();
|
|
2696
|
-
case
|
|
2613
|
+
case 5:
|
|
2697
2614
|
case "end":
|
|
2698
2615
|
return _context31.stop();
|
|
2699
2616
|
}
|
|
2700
2617
|
}, _callee31, this);
|
|
2701
2618
|
}));
|
|
2702
|
-
function setOtherParams(
|
|
2619
|
+
function setOtherParams(_x22) {
|
|
2703
2620
|
return _setOtherParams.apply(this, arguments);
|
|
2704
2621
|
}
|
|
2705
2622
|
return setOtherParams;
|
|
@@ -2770,7 +2687,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2770
2687
|
}
|
|
2771
2688
|
}, _callee32, this);
|
|
2772
2689
|
}));
|
|
2773
|
-
function handlePrintWristband(
|
|
2690
|
+
function handlePrintWristband(_x23) {
|
|
2774
2691
|
return _handlePrintWristband.apply(this, arguments);
|
|
2775
2692
|
}
|
|
2776
2693
|
return handlePrintWristband;
|
|
@@ -2845,7 +2762,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2845
2762
|
}
|
|
2846
2763
|
}, _callee33, this);
|
|
2847
2764
|
}));
|
|
2848
|
-
function handleRedeem(
|
|
2765
|
+
function handleRedeem(_x24) {
|
|
2849
2766
|
return _handleRedeem.apply(this, arguments);
|
|
2850
2767
|
}
|
|
2851
2768
|
return handleRedeem;
|
|
@@ -24,14 +24,6 @@ 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
|
-
}>;
|
|
35
27
|
}
|
|
36
28
|
/**
|
|
37
29
|
* 应用全局扫码格式化结果:设客户 / 加车 / 开单 / 弹窗链。
|