@pisell/pisellos 2.2.232 → 2.2.234
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/Order/index.d.ts +36 -1
- package/dist/modules/Order/index.js +496 -308
- package/dist/modules/Order/types.d.ts +11 -0
- package/dist/modules/Order/utils.d.ts +1 -0
- package/dist/modules/Order/utils.js +1 -1
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.js +855 -633
- package/dist/server/modules/order/index.d.ts +2 -0
- package/dist/server/modules/order/index.js +86 -32
- package/dist/solution/BaseSales/index.d.ts +6 -0
- package/dist/solution/BaseSales/index.js +240 -197
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +38 -2
- package/dist/solution/BookingTicket/index.js +653 -323
- package/dist/solution/BookingTicket/types.d.ts +62 -0
- package/dist/solution/BookingTicket/types.js +30 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts +9 -1
- package/dist/solution/BookingTicket/utils/cartView.js +76 -5
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +9 -13
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +42 -33
- package/lib/modules/Order/index.d.ts +36 -1
- package/lib/modules/Order/index.js +98 -10
- package/lib/modules/Order/types.d.ts +11 -0
- package/lib/modules/Order/utils.d.ts +1 -0
- package/lib/modules/Order/utils.js +1 -1
- package/lib/server/index.d.ts +5 -0
- package/lib/server/index.js +224 -63
- package/lib/server/modules/order/index.d.ts +2 -0
- package/lib/server/modules/order/index.js +43 -1
- package/lib/solution/BaseSales/index.d.ts +6 -0
- package/lib/solution/BaseSales/index.js +20 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +38 -2
- package/lib/solution/BookingTicket/index.js +196 -4
- package/lib/solution/BookingTicket/types.d.ts +62 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +125 -0
- package/lib/solution/BookingTicket/utils/cartView.d.ts +9 -1
- package/lib/solution/BookingTicket/utils/cartView.js +48 -2
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +9 -13
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +41 -28
- package/package.json +1 -1
|
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
311
311
|
date: string;
|
|
312
312
|
status: string;
|
|
313
313
|
week: string;
|
|
314
|
-
weekNum: 0 |
|
|
314
|
+
weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -1,13 +1,14 @@
|
|
|
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 { OpenDataConfig } from '../../modules/OpenData';
|
|
4
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';
|
|
5
6
|
import type { OrderCustomerView } from '../../modules/Order/types';
|
|
6
7
|
import { BaseSalesImpl } from '../BaseSales';
|
|
7
8
|
import type { BaseSalesScanCodeResult } from '../BaseSales/types';
|
|
8
9
|
import type { ISalesDetail } from '../BaseSales/utils/parseSalesResponse';
|
|
9
10
|
import type { LoadSalesDetailParams } from '../../modules/Order/types';
|
|
10
|
-
import type { GlobalScanHandleResult, GlobalScanHostBridge } from './types';
|
|
11
|
+
import type { AddAddTimeProductToBookingInput, AddAddTimeProductsToBookingInput, GlobalScanHandleResult, GlobalScanHostBridge } from './types';
|
|
11
12
|
import { AddProductDecideContext, AddProductRequiresDetailPayload } from './utils/addProductDecision';
|
|
12
13
|
import { type BuildCacheItemFromOrderLineInput } from '../../modules/BookingContext/utils/buildCacheItemFromOrderLine';
|
|
13
14
|
import { type BuildNormalProductCacheItemFromOrderLineInput } from '../../modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine';
|
|
@@ -25,6 +26,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
25
26
|
private platform;
|
|
26
27
|
private scan;
|
|
27
28
|
private productCatalog;
|
|
29
|
+
private addTimeProductsCatalog;
|
|
28
30
|
private orderCustomerDiscountRefreshInFlight;
|
|
29
31
|
private orderCustomerDiscountRefreshCustomerId;
|
|
30
32
|
private loadOpenDataConfigInFlight;
|
|
@@ -43,6 +45,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
43
45
|
private getBookingTicketBusinessCode;
|
|
44
46
|
private getIdGeneratorPlugin;
|
|
45
47
|
private loadOpenDataConfig;
|
|
48
|
+
getOpenData(): Promise<OpenDataConfig | null>;
|
|
46
49
|
private getShortNumberOrDeviceId;
|
|
47
50
|
private configureIdGeneratorFromOpenData;
|
|
48
51
|
private normalizePositiveInteger;
|
|
@@ -319,7 +322,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
319
322
|
* 获取当前的客户搜索条件
|
|
320
323
|
* @returns 当前搜索条件
|
|
321
324
|
*/
|
|
322
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
325
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
323
326
|
/**
|
|
324
327
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
325
328
|
* @returns 客户状态
|
|
@@ -512,6 +515,39 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
512
515
|
*/
|
|
513
516
|
handleGlobalScanCode(code: string, bridge?: GlobalScanHostBridge): Promise<GlobalScanHandleResult>;
|
|
514
517
|
resolveBestAddTimePlan(addTimeProducts: any[], targetMinutes: number): any;
|
|
518
|
+
/**
|
|
519
|
+
* 构造一条绑定到已有 booking 的加时商品行。
|
|
520
|
+
*
|
|
521
|
+
* @example
|
|
522
|
+
* const line = this.buildAddTimeOrderLine({ product, product_add_schedule_time: 30 }, 'booking-1');
|
|
523
|
+
*/
|
|
524
|
+
private buildAddTimeOrderLine;
|
|
525
|
+
/**
|
|
526
|
+
* 将加时商品作为独立商品行绑定到已有 booking。
|
|
527
|
+
*
|
|
528
|
+
* 与预约商品加车不同,本方法不会把当前 booking 作为 `addProductToOrder` 第二参数传入,
|
|
529
|
+
* 避免 OrderModule 新建 booking 或重写已有 booking.product_uid。
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* await bookingTicket.addAddTimeProductToBooking({
|
|
533
|
+
* booking,
|
|
534
|
+
* product,
|
|
535
|
+
* num: 1,
|
|
536
|
+
* price: '10.00',
|
|
537
|
+
* product_add_schedule_time: 30,
|
|
538
|
+
* });
|
|
539
|
+
*/
|
|
540
|
+
addAddTimeProductToBooking(input: AddAddTimeProductToBookingInput): Promise<OrderProduct[]>;
|
|
541
|
+
/**
|
|
542
|
+
* 批量将加时商品作为独立商品行绑定到已有 booking,并只触发一次购物车重算。
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* await bookingTicket.addAddTimeProductsToBooking({
|
|
546
|
+
* booking,
|
|
547
|
+
* products: [{ product, product_add_schedule_time: 30 }],
|
|
548
|
+
* });
|
|
549
|
+
*/
|
|
550
|
+
addAddTimeProductsToBooking(input: AddAddTimeProductsToBookingInput): Promise<OrderProduct[]>;
|
|
515
551
|
/**
|
|
516
552
|
* 销毁模块:先调用父类(销毁所有 store 内子模块 + emit destroy + super.destroy()),
|
|
517
553
|
* 再清理 BookingTicket 自有资源(scan 监听 + scan 内存缓存)。
|