@pisell/pisellos 2.0.67 → 2.1.2

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.
Files changed (96) hide show
  1. package/dist/core/index.js +1 -2
  2. package/dist/effects/index.d.ts +3 -4
  3. package/dist/effects/index.js +6 -15
  4. package/dist/modules/AccountList/index.d.ts +1 -7
  5. package/dist/modules/AccountList/index.js +14 -81
  6. package/dist/modules/AccountList/types.d.ts +0 -28
  7. package/dist/modules/AccountList/types.js +0 -8
  8. package/dist/modules/Cart/utils/changePrice.d.ts +2 -2
  9. package/dist/modules/Cart/utils/changePrice.js +1 -1
  10. package/dist/modules/ProductList/index.d.ts +3 -14
  11. package/dist/modules/ProductList/index.js +33 -67
  12. package/dist/modules/ProductList/types.d.ts +0 -1
  13. package/dist/modules/Rules/index.js +14 -27
  14. package/dist/modules/Rules/types.d.ts +0 -1
  15. package/dist/modules/index.d.ts +0 -1
  16. package/dist/modules/index.js +0 -1
  17. package/dist/plugins/window.d.ts +0 -1
  18. package/dist/solution/BookingByStep/index.js +50 -34
  19. package/dist/solution/BookingByStep/types.d.ts +3 -2
  20. package/dist/solution/BookingByStep/utils/resources.js +12 -4
  21. package/dist/solution/BuyTickets/index.d.ts +2 -2
  22. package/dist/solution/BuyTickets/index.js +1 -1
  23. package/dist/solution/ShopDiscount/index.js +2 -4
  24. package/dist/solution/index.d.ts +0 -1
  25. package/dist/solution/index.js +0 -1
  26. package/dist/types/index.d.ts +1 -3
  27. package/lib/core/index.js +1 -1
  28. package/lib/effects/index.d.ts +3 -4
  29. package/lib/effects/index.js +1 -4
  30. package/lib/modules/AccountList/index.d.ts +1 -7
  31. package/lib/modules/AccountList/index.js +0 -27
  32. package/lib/modules/AccountList/types.d.ts +0 -28
  33. package/lib/modules/Cart/utils/changePrice.d.ts +2 -2
  34. package/lib/modules/Cart/utils/changePrice.js +1 -1
  35. package/lib/modules/ProductList/index.d.ts +3 -14
  36. package/lib/modules/ProductList/index.js +14 -54
  37. package/lib/modules/ProductList/types.d.ts +0 -1
  38. package/lib/modules/Rules/index.js +12 -20
  39. package/lib/modules/Rules/types.d.ts +0 -1
  40. package/lib/modules/index.d.ts +0 -1
  41. package/lib/modules/index.js +0 -2
  42. package/lib/plugins/window.d.ts +0 -1
  43. package/lib/solution/BookingByStep/index.js +39 -27
  44. package/lib/solution/BookingByStep/types.d.ts +3 -2
  45. package/lib/solution/BookingByStep/utils/resources.js +12 -4
  46. package/lib/solution/BuyTickets/index.d.ts +2 -2
  47. package/lib/solution/BuyTickets/index.js +1 -1
  48. package/lib/solution/ShopDiscount/index.js +1 -2
  49. package/lib/solution/index.d.ts +0 -1
  50. package/lib/solution/index.js +0 -2
  51. package/lib/types/index.d.ts +1 -3
  52. package/package.json +1 -1
  53. package/dist/modules/Customer/constants.d.ts +0 -7
  54. package/dist/modules/Customer/constants.js +0 -12
  55. package/dist/modules/Customer/index.d.ts +0 -122
  56. package/dist/modules/Customer/index.js +0 -697
  57. package/dist/modules/Customer/types.d.ts +0 -146
  58. package/dist/modules/Customer/types.js +0 -41
  59. package/dist/solution/BookingTicket/index.d.ts +0 -172
  60. package/dist/solution/BookingTicket/index.js +0 -665
  61. package/dist/solution/BookingTicket/types.d.ts +0 -68
  62. package/dist/solution/BookingTicket/types.js +0 -43
  63. package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  64. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +0 -159
  65. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -16
  66. package/dist/solution/BookingTicket/utils/scan/handleScan.js +0 -174
  67. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -81
  68. package/dist/solution/BookingTicket/utils/scan/index.js +0 -285
  69. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  70. package/dist/solution/BookingTicket/utils/scan/scanCache.js +0 -305
  71. package/dist/utils/task.d.ts +0 -40
  72. package/dist/utils/task.js +0 -171
  73. package/dist/utils/watch.d.ts +0 -102
  74. package/dist/utils/watch.js +0 -294
  75. package/lib/modules/Customer/constants.d.ts +0 -7
  76. package/lib/modules/Customer/constants.js +0 -39
  77. package/lib/modules/Customer/index.d.ts +0 -122
  78. package/lib/modules/Customer/index.js +0 -440
  79. package/lib/modules/Customer/types.d.ts +0 -146
  80. package/lib/modules/Customer/types.js +0 -37
  81. package/lib/solution/BookingTicket/index.d.ts +0 -172
  82. package/lib/solution/BookingTicket/index.js +0 -399
  83. package/lib/solution/BookingTicket/types.d.ts +0 -68
  84. package/lib/solution/BookingTicket/types.js +0 -72
  85. package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  86. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +0 -117
  87. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -16
  88. package/lib/solution/BookingTicket/utils/scan/handleScan.js +0 -125
  89. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -81
  90. package/lib/solution/BookingTicket/utils/scan/index.js +0 -210
  91. package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  92. package/lib/solution/BookingTicket/utils/scan/scanCache.js +0 -231
  93. package/lib/utils/task.d.ts +0 -40
  94. package/lib/utils/task.js +0 -109
  95. package/lib/utils/watch.d.ts +0 -102
  96. package/lib/utils/watch.js +0 -217
