@pisell/pisellos 2.0.69 → 2.0.70

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.
@@ -323,7 +323,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
323
323
  console.log(sortedProductList, 'sortedProductListsortedProductList');
324
324
 
325
325
  // 然后再处理应用哪些优惠券,此时只考虑filteredDiscountList中的优惠券
326
- sortedProductList.forEach(function (originProduct, i) {
326
+ sortedProductList.forEach(function (originProduct, index) {
327
327
  var _product$discount_lis4, _product$discount_lis5, _product$discount_lis7, _product$discount_lis8, _product$discount_lis9, _product$discount_lis10;
328
328
  var product = _this3.hooks.getProduct(originProduct);
329
329
  if (product !== null && product !== void 0 && product.booking_id && (_product$discount_lis4 = product.discount_list) !== null && _product$discount_lis4 !== void 0 && _product$discount_lis4.length && product !== null && product !== void 0 && (_product$discount_lis5 = product.discount_list) !== null && _product$discount_lis5 !== void 0 && _product$discount_lis5.every(function (discount) {
@@ -406,7 +406,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
406
406
  }))]);
407
407
  } else {
408
408
  processedProductsMap.set(product._id, [_this3.hooks.setProduct(originProduct, _objectSpread(_objectSpread({}, isManualDiscount ? {} : {
409
- _id: product._id.split('___')[0] + '___' + i,
409
+ _id: product._id.split('___')[0] + '___' + index,
410
410
  total: product.origin_total || product.total,
411
411
  price: product.price
412
412
  }), {}, {
@@ -434,10 +434,10 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
434
434
  _id: product._id.split('___')[0]
435
435
  }));
436
436
  }
437
- for (var _i = 0; _i < splitCount; _i++) {
437
+ for (var i = 0; i < splitCount; i++) {
438
438
  var _product$discount_lis11, _originProduct$_produ;
439
439
  // 如果用过折扣卡,也就不存在拆分的情况了,这里直接使用上面计算出来的折扣卡
440
- var _selectedDiscount = selectedDiscountCard || applicableDiscounts[_i];
440
+ var _selectedDiscount = selectedDiscountCard || applicableDiscounts[i];
441
441
  // 标记优惠券为已使用
442
442
  usedDiscounts.set(_selectedDiscount.id, true);
443
443
 
@@ -498,7 +498,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
498
498
  } else {
499
499
  arr.push(_this3.hooks.setProduct(originProduct, {
500
500
  discount_list: [discountDetail],
501
- _id: product._id.split('___')[0] + "___" + _selectedDiscount.id,
501
+ _id: product._id.split('___')[0] + "___" + _selectedDiscount.id + index,
502
502
  price: _selectedDiscount.tag === 'good_pass' ? 0 : product.price,
503
503
  quantity: isNeedSplit ? 1 : product.quantity,
504
504
  total: targetProductTotal,
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
111
111
  * 获取当前的客户搜索条件
112
112
  * @returns 当前搜索条件
113
113
  */
114
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
114
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
115
115
  /**
116
116
  * 获取客户列表状态(包含滚动加载相关状态)
117
117
  * @returns 客户状态
@@ -211,7 +211,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
211
211
  });
212
212
  });
213
213
  console.log(sortedProductList, "sortedProductListsortedProductList");
214
- sortedProductList.forEach((originProduct, i) => {
214
+ sortedProductList.forEach((originProduct, index) => {
215
215
  var _a, _b, _c, _d, _e, _f, _g, _h;
216
216
  const product = this.hooks.getProduct(originProduct);
217
217
  if ((product == null ? void 0 : product.booking_id) && ((_a = product.discount_list) == null ? void 0 : _a.length) && ((_b = product == null ? void 0 : product.discount_list) == null ? void 0 : _b.every((discount) => discount.id && ["good_pass", "discount_card", "product_discount_card"].includes(discount.tag || discount.type)))) {
@@ -279,7 +279,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
279
279
  product._id,
280
280
  [this.hooks.setProduct(originProduct, {
281
281
  ...isManualDiscount ? {} : {
282
- _id: product._id.split("___")[0] + "___" + i,
282
+ _id: product._id.split("___")[0] + "___" + index,
283
283
  total: product.origin_total || product.total,
284
284
  price: product.price
285
285
  },
@@ -302,8 +302,8 @@ var RulesModule = class extends import_BaseModule.BaseModule {
302
302
  _id: product._id.split("___")[0]
303
303
  }));
304
304
  }
305
- for (let i2 = 0; i2 < splitCount; i2++) {
306
- const selectedDiscount2 = selectedDiscountCard || applicableDiscounts[i2];
305
+ for (let i = 0; i < splitCount; i++) {
306
+ const selectedDiscount2 = selectedDiscountCard || applicableDiscounts[i];
307
307
  usedDiscounts.set(selectedDiscount2.id, true);
308
308
  const appliedProducts = appliedDiscountProducts.get(selectedDiscount2.id) || [];
309
309
  let productOriginTotal = product.origin_total || product.total || 0;
@@ -350,7 +350,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
350
350
  } else {
351
351
  arr.push(this.hooks.setProduct(originProduct, {
352
352
  discount_list: [discountDetail],
353
- _id: product._id.split("___")[0] + "___" + selectedDiscount2.id,
353
+ _id: product._id.split("___")[0] + "___" + selectedDiscount2.id + index,
354
354
  price: selectedDiscount2.tag === "good_pass" ? 0 : product.price,
355
355
  quantity: isNeedSplit ? 1 : product.quantity,
356
356
  total: targetProductTotal,
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
111
111
  * 获取当前的客户搜索条件
112
112
  * @returns 当前搜索条件
113
113
  */
114
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
114
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
115
115
  /**
116
116
  * 获取客户列表状态(包含滚动加载相关状态)
117
117
  * @returns 客户状态
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.0.69",
4
+ "version": "2.0.70",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",