@pisell/pisellos 2.3.43 → 2.3.45
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/Discount/index.d.ts +0 -1
- package/dist/modules/Discount/index.js +11 -40
- package/dist/modules/Discount/types.d.ts +0 -1
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +2 -3
- package/dist/modules/Order/index.js +98 -82
- package/dist/modules/Order/types.d.ts +2 -9
- package/dist/modules/Order/utils.d.ts +0 -10
- package/dist/modules/Order/utils.js +3 -35
- package/dist/modules/Payment/walletpass.d.ts +10 -3
- package/dist/modules/Payment/walletpass.js +425 -282
- package/dist/modules/Product/types.d.ts +0 -1
- package/dist/modules/ProductList/index.js +14 -33
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/Rules/index.d.ts +2 -0
- package/dist/modules/Rules/index.js +72 -102
- package/dist/modules/SalesSummary/index.js +13 -12
- package/dist/modules/ScanOrderLogger/index.d.ts +0 -2
- package/dist/modules/ScanOrderLogger/index.js +2 -15
- package/dist/modules/ScanOrderLogger/providers/feishu.js +27 -45
- package/dist/modules/ScanOrderLogger/types.d.ts +0 -1
- package/dist/modules/Schedule/index.d.ts +1 -3
- package/dist/modules/Schedule/index.js +16 -21
- package/dist/modules/Summary/utils.js +13 -38
- package/dist/modules/index.d.ts +0 -2
- package/dist/modules/index.js +1 -3
- package/dist/plugins/window.d.ts +0 -1
- package/dist/server/index.d.ts +0 -14
- package/dist/server/index.js +657 -772
- package/dist/solution/BaseSales/index.d.ts +0 -7
- package/dist/solution/BaseSales/index.js +48 -67
- package/dist/solution/BaseSales/types.d.ts +3 -1
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +6 -3
- package/dist/solution/BookingByStep/index.d.ts +1 -16
- package/dist/solution/BookingByStep/index.js +215 -294
- package/dist/solution/BookingByStep/types.d.ts +1 -2
- package/dist/solution/BookingByStep/types.js +1 -3
- package/dist/solution/BookingByStep/utils/capacity.js +1 -17
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
- package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
- package/dist/solution/BookingTicket/index.d.ts +1 -13
- package/dist/solution/BookingTicket/index.js +8 -5
- package/dist/solution/BookingTicket/types.d.ts +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +3 -3
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -10
- package/dist/solution/ScanOrder/index.d.ts +14 -26
- package/dist/solution/ScanOrder/index.js +739 -1142
- package/dist/solution/ScanOrder/types.d.ts +1 -21
- package/dist/solution/ScanOrder/utils.d.ts +0 -8
- package/dist/solution/ScanOrder/utils.js +25 -66
- package/dist/solution/ShopDiscount/index.d.ts +0 -1
- package/dist/solution/ShopDiscount/index.js +87 -125
- package/dist/solution/VenueBooking/index.d.ts +12 -39
- package/dist/solution/VenueBooking/index.js +841 -1167
- package/dist/solution/VenueBooking/types.d.ts +0 -3
- package/dist/solution/VenueBooking/utils/resource.js +0 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +5 -10
- package/dist/solution/index.d.ts +0 -1
- package/dist/solution/index.js +1 -2
- package/dist/types/index.d.ts +0 -1
- package/lib/model/strategy/adapter/promotion/index.js +51 -0
- package/lib/modules/Discount/index.d.ts +0 -1
- package/lib/modules/Discount/index.js +0 -9
- package/lib/modules/Discount/types.d.ts +0 -1
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +2 -3
- package/lib/modules/Order/index.js +56 -33
- package/lib/modules/Order/types.d.ts +2 -9
- package/lib/modules/Order/utils.d.ts +0 -10
- package/lib/modules/Order/utils.js +5 -36
- package/lib/modules/Payment/walletpass.d.ts +10 -3
- package/lib/modules/Payment/walletpass.js +218 -56
- package/lib/modules/Product/types.d.ts +0 -1
- package/lib/modules/ProductList/index.js +31 -40
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/Rules/index.d.ts +2 -0
- package/lib/modules/Rules/index.js +24 -36
- package/lib/modules/SalesSummary/index.js +7 -6
- package/lib/modules/ScanOrderLogger/index.d.ts +0 -2
- package/lib/modules/ScanOrderLogger/index.js +1 -13
- package/lib/modules/ScanOrderLogger/providers/feishu.js +6 -15
- package/lib/modules/ScanOrderLogger/types.d.ts +0 -1
- package/lib/modules/Schedule/index.d.ts +1 -3
- package/lib/modules/Schedule/index.js +8 -10
- package/lib/modules/Summary/utils.js +1 -21
- package/lib/modules/index.d.ts +0 -2
- package/lib/modules/index.js +1 -5
- package/lib/plugins/window.d.ts +0 -1
- package/lib/server/index.d.ts +0 -14
- package/lib/server/index.js +5 -65
- package/lib/solution/BaseSales/index.d.ts +0 -7
- package/lib/solution/BaseSales/index.js +9 -24
- package/lib/solution/BaseSales/types.d.ts +3 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -2
- package/lib/solution/BookingByStep/index.d.ts +1 -16
- package/lib/solution/BookingByStep/index.js +18 -60
- package/lib/solution/BookingByStep/types.d.ts +1 -2
- package/lib/solution/BookingByStep/types.js +0 -5
- package/lib/solution/BookingByStep/utils/capacity.js +1 -20
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
- package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
- package/lib/solution/BookingTicket/index.d.ts +1 -13
- package/lib/solution/BookingTicket/index.js +3 -10
- package/lib/solution/BookingTicket/types.d.ts +1 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +2 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/ScanOrder/index.d.ts +14 -26
- package/lib/solution/ScanOrder/index.js +182 -449
- package/lib/solution/ScanOrder/types.d.ts +1 -21
- package/lib/solution/ScanOrder/utils.d.ts +0 -8
- package/lib/solution/ScanOrder/utils.js +0 -31
- package/lib/solution/ShopDiscount/index.d.ts +0 -1
- package/lib/solution/ShopDiscount/index.js +0 -14
- package/lib/solution/VenueBooking/index.d.ts +12 -39
- package/lib/solution/VenueBooking/index.js +110 -322
- package/lib/solution/VenueBooking/types.d.ts +0 -3
- package/lib/solution/VenueBooking/utils/resource.js +0 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +4 -6
- package/lib/solution/index.d.ts +0 -1
- package/lib/solution/index.js +1 -3
- package/lib/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/modules/Holder/index.d.ts +0 -48
- package/dist/modules/Holder/index.js +0 -640
- package/dist/modules/Holder/types.d.ts +0 -123
- package/dist/modules/Holder/types.js +0 -1
- package/dist/modules/Holder/utils.d.ts +0 -13
- package/dist/modules/Holder/utils.js +0 -34
- package/dist/modules/ResourcePlanner/index.d.ts +0 -24
- package/dist/modules/ResourcePlanner/index.js +0 -181
- package/dist/modules/ResourcePlanner/planner.d.ts +0 -14
- package/dist/modules/ResourcePlanner/planner.js +0 -1069
- package/dist/modules/ResourcePlanner/types.d.ts +0 -227
- package/dist/modules/ResourcePlanner/types.js +0 -1
- package/dist/solution/UnifiedBookingSales/index.d.ts +0 -183
- package/dist/solution/UnifiedBookingSales/index.js +0 -1891
- package/dist/solution/UnifiedBookingSales/types.d.ts +0 -143
- package/dist/solution/UnifiedBookingSales/types.js +0 -11
- package/lib/modules/Holder/index.d.ts +0 -48
- package/lib/modules/Holder/index.js +0 -402
- package/lib/modules/Holder/types.d.ts +0 -123
- package/lib/modules/Holder/types.js +0 -17
- package/lib/modules/Holder/utils.d.ts +0 -13
- package/lib/modules/Holder/utils.js +0 -71
- package/lib/modules/ResourcePlanner/index.d.ts +0 -24
- package/lib/modules/ResourcePlanner/index.js +0 -148
- package/lib/modules/ResourcePlanner/planner.d.ts +0 -14
- package/lib/modules/ResourcePlanner/planner.js +0 -933
- package/lib/modules/ResourcePlanner/types.d.ts +0 -227
- package/lib/modules/ResourcePlanner/types.js +0 -17
- package/lib/solution/UnifiedBookingSales/index.d.ts +0 -183
- package/lib/solution/UnifiedBookingSales/index.js +0 -1084
- package/lib/solution/UnifiedBookingSales/types.d.ts +0 -143
- package/lib/solution/UnifiedBookingSales/types.js +0 -33
|
@@ -157,10 +157,6 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
157
157
|
userPlugin,
|
|
158
158
|
customer_id,
|
|
159
159
|
_userPlugin$get,
|
|
160
|
-
channelMap,
|
|
161
|
-
rawApplicationCode,
|
|
162
|
-
mappedApplicationCode,
|
|
163
|
-
queryPayload,
|
|
164
160
|
productsData,
|
|
165
161
|
sortedList,
|
|
166
162
|
_args4 = arguments;
|
|
@@ -189,16 +185,8 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
189
185
|
console.error(error);
|
|
190
186
|
}
|
|
191
187
|
// 如果没传schedule_date,则从
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
scan_to_order: 'online-store',
|
|
195
|
-
'scan-to-order': 'online-store',
|
|
196
|
-
scan_to_order_2: 'mobile_order',
|
|
197
|
-
scan_to_order_3: 'scantoorder3'
|
|
198
|
-
};
|
|
199
|
-
rawApplicationCode = (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel;
|
|
200
|
-
mappedApplicationCode = typeof rawApplicationCode === 'string' ? channelMap[rawApplicationCode] || rawApplicationCode : rawApplicationCode;
|
|
201
|
-
queryPayload = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
188
|
+
_context4.next = 7;
|
|
189
|
+
return this.request.post("/product/query", {
|
|
202
190
|
open_quotation: 1,
|
|
203
191
|
open_bundle: 0,
|
|
204
192
|
exclude_extension_type: ['product_party', 'product_event', 'product_series_event', 'product_package_ticket', 'ticket', 'event_item'],
|
|
@@ -206,35 +194,28 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
206
194
|
status: status,
|
|
207
195
|
num: 500,
|
|
208
196
|
skip: 1,
|
|
209
|
-
customer_id: customer_id
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
collection: collection
|
|
216
|
-
} : {}), {}, {
|
|
217
|
-
front_end_cache_id: cacheId
|
|
218
|
-
}, Array.isArray(menu_list_ids) && menu_list_ids.length ? {
|
|
219
|
-
menu_list_ids: menu_list_ids
|
|
220
|
-
} : {}), {}, {
|
|
197
|
+
customer_id: customer_id,
|
|
198
|
+
category_ids: category_ids,
|
|
199
|
+
ids: product_ids,
|
|
200
|
+
collection: collection,
|
|
201
|
+
front_end_cache_id: cacheId,
|
|
202
|
+
menu_list_ids: menu_list_ids,
|
|
221
203
|
with_count: with_count,
|
|
222
204
|
// client_schedule_ids: schedule_ids,
|
|
223
205
|
schedule_date: schedule_date,
|
|
224
|
-
application_code:
|
|
206
|
+
application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel,
|
|
225
207
|
is_eject: 1,
|
|
226
208
|
with_schedule: with_schedule,
|
|
227
209
|
schedule_datetime: schedule_datetime,
|
|
228
|
-
extension_type: extension_type
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return this.request.post("/product/query", queryPayload, {
|
|
210
|
+
extension_type: extension_type,
|
|
211
|
+
strategy_context: strategy_context
|
|
212
|
+
}, {
|
|
232
213
|
osServer: true,
|
|
233
214
|
callback: options === null || options === void 0 ? void 0 : options.callback,
|
|
234
215
|
subscriberId: options === null || options === void 0 ? void 0 : options.subscriberId,
|
|
235
216
|
customToast: function customToast() {}
|
|
236
217
|
});
|
|
237
|
-
case
|
|
218
|
+
case 7:
|
|
238
219
|
productsData = _context4.sent;
|
|
239
220
|
sortedList = (productsData.data.list || []).slice().sort(function (a, b) {
|
|
240
221
|
return Number(b.sort) - Number(a.sort);
|
|
@@ -247,7 +228,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
247
228
|
// }
|
|
248
229
|
this.addProduct(sortedList);
|
|
249
230
|
return _context4.abrupt("return", sortedList);
|
|
250
|
-
case
|
|
231
|
+
case 11:
|
|
251
232
|
case "end":
|
|
252
233
|
return _context4.stop();
|
|
253
234
|
}
|
|
@@ -21,7 +21,7 @@ export declare class QuotationModule extends BaseModule implements Module {
|
|
|
21
21
|
* Look up the quotation price for a specific product (+ optional variant) at a given datetime.
|
|
22
22
|
* Returns the price as a string (e.g. "300.00"), or null if no quotation applies.
|
|
23
23
|
*
|
|
24
|
-
* Priority: iterates quotations already sorted by `sort`
|
|
24
|
+
* Priority: iterates quotations already sorted by `sort` ascending (lowest = highest priority).
|
|
25
25
|
* First matching quotation whose schedule covers `datetime` and whose product_data contains
|
|
26
26
|
* the requested productId wins.
|
|
27
27
|
*/
|
|
@@ -90,7 +90,7 @@ export var QuotationModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
90
90
|
res = _context2.sent;
|
|
91
91
|
list = (res === null || res === void 0 || (_data = res.data) === null || _data === void 0 ? void 0 : _data.list) || (res === null || res === void 0 ? void 0 : res.list) || [];
|
|
92
92
|
list.sort(function (a, b) {
|
|
93
|
-
return
|
|
93
|
+
return a.sort - b.sort;
|
|
94
94
|
});
|
|
95
95
|
this.store.list = list;
|
|
96
96
|
case 9:
|
|
@@ -151,7 +151,7 @@ export var QuotationModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
151
151
|
* Look up the quotation price for a specific product (+ optional variant) at a given datetime.
|
|
152
152
|
* Returns the price as a string (e.g. "300.00"), or null if no quotation applies.
|
|
153
153
|
*
|
|
154
|
-
* Priority: iterates quotations already sorted by `sort`
|
|
154
|
+
* Priority: iterates quotations already sorted by `sort` ascending (lowest = highest priority).
|
|
155
155
|
* First matching quotation whose schedule covers `datetime` and whose product_data contains
|
|
156
156
|
* the requested productId wins.
|
|
157
157
|
*/
|
|
@@ -27,6 +27,8 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
|
|
|
27
27
|
}): {
|
|
28
28
|
isAvailable: boolean;
|
|
29
29
|
discountList: Discount[];
|
|
30
|
+
/** 完整规则计算后的列表;调用方可用于保留暂时无适用商品的扫码卡券。 */
|
|
31
|
+
evaluatedDiscountList?: Discount[];
|
|
30
32
|
productList: any[];
|
|
31
33
|
unavailableReason?: UnavailableReason;
|
|
32
34
|
};
|