@pisell/pisellos 2.3.220 → 2.3.222
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/modules/OpenData/index.d.ts +8 -1
- package/dist/modules/OpenData/index.js +276 -95
- package/dist/modules/Order/index.d.ts +1 -1
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +850 -591
- package/dist/server/modules/order/index.d.ts +1 -0
- package/dist/server/modules/order/index.js +51 -51
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/redeemArrival.d.ts +11 -11
- package/dist/solution/Sales/index.d.ts +2 -5
- package/dist/solution/Sales/index.js +117 -143
- package/dist/solution/Sales/types.d.ts +6 -0
- package/dist/solution/Sales/types.js +2 -0
- package/lib/modules/OpenData/index.d.ts +8 -1
- package/lib/modules/OpenData/index.js +123 -21
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/server/index.d.ts +3 -0
- package/lib/server/index.js +154 -17
- package/lib/server/modules/order/index.d.ts +1 -0
- package/lib/server/modules/order/index.js +4 -3
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/redeemArrival.d.ts +11 -11
- package/lib/solution/Sales/index.d.ts +2 -5
- package/lib/solution/Sales/index.js +32 -66
- package/lib/solution/Sales/types.d.ts +6 -0
- package/lib/solution/Sales/types.js +1 -0
- package/package.json +1 -1
|
@@ -109,6 +109,7 @@ export declare class OrderModule extends BaseModule implements Module {
|
|
|
109
109
|
getLocalOrderForPaymentReadiness(lookup: OrderId): Promise<OrderData | null>;
|
|
110
110
|
getLocalOrderByLookup(lookup: OrderId, options?: {
|
|
111
111
|
operationId?: string;
|
|
112
|
+
exactOrderId?: boolean;
|
|
112
113
|
}): Promise<OrderData | null>;
|
|
113
114
|
getLocalPayment(params: {
|
|
114
115
|
saleId: OrderId;
|
|
@@ -980,6 +980,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
980
980
|
var _this5 = this;
|
|
981
981
|
var options,
|
|
982
982
|
key,
|
|
983
|
+
matches,
|
|
983
984
|
logContext,
|
|
984
985
|
memoryOrderById,
|
|
985
986
|
memoryOrder,
|
|
@@ -992,6 +993,9 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
992
993
|
case 0:
|
|
993
994
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
994
995
|
key = this.getIdKey(lookup);
|
|
996
|
+
matches = function matches(order) {
|
|
997
|
+
return options.exactOrderId ? order.order_id != null && _this5.getIdKey(order.order_id) === key : _this5.isOrderLookupMatch(order, key);
|
|
998
|
+
};
|
|
995
999
|
logContext = {
|
|
996
1000
|
operation_id: options.operationId,
|
|
997
1001
|
lookup: key,
|
|
@@ -1001,39 +1005,35 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1001
1005
|
this.logInfo('getLocalOrderByLookup-localPayment-开始', logContext);
|
|
1002
1006
|
}
|
|
1003
1007
|
memoryOrderById = this.store.map.get(key);
|
|
1004
|
-
if (!memoryOrderById) {
|
|
1005
|
-
_context6.next =
|
|
1008
|
+
if (!(memoryOrderById && (!options.exactOrderId || matches(memoryOrderById)))) {
|
|
1009
|
+
_context6.next = 9;
|
|
1006
1010
|
break;
|
|
1007
1011
|
}
|
|
1008
1012
|
if (options.operationId) {
|
|
1009
1013
|
this.logInfo('getLocalOrderByLookup-localPayment-命中内存映射', _objectSpread(_objectSpread({}, logContext), this.buildLocalPaymentOrderLogContext(memoryOrderById)));
|
|
1010
1014
|
}
|
|
1011
1015
|
return _context6.abrupt("return", memoryOrderById);
|
|
1012
|
-
case
|
|
1013
|
-
memoryOrder = this.store.list.find(
|
|
1014
|
-
return _this5.isOrderLookupMatch(order, key);
|
|
1015
|
-
});
|
|
1016
|
+
case 9:
|
|
1017
|
+
memoryOrder = this.store.list.find(matches);
|
|
1016
1018
|
if (!memoryOrder) {
|
|
1017
|
-
_context6.next =
|
|
1019
|
+
_context6.next = 13;
|
|
1018
1020
|
break;
|
|
1019
1021
|
}
|
|
1020
1022
|
if (options.operationId) {
|
|
1021
1023
|
this.logInfo('getLocalOrderByLookup-localPayment-命中内存列表', _objectSpread(_objectSpread({}, logContext), this.buildLocalPaymentOrderLogContext(memoryOrder)));
|
|
1022
1024
|
}
|
|
1023
1025
|
return _context6.abrupt("return", memoryOrder);
|
|
1024
|
-
case
|
|
1026
|
+
case 13:
|
|
1025
1027
|
if (options.operationId) {
|
|
1026
1028
|
this.logInfo('getLocalOrderByLookup-localPayment-开始读取SQLite', logContext);
|
|
1027
1029
|
}
|
|
1028
|
-
_context6.next =
|
|
1030
|
+
_context6.next = 16;
|
|
1029
1031
|
return this.loadOrdersFromSQLite();
|
|
1030
|
-
case
|
|
1032
|
+
case 16:
|
|
1031
1033
|
orders = _context6.sent;
|
|
1032
|
-
localOrder = orders.find(
|
|
1033
|
-
return _this5.isOrderLookupMatch(order, key);
|
|
1034
|
-
});
|
|
1034
|
+
localOrder = orders.find(matches);
|
|
1035
1035
|
if (localOrder) {
|
|
1036
|
-
_context6.next =
|
|
1036
|
+
_context6.next = 21;
|
|
1037
1037
|
break;
|
|
1038
1038
|
}
|
|
1039
1039
|
if (options.operationId) {
|
|
@@ -1042,7 +1042,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1042
1042
|
}));
|
|
1043
1043
|
}
|
|
1044
1044
|
return _context6.abrupt("return", null);
|
|
1045
|
-
case
|
|
1045
|
+
case 21:
|
|
1046
1046
|
this.store.list = this.normalizeOrdersForMemoryList(orders, 'getLocalOrderByLookup.sqliteMemory');
|
|
1047
1047
|
this.syncOrdersMap();
|
|
1048
1048
|
normalizedOrder = this.normalizeOrderForMemoryList(localOrder);
|
|
@@ -1052,7 +1052,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1052
1052
|
}, this.buildLocalPaymentOrderLogContext(normalizedOrder)));
|
|
1053
1053
|
}
|
|
1054
1054
|
return _context6.abrupt("return", normalizedOrder);
|
|
1055
|
-
case
|
|
1055
|
+
case 26:
|
|
1056
1056
|
case "end":
|
|
1057
1057
|
return _context6.stop();
|
|
1058
1058
|
}
|
|
@@ -1913,7 +1913,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1913
1913
|
index,
|
|
1914
1914
|
_iterator8,
|
|
1915
1915
|
_step8,
|
|
1916
|
-
|
|
1916
|
+
_key,
|
|
1917
1917
|
_iterator9,
|
|
1918
1918
|
_step9,
|
|
1919
1919
|
_step9$value,
|
|
@@ -2007,9 +2007,9 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2007
2007
|
_iterator8 = _createForOfIteratorHelper(this.getOrderIdentityMatchKeys(updatedList[index]));
|
|
2008
2008
|
try {
|
|
2009
2009
|
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
2010
|
-
|
|
2010
|
+
_key = _step8.value;
|
|
2011
2011
|
// 同一 key 命中多张时保留最靠前的下标,与原 findIndex「取首个匹配」一致
|
|
2012
|
-
if (!identityKeyToIndex.has(
|
|
2012
|
+
if (!identityKeyToIndex.has(_key)) identityKeyToIndex.set(_key, index);
|
|
2013
2013
|
}
|
|
2014
2014
|
} catch (err) {
|
|
2015
2015
|
_iterator8.e(err);
|
|
@@ -2121,7 +2121,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2121
2121
|
value: (function () {
|
|
2122
2122
|
var _upsertLocalDraftOrders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(draftOrders) {
|
|
2123
2123
|
var _this12 = this;
|
|
2124
|
-
var draftMap, memoryDraftMap, _iterator10, _step10, order, draftOrder, storageKey, memoryDraftOrder, storageKeyMigrations, mergeActions, updatedList, previousStorageKeys, identityKeyToIndex, index, _iterator11, _step11,
|
|
2124
|
+
var draftMap, memoryDraftMap, _iterator10, _step10, order, draftOrder, storageKey, memoryDraftOrder, storageKeyMigrations, mergeActions, updatedList, previousStorageKeys, identityKeyToIndex, index, _iterator11, _step11, _key2, _iterator12, _step12, _step12$value, _storageKey2, _draftOrder, matchIndex, existingOrder, previousStorageKey, reconciledDraftOrder, mergedOrder, nextOrder, _nextOrder$order_id3, insertIndex, patchedOrders, previousList, removedLegacyMemoryDraft;
|
|
2125
2125
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
2126
2126
|
while (1) switch (_context18.prev = _context18.next) {
|
|
2127
2127
|
case 0:
|
|
@@ -2201,8 +2201,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2201
2201
|
_iterator11 = _createForOfIteratorHelper(this.getOrderIdentityMatchKeys(updatedList[index]));
|
|
2202
2202
|
try {
|
|
2203
2203
|
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
2204
|
-
|
|
2205
|
-
if (!identityKeyToIndex.has(
|
|
2204
|
+
_key2 = _step11.value;
|
|
2205
|
+
if (!identityKeyToIndex.has(_key2)) identityKeyToIndex.set(_key2, index);
|
|
2206
2206
|
}
|
|
2207
2207
|
} catch (err) {
|
|
2208
2208
|
_iterator11.e(err);
|
|
@@ -2824,7 +2824,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2824
2824
|
value: (function () {
|
|
2825
2825
|
var _mergeOrdersToStore = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(freshOrders, source) {
|
|
2826
2826
|
var _this18 = this;
|
|
2827
|
-
var storeOrderCountBefore, normalizedFreshOrders, incomingProductsHaveStableIdentity, _iterator15, _step15, order, id, rawProducts, _incomingProductsHave, allProductsHaveStableIdentity, orderIdKey, uniqueFreshOrders, uniqueFreshCount, patchedOrders, remoteProductMembershipChanges, forceWriteStorageKeys, storageKeyMigrations, mergeActions, existingProductsHaveStableIdentity, updatedList, identityKeyToIndex, index, identityKeys, _iterator16, _step16,
|
|
2827
|
+
var storeOrderCountBefore, normalizedFreshOrders, incomingProductsHaveStableIdentity, _iterator15, _step15, order, id, rawProducts, _incomingProductsHave, allProductsHaveStableIdentity, orderIdKey, uniqueFreshOrders, uniqueFreshCount, patchedOrders, remoteProductMembershipChanges, forceWriteStorageKeys, storageKeyMigrations, mergeActions, existingProductsHaveStableIdentity, updatedList, identityKeyToIndex, index, identityKeys, _iterator16, _step16, _key3, _iterator17, _step17, fresh, freshIdentityKeys, matchIndex, storageKey, mergeKey, existingOrder, previousStorageKey, _ref, _existingOrder$order_, _ref2, _external_sale_number2, _existingOrder$paymen, _fresh$payment_status, _existingOrder$need_s, _fresh$need_sync, _ref3, _existingOrder$order_2, _ref4, _external_sale_number3, _existingOrder$is_dra, _fresh$is_draft_order, mergedOrder, freshOrderId, incomingProductsAreStable, membershipChange, mergedProductsHaveStableIdentity, adjustedMatchIndex, duplicateIndexes, _iterator18, _step18, _key5, _duplicateIndex, _iterator19, _step19, duplicateIndex, _index, _iterator20, _step20, _key4, nextStorageKey, _ref5, _ref6, _mergedOrder$order_id, mergedStorageKey, insertIndex, insertCount, updateCount;
|
|
2828
2828
|
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
2829
2829
|
while (1) switch (_context23.prev = _context23.next) {
|
|
2830
2830
|
case 0:
|
|
@@ -2897,9 +2897,9 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2897
2897
|
_iterator16 = _createForOfIteratorHelper(identityKeys);
|
|
2898
2898
|
try {
|
|
2899
2899
|
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
2900
|
-
|
|
2900
|
+
_key3 = _step16.value;
|
|
2901
2901
|
// 同一 key 命中多张时保留最靠前的下标,与原 findIndex「取首个匹配」一致
|
|
2902
|
-
if (!identityKeyToIndex.has(
|
|
2902
|
+
if (!identityKeyToIndex.has(_key3)) identityKeyToIndex.set(_key3, index);
|
|
2903
2903
|
}
|
|
2904
2904
|
} catch (err) {
|
|
2905
2905
|
_iterator16.e(err);
|
|
@@ -2974,8 +2974,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
2974
2974
|
_context23.next = 74;
|
|
2975
2975
|
break;
|
|
2976
2976
|
}
|
|
2977
|
-
|
|
2978
|
-
_duplicateIndex = identityKeyToIndex.get(
|
|
2977
|
+
_key5 = _step18.value;
|
|
2978
|
+
_duplicateIndex = identityKeyToIndex.get(_key5);
|
|
2979
2979
|
if (!(_duplicateIndex === undefined || _duplicateIndex === matchIndex)) {
|
|
2980
2980
|
_context23.next = 71;
|
|
2981
2981
|
break;
|
|
@@ -3021,8 +3021,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3021
3021
|
_iterator20 = _createForOfIteratorHelper(this.getOrderIdentityMatchKeys(updatedList[_index]));
|
|
3022
3022
|
try {
|
|
3023
3023
|
for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
|
|
3024
|
-
|
|
3025
|
-
if (!identityKeyToIndex.has(
|
|
3024
|
+
_key4 = _step20.value;
|
|
3025
|
+
if (!identityKeyToIndex.has(_key4)) identityKeyToIndex.set(_key4, _index);
|
|
3026
3026
|
}
|
|
3027
3027
|
} catch (err) {
|
|
3028
3028
|
_iterator20.e(err);
|
|
@@ -3135,8 +3135,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3135
3135
|
_step21;
|
|
3136
3136
|
try {
|
|
3137
3137
|
for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
|
|
3138
|
-
var
|
|
3139
|
-
var index = identityKeyToIndex.get(
|
|
3138
|
+
var _key6 = _step21.value;
|
|
3139
|
+
var index = identityKeyToIndex.get(_key6);
|
|
3140
3140
|
if (index === undefined) continue;
|
|
3141
3141
|
if (matchIndex < 0 || index < matchIndex) matchIndex = index;
|
|
3142
3142
|
}
|
|
@@ -3259,8 +3259,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3259
3259
|
_step23;
|
|
3260
3260
|
try {
|
|
3261
3261
|
for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
|
|
3262
|
-
var
|
|
3263
|
-
identityKeyToIndex.set(
|
|
3262
|
+
var _key7 = _step23.value;
|
|
3263
|
+
identityKeyToIndex.set(_key7, index);
|
|
3264
3264
|
}
|
|
3265
3265
|
} catch (err) {
|
|
3266
3266
|
_iterator23.e(err);
|
|
@@ -3490,8 +3490,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3490
3490
|
_step27;
|
|
3491
3491
|
try {
|
|
3492
3492
|
for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
|
|
3493
|
-
var
|
|
3494
|
-
seenKeys.add(
|
|
3493
|
+
var _key8 = _step27.value;
|
|
3494
|
+
seenKeys.add(_key8);
|
|
3495
3495
|
}
|
|
3496
3496
|
} catch (err) {
|
|
3497
3497
|
_iterator27.e(err);
|
|
@@ -3518,8 +3518,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3518
3518
|
_step28;
|
|
3519
3519
|
try {
|
|
3520
3520
|
for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
|
|
3521
|
-
var
|
|
3522
|
-
seenKeys.add(
|
|
3521
|
+
var _key9 = _step28.value;
|
|
3522
|
+
seenKeys.add(_key9);
|
|
3523
3523
|
}
|
|
3524
3524
|
} catch (err) {
|
|
3525
3525
|
_iterator28.e(err);
|
|
@@ -3600,8 +3600,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3600
3600
|
_step30;
|
|
3601
3601
|
try {
|
|
3602
3602
|
for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
|
|
3603
|
-
var
|
|
3604
|
-
existingByIdentity.set(
|
|
3603
|
+
var _key10 = _step30.value;
|
|
3604
|
+
existingByIdentity.set(_key10, order);
|
|
3605
3605
|
}
|
|
3606
3606
|
} catch (err) {
|
|
3607
3607
|
_iterator30.e(err);
|
|
@@ -3715,10 +3715,10 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3715
3715
|
_step32;
|
|
3716
3716
|
try {
|
|
3717
3717
|
for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
|
|
3718
|
-
var
|
|
3719
|
-
var group = groups.get(
|
|
3718
|
+
var _key11 = _step32.value;
|
|
3719
|
+
var group = groups.get(_key11) || [];
|
|
3720
3720
|
group.push(order);
|
|
3721
|
-
groups.set(
|
|
3721
|
+
groups.set(_key11, group);
|
|
3722
3722
|
}
|
|
3723
3723
|
} catch (err) {
|
|
3724
3724
|
_iterator32.e(err);
|
|
@@ -3947,7 +3947,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3947
3947
|
_context25.next = 9;
|
|
3948
3948
|
return this.runInOrderSQLiteSaveQueue( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
3949
3949
|
var _options$onTiming;
|
|
3950
|
-
var rawReadStartedAt, orders, sqliteRawReadMs, normalizeStartedAt, _this24$deduplicateSt, list, repairs, obsoleteKeys, sqliteNormalizeMs, _iterator34, _step34,
|
|
3950
|
+
var rawReadStartedAt, orders, sqliteRawReadMs, normalizeStartedAt, _this24$deduplicateSt, list, repairs, obsoleteKeys, sqliteNormalizeMs, _iterator34, _step34, _key12;
|
|
3951
3951
|
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
3952
3952
|
while (1) switch (_context24.prev = _context24.next) {
|
|
3953
3953
|
case 0:
|
|
@@ -3978,11 +3978,11 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
3978
3978
|
_context24.next = 24;
|
|
3979
3979
|
break;
|
|
3980
3980
|
}
|
|
3981
|
-
|
|
3981
|
+
_key12 = _step34.value;
|
|
3982
3982
|
_context24.next = 21;
|
|
3983
|
-
return _this24.dbManager.delete(INDEXDB_STORE_NAME,
|
|
3983
|
+
return _this24.dbManager.delete(INDEXDB_STORE_NAME, _key12);
|
|
3984
3984
|
case 21:
|
|
3985
|
-
_this24.recentSqliteWriteByStorageKey.delete(
|
|
3985
|
+
_this24.recentSqliteWriteByStorageKey.delete(_key12);
|
|
3986
3986
|
case 22:
|
|
3987
3987
|
_context24.next = 17;
|
|
3988
3988
|
break;
|
|
@@ -4073,9 +4073,9 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4073
4073
|
var id = this.getRealOrderId(order);
|
|
4074
4074
|
var external = order.external_sale_number;
|
|
4075
4075
|
if (!id || this.isBlankIdentityValue(external)) continue;
|
|
4076
|
-
var
|
|
4077
|
-
var previous = idsByExternal.get(
|
|
4078
|
-
idsByExternal.set(
|
|
4076
|
+
var _key13 = String(external);
|
|
4077
|
+
var previous = idsByExternal.get(_key13);
|
|
4078
|
+
idsByExternal.set(_key13, previous === undefined || previous === id ? id : null);
|
|
4079
4079
|
}
|
|
4080
4080
|
} catch (err) {
|
|
4081
4081
|
_iterator35.e(err);
|
|
@@ -4119,8 +4119,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
4119
4119
|
try {
|
|
4120
4120
|
for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {
|
|
4121
4121
|
var _order2 = _step37.value.order;
|
|
4122
|
-
var
|
|
4123
|
-
canonicalKeyCounts.set(
|
|
4122
|
+
var _key14 = this.getOrderStorageKey(_order2);
|
|
4123
|
+
canonicalKeyCounts.set(_key14, (canonicalKeyCounts.get(_key14) || 0) + 1);
|
|
4124
4124
|
}
|
|
4125
4125
|
} catch (err) {
|
|
4126
4126
|
_iterator37.e(err);
|
|
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
342
342
|
date: string;
|
|
343
343
|
status: string;
|
|
344
344
|
week: string;
|
|
345
|
-
weekNum: 0 |
|
|
345
|
+
weekNum: 0 | 5 | 1 | 2 | 4 | 3 | 6;
|
|
346
346
|
}[]>;
|
|
347
347
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
348
348
|
private getScheduleDataByIds;
|
|
@@ -373,7 +373,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
373
373
|
* 获取当前的客户搜索条件
|
|
374
374
|
* @returns 当前搜索条件
|
|
375
375
|
*/
|
|
376
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
376
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
377
377
|
/**
|
|
378
378
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
379
379
|
* @returns 客户状态
|
|
@@ -25,21 +25,19 @@ export declare function buildArrivalCheckoutQuery(order: OrderTempOrder, summary
|
|
|
25
25
|
notes?: import("../../../modules/Order/types").SalesNote[] | undefined;
|
|
26
26
|
summary?: import("../../../modules/Order/types").OrderSummary | undefined;
|
|
27
27
|
small_ticket_data_flag?: number | undefined;
|
|
28
|
-
|
|
29
|
-
metadata: Record<string, any>;
|
|
30
|
-
note: string;
|
|
31
|
-
order_id: number | null;
|
|
28
|
+
bookings: any[];
|
|
32
29
|
external_sale_number: string;
|
|
30
|
+
payments: any[];
|
|
31
|
+
customer_id: number | null;
|
|
32
|
+
order_id: number | null;
|
|
33
33
|
order_number: string | null;
|
|
34
34
|
shop_order_number: string | null;
|
|
35
|
-
shop_full_order_number: string | null;
|
|
36
35
|
type: string;
|
|
37
36
|
business_code?: string | undefined;
|
|
38
37
|
sales_channel: string;
|
|
39
38
|
order_sales_channel: string;
|
|
40
39
|
status: string;
|
|
41
40
|
shipping_status: string;
|
|
42
|
-
customer_id: number | null;
|
|
43
41
|
customer_name: string;
|
|
44
42
|
country_calling_code: string;
|
|
45
43
|
phone: string;
|
|
@@ -54,19 +52,21 @@ export declare function buildArrivalCheckoutQuery(order: OrderTempOrder, summary
|
|
|
54
52
|
deposit_amount: string;
|
|
55
53
|
shop_discount: string;
|
|
56
54
|
surcharge_fee: string;
|
|
57
|
-
|
|
58
|
-
delivery_type?: string | undefined;
|
|
59
|
-
table_number?: Record<string, any> | undefined;
|
|
55
|
+
note: string;
|
|
60
56
|
schedule_date: string;
|
|
61
|
-
bookings: any[];
|
|
62
|
-
payments: any[];
|
|
63
57
|
refunds?: any[] | undefined;
|
|
64
58
|
surcharges: any[];
|
|
65
59
|
relation_forms: any[];
|
|
66
60
|
contacts: any[];
|
|
67
61
|
contacts_info: Record<string, any> | null;
|
|
68
62
|
holder: Record<string, any> | null;
|
|
63
|
+
holder_relations?: import("../../../modules/Order/types").OrderHolderRelation[] | undefined;
|
|
69
64
|
order_meta_list?: import("../../../modules/Order/types").OrderMetaList | undefined;
|
|
65
|
+
metadata: Record<string, any>;
|
|
66
|
+
buzzer?: string | undefined;
|
|
67
|
+
shop_full_order_number: string | null;
|
|
68
|
+
delivery_type?: string | undefined;
|
|
69
|
+
table_number?: Record<string, any> | undefined;
|
|
70
70
|
};
|
|
71
71
|
export declare function describeChangedBookings(before: OrderTempOrder['bookings'], after: OrderTempOrder['bookings']): {
|
|
72
72
|
schedule_event_id: any;
|
|
@@ -2,7 +2,7 @@ import dayjs from 'dayjs';
|
|
|
2
2
|
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
3
3
|
import { BaseModule } from '../../modules/BaseModule';
|
|
4
4
|
import type { RequestPlugin } from '../../plugins/request';
|
|
5
|
-
import { SalesState, SalesModuleAPI, Reservation, SalesResourceBookingItem, SalesResourceBookingItemWithGroups, SalesTimelineHighlights, ChangeBookingStatusParams, GetResourceBookingItemParams, SalesPrintLocalOrderReceiptOptions } from './types';
|
|
5
|
+
import { SalesState, SalesModuleAPI, Reservation, SalesResourceBookingItem, SalesResourceBookingItemWithGroups, SalesTimelineHighlights, ChangeBookingStatusParams, GetResourceBookingItemParams, SalesPrintLocalOrderReceiptOptions, CloudOrderInvoiceRequest } from './types';
|
|
6
6
|
import type { BookingData } from '../../server/modules/order/types';
|
|
7
7
|
export * from './types';
|
|
8
8
|
/**
|
|
@@ -27,9 +27,6 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
27
27
|
protected request: RequestPlugin;
|
|
28
28
|
private logger;
|
|
29
29
|
private invoiceOpenDataModule;
|
|
30
|
-
private invoiceOpenDataTarget;
|
|
31
|
-
private invoiceOpenDataInFlight;
|
|
32
|
-
private invoiceOpenDataInFlightTarget;
|
|
33
30
|
constructor(name?: string, version?: string);
|
|
34
31
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
35
32
|
/** 获取当前 store 快照 */
|
|
@@ -51,10 +48,10 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
51
48
|
* Legacy Sales 的系统上下文没有可打印的 system target,因此统一回退 pos。
|
|
52
49
|
*/
|
|
53
50
|
private getInvoiceSalesChannel;
|
|
54
|
-
private loadInvoiceOpenData;
|
|
55
51
|
private logInvoiceOpenDataFallback;
|
|
56
52
|
private resolveInvoiceConfigs;
|
|
57
53
|
printLocalOrderReceipt<T = any>(lookup: string | number, options: SalesPrintLocalOrderReceiptOptions): Promise<T>;
|
|
54
|
+
printCloudOrderInvoice(input: CloudOrderInvoiceRequest): Promise<void>;
|
|
58
55
|
/** 清除独立 Documents 缓存;下一次打印会按当前 target 重新获取。 */
|
|
59
56
|
clearOpenDataCache(): void;
|
|
60
57
|
destroy(): Promise<void>;
|