@pisell/pisellos 0.0.366 → 0.0.368
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/Product/index.d.ts +1 -1
- package/dist/modules/Rules/index.js +6 -5
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Rules/index.js +4 -4
- 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
|
@@ -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
|
}
|
|
@@ -107,12 +107,13 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
107
107
|
var _discount$holder;
|
|
108
108
|
// 非表单类型 holder 视为匹配
|
|
109
109
|
if (((_discount$holder = discount.holder) === null || _discount$holder === void 0 ? void 0 : _discount$holder.holder_type) !== 'form') return true;
|
|
110
|
-
// 卡券 holder 缺失视为不匹配
|
|
111
|
-
if (!discount.holder.holder_id) return false;
|
|
112
|
-
|
|
113
110
|
// 主预约holder, 目前(20251124)默认只考虑单个holder的情况
|
|
114
111
|
var orderHolderId = Array.isArray(holders) && holders.length > 0 ? holders[0].form_record_id : undefined;
|
|
115
112
|
var productHolderId = Array.isArray(product.holder_id) ? product.holder_id[0] : product.holder_id;
|
|
113
|
+
// 父预约及商品都无holder, 则略过检查
|
|
114
|
+
if (!orderHolderId && !productHolderId) return true;
|
|
115
|
+
|
|
116
|
+
// 最终直接匹配 holder 是否相同
|
|
116
117
|
return (productHolderId || orderHolderId) === discount.holder.holder_id;
|
|
117
118
|
}
|
|
118
119
|
|
|
@@ -487,7 +488,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
487
488
|
var limitedData = discount === null || discount === void 0 ? void 0 : discount.limited_relation_product_data;
|
|
488
489
|
// 拿到discount配置的holder信息 product信息 product.holder 加在 isLimitedProduct
|
|
489
490
|
var isHolderMatch = _this3.checkHolderMatch(discount, {
|
|
490
|
-
holder_id:
|
|
491
|
+
holder_id: product.holder_id
|
|
491
492
|
}, holders);
|
|
492
493
|
var timeLimit = true;
|
|
493
494
|
timeLimit = !!filterDiscountListByBookingTime([discount], (((_product = product) === null || _product === void 0 ? void 0 : _product.startDate) || dayjs()).format('YYYY-MM-DD HH:mm:ss')).length;
|
|
@@ -615,7 +616,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
615
616
|
}
|
|
616
617
|
// 拿到discount配置的holder信息 product信息 product.holder 不可用return false
|
|
617
618
|
var isHolderMatch = _this3.checkHolderMatch(discount, {
|
|
618
|
-
holder_id:
|
|
619
|
+
holder_id: product.holder_id
|
|
619
620
|
}, holders);
|
|
620
621
|
// 如果 holder 不匹配,则不适用
|
|
621
622
|
if (!isHolderMatch) return false;
|
|
@@ -308,7 +308,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
308
308
|
date: string;
|
|
309
309
|
status: string;
|
|
310
310
|
week: string;
|
|
311
|
-
weekNum: 0 | 2 | 1 |
|
|
311
|
+
weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
|
|
312
312
|
}[]>;
|
|
313
313
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
314
314
|
private getScheduleDataByIds;
|
|
@@ -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 客户状态
|
|
@@ -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
|
}
|
|
@@ -67,10 +67,10 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
67
67
|
var _a;
|
|
68
68
|
if (((_a = discount.holder) == null ? void 0 : _a.holder_type) !== "form")
|
|
69
69
|
return true;
|
|
70
|
-
if (!discount.holder.holder_id)
|
|
71
|
-
return false;
|
|
72
70
|
const orderHolderId = Array.isArray(holders) && holders.length > 0 ? holders[0].form_record_id : void 0;
|
|
73
71
|
const productHolderId = Array.isArray(product.holder_id) ? product.holder_id[0] : product.holder_id;
|
|
72
|
+
if (!orderHolderId && !productHolderId)
|
|
73
|
+
return true;
|
|
74
74
|
return (productHolderId || orderHolderId) === discount.holder.holder_id;
|
|
75
75
|
}
|
|
76
76
|
// 判断discountList 是否可以对当前productList生效
|
|
@@ -336,7 +336,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
336
336
|
addModeDiscount.forEach((discount) => {
|
|
337
337
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
338
338
|
const limitedData = discount == null ? void 0 : discount.limited_relation_product_data;
|
|
339
|
-
const isHolderMatch = this.checkHolderMatch(discount, { holder_id:
|
|
339
|
+
const isHolderMatch = this.checkHolderMatch(discount, { holder_id: product.holder_id }, holders);
|
|
340
340
|
let timeLimit = true;
|
|
341
341
|
timeLimit = !!(0, import_utils.filterDiscountListByBookingTime)([discount], ((product == null ? void 0 : product.startDate) || (0, import_dayjs.default)()).format("YYYY-MM-DD HH:mm:ss")).length;
|
|
342
342
|
const 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;
|
|
@@ -443,7 +443,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
443
443
|
if (!timeLimit) {
|
|
444
444
|
return false;
|
|
445
445
|
}
|
|
446
|
-
const isHolderMatch = this.checkHolderMatch(discount, { holder_id:
|
|
446
|
+
const isHolderMatch = this.checkHolderMatch(discount, { holder_id: product.holder_id }, holders);
|
|
447
447
|
if (!isHolderMatch)
|
|
448
448
|
return false;
|
|
449
449
|
if (limitedData.type === "product_all") {
|
|
@@ -308,7 +308,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
308
308
|
date: string;
|
|
309
309
|
status: string;
|
|
310
310
|
week: string;
|
|
311
|
-
weekNum: 0 | 2 | 1 |
|
|
311
|
+
weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
|
|
312
312
|
}[]>;
|
|
313
313
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
314
314
|
private getScheduleDataByIds;
|
|
@@ -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 商品列表
|