@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
|
@@ -89,45 +89,13 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
89
89
|
moduleName: "scanOrder"
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
safeStringify(value) {
|
|
93
|
-
try {
|
|
94
|
-
return JSON.stringify(value);
|
|
95
|
-
} catch {
|
|
96
|
-
return void 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
pickErrorMessage(error) {
|
|
100
|
-
var _a, _b, _c, _d;
|
|
101
|
-
const candidates = [
|
|
102
|
-
error.message,
|
|
103
|
-
(_a = error.data) == null ? void 0 : _a.message,
|
|
104
|
-
(_c = (_b = error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message,
|
|
105
|
-
(_d = error.error) == null ? void 0 : _d.message
|
|
106
|
-
];
|
|
107
|
-
for (const candidate of candidates) {
|
|
108
|
-
if (typeof candidate === "string" && candidate.trim())
|
|
109
|
-
return candidate;
|
|
110
|
-
}
|
|
111
|
-
return void 0;
|
|
112
|
-
}
|
|
113
92
|
serializeError(error) {
|
|
114
93
|
if (error instanceof Error) {
|
|
115
|
-
return {
|
|
94
|
+
return JSON.stringify({
|
|
116
95
|
name: error.name,
|
|
117
96
|
message: error.message,
|
|
118
97
|
stack: error.stack
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
if (error && typeof error === "object") {
|
|
122
|
-
const raw = error;
|
|
123
|
-
const message = this.pickErrorMessage(raw) || this.safeStringify(raw) || String(error);
|
|
124
|
-
return {
|
|
125
|
-
...typeof raw.name === "string" ? { name: raw.name } : {},
|
|
126
|
-
message,
|
|
127
|
-
..."code" in raw ? { code: raw.code } : {},
|
|
128
|
-
..."status" in raw ? { status: raw.status } : {},
|
|
129
|
-
...this.safeStringify(raw) ? { raw: this.safeStringify(raw) } : {}
|
|
130
|
-
};
|
|
98
|
+
});
|
|
131
99
|
}
|
|
132
100
|
return {
|
|
133
101
|
message: String(error)
|
|
@@ -187,14 +155,6 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
187
155
|
}
|
|
188
156
|
});
|
|
189
157
|
}
|
|
190
|
-
assertProductListLoaded(method, result, payload = {}) {
|
|
191
|
-
if (Array.isArray(result))
|
|
192
|
-
return result;
|
|
193
|
-
const error = result instanceof Error ? result : new Error("商品列表接口返回异常");
|
|
194
|
-
this.logMethodError(method, error, payload);
|
|
195
|
-
error.__scanOrderLogged = true;
|
|
196
|
-
throw error;
|
|
197
|
-
}
|
|
198
158
|
async addLog(params) {
|
|
199
159
|
await this.addScanOrderLog({
|
|
200
160
|
...params,
|
|
@@ -359,13 +319,13 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
359
319
|
if (targetModule) {
|
|
360
320
|
this.store[step] = targetModule;
|
|
361
321
|
const initialState = step === "salesSummary" ? {
|
|
322
|
+
// TODO(Order types): ScanOrder runtime should read OrderState.summary instead of tempOrder.summary.
|
|
362
323
|
summary: ((_b2 = (_a2 = this.store.order) == null ? void 0 : _a2.getTempOrder()) == null ? void 0 : _b2.summary) || (0, import_utils.createEmptySummary)()
|
|
363
324
|
} : {};
|
|
364
325
|
const loggerProvider = ((_c2 = this.otherParams) == null ? void 0 : _c2.scanOrderLoggerProvider) || "feishu";
|
|
365
326
|
const loggerConfig = ((_d2 = this.otherParams) == null ? void 0 : _d2.scanOrderLoggerConfig) || {
|
|
366
327
|
feishu: {
|
|
367
|
-
webhook: "https://open.feishu.cn/open-apis/bot/v2/hook/216b3fe6-af98-424e-8706-f0471241a7ed"
|
|
368
|
-
errorHook: "https://open.feishu.cn/open-apis/bot/v2/hook/015b7c2a-dd3c-4c30-9898-ef0f5253111f"
|
|
328
|
+
webhook: "https://open.feishu.cn/open-apis/bot/v2/hook/216b3fe6-af98-424e-8706-f0471241a7ed"
|
|
369
329
|
}
|
|
370
330
|
};
|
|
371
331
|
this.core.registerModule(targetModule, {
|
|
@@ -787,34 +747,6 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
787
747
|
throw error;
|
|
788
748
|
}
|
|
789
749
|
}
|
|
790
|
-
findReservationRuleResource(formId) {
|
|
791
|
-
var _a;
|
|
792
|
-
if (formId == null)
|
|
793
|
-
return void 0;
|
|
794
|
-
const numericFormId = Number(formId);
|
|
795
|
-
if (!Number.isFinite(numericFormId) || numericFormId <= 0)
|
|
796
|
-
return void 0;
|
|
797
|
-
for (const product of this.enabledReservationRuleProducts) {
|
|
798
|
-
const resources = (_a = product == null ? void 0 : product.product_resource) == null ? void 0 : _a.resources;
|
|
799
|
-
if (!Array.isArray(resources))
|
|
800
|
-
continue;
|
|
801
|
-
const matched = resources.find((resource) => Number(resource == null ? void 0 : resource.id) === numericFormId);
|
|
802
|
-
if (matched)
|
|
803
|
-
return matched;
|
|
804
|
-
}
|
|
805
|
-
return void 0;
|
|
806
|
-
}
|
|
807
|
-
buildScanOrderResourceMetadata(params) {
|
|
808
|
-
const { resourceState, resourceName } = params;
|
|
809
|
-
const ruleResource = this.findReservationRuleResource(resourceState.tableFormId);
|
|
810
|
-
const combined = ruleResource == null ? void 0 : ruleResource.combined_resource;
|
|
811
|
-
const isCombined = !!(combined && combined.status === 1 && Array.isArray(combined.resource_ids));
|
|
812
|
-
return {
|
|
813
|
-
form_name: (ruleResource == null ? void 0 : ruleResource.title) ?? "",
|
|
814
|
-
resource_name: resourceName,
|
|
815
|
-
combined_resource: isCombined ? combined : null
|
|
816
|
-
};
|
|
817
|
-
}
|
|
818
750
|
// ScanOrder 提交 payload enhancer:
|
|
819
751
|
// - 给所有 booking 注入 appointment_status: 'started'(扫码点餐语义)
|
|
820
752
|
// - 给所有 booking 的 metadata 注入 resource_select_type(来自预约规则商品的 resource.type)
|
|
@@ -838,9 +770,6 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
838
770
|
return (payload, { bookingUuid, tempOrder }) => {
|
|
839
771
|
var _a, _b;
|
|
840
772
|
const resourceId = tempOrder.resource_id ?? (resourceState == null ? void 0 : resourceState.relationId);
|
|
841
|
-
const rawCollectPax = (_a = tempOrder.metadata) == null ? void 0 : _a.collect_pax;
|
|
842
|
-
const hasCollectPaxForCapacity = rawCollectPax !== null && rawCollectPax !== void 0 && rawCollectPax !== "";
|
|
843
|
-
const resourceCapacityValue = hasCollectPaxForCapacity ? (0, import_utils2.normalizeSubmitCollectPaxValue)(rawCollectPax) : resolveResourceCapacity();
|
|
844
773
|
const pickOriginal = (value) => {
|
|
845
774
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
846
775
|
const original = value.original;
|
|
@@ -848,7 +777,7 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
848
777
|
}
|
|
849
778
|
return void 0;
|
|
850
779
|
};
|
|
851
|
-
const mainField = pickOriginal(tempOrder.table_number) ?? pickOriginal((
|
|
780
|
+
const mainField = pickOriginal(tempOrder.table_number) ?? pickOriginal((_a = resourceState == null ? void 0 : resourceState.table_form_record) == null ? void 0 : _a.name) ?? "";
|
|
852
781
|
const resourceEntry = resourceState && resourceId ? {
|
|
853
782
|
relation_type: "form",
|
|
854
783
|
like_status: "common",
|
|
@@ -856,35 +785,37 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
856
785
|
main_field: mainField,
|
|
857
786
|
form_id: resourceState.tableFormId,
|
|
858
787
|
relation_id: resourceState.relationId ?? resourceId,
|
|
859
|
-
capacity:
|
|
860
|
-
metadata:
|
|
861
|
-
resourceState,
|
|
862
|
-
resourceName: mainField
|
|
863
|
-
})
|
|
788
|
+
capacity: resolveResourceCapacity(),
|
|
789
|
+
metadata: {}
|
|
864
790
|
} : void 0;
|
|
865
791
|
const ruleProductUid = ruleProduct ? (0, import_utils2.createUuidV4)() : void 0;
|
|
866
|
-
const
|
|
792
|
+
const rawCollectPax = (_b = tempOrder.metadata) == null ? void 0 : _b.collect_pax;
|
|
793
|
+
const hasCollectPaxForCapacity = rawCollectPax !== null && rawCollectPax !== void 0 && rawCollectPax !== "";
|
|
794
|
+
const bookingCapacityValue = hasCollectPaxForCapacity ? (0, import_utils2.normalizeSubmitCollectPaxValue)(rawCollectPax) : resolveResourceCapacity();
|
|
867
795
|
const bookingCapacityDimensionId = (0, import_utils.pickFirstCustomCapacityDimensionId)(this.enabledReservationRuleProducts) ?? 0;
|
|
868
|
-
const nextBookings = (payload.bookings || []).map((booking, idx) =>
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
796
|
+
const nextBookings = (payload.bookings || []).map((booking, idx) => {
|
|
797
|
+
var _a2;
|
|
798
|
+
return {
|
|
799
|
+
...booking,
|
|
800
|
+
appointment_status: "started",
|
|
801
|
+
metadata: {
|
|
802
|
+
...booking.metadata || {},
|
|
803
|
+
holder_id: ((_a2 = booking.metadata) == null ? void 0 : _a2.holder_id) ?? null,
|
|
804
|
+
...resourceSelectType ? { resource_select_type: resourceSelectType } : {},
|
|
805
|
+
...resourceSelectType ? {
|
|
806
|
+
capacity: [
|
|
807
|
+
{
|
|
808
|
+
id: bookingCapacityDimensionId,
|
|
809
|
+
value: bookingCapacityValue,
|
|
810
|
+
name: ""
|
|
811
|
+
}
|
|
812
|
+
]
|
|
813
|
+
} : {}
|
|
814
|
+
},
|
|
815
|
+
...idx === 0 && resourceEntry ? { resources: [resourceEntry] } : {},
|
|
816
|
+
...idx === 0 && ruleProductUid ? { product_uid: ruleProductUid } : {}
|
|
817
|
+
};
|
|
818
|
+
});
|
|
888
819
|
const nextProducts = [...payload.products || []];
|
|
889
820
|
if (ruleProduct && ruleProductUid && !tempOrder.order_id) {
|
|
890
821
|
const sellingPrice = String(ruleProduct.price ?? "0.00");
|
|
@@ -972,23 +903,23 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
972
903
|
throw error;
|
|
973
904
|
}
|
|
974
905
|
}
|
|
975
|
-
async
|
|
976
|
-
this.logMethodStart("
|
|
906
|
+
async updateProductInOrder(params) {
|
|
907
|
+
this.logMethodStart("updateProductInOrder", {
|
|
977
908
|
product_id: params.product_id,
|
|
978
909
|
product_variant_id: params.product_variant_id
|
|
979
910
|
});
|
|
980
911
|
try {
|
|
981
912
|
if (!this.store.order)
|
|
982
913
|
throw new Error("order 模块未初始化");
|
|
983
|
-
const products = await this.store.order.
|
|
914
|
+
const products = await this.store.order.updateProductInOrder(params);
|
|
984
915
|
await this.refreshItemRuleQuantityLimits();
|
|
985
916
|
await this.refreshCartValidationPassed();
|
|
986
|
-
this.logMethodSuccess("
|
|
917
|
+
this.logMethodSuccess("updateProductInOrder", {
|
|
987
918
|
productCount: products.length
|
|
988
919
|
});
|
|
989
920
|
return products;
|
|
990
921
|
} catch (error) {
|
|
991
|
-
this.logMethodError("
|
|
922
|
+
this.logMethodError("updateProductInOrder", error);
|
|
992
923
|
throw error;
|
|
993
924
|
}
|
|
994
925
|
}
|
|
@@ -1007,14 +938,15 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1007
938
|
product_variant_id: identity.product_variant_id,
|
|
1008
939
|
updates: { note: String(note || "") }
|
|
1009
940
|
};
|
|
1010
|
-
if (identity.identity_key !== void 0)
|
|
941
|
+
if (identity.identity_key !== void 0) {
|
|
1011
942
|
params.identity_key = identity.identity_key;
|
|
943
|
+
}
|
|
1012
944
|
if (identity.product_option_item !== void 0) {
|
|
1013
945
|
params.product_option_item = identity.product_option_item;
|
|
1014
946
|
}
|
|
1015
947
|
if (identity.product_bundle !== void 0)
|
|
1016
948
|
params.product_bundle = identity.product_bundle;
|
|
1017
|
-
const products = await this.
|
|
949
|
+
const products = await this.updateProductInOrder(params);
|
|
1018
950
|
this.logMethodSuccess("setOrderProductLineNote", { productCount: products.length });
|
|
1019
951
|
return products;
|
|
1020
952
|
} catch (error) {
|
|
@@ -1276,6 +1208,7 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1276
1208
|
item_rule_prefill: true,
|
|
1277
1209
|
item_rule_id: prefillItem.ruleId
|
|
1278
1210
|
},
|
|
1211
|
+
// TODO(Order types): migrate ScanOrder prefill origin runtime into tempOrder._extend.
|
|
1279
1212
|
_origin: sourceItem ? {
|
|
1280
1213
|
...targetProduct._origin || {},
|
|
1281
1214
|
...sourceItem
|
|
@@ -1500,17 +1433,14 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1500
1433
|
// 通过 resource_id + 店铺配置
|
|
1501
1434
|
// hasOrderId 表示 url 上是否有 orderid,如果是的话,后续的流程会走加单
|
|
1502
1435
|
async checkResourceAvailable(resourceId, hasOrderId) {
|
|
1503
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n
|
|
1436
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
1504
1437
|
this.logMethodStart("checkResourceAvailable", {
|
|
1505
1438
|
resourceId
|
|
1506
1439
|
});
|
|
1507
1440
|
try {
|
|
1508
|
-
const
|
|
1509
|
-
const channel = String(((_b = this.otherParams) == null ? void 0 : _b.channel) ?? "").trim();
|
|
1510
|
-
const openDataTarget = businessCode && channel ? `${businessCode}+${channel}` : "dine_in+scan_to_order";
|
|
1511
|
-
const openData = await ((_d = (_c = this.otherParams) == null ? void 0 : _c.getOpenData) == null ? void 0 : _d.call(_c, {
|
|
1441
|
+
const openData = await ((_b = (_a = this.otherParams) == null ? void 0 : _a.getOpenData) == null ? void 0 : _b.call(_a, {
|
|
1512
1442
|
scope: "board",
|
|
1513
|
-
target:
|
|
1443
|
+
target: "dine_in+scan_to_order",
|
|
1514
1444
|
section_code: ["basic", "fulfillment", "reservation", "sale", "menu", "availability", "workflow"]
|
|
1515
1445
|
}));
|
|
1516
1446
|
if ((openData == null ? void 0 : openData.status) === false) {
|
|
@@ -1601,13 +1531,13 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1601
1531
|
}
|
|
1602
1532
|
} else {
|
|
1603
1533
|
this.enabledReservationRuleProducts = [];
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1534
|
+
void this.addScanOrderLog({
|
|
1535
|
+
level: "error",
|
|
1536
|
+
title: "[ScanOrder] enabled_reservation_rules product query failed",
|
|
1537
|
+
payload: {
|
|
1538
|
+
linkIds: reservationLinkIds,
|
|
1539
|
+
error: this.serializeError(loaded)
|
|
1540
|
+
}
|
|
1611
1541
|
});
|
|
1612
1542
|
}
|
|
1613
1543
|
}
|
|
@@ -1637,16 +1567,16 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1637
1567
|
table_form_id: resourceState.tableFormId,
|
|
1638
1568
|
deskmate_valid: resourceState.deskmate_valid,
|
|
1639
1569
|
table_form_record: resourceState.table_form_record,
|
|
1640
|
-
policy: (
|
|
1641
|
-
partyroom_booking: (
|
|
1570
|
+
policy: (_c = occupyDetail == null ? void 0 : occupyDetail.form_record) == null ? void 0 : _c.policy,
|
|
1571
|
+
partyroom_booking: (_d = occupyDetail == null ? void 0 : occupyDetail.form_record) == null ? void 0 : _d.partyroom_booking,
|
|
1642
1572
|
...this.store.resource.requestEntryPax !== void 0 ? { requestEntryPax: this.store.resource.requestEntryPax } : {},
|
|
1643
1573
|
...this.store.resource.requestPaxMin !== void 0 ? { requestPaxMin: this.store.resource.requestPaxMin } : {},
|
|
1644
1574
|
...this.store.resource.requestPaxMax !== void 0 ? { requestPaxMax: this.store.resource.requestPaxMax } : {}
|
|
1645
1575
|
};
|
|
1646
|
-
tempOrder.relation_id = resourceId || ((
|
|
1576
|
+
tempOrder.relation_id = resourceId || ((_e = this.otherParams) == null ? void 0 : _e.relation_id);
|
|
1647
1577
|
tempOrder.table_form_id = resourceState.tableFormId;
|
|
1648
1578
|
tempOrder.resource_id = resourceId;
|
|
1649
|
-
(
|
|
1579
|
+
(_f = this.store.order) == null ? void 0 : _f.persistTempOrder();
|
|
1650
1580
|
if (availabilityInfo.mode === "idle") {
|
|
1651
1581
|
await this.addNewOrder();
|
|
1652
1582
|
}
|
|
@@ -1654,16 +1584,16 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1654
1584
|
tempOrder.order_id = resourceState.lastOrderId;
|
|
1655
1585
|
}
|
|
1656
1586
|
if (tempOrder.order_id) {
|
|
1657
|
-
const res = await ((
|
|
1658
|
-
const entryPaxNumber = (
|
|
1587
|
+
const res = await ((_g = this.store.order) == null ? void 0 : _g.getOrderInfoByRemote(tempOrder.order_id));
|
|
1588
|
+
const entryPaxNumber = (_k = (_j = (_i = (_h = res == null ? void 0 : res.data) == null ? void 0 : _h.bookings) == null ? void 0 : _i.find((p) => {
|
|
1659
1589
|
var _a2;
|
|
1660
1590
|
return (_a2 = p.metadata) == null ? void 0 : _a2.collect_pax;
|
|
1661
|
-
})) == null ? void 0 :
|
|
1591
|
+
})) == null ? void 0 : _j.metadata) == null ? void 0 : _k.collect_pax;
|
|
1662
1592
|
if (entryPaxNumber) {
|
|
1663
1593
|
await this.setEntryPaxNumber(entryPaxNumber);
|
|
1664
1594
|
}
|
|
1665
1595
|
}
|
|
1666
|
-
const lastOrderInfo = (
|
|
1596
|
+
const lastOrderInfo = (_m = (_l = this.store.order) == null ? void 0 : _l.getLastOrderInfo) == null ? void 0 : _m.call(_l);
|
|
1667
1597
|
const historicalItems = hasOrderId && Array.isArray(lastOrderInfo == null ? void 0 : lastOrderInfo.products) ? lastOrderInfo.products.reduce((acc, p) => {
|
|
1668
1598
|
if (typeof (p == null ? void 0 : p.product_id) !== "number")
|
|
1669
1599
|
return acc;
|
|
@@ -1675,7 +1605,7 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1675
1605
|
return acc;
|
|
1676
1606
|
}, []) : [];
|
|
1677
1607
|
await this.setItemRuleRuntimeConfig({
|
|
1678
|
-
serviceType: (
|
|
1608
|
+
serviceType: (_n = this.otherParams) == null ? void 0 : _n.businessCode,
|
|
1679
1609
|
submissionIndex: hasOrderId ? 1 : 0,
|
|
1680
1610
|
historicalItems
|
|
1681
1611
|
});
|
|
@@ -1723,24 +1653,18 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1723
1653
|
}
|
|
1724
1654
|
// 获取商品列表
|
|
1725
1655
|
async getProductList() {
|
|
1726
|
-
var _a, _b;
|
|
1656
|
+
var _a, _b, _c;
|
|
1727
1657
|
this.logMethodStart("getProductList");
|
|
1728
1658
|
const menu_list_ids = ((_b = (_a = this.otherParams) == null ? void 0 : _a.dineInConfig) == null ? void 0 : _b["menu.associated_menus"].map((n) => Number(n.value))) || [];
|
|
1729
1659
|
try {
|
|
1730
|
-
|
|
1731
|
-
throw new Error("products 模块未初始化");
|
|
1732
|
-
const res = await this.store.products.loadProducts({
|
|
1660
|
+
const res = await ((_c = this.store.products) == null ? void 0 : _c.loadProducts({
|
|
1733
1661
|
menu_list_ids,
|
|
1734
1662
|
cacheId: this.cacheId,
|
|
1735
1663
|
schedule_date: (0, import_dayjs.default)().format("YYYY-MM-DD"),
|
|
1736
1664
|
schedule_datetime: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
|
1737
|
-
});
|
|
1738
|
-
const productList = this.assertProductListLoaded("getProductList", res, {
|
|
1739
|
-
menu_list_ids,
|
|
1740
|
-
cacheId: this.cacheId
|
|
1741
|
-
});
|
|
1665
|
+
}));
|
|
1742
1666
|
const formattedRes = (0, import_utils.attachItemRuleLimitsToTopLevelProducts)(
|
|
1743
|
-
|
|
1667
|
+
res,
|
|
1744
1668
|
this.store.itemRuleQuantityLimits || []
|
|
1745
1669
|
);
|
|
1746
1670
|
this.logMethodSuccess("getProductList", {
|
|
@@ -1748,12 +1672,7 @@ var _ScanOrderImpl = class extends import_BaseModule.BaseModule {
|
|
|
1748
1672
|
});
|
|
1749
1673
|
return formattedRes;
|
|
1750
1674
|
} catch (error) {
|
|
1751
|
-
|
|
1752
|
-
this.logMethodError("getProductList", error, {
|
|
1753
|
-
menu_list_ids,
|
|
1754
|
-
cacheId: this.cacheId
|
|
1755
|
-
});
|
|
1756
|
-
}
|
|
1675
|
+
this.logMethodError("getProductList", error.message);
|
|
1757
1676
|
throw error;
|
|
1758
1677
|
}
|
|
1759
1678
|
}
|
|
@@ -63,7 +63,6 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
63
63
|
var import_dayjs = __toESM(require("dayjs"));
|
|
64
64
|
var import_decimal = __toESM(require("decimal.js"));
|
|
65
65
|
var import_utils = require("../../modules/Order/utils");
|
|
66
|
-
var import_manualProductDiscount = require("../../modules/Order/utils/manualProductDiscount");
|
|
67
66
|
function createEmptySummary() {
|
|
68
67
|
return {
|
|
69
68
|
product_quantity: 0,
|
|
@@ -407,40 +406,12 @@ function getProductIdentityIndex(products, identity) {
|
|
|
407
406
|
return products.findIndex((item) => isIdentityMatch(item, identity));
|
|
408
407
|
}
|
|
409
408
|
function normalizeOrderProduct(product) {
|
|
410
|
-
var _a, _b, _c
|
|
409
|
+
var _a, _b, _c;
|
|
411
410
|
const metadata = { ...product.metadata || {} };
|
|
412
411
|
const resolvedIdentityKey = ((_a = product.metadata) == null ? void 0 : _a.unique_identification_number) ? String(product.metadata.unique_identification_number) : product.unique_identification_number && String(product.unique_identification_number).length > 0 ? String(product.unique_identification_number) : product.identity_key && String(product.identity_key).length > 0 ? String(product.identity_key) : (0, import_utils.createUuidV4)();
|
|
413
412
|
metadata.unique_identification_number = resolvedIdentityKey;
|
|
414
|
-
const
|
|
415
|
-
const originOtherBundle = (_d = (_c = (_b = metadata.origin) == null ? void 0 : _b._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.bundle;
|
|
416
|
-
let bundleInput = product.product_bundle || [];
|
|
417
|
-
if (priceOverride !== void 0 && priceOverride !== null && priceOverride !== "" && Array.isArray(originOtherBundle) && originOtherBundle.length > 0) {
|
|
418
|
-
const priceById = /* @__PURE__ */ new Map();
|
|
419
|
-
originOtherBundle.forEach((item) => {
|
|
420
|
-
if ((item == null ? void 0 : item.id) == null)
|
|
421
|
-
return;
|
|
422
|
-
const unit = item.price ?? item.bundle_selling_price;
|
|
423
|
-
if (unit === void 0 || unit === null)
|
|
424
|
-
return;
|
|
425
|
-
priceById.set(String(item.id), String(unit));
|
|
426
|
-
});
|
|
427
|
-
const base = Array.isArray(bundleInput) && bundleInput.length > 0 ? bundleInput : originOtherBundle;
|
|
428
|
-
bundleInput = base.map((item) => {
|
|
429
|
-
const unit = priceById.get(String(item == null ? void 0 : item.id));
|
|
430
|
-
if (unit === void 0)
|
|
431
|
-
return item;
|
|
432
|
-
return {
|
|
433
|
-
...item,
|
|
434
|
-
price: unit,
|
|
435
|
-
bundle_selling_price: unit
|
|
436
|
-
};
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
const normalizedBundle = bundleInput.map((item) => ({
|
|
413
|
+
const normalizedBundle = (product.product_bundle || []).map((item) => ({
|
|
440
414
|
...item,
|
|
441
|
-
bundle_id: item.bundle_id ?? item.id,
|
|
442
|
-
bundle_product_id: item.bundle_product_id ?? item._bundle_product_id,
|
|
443
|
-
bundle_group_id: item.bundle_group_id ?? item.group_id,
|
|
444
415
|
bundle_selling_price: item.bundle_selling_price ?? item.price ?? "0.00",
|
|
445
416
|
price: item.price ?? item.custom_price ?? item.bundle_selling_price ?? "0.00",
|
|
446
417
|
price_type: item.price_type ?? item.custom_price_type ?? "",
|
|
@@ -450,8 +421,8 @@ function normalizeOrderProduct(product) {
|
|
|
450
421
|
const optionSum = (0, import_utils.sumOptionUnitPrice)(normalizedOptions);
|
|
451
422
|
const isV2 = metadata.price_schema_version === 2 || metadata.price_schema_version === "2";
|
|
452
423
|
const variantId = Number(product.product_variant_id || 0);
|
|
453
|
-
const variantList = variantId ? (
|
|
454
|
-
const variantPrice = Array.isArray(variantList) ? (
|
|
424
|
+
const variantList = variantId ? (_b = metadata == null ? void 0 : metadata.origin) == null ? void 0 : _b.variant : null;
|
|
425
|
+
const variantPrice = Array.isArray(variantList) ? (_c = variantList.find((v) => Number(v == null ? void 0 : v.id) === variantId)) == null ? void 0 : _c.price : void 0;
|
|
455
426
|
const resolvedSource = (() => {
|
|
456
427
|
var _a2, _b2;
|
|
457
428
|
if (metadata.source_product_price !== void 0) {
|
|
@@ -507,17 +478,6 @@ function normalizeOrderProduct(product) {
|
|
|
507
478
|
bundle: normalizedBundle,
|
|
508
479
|
useOriginalBundle: true
|
|
509
480
|
});
|
|
510
|
-
const finalOriginalPrice = (0, import_utils.resolveManualOverrideLineOriginalPrice)(
|
|
511
|
-
{ num: product.num, metadata, lineOriginalPrice: product.original_price },
|
|
512
|
-
composedOriginalPrice
|
|
513
|
-
);
|
|
514
|
-
const discountList = (0, import_manualProductDiscount.ensureManualProductDiscountList)({
|
|
515
|
-
discountList: product.discount_list,
|
|
516
|
-
metadata,
|
|
517
|
-
originalPrice: finalOriginalPrice,
|
|
518
|
-
sellingPrice: composedSellingPrice,
|
|
519
|
-
quantity: getSafeProductNum(product.num)
|
|
520
|
-
});
|
|
521
481
|
return {
|
|
522
482
|
order_detail_id: product.order_detail_id || null,
|
|
523
483
|
product_id: product.product_id,
|
|
@@ -525,10 +485,10 @@ function normalizeOrderProduct(product) {
|
|
|
525
485
|
product_variant_id: product.product_variant_id,
|
|
526
486
|
product_option_item: normalizedOptions,
|
|
527
487
|
selling_price: composedSellingPrice,
|
|
528
|
-
original_price:
|
|
488
|
+
original_price: composedOriginalPrice,
|
|
529
489
|
tax_fee: product.tax_fee || "0.00",
|
|
530
490
|
is_charge_tax: product.is_charge_tax ?? 0,
|
|
531
|
-
discount_list:
|
|
491
|
+
discount_list: product.discount_list || [],
|
|
532
492
|
product_bundle: normalizedBundle,
|
|
533
493
|
metadata,
|
|
534
494
|
note: product.note != null ? String(product.note) : ""
|
|
@@ -46,6 +46,7 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
|
|
|
46
46
|
discountList: Discount[];
|
|
47
47
|
type: "server" | "clientCalc";
|
|
48
48
|
unavailableReason?: UnavailableReason;
|
|
49
|
+
unavailableReasonKey?: string | null;
|
|
49
50
|
}>;
|
|
50
51
|
calcDiscountApplicableProductTotalPrice(discount: Discount): number | undefined;
|
|
51
52
|
private getCustomer;
|
|
@@ -274,7 +274,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
274
274
|
async scanCode(code, customerId) {
|
|
275
275
|
var _a, _b, _c;
|
|
276
276
|
try {
|
|
277
|
-
const
|
|
277
|
+
const resultDiscountWithReason = await ((_a = this.store.discount) == null ? void 0 : _a.batchSearch(code, { customerId, orderId: this.store.orderId })) || { discountList: [], unavailableReasonKey: null };
|
|
278
|
+
const { discountList: resultDiscountList, unavailableReasonKey } = resultDiscountWithReason;
|
|
278
279
|
const rulesModule = this.store.rules;
|
|
279
280
|
if (!rulesModule) {
|
|
280
281
|
return {
|
|
@@ -290,7 +291,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
290
291
|
type: "server",
|
|
291
292
|
isAvailable: false,
|
|
292
293
|
productList: this.store.productList || [],
|
|
293
|
-
discountList: this.getDiscountList()
|
|
294
|
+
discountList: this.getDiscountList(),
|
|
295
|
+
unavailableReasonKey
|
|
294
296
|
};
|
|
295
297
|
}
|
|
296
298
|
const withScanList = resultDiscountList.map((item) => {
|
|
@@ -2,7 +2,7 @@ import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
|
2
2
|
import { BaseModule } from '../../modules/BaseModule';
|
|
3
3
|
import { VenueBookingAddLogParams, VenueBookingSlotConfig, VenueDateSummaryItem, VenueSlotSelection, VenueTimeSlotGrid } from './types';
|
|
4
4
|
import type { ScanOrderOrderProduct, ScanOrderOrderProductIdentity } from '../ScanOrder/types';
|
|
5
|
-
import type {
|
|
5
|
+
import type { UpdateProductInOrderParams } from '../../modules/Order/types';
|
|
6
6
|
import type { OpenDataAvailabilityResult } from '../../modules/OpenData';
|
|
7
7
|
import type { ProductData } from '../../modules/Product/types';
|
|
8
8
|
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
|
|
@@ -41,8 +41,6 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
41
41
|
private loadOpenDataConfigInFlight;
|
|
42
42
|
private static readonly OPEN_DATA_CACHE_TTL;
|
|
43
43
|
private getLoggerContext;
|
|
44
|
-
private safeStringify;
|
|
45
|
-
private pickErrorMessage;
|
|
46
44
|
private serializeError;
|
|
47
45
|
private addVenueBookingLog;
|
|
48
46
|
private logMethodStart;
|
|
@@ -150,7 +148,13 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
150
148
|
customerId: number;
|
|
151
149
|
}): Promise<void>;
|
|
152
150
|
private recalculateOrderPricesFromQuotation;
|
|
153
|
-
scanCode(code: string, customerId?: number): Promise<
|
|
151
|
+
scanCode(code: string, customerId?: number): Promise<{
|
|
152
|
+
isAvailable: boolean;
|
|
153
|
+
discountList: import("../../modules/Discount").Discount[];
|
|
154
|
+
type: "server" | "clientCalc";
|
|
155
|
+
unavailableReason?: import("../../modules/Rules/types").UnavailableReason | undefined;
|
|
156
|
+
unavailableReasonKey?: string | null | undefined;
|
|
157
|
+
}>;
|
|
154
158
|
/** 获取当前折扣列表(包装 order.getDiscountList) */
|
|
155
159
|
getDiscountList(): import("../../modules/Discount").Discount[];
|
|
156
160
|
/** 勾选/取消勾选某张折扣券,重新计算折扣并持久化 */
|
|
@@ -163,7 +167,7 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
163
167
|
getSummary(): Promise<import("../../modules/Order/types").OrderSummary>;
|
|
164
168
|
submitOrder<T = any>(): Promise<T>;
|
|
165
169
|
addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
166
|
-
|
|
170
|
+
updateProductInOrder(params: UpdateProductInOrderParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
167
171
|
removeProductFromOrder(identity: ScanOrderOrderProductIdentity): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
168
172
|
getProductList(): Promise<ProductData[]>;
|
|
169
173
|
private loadOpenDataConfig;
|