@pisell/pisellos 2.1.85 → 2.1.86

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.
Files changed (105) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js +0 -1
  3. package/dist/modules/Cart/types.d.ts +0 -2
  4. package/dist/modules/Cart/utils/cartProduct.js +0 -11
  5. package/dist/modules/Cart/utils/changePrice.js +6 -0
  6. package/dist/modules/Discount/index.d.ts +1 -0
  7. package/dist/modules/Discount/index.js +2 -1
  8. package/dist/modules/Discount/types.d.ts +0 -15
  9. package/dist/modules/Payment/index.d.ts +1 -2
  10. package/dist/modules/Payment/index.js +7 -10
  11. package/dist/modules/Payment/utils.js +0 -3
  12. package/dist/modules/Payment/walletpass.d.ts +0 -23
  13. package/dist/modules/Payment/walletpass.js +95 -191
  14. package/dist/modules/Rules/index.d.ts +2 -7
  15. package/dist/modules/Rules/index.js +19 -141
  16. package/dist/modules/Rules/types.d.ts +0 -1
  17. package/dist/modules/Summary/index.js +47 -5
  18. package/dist/modules/Summary/types.d.ts +0 -2
  19. package/dist/modules/Summary/utils.d.ts +1 -7
  20. package/dist/modules/Summary/utils.js +23 -33
  21. package/dist/plugins/window.d.ts +0 -2
  22. package/dist/solution/BookingByStep/index.d.ts +1 -2
  23. package/dist/solution/BookingByStep/index.js +84 -35
  24. package/dist/solution/BookingTicket/index.d.ts +1 -1
  25. package/dist/solution/Checkout/index.js +0 -2
  26. package/dist/solution/ShopDiscount/index.d.ts +0 -1
  27. package/dist/solution/ShopDiscount/index.js +3 -12
  28. package/dist/solution/ShopDiscount/types.d.ts +0 -1
  29. package/lib/index.d.ts +0 -1
  30. package/lib/index.js +1 -3
  31. package/lib/modules/Cart/types.d.ts +0 -2
  32. package/lib/modules/Cart/utils/cartProduct.js +0 -9
  33. package/lib/modules/Cart/utils/changePrice.js +5 -0
  34. package/lib/modules/Discount/index.d.ts +1 -0
  35. package/lib/modules/Discount/index.js +2 -1
  36. package/lib/modules/Discount/types.d.ts +0 -15
  37. package/lib/modules/Payment/index.d.ts +1 -2
  38. package/lib/modules/Payment/index.js +0 -1
  39. package/lib/modules/Payment/utils.js +0 -3
  40. package/lib/modules/Payment/walletpass.d.ts +0 -23
  41. package/lib/modules/Payment/walletpass.js +17 -94
  42. package/lib/modules/Rules/index.d.ts +2 -7
  43. package/lib/modules/Rules/index.js +149 -285
  44. package/lib/modules/Rules/types.d.ts +0 -1
  45. package/lib/modules/Summary/index.js +22 -9
  46. package/lib/modules/Summary/types.d.ts +0 -2
  47. package/lib/modules/Summary/utils.d.ts +1 -7
  48. package/lib/modules/Summary/utils.js +22 -28
  49. package/lib/plugins/window.d.ts +0 -2
  50. package/lib/solution/BookingByStep/index.d.ts +1 -2
  51. package/lib/solution/BookingByStep/index.js +34 -3
  52. package/lib/solution/BookingTicket/index.d.ts +1 -1
  53. package/lib/solution/Checkout/index.js +0 -2
  54. package/lib/solution/ShopDiscount/index.d.ts +0 -1
  55. package/lib/solution/ShopDiscount/index.js +2 -7
  56. package/lib/solution/ShopDiscount/types.d.ts +0 -1
  57. package/package.json +1 -1
  58. package/dist/model/index.d.ts +0 -1
  59. package/dist/model/index.js +0 -1
  60. package/dist/model/strategy/adapter/index.d.ts +0 -3
  61. package/dist/model/strategy/adapter/index.js +0 -4
  62. package/dist/model/strategy/adapter/type.d.ts +0 -28
  63. package/dist/model/strategy/adapter/type.js +0 -1
  64. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +0 -84
  65. package/dist/model/strategy/adapter/walletPass/evaluator.js +0 -497
  66. package/dist/model/strategy/adapter/walletPass/example.d.ts +0 -4
  67. package/dist/model/strategy/adapter/walletPass/example.js +0 -258
  68. package/dist/model/strategy/adapter/walletPass/index.d.ts +0 -32
  69. package/dist/model/strategy/adapter/walletPass/index.js +0 -182
  70. package/dist/model/strategy/adapter/walletPass/locales.d.ts +0 -1
  71. package/dist/model/strategy/adapter/walletPass/locales.js +0 -23
  72. package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -168
  73. package/dist/model/strategy/adapter/walletPass/type.js +0 -1
  74. package/dist/model/strategy/adapter/walletPass/utils.d.ts +0 -76
  75. package/dist/model/strategy/adapter/walletPass/utils.js +0 -1043
  76. package/dist/model/strategy/index.d.ts +0 -94
  77. package/dist/model/strategy/index.js +0 -551
  78. package/dist/model/strategy/strategy-example.d.ts +0 -5
  79. package/dist/model/strategy/strategy-example.js +0 -331
  80. package/dist/model/strategy/type.d.ts +0 -228
  81. package/dist/model/strategy/type.js +0 -94
  82. package/lib/model/index.d.ts +0 -1
  83. package/lib/model/index.js +0 -23
  84. package/lib/model/strategy/adapter/index.d.ts +0 -3
  85. package/lib/model/strategy/adapter/index.js +0 -45
  86. package/lib/model/strategy/adapter/type.d.ts +0 -28
  87. package/lib/model/strategy/adapter/type.js +0 -17
  88. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +0 -84
  89. package/lib/model/strategy/adapter/walletPass/evaluator.js +0 -421
  90. package/lib/model/strategy/adapter/walletPass/example.d.ts +0 -4
  91. package/lib/model/strategy/adapter/walletPass/example.js +0 -207
  92. package/lib/model/strategy/adapter/walletPass/index.d.ts +0 -32
  93. package/lib/model/strategy/adapter/walletPass/index.js +0 -142
  94. package/lib/model/strategy/adapter/walletPass/locales.d.ts +0 -1
  95. package/lib/model/strategy/adapter/walletPass/locales.js +0 -51
  96. package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -168
  97. package/lib/model/strategy/adapter/walletPass/type.js +0 -17
  98. package/lib/model/strategy/adapter/walletPass/utils.d.ts +0 -76
  99. package/lib/model/strategy/adapter/walletPass/utils.js +0 -704
  100. package/lib/model/strategy/index.d.ts +0 -94
  101. package/lib/model/strategy/index.js +0 -413
  102. package/lib/model/strategy/strategy-example.d.ts +0 -5
  103. package/lib/model/strategy/strategy-example.js +0 -318
  104. package/lib/model/strategy/type.d.ts +0 -228
  105. package/lib/model/strategy/type.js +0 -44
