@pisell/pisellos 0.0.434 → 0.0.435
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/Summary/utils.js +2 -3
- package/dist/solution/BookingByStep/index.js +5 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/Summary/utils.js +2 -3
- package/lib/solution/BookingByStep/index.js +3 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -336,7 +336,6 @@ var processItemsTax = function processItemsTax(items, _ref2, options) {
|
|
|
336
336
|
var bundlePreciseTax = new Decimal(0);
|
|
337
337
|
var bundleRoundedOriginTax = new Decimal(0);
|
|
338
338
|
var bundleRoundedTax = new Decimal(0);
|
|
339
|
-
debugger;
|
|
340
339
|
if (Array.isArray(item === null || item === void 0 ? void 0 : item.bundle)) {
|
|
341
340
|
var _iterator3 = _createForOfIteratorHelper(item === null || item === void 0 ? void 0 : item.bundle),
|
|
342
341
|
_step3;
|
|
@@ -678,9 +677,9 @@ var getDiscountAmount = function getDiscountAmount(discounts) {
|
|
|
678
677
|
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
679
678
|
*/
|
|
680
679
|
var getMainProductTotal = function getMainProductTotal(item) {
|
|
681
|
-
var _ref7, _ref8, _item$main_product_se, _item$metadata, _item$_origin3, _item$_originData
|
|
680
|
+
var _ref7, _ref8, _item$main_product_se, _item$metadata, _item$_origin3, _item$_originData;
|
|
682
681
|
var total = new Decimal((_ref7 = (_ref8 = (_item$main_product_se = item === null || item === void 0 ? void 0 : item.main_product_selling_price) !== null && _item$main_product_se !== void 0 ? _item$main_product_se : item === null || item === void 0 || (_item$metadata = item.metadata) === null || _item$metadata === void 0 ? void 0 : _item$metadata.main_product_selling_price) !== null && _ref8 !== void 0 ? _ref8 : item.price) !== null && _ref7 !== void 0 ? _ref7 : 0);
|
|
683
|
-
var mainProductDiscountAmount = getDiscountAmount((item === null || item === void 0 || (_item$_origin3 = item._origin) === null || _item$_origin3 === void 0 || (_item$_origin3 = _item$_origin3.product) === null || _item$_origin3 === void 0 ? void 0 : _item$_origin3.discount_list) || (item === null || item === void 0 || (_item$_originData
|
|
682
|
+
var mainProductDiscountAmount = getDiscountAmount((item === null || item === void 0 || (_item$_origin3 = item._origin) === null || _item$_origin3 === void 0 || (_item$_origin3 = _item$_origin3.product) === null || _item$_origin3 === void 0 ? void 0 : _item$_origin3.discount_list) || (item === null || item === void 0 || (_item$_originData = item._originData) === null || _item$_originData === void 0 || (_item$_originData = _item$_originData.product) === null || _item$_originData === void 0 ? void 0 : _item$_originData.discount_list) || []);
|
|
684
683
|
total = total.minus(mainProductDiscountAmount);
|
|
685
684
|
|
|
686
685
|
// 单规格
|
|
@@ -1163,7 +1163,6 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1163
1163
|
var productData = _objectSpread(_objectSpread({}, origin), {}, {
|
|
1164
1164
|
product_variant_id: product_variant_id
|
|
1165
1165
|
});
|
|
1166
|
-
debugger;
|
|
1167
1166
|
// 保护,如果进来的是 session 商品,则必须要有 date 和时间片,否则不允许添加
|
|
1168
1167
|
if (isSessionProduct(productData)) {
|
|
1169
1168
|
if (!date || !date.startTime || !date.endTime) {
|
|
@@ -2138,6 +2137,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2138
2137
|
}
|
|
2139
2138
|
});
|
|
2140
2139
|
}
|
|
2140
|
+
|
|
2141
|
+
// 如果依然 resources 空的,则证明他是切换日期了,此时直接从 date 模块里取
|
|
2142
|
+
if (resources.length === 0) {
|
|
2143
|
+
resources.push.apply(resources, _toConsumableArray(this.store.date.getResourcesListByDate(dateRange[0].date) || []));
|
|
2144
|
+
}
|
|
2141
2145
|
var resourcesMap = getResourcesMap(resources);
|
|
2142
2146
|
var duration = 0;
|
|
2143
2147
|
// duration = 不同账号的最长时间
|
|
@@ -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, "
|
|
126
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
127
127
|
/**
|
|
128
128
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
129
129
|
* @returns 客户状态
|
|
@@ -212,7 +212,6 @@ var processItemsTax = (items, { bookingDetail, bookingId }, options) => {
|
|
|
212
212
|
let bundlePreciseTax = new import_decimal.default(0);
|
|
213
213
|
let bundleRoundedOriginTax = new import_decimal.default(0);
|
|
214
214
|
let bundleRoundedTax = new import_decimal.default(0);
|
|
215
|
-
debugger;
|
|
216
215
|
if (Array.isArray(item == null ? void 0 : item.bundle)) {
|
|
217
216
|
for (let bundleItem of item == null ? void 0 : item.bundle) {
|
|
218
217
|
if (getBundleItemIsOriginalPrice(bundleItem)) {
|
|
@@ -409,9 +408,9 @@ var getDiscountAmount = (discounts) => {
|
|
|
409
408
|
}, new import_decimal.default(0)).toNumber();
|
|
410
409
|
};
|
|
411
410
|
var getMainProductTotal = (item) => {
|
|
412
|
-
var _a, _b, _c, _d;
|
|
411
|
+
var _a, _b, _c, _d, _e;
|
|
413
412
|
let total = new import_decimal.default((item == null ? void 0 : item.main_product_selling_price) ?? ((_a = item == null ? void 0 : item.metadata) == null ? void 0 : _a.main_product_selling_price) ?? item.price ?? 0);
|
|
414
|
-
const mainProductDiscountAmount = getDiscountAmount(((_c = (_b = item == null ? void 0 : item._origin) == null ? void 0 : _b.product) == null ? void 0 : _c.discount_list) || ((_d = item == null ? void 0 : item._originData.product) == null ? void 0 :
|
|
413
|
+
const mainProductDiscountAmount = getDiscountAmount(((_c = (_b = item == null ? void 0 : item._origin) == null ? void 0 : _b.product) == null ? void 0 : _c.discount_list) || ((_e = (_d = item == null ? void 0 : item._originData) == null ? void 0 : _d.product) == null ? void 0 : _e.discount_list) || []);
|
|
415
414
|
total = total.minus(mainProductDiscountAmount);
|
|
416
415
|
if ((item == null ? void 0 : item.option) && Array.isArray(item == null ? void 0 : item.option)) {
|
|
417
416
|
total = total.add(item == null ? void 0 : item.option.reduce((t, option) => {
|
|
@@ -608,7 +608,6 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
608
608
|
quantity = 1
|
|
609
609
|
} = product || {};
|
|
610
610
|
const productData = { ...origin, product_variant_id };
|
|
611
|
-
debugger;
|
|
612
611
|
if ((0, import_products.isSessionProduct)(productData)) {
|
|
613
612
|
if (!date || !date.startTime || !date.endTime) {
|
|
614
613
|
return { success: false, errorCode: "date_or_time_required" };
|
|
@@ -1464,6 +1463,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1464
1463
|
}
|
|
1465
1464
|
});
|
|
1466
1465
|
}
|
|
1466
|
+
if (resources.length === 0) {
|
|
1467
|
+
resources.push(...this.store.date.getResourcesListByDate(dateRange[0].date) || []);
|
|
1468
|
+
}
|
|
1467
1469
|
const resourcesMap = (0, import_utils2.getResourcesMap)(resources);
|
|
1468
1470
|
let duration = 0;
|
|
1469
1471
|
const accountList = this.store.accountList.getAccounts();
|
|
@@ -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, "
|
|
126
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
127
127
|
/**
|
|
128
128
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
129
129
|
* @returns 客户状态
|