@pisell/pisellos 2.3.122 → 2.3.124
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/walletPass/evaluator.d.ts +2 -0
- package/dist/model/strategy/adapter/walletPass/evaluator.js +4 -2
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +58 -19
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +24 -12
- package/dist/modules/Customer/index.js +6 -3
- package/dist/modules/Customer/types.d.ts +2 -0
- package/dist/modules/Discount/availability.d.ts +7 -0
- package/dist/modules/Discount/availability.js +49 -0
- package/dist/modules/Discount/entitlementPass.d.ts +34 -0
- package/dist/modules/Discount/entitlementPass.js +147 -0
- package/dist/modules/Discount/index.d.ts +2 -2
- package/dist/modules/Discount/index.js +37 -151
- package/dist/modules/Discount/types.d.ts +36 -5
- package/dist/modules/Order/index.d.ts +6 -0
- package/dist/modules/Order/index.js +437 -229
- package/dist/modules/Order/types.d.ts +1 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.js +16 -12
- package/dist/modules/Order/utils.d.ts +1 -1
- package/dist/modules/Order/utils.js +105 -60
- package/dist/modules/Payment/types.d.ts +21 -1
- package/dist/modules/Payment/types.js +2 -0
- package/dist/modules/Payment/walletpass.d.ts +1 -1
- package/dist/modules/Payment/walletpass.js +80 -47
- package/dist/modules/Rules/index.d.ts +2 -2
- package/dist/modules/Rules/index.js +480 -186
- package/dist/modules/Rules/types.d.ts +4 -0
- package/dist/server/modules/order/types.d.ts +3 -0
- package/dist/server/utils/small-ticket.js +25 -15
- package/dist/solution/BaseSales/index.d.ts +1 -0
- package/dist/solution/BaseSales/index.js +5 -2
- package/dist/solution/BaseSales/types.d.ts +2 -2
- package/dist/solution/BaseSales/utils/cartPromotion.js +141 -126
- package/dist/solution/BookingTicket/index.d.ts +1 -2
- package/dist/solution/BookingTicket/index.js +60 -63
- package/dist/solution/BookingTicket/types.d.ts +5 -1
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +2 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +338 -147
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +8 -4
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +6 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +19 -6
- package/dist/solution/ShopDiscount/index.d.ts +2 -0
- package/dist/solution/ShopDiscount/index.js +99 -42
- package/dist/solution/ShopDiscount/utils.d.ts +4 -2
- package/dist/solution/ShopDiscount/utils.js +43 -23
- package/dist/solution/UnifiedBookingSales/index.js +2 -2
- package/lib/model/strategy/adapter/promotion/index.js +46 -1
- package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
- package/lib/model/strategy/adapter/walletPass/evaluator.js +2 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +35 -6
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +13 -6
- package/lib/modules/Customer/index.js +5 -1
- package/lib/modules/Customer/types.d.ts +2 -0
- package/lib/modules/Discount/availability.d.ts +7 -0
- package/lib/modules/Discount/availability.js +43 -0
- package/lib/modules/Discount/entitlementPass.d.ts +34 -0
- package/lib/modules/Discount/entitlementPass.js +141 -0
- package/lib/modules/Discount/index.d.ts +2 -2
- package/lib/modules/Discount/index.js +23 -129
- package/lib/modules/Discount/types.d.ts +36 -5
- package/lib/modules/Order/index.d.ts +6 -0
- package/lib/modules/Order/index.js +213 -40
- package/lib/modules/Order/types.d.ts +1 -0
- package/lib/modules/Order/utils/orderCollectionIdentity.js +14 -11
- package/lib/modules/Order/utils.d.ts +1 -1
- package/lib/modules/Order/utils.js +43 -3
- package/lib/modules/Payment/types.d.ts +21 -1
- package/lib/modules/Payment/types.js +1 -0
- package/lib/modules/Payment/walletpass.d.ts +1 -1
- package/lib/modules/Payment/walletpass.js +29 -9
- package/lib/modules/Rules/index.d.ts +2 -2
- package/lib/modules/Rules/index.js +357 -110
- package/lib/modules/Rules/types.d.ts +4 -0
- package/lib/server/modules/order/types.d.ts +3 -0
- package/lib/server/utils/small-ticket.js +25 -14
- package/lib/solution/BaseSales/index.d.ts +1 -0
- package/lib/solution/BaseSales/index.js +5 -2
- package/lib/solution/BaseSales/types.d.ts +2 -2
- package/lib/solution/BaseSales/utils/cartPromotion.js +12 -4
- package/lib/solution/BookingTicket/index.d.ts +1 -2
- package/lib/solution/BookingTicket/index.js +36 -33
- package/lib/solution/BookingTicket/types.d.ts +5 -1
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +2 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +174 -42
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +8 -4
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +6 -0
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +11 -3
- package/lib/solution/ShopDiscount/index.d.ts +2 -0
- package/lib/solution/ShopDiscount/index.js +55 -9
- package/lib/solution/ShopDiscount/utils.d.ts +4 -2
- package/lib/solution/ShopDiscount/utils.js +42 -25
- package/lib/solution/UnifiedBookingSales/index.js +2 -2
- package/package.json +1 -1
|
@@ -933,7 +933,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
933
933
|
* 搜索识别码信息
|
|
934
934
|
* 通过识别码搜索相关的钱包通行证信息
|
|
935
935
|
* 基于 WalletDeductionRecommendParams 参数结构
|
|
936
|
-
*
|
|
936
|
+
* 特殊逻辑:WL 或指定 200 格式的 Wallet Code 调用 /wallet/detail/search 接口。
|
|
937
937
|
*/
|
|
938
938
|
}, {
|
|
939
939
|
key: "searchIdentificationCodeAsync",
|
|
@@ -957,7 +957,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
957
957
|
isWalletCode,
|
|
958
958
|
walletDetailParams,
|
|
959
959
|
_response,
|
|
960
|
-
|
|
960
|
+
walletDetail,
|
|
961
961
|
baseWalletParams,
|
|
962
962
|
searchParams,
|
|
963
963
|
response,
|
|
@@ -981,13 +981,14 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
981
981
|
// 新钱包规则
|
|
982
982
|
isWalletCode = code.startsWith('WL') || code.startsWith('200') && code.length === 10;
|
|
983
983
|
if (!isWalletCode) {
|
|
984
|
-
_context7.next =
|
|
984
|
+
_context7.next = 16;
|
|
985
985
|
break;
|
|
986
986
|
}
|
|
987
987
|
// 钱包识别码直接调用专门接口,不缓存,直接返回
|
|
988
988
|
walletDetailParams = {
|
|
989
989
|
code: code,
|
|
990
990
|
with_customer: 1,
|
|
991
|
+
with_franchisor_data: 1,
|
|
991
992
|
with: ['wallet']
|
|
992
993
|
};
|
|
993
994
|
this.paymentModule.logInfo('[WalletPass] 搜索钱包识别码', {
|
|
@@ -999,17 +1000,23 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
999
1000
|
return this.paymentModule.request.post('/wallet/detail/search', walletDetailParams);
|
|
1000
1001
|
case 10:
|
|
1001
1002
|
_response = _context7.sent;
|
|
1002
|
-
|
|
1003
|
+
walletDetail = _response === null || _response === void 0 ? void 0 : _response.data;
|
|
1004
|
+
if (!((_response === null || _response === void 0 ? void 0 : _response.status) !== true || (_response === null || _response === void 0 ? void 0 : _response.code) !== 200 || !walletDetail || _typeof(walletDetail) !== 'object' || Array.isArray(walletDetail))) {
|
|
1005
|
+
_context7.next = 14;
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
throw new Error((_response === null || _response === void 0 ? void 0 : _response.message) || 'Wallet detail search failed');
|
|
1009
|
+
case 14:
|
|
1003
1010
|
this.paymentModule.logInfo('[WalletPass] 钱包识别码搜索完成', {
|
|
1004
1011
|
code: code,
|
|
1005
|
-
results_count:
|
|
1012
|
+
results_count: 1,
|
|
1006
1013
|
type: 'walletCode'
|
|
1007
1014
|
});
|
|
1008
1015
|
return _context7.abrupt("return", {
|
|
1009
1016
|
type: 'walletCode',
|
|
1010
|
-
data:
|
|
1017
|
+
data: walletDetail
|
|
1011
1018
|
});
|
|
1012
|
-
case
|
|
1019
|
+
case 16:
|
|
1013
1020
|
// 合并钱包参数和搜索参数
|
|
1014
1021
|
baseWalletParams = this.walletParams; // 构建完整的搜索参数,包含钱包扣款推荐的所有参数
|
|
1015
1022
|
searchParams = {
|
|
@@ -1037,20 +1044,20 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1037
1044
|
if (typeof searchParams.payment_order_id === 'string' && searchParams.payment_order_id.startsWith('LOCAL_')) {
|
|
1038
1045
|
searchParams.payment_order_id = undefined;
|
|
1039
1046
|
}
|
|
1040
|
-
_context7.next =
|
|
1047
|
+
_context7.next = 22;
|
|
1041
1048
|
return this.paymentModule.request.post('/machinecode/prepare/deduction/search', searchParams);
|
|
1042
|
-
case
|
|
1049
|
+
case 22:
|
|
1043
1050
|
response = _context7.sent;
|
|
1044
1051
|
searchResults = (response === null || response === void 0 ? void 0 : response.data) || [];
|
|
1045
1052
|
if (!config.noCache) {
|
|
1046
|
-
_context7.next =
|
|
1053
|
+
_context7.next = 26;
|
|
1047
1054
|
break;
|
|
1048
1055
|
}
|
|
1049
1056
|
return _context7.abrupt("return", {
|
|
1050
1057
|
type: 'normalCode',
|
|
1051
1058
|
data: searchResults
|
|
1052
1059
|
});
|
|
1053
|
-
case
|
|
1060
|
+
case 26:
|
|
1054
1061
|
// 将搜索结果存储到缓存数组中
|
|
1055
1062
|
if (searchResults.length > 0) {
|
|
1056
1063
|
// 避免重复存储相同的识别码
|
|
@@ -1080,8 +1087,8 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1080
1087
|
type: 'normalCode',
|
|
1081
1088
|
data: searchResults
|
|
1082
1089
|
});
|
|
1083
|
-
case
|
|
1084
|
-
_context7.prev =
|
|
1090
|
+
case 32:
|
|
1091
|
+
_context7.prev = 32;
|
|
1085
1092
|
_context7.t0 = _context7["catch"](1);
|
|
1086
1093
|
this.paymentModule.logError('[WalletPass] 搜索识别码信息失败', _context7.t0, {
|
|
1087
1094
|
code: params.code,
|
|
@@ -1089,11 +1096,11 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1089
1096
|
order_expect_amount: params.order_expect_amount
|
|
1090
1097
|
});
|
|
1091
1098
|
throw _context7.t0;
|
|
1092
|
-
case
|
|
1099
|
+
case 36:
|
|
1093
1100
|
case "end":
|
|
1094
1101
|
return _context7.stop();
|
|
1095
1102
|
}
|
|
1096
|
-
}, _callee7, this, [[1,
|
|
1103
|
+
}, _callee7, this, [[1, 32]]);
|
|
1097
1104
|
}));
|
|
1098
1105
|
function searchIdentificationCodeAsync(_x8) {
|
|
1099
1106
|
return _searchIdentificationCodeAsync.apply(this, arguments);
|
|
@@ -1119,6 +1126,9 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1119
1126
|
previousCustomerId,
|
|
1120
1127
|
customerChanged,
|
|
1121
1128
|
preserveSelection,
|
|
1129
|
+
retainedSearchCodeKeys,
|
|
1130
|
+
retainedSearchResults,
|
|
1131
|
+
preserveSearchContext,
|
|
1122
1132
|
committedKeys,
|
|
1123
1133
|
committedItems,
|
|
1124
1134
|
selectedIds,
|
|
@@ -1153,9 +1163,20 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1153
1163
|
previousCustomerId = this.walletAssetsState.customerId;
|
|
1154
1164
|
customerChanged = String(previousCustomerId !== null && previousCustomerId !== void 0 ? previousCustomerId : '') !== String(nextCustomerId !== null && nextCustomerId !== void 0 ? nextCustomerId : '');
|
|
1155
1165
|
preserveSelection = options.preserveSelection !== false && !customerChanged;
|
|
1166
|
+
retainedSearchCodeKeys = new Set((options.retainSearchResultCodes || []).map(normalizeWalletAssetCode).filter(Boolean));
|
|
1167
|
+
retainedSearchResults = customerChanged && retainedSearchCodeKeys.size > 0 ? this.searchResults.filter(function (item) {
|
|
1168
|
+
return isWalletPaymentAsset(item) && getWalletAssetCodeKeys(item).some(function (code) {
|
|
1169
|
+
return retainedSearchCodeKeys.has(code);
|
|
1170
|
+
});
|
|
1171
|
+
}) : [];
|
|
1156
1172
|
if (customerChanged) {
|
|
1157
1173
|
this.clearSearchResults();
|
|
1174
|
+
if (retainedSearchResults.length > 0) {
|
|
1175
|
+
this.searchResults = mergeWalletAssets(retainedSearchResults);
|
|
1176
|
+
this.queuePendingAutoSelectForAssets(retainedSearchResults);
|
|
1177
|
+
}
|
|
1158
1178
|
}
|
|
1179
|
+
preserveSearchContext = preserveSelection || retainedSearchResults.length > 0;
|
|
1159
1180
|
committedKeys = new Set(this.walletAssetsState.committedIds.map(function (id) {
|
|
1160
1181
|
return String(id);
|
|
1161
1182
|
}));
|
|
@@ -1180,7 +1201,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1180
1201
|
// 清空购物车时保留扫码资产供后续加购恢复;只有手动 Remove/Clear
|
|
1181
1202
|
// 会取消自动应用资格,商品变化导致的自动失效需要重新进入待选队列。
|
|
1182
1203
|
if ((_businessData$product2 = businessData.products) !== null && _businessData$product2 !== void 0 && _businessData$product2.length) {
|
|
1183
|
-
_context8.next =
|
|
1204
|
+
_context8.next = 27;
|
|
1184
1205
|
break;
|
|
1185
1206
|
}
|
|
1186
1207
|
this.queuePendingAutoSelectForAssets(scanSelectedAssets);
|
|
@@ -1218,7 +1239,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1218
1239
|
totalSelectedAmount: 0,
|
|
1219
1240
|
error: null
|
|
1220
1241
|
}));
|
|
1221
|
-
case
|
|
1242
|
+
case 27:
|
|
1222
1243
|
this.publishWalletAssetsState({
|
|
1223
1244
|
status: 'loading',
|
|
1224
1245
|
customerId: nextCustomerId,
|
|
@@ -1229,40 +1250,40 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1229
1250
|
totalSelectedAmount: preserveSelection ? this.walletAssetsState.totalSelectedAmount : 0,
|
|
1230
1251
|
error: null
|
|
1231
1252
|
});
|
|
1232
|
-
_context8.prev =
|
|
1233
|
-
searchedWalletAssetCodes =
|
|
1234
|
-
useAggregateRecalculate =
|
|
1253
|
+
_context8.prev = 28;
|
|
1254
|
+
searchedWalletAssetCodes = preserveSearchContext ? this.getSearchedWalletAssetCodes() : [];
|
|
1255
|
+
useAggregateRecalculate = preserveSearchContext && (selectedIds.length > 0 || searchedWalletAssetCodes.length > 0);
|
|
1235
1256
|
if (!useAggregateRecalculate) {
|
|
1236
|
-
_context8.next =
|
|
1257
|
+
_context8.next = 37;
|
|
1237
1258
|
break;
|
|
1238
1259
|
}
|
|
1239
|
-
_context8.next =
|
|
1260
|
+
_context8.next = 34;
|
|
1240
1261
|
return this.aggregateRecalculateWalletAssetsAsync(businessData, selectedIds);
|
|
1241
|
-
case
|
|
1262
|
+
case 34:
|
|
1242
1263
|
_context8.t0 = _context8.sent;
|
|
1243
|
-
_context8.next =
|
|
1264
|
+
_context8.next = 38;
|
|
1244
1265
|
break;
|
|
1245
|
-
case
|
|
1266
|
+
case 37:
|
|
1246
1267
|
_context8.t0 = null;
|
|
1247
|
-
case
|
|
1268
|
+
case 38:
|
|
1248
1269
|
aggregateResult = _context8.t0;
|
|
1249
1270
|
_context8.t1 = aggregateResult;
|
|
1250
1271
|
if (_context8.t1) {
|
|
1251
|
-
_context8.next =
|
|
1272
|
+
_context8.next = 44;
|
|
1252
1273
|
break;
|
|
1253
1274
|
}
|
|
1254
|
-
_context8.next =
|
|
1275
|
+
_context8.next = 43;
|
|
1255
1276
|
return this.initializeWalletDataFromBusinessAsync(businessData);
|
|
1256
|
-
case
|
|
1277
|
+
case 43:
|
|
1257
1278
|
_context8.t1 = _context8.sent;
|
|
1258
|
-
case
|
|
1279
|
+
case 44:
|
|
1259
1280
|
result = _context8.t1;
|
|
1260
1281
|
if (!(requestSequence !== this.walletAssetsRequestSequence)) {
|
|
1261
|
-
_context8.next =
|
|
1282
|
+
_context8.next = 47;
|
|
1262
1283
|
break;
|
|
1263
1284
|
}
|
|
1264
1285
|
return _context8.abrupt("return", this.getWalletAssetsState());
|
|
1265
|
-
case
|
|
1286
|
+
case 47:
|
|
1266
1287
|
this.walletAssetsCalculationContext = {
|
|
1267
1288
|
orderTotalAmount: Number(businessData.order_wait_pay_amount || 0),
|
|
1268
1289
|
products: result.products || businessData.products || []
|
|
@@ -1283,13 +1304,13 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1283
1304
|
});
|
|
1284
1305
|
}
|
|
1285
1306
|
}
|
|
1286
|
-
searchedWalletAssets =
|
|
1307
|
+
searchedWalletAssets = preserveSearchContext ? this.syncSearchedWalletAssets([].concat(_toConsumableArray(result.transformList || []), _toConsumableArray(result.noApplicableVoucher || []))) : [];
|
|
1287
1308
|
if (!(requestSequence !== this.walletAssetsRequestSequence)) {
|
|
1288
|
-
_context8.next =
|
|
1309
|
+
_context8.next = 53;
|
|
1289
1310
|
break;
|
|
1290
1311
|
}
|
|
1291
1312
|
return _context8.abrupt("return", this.getWalletAssetsState());
|
|
1292
|
-
case
|
|
1313
|
+
case 53:
|
|
1293
1314
|
recommendedKeys = new Set((result.walletRecommendList || []).map(function (asset) {
|
|
1294
1315
|
return getWalletAssetKey(asset);
|
|
1295
1316
|
}));
|
|
@@ -1335,15 +1356,15 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1335
1356
|
});
|
|
1336
1357
|
this.queuePendingAutoSelectForAssets(droppedScanSelectedAssets);
|
|
1337
1358
|
return _context8.abrupt("return", nextState);
|
|
1338
|
-
case
|
|
1339
|
-
_context8.prev =
|
|
1340
|
-
_context8.t2 = _context8["catch"](
|
|
1359
|
+
case 68:
|
|
1360
|
+
_context8.prev = 68;
|
|
1361
|
+
_context8.t2 = _context8["catch"](28);
|
|
1341
1362
|
if (!(requestSequence !== this.walletAssetsRequestSequence)) {
|
|
1342
|
-
_context8.next =
|
|
1363
|
+
_context8.next = 72;
|
|
1343
1364
|
break;
|
|
1344
1365
|
}
|
|
1345
1366
|
return _context8.abrupt("return", this.getWalletAssetsState());
|
|
1346
|
-
case
|
|
1367
|
+
case 72:
|
|
1347
1368
|
this.paymentModule.logError('[WalletPass] 刷新共享钱包资产失败,保留刷新前状态', _context8.t2, {
|
|
1348
1369
|
customer_id: businessData.customer_id,
|
|
1349
1370
|
selected_ids: selectedIds,
|
|
@@ -1359,11 +1380,11 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1359
1380
|
customerId: nextCustomerId,
|
|
1360
1381
|
error: _context8.t2 instanceof Error ? _context8.t2.message : String(_context8.t2)
|
|
1361
1382
|
}));
|
|
1362
|
-
case
|
|
1383
|
+
case 74:
|
|
1363
1384
|
case "end":
|
|
1364
1385
|
return _context8.stop();
|
|
1365
1386
|
}
|
|
1366
|
-
}, _callee8, this, [[
|
|
1387
|
+
}, _callee8, this, [[28, 68]]);
|
|
1367
1388
|
}));
|
|
1368
1389
|
function refreshWalletAssetsFromBusinessAsync(_x9) {
|
|
1369
1390
|
return _refreshWalletAssetsFromBusinessAsync.apply(this, arguments);
|
|
@@ -1541,6 +1562,18 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1541
1562
|
}));
|
|
1542
1563
|
case 9:
|
|
1543
1564
|
result = _context9.sent;
|
|
1565
|
+
if (!(result.type === 'walletCode')) {
|
|
1566
|
+
_context9.next = 12;
|
|
1567
|
+
break;
|
|
1568
|
+
}
|
|
1569
|
+
return _context9.abrupt("return", {
|
|
1570
|
+
type: 'walletCode',
|
|
1571
|
+
data: result.data,
|
|
1572
|
+
asset: result.data,
|
|
1573
|
+
selected: false,
|
|
1574
|
+
state: this.getWalletAssetsState()
|
|
1575
|
+
});
|
|
1576
|
+
case 12:
|
|
1544
1577
|
paymentAssets = this.formatSearchedWalletPaymentAssets(result.data.filter(isWalletPaymentAsset));
|
|
1545
1578
|
if (paymentAssets.length > 0) {
|
|
1546
1579
|
this.searchResults = mergeWalletAssets(this.searchResults, paymentAssets);
|
|
@@ -1548,17 +1581,17 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1548
1581
|
asset = paymentAssets.find(function (item) {
|
|
1549
1582
|
return String((item === null || item === void 0 ? void 0 : item.code) || '') === normalizedCode;
|
|
1550
1583
|
}) || paymentAssets[0];
|
|
1551
|
-
if (
|
|
1552
|
-
_context9.next =
|
|
1584
|
+
if (asset) {
|
|
1585
|
+
_context9.next = 17;
|
|
1553
1586
|
break;
|
|
1554
1587
|
}
|
|
1555
1588
|
return _context9.abrupt("return", {
|
|
1556
|
-
type:
|
|
1589
|
+
type: 'normalCode',
|
|
1557
1590
|
asset: asset,
|
|
1558
1591
|
selected: false,
|
|
1559
1592
|
state: this.getWalletAssetsState()
|
|
1560
1593
|
});
|
|
1561
|
-
case
|
|
1594
|
+
case 17:
|
|
1562
1595
|
items = mergeWalletAssets(this.walletAssetsState.items, [asset]);
|
|
1563
1596
|
recalculatedState = this.recalculateWalletAssets(items, this.walletAssetsState.selectedIds, this.walletAssetsState.selectionSources);
|
|
1564
1597
|
assetId = getWalletAssetId(asset);
|
|
@@ -1588,7 +1621,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
1588
1621
|
selected: isSelected,
|
|
1589
1622
|
state: selected
|
|
1590
1623
|
});
|
|
1591
|
-
case
|
|
1624
|
+
case 27:
|
|
1592
1625
|
case "end":
|
|
1593
1626
|
return _context9.stop();
|
|
1594
1627
|
}
|
|
@@ -16,8 +16,8 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
|
|
|
16
16
|
getWalletPassEvaluator(): import("../..").WalletPassEvaluator | undefined;
|
|
17
17
|
private normalizeHolderRecordIds;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* 商品未开启 Holder 选择时跳过匹配;已开启时,特定 form Holder 卡
|
|
20
|
+
* 只适用于同一 Holder Record,是否必填不影响匹配规则。
|
|
21
21
|
*/
|
|
22
22
|
private checkHolderMatch;
|
|
23
23
|
isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, isFormSubject, }: {
|