@pisell/pisellos 2.2.263 → 2.2.265
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/modules/Order/index.d.ts +27 -8
- package/dist/modules/Order/index.js +736 -473
- package/dist/modules/Order/payment-utils.d.ts +26 -0
- package/dist/modules/Order/payment-utils.js +225 -0
- package/dist/modules/Order/types.d.ts +33 -1
- package/dist/modules/Order/utils/orderCollectionIdentity.js +7 -2
- package/dist/modules/Order/utils.js +8 -5
- package/dist/modules/Payment/index.d.ts +2 -0
- package/dist/modules/Payment/index.js +78 -49
- package/dist/modules/Payment/types.d.ts +26 -24
- package/dist/modules/Payment/types.js +2 -0
- package/dist/server/index.d.ts +16 -0
- package/dist/server/index.js +1940 -1043
- package/dist/server/modules/order/index.d.ts +49 -4
- package/dist/server/modules/order/index.js +1577 -698
- package/dist/server/modules/order/types.d.ts +11 -3
- package/dist/server/modules/order/types.js +1 -1
- package/dist/solution/BaseSales/index.d.ts +33 -3
- package/dist/solution/BaseSales/index.js +653 -340
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +6 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +2 -1
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +10 -2
- package/dist/utils/payment-number.d.ts +9 -0
- package/dist/utils/payment-number.js +69 -0
- package/lib/model/strategy/adapter/promotion/index.js +49 -0
- package/lib/modules/Order/index.d.ts +27 -8
- package/lib/modules/Order/index.js +180 -60
- package/lib/modules/Order/payment-utils.d.ts +26 -0
- package/lib/modules/Order/payment-utils.js +224 -0
- package/lib/modules/Order/types.d.ts +33 -1
- package/lib/modules/Order/utils/orderCollectionIdentity.js +3 -0
- package/lib/modules/Order/utils.js +5 -3
- package/lib/modules/Payment/index.d.ts +2 -0
- package/lib/modules/Payment/index.js +33 -12
- package/lib/modules/Payment/types.d.ts +26 -24
- package/lib/server/index.d.ts +16 -0
- package/lib/server/index.js +670 -18
- package/lib/server/modules/order/index.d.ts +49 -4
- package/lib/server/modules/order/index.js +657 -66
- package/lib/server/modules/order/types.d.ts +11 -3
- package/lib/solution/BaseSales/index.d.ts +33 -3
- package/lib/solution/BaseSales/index.js +193 -9
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +6 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +2 -1
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/Sales/index.js +5 -3
- package/lib/utils/payment-number.d.ts +9 -0
- package/lib/utils/payment-number.js +64 -0
- package/package.json +1 -1
|
@@ -468,6 +468,8 @@ export interface SubmitSalesOrderParams {
|
|
|
468
468
|
export interface PaymentItemData {
|
|
469
469
|
/** 当前支付项的唯一 ID */
|
|
470
470
|
uuid: string;
|
|
471
|
+
/** 支付项稳定唯一号 */
|
|
472
|
+
payment_number?: string;
|
|
471
473
|
/** 当前支付方式付出去多少钱 */
|
|
472
474
|
amount: string;
|
|
473
475
|
/** 支付类型代码 */
|
|
@@ -490,13 +492,22 @@ export interface PaymentItemData {
|
|
|
490
492
|
export interface OrderPaymentMetadata {
|
|
491
493
|
rounding_rule?: Record<string, any>;
|
|
492
494
|
unique_payment_number?: string;
|
|
495
|
+
/** 刷卡机设备快照;OS 不解析内部字段,仅透传并持久化 */
|
|
496
|
+
card_reader_snapshot?: Record<string, unknown>;
|
|
493
497
|
shop_wallet_pass_id?: number | string;
|
|
494
498
|
actual_paid_amount?: number | string;
|
|
495
499
|
change_given_amount?: number | string;
|
|
500
|
+
transactions?: OrderPaymentTransaction[];
|
|
496
501
|
[key: string]: any;
|
|
497
502
|
}
|
|
503
|
+
export interface OrderPaymentTransaction {
|
|
504
|
+
number: string;
|
|
505
|
+
status: 'success' | 'fail';
|
|
506
|
+
}
|
|
498
507
|
export interface OrderPaymentData {
|
|
499
508
|
order_payment_id?: number | string;
|
|
509
|
+
/** 支付项稳定唯一号;历史支付项允许缺失 */
|
|
510
|
+
payment_number?: string;
|
|
500
511
|
amount: string;
|
|
501
512
|
code: string;
|
|
502
513
|
custom_payment_id: number;
|
|
@@ -523,6 +534,15 @@ export interface OrderPaymentData {
|
|
|
523
534
|
created_at?: string;
|
|
524
535
|
updated_at?: string;
|
|
525
536
|
}
|
|
537
|
+
export interface OrderPaymentUpdateOptions {
|
|
538
|
+
matchBy?: 'payment_number' | 'compat' | 'legacy';
|
|
539
|
+
}
|
|
540
|
+
export interface OrderPaymentUpdateResult {
|
|
541
|
+
updated: boolean;
|
|
542
|
+
payment: OrderPaymentData | null;
|
|
543
|
+
payments: OrderPaymentData[];
|
|
544
|
+
summary: OrderSummary | null;
|
|
545
|
+
}
|
|
526
546
|
export type OrderPaymentSource = PaymentItem | OrderPaymentData | Record<string, any>;
|
|
527
547
|
export interface MapOrderPaymentsOptions {
|
|
528
548
|
includeVoided?: boolean;
|
|
@@ -673,6 +693,14 @@ export interface OrderModuleAPI {
|
|
|
673
693
|
channel?: string;
|
|
674
694
|
type?: string;
|
|
675
695
|
}) => OrderSubmitPayload;
|
|
696
|
+
saveTempOrderAsDraft: <T = any>(params?: {
|
|
697
|
+
cacheId?: string;
|
|
698
|
+
platform?: string;
|
|
699
|
+
businessCode?: string;
|
|
700
|
+
channel?: string;
|
|
701
|
+
type?: string;
|
|
702
|
+
enhancePayload?: SubmitPayloadEnhancer;
|
|
703
|
+
}) => Promise<T>;
|
|
676
704
|
applyLocalPrintOrderNumbers: (order?: Record<string, any> | null) => Promise<OrderTempOrder>;
|
|
677
705
|
getTempOrderNote: () => string;
|
|
678
706
|
updateTempOrderNote: {
|
|
@@ -730,11 +758,15 @@ export interface OrderModuleAPI {
|
|
|
730
758
|
getOrderPayments: () => OrderPaymentData[];
|
|
731
759
|
setOrderPayments: (payments: OrderPaymentSource[]) => OrderPaymentData[];
|
|
732
760
|
addOrderPayment: (payment: OrderPaymentSource) => OrderPaymentData[];
|
|
733
|
-
|
|
761
|
+
addOrderPaymentAsync: (payment: OrderPaymentSource) => Promise<OrderPaymentData[]>;
|
|
762
|
+
updateOrderPayment: (paymentIdentity: string | number, updates: Partial<OrderPaymentData> & Record<string, any>, options?: OrderPaymentUpdateOptions) => Promise<OrderPaymentUpdateResult>;
|
|
734
763
|
deleteOrderPayment: (paymentIdentity: string | number) => OrderPaymentData[];
|
|
735
764
|
updateVoucherOrderPayments: (payments: OrderPaymentSource[], options?: {
|
|
736
765
|
status?: 'paid' | 'payment_pending';
|
|
737
766
|
}) => OrderPaymentData[];
|
|
767
|
+
updateVoucherOrderPaymentsAsync: (payments: OrderPaymentSource[], options?: {
|
|
768
|
+
status?: 'paid' | 'payment_pending';
|
|
769
|
+
}) => Promise<OrderPaymentData[]>;
|
|
738
770
|
confirmPendingVoucherPayments: (options?: {
|
|
739
771
|
persist?: boolean;
|
|
740
772
|
recalculateSummary?: boolean;
|
|
@@ -220,6 +220,9 @@ function normalizeOrderCollection(kind, items, options) {
|
|
|
220
220
|
const persistentId = getOrderCollectionPersistentId(kind, item);
|
|
221
221
|
let uid = getOrderCollectionUid(kind, item);
|
|
222
222
|
if (!uid) {
|
|
223
|
+
if (kind === "payment" && !isBlankOrderCollectionIdentity(item == null ? void 0 : item.payment_number)) {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
223
226
|
uid = persistentId ? buildOrderCollectionFallbackUid(kind, persistentId) : allocateAnonymousUid(occupiedUids, createAnonymousUid);
|
|
224
227
|
item = setOrderCollectionUid(kind, item, uid);
|
|
225
228
|
result[index] = item;
|
|
@@ -965,6 +965,9 @@ function buildSubmitPayload(params) {
|
|
|
965
965
|
...tempOrderRest,
|
|
966
966
|
customer_id: tempOrder.customer_id ?? 1,
|
|
967
967
|
customer_name: tempOrder.customer_name || "Walk-In",
|
|
968
|
+
country_calling_code: String(tempOrder.country_calling_code ?? ""),
|
|
969
|
+
phone: String(tempOrder.phone ?? ""),
|
|
970
|
+
email: String(tempOrder.email ?? ""),
|
|
968
971
|
order_number: tempOrder.order_number ?? null,
|
|
969
972
|
shop_order_number: tempOrder.shop_order_number ?? null,
|
|
970
973
|
shop_full_order_number: tempOrder.shop_full_order_number ?? null,
|
|
@@ -1020,9 +1023,7 @@ function mapPaymentItemToOrderPayment(paymentItem) {
|
|
|
1020
1023
|
const item = paymentItem;
|
|
1021
1024
|
const customPaymentId = item.custom_payment_id ?? item.id;
|
|
1022
1025
|
const metadata = item.metadata && typeof item.metadata === "object" ? { ...item.metadata } : {};
|
|
1023
|
-
|
|
1024
|
-
metadata.unique_payment_number = String(item.uuid);
|
|
1025
|
-
}
|
|
1026
|
+
const paymentNumber = item.payment_number;
|
|
1026
1027
|
const paymentMetadataKeys = [
|
|
1027
1028
|
"rounding_rule",
|
|
1028
1029
|
"shop_wallet_pass_id",
|
|
@@ -1039,6 +1040,7 @@ function mapPaymentItemToOrderPayment(paymentItem) {
|
|
|
1039
1040
|
const createdAt = item.created_at ?? timestamp;
|
|
1040
1041
|
return {
|
|
1041
1042
|
...item.order_payment_id !== void 0 ? { order_payment_id: item.order_payment_id } : {},
|
|
1043
|
+
...paymentNumber !== void 0 && paymentNumber !== null && paymentNumber !== "" ? { payment_number: String(paymentNumber) } : {},
|
|
1042
1044
|
amount: String(item.amount ?? "0.00"),
|
|
1043
1045
|
code: String(item.code || ""),
|
|
1044
1046
|
custom_payment_id: Number(customPaymentId ?? 0),
|
|
@@ -20,6 +20,7 @@ export declare class PaymentModule extends BaseModule implements Module, Payment
|
|
|
20
20
|
protected defaultVersion: string;
|
|
21
21
|
request: RequestPlugin;
|
|
22
22
|
private app;
|
|
23
|
+
private appPlugin;
|
|
23
24
|
private store;
|
|
24
25
|
window: WindowPlugin;
|
|
25
26
|
private dbManager;
|
|
@@ -40,6 +41,7 @@ export declare class PaymentModule extends BaseModule implements Module, Payment
|
|
|
40
41
|
* paymentModule.updateOtherParams({ fatherModule: 'bookingTicket' });
|
|
41
42
|
*/
|
|
42
43
|
updateOtherParams(params: Record<string, any>): void;
|
|
44
|
+
private getPaymentNumberAppData;
|
|
43
45
|
/**
|
|
44
46
|
* 记录信息日志
|
|
45
47
|
*/
|
|
@@ -31,6 +31,9 @@ var import_cash = require("./cash");
|
|
|
31
31
|
var import_eftpos = require("./eftpos");
|
|
32
32
|
var import_walletpass = require("./walletpass");
|
|
33
33
|
var import_decimal = require("decimal.js");
|
|
34
|
+
var import_payment_utils = require("../Order/payment-utils");
|
|
35
|
+
var import_utils2 = require("../Order/utils");
|
|
36
|
+
var import_payment_number = require("../../utils/payment-number");
|
|
34
37
|
__reExport(Payment_exports, require("./types"), module.exports);
|
|
35
38
|
function formatAmount(amount) {
|
|
36
39
|
try {
|
|
@@ -112,15 +115,15 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
112
115
|
this.store = options.store;
|
|
113
116
|
this.otherParams = options.otherParams || {};
|
|
114
117
|
this.request = core.getPlugin("request");
|
|
115
|
-
|
|
118
|
+
this.appPlugin = core.getPlugin("app");
|
|
116
119
|
this.window = core.getPlugin("window");
|
|
117
120
|
if (!this.request) {
|
|
118
121
|
throw new Error("支付模块需要 request 插件支持");
|
|
119
122
|
}
|
|
120
|
-
if (!appPlugin) {
|
|
123
|
+
if (!this.appPlugin) {
|
|
121
124
|
throw new Error("支付模块需要 app 插件支持");
|
|
122
125
|
}
|
|
123
|
-
this.app = appPlugin.getApp();
|
|
126
|
+
this.app = this.appPlugin.getApp();
|
|
124
127
|
this.dbManager = this.app.dbManager;
|
|
125
128
|
this.logger = this.app.logger;
|
|
126
129
|
this.registerNetworkHandlers();
|
|
@@ -136,6 +139,14 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
136
139
|
updateOtherParams(params) {
|
|
137
140
|
this.otherParams = params || {};
|
|
138
141
|
}
|
|
142
|
+
getPaymentNumberAppData(key) {
|
|
143
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
144
|
+
const getData = (_b = (_a = this.appPlugin) == null ? void 0 : _a.getData) == null ? void 0 : _b.call(_a);
|
|
145
|
+
if (typeof getData === "function")
|
|
146
|
+
return getData(key);
|
|
147
|
+
const coreData = (_g = (_e = (_d = (_c = this.app) == null ? void 0 : _c.models) == null ? void 0 : _d.getStore) == null ? void 0 : (_f = _e.call(_d)).getDataByModel) == null ? void 0 : _g.call(_f, "core", "core");
|
|
148
|
+
return coreData == null ? void 0 : coreData[key];
|
|
149
|
+
}
|
|
139
150
|
/**
|
|
140
151
|
* 记录信息日志
|
|
141
152
|
*/
|
|
@@ -521,15 +532,20 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
521
532
|
});
|
|
522
533
|
throw new Error(warningMessage);
|
|
523
534
|
}
|
|
524
|
-
|
|
525
|
-
if ((_a = paymentItem.metadata) == null ? void 0 : _a.unique_payment_number) {
|
|
526
|
-
paymentUuid = paymentItem.metadata.unique_payment_number;
|
|
527
|
-
} else {
|
|
528
|
-
paymentUuid = (0, import_utils.getUniqueId)("payment_");
|
|
529
|
-
}
|
|
535
|
+
const paymentUuid = paymentItem.uuid || ((_a = paymentItem.metadata) == null ? void 0 : _a.unique_payment_number) || (0, import_utils.getUniqueId)("payment_");
|
|
530
536
|
const currentTime = formatDateTime(/* @__PURE__ */ new Date());
|
|
537
|
+
const hasPaymentNumber = String(paymentItem.payment_number || "").trim() !== "";
|
|
538
|
+
const paymentNumberDevicePrefix = hasPaymentNumber ? "LOCAL" : await (0, import_payment_number.resolvePaymentNumberDevicePrefix)(
|
|
539
|
+
(key) => this.getPaymentNumberAppData(key)
|
|
540
|
+
);
|
|
541
|
+
const paymentNumber = (0, import_payment_utils.ensureOrderPaymentNumber)(
|
|
542
|
+
paymentItem,
|
|
543
|
+
paymentNumberDevicePrefix,
|
|
544
|
+
import_utils2.createUuidV4
|
|
545
|
+
).payment_number;
|
|
531
546
|
const newPaymentItem = {
|
|
532
547
|
uuid: paymentUuid,
|
|
548
|
+
payment_number: paymentNumber,
|
|
533
549
|
custom_payment_id: normalizeCustomPaymentId(paymentItem),
|
|
534
550
|
name: paymentItem.name,
|
|
535
551
|
code: paymentItem.code,
|
|
@@ -549,10 +565,8 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
549
565
|
updated_at: currentTime,
|
|
550
566
|
// 更新时间
|
|
551
567
|
metadata: {
|
|
552
|
-
...paymentItem.metadata
|
|
568
|
+
...paymentItem.metadata
|
|
553
569
|
// 保留传入的所有 metadata 字段
|
|
554
|
-
unique_payment_number: paymentUuid
|
|
555
|
-
// 设置唯一支付号为支付项的 uuid
|
|
556
570
|
}
|
|
557
571
|
};
|
|
558
572
|
order.payment.push(newPaymentItem);
|
|
@@ -767,6 +781,12 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
767
781
|
if ("amount" in formattedParams && formattedParams.amount !== void 0) {
|
|
768
782
|
formattedParams.amount = formatAmount(formattedParams.amount);
|
|
769
783
|
}
|
|
784
|
+
if (formattedParams.metadata && typeof formattedParams.metadata === "object") {
|
|
785
|
+
formattedParams.metadata = {
|
|
786
|
+
...paymentItem.metadata || {},
|
|
787
|
+
...formattedParams.metadata
|
|
788
|
+
};
|
|
789
|
+
}
|
|
770
790
|
Object.assign(paymentItem, formattedParams);
|
|
771
791
|
this.recalculateOrderAmount(order);
|
|
772
792
|
await this.dbManager.update("order", order);
|
|
@@ -824,6 +844,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
|
|
|
824
844
|
const paymentData = {
|
|
825
845
|
payments: order.payment.map((payment) => ({
|
|
826
846
|
uuid: payment.uuid,
|
|
847
|
+
payment_number: payment.payment_number,
|
|
827
848
|
amount: payment.amount,
|
|
828
849
|
code: payment.code,
|
|
829
850
|
custom_payment_id: payment.custom_payment_id,
|
|
@@ -87,12 +87,30 @@ export interface PaymentMethod {
|
|
|
87
87
|
/** 其他配置信息 */
|
|
88
88
|
[key: string]: any;
|
|
89
89
|
}
|
|
90
|
+
/** 支付项扩展元数据 */
|
|
91
|
+
export interface PaymentItemMetadata {
|
|
92
|
+
/** 钱箱 ID */
|
|
93
|
+
shop_wallet_pass_id?: string;
|
|
94
|
+
/** 三方支付交易流水号 */
|
|
95
|
+
unique_payment_number?: string;
|
|
96
|
+
/** 刷卡机设备快照;PaymentModule 不解析内部字段 */
|
|
97
|
+
card_reader_snapshot?: Record<string, unknown>;
|
|
98
|
+
/** rounding 规则 */
|
|
99
|
+
rounding_rule?: any;
|
|
100
|
+
/** 实付金额(现金支付时的实际给出金额) */
|
|
101
|
+
actual_paid_amount?: number;
|
|
102
|
+
/** 找零金额(现金支付时的找零金额) */
|
|
103
|
+
change_given_amount?: number;
|
|
104
|
+
[key: string]: unknown;
|
|
105
|
+
}
|
|
90
106
|
/**
|
|
91
107
|
* 支付项
|
|
92
108
|
*/
|
|
93
109
|
export interface PaymentItem {
|
|
94
110
|
/** 当前支付项的唯一 ID */
|
|
95
111
|
uuid: string;
|
|
112
|
+
/** 支付项稳定唯一号 */
|
|
113
|
+
payment_number?: string;
|
|
96
114
|
/** 当前支付方式付出去多少钱 */
|
|
97
115
|
amount: string;
|
|
98
116
|
/** 支付类型,跟支付列表上对应的支付方式保持一致 */
|
|
@@ -110,18 +128,7 @@ export interface PaymentItem {
|
|
|
110
128
|
/** Wallet Pass 本次使用值 */
|
|
111
129
|
wallet_pass_use_value?: string | number | null;
|
|
112
130
|
/** 拓展参数字段 */
|
|
113
|
-
metadata?:
|
|
114
|
-
/** 钱箱 ID */
|
|
115
|
-
shop_wallet_pass_id?: string;
|
|
116
|
-
/** 唯一支付号 */
|
|
117
|
-
unique_payment_number?: string;
|
|
118
|
-
/** rouding规则 */
|
|
119
|
-
rounding_rule?: any;
|
|
120
|
-
/** 实付金额(现金支付时的实际给出金额) */
|
|
121
|
-
actual_paid_amount?: number;
|
|
122
|
-
/** 找零金额(现金支付时的找零金额) */
|
|
123
|
-
change_given_amount?: number;
|
|
124
|
-
};
|
|
131
|
+
metadata?: PaymentItemMetadata;
|
|
125
132
|
/** rouding金额 */
|
|
126
133
|
rounding_amount?: string;
|
|
127
134
|
/** 三方支付手续费 */
|
|
@@ -228,6 +235,10 @@ export interface UpdateOrderParams {
|
|
|
228
235
|
* 支付项输入类型(允许 amount 为数字)
|
|
229
236
|
*/
|
|
230
237
|
export interface PaymentItemInput {
|
|
238
|
+
/** 调用方已有的支付项运行态 UUID;存在时复用为 payment_number 的唯一号段 */
|
|
239
|
+
uuid?: string;
|
|
240
|
+
/** 支付项稳定唯一号 */
|
|
241
|
+
payment_number?: string;
|
|
231
242
|
/** 当前支付方式付出去多少钱 */
|
|
232
243
|
amount: string | number;
|
|
233
244
|
/** 支付类型,跟支付列表上对应的支付方式保持一致 */
|
|
@@ -256,18 +267,7 @@ export interface PaymentItemInput {
|
|
|
256
267
|
/** 订单支付类型 */
|
|
257
268
|
order_payment_type?: 'normal' | 'deposit';
|
|
258
269
|
/** 扩展参数字段 */
|
|
259
|
-
metadata?:
|
|
260
|
-
/** 钱箱 ID */
|
|
261
|
-
shop_wallet_pass_id?: string;
|
|
262
|
-
/** 唯一支付号 */
|
|
263
|
-
unique_payment_number?: string;
|
|
264
|
-
/** rounding规则 */
|
|
265
|
-
rounding_rule?: any;
|
|
266
|
-
/** 实付金额(现金支付时的实际给出金额) */
|
|
267
|
-
actual_paid_amount?: number;
|
|
268
|
-
/** 找零金额(现金支付时的找零金额) */
|
|
269
|
-
change_given_amount?: number;
|
|
270
|
-
};
|
|
270
|
+
metadata?: PaymentItemMetadata;
|
|
271
271
|
/** 支付项创建时间 (格式: YYYY-MM-DD HH:mm:ss, 可选,不传则自动生成) */
|
|
272
272
|
created_at?: string;
|
|
273
273
|
/** 支付项更新时间 (格式: YYYY-MM-DD HH:mm:ss, 可选,不传则自动生成) */
|
|
@@ -302,6 +302,8 @@ export interface PaymentUpdateFields {
|
|
|
302
302
|
voucher_id?: string;
|
|
303
303
|
/** 该支付项是否已经同步给后端服务器(只有网络请求成功后才为true) */
|
|
304
304
|
isSynced?: boolean;
|
|
305
|
+
/** 支付项扩展元数据;更新时与原 metadata 浅合并 */
|
|
306
|
+
metadata?: PaymentItemMetadata;
|
|
305
307
|
/** 同步错误信息(业务错误时记录错误信息,用于区分"未同步"和"同步失败") */
|
|
306
308
|
syncError?: {
|
|
307
309
|
error: string;
|
package/lib/server/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare class Server {
|
|
|
57
57
|
private readonly BOOKING_REMOTE_CACHE_MAX_ENTRIES;
|
|
58
58
|
private salesSearchSubscribers;
|
|
59
59
|
private deviceTaskActionsRegistered;
|
|
60
|
+
private localPaymentUpdateQueues;
|
|
60
61
|
private floorPlanQuerySubscribers;
|
|
61
62
|
private moduleRegistry;
|
|
62
63
|
constructor(core: PisellCore);
|
|
@@ -120,6 +121,8 @@ declare class Server {
|
|
|
120
121
|
private handleSyncSalesTask;
|
|
121
122
|
private runCheckoutSync;
|
|
122
123
|
private omitCheckoutSyncMode;
|
|
124
|
+
private buildRemoteCheckoutData;
|
|
125
|
+
private mergeCheckoutSyncPayments;
|
|
123
126
|
private persistSyncedCheckoutOrder;
|
|
124
127
|
/**
|
|
125
128
|
* 将普通层 QuotationModule 的报价单计算能力桥接到 Server Products 模块。
|
|
@@ -453,6 +456,18 @@ declare class Server {
|
|
|
453
456
|
*/
|
|
454
457
|
private handleUpdateLocalOrder;
|
|
455
458
|
private handleOrderSalesCheckout;
|
|
459
|
+
private handleOrderSalesDraft;
|
|
460
|
+
private createLocalPaymentOperationId;
|
|
461
|
+
private buildLocalPaymentOrderLogContext;
|
|
462
|
+
private isValidLocalPaymentDecimal;
|
|
463
|
+
private getInvalidLocalPaymentSurchargeFields;
|
|
464
|
+
private buildLocalPaymentSurchargeUpdate;
|
|
465
|
+
private handleGetLocalPayment;
|
|
466
|
+
private handleUpdateLocalPayment;
|
|
467
|
+
private runLocalPaymentUpdateInQueue;
|
|
468
|
+
private processLocalPaymentUpdate;
|
|
469
|
+
private processSuccessfulLocalPayment;
|
|
470
|
+
private sanitizeLocalRecoveryOrder;
|
|
456
471
|
private handleOrderCheckout;
|
|
457
472
|
private getDeviceTaskPlugin;
|
|
458
473
|
private getIdGeneratorPlugin;
|
|
@@ -480,6 +495,7 @@ declare class Server {
|
|
|
480
495
|
private syncMachinecodeRedeemStatusToLocalOrder;
|
|
481
496
|
private handleOrderCheckoutSubmit;
|
|
482
497
|
private handleSyncCheckoutSubmit;
|
|
498
|
+
private handleOrderDraftSubmit;
|
|
483
499
|
private handlePendingSyncCheckoutOrder;
|
|
484
500
|
private buildPendingSyncCheckoutOrder;
|
|
485
501
|
private shouldBuildSmallTicketData;
|