@@ -31,6 +31,7 @@ import { getProductOriginTotalPrice, getProductTotalPrice } from "../Cart/utils"
31
31
  import Decimal from 'decimal.js';
32
32
  import { isBoolean } from 'lodash-es';
33
33
  import dayjs from 'dayjs';
34
+
34
35
  // 临时变量
35
36
  var flatItem;
36
37
  export var RulesModule = /*#__PURE__*/function (_BaseModule) {
@@ -43,8 +44,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
43
44
  _defineProperty(_assertThisInitialized(_this), "defaultName", 'rules');
44
45
  _defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
45
46
  _defineProperty(_assertThisInitialized(_this), "store", void 0);
46
- _defineProperty(_assertThisInitialized(_this), "window", void 0);
47
- // WindowPlugin 实例
48
47
  _defineProperty(_assertThisInitialized(_this), "hooks", void 0);
49
48
  _this.hooks = {};
50
49
  return _this;
@@ -59,8 +58,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
59
58
  this.core = core;
60
59
  this.hooks = options === null || options === void 0 ? void 0 : options.hooks;
61
60
  this.store = options === null || options === void 0 ? void 0 : options.store;
62
- this.window = core.getPlugin('window');
63
- case 4:
61
+ case 3:
64
62
  case "end":
65
63
  return _context.stop();
66
64
  }
@@ -97,12 +95,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
97
95
  value: function getRulesList() {
98
96
  return this.store.rulesList;
99
97
  }
