@pisell/pisellos 0.10.16 → 0.10.18
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 +9 -0
- package/dist/modules/OpenData/index.d.ts +5 -2
- package/dist/modules/OpenData/index.js +27 -12
- package/dist/modules/OpenData/types.d.ts +42 -0
- package/dist/modules/OpenData/types.js +7 -1
- package/dist/modules/OpenData/utils.d.ts +15 -1
- package/dist/modules/OpenData/utils.js +85 -0
- package/dist/modules/Order/index.d.ts +3 -1
- package/dist/modules/Order/index.js +68 -44
- package/dist/modules/Order/types.d.ts +3 -0
- package/dist/modules/Order/types.js +1 -0
- package/dist/modules/ProductList/index.js +96 -74
- package/dist/modules/Rules/index.js +11 -8
- package/dist/modules/SalesSummary/index.js +6 -4
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.js +845 -481
- package/dist/server/modules/order/index.d.ts +8 -0
- package/dist/server/modules/order/index.js +251 -215
- package/dist/server/utils/small-ticket.d.ts +9 -1
- package/dist/server/utils/small-ticket.js +117 -43
- package/dist/solution/BaseSales/index.d.ts +7 -0
- package/dist/solution/BaseSales/index.js +251 -144
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingTicket/index.d.ts +14 -19
- package/dist/solution/BookingTicket/index.js +545 -429
- package/dist/solution/Sales/index.d.ts +20 -4
- package/dist/solution/Sales/index.js +348 -75
- package/dist/solution/Sales/types.d.ts +10 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/dist/solution/UnifiedBookingSales/index.js +495 -422
- package/dist/solution/UnifiedBookingSales/types.d.ts +7 -1
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/OpenData/index.d.ts +5 -2
- package/lib/modules/OpenData/index.js +50 -3
- package/lib/modules/OpenData/types.d.ts +42 -0
- package/lib/modules/OpenData/types.js +9 -1
- package/lib/modules/OpenData/utils.d.ts +15 -1
- package/lib/modules/OpenData/utils.js +85 -0
- package/lib/modules/Order/index.d.ts +3 -1
- package/lib/modules/Order/index.js +41 -21
- package/lib/modules/Order/types.d.ts +3 -0
- package/lib/modules/Order/types.js +1 -0
- package/lib/modules/ProductList/index.js +9 -6
- package/lib/modules/Rules/index.js +8 -6
- package/lib/modules/SalesSummary/index.js +3 -1
- package/lib/server/index.d.ts +11 -0
- package/lib/server/index.js +395 -96
- package/lib/server/modules/order/index.d.ts +8 -0
- package/lib/server/modules/order/index.js +23 -0
- package/lib/server/utils/small-ticket.d.ts +9 -1
- package/lib/server/utils/small-ticket.js +107 -35
- package/lib/solution/BaseSales/index.d.ts +7 -0
- package/lib/solution/BaseSales/index.js +125 -28
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingTicket/index.d.ts +14 -19
- package/lib/solution/BookingTicket/index.js +70 -17
- package/lib/solution/Sales/index.d.ts +20 -4
- package/lib/solution/Sales/index.js +183 -15
- package/lib/solution/Sales/types.d.ts +10 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/lib/solution/UnifiedBookingSales/index.js +41 -15
- package/lib/solution/UnifiedBookingSales/types.d.ts +7 -1
- 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 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 5 | 4 | 3 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -345,7 +345,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
345
345
|
count: number;
|
|
346
346
|
left: number;
|
|
347
347
|
summaryCount: number;
|
|
348
|
-
status: "
|
|
348
|
+
status: "sold_out" | "lots_of_space" | "filling_up_fast";
|
|
349
349
|
}[];
|
|
350
350
|
/**
|
|
351
351
|
* 找到多个资源的公共可用时间段
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
2
|
import { BookingTicketCartView, BookingTicketProductCatalogView, BookingTicketState, IGetCustomerListParams, ICustomer, ILoadProductsParams, ILoadProductDetailParams, IScanResult } from './types';
|
|
3
3
|
import type { ProductData } from '../../modules';
|
|
4
|
-
import type
|
|
4
|
+
import { type InvoiceLayoutConfig, type InvoiceTemplateSettings, type OpenDataConfig } from '../../modules/OpenData';
|
|
5
5
|
import { type BookingContextConfig, type BookingContextDateInput, type BookingContextResource, type BookingContextResourceMap, type BookingContextState, type InitBookingContextParams, type LoadBookingConfigParams, type LoadBookingResourcesParams, type ResourceError, type BookingCalcContext } from '../../modules/BookingContext';
|
|
6
|
-
import type { OrderCustomerView } from '../../modules/Order/types';
|
|
6
|
+
import type { OrderCustomerView, OrderCustomerChangePayload } from '../../modules/Order/types';
|
|
7
7
|
import { BaseSalesImpl } from '../BaseSales';
|
|
8
8
|
import type { BaseSalesScanCodeResult } from '../BaseSales/types';
|
|
9
9
|
import type { ISalesDetail } from '../BaseSales/utils/parseSalesResponse';
|
|
@@ -30,7 +30,9 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
30
30
|
private orderCustomerDiscountRefreshInFlight;
|
|
31
31
|
private orderCustomerDiscountRefreshCustomerId;
|
|
32
32
|
private orderCustomerPromotionRefreshInFlight;
|
|
33
|
-
|
|
33
|
+
protected loadOpenDataInFlight: Promise<OpenDataConfig> | null;
|
|
34
|
+
protected loadOpenDataInFlightTarget: string | null;
|
|
35
|
+
protected openDataTarget: string | null;
|
|
34
36
|
/**
|
|
35
37
|
* 在 BaseSales 默认模块清单(products/order/salesSummary/schedule)基础上追加 customer + bookingContext。
|
|
36
38
|
* bookingContext 是 SalesSdk 加车下沉所需的「预约 UI 上下文」(bookingConfig / resourcesOrigin / date)。
|
|
@@ -43,10 +45,13 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
43
45
|
*/
|
|
44
46
|
protected createSubModule(moduleName: string): Module | null;
|
|
45
47
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
46
|
-
|
|
48
|
+
protected getBookingTicketBusinessCode(): string | null;
|
|
47
49
|
private getIdGeneratorPlugin;
|
|
48
50
|
private loadOpenDataConfig;
|
|
49
51
|
getOpenData(): Promise<OpenDataConfig | null>;
|
|
52
|
+
getInvoiceLayoutConfig(): Promise<InvoiceLayoutConfig>;
|
|
53
|
+
getInvoiceTemplateSettings(): Promise<InvoiceTemplateSettings>;
|
|
54
|
+
protected isInvoiceOpenDataCacheCurrent(): boolean;
|
|
50
55
|
/** 清除店铺级 OpenData;下一次 getOpenData 时会重新拉取。 */
|
|
51
56
|
clearOpenDataCache(): void;
|
|
52
57
|
private getShortNumberOrDeviceId;
|
|
@@ -260,7 +265,9 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
260
265
|
* 同时透传 OrderModule 内部 emit 的 `order:onOrderCustomerChange` 之外,
|
|
261
266
|
* 在 BookingTicket 命名空间也 emit 一次,方便上层统一从 Solution 订阅。
|
|
262
267
|
*/
|
|
263
|
-
setOrderCustomer(customer: ICustomer | null
|
|
268
|
+
setOrderCustomer(customer: ICustomer | null, options?: {
|
|
269
|
+
source?: OrderCustomerChangePayload['source'];
|
|
270
|
+
}): void;
|
|
264
271
|
/**
|
|
265
272
|
* 读取 tempOrder 上的下单客户协议字段;customer_id 缺失时返回 null。
|
|
266
273
|
*/
|
|
@@ -332,7 +339,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
332
339
|
* 获取当前的客户搜索条件
|
|
333
340
|
* @returns 当前搜索条件
|
|
334
341
|
*/
|
|
335
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
342
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
|
|
336
343
|
/**
|
|
337
344
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
338
345
|
* @returns 客户状态
|
|
@@ -451,19 +458,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
451
458
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
452
459
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
453
460
|
*/
|
|
454
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
455
|
-
action: "reloadCatalog";
|
|
456
|
-
} | {
|
|
457
|
-
action: "add";
|
|
458
|
-
cacheItem: any;
|
|
459
|
-
} | {
|
|
460
|
-
action: "requiresDetail";
|
|
461
|
-
payload: AddProductRequiresDetailPayload;
|
|
462
|
-
} | {
|
|
463
|
-
action: "requiresBookingEdit";
|
|
464
|
-
cacheItem: any;
|
|
465
|
-
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
466
|
-
};
|
|
461
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
467
462
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
468
463
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
469
464
|
/**
|