@pisell/pisellos 2.3.49 → 2.3.50
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 +1 -0
- package/dist/modules/Discount/index.js +40 -11
- package/dist/modules/Discount/types.d.ts +1 -0
- package/dist/modules/Holder/index.d.ts +48 -0
- package/dist/modules/Holder/index.js +640 -0
- package/dist/modules/Holder/types.d.ts +123 -0
- package/dist/modules/Holder/types.js +1 -0
- package/dist/modules/Holder/utils.d.ts +13 -0
- package/dist/modules/Holder/utils.js +34 -0
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +3 -1
- package/dist/modules/Order/index.js +54 -25
- package/dist/modules/Order/types.d.ts +9 -0
- package/dist/modules/Order/utils.d.ts +10 -0
- package/dist/modules/Order/utils.js +35 -3
- package/dist/modules/Payment/types.d.ts +0 -8
- package/dist/modules/Payment/walletpass.d.ts +1 -7
- package/dist/modules/Payment/walletpass.js +45 -155
- package/dist/modules/Product/types.d.ts +1 -0
- package/dist/modules/ProductList/index.js +33 -14
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/ResourcePlanner/index.d.ts +24 -0
- package/dist/modules/ResourcePlanner/index.js +181 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
- package/dist/modules/ResourcePlanner/planner.js +1069 -0
- package/dist/modules/ResourcePlanner/types.d.ts +227 -0
- package/dist/modules/ResourcePlanner/types.js +1 -0
- package/dist/modules/Rules/index.js +47 -13
- package/dist/modules/SalesSummary/index.js +12 -13
- package/dist/modules/ScanOrderLogger/index.d.ts +2 -0
- package/dist/modules/ScanOrderLogger/index.js +15 -2
- package/dist/modules/ScanOrderLogger/providers/feishu.js +45 -27
- package/dist/modules/ScanOrderLogger/types.d.ts +1 -0
- package/dist/modules/Schedule/index.d.ts +3 -1
- package/dist/modules/Schedule/index.js +21 -16
- package/dist/modules/Summary/utils.js +38 -13
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.js +3 -1
- package/dist/plugins/window.d.ts +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +907 -793
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +0 -16
- package/dist/server/modules/order/index.js +776 -964
- package/dist/server/modules/order/types.d.ts +0 -14
- package/dist/server/modules/order/types.js +0 -6
- package/dist/solution/BaseSales/index.d.ts +8 -3
- package/dist/solution/BaseSales/index.js +64 -50
- package/dist/solution/BookingByStep/index.d.ts +17 -2
- package/dist/solution/BookingByStep/index.js +294 -215
- package/dist/solution/BookingByStep/types.d.ts +2 -1
- package/dist/solution/BookingByStep/types.js +3 -1
- package/dist/solution/BookingByStep/utils/capacity.js +17 -1
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/dist/solution/BookingByStep/utils/timeslots.js +19 -12
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +2 -2
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +10 -2
- package/dist/solution/ScanOrder/index.d.ts +26 -14
- package/dist/solution/ScanOrder/index.js +1142 -739
- package/dist/solution/ScanOrder/types.d.ts +21 -1
- package/dist/solution/ScanOrder/utils.d.ts +8 -0
- package/dist/solution/ScanOrder/utils.js +66 -25
- package/dist/solution/ShopDiscount/index.d.ts +1 -0
- package/dist/solution/ShopDiscount/index.js +125 -87
- package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/dist/solution/UnifiedBookingSales/index.js +1891 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/dist/solution/UnifiedBookingSales/types.js +11 -0
- package/dist/solution/VenueBooking/index.d.ts +39 -11
- package/dist/solution/VenueBooking/index.js +1167 -841
- package/dist/solution/VenueBooking/types.d.ts +3 -0
- package/dist/solution/VenueBooking/utils/resource.js +1 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +10 -5
- package/dist/solution/index.d.ts +1 -0
- package/dist/solution/index.js +2 -1
- package/dist/types/index.d.ts +1 -0
- package/lib/model/strategy/adapter/promotion/index.js +51 -0
- package/lib/modules/Discount/index.d.ts +1 -0
- package/lib/modules/Discount/index.js +9 -0
- package/lib/modules/Discount/types.d.ts +1 -0
- package/lib/modules/Holder/index.d.ts +48 -0
- package/lib/modules/Holder/index.js +402 -0
- package/lib/modules/Holder/types.d.ts +123 -0
- package/lib/modules/Holder/types.js +17 -0
- package/lib/modules/Holder/utils.d.ts +13 -0
- package/lib/modules/Holder/utils.js +71 -0
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +3 -1
- package/lib/modules/Order/index.js +26 -10
- package/lib/modules/Order/types.d.ts +9 -0
- package/lib/modules/Order/utils.d.ts +10 -0
- package/lib/modules/Order/utils.js +36 -5
- package/lib/modules/Payment/types.d.ts +0 -8
- package/lib/modules/Payment/walletpass.d.ts +1 -7
- package/lib/modules/Payment/walletpass.js +9 -107
- package/lib/modules/Product/types.d.ts +1 -0
- package/lib/modules/ProductList/index.js +40 -31
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/ResourcePlanner/index.d.ts +24 -0
- package/lib/modules/ResourcePlanner/index.js +148 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
- package/lib/modules/ResourcePlanner/planner.js +933 -0
- package/lib/modules/ResourcePlanner/types.d.ts +227 -0
- package/lib/modules/ResourcePlanner/types.js +17 -0
- package/lib/modules/Rules/index.js +33 -16
- package/lib/modules/SalesSummary/index.js +6 -7
- package/lib/modules/ScanOrderLogger/index.d.ts +2 -0
- package/lib/modules/ScanOrderLogger/index.js +13 -1
- package/lib/modules/ScanOrderLogger/providers/feishu.js +15 -6
- package/lib/modules/ScanOrderLogger/types.d.ts +1 -0
- package/lib/modules/Schedule/index.d.ts +3 -1
- package/lib/modules/Schedule/index.js +10 -8
- package/lib/modules/Summary/utils.js +21 -1
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/index.js +5 -1
- package/lib/plugins/window.d.ts +1 -0
- package/lib/server/index.d.ts +14 -0
- package/lib/server/index.js +72 -15
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +0 -16
- package/lib/server/modules/order/index.js +4 -140
- package/lib/server/modules/order/types.d.ts +0 -14
- package/lib/server/modules/order/types.js +0 -1
- package/lib/solution/BaseSales/index.d.ts +8 -3
- package/lib/solution/BaseSales/index.js +24 -14
- package/lib/solution/BookingByStep/index.d.ts +17 -2
- package/lib/solution/BookingByStep/index.js +60 -18
- package/lib/solution/BookingByStep/types.d.ts +2 -1
- package/lib/solution/BookingByStep/types.js +5 -0
- package/lib/solution/BookingByStep/utils/capacity.js +20 -1
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/lib/solution/BookingByStep/utils/timeslots.js +19 -11
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +10 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/ScanOrder/index.d.ts +26 -14
- package/lib/solution/ScanOrder/index.js +449 -182
- package/lib/solution/ScanOrder/types.d.ts +21 -1
- package/lib/solution/ScanOrder/utils.d.ts +8 -0
- package/lib/solution/ScanOrder/utils.js +31 -0
- package/lib/solution/ShopDiscount/index.d.ts +1 -0
- package/lib/solution/ShopDiscount/index.js +14 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/lib/solution/UnifiedBookingSales/index.js +1084 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/lib/solution/UnifiedBookingSales/types.js +33 -0
- package/lib/solution/VenueBooking/index.d.ts +39 -11
- package/lib/solution/VenueBooking/index.js +322 -110
- package/lib/solution/VenueBooking/types.d.ts +3 -0
- package/lib/solution/VenueBooking/utils/resource.js +1 -0
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +6 -4
- package/lib/solution/index.d.ts +1 -0
- package/lib/solution/index.js +3 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
|
|
|
32
32
|
customerId?: number;
|
|
33
33
|
orderId?: number;
|
|
34
34
|
}): Promise<DiscountWithReason>;
|
|
35
|
+
batchSearchByProductIds(productIds: number[]): Promise<any>;
|
|
35
36
|
filterEnabledDiscountList(discountList: Discount[]): Discount[];
|
|
36
37
|
private checkUsageCreditsLimit;
|
|
37
38
|
filterEnabledDiscountListWithReason(discountList: Discount[]): DiscountWithReason;
|
|
@@ -244,6 +244,35 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
244
244
|
}
|
|
245
245
|
return batchSearch;
|
|
246
246
|
}()
|
|
247
|
+
}, {
|
|
248
|
+
key: "batchSearchByProductIds",
|
|
249
|
+
value: function () {
|
|
250
|
+
var _batchSearchByProductIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(productIds) {
|
|
251
|
+
var result;
|
|
252
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
253
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
254
|
+
case 0:
|
|
255
|
+
_context6.next = 2;
|
|
256
|
+
return this.request.get("/machinecode/batch-search", {
|
|
257
|
+
ids: productIds,
|
|
258
|
+
translate_flag: 1,
|
|
259
|
+
tags: ['good_pass', 'product_discount_card'],
|
|
260
|
+
relation_product: 1
|
|
261
|
+
});
|
|
262
|
+
case 2:
|
|
263
|
+
result = _context6.sent;
|
|
264
|
+
return _context6.abrupt("return", (result === null || result === void 0 ? void 0 : result.data) || []);
|
|
265
|
+
case 4:
|
|
266
|
+
case "end":
|
|
267
|
+
return _context6.stop();
|
|
268
|
+
}
|
|
269
|
+
}, _callee6, this);
|
|
270
|
+
}));
|
|
271
|
+
function batchSearchByProductIds(_x8) {
|
|
272
|
+
return _batchSearchByProductIds.apply(this, arguments);
|
|
273
|
+
}
|
|
274
|
+
return batchSearchByProductIds;
|
|
275
|
+
}()
|
|
247
276
|
}, {
|
|
248
277
|
key: "filterEnabledDiscountList",
|
|
249
278
|
value: function filterEnabledDiscountList(discountList) {
|
|
@@ -430,22 +459,22 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
430
459
|
}, {
|
|
431
460
|
key: "destroy",
|
|
432
461
|
value: function () {
|
|
433
|
-
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
434
|
-
return _regeneratorRuntime().wrap(function
|
|
435
|
-
while (1) switch (
|
|
462
|
+
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
463
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
464
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
436
465
|
case 0:
|
|
437
466
|
this.store.discountList = [];
|
|
438
467
|
this.core.effects.offByModuleDestroy(this.name);
|
|
439
|
-
|
|
468
|
+
_context7.next = 4;
|
|
440
469
|
return this.core.effects.emit("".concat(this.name, ":onDestroy"), {});
|
|
441
470
|
case 4:
|
|
442
471
|
console.log('[Discount] 已销毁');
|
|
443
472
|
_get(_getPrototypeOf(DiscountModule.prototype), "destroy", this).call(this);
|
|
444
473
|
case 6:
|
|
445
474
|
case "end":
|
|
446
|
-
return
|
|
475
|
+
return _context7.stop();
|
|
447
476
|
}
|
|
448
|
-
},
|
|
477
|
+
}, _callee7, this);
|
|
449
478
|
}));
|
|
450
479
|
function destroy() {
|
|
451
480
|
return _destroy.apply(this, arguments);
|
|
@@ -455,18 +484,18 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
455
484
|
}, {
|
|
456
485
|
key: "clear",
|
|
457
486
|
value: function () {
|
|
458
|
-
var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
459
|
-
return _regeneratorRuntime().wrap(function
|
|
460
|
-
while (1) switch (
|
|
487
|
+
var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
488
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
489
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
461
490
|
case 0:
|
|
462
491
|
this.store.discountList = [];
|
|
463
492
|
this.store.originalDiscountList = [];
|
|
464
493
|
console.log('[Discount] clear');
|
|
465
494
|
case 3:
|
|
466
495
|
case "end":
|
|
467
|
-
return
|
|
496
|
+
return _context8.stop();
|
|
468
497
|
}
|
|
469
|
-
},
|
|
498
|
+
}, _callee8, this);
|
|
470
499
|
}));
|
|
471
500
|
function clear() {
|
|
472
501
|
return _clear.apply(this, arguments);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
|
+
import { BaseModule } from '../BaseModule';
|
|
3
|
+
import { IFormInfo, IFormRecord, IFormItemData, IFetchFormInfoParams, IFetchFormRecordsParams, IAddFormRecordParams, IAppendFormRecordParams, IEnsureFormDataParams, IEnsureFormByProductParams, IRefreshAllFormRecordsParams, HolderModuleAPI, HolderFormMap } from './types';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export declare class HolderModule extends BaseModule implements Module, HolderModuleAPI {
|
|
7
|
+
protected defaultName: string;
|
|
8
|
+
protected defaultVersion: string;
|
|
9
|
+
private store;
|
|
10
|
+
private request;
|
|
11
|
+
private cacheId;
|
|
12
|
+
private openCache;
|
|
13
|
+
private fatherModule;
|
|
14
|
+
private isLoading;
|
|
15
|
+
private error;
|
|
16
|
+
/** 已加载过表单数据的 form_id 缓存标记 */
|
|
17
|
+
private loadedFormIds;
|
|
18
|
+
private window;
|
|
19
|
+
constructor(name?: string, version?: string);
|
|
20
|
+
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
21
|
+
/** 统一提交 formMap,仅此处触发 store changed */
|
|
22
|
+
private commitFormMap;
|
|
23
|
+
/** 通知 UI 刷新(数据未变但需要 re-read 的场景) */
|
|
24
|
+
private notifyFormMapChanged;
|
|
25
|
+
getHolderFormMap(): HolderFormMap;
|
|
26
|
+
getHolderFormData(formId: number | string): IFormItemData | undefined;
|
|
27
|
+
setFormData(formId: number | string, data: Partial<IFormItemData>): void;
|
|
28
|
+
private ensureFormItem;
|
|
29
|
+
private hasFormData;
|
|
30
|
+
private patchFormMap;
|
|
31
|
+
fetchFormInfo(params: IFetchFormInfoParams): Promise<IFormInfo | IFormInfo[]>;
|
|
32
|
+
fetchRecords(params: IFetchFormRecordsParams): Promise<any>;
|
|
33
|
+
ensureFormData(params: IEnsureFormDataParams): Promise<IFormItemData>;
|
|
34
|
+
ensureFormByProduct(params: IEnsureFormByProductParams): Promise<IFormItemData | null>;
|
|
35
|
+
addFormRecord(params: IAddFormRecordParams): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* UI 层自行请求添加接口后,将返回记录合并到 holderMap 对应 form_id 的 records 中
|
|
38
|
+
*/
|
|
39
|
+
appendFormRecord(params: IAppendFormRecordParams): IFormRecord;
|
|
40
|
+
removeFormRecord(formId: number | string, formRecordId: number): void;
|
|
41
|
+
clearFormData(formId?: number | string): void;
|
|
42
|
+
/**
|
|
43
|
+
* 登录后按当前 holderMap 批量刷新所有表单的 records。
|
|
44
|
+
* 遍历 holderMap,从 form.form 中读取 form_id、shop_id,结合 customer_id 重新拉取记录。
|
|
45
|
+
*/
|
|
46
|
+
refreshAllFormRecords(params?: IRefreshAllFormRecordsParams): Promise<HolderFormMap>;
|
|
47
|
+
storeChange(path?: string): void;
|
|
48
|
+
}
|