100
- }, {
101
- key: "getWalletPassEvaluator",
102
- value: function getWalletPassEvaluator() {
103
- var _this$window$getWalle, _this$window;
104
- return (_this$window$getWalle = (_this$window = this.window).getWalletPassEvaluator) === null || _this$window$getWalle === void 0 ? void 0 : _this$window$getWalle.call(_this$window);
105
- }
106
98
 
107
99
  // 商品不需要holder,则不需要判断,直接返回true,商品需要holder但是还没填写,那么暂时不使用带有holder的券,直到填写才去匹配
108
100
  }, {
@@ -131,7 +123,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
131
123
  newDiscountList = _ref.newDiscountList,
132
124
  productList = _ref.productList,
133
125
  holders = _ref.holders,
134
- orderTotalAmount = _ref.orderTotalAmount,
135
126
  isFormSubject = _ref.isFormSubject;
136
127
  // 首先检查是否有新的优惠券可应用
137
128
  if (!newDiscountList || newDiscountList.length === 0) {
@@ -166,7 +157,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
166
157
  discountList: mergedDiscountList,
167
158
  productList: _toConsumableArray(productList),
168
159
  holders: holders,
169
- orderTotalAmount: orderTotalAmount,
170
160
  isFormSubject: isFormSubject
171
161
  }, {
172
162
  scan: true
@@ -292,7 +282,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
292
282
  var discountList = _ref2.discountList,
293
283
  productList = _ref2.productList,
294
284
  holders = _ref2.holders,
295
- orderTotalAmount = _ref2.orderTotalAmount,
296
285
  isFormSubject = _ref2.isFormSubject;
297
286
  // 识别出来是不是在编辑的界面里又新增了商品
298
287
  // 这种情况下,如果有可用的优惠券,也会自动勾选上
@@ -540,57 +529,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
540
529
  return priceB.minus(priceA).toNumber();
541
530
  });
542
531
 
