@pisell/pisellos 0.10.90 → 0.10.93
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/itemRule/adapter.d.ts +3 -1
- package/dist/model/strategy/adapter/itemRule/adapter.js +74 -7
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +3 -1
- package/dist/model/strategy/adapter/itemRule/evaluator.js +13 -0
- package/dist/model/strategy/adapter/itemRule/type.d.ts +40 -1
- package/dist/model/strategy/adapter/itemRule/type.js +10 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +2 -1
- package/dist/model/strategy/adapter/promotion/evaluator.js +103 -112
- package/dist/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
- package/dist/modules/BookingContext/utils/calendarBooking.js +207 -0
- package/dist/modules/BookingContext/utils/index.d.ts +1 -0
- package/dist/modules/BookingContext/utils/index.js +1 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +21 -0
- package/dist/modules/BookingContext/utils/productExtend.js +132 -33
- package/dist/modules/BookingContext/utils/resources.js +1 -1
- package/dist/modules/Cart/index.js +4 -3
- package/dist/modules/Cart/types.d.ts +2 -0
- package/dist/modules/Cart/utils/cartProduct.d.ts +3 -1
- package/dist/modules/Cart/utils/cartProduct.js +59 -32
- package/dist/modules/Date/index.d.ts +1 -1
- package/dist/modules/Date/index.js +60 -14
- package/dist/modules/Date/types.d.ts +5 -0
- package/dist/modules/OpenData/salesSettings.js +1 -1
- package/dist/modules/OpenData/types.d.ts +9 -0
- package/dist/modules/OpenData/utils.d.ts +1 -1
- package/dist/modules/OpenData/utils.js +3 -2
- package/dist/modules/Order/index.d.ts +22 -7
- package/dist/modules/Order/index.js +1565 -1161
- package/dist/modules/Order/localEftposState.d.ts +13 -0
- package/dist/modules/Order/localEftposState.js +39 -0
- package/dist/modules/Order/types.d.ts +33 -11
- package/dist/modules/Order/types.js +2 -2
- package/dist/modules/Order/unpaidAmountGap.d.ts +6 -0
- package/dist/modules/Order/unpaidAmountGap.js +72 -0
- package/dist/modules/Order/utils.d.ts +4 -1
- package/dist/modules/Order/utils.js +75 -52
- package/dist/modules/Payment/walletpass.js +32 -6
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/modules/Product/types.d.ts +16 -0
- package/dist/modules/ProductList/index.js +1 -1
- package/dist/modules/ResourcePlanner/planner.d.ts +2 -0
- package/dist/modules/ResourcePlanner/planner.js +383 -24
- package/dist/modules/ResourcePlanner/types.d.ts +42 -0
- package/dist/modules/Rules/index.js +86 -54
- package/dist/modules/Schedule/index.d.ts +7 -1
- package/dist/modules/Schedule/index.js +155 -39
- package/dist/modules/Schedule/types.d.ts +2 -0
- package/dist/modules/bookingReadValidation.d.ts +6 -0
- package/dist/modules/bookingReadValidation.js +72 -0
- package/dist/plugins/request.d.ts +2 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +1928 -1462
- package/dist/server/modules/form/index.d.ts +19 -0
- package/dist/server/modules/form/index.js +205 -0
- package/dist/server/modules/form/types.d.ts +13 -0
- package/dist/server/modules/form/types.js +3 -0
- package/dist/server/modules/index.d.ts +3 -0
- package/dist/server/modules/index.js +4 -0
- package/dist/server/modules/order/index.d.ts +21 -0
- package/dist/server/modules/order/index.js +1399 -831
- package/dist/server/modules/order/types.d.ts +3 -0
- package/dist/server/modules/order/utils/filterOrders.js +20 -0
- package/dist/server/modules/products/index.d.ts +28 -7
- package/dist/server/modules/products/index.js +1295 -769
- package/dist/server/modules/products/replication.d.ts +8 -0
- package/dist/server/modules/products/replication.js +69 -0
- package/dist/server/modules/products/types.d.ts +12 -1
- package/dist/server/modules/products/types.js +4 -0
- package/dist/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
- package/dist/shared/receipt/customerInvoiceLanguages.js +5 -3
- package/dist/shared/receipt/small-ticket.d.ts +1 -0
- package/dist/shared/receipt/small-ticket.js +58 -26
- package/dist/shared/receipt/templateVisibility.d.ts +3 -0
- package/dist/shared/receipt/templateVisibility.js +6 -2
- package/dist/solution/BaseSales/fulfillmentItemRules.d.ts +27 -0
- package/dist/solution/BaseSales/fulfillmentItemRules.js +750 -0
- package/dist/solution/BaseSales/index.d.ts +22 -6
- package/dist/solution/BaseSales/index.js +1881 -1347
- package/dist/solution/BaseSales/pickupTiming.d.ts +4 -0
- package/dist/solution/BaseSales/pickupTiming.js +35 -8
- package/dist/solution/BaseSales/types.d.ts +4 -0
- package/dist/solution/BaseSales/types.js +1 -0
- package/dist/solution/BaseSales/utils/posDurationPricing.d.ts +21 -0
- package/dist/solution/BaseSales/utils/posDurationPricing.js +174 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +2 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +8 -8
- package/dist/solution/BookingByStep/index.d.ts +20 -4
- package/dist/solution/BookingByStep/index.js +681 -361
- package/dist/solution/BookingByStep/utils/resources.d.ts +10 -0
- package/dist/solution/BookingByStep/utils/resources.js +117 -76
- package/dist/solution/BookingTicket/index.d.ts +10 -0
- package/dist/solution/BookingTicket/index.js +686 -598
- package/dist/solution/BookingTicket/types.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.js +35 -8
- package/dist/solution/BookingTicket/utils/redeemArrival.d.ts +8 -8
- package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
- package/dist/solution/BookingTicket/utils/resolveUniqueCartDetail.js +188 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +58 -94
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +1 -3
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +33 -62
- package/dist/solution/OrderInvoicePreview/index.js +4 -3
- package/dist/solution/Sales/index.js +1 -1
- package/dist/solution/ScanOrder/index.d.ts +2 -0
- package/dist/solution/ScanOrder/index.js +230 -97
- package/dist/solution/ScanOrder/menuAvailability.d.ts +24 -0
- package/dist/solution/ScanOrder/menuAvailability.js +363 -0
- package/dist/solution/ScanOrder/types.d.ts +3 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +42 -10
- package/dist/solution/UnifiedBookingSales/index.js +2493 -1496
- package/dist/solution/UnifiedBookingSales/salesSettings.js +1 -1
- package/dist/solution/UnifiedBookingSales/types.d.ts +20 -5
- package/dist/utils/pos-receipt-auto-print.d.ts +4 -0
- package/dist/utils/pos-receipt-auto-print.js +14 -0
- package/lib/model/strategy/adapter/itemRule/adapter.d.ts +3 -1
- package/lib/model/strategy/adapter/itemRule/adapter.js +54 -4
- package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +3 -1
- package/lib/model/strategy/adapter/itemRule/evaluator.js +9 -0
- package/lib/model/strategy/adapter/itemRule/type.d.ts +40 -1
- package/lib/model/strategy/adapter/itemRule/type.js +10 -0
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +2 -1
- package/lib/model/strategy/adapter/promotion/evaluator.js +22 -21
- package/lib/modules/BookingContext/utils/calendarBooking.d.ts +15 -0
- package/lib/modules/BookingContext/utils/calendarBooking.js +156 -0
- package/lib/modules/BookingContext/utils/index.d.ts +1 -0
- package/lib/modules/BookingContext/utils/index.js +11 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +21 -0
- package/lib/modules/BookingContext/utils/productExtend.js +104 -5
- package/lib/modules/BookingContext/utils/resources.js +1 -1
- package/lib/modules/Cart/index.js +4 -2
- package/lib/modules/Cart/types.d.ts +2 -0
- package/lib/modules/Cart/utils/cartProduct.d.ts +3 -1
- package/lib/modules/Cart/utils/cartProduct.js +39 -20
- package/lib/modules/Date/index.d.ts +1 -1
- package/lib/modules/Date/index.js +28 -5
- package/lib/modules/Date/types.d.ts +5 -0
- package/lib/modules/OpenData/salesSettings.js +1 -1
- package/lib/modules/OpenData/types.d.ts +9 -0
- package/lib/modules/OpenData/utils.d.ts +1 -1
- package/lib/modules/OpenData/utils.js +3 -2
- package/lib/modules/Order/index.d.ts +22 -7
- package/lib/modules/Order/index.js +457 -174
- package/lib/modules/Order/localEftposState.d.ts +13 -0
- package/lib/modules/Order/localEftposState.js +44 -0
- package/lib/modules/Order/types.d.ts +33 -11
- package/lib/modules/Order/types.js +2 -2
- package/lib/modules/Order/unpaidAmountGap.d.ts +6 -0
- package/lib/modules/Order/unpaidAmountGap.js +60 -0
- package/lib/modules/Order/utils.d.ts +4 -1
- package/lib/modules/Order/utils.js +29 -3
- package/lib/modules/Payment/walletpass.js +23 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Product/types.d.ts +16 -0
- package/lib/modules/ProductList/index.js +1 -1
- package/lib/modules/ResourcePlanner/planner.d.ts +2 -0
- package/lib/modules/ResourcePlanner/planner.js +299 -9
- package/lib/modules/ResourcePlanner/types.d.ts +42 -0
- package/lib/modules/Rules/index.js +32 -3
- package/lib/modules/Schedule/index.d.ts +7 -1
- package/lib/modules/Schedule/index.js +68 -4
- package/lib/modules/Schedule/types.d.ts +2 -0
- package/lib/modules/bookingReadValidation.d.ts +6 -0
- package/lib/modules/bookingReadValidation.js +56 -0
- package/lib/plugins/request.d.ts +2 -0
- package/lib/server/index.d.ts +9 -0
- package/lib/server/index.js +279 -30
- package/lib/server/modules/form/index.d.ts +19 -0
- package/lib/server/modules/form/index.js +73 -0
- package/lib/server/modules/form/types.d.ts +13 -0
- package/lib/server/modules/form/types.js +9 -0
- package/lib/server/modules/index.d.ts +3 -0
- package/lib/server/modules/index.js +15 -1
- package/lib/server/modules/order/index.d.ts +21 -0
- package/lib/server/modules/order/index.js +344 -35
- package/lib/server/modules/order/types.d.ts +3 -0
- package/lib/server/modules/order/utils/filterOrders.js +18 -0
- package/lib/server/modules/products/index.d.ts +28 -7
- package/lib/server/modules/products/index.js +224 -62
- package/lib/server/modules/products/replication.d.ts +8 -0
- package/lib/server/modules/products/replication.js +30 -0
- package/lib/server/modules/products/types.d.ts +12 -1
- package/lib/server/modules/products/types.js +3 -0
- package/lib/shared/receipt/customerInvoiceLanguages.d.ts +1 -1
- package/lib/shared/receipt/customerInvoiceLanguages.js +5 -3
- package/lib/shared/receipt/small-ticket.d.ts +1 -0
- package/lib/shared/receipt/small-ticket.js +53 -25
- package/lib/shared/receipt/templateVisibility.d.ts +3 -0
- package/lib/shared/receipt/templateVisibility.js +6 -2
- package/lib/solution/BaseSales/fulfillmentItemRules.d.ts +27 -0
- package/lib/solution/BaseSales/fulfillmentItemRules.js +259 -0
- package/lib/solution/BaseSales/index.d.ts +22 -6
- package/lib/solution/BaseSales/index.js +347 -59
- package/lib/solution/BaseSales/pickupTiming.d.ts +4 -0
- package/lib/solution/BaseSales/pickupTiming.js +24 -3
- package/lib/solution/BaseSales/types.d.ts +4 -0
- package/lib/solution/BaseSales/types.js +1 -0
- package/lib/solution/BaseSales/utils/posDurationPricing.d.ts +21 -0
- package/lib/solution/BaseSales/utils/posDurationPricing.js +133 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +2 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/lib/solution/BookingByStep/index.d.ts +20 -4
- package/lib/solution/BookingByStep/index.js +229 -17
- package/lib/solution/BookingByStep/utils/resources.d.ts +10 -0
- package/lib/solution/BookingByStep/utils/resources.js +25 -15
- package/lib/solution/BookingTicket/index.d.ts +10 -0
- package/lib/solution/BookingTicket/index.js +57 -6
- package/lib/solution/BookingTicket/types.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +2 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +34 -4
- package/lib/solution/BookingTicket/utils/redeemArrival.d.ts +8 -8
- package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.d.ts +8 -0
- package/lib/solution/BookingTicket/utils/resolveUniqueCartDetail.js +136 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +2 -14
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +1 -3
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +17 -34
- package/lib/solution/OrderInvoicePreview/index.js +1 -0
- package/lib/solution/Sales/index.js +1 -1
- package/lib/solution/ScanOrder/index.d.ts +2 -0
- package/lib/solution/ScanOrder/index.js +131 -22
- package/lib/solution/ScanOrder/menuAvailability.d.ts +24 -0
- package/lib/solution/ScanOrder/menuAvailability.js +203 -0
- package/lib/solution/ScanOrder/types.d.ts +3 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +42 -10
- package/lib/solution/UnifiedBookingSales/index.js +717 -144
- package/lib/solution/UnifiedBookingSales/salesSettings.js +1 -1
- package/lib/solution/UnifiedBookingSales/types.d.ts +20 -5
- package/lib/utils/pos-receipt-auto-print.d.ts +4 -0
- package/lib/utils/pos-receipt-auto-print.js +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.FormModule = void 0;
|
|
7
|
+
var _BaseModule = require("../../../modules/BaseModule");
|
|
8
|
+
var _types = require("./types");
|
|
9
|
+
const FORM_LIST_URL = '/shop/form/simple/list';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 表单定义缓存。数据源负责 HTTP 与 Ably 订阅;本模块仅向 OS 消费方公开只读标题映射。
|
|
13
|
+
*/
|
|
14
|
+
class FormModule extends _BaseModule.BaseModule {
|
|
15
|
+
defaultName = 'form';
|
|
16
|
+
defaultVersion = '1.0.0';
|
|
17
|
+
store;
|
|
18
|
+
dataSource;
|
|
19
|
+
refreshTimer;
|
|
20
|
+
async initialize(core, options) {
|
|
21
|
+
this.core = core;
|
|
22
|
+
const initialStore = options?.store;
|
|
23
|
+
this.store = {
|
|
24
|
+
list: Array.isArray(initialStore?.list) ? initialStore.list : [],
|
|
25
|
+
map: initialStore?.map instanceof Map ? initialStore.map : new Map()
|
|
26
|
+
};
|
|
27
|
+
const FormDataSource = this.core.serverOptions?.All_DATA_SOURCES?.FormDataSource;
|
|
28
|
+
this.dataSource = FormDataSource ? new FormDataSource() : undefined;
|
|
29
|
+
if (this.dataSource) {
|
|
30
|
+
await this.dataSource.run({
|
|
31
|
+
pubsub: {
|
|
32
|
+
callback: () => this.scheduleRefresh()
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async preload() {
|
|
38
|
+
await this.refresh();
|
|
39
|
+
}
|
|
40
|
+
getTitleMap() {
|
|
41
|
+
return this.store.list.reduce((result, item) => {
|
|
42
|
+
if (item.id !== undefined && item.id !== null && item.title) result[String(item.id)] = item.title;
|
|
43
|
+
return result;
|
|
44
|
+
}, {});
|
|
45
|
+
}
|
|
46
|
+
scheduleRefresh() {
|
|
47
|
+
if (this.refreshTimer) clearTimeout(this.refreshTimer);
|
|
48
|
+
this.refreshTimer = setTimeout(() => void this.refresh(), 300);
|
|
49
|
+
}
|
|
50
|
+
async refresh() {
|
|
51
|
+
try {
|
|
52
|
+
const response = this.dataSource ? await this.dataSource.run({
|
|
53
|
+
http: {
|
|
54
|
+
url: FORM_LIST_URL
|
|
55
|
+
}
|
|
56
|
+
}) : await this.core.getPlugin('request')?.get(FORM_LIST_URL);
|
|
57
|
+
const data = response?.data;
|
|
58
|
+
const list = Array.isArray(data) ? data : data?.list || data?.data || [];
|
|
59
|
+
if (!Array.isArray(list)) return;
|
|
60
|
+
this.store.list = list;
|
|
61
|
+
this.store.map = new Map(this.store.list.map(item => [String(item.id), item]));
|
|
62
|
+
await this.core.effects.emit(_types.FormHooks.onChanged, this.getTitleMap());
|
|
63
|
+
} catch {
|
|
64
|
+
// 接口尚未发布或临时失败时保留现有缓存,展示层会回退订单历史标题。
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async destroy() {
|
|
68
|
+
if (this.refreshTimer) clearTimeout(this.refreshTimer);
|
|
69
|
+
this.dataSource?.destroy?.();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.FormModule = FormModule;
|
|
73
|
+
var _default = exports.default = FormModule;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FormDefinition {
|
|
2
|
+
id: string | number;
|
|
3
|
+
code?: string;
|
|
4
|
+
title?: Record<string, string> | string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface FormState {
|
|
8
|
+
list: FormDefinition[];
|
|
9
|
+
map: Map<string, FormDefinition>;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormHooks: {
|
|
12
|
+
readonly onChanged: "form:onChanged";
|
|
13
|
+
};
|
|
@@ -24,4 +24,7 @@ export { FloorPlanHooks } from './floor-plan/types';
|
|
|
24
24
|
export { ResourceModule, resourceModule } from './resource';
|
|
25
25
|
export type { ResourceState, ResourceData, ResourceId, ResourceBooking, ResourcePageQuery, ResourcePageResult, QueryOptions, ScheduleEventResource, } from './resource';
|
|
26
26
|
export { ResourceHooks } from './resource';
|
|
27
|
+
export { FormModule } from './form';
|
|
28
|
+
export type { FormDefinition, FormState } from './form/types';
|
|
29
|
+
export { FormHooks } from './form/types';
|
|
27
30
|
export type { RouteHandler, HttpMethod, RouteDefinition, Router, ModuleRegistryConfig, } from '../types';
|
|
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "FloorPlanModule", {
|
|
|
15
15
|
return _floorPlan.FloorPlanModule;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "FormHooks", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _types6.FormHooks;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "FormModule", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _form.FormModule;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "MenuHooks", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function () {
|
|
@@ -105,4 +117,6 @@ var _types4 = require("./order/types");
|
|
|
105
117
|
var _payment = require("./payment");
|
|
106
118
|
var _floorPlan = require("./floor-plan");
|
|
107
119
|
var _types5 = require("./floor-plan/types");
|
|
108
|
-
var _resource = require("./resource");
|
|
120
|
+
var _resource = require("./resource");
|
|
121
|
+
var _form = require("./form");
|
|
122
|
+
var _types6 = require("./form/types");
|
|
@@ -105,6 +105,8 @@ export declare class OrderModule extends BaseModule implements Module {
|
|
|
105
105
|
getOrderByOrderId(orderId: OrderId): OrderData | undefined;
|
|
106
106
|
private buildLocalPaymentOrderLogContext;
|
|
107
107
|
getLocalOrderFromMemoryByLookup(lookup: OrderId): OrderData | null;
|
|
108
|
+
/** Read-only payment gate lookup; never hydrate the whole order list on a miss. */
|
|
109
|
+
getLocalOrderForPaymentReadiness(lookup: OrderId): Promise<OrderData | null>;
|
|
108
110
|
getLocalOrderByLookup(lookup: OrderId, options?: {
|
|
109
111
|
operationId?: string;
|
|
110
112
|
}): Promise<OrderData | null>;
|
|
@@ -123,11 +125,24 @@ export declare class OrderModule extends BaseModule implements Module {
|
|
|
123
125
|
paymentNumber: OrderId;
|
|
124
126
|
operationId?: string;
|
|
125
127
|
updates: Record<string, any>;
|
|
128
|
+
finalizeUnsuccessful?: boolean;
|
|
126
129
|
}): Promise<{
|
|
127
130
|
order: OrderData;
|
|
128
131
|
payment: Record<string, any>;
|
|
129
132
|
previousPayment: Record<string, any>;
|
|
130
133
|
} | null>;
|
|
134
|
+
finalizeLocalEftposPayment(params: {
|
|
135
|
+
saleId: OrderId;
|
|
136
|
+
paymentNumber: OrderId;
|
|
137
|
+
result: 'failed' | 'not_started';
|
|
138
|
+
failedTransactionNumbers: string[];
|
|
139
|
+
}): Promise<{
|
|
140
|
+
order: OrderData;
|
|
141
|
+
payment: Record<string, any>;
|
|
142
|
+
previousPayment: Record<string, any>;
|
|
143
|
+
} | null>;
|
|
144
|
+
/** Only a successful full detail GET may release the persisted payment gate. */
|
|
145
|
+
completeLocalPaymentRefresh(fresh: OrderData): Promise<OrderData>;
|
|
131
146
|
loadOrdersByServer(options?: {
|
|
132
147
|
trigger?: string;
|
|
133
148
|
}): Promise<OrderData[]>;
|
|
@@ -300,6 +315,8 @@ export declare class OrderModule extends BaseModule implements Module {
|
|
|
300
315
|
*/
|
|
301
316
|
private getOrderStorageKey;
|
|
302
317
|
private getPersistedOrderStorageKey;
|
|
318
|
+
private getRealOrderId;
|
|
319
|
+
private findLocalOrderIndexByIdentity;
|
|
303
320
|
private getOrderIdentityMatchKeys;
|
|
304
321
|
private doOrdersShareIdentity;
|
|
305
322
|
private findOrderIndexByIdentity;
|
|
@@ -331,6 +348,10 @@ export declare class OrderModule extends BaseModule implements Module {
|
|
|
331
348
|
private getStorageItem;
|
|
332
349
|
private setStorageItem;
|
|
333
350
|
private loadOrdersFromSQLite;
|
|
351
|
+
/** 历史记录只按真实订单 ID / 唯一本地编号归组,不使用桌号或小票短号。 */
|
|
352
|
+
private deduplicateStoredOrders;
|
|
353
|
+
private mergeStoredOrderCopies;
|
|
354
|
+
private writeOrderRowsToSQLite;
|
|
334
355
|
private isPendingSyncOrder;
|
|
335
356
|
private isDraftOrder;
|
|
336
357
|
private shouldProtectDraftOrderFromIncoming;
|