@pisell/pisellos 2.3.186 → 2.3.187

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.
@@ -0,0 +1,9 @@
1
+ // 导出评估器
2
+ export { PromotionEvaluator } from "./evaluator";
3
+
4
+ // 导出适配器
5
+ export { PromotionAdapter } from "./adapter";
6
+ export { default } from "./adapter";
7
+
8
+ // 导出策略配置示例常量
9
+ export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
@@ -128,7 +128,9 @@ export declare function getBundleSellingMagnitude(bundle: Record<string, any> |
128
128
  *
129
129
  * Rules 钩子契约(hook_adapt 方案,Rules 内部保持不变):
130
130
  * - `getProduct.price` / `getProduct.original_price` 回传 **source-level 主价**
131
- * (`metadata.source_product_price`)。Rules 内部 `getProductTotalPrice` /
131
+ * (`metadata.source_product_price`);买赠行的 `price` 为 0,`original_price` 仍保留 source。
132
+ * 赠品基础价已被赠送优惠抵扣,只有收费 option / bundle 继续按卡券规则计算。
133
+ * Rules 内部 `getProductTotalPrice` /
132
134
  * `getProductOriginTotalPrice` 会自行叠加 option + bundle,喂 source 可避免 option 双加。
133
135
  * - `getProduct.total` = `selling_price × num`(行 composite × num),与 Rules 内部产出的
134
136
  * total(source + option + bundle)对齐。
@@ -597,7 +597,9 @@ export function getBundleSellingMagnitude(bundle) {
597
597
  *
598
598
  * Rules 钩子契约(hook_adapt 方案,Rules 内部保持不变):
599
599
  * - `getProduct.price` / `getProduct.original_price` 回传 **source-level 主价**
600
- * (`metadata.source_product_price`)。Rules 内部 `getProductTotalPrice` /
600
+ * (`metadata.source_product_price`);买赠行的 `price` 为 0,`original_price` 仍保留 source。
601
+ * 赠品基础价已被赠送优惠抵扣,只有收费 option / bundle 继续按卡券规则计算。
602
+ * Rules 内部 `getProductTotalPrice` /
601
603
  * `getProductOriginTotalPrice` 会自行叠加 option + bundle,喂 source 可避免 option 双加。
602
604
  * - `getProduct.total` = `selling_price × num`(行 composite × num),与 Rules 内部产出的
603
605
  * total(source + option + bundle)对齐。
@@ -901,7 +903,8 @@ export function createDefaultOrderRulesHooks(getBookings, getHolderRelations) {
901
903
  _id: (_product$metadata7 = product.metadata) !== null && _product$metadata7 !== void 0 && _product$metadata7.unique_identification_number ? "".concat(product.product_id, "_").concat(product.product_variant_id, "_").concat(product.metadata.unique_identification_number) : "".concat(product.product_id, "_").concat(product.product_variant_id, "_").concat(buildProductLineFingerprint(getProductSkuOptions(product), product.product_bundle)),
902
904
  // Rules 内部 getProductTotalPrice / getProductOriginTotalPrice 会各自再叠加 bundle + option,
903
905
  // 所以这里必须喂 source-level(不含 option、不含 bundle、不含折扣)单价,避免双加 option。
904
- price: sourcePrice,
906
+ // 赠品基础价不再参与卡券;source 元数据保留原价,供后续与赠送优惠相抵。
907
+ price: metadataAny._giftInfo ? '0.00' : sourcePrice,
905
908
  // total / origin_total 使用 composite × num,跟 Rules 内部产出的 total 对齐(含 option + bundle)。
906
909
  total: new Decimal(product.selling_price || 0).times(product.num || 1).toNumber(),
907
910
  origin_total: new Decimal(product.original_price || product.selling_price || 0).times(product.num || 1).toNumber(),
@@ -1222,10 +1222,28 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1222
1222
 
1223
1223
  // 记录已应用优惠券的商品信息
1224
1224
  var appliedDiscountProducts = new Map();
1225
+ var hasPayableOptions = function hasPayableOptions(product) {
1226
+ return (product.options || []).reduce(function (total, option) {
1227
+ var _ref14, _ref15, _ref16, _option$_original_pri, _ref17, _option$num;
1228
+ var unitPrice = Number((_ref14 = (_ref15 = (_ref16 = (_option$_original_pri = option._original_price) !== null && _option$_original_pri !== void 0 ? _option$_original_pri : option._original_add_price) !== null && _ref16 !== void 0 ? _ref16 : option.price) !== null && _ref15 !== void 0 ? _ref15 : option.add_price) !== null && _ref14 !== void 0 ? _ref14 : 0);
1229
+ var quantity = Number((_ref17 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref17 !== void 0 ? _ref17 : 1);
1230
+ if (!Number.isFinite(unitPrice) || !Number.isFinite(quantity) || quantity <= 0) {
1231
+ return total;
1232
+ }
1233
+ return total.plus(new Decimal(unitPrice).mul(quantity));
1234
+ }, new Decimal(0)).greaterThan(0);
1235
+ };
1236
+
1237
+ // 只排除赠品主项的零可抵扣金额;收费 option 和独立 bundle 保持原有规则。
1238
+ var isGiftWithoutDeductibleAmount = function isGiftWithoutDeductibleAmount(flatItem, discount) {
1239
+ var _flatItem$originProdu, _discount$config4;
1240
+ if (flatItem.type !== 'main' || !((_flatItem$originProdu = flatItem.originProduct) !== null && _flatItem$originProdu !== void 0 && (_flatItem$originProdu = _flatItem$originProdu.metadata) !== null && _flatItem$originProdu !== void 0 && _flatItem$originProdu._giftInfo) || Number(flatItem.price || 0) > 0) return false;
1241
+ return !((_discount$config4 = discount.config) !== null && _discount$config4 !== void 0 && _discount$config4.deductOptionPrice) || !hasPayableOptions(flatItem.product);
1242
+ };
1225
1243
 
1226
1244
  // 可用性和实际应用共用金额判断;零基础价商品可按策略抵扣收费 option。
1227
1245
  var isDiscountCardPriceAvailable = function isDiscountCardPriceAvailable(flatItem, discount) {
1228
- var _product$discount_lis2, _discount$config4;
1246
+ var _product$discount_lis2, _discount$config5;
1229
1247
  var product = flatItem.type === 'main' ? flatItem.product : flatItem.bundleItem;
1230
1248
  if (!(Number(flatItem.price) <= 0 || !flatItem.price) || (_product$discount_lis2 = product.discount_list) !== null && _product$discount_lis2 !== void 0 && _product$discount_lis2.some(function (item) {
1231
1249
  var _item$discount2;
@@ -1233,18 +1251,10 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1233
1251
  })) {
1234
1252
  return true;
1235
1253
  }
1236
- if (flatItem.type !== 'main' || Number(flatItem.price) !== 0 || !['discount_card', 'product_discount_card'].includes(discount.tag || discount.type || '') || !((_discount$config4 = discount.config) !== null && _discount$config4 !== void 0 && _discount$config4.deductOptionPrice) || isOrderLevelFixedAmountDiscount(discount)) {
1254
+ if (flatItem.type !== 'main' || Number(flatItem.price) !== 0 || !['discount_card', 'product_discount_card'].includes(discount.tag || discount.type || '') || !((_discount$config5 = discount.config) !== null && _discount$config5 !== void 0 && _discount$config5.deductOptionPrice) || isOrderLevelFixedAmountDiscount(discount)) {
1237
1255
  return false;
1238
1256
  }
1239
- return (product.options || []).reduce(function (total, option) {
1240
- var _ref14, _ref15, _ref16, _option$_original_pri, _ref17, _option$num;
1241
- var unitPrice = Number((_ref14 = (_ref15 = (_ref16 = (_option$_original_pri = option._original_price) !== null && _option$_original_pri !== void 0 ? _option$_original_pri : option._original_add_price) !== null && _ref16 !== void 0 ? _ref16 : option.price) !== null && _ref15 !== void 0 ? _ref15 : option.add_price) !== null && _ref14 !== void 0 ? _ref14 : 0);
1242
- var quantity = Number((_ref17 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref17 !== void 0 ? _ref17 : 1);
1243
- if (!Number.isFinite(unitPrice) || !Number.isFinite(quantity) || quantity <= 0) {
1244
- return total;
1245
- }
1246
- return total.plus(new Decimal(unitPrice).mul(quantity));
1247
- }, new Decimal(0)).greaterThan(0);
1257
+ return hasPayableOptions(product);
1248
1258
  };
1249
1259
 
1250
1260
  // 首先遍历所有商品和所有优惠券,确定每个优惠券的适用范围,包括isSelected为false的优惠券
@@ -1274,7 +1284,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1274
1284
  }
1275
1285
  var isItemRewardProductDiscount = _this5.isItemRewardProductDiscount(product);
1276
1286
  addModeDiscount.forEach(function (discount) {
1277
- var _product6, _product7, _product8, _product9, _flatItem$bundleItem3, _flatItem$bundleItem4, _discount$config5;
1287
+ var _product6, _product7, _product8, _product9, _flatItem$bundleItem3, _flatItem$bundleItem4, _discount$config6;
1278
1288
  var limitedData = discount === null || discount === void 0 ? void 0 : discount.limited_relation_product_data;
1279
1289
  // 拿到discount配置的holder信息 product信息 product.holder 加在 isLimitedProduct
1280
1290
  var _tempVar = (flatItem === null || flatItem === void 0 ? void 0 : flatItem.type) === 'bundle' ? flatItem === null || flatItem === void 0 ? void 0 : flatItem.parentProduct : flatItem === null || flatItem === void 0 ? void 0 : flatItem.product;
@@ -1305,7 +1315,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1305
1315
  }
1306
1316
 
1307
1317
  // 判断优惠券是否适用于该商品
1308
- if (isAvailableProduct && !isItemRewardProductDiscount && isLimitedProduct && timeLimit && isBundleAvailable && (_discount$config5 = discount.config) !== null && _discount$config5 !== void 0 && _discount$config5.isAvailable && (isFullCoveragePass(discount) || isDiscountCardPriceAvailable(flatItem, discount)) && (!isEntitlementPass(discount) || getRemainingEntitlementUses(discount, 0, 1) > 0)) {
1318
+ if (isAvailableProduct && !isItemRewardProductDiscount && !isGiftWithoutDeductibleAmount(flatItem, discount) && isLimitedProduct && timeLimit && isBundleAvailable && (_discount$config6 = discount.config) !== null && _discount$config6 !== void 0 && _discount$config6.isAvailable && (isFullCoveragePass(discount) || isDiscountCardPriceAvailable(flatItem, discount)) && (!isEntitlementPass(discount) || getRemainingEntitlementUses(discount, 0, 1) > 0)) {
1309
1319
  var _discountApplicabilit, _discount$metadata4, _discount$metadata5, _discount$metadata6;
1310
1320
  // 记录此优惠券适用的商品
1311
1321
  (_discountApplicabilit = discountApplicability.get(discount.id)) === null || _discountApplicabilit === void 0 || _discountApplicabilit.push(product.id);
@@ -1456,6 +1466,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1456
1466
  // 找到适用于此商品的所有优惠券,仅考虑isSelected不为false的优惠券
1457
1467
  var applicableDiscounts = sortedDiscountList.filter(function (discount) {
1458
1468
  var _product$discount_lis4;
1469
+ if (isGiftWithoutDeductibleAmount(flatItem, discount)) return false;
1459
1470
  if (_this5.discountScope && !_this5.discountScope(originProduct, discount)) return false;
1460
1471
  if (_this5.isItemRewardProductDiscount(product)) return false;
1461
1472
  if (isCardBlockedByPromotion(flatItem, discount)) return false;
@@ -1469,9 +1480,9 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1469
1480
  if (!discount.isSelected) return false;
1470
1481
  }
1471
1482
  if (['entitlement_pass', 'good_pass', 'discount_card', 'product_discount_card'].includes(discountType !== null && discountType !== void 0 ? discountType : '') && !isReapplyEditModeDiscountForProduct) {
1472
- var _discount$config6;
1483
+ var _discount$config7;
1473
1484
  // 如果策略检查后没有config,说明不可用
1474
- if (discount.config === undefined || !(discount !== null && discount !== void 0 && (_discount$config6 = discount.config) !== null && _discount$config6 !== void 0 && _discount$config6.isAvailable)) {
1485
+ if (discount.config === undefined || !(discount !== null && discount !== void 0 && (_discount$config7 = discount.config) !== null && _discount$config7 !== void 0 && _discount$config7.isAvailable)) {
1475
1486
  return false;
1476
1487
  }
1477
1488
  }
@@ -1493,8 +1504,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1493
1504
 
1494
1505
  // 🔥 检查 maxUsagePerOrder 限制:同一 product_id 的商品券使用数量不能超过配置值
1495
1506
  if (isFullCoveragePass(discount)) {
1496
- var _discount$config7;
1497
- var maxUsagePerOrder = (_discount$config7 = discount.config) === null || _discount$config7 === void 0 ? void 0 : _discount$config7.maxUsagePerOrder;
1507
+ var _discount$config8;
1508
+ var maxUsagePerOrder = (_discount$config8 = discount.config) === null || _discount$config8 === void 0 ? void 0 : _discount$config8.maxUsagePerOrder;
1498
1509
  if (maxUsagePerOrder && maxUsagePerOrder > 0) {
1499
1510
  var currentUsedCount = usedProductIdCounts.get(discount.product_id) || 0;
1500
1511
  if (currentUsedCount >= maxUsagePerOrder) {
@@ -2647,7 +2658,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
2647
2658
  }, {
2648
2659
  key: "checkPackageSubItemUsageRules",
2649
2660
  value: function checkPackageSubItemUsageRules(discount, flatItem) {
2650
- var _flatItem$product, _flatItem$originProdu, _flatItem$parentProdu10;
2661
+ var _flatItem$product, _flatItem$originProdu2, _flatItem$parentProdu10;
2651
2662
  var limitedData = discount.limited_relation_product_data;
2652
2663
  var usageRules = limitedData === null || limitedData === void 0 ? void 0 : limitedData.package_sub_item_usage_rules;
2653
2664
  var rules = ['original_price'].concat(_toConsumableArray((usageRules === null || usageRules === void 0 ? void 0 : usageRules.rules) || []));
@@ -2672,7 +2683,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
2672
2683
  var isBundleItem = flatItem.type === 'bundle'; // 套餐中购买
2673
2684
  var bundleMainProductId = (_flatItem$product = flatItem.product) === null || _flatItem$product === void 0 ? void 0 : _flatItem$product.product_id;
2674
2685
  // 主商品id
2675
- var mainProductId = (flatItem === null || flatItem === void 0 || (_flatItem$originProdu = flatItem.originProduct) === null || _flatItem$originProdu === void 0 || (_flatItem$originProdu = _flatItem$originProdu._productOrigin) === null || _flatItem$originProdu === void 0 ? void 0 : _flatItem$originProdu.id) || (flatItem === null || flatItem === void 0 || (_flatItem$parentProdu10 = flatItem.parentProduct) === null || _flatItem$parentProdu10 === void 0 ? void 0 : _flatItem$parentProdu10.id) || 0;
2686
+ var mainProductId = (flatItem === null || flatItem === void 0 || (_flatItem$originProdu2 = flatItem.originProduct) === null || _flatItem$originProdu2 === void 0 || (_flatItem$originProdu2 = _flatItem$originProdu2._productOrigin) === null || _flatItem$originProdu2 === void 0 ? void 0 : _flatItem$originProdu2.id) || (flatItem === null || flatItem === void 0 || (_flatItem$parentProdu10 = flatItem.parentProduct) === null || _flatItem$parentProdu10 === void 0 ? void 0 : _flatItem$parentProdu10.id) || 0;
2676
2687
 
2677
2688
  // 主商品直接可用
2678
2689
  if (isMainProduct) {
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
328
328
  date: string;
329
329
  status: string;
330
330
  week: string;
331
- weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
331
+ weekNum: 0 | 1 | 2 | 3 | 5 | 4 | 6;
332
332
  }[]>;
333
333
  submitTimeSlot(timeSlots: TimeSliceItem): void;
334
334
  private getScheduleDataByIds;
@@ -128,7 +128,9 @@ export declare function getBundleSellingMagnitude(bundle: Record<string, any> |
128
128
  *
129
129
  * Rules 钩子契约(hook_adapt 方案,Rules 内部保持不变):
130
130
  * - `getProduct.price` / `getProduct.original_price` 回传 **source-level 主价**
131
- * (`metadata.source_product_price`)。Rules 内部 `getProductTotalPrice` /
131
+ * (`metadata.source_product_price`);买赠行的 `price` 为 0,`original_price` 仍保留 source。
132
+ * 赠品基础价已被赠送优惠抵扣,只有收费 option / bundle 继续按卡券规则计算。
133
+ * Rules 内部 `getProductTotalPrice` /
132
134
  * `getProductOriginTotalPrice` 会自行叠加 option + bundle,喂 source 可避免 option 双加。
133
135
  * - `getProduct.total` = `selling_price × num`(行 composite × num),与 Rules 内部产出的
134
136
  * total(source + option + bundle)对齐。
@@ -651,7 +651,9 @@ function getBundleSellingMagnitude(bundle) {
651
651
  *
652
652
  * Rules 钩子契约(hook_adapt 方案,Rules 内部保持不变):
653
653
  * - `getProduct.price` / `getProduct.original_price` 回传 **source-level 主价**
654
- * (`metadata.source_product_price`)。Rules 内部 `getProductTotalPrice` /
654
+ * (`metadata.source_product_price`);买赠行的 `price` 为 0,`original_price` 仍保留 source。
655
+ * 赠品基础价已被赠送优惠抵扣,只有收费 option / bundle 继续按卡券规则计算。
656
+ * Rules 内部 `getProductTotalPrice` /
655
657
  * `getProductOriginTotalPrice` 会自行叠加 option + bundle,喂 source 可避免 option 双加。
656
658
  * - `getProduct.total` = `selling_price × num`(行 composite × num),与 Rules 内部产出的
657
659
  * total(source + option + bundle)对齐。
@@ -934,7 +936,8 @@ function createDefaultOrderRulesHooks(getBookings, getHolderRelations) {
934
936
  _id: product.metadata?.unique_identification_number ? `${product.product_id}_${product.product_variant_id}_${product.metadata.unique_identification_number}` : `${product.product_id}_${product.product_variant_id}_${(0, _utils2.buildProductLineFingerprint)(getProductSkuOptions(product), product.product_bundle)}`,
935
937
  // Rules 内部 getProductTotalPrice / getProductOriginTotalPrice 会各自再叠加 bundle + option,
936
938
  // 所以这里必须喂 source-level(不含 option、不含 bundle、不含折扣)单价,避免双加 option。
937
- price: sourcePrice,
939
+ // 赠品基础价不再参与卡券;source 元数据保留原价,供后续与赠送优惠相抵。
940
+ price: metadataAny._giftInfo ? '0.00' : sourcePrice,
938
941
  // total / origin_total 使用 composite × num,跟 Rules 内部产出的 total 对齐(含 option + bundle)。
939
942
  total: new _decimal.default(product.selling_price || 0).times(product.num || 1).toNumber(),
940
943
  origin_total: new _decimal.default(product.original_price || product.selling_price || 0).times(product.num || 1).toNumber(),
@@ -940,6 +940,22 @@ class RulesModule extends _BaseModule.BaseModule {
940
940
 
941
941
  // 记录已应用优惠券的商品信息
942
942
  const appliedDiscountProducts = new Map();
943
+ const hasPayableOptions = product => {
944
+ return (product.options || []).reduce((total, option) => {
945
+ const unitPrice = Number(option._original_price ?? option._original_add_price ?? option.price ?? option.add_price ?? 0);
946
+ const quantity = Number(option.num ?? option.quantity ?? 1);
947
+ if (!Number.isFinite(unitPrice) || !Number.isFinite(quantity) || quantity <= 0) {
948
+ return total;
949
+ }
950
+ return total.plus(new _decimal.default(unitPrice).mul(quantity));
951
+ }, new _decimal.default(0)).greaterThan(0);
952
+ };
953
+
954
+ // 只排除赠品主项的零可抵扣金额;收费 option 和独立 bundle 保持原有规则。
955
+ const isGiftWithoutDeductibleAmount = (flatItem, discount) => {
956
+ if (flatItem.type !== 'main' || !flatItem.originProduct?.metadata?._giftInfo || Number(flatItem.price || 0) > 0) return false;
957
+ return !discount.config?.deductOptionPrice || !hasPayableOptions(flatItem.product);
958
+ };
943
959
 
944
960
  // 可用性和实际应用共用金额判断;零基础价商品可按策略抵扣收费 option。
945
961
  const isDiscountCardPriceAvailable = (flatItem, discount) => {
@@ -950,14 +966,7 @@ class RulesModule extends _BaseModule.BaseModule {
950
966
  if (flatItem.type !== 'main' || Number(flatItem.price) !== 0 || !['discount_card', 'product_discount_card'].includes(discount.tag || discount.type || '') || !discount.config?.deductOptionPrice || (0, _utils.isOrderLevelFixedAmountDiscount)(discount)) {
951
967
  return false;
952
968
  }
953
- return (product.options || []).reduce((total, option) => {
954
- const unitPrice = Number(option._original_price ?? option._original_add_price ?? option.price ?? option.add_price ?? 0);
955
- const quantity = Number(option.num ?? option.quantity ?? 1);
956
- if (!Number.isFinite(unitPrice) || !Number.isFinite(quantity) || quantity <= 0) {
957
- return total;
958
- }
959
- return total.plus(new _decimal.default(unitPrice).mul(quantity));
960
- }, new _decimal.default(0)).greaterThan(0);
969
+ return hasPayableOptions(product);
961
970
  };
962
971
 
963
972
  // 首先遍历所有商品和所有优惠券,确定每个优惠券的适用范围,包括isSelected为false的优惠券
@@ -1012,7 +1021,7 @@ class RulesModule extends _BaseModule.BaseModule {
1012
1021
  }
1013
1022
 
1014
1023
  // 判断优惠券是否适用于该商品
1015
- if (isAvailableProduct && !isItemRewardProductDiscount && isLimitedProduct && timeLimit && isBundleAvailable && discount.config?.isAvailable && ((0, _entitlementPass.isFullCoveragePass)(discount) || isDiscountCardPriceAvailable(flatItem, discount)) && (!(0, _entitlementPass.isEntitlementPass)(discount) || (0, _entitlementPass.getRemainingEntitlementUses)(discount, 0, 1) > 0)) {
1024
+ if (isAvailableProduct && !isItemRewardProductDiscount && !isGiftWithoutDeductibleAmount(flatItem, discount) && isLimitedProduct && timeLimit && isBundleAvailable && discount.config?.isAvailable && ((0, _entitlementPass.isFullCoveragePass)(discount) || isDiscountCardPriceAvailable(flatItem, discount)) && (!(0, _entitlementPass.isEntitlementPass)(discount) || (0, _entitlementPass.getRemainingEntitlementUses)(discount, 0, 1) > 0)) {
1016
1025
  // 记录此优惠券适用的商品
1017
1026
  discountApplicability.get(discount.id)?.push(product.id);
1018
1027
  if (flatItem.type === 'main' && (0, _promotionSelection.isPromotionDiscountCard)(discount)) {
@@ -1161,6 +1170,7 @@ class RulesModule extends _BaseModule.BaseModule {
1161
1170
 
1162
1171
  // 找到适用于此商品的所有优惠券,仅考虑isSelected不为false的优惠券
1163
1172
  const applicableDiscounts = sortedDiscountList.filter(discount => {
1173
+ if (isGiftWithoutDeductibleAmount(flatItem, discount)) return false;
1164
1174
  if (this.discountScope && !this.discountScope(originProduct, discount)) return false;
1165
1175
  if (this.isItemRewardProductDiscount(product)) return false;
1166
1176
  if (isCardBlockedByPromotion(flatItem, discount)) return false;
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
328
328
  date: string;
329
329
  status: string;
330
330
  week: string;
331
- weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
331
+ weekNum: 0 | 1 | 2 | 3 | 5 | 4 | 6;
332
332
  }[]>;
333
333
  submitTimeSlot(timeSlots: TimeSliceItem): void;
334
334
  private getScheduleDataByIds;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.3.186",
4
+ "version": "2.3.187",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",