@pisell/pisellos 2.1.59 → 2.1.61
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/modules/Customer/index.js +1 -1
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/Rules/index.js +3 -7
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/Customer/index.js +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Rules/index.js +1 -5
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +6 -0
- package/package.json +1 -1
|
@@ -153,7 +153,7 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
153
153
|
skip: skip,
|
|
154
154
|
num: num,
|
|
155
155
|
sort_by: SORT_BY,
|
|
156
|
-
with: ['latestWalletDetail.wallet', 'contactsInfo'],
|
|
156
|
+
with: ['latestWalletDetail.wallet', 'contactsInfo', 'formRecord'],
|
|
157
157
|
search_wallet_flag: 1,
|
|
158
158
|
search_wallet_pass_flag: 1
|
|
159
159
|
}, search && {
|
|
@@ -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(): "
|
|
52
|
+
getProductType(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -540,15 +540,12 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
540
540
|
var _product$discount_lis3, _product$discount_lis4;
|
|
541
541
|
// 如果商品价格为 0,其实不需要使用任何优惠券,直接 return true
|
|
542
542
|
// 商品券时主商品价格为0不可用
|
|
543
|
-
if ((Number(product.price) <= 0 || !product.price) && !((_product$discount_lis3 = product.discount_list) !== null && _product$discount_lis3 !== void 0 && _product$discount_lis3.
|
|
544
|
-
var _n$discount;
|
|
545
|
-
return ((_n$discount = n.discount) === null || _n$discount === void 0 ? void 0 : _n$discount.resource_id) === discount.id;
|
|
546
|
-
})) && (discount.tag || discount.type) === 'good_pass') return false;
|
|
543
|
+
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;
|
|
547
544
|
|
|
548
545
|
// 折扣卡商品价格为0时不可用
|
|
549
546
|
if ((Number(product.price) <= 0 || !product.price) && !((_product$discount_lis4 = product.discount_list) !== null && _product$discount_lis4 !== void 0 && _product$discount_lis4.find(function (n) {
|
|
550
|
-
var _n$
|
|
551
|
-
return ((_n$
|
|
547
|
+
var _n$discount;
|
|
548
|
+
return ((_n$discount = n.discount) === null || _n$discount === void 0 ? void 0 : _n$discount.resource_id) === discount.id;
|
|
552
549
|
})) && (discount.tag || discount.type) !== 'good_pass') return false;
|
|
553
550
|
// 如果优惠券已被使用,则跳过
|
|
554
551
|
var targetUsedDiscounts = usedDiscounts.get(discount.id);
|
|
@@ -991,7 +988,6 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
991
988
|
|
|
992
989
|
// 检查是否有bundle子商品需要重组
|
|
993
990
|
var hasBundle = product.bundle && Array.isArray(product.bundle) && product.bundle.length > 0;
|
|
994
|
-
debugger;
|
|
995
991
|
if (!hasBundle) {
|
|
996
992
|
// 没有bundle,直接使用主商品处理结果
|
|
997
993
|
result.push.apply(result, _toConsumableArray(mainProductArr));
|
|
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
342
342
|
};
|
|
343
343
|
setOtherData(key: string, value: any): void;
|
|
344
344
|
getOtherData(key: string): any;
|
|
345
|
-
getProductTypeById(id: number): Promise<"
|
|
345
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
346
346
|
/**
|
|
347
347
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
348
348
|
*
|
|
@@ -115,7 +115,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
115
115
|
* 获取当前的客户搜索条件
|
|
116
116
|
* @returns 当前搜索条件
|
|
117
117
|
*/
|
|
118
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
118
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
119
119
|
/**
|
|
120
120
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
121
121
|
* @returns 客户状态
|
|
@@ -101,7 +101,7 @@ var CustomerModule = class extends import_BaseModule.BaseModule {
|
|
|
101
101
|
skip,
|
|
102
102
|
num,
|
|
103
103
|
sort_by: import_constants.SORT_BY,
|
|
104
|
-
with: ["latestWalletDetail.wallet", "contactsInfo"],
|
|
104
|
+
with: ["latestWalletDetail.wallet", "contactsInfo", "formRecord"],
|
|
105
105
|
search_wallet_flag: 1,
|
|
106
106
|
search_wallet_pass_flag: 1,
|
|
107
107
|
...search && { search },
|
|
@@ -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(): "
|
|
52
|
+
getProductType(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -367,10 +367,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
367
367
|
}
|
|
368
368
|
const applicableDiscounts = sortedDiscountList.filter((discount) => {
|
|
369
369
|
var _a2, _b2;
|
|
370
|
-
if ((Number(product.price) <= 0 || !product.price) && !((_a2 = product.discount_list) == null ? void 0 : _a2.
|
|
371
|
-
var _a3;
|
|
372
|
-
return ((_a3 = n.discount) == null ? void 0 : _a3.resource_id) === discount.id;
|
|
373
|
-
})) && (discount.tag || discount.type) === "good_pass")
|
|
370
|
+
if ((Number(product.price) <= 0 || !product.price) && !((_a2 = product.discount_list) == null ? void 0 : _a2.length) && (discount.tag || discount.type) === "good_pass")
|
|
374
371
|
return false;
|
|
375
372
|
if ((Number(product.price) <= 0 || !product.price) && !((_b2 = product.discount_list) == null ? void 0 : _b2.find((n) => {
|
|
376
373
|
var _a3;
|
|
@@ -756,7 +753,6 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
756
753
|
return;
|
|
757
754
|
}
|
|
758
755
|
const hasBundle = product.bundle && Array.isArray(product.bundle) && product.bundle.length > 0;
|
|
759
|
-
debugger;
|
|
760
756
|
if (!hasBundle) {
|
|
761
757
|
result.push(...mainProductArr);
|
|
762
758
|
} else {
|
|
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
342
342
|
};
|
|
343
343
|
setOtherData(key: string, value: any): void;
|
|
344
344
|
getOtherData(key: string): any;
|
|
345
|
-
getProductTypeById(id: number): Promise<"
|
|
345
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
346
346
|
/**
|
|
347
347
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
348
348
|
*
|
|
@@ -115,7 +115,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
115
115
|
* 获取当前的客户搜索条件
|
|
116
116
|
* @returns 当前搜索条件
|
|
117
117
|
*/
|
|
118
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
118
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
119
119
|
/**
|
|
120
120
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
121
121
|
* @returns 客户状态
|
|
@@ -122,6 +122,12 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
|
|
|
122
122
|
throw error;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* 初始化外设扫码结果监听
|
|
127
|
+
*/
|
|
128
|
+
initPeripheralsListener() {
|
|
129
|
+
this.scan.initPeripheralsListener();
|
|
130
|
+
}
|
|
125
131
|
/**
|
|
126
132
|
* 获取商品列表(不加载到模块中)
|
|
127
133
|
* @returns 商品列表
|