@pisell/pisellos 0.10.28 → 0.10.30
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/core/index.d.ts +7 -0
- package/dist/core/index.js +108 -65
- package/dist/model/strategy/adapter/dataVariant/evaluator.js +13 -2
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/modules/Discount/index.js +4 -1
- package/dist/modules/Discount/types.d.ts +14 -4
- package/dist/modules/Order/index.d.ts +3 -1
- package/dist/modules/Order/index.js +89 -16
- package/dist/modules/Order/types.d.ts +13 -0
- package/dist/modules/Order/utils.d.ts +17 -2
- package/dist/modules/Order/utils.js +133 -27
- package/dist/modules/Quotation/index.d.ts +6 -0
- package/dist/modules/Quotation/index.js +77 -25
- package/dist/modules/ResourcePlanner/planner.js +14 -4
- package/dist/modules/ResourcePlanner/types.d.ts +2 -0
- package/dist/plugins/request.d.ts +1 -0
- package/dist/server/index.d.ts +13 -2
- package/dist/server/index.js +1531 -1230
- package/dist/server/modules/floor-plan/index.d.ts +4 -0
- package/dist/server/modules/floor-plan/index.js +240 -98
- package/dist/server/modules/menu/index.js +48 -23
- package/dist/server/modules/order/index.d.ts +17 -7
- package/dist/server/modules/order/index.js +419 -207
- package/dist/server/modules/order/types.d.ts +50 -0
- package/dist/server/modules/order/types.js +2 -0
- package/dist/server/modules/products/index.d.ts +10 -4
- package/dist/server/modules/products/index.js +177 -84
- package/dist/server/modules/resource/index.js +21 -13
- package/dist/server/utils/product.d.ts +1 -1
- package/dist/server/utils/product.js +186 -22
- package/dist/server/utils/small-ticket.d.ts +4 -1
- package/dist/server/utils/small-ticket.js +543 -101
- package/dist/solution/BaseSales/index.d.ts +3 -3
- package/dist/solution/BaseSales/index.js +171 -198
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +2 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +1 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -2
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/Sales/index.d.ts +7 -0
- package/dist/solution/Sales/index.js +87 -31
- package/dist/solution/UnifiedBookingSales/index.d.ts +2 -2
- package/dist/solution/UnifiedBookingSales/index.js +38 -21
- package/lib/core/index.d.ts +7 -0
- package/lib/core/index.js +20 -2
- package/lib/model/strategy/adapter/dataVariant/evaluator.js +12 -2
- package/lib/model/strategy/adapter/promotion/index.js +46 -1
- package/lib/modules/Discount/index.js +4 -1
- package/lib/modules/Discount/types.d.ts +14 -4
- package/lib/modules/Order/index.d.ts +3 -1
- package/lib/modules/Order/index.js +69 -1
- package/lib/modules/Order/types.d.ts +13 -0
- package/lib/modules/Order/utils.d.ts +17 -2
- package/lib/modules/Order/utils.js +131 -18
- package/lib/modules/Quotation/index.d.ts +6 -0
- package/lib/modules/Quotation/index.js +52 -8
- package/lib/modules/ResourcePlanner/planner.js +9 -1
- package/lib/modules/ResourcePlanner/types.d.ts +2 -0
- package/lib/plugins/request.d.ts +1 -0
- package/lib/server/index.d.ts +13 -2
- package/lib/server/index.js +210 -19
- package/lib/server/modules/floor-plan/index.d.ts +4 -0
- package/lib/server/modules/floor-plan/index.js +60 -7
- package/lib/server/modules/menu/index.js +26 -4
- package/lib/server/modules/order/index.d.ts +17 -7
- package/lib/server/modules/order/index.js +194 -57
- package/lib/server/modules/order/types.d.ts +50 -0
- package/lib/server/modules/order/types.js +1 -0
- package/lib/server/modules/products/index.d.ts +10 -4
- package/lib/server/modules/products/index.js +93 -23
- package/lib/server/modules/resource/index.js +12 -2
- package/lib/server/utils/product.d.ts +1 -1
- package/lib/server/utils/product.js +163 -3
- package/lib/server/utils/small-ticket.d.ts +4 -1
- package/lib/server/utils/small-ticket.js +507 -75
- package/lib/solution/BaseSales/index.d.ts +3 -3
- package/lib/solution/BaseSales/index.js +9 -14
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +2 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +1 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -2
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/Sales/index.d.ts +7 -0
- package/lib/solution/Sales/index.js +48 -3
- package/lib/solution/UnifiedBookingSales/index.d.ts +2 -2
- package/lib/solution/UnifiedBookingSales/index.js +19 -3
- package/package.json +1 -1
|
@@ -110,9 +110,9 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
110
110
|
private loadQuotationForPriceQuery;
|
|
111
111
|
private getPriceQueryProductId;
|
|
112
112
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
* Change Time / customer reprice 必须沿用商品列表的渠道口径。
|
|
114
|
+
* SalesSdk Provider 通常将渠道存为 platform,因此不能只读取 otherParams.channel。
|
|
115
|
+
*/
|
|
116
116
|
private getPriceQueryChannel;
|
|
117
117
|
/**
|
|
118
118
|
* /product/query 的智能定价评估只读取 strategy_context;
|
|
@@ -678,9 +678,9 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
/**
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
681
|
+
* Change Time / customer reprice 必须沿用商品列表的渠道口径。
|
|
682
|
+
* SalesSdk Provider 通常将渠道存为 platform,因此不能只读取 otherParams.channel。
|
|
683
|
+
*/
|
|
684
684
|
getPriceQueryChannel(channel) {
|
|
685
685
|
const strategyContext = this.otherParams?.strategy_context && typeof this.otherParams.strategy_context === 'object' ? this.otherParams.strategy_context : {};
|
|
686
686
|
const value = channel ?? strategyContext.channel ?? this.otherParams?.channel ?? this.otherParams?.platform;
|
|
@@ -1588,6 +1588,8 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
// this.store.resource = null;
|
|
1590
1590
|
const tempOrder = this.store.order.restoreOrder();
|
|
1591
|
+
// 先补齐店铺级订单字段,再通知监听方,避免发布带空税区/币种的中间快照。
|
|
1592
|
+
const appDataChanged = this.syncAppDataToTempOrder(tempOrder);
|
|
1591
1593
|
this.currentSalesDetail = null;
|
|
1592
1594
|
this.discountConfigCacheKey = null;
|
|
1593
1595
|
this.hasManualDiscountSelection = false;
|
|
@@ -1600,7 +1602,7 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
1600
1602
|
await this.effectsEmit('onTempOrderReplaced', {
|
|
1601
1603
|
tempOrder
|
|
1602
1604
|
});
|
|
1603
|
-
if (
|
|
1605
|
+
if (appDataChanged && this.isTempOrderPersistEnabled()) {
|
|
1604
1606
|
this.store.order.persistTempOrder();
|
|
1605
1607
|
await this.store.order.saveDraft();
|
|
1606
1608
|
}
|
|
@@ -3529,13 +3531,13 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
3529
3531
|
return Array.isArray(configs) && configs.length > 0;
|
|
3530
3532
|
}
|
|
3531
3533
|
shouldRecalculateProductBookingPricesForContextChange(params) {
|
|
3532
|
-
const scopeInfo = this.getQuotationCustomerScopeInfo();
|
|
3533
|
-
const scopedCustomerIds = new Set(scopeInfo.customerIds.map(id => String(id)));
|
|
3534
3534
|
const previousCustomerId = this.normalizePriceContextCustomerId(params.previousCustomerId);
|
|
3535
3535
|
const nextCustomerId = this.normalizePriceContextCustomerId(params.nextCustomerId);
|
|
3536
3536
|
if (this.isCustomerUserPriceQuery() || this.hasSmartPricingStrategies()) {
|
|
3537
3537
|
return previousCustomerId !== nextCustomerId;
|
|
3538
3538
|
}
|
|
3539
|
+
const scopeInfo = this.getQuotationCustomerScopeInfo();
|
|
3540
|
+
const scopedCustomerIds = new Set(scopeInfo.customerIds.map(id => String(id)));
|
|
3539
3541
|
const previousInScope = previousCustomerId ? scopedCustomerIds.has(previousCustomerId) : false;
|
|
3540
3542
|
const nextInScope = nextCustomerId ? scopedCustomerIds.has(nextCustomerId) : false;
|
|
3541
3543
|
let shouldRecalculate = false;
|
|
@@ -3557,14 +3559,6 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
3557
3559
|
const currentOrderCustomerId = this.getCurrentOrderCustomerId();
|
|
3558
3560
|
const resolvedChannels = paramsList.map(params => this.getPriceQueryChannel(params.channel));
|
|
3559
3561
|
const authoritativeProducts = paramsList.map(() => null);
|
|
3560
|
-
const preparedCustomerKeys = new Set();
|
|
3561
|
-
await Promise.all(paramsList.map(async params => {
|
|
3562
|
-
const customerId = params.customer_id ?? currentOrderCustomerId;
|
|
3563
|
-
const customerKey = this.normalizePriceContextCustomerId(customerId) || '';
|
|
3564
|
-
if (preparedCustomerKeys.has(customerKey)) return;
|
|
3565
|
-
preparedCustomerKeys.add(customerKey);
|
|
3566
|
-
await this.prepareProductPriceQueryContext(customerId);
|
|
3567
|
-
}));
|
|
3568
3562
|
const groups = new Map();
|
|
3569
3563
|
paramsList.forEach((params, index) => {
|
|
3570
3564
|
const schedule = this.getPriceQuerySchedule(params);
|
|
@@ -3581,6 +3575,7 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
3581
3575
|
groups.set(groupKey, group);
|
|
3582
3576
|
});
|
|
3583
3577
|
await Promise.all(Array.from(groups.values()).map(async group => {
|
|
3578
|
+
await this.prepareProductPriceQueryContext(group.customerId);
|
|
3584
3579
|
const priceQueries = group.indices.map(index => paramsList[index]);
|
|
3585
3580
|
const resolvedProducts = await this.resolveProductsForPriceQuery({
|
|
3586
3581
|
priceQueries,
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* - 不在此处发明等价关系;UI 侧(ticketBooking)若需要别的字段,由 view-model 适配层做转换
|
|
15
15
|
*/
|
|
16
16
|
import type { BaseSalesOrderProduct } from '../types';
|
|
17
|
+
import type { OrderMetaList } from '../../../modules/Order/types';
|
|
17
18
|
export interface ISalesDetailHeader {
|
|
18
19
|
order_id: number | string | null;
|
|
19
20
|
order_number?: string;
|
|
@@ -47,6 +48,7 @@ export interface ISalesDetailHeader {
|
|
|
47
48
|
schedule_date?: string;
|
|
48
49
|
created_at?: string;
|
|
49
50
|
updated_at?: string | number;
|
|
51
|
+
order_meta_list?: OrderMetaList;
|
|
50
52
|
metadata?: Record<string, any> | null;
|
|
51
53
|
total_amount?: string | number;
|
|
52
54
|
[key: string]: any;
|
|
@@ -22,7 +22,7 @@ var _orderCollectionIdentity = require("../../../modules/Order/utils/orderCollec
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/** OrderData 中除大数组外的"顶层 header 字段"白名单,按需扩展。 */
|
|
25
|
-
const HEADER_KEYS = ['order_id', 'order_number', 'shop_order_number', 'shop_full_order_number', 'type', 'business_code', 'platform', 'sales_channel', 'order_sales_channel', 'vouchers', 'status', 'payment_status', 'shipping_status', 'customer_id', 'customer_name', 'country_calling_code', 'phone', 'email', 'is_price_include_tax', 'tax_title', 'tax_country_code', 'currency_code', 'currency_symbol', 'currency_format', 'is_deposit', 'deposit_amount', 'shop_discount', 'surcharge_fee', 'note', 'schedule_date', 'created_at', 'updated_at', 'metadata', 'total_amount', 'shop_id', 'create_date', 'holder', 'relation_forms', 'contacts', 'contacts_info'];
|
|
25
|
+
const HEADER_KEYS = ['order_id', 'order_number', 'shop_order_number', 'shop_full_order_number', 'type', 'business_code', 'platform', 'sales_channel', 'order_sales_channel', 'vouchers', 'status', 'payment_status', 'shipping_status', 'customer_id', 'customer_name', 'country_calling_code', 'phone', 'email', 'is_price_include_tax', 'tax_title', 'tax_country_code', 'currency_code', 'currency_symbol', 'currency_format', 'is_deposit', 'deposit_amount', 'shop_discount', 'surcharge_fee', 'note', 'schedule_date', 'created_at', 'updated_at', 'order_meta_list', 'metadata', 'total_amount', 'shop_id', 'create_date', 'holder', 'relation_forms', 'contacts', 'contacts_info'];
|
|
26
26
|
function pickHeader(raw) {
|
|
27
27
|
const header = {
|
|
28
28
|
order_id: raw?.order_id ?? null
|
|
@@ -229,9 +229,10 @@ function transformBaseProductToOrderProduct(params) {
|
|
|
229
229
|
metadata.unique_identification_number = String(uniqueIdentificationNumber);
|
|
230
230
|
}
|
|
231
231
|
// 从源头补充商品多语言标题
|
|
232
|
+
const productTitleI18n = sourceProduct?.title_i18n || {};
|
|
232
233
|
const productTitle = {
|
|
233
|
-
...
|
|
234
|
-
original: sourceProduct?.original_title || sourceProduct?.title || ''
|
|
234
|
+
...productTitleI18n,
|
|
235
|
+
original: productTitleI18n.original || sourceProduct?.original_title || sourceProduct?.title || ''
|
|
235
236
|
};
|
|
236
237
|
return {
|
|
237
238
|
product_id: productId,
|
|
@@ -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 | 3 | 4 | 5 | 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: "lots_of_space" | "filling_up_fast" | "sold_out";
|
|
349
349
|
}[];
|
|
350
350
|
/**
|
|
351
351
|
* 找到多个资源的公共可用时间段
|
|
@@ -105,6 +105,13 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
105
105
|
private groupBookingsByResource;
|
|
106
106
|
private isBookingMatchedResource;
|
|
107
107
|
private sortMatchedBookings;
|
|
108
|
+
/** Unpaid:与 Current 重合的订单沿用 Current 顺序,其余欠款订单按开始时间降序追加。 */
|
|
109
|
+
private sortUnpaidBookings;
|
|
110
|
+
/**
|
|
111
|
+
* 构造资源详情的 Unpaid 列表:复用旧版当前/未来订单的展示计算,再补齐被预约状态/时间漏掉的欠款订单。
|
|
112
|
+
* Unpaid 的成员资格由调用方按付款状态筛好;这里仅负责展示字段与顺序。
|
|
113
|
+
*/
|
|
114
|
+
private buildUnpaidBookings;
|
|
108
115
|
/**
|
|
109
116
|
* 资源下 bookings 的返回裁剪策略:
|
|
110
117
|
* 1) 优先返回当前时刻正在进行中的预约(允许并发返回多条)
|
|
@@ -507,6 +507,53 @@ class SalesImpl extends _BaseModule.BaseModule {
|
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
+
/** Unpaid:与 Current 重合的订单沿用 Current 顺序,其余欠款订单按开始时间降序追加。 */
|
|
511
|
+
sortUnpaidBookings(bookings, currentBookings) {
|
|
512
|
+
const currentOrderIndexes = new Map(currentBookings.map((booking, index) => [String(booking.order.order_id), index]));
|
|
513
|
+
return [...bookings].sort((left, right) => {
|
|
514
|
+
const leftIndex = currentOrderIndexes.get(String(left.order.order_id));
|
|
515
|
+
const rightIndex = currentOrderIndexes.get(String(right.order.order_id));
|
|
516
|
+
if (leftIndex !== undefined || rightIndex !== undefined) {
|
|
517
|
+
if (leftIndex === undefined) return 1;
|
|
518
|
+
if (rightIndex === undefined) return -1;
|
|
519
|
+
return leftIndex - rightIndex;
|
|
520
|
+
}
|
|
521
|
+
const leftStartAt = this.toBookingDateTime(left.start_date, left.start_time).valueOf();
|
|
522
|
+
const rightStartAt = this.toBookingDateTime(right.start_date, right.start_time).valueOf();
|
|
523
|
+
return rightStartAt - leftStartAt;
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* 构造资源详情的 Unpaid 列表:复用旧版当前/未来订单的展示计算,再补齐被预约状态/时间漏掉的欠款订单。
|
|
529
|
+
* Unpaid 的成员资格由调用方按付款状态筛好;这里仅负责展示字段与顺序。
|
|
530
|
+
*/
|
|
531
|
+
buildUnpaidBookings(current, deviceCurrent, unpaidBookingList, currentBookings) {
|
|
532
|
+
const legacyPrioritizedBookings = this.pickBookingsForCurrentPoint(current, this.normalizeResourceBookings(current, deviceCurrent, unpaidBookingList), {
|
|
533
|
+
includeAllFuture: true
|
|
534
|
+
});
|
|
535
|
+
const allBookings = this.sortMatchedBookings(unpaidBookingList.map(booking => {
|
|
536
|
+
const normalized = this.normalizeMatchedBooking(current, deviceCurrent, booking, {
|
|
537
|
+
includeCompleted: true
|
|
538
|
+
});
|
|
539
|
+
if (normalized) return normalized;
|
|
540
|
+
const appointmentStatus = this.getBookingAppointmentStatus(booking);
|
|
541
|
+
const status = appointmentStatus === 'started' ? 'occupied' : appointmentStatus === 'completed' ? 'completed' : 'reserved';
|
|
542
|
+
return {
|
|
543
|
+
...booking,
|
|
544
|
+
status,
|
|
545
|
+
isTimeout: false,
|
|
546
|
+
timeoutTime: undefined,
|
|
547
|
+
progressPercent: undefined,
|
|
548
|
+
lateTime: undefined,
|
|
549
|
+
reserved_status: undefined,
|
|
550
|
+
remainingReserveTime: undefined
|
|
551
|
+
};
|
|
552
|
+
}));
|
|
553
|
+
const legacyOrderIds = new Set(legacyPrioritizedBookings.map(booking => String(booking.order.order_id)));
|
|
554
|
+
return this.sortUnpaidBookings([...legacyPrioritizedBookings, ...allBookings.filter(booking => !legacyOrderIds.has(String(booking.order.order_id)))], currentBookings);
|
|
555
|
+
}
|
|
556
|
+
|
|
510
557
|
/**
|
|
511
558
|
* 资源下 bookings 的返回裁剪策略:
|
|
512
559
|
* 1) 优先返回当前时刻正在进行中的预约(允许并发返回多条)
|
|
@@ -846,9 +893,7 @@ class SalesImpl extends _BaseModule.BaseModule {
|
|
|
846
893
|
remainingReserveTime: undefined
|
|
847
894
|
};
|
|
848
895
|
});
|
|
849
|
-
const unpaidBookings = this.
|
|
850
|
-
includeAllFuture: true
|
|
851
|
-
});
|
|
896
|
+
const unpaidBookings = this.buildUnpaidBookings(current, deviceCurrent, unpaidBookingList, bookings);
|
|
852
897
|
const orderCount = this.countBookingOrders(statsBookingList);
|
|
853
898
|
const bookingCount = statsBookingList.length;
|
|
854
899
|
const compeleteBookingCount = this.countCompletedBookings(statsBookingList);
|
|
@@ -123,8 +123,8 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
123
123
|
*/
|
|
124
124
|
clearSessionStorageOrderSnapshot(): void;
|
|
125
125
|
/**
|
|
126
|
-
* Kiosk
|
|
127
|
-
*
|
|
126
|
+
* H5/Kiosk 不能把已收款订单留在本地等待重试,必须直接等待云端 checkout。
|
|
127
|
+
* 其它平台保持 WebPOS/POS 的本地待同步任务;显式 true 仍可强制使用本地任务。
|
|
128
128
|
*/
|
|
129
129
|
protected shouldUseCheckoutSyncTask(): boolean;
|
|
130
130
|
/** UnifiedBookingSales 的真实结账默认请求收据数据,供云端确认后再本地打印。 */
|
|
@@ -1017,6 +1017,7 @@ const POS_OVERRIDABLE_AVAILABILITY_CONFLICT_CODES = new Set(['past', 'booking_cu
|
|
|
1017
1017
|
// as missing_resource at group level. Structural validation below still
|
|
1018
1018
|
// rejects a genuinely missing selection.
|
|
1019
1019
|
'missing_resource']);
|
|
1020
|
+
const POS_NO_RESOURCE_ID = 0;
|
|
1020
1021
|
function matchesForcedSelectionGroup(selection, group) {
|
|
1021
1022
|
const hasGroupId = typeof selection.requirementGroupId === 'string' && selection.requirementGroupId.trim().length > 0;
|
|
1022
1023
|
const hasFormId = selection.formId !== undefined && selection.formId !== null;
|
|
@@ -1097,6 +1098,19 @@ function buildPosForcedAvailabilityAssignments(params) {
|
|
|
1097
1098
|
return;
|
|
1098
1099
|
}
|
|
1099
1100
|
selectedResourceIds.forEach(resourceId => {
|
|
1101
|
+
if (sameAvailabilityId(resourceId, POS_NO_RESOURCE_ID)) {
|
|
1102
|
+
assignments.push({
|
|
1103
|
+
productId: product.id,
|
|
1104
|
+
resourceId: POS_NO_RESOURCE_ID,
|
|
1105
|
+
formId: group.formId ?? selection.formId,
|
|
1106
|
+
startAt: candidate.bookingStartAt || candidate.startAt,
|
|
1107
|
+
endAt: candidate.bookingEndAt || candidate.endAt,
|
|
1108
|
+
capacityRequired: Math.max(1, partySize),
|
|
1109
|
+
scheduleId: candidate.primaryScheduleRef?.scheduleId,
|
|
1110
|
+
timeSlotId: candidate.primaryScheduleRef?.timeSlotId
|
|
1111
|
+
});
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1100
1114
|
const resource = resources.find(item => sameAvailabilityId(item.id, resourceId));
|
|
1101
1115
|
const belongsToGroup = Boolean(resource && !(group.formId !== undefined && resource.formId !== undefined && !sameAvailabilityId(group.formId, resource.formId)) && !(group.resourceIds?.length && !group.resourceIds.some(id => sameAvailabilityId(id, resourceId))));
|
|
1102
1116
|
if (!resource || !belongsToGroup) {
|
|
@@ -1508,12 +1522,14 @@ class UnifiedBookingSalesImpl extends _BookingTicket.BookingTicket {
|
|
|
1508
1522
|
}
|
|
1509
1523
|
|
|
1510
1524
|
/**
|
|
1511
|
-
* Kiosk
|
|
1512
|
-
*
|
|
1525
|
+
* H5/Kiosk 不能把已收款订单留在本地等待重试,必须直接等待云端 checkout。
|
|
1526
|
+
* 其它平台保持 WebPOS/POS 的本地待同步任务;显式 true 仍可强制使用本地任务。
|
|
1513
1527
|
*/
|
|
1514
1528
|
shouldUseCheckoutSyncTask() {
|
|
1515
1529
|
const configured = this.otherParams?.checkoutSyncTaskEnabled;
|
|
1516
|
-
|
|
1530
|
+
if (configured === true) return true;
|
|
1531
|
+
const platform = (0, _platform.normalizeRuntimePlatform)(this.otherParams?.platform);
|
|
1532
|
+
return platform !== 'h5' && platform !== 'kiosk';
|
|
1517
1533
|
}
|
|
1518
1534
|
|
|
1519
1535
|
/** UnifiedBookingSales 的真实结账默认请求收据数据,供云端确认后再本地打印。 */
|