@pisell/pisellos 2.2.38 → 2.2.39

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.
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -344,7 +344,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
344
344
  };
345
345
  setOtherData(key: string, value: any): void;
346
346
  getOtherData(key: string): any;
347
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
347
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
348
348
  /**
349
349
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
350
350
  *
@@ -123,7 +123,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
123
123
  * 获取当前的客户搜索条件
124
124
  * @returns 当前搜索条件
125
125
  */
126
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
126
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
127
127
  /**
128
128
  * 获取客户列表状态(包含滚动加载相关状态)
129
129
  * @returns 客户状态
@@ -909,7 +909,7 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
909
909
  // 原有逻辑:保留现有支付项
910
910
  totalAmount = new Decimal(amountInfo.totalAmount || '0');
911
911
  activePayments = (existingOrder.payment || []).filter(function (p) {
912
- return p.status !== 'voided';
912
+ return p.status !== 'voided' && (!p.voucher_id || p.voucher_id && p.isSynced);
913
913
  });
914
914
  paidAmount = activePayments.reduce(function (sum, p) {
915
915
  var amt = new Decimal(p.amount || '0');
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -344,7 +344,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
344
344
  };
345
345
  setOtherData(key: string, value: any): void;
346
346
  getOtherData(key: string): any;
347
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
347
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
348
348
  /**
349
349
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
350
350
  *
@@ -123,7 +123,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
123
123
  * 获取当前的客户搜索条件
124
124
  * @returns 当前搜索条件
125
125
  */
126
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
126
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
127
127
  /**
128
128
  * 获取客户列表状态(包含滚动加载相关状态)
129
129
  * @returns 客户状态
@@ -622,7 +622,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
622
622
  }
623
623
  const totalAmount = new import_decimal.default(amountInfo.totalAmount || "0");
624
624
  const activePayments = (existingOrder.payment || []).filter(
625
- (p) => p.status !== "voided"
625
+ (p) => p.status !== "voided" && (!p.voucher_id || p.voucher_id && p.isSynced)
626
626
  );
627
627
  const paidAmount = activePayments.reduce((sum, p) => {
628
628
  const amt = new import_decimal.default(p.amount || "0");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.38",
4
+ "version": "2.2.39",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",