@@ -1,146 +0,0 @@
1
- import { ICustomer } from "../AccountList/types";
2
- export declare enum CustomerHooks {
3
- OnCustomerListUpdate = "customer:onUpdate",
4
- OnCustomerListError = "customer:onError",
5
- OnCustomerSelected = "customer:onSelected",
6
- OnPaginationChange = "customer:onPaginationChange",
7
- OnScrollLoadMore = "customer:onScrollLoadMore",
8
- OnScrollLoadComplete = "customer:onScrollLoadComplete"
9
- }
10
- /**
11
- * 客户数据
12
- */
13
- export interface ShopCustomer extends ICustomer {
14
- /** 客户ID */
15
- id: string | number;
16
- /** 客户姓名 */
17
- name: string;
18
- /** 客户电话 */
19
- phone?: string;
20
- /** 客户邮箱 */
21
- email?: string;
22
- /** 客户创建时间 */
23
- created_at?: string;
24
- /** 客户更新时间 */
25
- updated_at?: string;
26
- /** 其他客户信息 */
27
- [key: string]: any;
28
- }
29
- /**
30
- * 客户列表关联查询参数
31
- *
32
- * formRecord: 用户表单记录
33
- * walletDetails.wallet: 用户所有wallet
34
- * latestWalletDetail.wallet: 用户最新wallet
35
- */
36
- type CustomerWith = 'formRecord' | 'walletDetails.wallet' | 'latestWalletDetail.wallet';
37
- /**
38
- * 获取客户列表参数
39
- */
40
- export interface ShopGetCustomerListParams {
41
- /** 页码 */
42
- skip?: number;
43
- /** 每页数量 */
44
- num?: number;
45
- /** 搜索关键词 */
46
- search?: string;
47
- /** 关联查询参数 */
48
- with?: CustomerWith[];
49
- /** wallet搜索标识 */
50
- search_wallet_flag?: 0 | 1;
51
- /** wallet pass搜索标识 */
52
- search_wallet_pass_flag?: 0 | 1;
53
- /** 其他筛选参数 */
54
- [key: string]: any;
55
- }
56
- /**
57
- * 分页信息
58
- */
59
- export interface IPaginationInfo {
60
- /** 当前页码 */
61
- page: number;
62
- /** 每页数量 */
63
- pageSize: number;
64
- /** 总数 */
65
- total: number;
66
- /** 总页数 */
67
- totalPages: number;
68
- }
69
- /**
70
- * 客户列表响应
71
- */
72
- export interface ICustomerListResponse {
73
- /** 客户列表 */
74
- list: ShopCustomer[];
75
- /** 总数 */
76
- total: number;
77
- /** 当前页 */
78
- page?: number;
79
- /** 每页数量 */
80
- pageSize?: number;
81
- }
82
- /**
83
- * 客户列表状态
84
- */
85
- export interface CustomerState {
86
- /** 客户列表 */
87
- customerList: ShopCustomer[];
88
- /** 当前选择的客户 */
89
- selectedCustomer: ShopCustomer | null;
90
- /** 列表总数 */
91
- total: number;
92
- /** 当前页码 */
93
- currentPage: number;
94
- /** 每页数量 */
95
- pageSize: number;
96
- /** 加载状态 */
97
- loading: boolean;
98
- /** 错误信息 */
99
- error: string | null;
100
- /** 是否支持滚动加载更多 */
101
- hasMore: boolean;
102
- /** 滚动加载状态 */
103
- loadingMore: boolean;
104
- /** 当前搜索条件 */
105
- searchParams: Omit<ShopGetCustomerListParams, 'skip' | 'num'>;
106
- }
107
- /**
108
- * 客户模块 API
109
- */
110
- export interface CustomerModuleAPI {
111
- /** 获取客户列表 */
112
- getCustomerList: (params?: ShopGetCustomerListParams) => Promise<ICustomerListResponse>;
113
- /** 设置客户列表 */
114
- setCustomerList: (customers: ShopCustomer[], total?: number) => void;
115
- /** 设置当前选择的客户 */
116
- setSelectedCustomer: (customer: ShopCustomer | null) => void;
117
- /** 获取当前选择的客户 */
118
- getSelectedCustomer: () => ShopCustomer | null;
119
- /** 获取客户列表 */
120
- getCustomers: () => ShopCustomer[];
121
- /** 根据ID查找客户 */
122
- getCustomerById: (id: string | number) => ShopCustomer | null;
123
- /** 清空客户列表 */
124
- clearCustomers: () => void;
125
- /** 添加客户到列表第一位 */
126
- addCustomerToFirst: (customer: ShopCustomer) => void;
127
- /** 获取当前状态 */
128
- getState: () => CustomerState;
129
- /** 获取分页信息 */
130
- getPaginationInfo: () => IPaginationInfo;
131
- /** 触发分页变化事件 */
132
- triggerPaginationChange: (pagination: IPaginationInfo) => void;
133
- /** 设置分页信息 */
134
- setPaginationInfo: (page: number, pageSize: number) => void;
135
- /** 便捷方法:切换分页并自动获取数据 */
136
- changeCustomerPage: (page: number, pageSize?: number) => Promise<ICustomerListResponse>;
137
- /** 滚动加载更多客户数据 */
138
- loadMoreCustomers: () => Promise<ICustomerListResponse>;
139
- /** 重置并重新开始滚动加载 */
140
- resetAndLoadCustomers: (params?: ShopGetCustomerListParams) => Promise<ICustomerListResponse>;
141
- /** 检查是否还有更多数据可以加载 */
142
- hasMoreCustomers: () => boolean;
143
- /** 获取当前的搜索条件 */
144
- getCurrentSearchParams: () => Omit<ShopGetCustomerListParams, 'skip' | 'num'>;
145
- }
146
- export {};
@@ -1,41 +0,0 @@
1
- export var CustomerHooks = /*#__PURE__*/function (CustomerHooks) {
2
- CustomerHooks["OnCustomerListUpdate"] = "customer:onUpdate";
3
- CustomerHooks["OnCustomerListError"] = "customer:onError";
4
- CustomerHooks["OnCustomerSelected"] = "customer:onSelected";
5
- CustomerHooks["OnPaginationChange"] = "customer:onPaginationChange";
6
- CustomerHooks["OnScrollLoadMore"] = "customer:onScrollLoadMore";
7
- CustomerHooks["OnScrollLoadComplete"] = "customer:onScrollLoadComplete";
8
- return CustomerHooks;
9
- }({});
10
-
11
- /**
12
- * 客户数据
13
- */
14
-
15
- /**
16
- * 客户列表关联查询参数
17
- *
18
- * formRecord: 用户表单记录
19
- * walletDetails.wallet: 用户所有wallet
20
- * latestWalletDetail.wallet: 用户最新wallet
21
- */
22
-
23
- /**
24
- * 获取客户列表参数
25
- */
26
-
27
- /**
28
- * 分页信息
29
- */
30
-
31
- /**
32
- * 客户列表响应
33
- */
34
-
35
- /**
36
- * 客户列表状态
37
- */
38
-
39
- /**
40
- * 客户模块 API
41
- */
@@ -1,172 +0,0 @@
1
- import { Module, PisellCore } from '../../types';
2
- import { BaseModule } from '../../modules/BaseModule';
3
- import { RequestPlugin, WindowPlugin } from '../../plugins';
4
- import { IGetCustomerListParams, ICustomer, ILoadProductsParams, IScanResult } from './types';
5
- import { ProductData } from '../../modules';
6
- export declare class BookingTicketImpl extends BaseModule implements Module {
7
- protected defaultName: string;
8
- protected defaultVersion: string;
9
- isSolution: boolean;
10
- request: RequestPlugin;
11
- window: WindowPlugin;
12
- private shopStore;
13
- private store;
14
- private otherParams;
15
- private cacheId;
16
- private platform;
17
- private scan;
18
- initialize(core: PisellCore, options: any): Promise<void>;
19
- /**
20
- * 获取商品列表
21
- * @param params 包含 schedule_date 的参数
22
- * @returns 商品列表
23
- */
24
- loadProducts(params?: ILoadProductsParams): Promise<any>;
25
- /**
26
- * 获取商品列表(不加载到模块中)
27
- * @returns 商品列表
28
- */
29
- getProducts(): Promise<ProductData[]>;
30
- /**
31
- * 获取客户列表
32
- * @param params 查询参数
33
- * @returns 客户列表响应
34
- */
35
- getCustomerList(params?: IGetCustomerListParams): Promise<import("../../modules").ICustomerListResponse>;
36
- /**
37
- * 设置活跃客户
38
- * @param customer 客户信息
39
- */
40
- setActiveCustomer(customer: ICustomer): void;
41
- /**
42
- * 获取当前活跃客户
43
- * @returns 当前活跃客户
44
- */
45
- getActiveCustomer(): ICustomer | null;
46
- /**
47
- * 根据ID设置选中的客户
48
- * @param customerId 客户ID
49
- */
50
- setSelectedCustomerById(customerId: string | number): void;
51
- /**
52
- * 获取所有客户
53
- * @returns 客户列表
54
- */
55
- getCustomers(): ICustomer[];
56
- /**
57
- * 根据ID获取客户
58
- * @param customerId 客户ID
59
- * @returns 客户信息
60
- */
61
- getCustomerById(customerId: string | number): ICustomer | null;
62
- /**
63
- * 清空客户列表
64
- */
65
- clearCustomers(): void;
66
- /**
67
- * 添加客户到列表第一位
68
- * @param customer 要添加的客户信息
69
- */
70
- addCustomerToFirst(customer: ICustomer): void;
71
- /**
72
- * 获取客户分页信息
73
- * @returns 分页信息
74
- */
75
- getCustomerPaginationInfo(): import("../../modules").IPaginationInfo;
76
- /**
77
- * 获取客户列表总数
78
- * @returns 总数
79
- */
80
- getCustomerTotal(): number;
81
- /**
82
- * 设置客户分页信息
83
- * @param page 页码
84
- * @param pageSize 每页数量
85
- */
86
- setCustomerPaginationInfo(page: number, pageSize: number): void;
87
- /**
88
- * 便捷方法:切换客户分页并自动获取数据
89
- * @param page 页码
90
- * @param pageSize 每页数量(可选)
91
- * @returns 客户列表响应
92
- */
93
- changeCustomerPage(page: number, pageSize?: number): Promise<import("../../modules").ICustomerListResponse>;
94
- /**
95
- * 滚动加载更多客户数据 - 数据会追加到现有列表中
96
- * @returns 客户列表响应
97
- */
98
- loadMoreCustomers(): Promise<import("../../modules").ICustomerListResponse>;
99
- /**
100
- * 重置并重新开始滚动加载客户数据
101
- * @param params 查询参数
102
- * @returns 客户列表响应
103
- */
104
- resetAndLoadCustomers(params?: IGetCustomerListParams): Promise<import("../../modules").ICustomerListResponse>;
105
- /**
106
- * 检查是否还有更多客户数据可以加载
107
- * @returns 是否还有更多数据
108
- */
109
- hasMoreCustomers(): boolean;
110
- /**
111
- * 获取当前的客户搜索条件
112
- * @returns 当前搜索条件
113
- */
114
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
115
- /**
116
- * 获取客户列表状态(包含滚动加载相关状态)
117
- * @returns 客户状态
118
- */
119
- getCustomerState(): import("../../modules").CustomerState;
120
- /**
121
- * 全局扫描监听
122
- * @param callback 回调
123
- */
124
- scanGlobalListener(callback: (data: IScanResult) => void): {
125
- remove: () => void;
126
- };
127
- /**
128
- * 客户扫描监听
129
- * @param callback 回调
130
- */
131
- scanCustomerListener(callback: (data: IScanResult) => void): {
132
- remove: () => void;
133
- };
134
- /**
135
- * 调用摄像头
136
- * @param data 用户自定义数据
137
- */
138
- activateCamera(data?: {
139
- [key: string]: any;
140
- }): void;
141
- /**
142
- * 禁用所有扫描监听
143
- */
144
- disableAllScanListeners(): void;
145
- /**
146
- * 启用所有扫描监听
147
- */
148
- enableAllScanListeners(): void;
149
- /**
150
- * 清空所有扫描监听对应的任务执行队列
151
- */
152
- clearAllScanListenersTaskQueue(): void;
153
- /**
154
- * 设置其他参数
155
- * @param params 参数
156
- * @param options 选项
157
- */
158
- setOtherParams(params: Record<string, any>, { cover }?: {
159
- cover?: boolean;
160
- }): Promise<void>;
161
- /**
162
- * 获取其他参数
163
- * @returns 其他参数
164
- */
165
- getOtherParams(): Promise<Record<string, any>>;
166
- /**
167
- * 销毁模块
168
- */
169
- destroy(): void;
170
- }
171
- export * from './types';
172
- export { BookingTicketImpl as BookingTicket };