@pisell/pisellos 2.3.145 → 2.3.146
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/Order/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +6 -2
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +7 -1
- package/package.json +1 -1
|
@@ -593,7 +593,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
593
593
|
generateIdempotencyToken(): string;
|
|
594
594
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
595
595
|
createOrder(params: CommitOrderParams['query']): {
|
|
596
|
-
type: "
|
|
596
|
+
type: "virtual" | "appointment_booking";
|
|
597
597
|
platform: string;
|
|
598
598
|
sales_channel: string;
|
|
599
599
|
order_sales_channel: string;
|
|
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
328
328
|
date: string;
|
|
329
329
|
status: string;
|
|
330
330
|
week: string;
|
|
331
|
-
weekNum: 0 |
|
|
331
|
+
weekNum: 0 | 1 | 2 | 5 | 4 | 3 | 6;
|
|
332
332
|
}[]>;
|
|
333
333
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
334
334
|
private getScheduleDataByIds;
|
|
@@ -54,8 +54,12 @@ function _processScannedProductItem() {
|
|
|
54
54
|
}
|
|
55
55
|
return _context.abrupt("return", runRequiresDetailFlow(host, item, ctx, bridge));
|
|
56
56
|
case 5:
|
|
57
|
-
values = genScanProductValues(item, code);
|
|
58
|
-
|
|
57
|
+
values = genScanProductValues(item, code); // 条码已唯一命中某个规格时,商品目录的 price 可能是“最低规格价”。
|
|
58
|
+
// 仅在扫码预选规格的这条路径改用命中规格价,避免影响商品卡片和手工选规格。
|
|
59
|
+
itemWithSelection = values.price === undefined ? _objectSpread(_objectSpread({}, item), {}, {
|
|
60
|
+
cartDetailValue: values
|
|
61
|
+
}) : _objectSpread(_objectSpread({}, item), {}, {
|
|
62
|
+
price: values.price,
|
|
59
63
|
cartDetailValue: values
|
|
60
64
|
});
|
|
61
65
|
decision = host.decideAddProduct(itemWithSelection, ctx);
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BUY_X_GET_Y_FREE_STRATEGY", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _examples.BUY_X_GET_Y_FREE_STRATEGY;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ITEM_REWARD_STRATEGY", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _examples.ITEM_REWARD_STRATEGY;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "PromotionAdapter", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _adapter.PromotionAdapter;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "PromotionEvaluator", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _evaluator.PromotionEvaluator;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "X_ITEMS_FOR_Y_PRICE_STRATEGY", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _examples.X_ITEMS_FOR_Y_PRICE_STRATEGY;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "default", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _adapter.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var _evaluator = require("./evaluator");
|
|
43
|
-
var _adapter = _interopRequireWildcard(require("./adapter"));
|
|
44
|
-
var _examples = require("./examples");
|
|
45
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
46
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
1
|
+
"use strict";
|
|
@@ -593,7 +593,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
593
593
|
generateIdempotencyToken(): string;
|
|
594
594
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
595
595
|
createOrder(params: CommitOrderParams['query']): {
|
|
596
|
-
type: "
|
|
596
|
+
type: "virtual" | "appointment_booking";
|
|
597
597
|
platform: string;
|
|
598
598
|
sales_channel: string;
|
|
599
599
|
order_sales_channel: string;
|
|
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
328
328
|
date: string;
|
|
329
329
|
status: string;
|
|
330
330
|
week: string;
|
|
331
|
-
weekNum: 0 |
|
|
331
|
+
weekNum: 0 | 1 | 2 | 5 | 4 | 3 | 6;
|
|
332
332
|
}[]>;
|
|
333
333
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
334
334
|
private getScheduleDataByIds;
|
|
@@ -32,9 +32,15 @@ async function processScannedProductItem(host, item, code, bridge) {
|
|
|
32
32
|
return runRequiresDetailFlow(host, item, ctx, bridge);
|
|
33
33
|
}
|
|
34
34
|
const values = (0, _scanProductValues.genScanProductValues)(item, code);
|
|
35
|
-
|
|
35
|
+
// 条码已唯一命中某个规格时,商品目录的 price 可能是“最低规格价”。
|
|
36
|
+
// 仅在扫码预选规格的这条路径改用命中规格价,避免影响商品卡片和手工选规格。
|
|
37
|
+
const itemWithSelection = values.price === undefined ? {
|
|
36
38
|
...item,
|
|
37
39
|
cartDetailValue: values
|
|
40
|
+
} : {
|
|
41
|
+
...item,
|
|
42
|
+
price: values.price,
|
|
43
|
+
cartDetailValue: values
|
|
38
44
|
};
|
|
39
45
|
const decision = host.decideAddProduct(itemWithSelection, ctx);
|
|
40
46
|
return runAddProductDecision(host, item, decision, ctx, bridge);
|