@pisell/pisellos 2.2.301 → 2.2.303
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/model/strategy/adapter/dataVariant/evaluator.d.ts +18 -2
- package/dist/model/strategy/adapter/dataVariant/evaluator.js +287 -101
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +25 -0
- package/dist/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
- package/dist/model/strategy/adapter/itemRule/adapter.js +135 -35
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
- package/dist/model/strategy/adapter/itemRule/evaluator.js +25 -1
- package/dist/model/strategy/adapter/itemRule/type.d.ts +44 -0
- package/dist/model/strategy/adapter/itemRule/type.js +19 -1
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +10 -7
- package/dist/modules/Discount/index.d.ts +2 -0
- package/dist/modules/Discount/index.js +41 -5
- package/dist/modules/Discount/types.d.ts +21 -0
- package/dist/modules/OpenData/index.d.ts +15 -2
- package/dist/modules/OpenData/index.js +307 -19
- package/dist/modules/OpenData/types.d.ts +55 -0
- package/dist/modules/OpenData/types.js +7 -1
- package/dist/modules/OpenData/utils.d.ts +21 -1
- package/dist/modules/OpenData/utils.js +138 -0
- package/dist/modules/Order/index.d.ts +50 -7
- package/dist/modules/Order/index.js +1690 -815
- package/dist/modules/Order/salesNotes.d.ts +31 -0
- package/dist/modules/Order/salesNotes.js +492 -0
- package/dist/modules/Order/types.d.ts +117 -10
- package/dist/modules/Order/types.js +6 -1
- package/dist/modules/Order/utils/virtualSettlement.d.ts +63 -0
- package/dist/modules/Order/utils/virtualSettlement.js +284 -0
- package/dist/modules/Order/utils.d.ts +5 -1
- package/dist/modules/Order/utils.js +138 -33
- package/dist/modules/Payment/walletpass.js +20 -21
- package/dist/modules/Product/types.d.ts +23 -0
- package/dist/modules/ProductList/index.d.ts +2 -1
- package/dist/modules/ProductList/index.js +100 -20
- package/dist/modules/ProductList/types.d.ts +10 -0
- package/dist/modules/Rules/index.d.ts +5 -0
- package/dist/modules/Rules/index.js +30 -14
- package/dist/modules/SalesSummary/index.d.ts +1 -0
- package/dist/modules/SalesSummary/index.js +4 -3
- package/dist/modules/SalesSummary/types.d.ts +1 -0
- package/dist/modules/SalesSummary/utils.d.ts +1 -0
- package/dist/modules/SalesSummary/utils.js +21 -1
- package/dist/plugins/request.d.ts +2 -1
- package/dist/plugins/request.js +4 -2
- package/dist/server/index.d.ts +21 -0
- package/dist/server/index.js +1774 -1285
- package/dist/server/modules/order/types.d.ts +50 -0
- package/dist/server/modules/order/types.js +2 -0
- package/dist/server/utils/small-ticket.d.ts +4 -1
- package/dist/server/utils/small-ticket.js +461 -96
- package/dist/solution/BaseSales/index.d.ts +26 -3
- package/dist/solution/BaseSales/index.js +1492 -873
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +2 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +1 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +72 -9
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +8 -3
- package/dist/solution/BookingTicket/index.js +558 -443
- package/dist/solution/BookingTicket/utils/addProductDecision.js +2 -1
- package/dist/solution/BookingTicket/utils/orderCustomer.js +3 -2
- package/dist/solution/RegisterAndLogin/config.d.ts +9 -3
- package/dist/solution/RegisterAndLogin/config.js +95 -40
- package/dist/solution/RegisterAndLogin/index.js +4 -1
- package/dist/solution/Sales/index.d.ts +16 -1
- package/dist/solution/Sales/index.js +338 -63
- package/dist/solution/Sales/types.d.ts +10 -0
- package/dist/solution/ScanOrder/index.d.ts +1 -0
- package/dist/solution/ScanOrder/index.js +31 -27
- package/dist/solution/ScanOrder/utils.d.ts +1 -0
- package/dist/solution/ScanOrder/utils.js +2 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +20 -6
- package/dist/solution/UnifiedBookingSales/index.js +874 -527
- package/dist/solution/UnifiedBookingSales/types.d.ts +21 -2
- package/dist/solution/VenueBooking/index.d.ts +1 -0
- package/dist/solution/VenueBooking/index.js +8 -4
- package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +18 -2
- package/lib/model/strategy/adapter/dataVariant/evaluator.js +137 -6
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +25 -0
- package/lib/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
- package/lib/model/strategy/adapter/itemRule/adapter.js +73 -4
- package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
- package/lib/model/strategy/adapter/itemRule/evaluator.js +23 -1
- package/lib/model/strategy/adapter/itemRule/type.d.ts +44 -0
- package/lib/model/strategy/adapter/itemRule/type.js +19 -1
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +4 -0
- package/lib/modules/Discount/index.d.ts +2 -0
- package/lib/modules/Discount/index.js +34 -2
- package/lib/modules/Discount/types.d.ts +21 -0
- package/lib/modules/OpenData/index.d.ts +15 -2
- package/lib/modules/OpenData/index.js +230 -3
- package/lib/modules/OpenData/types.d.ts +55 -0
- package/lib/modules/OpenData/types.js +9 -1
- package/lib/modules/OpenData/utils.d.ts +21 -1
- package/lib/modules/OpenData/utils.js +126 -0
- package/lib/modules/Order/index.d.ts +50 -7
- package/lib/modules/Order/index.js +704 -64
- package/lib/modules/Order/salesNotes.d.ts +31 -0
- package/lib/modules/Order/salesNotes.js +382 -0
- package/lib/modules/Order/types.d.ts +117 -10
- package/lib/modules/Order/types.js +5 -1
- package/lib/modules/Order/utils/virtualSettlement.d.ts +63 -0
- package/lib/modules/Order/utils/virtualSettlement.js +262 -0
- package/lib/modules/Order/utils.d.ts +5 -1
- package/lib/modules/Order/utils.js +127 -21
- package/lib/modules/Payment/walletpass.js +14 -11
- package/lib/modules/Product/types.d.ts +23 -0
- package/lib/modules/ProductList/index.d.ts +2 -1
- package/lib/modules/ProductList/index.js +47 -2
- package/lib/modules/ProductList/types.d.ts +10 -0
- package/lib/modules/Rules/index.d.ts +5 -0
- package/lib/modules/Rules/index.js +22 -12
- package/lib/modules/SalesSummary/index.d.ts +1 -0
- package/lib/modules/SalesSummary/index.js +4 -2
- package/lib/modules/SalesSummary/types.d.ts +1 -0
- package/lib/modules/SalesSummary/utils.d.ts +1 -0
- package/lib/modules/SalesSummary/utils.js +17 -1
- package/lib/plugins/request.d.ts +2 -1
- package/lib/plugins/request.js +3 -2
- package/lib/server/index.d.ts +21 -0
- package/lib/server/index.js +492 -108
- package/lib/server/modules/order/types.d.ts +50 -0
- package/lib/server/modules/order/types.js +1 -0
- package/lib/server/utils/small-ticket.d.ts +4 -1
- package/lib/server/utils/small-ticket.js +427 -72
- package/lib/solution/BaseSales/index.d.ts +26 -3
- package/lib/solution/BaseSales/index.js +439 -30
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +2 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +1 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +38 -0
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +8 -3
- package/lib/solution/BookingTicket/index.js +60 -15
- package/lib/solution/BookingTicket/utils/addProductDecision.js +1 -0
- package/lib/solution/BookingTicket/utils/orderCustomer.js +2 -1
- package/lib/solution/RegisterAndLogin/config.d.ts +9 -3
- package/lib/solution/RegisterAndLogin/config.js +49 -8
- package/lib/solution/RegisterAndLogin/index.js +4 -1
- package/lib/solution/Sales/index.d.ts +16 -1
- package/lib/solution/Sales/index.js +168 -1
- package/lib/solution/Sales/types.d.ts +10 -0
- package/lib/solution/ScanOrder/index.d.ts +1 -0
- package/lib/solution/ScanOrder/index.js +5 -1
- package/lib/solution/ScanOrder/utils.d.ts +1 -0
- package/lib/solution/ScanOrder/utils.js +1 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +20 -6
- package/lib/solution/UnifiedBookingSales/index.js +169 -16
- package/lib/solution/UnifiedBookingSales/types.d.ts +21 -2
- package/lib/solution/VenueBooking/index.d.ts +1 -0
- package/lib/solution/VenueBooking/index.js +5 -1
- package/package.json +1 -1
|
@@ -29,6 +29,19 @@ import dayjs from 'dayjs';
|
|
|
29
29
|
import { isProductQueryHandledByOsServer, PRODUCT_QUERY_DATA_VARIANT_RELATIONS, resolveClientDataVariants } from "./clientDataVariants";
|
|
30
30
|
import { isCustomerUserPlatform } from "../../utils/platform";
|
|
31
31
|
export * from "./types";
|
|
32
|
+
function normalizeQuerySet(values) {
|
|
33
|
+
if (!Array.isArray(values) || values.length === 0) return null;
|
|
34
|
+
var normalized = values.map(function (value) {
|
|
35
|
+
return String(value !== null && value !== void 0 ? value : '').trim();
|
|
36
|
+
}).filter(Boolean);
|
|
37
|
+
return normalized.length ? new Set(normalized) : null;
|
|
38
|
+
}
|
|
39
|
+
function matchesAny(values, querySet) {
|
|
40
|
+
if (!querySet) return true;
|
|
41
|
+
return values.some(function (value) {
|
|
42
|
+
return querySet.has(String(value !== null && value !== void 0 ? value : '').trim());
|
|
43
|
+
});
|
|
44
|
+
}
|
|
32
45
|
export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
33
46
|
_inherits(ProductList, _BaseModule);
|
|
34
47
|
var _super = _createSuper(ProductList);
|
|
@@ -468,26 +481,93 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
468
481
|
return getProduct;
|
|
469
482
|
}()
|
|
470
483
|
}, {
|
|
471
|
-
key: "
|
|
484
|
+
key: "queryProducts",
|
|
472
485
|
value: function () {
|
|
473
|
-
var
|
|
474
|
-
var
|
|
486
|
+
var _queryProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
487
|
+
var params,
|
|
488
|
+
includeIds,
|
|
489
|
+
excludeIds,
|
|
490
|
+
categoryIds,
|
|
491
|
+
collectionIds,
|
|
492
|
+
extensionTypes,
|
|
493
|
+
statuses,
|
|
494
|
+
channelApplications,
|
|
495
|
+
codeOrBarcode,
|
|
496
|
+
products,
|
|
497
|
+
_args9 = arguments;
|
|
475
498
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
476
499
|
while (1) switch (_context9.prev = _context9.next) {
|
|
477
500
|
case 0:
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
501
|
+
params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
502
|
+
includeIds = normalizeQuerySet(params.includeIds);
|
|
503
|
+
excludeIds = normalizeQuerySet(params.excludeIds);
|
|
504
|
+
categoryIds = normalizeQuerySet(params.categoryIds);
|
|
505
|
+
collectionIds = normalizeQuerySet(params.collectionIds);
|
|
506
|
+
extensionTypes = normalizeQuerySet(params.extensionTypes);
|
|
507
|
+
statuses = normalizeQuerySet(params.statuses);
|
|
508
|
+
channelApplications = normalizeQuerySet(params.channelApplications);
|
|
509
|
+
codeOrBarcode = typeof params.codeOrBarcode === 'string' ? params.codeOrBarcode.trim() : '';
|
|
510
|
+
products = (this.store.list || []).filter(function (product) {
|
|
511
|
+
var _product$id, _product$extension_ty, _product$status;
|
|
512
|
+
var productId = String((_product$id = product.id) !== null && _product$id !== void 0 ? _product$id : '').trim();
|
|
513
|
+
if (includeIds && !includeIds.has(productId)) return false;
|
|
514
|
+
if (excludeIds && excludeIds.has(productId)) return false;
|
|
515
|
+
if (categoryIds) {
|
|
516
|
+
var productCategoryIds = (product.categories || []).flatMap(function (category) {
|
|
517
|
+
var _category$pivot;
|
|
518
|
+
return [category === null || category === void 0 ? void 0 : category.id, category === null || category === void 0 || (_category$pivot = category.pivot) === null || _category$pivot === void 0 ? void 0 : _category$pivot.product_category_id];
|
|
519
|
+
});
|
|
520
|
+
if (!matchesAny(productCategoryIds, categoryIds)) return false;
|
|
521
|
+
}
|
|
522
|
+
if (collectionIds) {
|
|
523
|
+
var productCollectionIds = (product.collection || []).map(function (collection) {
|
|
524
|
+
return collection === null || collection === void 0 ? void 0 : collection.id;
|
|
525
|
+
});
|
|
526
|
+
if (!matchesAny(productCollectionIds, collectionIds)) return false;
|
|
527
|
+
}
|
|
528
|
+
if (extensionTypes && !extensionTypes.has(String((_product$extension_ty = product.extension_type) !== null && _product$extension_ty !== void 0 ? _product$extension_ty : '').trim())) return false;
|
|
529
|
+
if (statuses && !statuses.has(String((_product$status = product.status) !== null && _product$status !== void 0 ? _product$status : '').trim())) return false;
|
|
530
|
+
if (channelApplications) {
|
|
531
|
+
if (!matchesAny(product.channel_application || [], channelApplications)) return false;
|
|
532
|
+
}
|
|
533
|
+
if (codeOrBarcode) {
|
|
534
|
+
var code = typeof product.code === 'string' ? product.code.trim() : '';
|
|
535
|
+
var barcode = typeof product.barcode === 'string' ? product.barcode.trim() : '';
|
|
536
|
+
if (code !== codeOrBarcode && barcode !== codeOrBarcode) return false;
|
|
537
|
+
}
|
|
538
|
+
return true;
|
|
483
539
|
});
|
|
484
|
-
return _context9.abrupt("return", products);
|
|
485
|
-
case
|
|
540
|
+
return _context9.abrupt("return", cloneDeep(products));
|
|
541
|
+
case 11:
|
|
486
542
|
case "end":
|
|
487
543
|
return _context9.stop();
|
|
488
544
|
}
|
|
489
545
|
}, _callee9, this);
|
|
490
546
|
}));
|
|
547
|
+
function queryProducts() {
|
|
548
|
+
return _queryProducts.apply(this, arguments);
|
|
549
|
+
}
|
|
550
|
+
return queryProducts;
|
|
551
|
+
}()
|
|
552
|
+
}, {
|
|
553
|
+
key: "getProductByIds",
|
|
554
|
+
value: function () {
|
|
555
|
+
var _getProductByIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(ids) {
|
|
556
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
557
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
558
|
+
case 0:
|
|
559
|
+
_context10.next = 2;
|
|
560
|
+
return this.core.effects.emit("".concat(this.name, ":onGetProductByIds"), this.store.list);
|
|
561
|
+
case 2:
|
|
562
|
+
return _context10.abrupt("return", this.queryProducts({
|
|
563
|
+
includeIds: ids
|
|
564
|
+
}));
|
|
565
|
+
case 3:
|
|
566
|
+
case "end":
|
|
567
|
+
return _context10.stop();
|
|
568
|
+
}
|
|
569
|
+
}, _callee10, this);
|
|
570
|
+
}));
|
|
491
571
|
function getProductByIds(_x8) {
|
|
492
572
|
return _getProductByIds.apply(this, arguments);
|
|
493
573
|
}
|
|
@@ -496,10 +576,10 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
496
576
|
}, {
|
|
497
577
|
key: "addProduct",
|
|
498
578
|
value: function () {
|
|
499
|
-
var _addProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
579
|
+
var _addProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(products) {
|
|
500
580
|
var _this6 = this;
|
|
501
|
-
return _regeneratorRuntime().wrap(function
|
|
502
|
-
while (1) switch (
|
|
581
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
582
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
503
583
|
case 0:
|
|
504
584
|
// list 需要根据 id 去重
|
|
505
585
|
if (!this.store.list) {
|
|
@@ -522,9 +602,9 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
522
602
|
this.core.effects.emit("".concat(this.name, ":changed"), this.store.list);
|
|
523
603
|
case 4:
|
|
524
604
|
case "end":
|
|
525
|
-
return
|
|
605
|
+
return _context11.stop();
|
|
526
606
|
}
|
|
527
|
-
},
|
|
607
|
+
}, _callee11, this);
|
|
528
608
|
}));
|
|
529
609
|
function addProduct(_x9) {
|
|
530
610
|
return _addProduct.apply(this, arguments);
|
|
@@ -534,16 +614,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
534
614
|
}, {
|
|
535
615
|
key: "selectProducts",
|
|
536
616
|
value: function () {
|
|
537
|
-
var _selectProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
538
|
-
return _regeneratorRuntime().wrap(function
|
|
539
|
-
while (1) switch (
|
|
617
|
+
var _selectProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(products) {
|
|
618
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
619
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
540
620
|
case 0:
|
|
541
621
|
this.store.selectProducts = products;
|
|
542
622
|
case 1:
|
|
543
623
|
case "end":
|
|
544
|
-
return
|
|
624
|
+
return _context12.stop();
|
|
545
625
|
}
|
|
546
|
-
},
|
|
626
|
+
}, _callee12, this);
|
|
547
627
|
}));
|
|
548
628
|
function selectProducts(_x10) {
|
|
549
629
|
return _selectProducts.apply(this, arguments);
|
|
@@ -15,6 +15,16 @@ export interface ProductListLoadProductsParams {
|
|
|
15
15
|
/** 智能定价条件上下文,仅影响策略命中,不参与商品集合筛选 */
|
|
16
16
|
strategy_context?: Record<string, any>;
|
|
17
17
|
}
|
|
18
|
+
export interface ProductListStoreQueryParams {
|
|
19
|
+
includeIds?: Array<number | string>;
|
|
20
|
+
excludeIds?: Array<number | string>;
|
|
21
|
+
categoryIds?: Array<number | string>;
|
|
22
|
+
collectionIds?: Array<number | string>;
|
|
23
|
+
extensionTypes?: string[];
|
|
24
|
+
statuses?: ProductData['status'][];
|
|
25
|
+
channelApplications?: string[];
|
|
26
|
+
codeOrBarcode?: string;
|
|
27
|
+
}
|
|
18
28
|
export interface ProductListData {
|
|
19
29
|
list: ProductData[];
|
|
20
30
|
selectProducts: ProductData[];
|
|
@@ -14,6 +14,11 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
|
|
|
14
14
|
setRulesList(rulesList: Rules[]): Promise<void>;
|
|
15
15
|
getRulesList(): Rules[];
|
|
16
16
|
getWalletPassEvaluator(): import("../..").WalletPassEvaluator | undefined;
|
|
17
|
+
private normalizeHolderRecordIds;
|
|
18
|
+
/**
|
|
19
|
+
* 特定 form Holder 卡只授权给绑定同一 Holder Record 的商品行。
|
|
20
|
+
* required/isNeedHolder 仅控制是否强制选择 Holder,不参与优惠资格。
|
|
21
|
+
*/
|
|
17
22
|
private checkHolderMatch;
|
|
18
23
|
isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, isFormSubject, }: {
|
|
19
24
|
oldDiscountList: Discount[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
var _excluded = ["_original_add_price"],
|
|
2
2
|
_excluded2 = ["_original_price", "_original_add_price"];
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -12,6 +11,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
11
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
12
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
13
|
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; }
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
15
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
16
16
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
17
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -109,24 +109,39 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
109
109
|
var _this$window$getWalle, _this$window;
|
|
110
110
|
return (_this$window$getWalle = (_this$window = this.window).getWalletPassEvaluator) === null || _this$window$getWalle === void 0 ? void 0 : _this$window$getWalle.call(_this$window);
|
|
111
111
|
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "normalizeHolderRecordIds",
|
|
114
|
+
value: function normalizeHolderRecordIds(value) {
|
|
115
|
+
var records = Array.isArray(value) ? value : [value];
|
|
116
|
+
return Array.from(new Set(records.map(function (record) {
|
|
117
|
+
if (record && _typeof(record) === 'object') {
|
|
118
|
+
return record.form_record_id;
|
|
119
|
+
}
|
|
120
|
+
return record;
|
|
121
|
+
}).filter(function (record) {
|
|
122
|
+
return record !== undefined && record !== null && record !== '' && record !== 0 && record !== '0';
|
|
123
|
+
}).map(String)));
|
|
124
|
+
}
|
|
112
125
|
|
|
113
|
-
|
|
126
|
+
/**
|
|
127
|
+
* 特定 form Holder 卡只授权给绑定同一 Holder Record 的商品行。
|
|
128
|
+
* required/isNeedHolder 仅控制是否强制选择 Holder,不参与优惠资格。
|
|
129
|
+
*/
|
|
114
130
|
}, {
|
|
115
131
|
key: "checkHolderMatch",
|
|
116
132
|
value: function checkHolderMatch(discount, product, holders) {
|
|
117
133
|
var _discount$holder;
|
|
118
134
|
// 非表单类型 holder 视为匹配
|
|
119
135
|
if (((_discount$holder = discount.holder) === null || _discount$holder === void 0 ? void 0 : _discount$holder.holder_type) !== 'form') return true;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return (productHolderId || orderHolderId) === discount.holder.holder_id;
|
|
136
|
+
var discountHolderIds = this.normalizeHolderRecordIds(discount.holder.holder_id);
|
|
137
|
+
if (!discountHolderIds.length) return false;
|
|
138
|
+
var productHolderIds = this.normalizeHolderRecordIds(product.holder_id);
|
|
139
|
+
var candidateHolderIds = productHolderIds.length ? productHolderIds : this.normalizeHolderRecordIds(holders);
|
|
140
|
+
if (!candidateHolderIds.length) return false;
|
|
141
|
+
var discountHolderIdSet = new Set(discountHolderIds);
|
|
142
|
+
return candidateHolderIds.some(function (holderId) {
|
|
143
|
+
return discountHolderIdSet.has(holderId);
|
|
144
|
+
});
|
|
130
145
|
}
|
|
131
146
|
|
|
132
147
|
// 判断discountList 是否可以对当前productList生效
|
|
@@ -1369,11 +1384,12 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1369
1384
|
}))]);
|
|
1370
1385
|
}
|
|
1371
1386
|
} else {
|
|
1372
|
-
var _flatItem$bundleItem8, _flatItem$bundleItem9
|
|
1387
|
+
var _flatItem$bundleItem8, _flatItem$bundleItem9, _flatItem$bundleItem$;
|
|
1373
1388
|
// bundle子商品:保存到扁平化Map
|
|
1374
1389
|
processedFlatItemsMap.set(flatItem._id, [_objectSpread(_objectSpread({}, flatItem), {}, {
|
|
1375
1390
|
discount_list: isManualDiscount ? _this4.resolveDiscountListForManualOverride(((_flatItem$bundleItem8 = flatItem.bundleItem) === null || _flatItem$bundleItem8 === void 0 ? void 0 : _flatItem$bundleItem8.discount_list) || []) : _this4.filterDiscountListByType(((_flatItem$bundleItem9 = flatItem.bundleItem) === null || _flatItem$bundleItem9 === void 0 ? void 0 : _flatItem$bundleItem9.discount_list) || [], 'promotion'),
|
|
1376
|
-
price:
|
|
1391
|
+
price: flatItem.bundleItem.price,
|
|
1392
|
+
bundle_selling_price: (_flatItem$bundleItem$ = flatItem.bundleItem.bundle_selling_price) !== null && _flatItem$bundleItem$ !== void 0 ? _flatItem$bundleItem$ : isManualDiscount ? flatItem.bundleItem.price : flatItem.bundleItem.original_price,
|
|
1377
1393
|
processed: true
|
|
1378
1394
|
})]);
|
|
1379
1395
|
}
|
|
@@ -30,6 +30,7 @@ export declare class SalesSummaryModule extends BaseModule implements Module, Sa
|
|
|
30
30
|
taxRate?: number;
|
|
31
31
|
shopDiscount?: string | number;
|
|
32
32
|
channel?: string;
|
|
33
|
+
virtualSettlementMode?: boolean;
|
|
33
34
|
}): Promise<{
|
|
34
35
|
tax_title: string;
|
|
35
36
|
tax_rate: number | undefined;
|
|
@@ -213,11 +213,11 @@ export var SalesSummaryModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
213
213
|
value: function () {
|
|
214
214
|
var _getSummary = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
215
215
|
var _this$otherParams2, _this$store$surcharge, _ref;
|
|
216
|
-
var _params$products, products, isPriceIncludeTax, taxRate, shopDiscount, channel, summaryChannel, taxConfig, fatherModuleName, scheduleModuleName, summarySchedule, needScheduleIds, scheduleList, scheduleById, _iterator, _step, item, summary, summaryWithTaxMeta;
|
|
216
|
+
var _params$products, products, isPriceIncludeTax, taxRate, shopDiscount, channel, _params$virtualSettle, virtualSettlementMode, summaryChannel, taxConfig, fatherModuleName, scheduleModuleName, summarySchedule, needScheduleIds, scheduleList, scheduleById, _iterator, _step, item, summary, summaryWithTaxMeta;
|
|
217
217
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
218
218
|
while (1) switch (_context4.prev = _context4.next) {
|
|
219
219
|
case 0:
|
|
220
|
-
_params$products = params.products, products = _params$products === void 0 ? [] : _params$products, isPriceIncludeTax = params.isPriceIncludeTax, taxRate = params.taxRate, shopDiscount = params.shopDiscount, channel = params.channel;
|
|
220
|
+
_params$products = params.products, products = _params$products === void 0 ? [] : _params$products, isPriceIncludeTax = params.isPriceIncludeTax, taxRate = params.taxRate, shopDiscount = params.shopDiscount, channel = params.channel, _params$virtualSettle = params.virtualSettlementMode, virtualSettlementMode = _params$virtualSettle === void 0 ? false : _params$virtualSettle;
|
|
221
221
|
summaryChannel = channel || this.resolveChannel();
|
|
222
222
|
if (!(summaryChannel !== this.surchargeListChannel)) {
|
|
223
223
|
_context4.next = 5;
|
|
@@ -257,7 +257,8 @@ export var SalesSummaryModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
257
257
|
surchargeList: this.store.surchargeList,
|
|
258
258
|
scheduleById: scheduleById,
|
|
259
259
|
isInScheduleByDate: ScheduleModule.isInScheduleByDate,
|
|
260
|
-
shopDiscount: shopDiscount
|
|
260
|
+
shopDiscount: shopDiscount,
|
|
261
|
+
virtualSettlementMode: virtualSettlementMode
|
|
261
262
|
});
|
|
262
263
|
summaryWithTaxMeta = _objectSpread(_objectSpread({}, summary), {}, {
|
|
263
264
|
tax_title: taxConfig.taxTitle || '',
|
|
@@ -1039,12 +1039,32 @@ export function calculateSalesSummary(params) {
|
|
|
1039
1039
|
_params$scheduleById = params.scheduleById,
|
|
1040
1040
|
scheduleById = _params$scheduleById === void 0 ? {} : _params$scheduleById,
|
|
1041
1041
|
isInScheduleByDate = params.isInScheduleByDate,
|
|
1042
|
-
shopDiscount = params.shopDiscount
|
|
1042
|
+
shopDiscount = params.shopDiscount,
|
|
1043
|
+
_params$virtualSettle = params.virtualSettlementMode,
|
|
1044
|
+
virtualSettlementMode = _params$virtualSettle === void 0 ? false : _params$virtualSettle;
|
|
1043
1045
|
if (!(products !== null && products !== void 0 && products.length)) return createEmptySalesSummary();
|
|
1044
1046
|
var summaryProducts = products.filter(function (product) {
|
|
1045
1047
|
return !isGeneratedVoucherProduct(product);
|
|
1046
1048
|
});
|
|
1047
1049
|
if (!summaryProducts.length) return createEmptySalesSummary();
|
|
1050
|
+
if (virtualSettlementMode) {
|
|
1051
|
+
var _productQuantity = summaryProducts.reduce(function (sum, item) {
|
|
1052
|
+
return sum + getSafeNum(item.num);
|
|
1053
|
+
}, 0);
|
|
1054
|
+
var _productAmount = summaryProducts.reduce(function (sum, item) {
|
|
1055
|
+
return sum.plus(toDecimal(item.selling_price).times(getSafeNum(item.num)));
|
|
1056
|
+
}, new Decimal(0));
|
|
1057
|
+
var amount = toFixed2(_productAmount);
|
|
1058
|
+
return _objectSpread(_objectSpread({}, createEmptySalesSummary()), {}, {
|
|
1059
|
+
product_quantity: _productQuantity,
|
|
1060
|
+
product_original_amount: amount,
|
|
1061
|
+
product_amount: amount,
|
|
1062
|
+
product_expect_amount: amount,
|
|
1063
|
+
expect_amount: amount,
|
|
1064
|
+
total_amount: amount,
|
|
1065
|
+
is_price_include_tax: isPriceIncludeTax
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1048
1068
|
var productQuantity = summaryProducts.reduce(function (sum, item) {
|
|
1049
1069
|
return sum + getSafeNum(item.num);
|
|
1050
1070
|
}, 0);
|
|
@@ -70,6 +70,7 @@ export interface RequestOptions {
|
|
|
70
70
|
cache?: CacheProps;
|
|
71
71
|
cacheUpdateChange?: (data: any) => void;
|
|
72
72
|
osServer?: boolean;
|
|
73
|
+
isNocobase?: boolean;
|
|
73
74
|
prefix?: boolean;
|
|
74
75
|
callback?: (res: any) => void;
|
|
75
76
|
subscriberId?: string;
|
|
@@ -125,7 +126,7 @@ declare class RequestPluginImpl implements RequestPlugin {
|
|
|
125
126
|
/**
|
|
126
127
|
* GET 请求
|
|
127
128
|
*/
|
|
128
|
-
get<T = any>(url: string, options?: RequestOptions): Promise<T>;
|
|
129
|
+
get<T = any>(url: string, dataOrOptions?: any, options?: RequestOptions): Promise<T>;
|
|
129
130
|
/**
|
|
130
131
|
* POST 请求
|
|
131
132
|
*/
|
package/dist/plugins/request.js
CHANGED
|
@@ -147,8 +147,10 @@ var RequestPluginImpl = /*#__PURE__*/function () {
|
|
|
147
147
|
}, {
|
|
148
148
|
key: "get",
|
|
149
149
|
value: function get(url) {
|
|
150
|
-
var
|
|
151
|
-
|
|
150
|
+
var dataOrOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
151
|
+
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
152
|
+
var requestOptions = options !== null && options !== void 0 ? options : dataOrOptions;
|
|
153
|
+
return this.request(_objectSpread(_objectSpread({}, requestOptions), {}, {
|
|
152
154
|
url: url,
|
|
153
155
|
method: 'GET'
|
|
154
156
|
}));
|
package/dist/server/index.d.ts
CHANGED
|
@@ -421,6 +421,7 @@ declare class Server {
|
|
|
421
421
|
private shouldUseLocalOrderQuery;
|
|
422
422
|
/**
|
|
423
423
|
* 预约查询是否走本地:
|
|
424
|
+
* - 日历周/月/资源视图通过 compact_fields 显式标识,始终走远端;
|
|
424
425
|
* - 当 sales_time_between 的开始和结束都不是今天时,走远端;
|
|
425
426
|
* - 其余情况走本地。
|
|
426
427
|
*/
|
|
@@ -514,12 +515,22 @@ declare class Server {
|
|
|
514
515
|
private buildCheckoutTaskIdempotencyKey;
|
|
515
516
|
private isBlankCheckoutValue;
|
|
516
517
|
private isLocalCheckoutOrderId;
|
|
518
|
+
private normalizePrintInvoiceLayoutConfig;
|
|
519
|
+
private extractInvoiceLayoutConfig;
|
|
520
|
+
private normalizePrintInvoiceTemplateSettings;
|
|
521
|
+
private extractInvoiceTemplateSettings;
|
|
517
522
|
private applyCheckoutFulfillmentBuzzer;
|
|
518
523
|
private buildCheckoutResourceIdentifierBuzzer;
|
|
519
524
|
private getCheckoutResourceIdentifier;
|
|
520
525
|
private stringifyCheckoutResourceIdentifier;
|
|
521
526
|
private normalizeCheckoutSubmitData;
|
|
522
527
|
private ensureCheckoutOrderNumbers;
|
|
528
|
+
/**
|
|
529
|
+
* Notes 允许在本地草稿阶段暂存空订单目标;checkout 的统一出口负责用最终
|
|
530
|
+
* shop_order_number 完成绑定并校验,保证后端请求、pending、设备任务和打印
|
|
531
|
+
* 都使用同一份完整快照。
|
|
532
|
+
*/
|
|
533
|
+
private finalizeCheckoutSalesNotes;
|
|
523
534
|
private dispatchCheckoutSyncTask;
|
|
524
535
|
private dispatchPrintOtherReceiptTask;
|
|
525
536
|
private buildPrintOtherReceiptIdempotencyKey;
|
|
@@ -527,7 +538,10 @@ declare class Server {
|
|
|
527
538
|
private dispatchLocalReceiptPrint;
|
|
528
539
|
private shouldLookupLocalPrintOrder;
|
|
529
540
|
private getLocalPrintOrderLookup;
|
|
541
|
+
private mergeLocalPrintOrderInput;
|
|
530
542
|
private handleLocalPrintOrder;
|
|
543
|
+
private normalizeRequestedReceiptLocales;
|
|
544
|
+
private handleLocalOrderReceiptSnapshot;
|
|
531
545
|
private handleMachinecodeBatchMeta;
|
|
532
546
|
private resolveMachinecodeBatchMetadataLookup;
|
|
533
547
|
private syncMachinecodeRedeemStatusToLocalOrder;
|
|
@@ -536,6 +550,11 @@ declare class Server {
|
|
|
536
550
|
private handleOrderDraftSubmit;
|
|
537
551
|
private handlePendingSyncCheckoutOrder;
|
|
538
552
|
private buildPendingSyncCheckoutOrder;
|
|
553
|
+
/**
|
|
554
|
+
* Checkout 与本地小票必须消费同一份规范化子项快照。
|
|
555
|
+
* 商品/预约只折叠持久化 ID 或协议 UID 相同的行;支付额外兼容 payment_number。
|
|
556
|
+
*/
|
|
557
|
+
private normalizeCheckoutCollections;
|
|
539
558
|
/**
|
|
540
559
|
* Android 结账自动小票由当前设备设置控制;其它平台保持原有行为。
|
|
541
560
|
*/
|
|
@@ -565,6 +584,8 @@ declare class Server {
|
|
|
565
584
|
private shouldLookupPaymentMethodNameByCode;
|
|
566
585
|
private enrichPaymentNamesByCode;
|
|
567
586
|
private withLocalSmallTicketData;
|
|
587
|
+
private normalizeRemoteSalesOrderErrorCode;
|
|
588
|
+
private fetchAndPersistSalesOrderByLookup;
|
|
568
589
|
private handleOrderSalesDetail;
|
|
569
590
|
/**
|
|
570
591
|
* 解析 order_ids 入参,兼容 url query / data 字段、字符串(csv) / 数组两种形态。
|