543
- // 🔥 为每个折扣卡/商品券执行策略检查并附加config
544
- var evaluator = this.getWalletPassEvaluator();
545
- if (evaluator) {
546
- addModeDiscount.forEach(function (discount) {
547
- var discountType = discount.tag || discount.type;
548
- // 只对 good_pass 和 discount_card 类型执行策略检查
549
- if (['good_pass', 'discount_card', 'product_discount_card'].includes(discountType)) {
550
- var _discount$limited_rel, _discount$limited_rel2;
551
- // 转换 discount 为 Voucher 格式
552
- var voucher = {
553
- id: discount.id,
554
- amount: Number(discount.par_value || 0),
555
- balance: Number(discount.balance || 0),
556
- type: discountType,
557
- product_id: discount.product_id,
558
- unified_available_status: 1,
559
- available_product_type: (_discount$limited_rel = discount.limited_relation_product_data) === null || _discount$limited_rel === void 0 ? void 0 : _discount$limited_rel.type,
560
- available_product_ids: (_discount$limited_rel2 = discount.limited_relation_product_data) === null || _discount$limited_rel2 === void 0 ? void 0 : _discount$limited_rel2.product_ids
561
- };
562
-
563
- // 转换 sortedFlattenedList 为 Product 格式
564
- var productsForEvaluate = sortedFlattenedList.map(function (item) {
565
- return {
566
- product_id: item.id,
567
- price: item.price || 0,
568
- quantity: item.quantity || item.num || 1,
569
- selling_price: item.price || 0
570
- };
571
- });
572
-
573
- // 调用策略检查
574
- var result = evaluator.checkVoucherAvailability({
575
- orderTotalAmount: orderTotalAmount,
576
- products: productsForEvaluate,
577
- vouchers: [voucher]
578
- });
579
-
580
- // 将 config 附加到 discount 对象
581
- if (result.isAvailable) {
582
- discount.config = _objectSpread(_objectSpread({}, result.config), {}, {
583
- isAvailable: true
584
- });
585
- } else {
586
- discount.config = {
587
- isAvailable: false
588
- };
589
- }
590
- }
591
- });
592
- }
593
-
594
532
  /**
595
533
  // 对productList按价格降序排序(用于应用优惠券时优先选择高价商品) 价格相同时使用quantity 排序
596
534
  const sortedProductList = [...productList].sort((a, b) => {
@@ -611,9 +549,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
611
549
  // 标记已使用的优惠券
612
550
  var usedDiscounts = new Map();
613
551
 
614
- // 🔥 统计每个 product_id(商品券商品id)已使用的数量,用于 maxUsagePerOrder 限制
615
- var usedProductIdCounts = new Map();
616
-
617
552
  // 记录每个优惠券适用的商品ID
618
553
  var discountApplicability = new Map();
619
554
 
@@ -843,7 +778,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
843
778
  originProduct = flatItem.originProduct;
844
779
  }
845
780
  addModeDiscount.forEach(function (discount) {
846
- var _product6, _product7, _product8, _product9, _flatItem$bundleItem3, _flatItem$bundleItem4, _discount$config;
781
+ var _product6, _product7, _product8, _product9, _flatItem$bundleItem3, _flatItem$bundleItem4;
847
782
  var limitedData = discount === null || discount === void 0 ? void 0 : discount.limited_relation_product_data;
848
783
  // 拿到discount配置的holder信息 product信息 product.holder 加在 isLimitedProduct
849
784
  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;
@@ -854,7 +789,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
854
789
  var timeLimit = true;
855
790
  timeLimit = !!filterDiscountListByBookingTime([discount], (((_product6 = product) === null || _product6 === void 0 ? void 0 : _product6.startDate) || dayjs()).format('YYYY-MM-DD HH:mm:ss')).length;
856
791
  // 是符合折扣的商品
857
- var isLimitedProduct = (limitedData.type === 'product_all' && limitedData.filter !== 1 || limitedData.type === 'product_all' && limitedData.filter === 1 && !limitedData.exclude_product_ids.includes(product.id) || limitedData.product_ids && limitedData.product_ids.includes(product.id)) && isHolderMatch;
792
+ var isLimitedProduct = (limitedData.type === 'product_all' || limitedData.product_ids && limitedData.product_ids.includes(product.id)) && isHolderMatch;
858
793
 
859
794
  // 编辑的商品 使用了优惠券不可用
860
795
  var isAvailableProduct = flatItem.type === 'main' ? !((_product7 = product) !== null && _product7 !== void 0 && _product7.booking_id && (_product8 = product) !== null && _product8 !== void 0 && (_product8 = _product8.discount_list) !== null && _product8 !== void 0 && _product8.length && (_product9 = product) !== null && _product9 !== void 0 && (_product9 = _product9.discount_list) !== null && _product9 !== void 0 && _product9.every(function (discount) {
@@ -867,7 +802,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
867
802
  var isBundleAvailable = _this3.checkPackageSubItemUsageRules(discount, flatItem);
868
803
 
869
804
  // 判断优惠券是否适用于该商品
870
- if (isAvailableProduct && isLimitedProduct && timeLimit && isBundleAvailable && (_discount$config = discount.config) !== null && _discount$config !== void 0 && _discount$config.isAvailable) {
805
+ if (isAvailableProduct && isLimitedProduct && timeLimit && isBundleAvailable) {
871
806
  var _discountApplicabilit, _discount$metadata4, _discount$metadata5;
872
807
  // 记录此优惠券适用的商品
873
808
  (_discountApplicabilit = discountApplicability.get(discount.id)) === null || _discountApplicabilit === void 0 || _discountApplicabilit.push(product.id);
@@ -891,8 +826,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
891
826
  title: discount.format_title,
892
827
  original_amount: product.price || product.origin_total,
893
828
  pre_value: discount.par_value,
894
- product_id: originProduct.id,
895
- discount_product_id: discount.product_id
829
+ product_id: originProduct.id
896
830
  },
897
831
  metadata: {
898
832
  num: num
@@ -952,16 +886,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
952
886
  // 找到适用于此商品的所有优惠券,仅考虑isSelected不为false的优惠券
953
887
  var applicableDiscounts = sortedDiscountList.filter(function (discount) {
954
888
  var _product$discount_lis3, _product$discount_lis4;
955
- // 🔥 检查策略可用性(针对 good_pass 和折扣卡)
956
- var discountType = discount.tag || discount.type;
957
- if (['good_pass', 'discount_card', 'product_discount_card'].includes(discountType)) {
958
- var _discount$config2;
959
- // 如果策略检查后没有config,说明不可用
960
- if (discount.config === undefined || !(discount !== null && discount !== void 0 && (_discount$config2 = discount.config) !== null && _discount$config2 !== void 0 && _discount$config2.isAvailable)) {
961
- return false;
962
- }
963
- }
964
-
965
889
  // 如果商品价格为 0,其实不需要使用任何优惠券,直接 return true
966
890
  // 商品券时主商品价格为0不可用
967
891
  if ((Number(product.price) <= 0 || !product.price) && !((_product$discount_lis3 = product.discount_list) !== null && _product$discount_lis3 !== void 0 && _product$discount_lis3.length) && (discount.tag || discount.type) === 'good_pass') return false;
@@ -974,18 +898,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
974
898
  // 如果优惠券已被使用,则跳过
975
899
  var targetUsedDiscounts = usedDiscounts.get(discount.id);
976
900
  if (targetUsedDiscounts && (discount.tag || discount.type) === 'good_pass') return false;
977
-
978
- // 🔥 检查 maxUsagePerOrder 限制:同一 product_id 的商品券使用数量不能超过配置值
979
- if ((discount.tag || discount.type) === 'good_pass') {
980
- var _discount$config3;
981
- var maxUsagePerOrder = (_discount$config3 = discount.config) === null || _discount$config3 === void 0 ? void 0 : _discount$config3.maxUsagePerOrder;
982
- if (maxUsagePerOrder && maxUsagePerOrder > 0) {
983
- var currentUsedCount = usedProductIdCounts.get(discount.product_id) || 0;
984
- if (currentUsedCount >= maxUsagePerOrder) {
985
- return false;
986
- }
987
- }
988
- }
989
901
  var limitedData = discount.limited_relation_product_data;
990
902
 
991
903
  // 拿到discount配置的holder信息 product信息 product.holder 不可用return false
@@ -1004,9 +916,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1004
916
 
1005
917
  // 判断优惠券是否适用于该商品
1006
918
  if (limitedData.type === 'product_all') {
1007
- if (limitedData.filter === 1 && limitedData.exclude_product_ids.includes(product.id)) {
1008
- return false;
1009
- }
1010
919
  // 检查 package_sub_item_usage_rules
1011
920
  if (!_this3.checkPackageSubItemUsageRules(discount, flatItem)) {
1012
921
  return false;
@@ -1173,13 +1082,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1173
1082
  var availableGoodPassCount = applicableDiscounts.filter(function (item) {
1174
1083
  return (item.tag || item.type) === 'good_pass';
1175
1084
  }).length;
1176
-
1177
- // 🔥 如果selectedDiscount有config配置,则使用config.maxUsagePerOrder限制使用次数
1178
- var maxUsageLimit = availableGoodPassCount;
1179
- if (selectedDiscount.config && selectedDiscount.config.maxUsagePerOrder) {
1180
- maxUsageLimit = Math.min(availableGoodPassCount, selectedDiscount.config.maxUsagePerOrder);
1181
- }
1182
- var splitCount = isNeedSplit ? Math.min(product.quantity || product.num || 1, maxUsageLimit) : 1;
1085
+ var splitCount = isNeedSplit ? Math.min(totalQuantity, availableGoodPassCount) : 1;
1183
1086
  var arr = [];
1184
1087
 
1185
1088
  // 🔥 主商品和bundle子商品分别处理
@@ -1189,8 +1092,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1189
1092
  arr.push(_this3.hooks.setProduct(originProduct, {
1190
1093
  discount_list: [],
1191
1094
  quantity: totalQuantity - splitCount,
1192
- _id: product._id.split('___')[0],
1193
- total: product.origin_total || product.total
1095
+ _id: product._id.split('___')[0]
1194
1096
  }));
1195
1097
  }
1196
1098
  for (var i = 0; i < splitCount; i++) {
@@ -1199,11 +1101,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1199
1101
  var _selectedDiscount = selectedDiscountCard || applicableDiscounts[i];
1200
1102
  // 标记优惠券为已使用
1201
1103
  usedDiscounts.set(_selectedDiscount.id, true);
1202
- // 🔥 更新 product_id 使用计数
1203
- if ((_selectedDiscount.tag || _selectedDiscount.type) === 'good_pass') {
1204
- var currentCount = usedProductIdCounts.get(_selectedDiscount.product_id) || 0;
1205
- usedProductIdCounts.set(_selectedDiscount.product_id, currentCount + 1);
1206
- }
1207
1104
 
1208
1105
  // 记录实际应用了优惠券的商品信息
1209
1106
  var appliedProducts = appliedDiscountProducts.get(_selectedDiscount.id) || [];
@@ -1237,7 +1134,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1237
1134
  targetProductTotal = getDiscountAmount(_selectedDiscount, product.price, product.price);
1238
1135
  amount = new Decimal(product.price).minus(new Decimal(targetProductTotal)).toNumber();
1239
1136
  }
1240
- var discountType = _selectedDiscount.tag === 'product_discount_card' ? 'discount_card' : _selectedDiscount.tag;
1137
+ var discountType = _selectedDiscount.tag || _selectedDiscount.type;
1241
1138
  var isGoodPass = discountType === 'good_pass';
1242
1139
  var discountDetail = {
1243
1140
  amount: amount,
@@ -1250,12 +1147,10 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1250
1147
  title: _selectedDiscount.format_title,
1251
1148
  original_amount: product.price,
1252
1149
  product_id: originProduct.id,
1253
- percent: _selectedDiscount.par_value,
1254
- discount_product_id: _selectedDiscount.product_id
1150
+ percent: _selectedDiscount.par_value
1255
1151
  },
1256
1152
  // 前端使用的num数量,为了计算优惠金额
1257
1153
  _num: isGoodPass ? 1 : product.num,
1258
- config: _selectedDiscount === null || _selectedDiscount === void 0 ? void 0 : _selectedDiscount.config,
1259
1154
  metadata: _objectSpread({
1260
1155
  num: 1
1261
1156
  }, productDiscountDifference !== undefined && {
@@ -1276,6 +1171,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1276
1171
  // 记录应用了优惠券的商品
1277
1172
  // 后续更新价格改为 getProductTotalPrice getProductOriginTotalPrice逻辑
1278
1173
  if (product.isClient) {
1174
+ debugger;
1279
1175
  arr.push(_this3.hooks.setProduct(originProduct, {
1280
1176
  discount_list: [discountDetail],
1281
1177
  price: _selectedDiscount.tag === 'good_pass' ? 0 : product.price,
@@ -1317,20 +1213,11 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1317
1213
  var _selectedDiscount2$me;
1318
1214
  var _selectedDiscount2 = applicableDiscounts[_i];
1319
1215
  usedDiscounts.set(_selectedDiscount2.id, true);
1320
- // 🔥 更新 product_id 使用计数
1321
- if ((_selectedDiscount2.tag || _selectedDiscount2.type) === 'good_pass') {
1322
- var _currentCount = usedProductIdCounts.get(_selectedDiscount2.product_id) || 0;
1323
- usedProductIdCounts.set(_selectedDiscount2.product_id, _currentCount + 1);
1324
- }
1325
1216
 
1326
1217
  // 🔥 生成唯一的 _id
1327
1218
  var uniqueId = "".concat(flatItem._id, "_split_").concat(_i);
1328
-
1329
- // 计算折扣后的价格(使用 getDiscountAmount,内部已处理 maxDeductionAmount)
1330
- var discountedPrice = getDiscountAmount(_selectedDiscount2, product.origin_total, product.origin_total);
1331
- var bundleDiscountAmount = new Decimal(product.origin_total || 0).minus(discountedPrice).toNumber();
1332
1219
  var _discountDetail = {
1333
- amount: bundleDiscountAmount,
1220
+ amount: product.origin_total,
1334
1221
  type: 'good_pass',
1335
1222
  discount: {
1336
1223
  fixed_amount: product.origin_total,
@@ -1338,16 +1225,14 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1338
1225
  resource_id: _selectedDiscount2.id,
1339
1226
  title: _selectedDiscount2.format_title,
1340
1227
  original_amount: product.origin_total,
1341
- product_id: product.id,
1342
- discount_product_id: _selectedDiscount2.product_id
1228
+ product_id: product.id
1343
1229
  },
1344
1230
  metadata: {
1345
1231
  // 🔥 使用拆分后的唯一 _id
1346
1232
  custom_product_bundle_map_id: uniqueId,
1347
1233
  num: 1
1348
1234
  },
1349
- _num: 1,
1350
- config: _selectedDiscount2 === null || _selectedDiscount2 === void 0 ? void 0 : _selectedDiscount2.config
1235
+ _num: 1
1351
1236
  };
1352
1237
 
1353
1238
  // 记录实际应用的折扣
@@ -1359,9 +1244,9 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1359
1244
  _id: uniqueId,
1360
1245
  num: 1,
1361
1246
  quantity: 1,
1362
- price: discountedPrice,
1363
- // 折扣后的价格
1364
- total: discountedPrice,
1247
+ price: 0,
1248
+ // 商品券价格为0
1249
+ total: 0,
1365
1250
  discount_list: [_discountDetail],
1366
1251
  processed: true,
1367
1252
  _discountId: _selectedDiscount2.id
@@ -1384,11 +1269,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1384
1269
  // 折扣卡:不拆分数量,直接应用
1385
1270
  var _selectedDiscount3 = selectedDiscountCard || applicableDiscounts[0];
1386
1271
  usedDiscounts.set(_selectedDiscount3.id, true);
1387
- // 🔥 更新 product_id 使用计数(虽然此处主要是折扣卡,但保持一致性)
1388
- if ((_selectedDiscount3.tag || _selectedDiscount3.type) === 'good_pass') {
1389
- var _currentCount2 = usedProductIdCounts.get(_selectedDiscount3.product_id) || 0;
1390
- usedProductIdCounts.set(_selectedDiscount3.product_id, _currentCount2 + 1);
1391
- }
1392
1272
  var _productOriginTotal = product.original_price || product.price || 0;
1393
1273
 
1394
1274
  // 🔥 检查是否是 order_level 固定金额折扣卡
@@ -1408,7 +1288,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1408
1288
  _targetProductTotal = getDiscountAmount(_selectedDiscount3, _productOriginTotal, _productOriginTotal);
1409
1289
  fixedAmountPerItem = new Decimal(_productOriginTotal).minus(_targetProductTotal).toNumber();
1410
1290
  }
1411
-
1291
+ debugger;
1412
1292
  // 🔥 使用当前的 _id 作为唯一标识
1413
1293
  var _uniqueId = flatItem._id;
1414
1294
  var _discountDetail2 = {
@@ -1422,8 +1302,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1422
1302
  title: _selectedDiscount3.format_title,
1423
1303
  original_amount: product.original_price,
1424
1304
  product_id: product.id,
1425
- percent: _selectedDiscount3.par_value,
1426
- discount_product_id: _selectedDiscount3.product_id
1305
+ percent: _selectedDiscount3.par_value
1427
1306
  },
1428
1307
  metadata: _objectSpread({
1429
1308
  // 🔥 使用唯一的 _id
@@ -1432,7 +1311,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
1432
1311
  }, _productDiscountDifference !== undefined && {
1433
1312
  product_discount_difference: _productDiscountDifference
1434
1313
  }),
1435
- config: _selectedDiscount3 === null || _selectedDiscount3 === void 0 ? void 0 : _selectedDiscount3.config,
1436
1314
  _num: (product.num || 1) * ((flatItem === null || flatItem === void 0 || (_flatItem$parentProdu9 = flatItem.parentProduct) === null || _flatItem$parentProdu9 === void 0 ? void 0 : _flatItem$parentProdu9.num) || 1)
1437
1315
  };
1438
1316
 
@@ -31,7 +31,6 @@ export interface RulesModuleAPI {
31
31
  holders: {
32
32
  form_record_id: number;
33
33
  }[];
34
- orderTotalAmount: number;
35
34
  isFormSubject: boolean;
36
35
  }) => DiscountResult;
37
36
  }
@@ -1,4 +1,7 @@
1
1
  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); }
2
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ 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; }
2
5
  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; }
3
6
  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); } }
4
7
  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); }); }; }
@@ -86,7 +89,7 @@ export var SummaryModule = /*#__PURE__*/function (_BaseModule) {
86
89
  while (1) switch (_context2.prev = _context2.next) {
87
90
  case 0:
88
91
  _context2.next = 2;
89
- return this.request.get('/order/custom-surcharge/available', {
92
+ return this.request.get('/order/custom-surcharge/available/v2', {
90
93
  channel: 'online-store',
91
94
  is_assemble_product_data: 1,
92
95
  is_assemble_schedule_data: 1,
@@ -111,15 +114,34 @@ export var SummaryModule = /*#__PURE__*/function (_BaseModule) {
111
114
  value: function () {
112
115
  var _getSummary = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(cartItems) {
113
116
  var _this$shopStore$get;
114
- var shopInfo, summary;
117
+ var shopInfo, scheduleModule, needScheduleIds, scheduleList, scheduleById, _iterator, _step, item, summary;
115
118
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
116
119
  while (1) switch (_context3.prev = _context3.next) {
117
120
  case 0:
118
121
  shopInfo = ((_this$shopStore$get = this.shopStore.get('core')) === null || _this$shopStore$get === void 0 || (_this$shopStore$get = _this$shopStore$get.core) === null || _this$shopStore$get === void 0 ? void 0 : _this$shopStore$get.shop) || {};
119
- summary = calculatePriceDetails(shopInfo, cartItems, ScheduleModule.isInScheduleByDate, this.store.surchargeList);
122
+ scheduleModule = this.core.getModule('appointmentBooking_schedule');
123
+ needScheduleIds = this.store.surchargeList.map(function (item) {
124
+ return item.available_schedule_ids;
125
+ }).flat();
126
+ scheduleList = scheduleModule === null || scheduleModule === void 0 ? void 0 : scheduleModule.getScheduleListByIds(needScheduleIds);
127
+ scheduleById = {};
128
+ if (Array.isArray(scheduleList)) {
129
+ _iterator = _createForOfIteratorHelper(scheduleList);
130
+ try {
131
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
132
+ item = _step.value;
133
+ scheduleById[item.id] = item;
134
+ }
135
+ } catch (err) {
136
+ _iterator.e(err);
137
+ } finally {
138
+ _iterator.f();
139
+ }
140
+ }
141
+ summary = calculatePriceDetails(shopInfo, cartItems, ScheduleModule === null || ScheduleModule === void 0 ? void 0 : ScheduleModule.isInScheduleByDate, this.store.surchargeList, scheduleById);
120
142
  this.store.summary = summary;
121
143
  return _context3.abrupt("return", this.store.summary);
122
- case 4:
144
+ case 9:
123
145
  case "end":
124
146
  return _context3.stop();
125
147
  }
@@ -187,6 +209,26 @@ export var SummaryModule = /*#__PURE__*/function (_BaseModule) {
187
209
  key: "getSurchargeforUtils",
188
210
  value: function getSurchargeforUtils(items) {
189
211
  // const surchargeList = this.store.surchargeList;
212
+ var scheduleModule = this.core.getModule('appointmentBooking_schedule');
213
+ var needScheduleIds = this.store.surchargeList.map(function (item) {
214
+ return item.available_schedule_ids;
215
+ }).flat();
216
+ var scheduleList = scheduleModule === null || scheduleModule === void 0 ? void 0 : scheduleModule.getScheduleListByIds(needScheduleIds);
217
+ var scheduleById = {};
218
+ if (Array.isArray(scheduleList)) {
219
+ var _iterator2 = _createForOfIteratorHelper(scheduleList),
220
+ _step2;
221
+ try {
222
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
223
+ var item = _step2.value;
224
+ scheduleById[item.id] = item;
225
+ }
226
+ } catch (err) {
227
+ _iterator2.e(err);
228
+ } finally {
229
+ _iterator2.f();
230
+ }
231
+ }
190
232
  var surchargeList = getSurcharge({
191
233
  service: items,
192
234
  addons: [],
@@ -196,7 +238,7 @@ export var SummaryModule = /*#__PURE__*/function (_BaseModule) {
196
238
  isEdit: false,
197
239
  isInScheduleByDate: ScheduleModule.isInScheduleByDate,
198
240
  surcharge_list: this.store.surchargeList,
199
- scheduleById: {}
241
+ scheduleById: scheduleById
200
242
  });
201
243
  var surchargeAmount = new Decimal(getSurchargeAmount({
202
244
  bookingDetail: null,
@@ -6,8 +6,6 @@ export interface ISummaryState {
6
6
  subtotal: string | number;
7
7
  /** 最终总价 */
8
8
  total: string | number;
9
- /** 最终原始价格 不包含折扣卡商品券折扣 */
10
- originTotal: string | number;
11
9
  /** 税率标题 */
12
10
  taxTitle?: string;
13
11
  /** 商品总费率 */
@@ -1,7 +1,7 @@
1
1
  import Decimal from 'decimal.js';
2
2
  import { CartItem } from '../Cart/types';
3
3
  import { ISummaryState } from './types';
4
- export declare const calculatePriceDetails: (shopInfo: any, items: CartItem[], isInScheduleByDate: any, surchargeList: any[]) => ISummaryState['summary'];
4
+ export declare const calculatePriceDetails: (shopInfo: any, items: CartItem[], isInScheduleByDate: any, surchargeList: any[], scheduleById: Record<string, any>) => ISummaryState['summary'];
5
5
  /**
6
6
  * 获取子商品折扣信息
7
7
  * @param item
@@ -58,12 +58,6 @@ export declare const getTax: ({ service, addons, bookingDetail, bookingId }: {
58
58
  * @returns 商品总价字符串,保留2位小数
59
59
  */
60
60
  export declare const calculateSubtotal: (items: CartItem[]) => string;
61
- /**
62
- * 计算商品小计(不含其他费用 不包含折扣卡商品券抵扣金额)
63
- * @param items - 购物车商品数组
64
- * @returns 商品总价字符串,保留2位小数
65
- */
66
- export declare const calculateOriginSubtotal: (items: CartItem[]) => string;
67
61
  /**
68
62
  * @title: 单个商品的税费
69
63
  * @description: