@pisell/pisellos 2.2.231 → 2.2.233
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.
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// 导出评估器
|
|
2
|
-
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
-
|
|
4
|
-
// 导出适配器
|
|
5
|
-
export { PromotionAdapter } from "./adapter";
|
|
6
|
-
export { default } from "./adapter";
|
|
7
|
-
|
|
8
|
-
// 导出策略配置示例常量
|
|
9
|
-
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY } from "./examples";
|
|
@@ -319,7 +319,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
319
319
|
* 获取当前的客户搜索条件
|
|
320
320
|
* @returns 当前搜索条件
|
|
321
321
|
*/
|
|
322
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
322
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
323
323
|
/**
|
|
324
324
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
325
325
|
* @returns 客户状态
|
|
@@ -98,7 +98,9 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
98
98
|
}, {
|
|
99
99
|
key: "getSubmitOrderSalesChannel",
|
|
100
100
|
value: function getSubmitOrderSalesChannel() {
|
|
101
|
-
|
|
101
|
+
var _this$core, _this$core$getChannel;
|
|
102
|
+
var channel = (_this$core = this.core) === null || _this$core === void 0 || (_this$core = _this$core.context) === null || _this$core === void 0 || (_this$core$getChannel = _this$core.getChannel) === null || _this$core$getChannel === void 0 ? void 0 : _this$core$getChannel.call(_this$core);
|
|
103
|
+
return !channel || channel === 'system' ? 'pos' : channel;
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
/**
|
|
@@ -170,7 +172,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
170
172
|
key: "loadOpenDataConfig",
|
|
171
173
|
value: function () {
|
|
172
174
|
var _loadOpenDataConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
173
|
-
var businessCode, lastFetchedAt, cachedData, openDataConfig;
|
|
175
|
+
var businessCode, lastFetchedAt, cachedData, channel, openDataConfig;
|
|
174
176
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
175
177
|
while (1) switch (_context2.prev = _context2.next) {
|
|
176
178
|
case 0:
|
|
@@ -206,28 +208,29 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
206
208
|
case 14:
|
|
207
209
|
return _context2.abrupt("return", _context2.sent);
|
|
208
210
|
case 15:
|
|
211
|
+
channel = this.getSubmitOrderSalesChannel();
|
|
209
212
|
this.loadOpenDataConfigInFlight = this.store.openData.fetchOpenData({
|
|
210
213
|
scope: 'board',
|
|
211
|
-
target: "".concat(businessCode, "+
|
|
214
|
+
target: "".concat(businessCode, "+").concat(channel),
|
|
212
215
|
// target: `dine_in+pos`,
|
|
213
216
|
section_code: [].concat(OPEN_DATA_SECTION_CODES)
|
|
214
217
|
});
|
|
215
|
-
_context2.prev =
|
|
216
|
-
_context2.next =
|
|
218
|
+
_context2.prev = 17;
|
|
219
|
+
_context2.next = 20;
|
|
217
220
|
return this.loadOpenDataConfigInFlight;
|
|
218
|
-
case
|
|
221
|
+
case 20:
|
|
219
222
|
openDataConfig = _context2.sent;
|
|
220
223
|
this.otherParams.openData = openDataConfig;
|
|
221
224
|
return _context2.abrupt("return", openDataConfig);
|
|
222
|
-
case
|
|
223
|
-
_context2.prev =
|
|
225
|
+
case 23:
|
|
226
|
+
_context2.prev = 23;
|
|
224
227
|
this.loadOpenDataConfigInFlight = null;
|
|
225
|
-
return _context2.finish(
|
|
226
|
-
case
|
|
228
|
+
return _context2.finish(23);
|
|
229
|
+
case 26:
|
|
227
230
|
case "end":
|
|
228
231
|
return _context2.stop();
|
|
229
232
|
}
|
|
230
|
-
}, _callee2, this, [[
|
|
233
|
+
}, _callee2, this, [[17,, 23, 26]]);
|
|
231
234
|
}));
|
|
232
235
|
function loadOpenDataConfig() {
|
|
233
236
|
return _loadOpenDataConfig.apply(this, arguments);
|
|
@@ -376,9 +379,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
376
379
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
377
380
|
while (1) switch (_context5.prev = _context5.next) {
|
|
378
381
|
case 0:
|
|
379
|
-
|
|
382
|
+
debugger;
|
|
383
|
+
_context5.next = 3;
|
|
380
384
|
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "loadSalesDetail", this).call(this, orderIdOrParams);
|
|
381
|
-
case
|
|
385
|
+
case 3:
|
|
382
386
|
sales = _context5.sent;
|
|
383
387
|
customerModule = this.store.customer;
|
|
384
388
|
detailCustomer = sales === null || sales === void 0 ? void 0 : sales.customer;
|
|
@@ -407,7 +411,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
407
411
|
// await this.store.order.saveDraft();
|
|
408
412
|
}
|
|
409
413
|
return _context5.abrupt("return", sales);
|
|
410
|
-
case
|
|
414
|
+
case 12:
|
|
411
415
|
case "end":
|
|
412
416
|
return _context5.stop();
|
|
413
417
|
}
|
|
@@ -319,7 +319,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
319
319
|
* 获取当前的客户搜索条件
|
|
320
320
|
* @returns 当前搜索条件
|
|
321
321
|
*/
|
|
322
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
322
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
323
323
|
/**
|
|
324
324
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
325
325
|
* @returns 客户状态
|
|
@@ -91,7 +91,9 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
91
91
|
return [...super.getRegisteredModuleNames(), "customer", "bookingContext", "openData"];
|
|
92
92
|
}
|
|
93
93
|
getSubmitOrderSalesChannel() {
|
|
94
|
-
|
|
94
|
+
var _a, _b, _c;
|
|
95
|
+
const channel = (_c = (_b = (_a = this.core) == null ? void 0 : _a.context) == null ? void 0 : _b.getChannel) == null ? void 0 : _c.call(_b);
|
|
96
|
+
return !channel || channel === "system" ? "pos" : channel;
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
* 业务侧子模块工厂:BookingTicket 自带的 createBookingTicketModule 优先匹配;
|
|
@@ -147,9 +149,10 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
147
149
|
}
|
|
148
150
|
if (this.loadOpenDataConfigInFlight)
|
|
149
151
|
return await this.loadOpenDataConfigInFlight;
|
|
152
|
+
const channel = this.getSubmitOrderSalesChannel();
|
|
150
153
|
this.loadOpenDataConfigInFlight = this.store.openData.fetchOpenData({
|
|
151
154
|
scope: "board",
|
|
152
|
-
target: `${businessCode}
|
|
155
|
+
target: `${businessCode}+${channel}`,
|
|
153
156
|
// target: `dine_in+pos`,
|
|
154
157
|
section_code: [...OPEN_DATA_SECTION_CODES]
|
|
155
158
|
});
|
|
@@ -242,6 +245,7 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
242
245
|
* 让现有 setActiveCustomer / getActiveCustomer 调用方零成本拿到详情态客户。
|
|
243
246
|
*/
|
|
244
247
|
async loadSalesDetail(orderIdOrParams) {
|
|
248
|
+
debugger;
|
|
245
249
|
const sales = await super.loadSalesDetail(orderIdOrParams);
|
|
246
250
|
const customerModule = this.store.customer;
|
|
247
251
|
const detailCustomer = sales == null ? void 0 : sales.customer;
|