@pisell/pisellos 2.2.10 → 2.2.11
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/Cart/utils/cartProduct.js +26 -41
- package/dist/modules/Customer/index.js +1 -1
- package/dist/modules/Discount/index.d.ts +0 -2
- package/dist/modules/Discount/index.js +36 -69
- package/dist/modules/Discount/types.d.ts +0 -16
- package/dist/modules/Order/index.js +1 -4
- package/dist/modules/Order/utils.d.ts +0 -1
- package/dist/modules/Order/utils.js +0 -9
- package/dist/modules/Payment/index.js +2 -2
- package/dist/modules/Payment/types.d.ts +0 -1
- package/dist/modules/Payment/walletpass.js +1 -3
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/ProductList/index.js +9 -8
- package/dist/modules/Rules/index.d.ts +0 -7
- package/dist/modules/Rules/index.js +196 -1065
- package/dist/modules/Rules/types.d.ts +1 -4
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.js +8 -30
- package/dist/solution/BookingByStep/utils/products.d.ts +0 -6
- package/dist/solution/BookingByStep/utils/products.js +0 -10
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/Checkout/index.js +49 -93
- package/dist/solution/ShopDiscount/index.d.ts +0 -2
- package/dist/solution/ShopDiscount/index.js +19 -80
- package/dist/solution/ShopDiscount/types.d.ts +1 -4
- package/dist/solution/ShopDiscount/utils.d.ts +0 -55
- package/dist/solution/ShopDiscount/utils.js +3 -432
- package/lib/modules/Cart/utils/cartProduct.js +22 -35
- package/lib/modules/Customer/index.js +1 -1
- package/lib/modules/Discount/index.d.ts +0 -2
- package/lib/modules/Discount/index.js +4 -19
- package/lib/modules/Discount/types.d.ts +0 -16
- package/lib/modules/Order/index.js +0 -2
- package/lib/modules/Order/utils.d.ts +0 -1
- package/lib/modules/Order/utils.js +0 -11
- package/lib/modules/Payment/index.js +1 -1
- package/lib/modules/Payment/types.d.ts +0 -1
- package/lib/modules/Payment/walletpass.js +1 -10
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/ProductList/index.js +7 -0
- package/lib/modules/Rules/index.d.ts +0 -7
- package/lib/modules/Rules/index.js +182 -824
- package/lib/modules/Rules/types.d.ts +1 -4
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.js +2 -19
- package/lib/solution/BookingByStep/utils/products.d.ts +0 -6
- package/lib/solution/BookingByStep/utils/products.js +2 -8
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/Checkout/index.js +19 -68
- package/lib/solution/ShopDiscount/index.d.ts +0 -2
- package/lib/solution/ShopDiscount/index.js +9 -55
- package/lib/solution/ShopDiscount/types.d.ts +1 -4
- package/lib/solution/ShopDiscount/utils.d.ts +0 -55
- package/lib/solution/ShopDiscount/utils.js +3 -266
- package/package.json +2 -2
|
@@ -115,8 +115,6 @@ var OrderModule = class extends import_BaseModule.BaseModule {
|
|
|
115
115
|
item._origin.duration = duration;
|
|
116
116
|
item._origin.sub_type = durationType;
|
|
117
117
|
}
|
|
118
|
-
const discountList = (0, import_utils.getAllDiscountList)(item);
|
|
119
|
-
item._origin.product.discount_list = discountList;
|
|
120
118
|
if ((0, import_utils2.isNormalProduct)(item._origin)) {
|
|
121
119
|
order.relation_products.push(item._origin.product);
|
|
122
120
|
const relationForms = item._origin.relation_forms || [];
|
|
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
32
|
generateDuration: () => generateDuration,
|
|
33
|
-
getAllDiscountList: () => getAllDiscountList,
|
|
34
33
|
mergeRelationForms: () => mergeRelationForms
|
|
35
34
|
});
|
|
36
35
|
module.exports = __toCommonJS(utils_exports);
|
|
@@ -56,18 +55,8 @@ var mergeRelationForms = (relationForms) => {
|
|
|
56
55
|
}, {})
|
|
57
56
|
).filter((item) => item.form_record_ids.length > 0);
|
|
58
57
|
};
|
|
59
|
-
var getAllDiscountList = (cartItem) => {
|
|
60
|
-
var _a, _b, _c, _d;
|
|
61
|
-
let discountList = ((_b = (_a = cartItem == null ? void 0 : cartItem._origin) == null ? void 0 : _a.product) == null ? void 0 : _b.discount_list) || [];
|
|
62
|
-
(((_d = (_c = cartItem == null ? void 0 : cartItem._origin) == null ? void 0 : _c.product) == null ? void 0 : _d.product_bundle) || []).forEach((item) => {
|
|
63
|
-
discountList = [...discountList, ...item.discount_list || []];
|
|
64
|
-
item.discount_list = void 0;
|
|
65
|
-
});
|
|
66
|
-
return discountList;
|
|
67
|
-
};
|
|
68
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
59
|
0 && (module.exports = {
|
|
70
60
|
generateDuration,
|
|
71
|
-
getAllDiscountList,
|
|
72
61
|
mergeRelationForms
|
|
73
62
|
});
|
|
@@ -623,7 +623,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
623
623
|
this.logInfo("更新订单支付项完成", {
|
|
624
624
|
orderUuid
|
|
625
625
|
});
|
|
626
|
-
this.core.effects.emit(
|
|
626
|
+
this.core.effects.emit(import_types.PaymentHooks.OnPaymentAdded, {
|
|
627
627
|
orderUuid,
|
|
628
628
|
payment: newPaymentItem
|
|
629
629
|
});
|
|
@@ -51,19 +51,10 @@ var WalletPassPaymentImpl = class {
|
|
|
51
51
|
*/
|
|
52
52
|
generateWalletParams(businessData) {
|
|
53
53
|
var _a, _b;
|
|
54
|
-
const {
|
|
55
|
-
customer_id,
|
|
56
|
-
holder,
|
|
57
|
-
amountInfo,
|
|
58
|
-
products,
|
|
59
|
-
order_wait_pay_amount,
|
|
60
|
-
payment_order_id,
|
|
61
|
-
is_price_include_tax
|
|
62
|
-
} = businessData;
|
|
54
|
+
const { customer_id, holder, amountInfo, products, order_wait_pay_amount, payment_order_id } = businessData;
|
|
63
55
|
const totalAmount = Number(amountInfo.totalAmount);
|
|
64
56
|
const subTotal = Number(amountInfo.subTotal);
|
|
65
57
|
const walletParams = {
|
|
66
|
-
is_price_include_tax,
|
|
67
58
|
sale_channel: "pos",
|
|
68
59
|
customer_id: customer_id || 0,
|
|
69
60
|
// 提供默认值,确保类型为 number
|
|
@@ -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(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -103,6 +103,13 @@ var ProductList = class extends import_BaseModule.BaseModule {
|
|
|
103
103
|
{ osServer: true }
|
|
104
104
|
);
|
|
105
105
|
const sortedList = (productsData.data.list || []).slice().sort((a, b) => Number(b.sort) - Number(a.sort));
|
|
106
|
+
if (sortedList.length) {
|
|
107
|
+
sortedList.forEach((n) => {
|
|
108
|
+
if (n.is_eject !== 1 && n["schedule.ids"] && n["schedule.ids"].length) {
|
|
109
|
+
n.is_eject = 1;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
106
113
|
this.addProduct(sortedList);
|
|
107
114
|
return sortedList;
|
|
108
115
|
}
|
|
@@ -37,13 +37,6 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
|
|
|
37
37
|
selectedList?: SetDiscountSelectedParams[];
|
|
38
38
|
scan?: boolean;
|
|
39
39
|
}): DiscountResult;
|
|
40
|
-
/**
|
|
41
|
-
* 检查优惠是否符合 PackageSubItemUsageRules 配置
|
|
42
|
-
* @param discount 优惠券
|
|
43
|
-
* @param flatItem 扁平化后的商品项(可能是主商品或bundle子商品)
|
|
44
|
-
* @returns 是否可用
|
|
45
|
-
*/
|
|
46
|
-
private checkPackageSubItemUsageRules;
|
|
47
40
|
destroy(): Promise<void>;
|
|
48
41
|
clear(): Promise<void>;
|
|
49
42
|
}
|