@pisell/pisellos 2.2.178 → 2.2.180
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/Customer/index.d.ts +0 -6
- package/dist/modules/Customer/index.js +83 -129
- package/dist/modules/Customer/types.d.ts +0 -2
- package/dist/modules/Discount/index.d.ts +4 -2
- package/dist/modules/Discount/index.js +93 -8
- package/dist/modules/Discount/types.d.ts +7 -1
- package/dist/modules/Order/index.d.ts +17 -87
- package/dist/modules/Order/index.js +501 -1357
- package/dist/modules/Order/types.d.ts +19 -198
- package/dist/modules/Order/types.js +0 -31
- package/dist/modules/Order/utils.d.ts +1 -50
- package/dist/modules/Order/utils.js +32 -261
- package/dist/modules/Quotation/index.d.ts +1 -0
- package/dist/modules/Quotation/index.js +21 -23
- package/dist/modules/Rules/index.d.ts +0 -4
- package/dist/modules/Rules/index.js +10 -26
- package/dist/modules/SalesSummary/index.js +2 -4
- package/dist/modules/SalesSummary/utils.js +7 -21
- package/dist/modules/Schedule/index.js +2 -6
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.js +1 -2
- package/dist/server/index.js +29 -87
- package/dist/server/modules/order/index.d.ts +0 -23
- package/dist/server/modules/order/index.js +46 -123
- package/dist/server/modules/order/types.d.ts +2 -0
- package/dist/server/modules/order/utils/filterOrders.js +6 -20
- package/dist/server/modules/products/index.d.ts +1 -1
- package/dist/server/modules/products/index.js +113 -130
- package/dist/server/modules/schedule/index.js +6 -13
- package/dist/solution/BaseSales/index.d.ts +7 -89
- package/dist/solution/BaseSales/index.js +375 -1494
- package/dist/solution/BaseSales/types.d.ts +1 -67
- package/dist/solution/BaseSales/types.js +1 -3
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +1 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +16 -68
- package/dist/solution/BaseSales/utils.js +8 -46
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -133
- package/dist/solution/BookingTicket/index.js +175 -780
- package/dist/solution/BookingTicket/types.d.ts +0 -2
- package/dist/solution/BookingTicket/types.js +0 -3
- package/dist/solution/BookingTicket/utils/cartView.js +2 -4
- package/dist/solution/ScanOrder/index.d.ts +3 -9
- package/dist/solution/ScanOrder/index.js +128 -231
- package/dist/solution/ScanOrder/utils.js +8 -46
- package/dist/solution/ShopDiscount/index.d.ts +1 -0
- package/dist/solution/ShopDiscount/index.js +23 -18
- package/dist/solution/VenueBooking/index.d.ts +9 -5
- package/dist/solution/VenueBooking/index.js +55 -103
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +0 -10
- package/lib/model/strategy/adapter/promotion/index.js +0 -49
- package/lib/modules/Customer/index.d.ts +0 -6
- package/lib/modules/Customer/index.js +11 -26
- package/lib/modules/Customer/types.d.ts +0 -2
- package/lib/modules/Discount/index.d.ts +4 -2
- package/lib/modules/Discount/index.js +63 -8
- package/lib/modules/Discount/types.d.ts +7 -1
- package/lib/modules/Order/index.d.ts +17 -87
- package/lib/modules/Order/index.js +150 -677
- package/lib/modules/Order/types.d.ts +19 -198
- package/lib/modules/Order/types.js +0 -1
- package/lib/modules/Order/utils.d.ts +1 -50
- package/lib/modules/Order/utils.js +22 -229
- package/lib/modules/Quotation/index.d.ts +1 -0
- package/lib/modules/Quotation/index.js +15 -18
- package/lib/modules/Rules/index.d.ts +0 -4
- package/lib/modules/Rules/index.js +14 -22
- package/lib/modules/SalesSummary/index.js +2 -4
- package/lib/modules/SalesSummary/utils.js +7 -21
- package/lib/modules/Schedule/index.js +1 -3
- package/lib/modules/index.d.ts +0 -1
- package/lib/modules/index.js +1 -3
- package/lib/server/index.js +4 -41
- package/lib/server/modules/order/index.d.ts +0 -23
- package/lib/server/modules/order/index.js +14 -46
- package/lib/server/modules/order/types.d.ts +2 -0
- package/lib/server/modules/order/utils/filterOrders.js +4 -12
- package/lib/server/modules/products/index.d.ts +1 -1
- package/lib/server/modules/products/index.js +20 -30
- package/lib/server/modules/schedule/index.js +1 -2
- package/lib/solution/BaseSales/index.d.ts +7 -89
- package/lib/solution/BaseSales/index.js +22 -736
- package/lib/solution/BaseSales/types.d.ts +1 -67
- package/lib/solution/BaseSales/types.js +1 -3
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -0
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +1 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +12 -71
- package/lib/solution/BaseSales/utils.js +6 -46
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -133
- package/lib/solution/BookingTicket/index.js +8 -352
- package/lib/solution/BookingTicket/types.d.ts +0 -2
- package/lib/solution/BookingTicket/types.js +0 -6
- package/lib/solution/BookingTicket/utils/cartView.js +2 -4
- package/lib/solution/ScanOrder/index.d.ts +3 -9
- package/lib/solution/ScanOrder/index.js +66 -147
- package/lib/solution/ScanOrder/utils.js +6 -46
- package/lib/solution/ShopDiscount/index.d.ts +1 -0
- package/lib/solution/ShopDiscount/index.js +4 -2
- package/lib/solution/VenueBooking/index.d.ts +9 -5
- package/lib/solution/VenueBooking/index.js +14 -50
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +0 -10
- package/package.json +2 -2
- package/dist/modules/BookingContext/index.d.ts +0 -37
- package/dist/modules/BookingContext/index.js +0 -436
- package/dist/modules/BookingContext/types.d.ts +0 -102
- package/dist/modules/BookingContext/types.js +0 -51
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -193
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -137
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -75
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -215
- package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/dist/modules/BookingContext/utils/flexible.js +0 -56
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/dist/modules/BookingContext/utils/formatResourceList.js +0 -38
- package/dist/modules/BookingContext/utils/index.d.ts +0 -11
- package/dist/modules/BookingContext/utils/index.js +0 -11
- package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/dist/modules/BookingContext/utils/noResource.js +0 -77
- package/dist/modules/BookingContext/utils/productExtend.d.ts +0 -72
- package/dist/modules/BookingContext/utils/productExtend.js +0 -339
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/dist/modules/BookingContext/utils/resourceErrors.js +0 -74
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/dist/modules/BookingContext/utils/resourceSelection.js +0 -24
- package/dist/modules/BookingContext/utils/resources.d.ts +0 -80
- package/dist/modules/BookingContext/utils/resources.js +0 -486
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/dist/modules/BookingContext/utils/serviceTimes.js +0 -151
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/dist/modules/BookingContext/utils/timeSlices.js +0 -100
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/dist/modules/Order/utils/manualProductDiscount.js +0 -212
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +0 -275
- package/dist/solution/BaseSales/utils/cartPromotion.js +0 -1258
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
- package/dist/solution/BaseSales/utils/quotationPrice.js +0 -237
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -113
- package/dist/solution/BookingTicket/utils/addProductDecision.js +0 -346
- package/lib/modules/BookingContext/index.d.ts +0 -37
- package/lib/modules/BookingContext/index.js +0 -297
- package/lib/modules/BookingContext/types.d.ts +0 -102
- package/lib/modules/BookingContext/types.js +0 -34
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -207
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -141
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -75
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -198
- package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/lib/modules/BookingContext/utils/flexible.js +0 -80
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/lib/modules/BookingContext/utils/formatResourceList.js +0 -50
- package/lib/modules/BookingContext/utils/index.d.ts +0 -11
- package/lib/modules/BookingContext/utils/index.js +0 -43
- package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/lib/modules/BookingContext/utils/noResource.js +0 -90
- package/lib/modules/BookingContext/utils/productExtend.d.ts +0 -72
- package/lib/modules/BookingContext/utils/productExtend.js +0 -283
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/lib/modules/BookingContext/utils/resourceErrors.js +0 -80
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/lib/modules/BookingContext/utils/resourceSelection.js +0 -46
- package/lib/modules/BookingContext/utils/resources.d.ts +0 -80
- package/lib/modules/BookingContext/utils/resources.js +0 -377
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/lib/modules/BookingContext/utils/serviceTimes.js +0 -162
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/lib/modules/BookingContext/utils/timeSlices.js +0 -124
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/lib/modules/Order/utils/manualProductDiscount.js +0 -207
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +0 -275
- package/lib/solution/BaseSales/utils/cartPromotion.js +0 -836
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
- package/lib/solution/BaseSales/utils/quotationPrice.js +0 -277
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -113
- package/lib/solution/BookingTicket/utils/addProductDecision.js +0 -318
|
@@ -35,16 +35,12 @@ __export(BookingTicket_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(BookingTicket_exports);
|
|
37
37
|
var import_types = require("./types");
|
|
38
|
-
var import_BookingContext = require("../../modules/BookingContext");
|
|
39
38
|
var import_BaseSales = require("../BaseSales");
|
|
40
39
|
var import_scan = __toESM(require("./utils/scan"));
|
|
41
40
|
var import_orderCustomer = require("./utils/orderCustomer");
|
|
42
41
|
var import_handleScan = require("./utils/scan/handleScan");
|
|
43
42
|
var import_scanCache = __toESM(require("./utils/scan/scanCache"));
|
|
44
43
|
var import_cartView = require("./utils/cartView");
|
|
45
|
-
var import_addProductDecision = require("./utils/addProductDecision");
|
|
46
|
-
var import_buildCacheItemFromOrderLine = require("../../modules/BookingContext/utils/buildCacheItemFromOrderLine");
|
|
47
|
-
var import_buildNormalProductCacheItemFromOrderLine = require("../../modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine");
|
|
48
44
|
var import_bookingStatus = require("./utils/bookingStatus");
|
|
49
45
|
__reExport(BookingTicket_exports, require("./types"), module.exports);
|
|
50
46
|
var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
@@ -58,18 +54,12 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
58
54
|
*/
|
|
59
55
|
this.store = {};
|
|
60
56
|
this.productCatalog = [];
|
|
61
|
-
this.orderCustomerDiscountRefreshInFlight = null;
|
|
62
|
-
this.orderCustomerDiscountRefreshCustomerId = null;
|
|
63
57
|
}
|
|
64
58
|
/**
|
|
65
|
-
* 在 BaseSales 默认模块清单(products/order/salesSummary/schedule)基础上追加 customer
|
|
66
|
-
* bookingContext 是 SalesSdk 加车下沉所需的「预约 UI 上下文」(bookingConfig / resourcesOrigin / date)。
|
|
59
|
+
* 在 BaseSales 默认模块清单(products/order/salesSummary/schedule)基础上追加 customer。
|
|
67
60
|
*/
|
|
68
61
|
getRegisteredModuleNames() {
|
|
69
|
-
return [...super.getRegisteredModuleNames(), "customer"
|
|
70
|
-
}
|
|
71
|
-
getSubmitOrderSalesChannel() {
|
|
72
|
-
return "pos";
|
|
62
|
+
return [...super.getRegisteredModuleNames(), "customer"];
|
|
73
63
|
}
|
|
74
64
|
/**
|
|
75
65
|
* 业务侧子模块工厂:BookingTicket 自带的 createBookingTicketModule 优先匹配;
|
|
@@ -106,110 +96,22 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
106
96
|
console.log(sales, "1234sales");
|
|
107
97
|
const customerModule = this.store.customer;
|
|
108
98
|
const detailCustomer = sales == null ? void 0 : sales.customer;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const protocolCustomer = protocolCustomerId !== void 0 && protocolCustomerId !== null ? {
|
|
112
|
-
id: protocolCustomerId,
|
|
113
|
-
name: String((sales == null ? void 0 : sales.customer_name) || ""),
|
|
114
|
-
phone: sales == null ? void 0 : sales.phone,
|
|
115
|
-
email: sales == null ? void 0 : sales.email,
|
|
116
|
-
country_calling_code: sales == null ? void 0 : sales.country_calling_code
|
|
117
|
-
} : null;
|
|
118
|
-
const selectedCustomer = detailCustomer ?? orderCustomerSnapshot ?? protocolCustomer;
|
|
119
|
-
if (customerModule && selectedCustomer) {
|
|
120
|
-
const { id: detailCustomerId, ...detailCustomerRest } = selectedCustomer ?? {};
|
|
99
|
+
if (customerModule && detailCustomer) {
|
|
100
|
+
const { id: detailCustomerId, ...detailCustomerRest } = detailCustomer ?? {};
|
|
121
101
|
const rawId = detailCustomerId ?? "";
|
|
122
102
|
const customer = {
|
|
123
103
|
...detailCustomerRest,
|
|
124
104
|
id: rawId == null ? "" : rawId,
|
|
125
|
-
name: (
|
|
126
|
-
phone:
|
|
127
|
-
email:
|
|
128
|
-
country_calling_code:
|
|
105
|
+
name: (detailCustomer == null ? void 0 : detailCustomer.name) ?? "",
|
|
106
|
+
phone: detailCustomer == null ? void 0 : detailCustomer.phone,
|
|
107
|
+
email: detailCustomer == null ? void 0 : detailCustomer.email,
|
|
108
|
+
country_calling_code: detailCustomer == null ? void 0 : detailCustomer.country_calling_code
|
|
129
109
|
};
|
|
130
110
|
customerModule.setSelectedCustomer(customer);
|
|
131
111
|
this.setOrderCustomer(customer);
|
|
132
|
-
await this.store.order.saveDraft();
|
|
133
112
|
}
|
|
134
113
|
return sales;
|
|
135
114
|
}
|
|
136
|
-
async scanPromotionCode(code, customerId) {
|
|
137
|
-
if (!this.store.order)
|
|
138
|
-
throw new Error("order 模块未初始化");
|
|
139
|
-
const raw = await this.store.order.scanCode(code, customerId);
|
|
140
|
-
if (raw.isAvailable) {
|
|
141
|
-
await this.hydrateOrderCustomerFromScanDiscounts(raw.scannedDiscountList);
|
|
142
|
-
await this.store.order.recalculateSummary({ createIfMissing: true });
|
|
143
|
-
this.store.order.persistTempOrder();
|
|
144
|
-
}
|
|
145
|
-
return {
|
|
146
|
-
isAvailable: raw.isAvailable,
|
|
147
|
-
type: raw.type,
|
|
148
|
-
unavailableReason: raw.unavailableReason
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
async hydrateOrderCustomerFromScanDiscounts(discounts) {
|
|
152
|
-
const currentOrderCustomer = this.store.order.getOrderCustomer();
|
|
153
|
-
if (currentOrderCustomer)
|
|
154
|
-
return;
|
|
155
|
-
const customerId = this.getDiscountCustomerId(discounts);
|
|
156
|
-
if (!customerId)
|
|
157
|
-
return;
|
|
158
|
-
const customer = await this.resolveCustomerByDiscountCustomerId(customerId);
|
|
159
|
-
if (!customer)
|
|
160
|
-
return;
|
|
161
|
-
this.store.customer.setSelectedCustomer(customer);
|
|
162
|
-
this.setOrderCustomer(customer);
|
|
163
|
-
}
|
|
164
|
-
getDiscountCustomerId(discounts) {
|
|
165
|
-
const discount = discounts.find((item) => item.customer_id != null);
|
|
166
|
-
const customerId = Number(discount == null ? void 0 : discount.customer_id);
|
|
167
|
-
if (!Number.isFinite(customerId) || customerId <= 0)
|
|
168
|
-
return null;
|
|
169
|
-
return customerId;
|
|
170
|
-
}
|
|
171
|
-
async resolveCustomerByDiscountCustomerId(customerId) {
|
|
172
|
-
var _a;
|
|
173
|
-
const localCustomers = this.store.customer.getCustomers();
|
|
174
|
-
const localCustomer = this.findCustomerById(localCustomers, customerId);
|
|
175
|
-
const normalizedLocalCustomer = localCustomer ? this.normalizeCustomer(localCustomer) : null;
|
|
176
|
-
if (normalizedLocalCustomer && this.hasUsableCustomerDetails(normalizedLocalCustomer)) {
|
|
177
|
-
return normalizedLocalCustomer;
|
|
178
|
-
}
|
|
179
|
-
const result = await this.store.customer.queryCustomerList({
|
|
180
|
-
ids: [customerId],
|
|
181
|
-
skip: 1,
|
|
182
|
-
num: 1
|
|
183
|
-
});
|
|
184
|
-
const remoteCustomer = this.findCustomerById((result == null ? void 0 : result.list) || [], customerId) || ((_a = result == null ? void 0 : result.list) == null ? void 0 : _a[0]) || null;
|
|
185
|
-
return remoteCustomer ? this.normalizeCustomer(remoteCustomer) : null;
|
|
186
|
-
}
|
|
187
|
-
findCustomerById(customers = [], customerId) {
|
|
188
|
-
return customers.find((customer) => {
|
|
189
|
-
const rawId = this.getRawCustomerId(customer);
|
|
190
|
-
return rawId !== null && String(rawId) === String(customerId);
|
|
191
|
-
}) || null;
|
|
192
|
-
}
|
|
193
|
-
normalizeCustomer(customer) {
|
|
194
|
-
const raw = customer;
|
|
195
|
-
const rawId = this.getRawCustomerId(customer);
|
|
196
|
-
const name = customer.name || raw.display_name || raw.nickname || raw.customer_name || [raw.first_name, raw.last_name].filter(Boolean).join(" ") || "";
|
|
197
|
-
return {
|
|
198
|
-
...customer,
|
|
199
|
-
id: rawId ?? customer.id,
|
|
200
|
-
name,
|
|
201
|
-
phone: customer.phone ?? raw.phone ?? raw.mobile ?? "",
|
|
202
|
-
email: customer.email ?? raw.email ?? "",
|
|
203
|
-
country_calling_code: customer.country_calling_code ?? raw.country_calling_code ?? ""
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
getRawCustomerId(customer) {
|
|
207
|
-
const raw = customer;
|
|
208
|
-
return customer.id ?? raw.customer_id ?? raw.customerId ?? null;
|
|
209
|
-
}
|
|
210
|
-
hasUsableCustomerDetails(customer) {
|
|
211
|
-
return !!(customer.name || customer.phone || customer.email || customer.display_name || customer.customer_name);
|
|
212
|
-
}
|
|
213
115
|
/**
|
|
214
116
|
* 更新当前预约的 appointment_status。
|
|
215
117
|
*
|
|
@@ -290,10 +192,6 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
290
192
|
*/
|
|
291
193
|
async loadProducts(params = {}, options) {
|
|
292
194
|
const { schedule_date, customer_id, menu_list_ids, schedule_datetime } = params;
|
|
293
|
-
const bookingDate = schedule_datetime || schedule_date || "";
|
|
294
|
-
if (bookingDate) {
|
|
295
|
-
this.setBookingDate(bookingDate);
|
|
296
|
-
}
|
|
297
195
|
try {
|
|
298
196
|
const result = await this.store.products.loadProducts({
|
|
299
197
|
with_count: ["bundleGroup", "optionGroup"],
|
|
@@ -482,24 +380,14 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
482
380
|
* 在 BookingTicket 命名空间也 emit 一次,方便上层统一从 Solution 订阅。
|
|
483
381
|
*/
|
|
484
382
|
setOrderCustomer(customer) {
|
|
485
|
-
var _a;
|
|
486
383
|
if (!customer) {
|
|
487
384
|
this.clearOrderCustomer();
|
|
488
385
|
return;
|
|
489
386
|
}
|
|
490
|
-
const previousCustomerId = (_a = this.store.order.getOrderCustomer()) == null ? void 0 : _a.customer_id;
|
|
491
387
|
const patch = (0, import_orderCustomer.formatOrderCustomerPatch)(customer);
|
|
492
|
-
if (Number(previousCustomerId || 0) !== Number(patch.customer_id || 0)) {
|
|
493
|
-
this.discountConfigCacheKey = null;
|
|
494
|
-
this.hasManualDiscountSelection = false;
|
|
495
|
-
}
|
|
496
388
|
this.store.order.setOrderCustomer(patch, customer);
|
|
497
389
|
const next = this.buildOrderCustomerPayload();
|
|
498
390
|
this.core.effects.emit(`${this.name}:onOrderCustomerChange`, next);
|
|
499
|
-
this.refreshDiscountConfigAfterOrderCustomerChange(patch.customer_id);
|
|
500
|
-
void this.store.order.applyPromotion().catch((error) => {
|
|
501
|
-
console.error("[BookingTicket] applyPromotion after customer change failed", error);
|
|
502
|
-
});
|
|
503
391
|
}
|
|
504
392
|
/**
|
|
505
393
|
* 读取 tempOrder 上的下单客户协议字段;customer_id 缺失时返回 null。
|
|
@@ -517,36 +405,9 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
517
405
|
* 清空下单客户(协议字段 + snapshot)。
|
|
518
406
|
*/
|
|
519
407
|
clearOrderCustomer() {
|
|
520
|
-
var _a, _b;
|
|
521
408
|
this.store.order.clearOrderCustomer();
|
|
522
|
-
this.discountConfigCacheKey = null;
|
|
523
|
-
this.hasManualDiscountSelection = false;
|
|
524
|
-
const orderStore = this.store.order.store || {};
|
|
525
|
-
const discountModule = orderStore.discount;
|
|
526
|
-
void ((_a = discountModule == null ? void 0 : discountModule.setOriginalDiscountList) == null ? void 0 : _a.call(discountModule, []));
|
|
527
|
-
void ((_b = discountModule == null ? void 0 : discountModule.setDiscountList) == null ? void 0 : _b.call(discountModule, []));
|
|
528
|
-
this.store.order.applyDiscount();
|
|
529
|
-
void this.store.order.recalculateSummary({ createIfMissing: true }).then(() => this.store.order.persistTempOrder()).catch((error) => {
|
|
530
|
-
console.error("Failed to recalculate summary after clearing customer:", error);
|
|
531
|
-
});
|
|
532
409
|
this.core.effects.emit(`${this.name}:onOrderCustomerChange`, null);
|
|
533
410
|
}
|
|
534
|
-
/**
|
|
535
|
-
* 重置 tempOrder,并同步清空下单客户运行态。
|
|
536
|
-
*
|
|
537
|
-
* OrderModule.restoreOrder 会重建空单(customer_id 已为 null),但不会:
|
|
538
|
-
* - emit BookingTicket `onOrderCustomerChange`
|
|
539
|
-
* - 重置 CustomerModule.selectedCustomer(老路 getActiveCustomer)
|
|
540
|
-
*
|
|
541
|
-
* 因此在 super.restoreOrder 之后显式清客户,保证 SalesSdk / ticketBooking 订阅方与 tempOrder 一致。
|
|
542
|
-
*/
|
|
543
|
-
async restoreOrder() {
|
|
544
|
-
var _a;
|
|
545
|
-
const tempOrder = await super.restoreOrder();
|
|
546
|
-
this.clearOrderCustomer();
|
|
547
|
-
(_a = this.store.customer) == null ? void 0 : _a.setSelectedCustomer(null);
|
|
548
|
-
return tempOrder;
|
|
549
|
-
}
|
|
550
411
|
/** 内部:基于 OrderModule 当前状态构造一份 OrderCustomerChangePayload。 */
|
|
551
412
|
buildOrderCustomerPayload() {
|
|
552
413
|
const patch = this.store.order.getOrderCustomer();
|
|
@@ -557,34 +418,6 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
557
418
|
snapshot: this.store.order.getOrderCustomerSnapshot()
|
|
558
419
|
};
|
|
559
420
|
}
|
|
560
|
-
refreshDiscountConfigAfterOrderCustomerChange(customerId) {
|
|
561
|
-
if (!customerId || customerId === 1)
|
|
562
|
-
return;
|
|
563
|
-
if (this.orderCustomerDiscountRefreshInFlight && this.orderCustomerDiscountRefreshCustomerId === customerId) {
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
const previousRefresh = this.orderCustomerDiscountRefreshInFlight;
|
|
567
|
-
const refreshTask = (async () => {
|
|
568
|
-
if (previousRefresh) {
|
|
569
|
-
await previousRefresh.catch(() => void 0);
|
|
570
|
-
}
|
|
571
|
-
const currentCustomer = this.store.order.getOrderCustomer();
|
|
572
|
-
if (!currentCustomer || Number(currentCustomer.customer_id) !== customerId) {
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
await this.loadDiscountConfig({ customerId });
|
|
576
|
-
})();
|
|
577
|
-
this.orderCustomerDiscountRefreshInFlight = refreshTask;
|
|
578
|
-
this.orderCustomerDiscountRefreshCustomerId = customerId;
|
|
579
|
-
refreshTask.catch((error) => {
|
|
580
|
-
console.error("Failed to load discount config after customer change:", error);
|
|
581
|
-
}).finally(() => {
|
|
582
|
-
if (this.orderCustomerDiscountRefreshInFlight !== refreshTask)
|
|
583
|
-
return;
|
|
584
|
-
this.orderCustomerDiscountRefreshInFlight = null;
|
|
585
|
-
this.orderCustomerDiscountRefreshCustomerId = null;
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
421
|
/**
|
|
589
422
|
* 获取客户分页信息
|
|
590
423
|
* @returns 分页信息
|
|
@@ -780,183 +613,6 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
780
613
|
async getOtherParams() {
|
|
781
614
|
return this.otherParams;
|
|
782
615
|
}
|
|
783
|
-
// ─── BookingContext API(透传给 BookingContextModule) ──────────────────────
|
|
784
|
-
// SalesSdkProvider 挂载时默认调 initBookingContext;也可由 UI 显式 set* 灌入已有数据。
|
|
785
|
-
/** 拉取 board config 并写入 BookingContext。 */
|
|
786
|
-
loadBookingConfig(params) {
|
|
787
|
-
return this.store.bookingContext.loadBookingConfig(params);
|
|
788
|
-
}
|
|
789
|
-
/** 拉取资源全集并写入 BookingContext。 */
|
|
790
|
-
loadBookingResources(params) {
|
|
791
|
-
return this.store.bookingContext.loadResources(params);
|
|
792
|
-
}
|
|
793
|
-
/** 初始化 BookingContext(date + config + resources)。 */
|
|
794
|
-
initBookingContext(params) {
|
|
795
|
-
return this.store.bookingContext.initBookingContext(params);
|
|
796
|
-
}
|
|
797
|
-
/** 当前 store 是否已具备与入参等价的 config / resources(无需再请求接口)。 */
|
|
798
|
-
isBookingContextReady(params) {
|
|
799
|
-
return this.store.bookingContext.isBookingContextReady(params);
|
|
800
|
-
}
|
|
801
|
-
/** 写入 booking config(来源:`/core/board/management/config`)。 */
|
|
802
|
-
setBookingConfig(config) {
|
|
803
|
-
this.store.bookingContext.setBookingConfig(config);
|
|
804
|
-
}
|
|
805
|
-
/** 读取当前 booking config。 */
|
|
806
|
-
getBookingConfig() {
|
|
807
|
-
return this.store.bookingContext.getBookingConfig();
|
|
808
|
-
}
|
|
809
|
-
/** 写入资源全集(来源:`/form/schedule`),同步派生 resourcesOriginMap。 */
|
|
810
|
-
setResources(resources) {
|
|
811
|
-
this.store.bookingContext.setResources(resources);
|
|
812
|
-
}
|
|
813
|
-
/** 读取资源全集(浅克隆)。 */
|
|
814
|
-
getResourcesOrigin() {
|
|
815
|
-
return this.store.bookingContext.getResourcesOrigin();
|
|
816
|
-
}
|
|
817
|
-
/** 读取资源全集 map(id → resource)。 */
|
|
818
|
-
getResourcesOriginMap() {
|
|
819
|
-
return this.store.bookingContext.getResourcesOriginMap();
|
|
820
|
-
}
|
|
821
|
-
/** 写入当前选择的日期;支持 dayjs / Date / string。 */
|
|
822
|
-
setBookingDate(date) {
|
|
823
|
-
this.store.bookingContext.setDate(date);
|
|
824
|
-
}
|
|
825
|
-
/** 读取当前选择的日期(统一 string)。 */
|
|
826
|
-
getBookingDate() {
|
|
827
|
-
return this.store.bookingContext.getDate();
|
|
828
|
-
}
|
|
829
|
-
/** 读取 BookingContext 完整 store(调试 / 测试 / 透传给 SDK 使用)。 */
|
|
830
|
-
getBookingContextState() {
|
|
831
|
-
return this.store.bookingContext.getState();
|
|
832
|
-
}
|
|
833
|
-
/** 清空 BookingContext(切租户 / destroy 场景)。 */
|
|
834
|
-
clearBookingContext() {
|
|
835
|
-
this.store.bookingContext.clear();
|
|
836
|
-
}
|
|
837
|
-
/**
|
|
838
|
-
* 构造 BookingContext 计算上下文(供 getProductExtend / getResourceByIds 等读 API 复用)。
|
|
839
|
-
*/
|
|
840
|
-
buildBookingCalcContext(extra) {
|
|
841
|
-
const state = this.store.bookingContext.getState();
|
|
842
|
-
const date = (extra == null ? void 0 : extra.date) ?? state.date;
|
|
843
|
-
return {
|
|
844
|
-
bookingConfig: state.bookingConfig,
|
|
845
|
-
resourcesOrigin: state.resourcesOrigin,
|
|
846
|
-
resourcesOriginMap: state.resourcesOriginMap,
|
|
847
|
-
date,
|
|
848
|
-
presetStartTime: (extra == null ? void 0 : extra.presetStartTime) ?? (0, import_BookingContext.derivePresetStartTimeFromDate)(date),
|
|
849
|
-
...extra || {}
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* 取商品当前可选资源列表(透传 OS BookingContext utils#getResourceByIds)。
|
|
854
|
-
* `extraResources` 用于把拖入未绑定的资源也展示出来。
|
|
855
|
-
*/
|
|
856
|
-
getResourcesForProduct(product, options) {
|
|
857
|
-
var _a, _b;
|
|
858
|
-
const ctx = this.buildBookingCalcContext();
|
|
859
|
-
return (0, import_BookingContext.getResourceByIds)(ctx.resourcesOriginMap || {}, product, {
|
|
860
|
-
resourceTab: (_b = (_a = ctx.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.resource_tab,
|
|
861
|
-
resourcesOrigin: ctx.resourcesOrigin,
|
|
862
|
-
extraResources: (options == null ? void 0 : options.extraResources) || []
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* 拼装 cacheItem 的 _extend / _data(资源 / 容量 / timeObj),与 info2 `getProductExtend` 等价。
|
|
867
|
-
*/
|
|
868
|
-
getProductExtend(cacheItem, extra) {
|
|
869
|
-
return (0, import_BookingContext.getProductExtend)({
|
|
870
|
-
cacheItem,
|
|
871
|
-
ctx: this.buildBookingCalcContext(extra)
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
/**
|
|
875
|
-
* 取资源不可用原因列表(结构化 enum + params,i18n 文案由 UI 渲染)。
|
|
876
|
-
*/
|
|
877
|
-
getResourceErrors(resource, cacheItem) {
|
|
878
|
-
return (0, import_BookingContext.getResourceErrors)(resource, cacheItem);
|
|
879
|
-
}
|
|
880
|
-
// ─── addProduct 决策 / 转换 API(SDK 加车下沉所需) ─────────────────────────
|
|
881
|
-
// 这一组方法是 SalesSdkCartContext.addProduct / confirmDetail 的 OS 后端。
|
|
882
|
-
// 调用方传入 ProductData,OS 自取 bookingContext / customer / date 等上下文,
|
|
883
|
-
// 输出 (a) autoClose 决策结果或 (b) `{ product, booking }` 协议入参。
|
|
884
|
-
/**
|
|
885
|
-
* 拼装 addProductDecision 通用上下文(从 store 自取)。
|
|
886
|
-
*/
|
|
887
|
-
buildAddProductCtx(extra) {
|
|
888
|
-
var _a, _b;
|
|
889
|
-
const bookingContextState = this.store.bookingContext.getState();
|
|
890
|
-
const date = (extra == null ? void 0 : extra.date) ?? bookingContextState.date;
|
|
891
|
-
const orderCustomerId = ((_a = this.getOrderCustomerSnapshot()) == null ? void 0 : _a.id) ?? ((_b = this.store.order.getTempOrder()) == null ? void 0 : _b.customer_id) ?? void 0;
|
|
892
|
-
return {
|
|
893
|
-
bookingConfig: bookingContextState.bookingConfig,
|
|
894
|
-
resourcesOrigin: bookingContextState.resourcesOrigin,
|
|
895
|
-
resourcesOriginMap: bookingContextState.resourcesOriginMap,
|
|
896
|
-
date,
|
|
897
|
-
presetStartTime: (extra == null ? void 0 : extra.presetStartTime) ?? (0, import_BookingContext.derivePresetStartTimeFromDate)(date),
|
|
898
|
-
customerId: orderCustomerId,
|
|
899
|
-
...extra || {}
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
904
|
-
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
905
|
-
*/
|
|
906
|
-
decideAddProduct(item, options) {
|
|
907
|
-
return (0, import_addProductDecision.decideAddProduct)(item, this.buildAddProductCtx(options));
|
|
908
|
-
}
|
|
909
|
-
/** 规格弹窗 callback 后的第二段决策。 */
|
|
910
|
-
decideAfterDetail(cacheItem, options) {
|
|
911
|
-
return (0, import_addProductDecision.decideAfterDetail)(cacheItem, this.buildAddProductCtx(options));
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* @deprecated 请用 `decideAddProduct`;`autoClose=true` 仅当 action=add。
|
|
915
|
-
*/
|
|
916
|
-
decideAutoClose(item, options) {
|
|
917
|
-
return (0, import_addProductDecision.decideAutoClose)(item, this.buildAddProductCtx(options));
|
|
918
|
-
}
|
|
919
|
-
/** 替代 info2 `getIsEject`:商品是否需要弹窗(0/1)。 */
|
|
920
|
-
getIsEject(item, type = "select") {
|
|
921
|
-
return (0, import_addProductDecision.getIsEject)(item, type);
|
|
922
|
-
}
|
|
923
|
-
/** 仅 session 商品(无 variant/option/package)→ true。 */
|
|
924
|
-
getIsOnlySession(item) {
|
|
925
|
-
return (0, import_addProductDecision.getIsOnlySession)(item);
|
|
926
|
-
}
|
|
927
|
-
/**
|
|
928
|
-
* 拼装 requiresDetail payload(给 SDK 直接 return 给 UI 用)。
|
|
929
|
-
*/
|
|
930
|
-
buildRequiresDetailPayload(item, options) {
|
|
931
|
-
return (0, import_addProductDecision.buildRequiresDetailPayload)(item, this.buildAddProductCtx(options));
|
|
932
|
-
}
|
|
933
|
-
/**
|
|
934
|
-
* 把 detail 弹窗回调结果(e, extension_type, detail)转换为 `(product, booking)` 入参。
|
|
935
|
-
* 内部会先拼 cacheItem,再走 cacheItemToBookingInput 严格协议对齐。
|
|
936
|
-
*/
|
|
937
|
-
transformDetailToProductAndBooking(input) {
|
|
938
|
-
const { item, cacheItem: preparedCacheItem, detailResult, options } = input;
|
|
939
|
-
const ctx = this.buildAddProductCtx(options);
|
|
940
|
-
const cacheItem = preparedCacheItem || (detailResult ? (0, import_addProductDecision.buildCacheItemFromDetail)(item, detailResult, ctx) : (0, import_addProductDecision.buildCacheItemFromCartDetail)(item, ctx));
|
|
941
|
-
return (0, import_addProductDecision.transformDetailToProductAndBooking)(cacheItem, ctx);
|
|
942
|
-
}
|
|
943
|
-
/**
|
|
944
|
-
* 从已加车的 order line + booking 反查资源编辑抽屉所需的 cacheItem。
|
|
945
|
-
* 供 SalesSdk「编辑资源」等场景使用;字段语义与 buildCacheItemFromDetail 产出对齐。
|
|
946
|
-
*/
|
|
947
|
-
buildCacheItemFromOrderLine(input) {
|
|
948
|
-
return (0, import_buildCacheItemFromOrderLine.buildCacheItemFromOrderLine)(input);
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* 从已加车的普通商品 order line 反查 SkuDetailModal edit 所需的 cacheItem。
|
|
952
|
-
*/
|
|
953
|
-
buildNormalProductCacheItemFromOrderLine(input) {
|
|
954
|
-
return (0, import_buildNormalProductCacheItemFromOrderLine.buildNormalProductCacheItemFromOrderLine)(input);
|
|
955
|
-
}
|
|
956
|
-
/** 文档别名:与 OrderModule.updateOrderProduct 一致。 */
|
|
957
|
-
async updateProductInOrder(params) {
|
|
958
|
-
return this.updateOrderProduct(params);
|
|
959
|
-
}
|
|
960
616
|
/**
|
|
961
617
|
* 销毁模块:先调用父类(销毁所有 store 内子模块 + emit destroy + super.destroy()),
|
|
962
618
|
* 再清理 BookingTicket 自有资源(scan 监听 + scan 内存缓存)。
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ProductList, OrderModule } from '../../modules';
|
|
2
|
-
import { BookingContextModule } from '../../modules/BookingContext';
|
|
3
2
|
import { CustomerModule } from '../../modules/Customer';
|
|
4
3
|
import { SalesSummaryModule } from '../../modules/SalesSummary';
|
|
5
4
|
import { ScheduleModule } from '../../modules/Schedule';
|
|
@@ -17,7 +16,6 @@ export interface BookingTicketState extends BaseSalesState {
|
|
|
17
16
|
salesSummary: SalesSummaryModule;
|
|
18
17
|
schedule: ScheduleModule;
|
|
19
18
|
customer: CustomerModule;
|
|
20
|
-
bookingContext: BookingContextModule;
|
|
21
19
|
}
|
|
22
20
|
export declare function createBookingTicketModule<T extends keyof BookingTicketState>(moduleName: T, solutionName: string, name?: string, version?: string): BookingTicketState[T] | null;
|
|
23
21
|
export declare enum BookingTicketHooks {
|
|
@@ -24,7 +24,6 @@ __export(types_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(types_exports);
|
|
26
26
|
var import_modules = require("../../modules");
|
|
27
|
-
var import_BookingContext = require("../../modules/BookingContext");
|
|
28
27
|
var import_Customer = require("../../modules/Customer");
|
|
29
28
|
var import_SalesSummary = require("../../modules/SalesSummary");
|
|
30
29
|
var import_Schedule = require("../../modules/Schedule");
|
|
@@ -55,11 +54,6 @@ function createBookingTicketModule(moduleName, solutionName, name, version) {
|
|
|
55
54
|
`${solutionName}_${name || moduleName}`,
|
|
56
55
|
version
|
|
57
56
|
);
|
|
58
|
-
case "bookingContext":
|
|
59
|
-
return new import_BookingContext.BookingContextModule(
|
|
60
|
-
`${solutionName}_${name || moduleName}`,
|
|
61
|
-
version
|
|
62
|
-
);
|
|
63
57
|
default:
|
|
64
58
|
return null;
|
|
65
59
|
}
|
|
@@ -75,10 +75,8 @@ function buildCartView(lines, bookings) {
|
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
77
|
const items = productLines.filter((line) => {
|
|
78
|
-
var _a
|
|
79
|
-
|
|
80
|
-
return false;
|
|
81
|
-
const uid = (_b = line.metadata) == null ? void 0 : _b.unique_identification_number;
|
|
78
|
+
var _a;
|
|
79
|
+
const uid = (_a = line.metadata) == null ? void 0 : _a.unique_identification_number;
|
|
82
80
|
if (uid === void 0 || uid === null || uid === "")
|
|
83
81
|
return true;
|
|
84
82
|
return !claimedUids.has(String(uid));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
2
|
import { BaseModule } from '../../modules/BaseModule';
|
|
3
3
|
import { ScanOrderAddLogParams, ScanOrderAvailabilityInfo, ScanOrderOrderProduct, ScanOrderOrderProductIdentity, ScanOrderScanCodeResult } from './types';
|
|
4
|
-
import type {
|
|
4
|
+
import type { UpdateProductInOrderParams } from '../../modules/Order/types';
|
|
5
5
|
import type { Discount } from '../../modules/Discount/types';
|
|
6
6
|
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
|
|
7
7
|
import type { StrategyConfig } from '../../model/strategy/type';
|
|
8
|
-
import type { ProductData } from '../../modules/Product/types';
|
|
9
8
|
export * from './types';
|
|
10
9
|
interface ScanOrderItemRuleRuntimeConfig {
|
|
11
10
|
strategyConfigs?: StrategyConfig[];
|
|
@@ -37,14 +36,11 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
|
|
|
37
36
|
private customerLoginRefreshIdInFlight;
|
|
38
37
|
private static readonly PISELL1_LOGIN_SUCCESS;
|
|
39
38
|
private getScanOrderLoggerContext;
|
|
40
|
-
private safeStringify;
|
|
41
|
-
private pickErrorMessage;
|
|
42
39
|
private serializeError;
|
|
43
40
|
private addScanOrderLog;
|
|
44
41
|
private logMethodStart;
|
|
45
42
|
private logMethodSuccess;
|
|
46
43
|
private logMethodError;
|
|
47
|
-
private assertProductListLoaded;
|
|
48
44
|
addLog(params: ScanOrderAddLogParams): Promise<void>;
|
|
49
45
|
private normalizeCustomerId;
|
|
50
46
|
private resolveCustomerIdFromLoginPayload;
|
|
@@ -90,12 +86,10 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
|
|
|
90
86
|
onCustomerLogin(params: {
|
|
91
87
|
customerId: number;
|
|
92
88
|
}): Promise<void>;
|
|
93
|
-
private findReservationRuleResource;
|
|
94
|
-
private buildScanOrderResourceMetadata;
|
|
95
89
|
private buildSubmitPayloadEnhancer;
|
|
96
90
|
submitScanOrder<T = any>(): Promise<T>;
|
|
97
91
|
addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
98
|
-
|
|
92
|
+
updateProductInOrder(params: UpdateProductInOrderParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
99
93
|
/**
|
|
100
94
|
* 设置单行商品备注(与整单 `updateTempOrderNote` 区分)。
|
|
101
95
|
* 多行同 SKU 时必须传入与删除/更新一致的 identity(如 `identity_key`)。
|
|
@@ -126,7 +120,7 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
|
|
|
126
120
|
orderAmount: number;
|
|
127
121
|
orderItems: any[];
|
|
128
122
|
}>;
|
|
129
|
-
getProductList(): Promise<
|
|
123
|
+
getProductList(): Promise<any>;
|
|
130
124
|
getOtherParams(): Record<string, any>;
|
|
131
125
|
setOtherParams(params: Record<string, any>, { cover }?: {
|
|
132
126
|
cover?: boolean;
|