@pisell/pisellos 0.10.20 → 0.10.22
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/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/modules/BookingContext/index.d.ts +3 -0
- package/dist/modules/BookingContext/index.js +42 -13
- package/dist/modules/BookingContext/types.d.ts +4 -4
- package/dist/modules/BookingContext/types.js +3 -3
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +10 -7
- package/dist/modules/OpenData/index.d.ts +10 -1
- package/dist/modules/OpenData/index.js +268 -14
- package/dist/modules/OpenData/types.d.ts +14 -1
- package/dist/modules/OpenData/utils.d.ts +1 -0
- package/dist/modules/OpenData/utils.js +8 -5
- package/dist/modules/Order/index.d.ts +6 -1
- package/dist/modules/Order/index.js +148 -84
- package/dist/modules/ProductList/clientDataVariants.d.ts +50 -0
- package/dist/modules/ProductList/clientDataVariants.js +216 -0
- package/dist/modules/ProductList/index.d.ts +14 -13
- package/dist/modules/ProductList/index.js +105 -77
- package/dist/modules/Quotation/index.d.ts +16 -0
- package/dist/modules/Quotation/index.js +240 -27
- package/dist/modules/ResourcePlanner/planner.d.ts +2 -2
- package/dist/modules/ResourcePlanner/planner.js +88 -21
- package/dist/modules/ResourcePlanner/types.d.ts +12 -0
- package/dist/modules/Rules/index.d.ts +5 -0
- package/dist/modules/Rules/index.js +27 -12
- package/dist/plugins/request.d.ts +2 -1
- package/dist/plugins/request.js +4 -2
- package/dist/server/index.js +33 -16
- package/dist/solution/BaseSales/index.d.ts +16 -1
- package/dist/solution/BaseSales/index.js +690 -349
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +14 -2
- package/dist/solution/BookingTicket/index.js +25 -18
- package/dist/solution/Sales/index.js +29 -22
- package/dist/solution/UnifiedBookingSales/index.d.ts +1 -1
- package/dist/solution/UnifiedBookingSales/index.js +315 -99
- package/dist/solution/UnifiedBookingSales/types.d.ts +4 -0
- package/dist/solution/VenueBooking/index.d.ts +2 -0
- package/dist/solution/VenueBooking/index.js +542 -494
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.js +3 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +2 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +3 -1
- package/dist/utils/platform.d.ts +8 -0
- package/dist/utils/platform.js +15 -0
- package/lib/modules/BookingContext/index.d.ts +3 -0
- package/lib/modules/BookingContext/index.js +35 -8
- package/lib/modules/BookingContext/types.d.ts +4 -4
- package/lib/modules/BookingContext/types.js +3 -3
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +4 -0
- package/lib/modules/OpenData/index.d.ts +10 -1
- package/lib/modules/OpenData/index.js +162 -2
- package/lib/modules/OpenData/types.d.ts +14 -1
- package/lib/modules/OpenData/utils.d.ts +1 -0
- package/lib/modules/OpenData/utils.js +9 -5
- package/lib/modules/Order/index.d.ts +6 -1
- package/lib/modules/Order/index.js +65 -8
- package/lib/modules/ProductList/clientDataVariants.d.ts +50 -0
- package/lib/modules/ProductList/clientDataVariants.js +204 -0
- package/lib/modules/ProductList/index.d.ts +14 -13
- package/lib/modules/ProductList/index.js +77 -58
- package/lib/modules/Quotation/index.d.ts +16 -0
- package/lib/modules/Quotation/index.js +112 -9
- package/lib/modules/ResourcePlanner/planner.d.ts +2 -2
- package/lib/modules/ResourcePlanner/planner.js +80 -20
- package/lib/modules/ResourcePlanner/types.d.ts +12 -0
- package/lib/modules/Rules/index.d.ts +5 -0
- package/lib/modules/Rules/index.js +20 -11
- package/lib/plugins/request.d.ts +2 -1
- package/lib/plugins/request.js +3 -2
- package/lib/server/index.js +16 -1
- package/lib/solution/BaseSales/index.d.ts +16 -1
- package/lib/solution/BaseSales/index.js +314 -66
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +14 -2
- package/lib/solution/BookingTicket/index.js +3 -0
- package/lib/solution/Sales/index.js +3 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +1 -1
- package/lib/solution/UnifiedBookingSales/index.js +228 -20
- package/lib/solution/UnifiedBookingSales/types.d.ts +4 -0
- package/lib/solution/VenueBooking/index.d.ts +2 -0
- package/lib/solution/VenueBooking/index.js +28 -8
- package/lib/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/lib/solution/VenueBooking/utils/dateSummary.js +3 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +2 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +3 -1
- package/lib/utils/platform.d.ts +8 -0
- package/lib/utils/platform.js +22 -0
- package/package.json +1 -1
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 1 | 2 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -339,7 +339,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
339
339
|
* 获取当前的客户搜索条件
|
|
340
340
|
* @returns 当前搜索条件
|
|
341
341
|
*/
|
|
342
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
342
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
343
343
|
/**
|
|
344
344
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
345
345
|
* @returns 客户状态
|
|
@@ -458,7 +458,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
458
458
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
459
459
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
460
460
|
*/
|
|
461
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
461
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
|
|
462
|
+
action: "reloadCatalog";
|
|
463
|
+
} | {
|
|
464
|
+
action: "add";
|
|
465
|
+
cacheItem: any;
|
|
466
|
+
} | {
|
|
467
|
+
action: "requiresDetail";
|
|
468
|
+
payload: AddProductRequiresDetailPayload;
|
|
469
|
+
} | {
|
|
470
|
+
action: "requiresBookingEdit";
|
|
471
|
+
cacheItem: any;
|
|
472
|
+
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
473
|
+
};
|
|
462
474
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
463
475
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
464
476
|
/**
|
|
@@ -298,30 +298,37 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
298
298
|
lastFetchedAt = this.store.openData.getLastFetchedAt();
|
|
299
299
|
cachedData = this.store.openData.getOpenData();
|
|
300
300
|
if (!(cachedData && this.openDataTarget === target && lastFetchedAt && Date.now() - lastFetchedAt < OPEN_DATA_CACHE_TTL)) {
|
|
301
|
-
_context2.next =
|
|
301
|
+
_context2.next = 16;
|
|
302
302
|
break;
|
|
303
303
|
}
|
|
304
|
+
if (!(typeof this.store.openData.ensureInvoiceTemplateSettings === 'function')) {
|
|
305
|
+
_context2.next = 14;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
_context2.next = 14;
|
|
309
|
+
return this.store.openData.ensureInvoiceTemplateSettings(target);
|
|
310
|
+
case 14:
|
|
304
311
|
this.otherParams.openData = cachedData;
|
|
305
312
|
return _context2.abrupt("return", cachedData);
|
|
306
|
-
case
|
|
313
|
+
case 16:
|
|
307
314
|
if (!this.loadOpenDataInFlight) {
|
|
308
|
-
_context2.next =
|
|
315
|
+
_context2.next = 24;
|
|
309
316
|
break;
|
|
310
317
|
}
|
|
311
318
|
if (!(this.loadOpenDataInFlightTarget === target)) {
|
|
312
|
-
_context2.next =
|
|
319
|
+
_context2.next = 21;
|
|
313
320
|
break;
|
|
314
321
|
}
|
|
315
|
-
_context2.next = 17;
|
|
316
|
-
return this.loadOpenDataInFlight;
|
|
317
|
-
case 17:
|
|
318
|
-
return _context2.abrupt("return", _context2.sent);
|
|
319
|
-
case 18:
|
|
320
322
|
_context2.next = 20;
|
|
321
323
|
return this.loadOpenDataInFlight;
|
|
322
324
|
case 20:
|
|
323
|
-
return _context2.abrupt("return",
|
|
325
|
+
return _context2.abrupt("return", _context2.sent);
|
|
324
326
|
case 21:
|
|
327
|
+
_context2.next = 23;
|
|
328
|
+
return this.loadOpenDataInFlight;
|
|
329
|
+
case 23:
|
|
330
|
+
return _context2.abrupt("return", this.loadOpenDataConfig());
|
|
331
|
+
case 24:
|
|
325
332
|
this.loadOpenDataInFlightTarget = target;
|
|
326
333
|
request = this.store.openData.fetchOpenData({
|
|
327
334
|
scope: 'board',
|
|
@@ -330,10 +337,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
330
337
|
section_code: [].concat(OPEN_DATA_SECTION_CODES)
|
|
331
338
|
});
|
|
332
339
|
this.loadOpenDataInFlight = request;
|
|
333
|
-
_context2.prev =
|
|
334
|
-
_context2.next =
|
|
340
|
+
_context2.prev = 27;
|
|
341
|
+
_context2.next = 30;
|
|
335
342
|
return request;
|
|
336
|
-
case
|
|
343
|
+
case 30:
|
|
337
344
|
openDataConfig = _context2.sent;
|
|
338
345
|
// clearOpenDataCache() 或新请求已接管时,旧响应只能返回给原调用方,不能复活缓存归属。
|
|
339
346
|
if (this.loadOpenDataInFlight === request) {
|
|
@@ -341,18 +348,18 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
341
348
|
this.otherParams.openData = openDataConfig;
|
|
342
349
|
}
|
|
343
350
|
return _context2.abrupt("return", openDataConfig);
|
|
344
|
-
case
|
|
345
|
-
_context2.prev =
|
|
351
|
+
case 33:
|
|
352
|
+
_context2.prev = 33;
|
|
346
353
|
if (this.loadOpenDataInFlight === request) {
|
|
347
354
|
this.loadOpenDataInFlight = null;
|
|
348
355
|
this.loadOpenDataInFlightTarget = null;
|
|
349
356
|
}
|
|
350
|
-
return _context2.finish(
|
|
351
|
-
case
|
|
357
|
+
return _context2.finish(33);
|
|
358
|
+
case 36:
|
|
352
359
|
case "end":
|
|
353
360
|
return _context2.stop();
|
|
354
361
|
}
|
|
355
|
-
}, _callee2, this, [[
|
|
362
|
+
}, _callee2, this, [[27,, 33, 36]]);
|
|
356
363
|
}));
|
|
357
364
|
function loadOpenDataConfig() {
|
|
358
365
|
return _loadOpenDataConfig.apply(this, arguments);
|
|
@@ -275,33 +275,40 @@ export var SalesImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
275
275
|
cachedData = this.invoiceOpenDataModule.getOpenData();
|
|
276
276
|
lastFetchedAt = this.invoiceOpenDataModule.getLastFetchedAt();
|
|
277
277
|
if (!(cachedData && this.invoiceOpenDataTarget === target && typeof lastFetchedAt === 'number' && Date.now() - lastFetchedAt < INVOICE_OPEN_DATA_CACHE_TTL)) {
|
|
278
|
-
_context4.next =
|
|
278
|
+
_context4.next = 10;
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
if (!(typeof this.invoiceOpenDataModule.ensureInvoiceTemplateSettings === 'function')) {
|
|
282
|
+
_context4.next = 9;
|
|
279
283
|
break;
|
|
280
284
|
}
|
|
285
|
+
_context4.next = 9;
|
|
286
|
+
return this.invoiceOpenDataModule.ensureInvoiceTemplateSettings(target);
|
|
287
|
+
case 9:
|
|
281
288
|
return _context4.abrupt("return", cachedData);
|
|
282
|
-
case
|
|
289
|
+
case 10:
|
|
283
290
|
if (!this.invoiceOpenDataInFlight) {
|
|
284
|
-
_context4.next =
|
|
291
|
+
_context4.next = 21;
|
|
285
292
|
break;
|
|
286
293
|
}
|
|
287
294
|
if (!(this.invoiceOpenDataInFlightTarget === target)) {
|
|
288
|
-
_context4.next =
|
|
295
|
+
_context4.next = 13;
|
|
289
296
|
break;
|
|
290
297
|
}
|
|
291
298
|
return _context4.abrupt("return", this.invoiceOpenDataInFlight);
|
|
292
|
-
case 10:
|
|
293
|
-
_context4.prev = 10;
|
|
294
|
-
_context4.next = 13;
|
|
295
|
-
return this.invoiceOpenDataInFlight;
|
|
296
299
|
case 13:
|
|
297
|
-
_context4.
|
|
300
|
+
_context4.prev = 13;
|
|
301
|
+
_context4.next = 16;
|
|
302
|
+
return this.invoiceOpenDataInFlight;
|
|
303
|
+
case 16:
|
|
304
|
+
_context4.next = 20;
|
|
298
305
|
break;
|
|
299
|
-
case 15:
|
|
300
|
-
_context4.prev = 15;
|
|
301
|
-
_context4.t0 = _context4["catch"](10);
|
|
302
|
-
case 17:
|
|
303
|
-
return _context4.abrupt("return", this.loadInvoiceOpenData(businessCode, channel));
|
|
304
306
|
case 18:
|
|
307
|
+
_context4.prev = 18;
|
|
308
|
+
_context4.t0 = _context4["catch"](13);
|
|
309
|
+
case 20:
|
|
310
|
+
return _context4.abrupt("return", this.loadInvoiceOpenData(businessCode, channel));
|
|
311
|
+
case 21:
|
|
305
312
|
request = this.invoiceOpenDataModule.fetchOpenData({
|
|
306
313
|
scope: 'board',
|
|
307
314
|
target: target,
|
|
@@ -309,28 +316,28 @@ export var SalesImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
309
316
|
});
|
|
310
317
|
this.invoiceOpenDataInFlight = request;
|
|
311
318
|
this.invoiceOpenDataInFlightTarget = target;
|
|
312
|
-
_context4.prev =
|
|
313
|
-
_context4.next =
|
|
319
|
+
_context4.prev = 24;
|
|
320
|
+
_context4.next = 27;
|
|
314
321
|
return request;
|
|
315
|
-
case
|
|
322
|
+
case 27:
|
|
316
323
|
openData = _context4.sent;
|
|
317
324
|
// clearOpenDataCache() 或后续请求接管后,旧响应不得复活 target 归属。
|
|
318
325
|
if (this.invoiceOpenDataInFlight === request) {
|
|
319
326
|
this.invoiceOpenDataTarget = target;
|
|
320
327
|
}
|
|
321
328
|
return _context4.abrupt("return", openData);
|
|
322
|
-
case
|
|
323
|
-
_context4.prev =
|
|
329
|
+
case 30:
|
|
330
|
+
_context4.prev = 30;
|
|
324
331
|
if (this.invoiceOpenDataInFlight === request) {
|
|
325
332
|
this.invoiceOpenDataInFlight = null;
|
|
326
333
|
this.invoiceOpenDataInFlightTarget = null;
|
|
327
334
|
}
|
|
328
|
-
return _context4.finish(
|
|
329
|
-
case
|
|
335
|
+
return _context4.finish(30);
|
|
336
|
+
case 33:
|
|
330
337
|
case "end":
|
|
331
338
|
return _context4.stop();
|
|
332
339
|
}
|
|
333
|
-
}, _callee4, this, [[
|
|
340
|
+
}, _callee4, this, [[13, 18], [24,, 30, 33]]);
|
|
334
341
|
}));
|
|
335
342
|
function loadInvoiceOpenData(_x4, _x5) {
|
|
336
343
|
return _loadInvoiceOpenData.apply(this, arguments);
|
|
@@ -232,7 +232,7 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
232
232
|
private releaseAvailabilityCommitLock;
|
|
233
233
|
/** IO boundary: loads catalog, schedules, resources, occupancies, and registers one context. */
|
|
234
234
|
prepareAvailabilityProjection(params: UnifiedBookingSalesPrepareAvailabilityProjectionParams): Promise<AvailabilityContextRef>;
|
|
235
|
-
/**
|
|
235
|
+
/** Candidate calculation over the current context projection and runtime minute. */
|
|
236
236
|
getProductTimeRanges(contextId: string, request?: GetProductTimeRangesRequest): Promise<ContextualProductTimeRangeGroup[]>;
|
|
237
237
|
/** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
|
|
238
238
|
queryBookingAvailability(contextId: string, request: ContextualAvailabilityQuery): Promise<ContextualAvailabilityQueryResult>;
|