@manycore/budget-plugin-api 0.0.1-alpha.5 → 0.0.1-alpha.9
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/package.json
CHANGED
|
@@ -35,6 +35,11 @@ var ListingService = /*#__PURE__*/function (_ServService) {
|
|
|
35
35
|
return _createClass(ListingService, [{
|
|
36
36
|
key: "getDetail",
|
|
37
37
|
value:
|
|
38
|
+
/**
|
|
39
|
+
* 行选中事件 - 当用户选中或取消选中行时触发
|
|
40
|
+
* 替代原 IRowSelection.onSelect 回调函数
|
|
41
|
+
*/
|
|
42
|
+
|
|
38
43
|
/**
|
|
39
44
|
* 读清单数据
|
|
40
45
|
*/
|
|
@@ -81,15 +86,34 @@ var ListingService = /*#__PURE__*/function (_ServService) {
|
|
|
81
86
|
value: function updateProjectInfo(params) {
|
|
82
87
|
return API_UNSUPPORT();
|
|
83
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* 行选中配置
|
|
91
|
+
*/
|
|
92
|
+
}, {
|
|
93
|
+
key: "setRowSelection",
|
|
94
|
+
value: function setRowSelection(rowSelection) {
|
|
95
|
+
return API_UNSUPPORT();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* 显示订单详情
|
|
99
|
+
*/
|
|
100
|
+
}, {
|
|
101
|
+
key: "showOrderDetail",
|
|
102
|
+
value: function showOrderDetail(order, onClose) {
|
|
103
|
+
return API_UNSUPPORT();
|
|
104
|
+
}
|
|
84
105
|
}]);
|
|
85
106
|
}(ServService);
|
|
86
107
|
__decorate([anno.decl.event(), __metadata("design:type", Object)], ListingService.prototype, "syncDesignEvent", void 0);
|
|
108
|
+
__decorate([anno.decl.event(), __metadata("design:type", Object)], ListingService.prototype, "rowSelectEvent", void 0);
|
|
87
109
|
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "getDetail", null);
|
|
88
110
|
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "updateCells", null);
|
|
89
111
|
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "lock", null);
|
|
90
112
|
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Object)], ListingService.prototype, "unlock", null);
|
|
91
113
|
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Object)], ListingService.prototype, "getCurrentListingId", null);
|
|
92
114
|
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "updateProjectInfo", null);
|
|
115
|
+
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "setRowSelection", null);
|
|
116
|
+
__decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, Function]), __metadata("design:returntype", Object)], ListingService.prototype, "showOrderDetail", null);
|
|
93
117
|
ListingService = __decorate([anno.decl({
|
|
94
118
|
id: 'sapp.listing.service',
|
|
95
119
|
version: '1.0.0'
|
|
@@ -4,16 +4,49 @@ export declare enum ESystematic {
|
|
|
4
4
|
SYSTEMATIC = 0,
|
|
5
5
|
CUSTOM = 1
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface IProjectInfo {
|
|
8
|
+
/**
|
|
9
|
+
* 项目信息的唯一标识
|
|
10
|
+
*/
|
|
8
11
|
obsId: string;
|
|
12
|
+
/**
|
|
13
|
+
* 清单ID
|
|
14
|
+
*/
|
|
9
15
|
listingId: string;
|
|
16
|
+
/**
|
|
17
|
+
* 字段名
|
|
18
|
+
*/
|
|
10
19
|
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* 字段值
|
|
22
|
+
*/
|
|
11
23
|
value: string;
|
|
24
|
+
/**
|
|
25
|
+
* 列结构, json字符串
|
|
26
|
+
*/
|
|
12
27
|
struct?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 1-文本
|
|
30
|
+
* 2-日期
|
|
31
|
+
* 3-单选
|
|
32
|
+
*/
|
|
13
33
|
type: 1 | 2 | 3;
|
|
34
|
+
/**
|
|
35
|
+
* SYSTEMATIC-系统字段
|
|
36
|
+
* CUSTOM-自定义
|
|
37
|
+
*/
|
|
14
38
|
systemic: ESystematic;
|
|
39
|
+
/**
|
|
40
|
+
* 顺序
|
|
41
|
+
*/
|
|
15
42
|
order: number;
|
|
43
|
+
/**
|
|
44
|
+
* 创建时间
|
|
45
|
+
*/
|
|
16
46
|
created: number;
|
|
47
|
+
/**
|
|
48
|
+
* 最后修改时间
|
|
49
|
+
*/
|
|
17
50
|
lastmodified: number;
|
|
18
51
|
}
|
|
19
52
|
/**
|
|
@@ -166,7 +199,7 @@ export interface IListingMeta {
|
|
|
166
199
|
/**
|
|
167
200
|
* 清单项目信息列表
|
|
168
201
|
*/
|
|
169
|
-
projectInfos: Array<
|
|
202
|
+
projectInfos: Array<IProjectInfo>;
|
|
170
203
|
}
|
|
171
204
|
/**
|
|
172
205
|
* 清单详情
|
|
@@ -224,13 +257,92 @@ export interface IProjectInfoUpdateParams {
|
|
|
224
257
|
/**
|
|
225
258
|
* 清单项目信息列表
|
|
226
259
|
*/
|
|
227
|
-
projectInfos:
|
|
260
|
+
projectInfos: IProjectInfo[];
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* 表ID
|
|
264
|
+
*/
|
|
265
|
+
export declare type SheetId = string | number;
|
|
266
|
+
/**
|
|
267
|
+
* 行ID
|
|
268
|
+
*/
|
|
269
|
+
export declare type RowKey = string | number;
|
|
270
|
+
/**
|
|
271
|
+
* 表格行选中项,key为表id,value为选中行id数组
|
|
272
|
+
*/
|
|
273
|
+
export declare type SelectedRowKeys = Record<SheetId, RowKey[]>;
|
|
274
|
+
/**
|
|
275
|
+
* 行选中事件数据
|
|
276
|
+
*/
|
|
277
|
+
export interface IRowSelectionEventData<D = any> {
|
|
278
|
+
/**
|
|
279
|
+
* 表ID
|
|
280
|
+
*/
|
|
281
|
+
sheetId: SheetId;
|
|
282
|
+
/**
|
|
283
|
+
* 选中的行keys
|
|
284
|
+
*/
|
|
285
|
+
selectedKeys: RowKey[];
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* 行选中变化事件数据
|
|
289
|
+
*/
|
|
290
|
+
export interface IRowSelectionChangeEventData {
|
|
291
|
+
/**
|
|
292
|
+
* 所有表的选中状态
|
|
293
|
+
*/
|
|
294
|
+
selectedRowKeys: SelectedRowKeys;
|
|
295
|
+
}
|
|
296
|
+
export interface IRowSelection<D = any> {
|
|
297
|
+
/**
|
|
298
|
+
* 默认选中的行keys
|
|
299
|
+
*/
|
|
300
|
+
selectedRowKeys: SelectedRowKeys;
|
|
301
|
+
/**
|
|
302
|
+
* 禁用checkbox的行keys
|
|
303
|
+
*/
|
|
304
|
+
disabledRowKeys?: SelectedRowKeys;
|
|
305
|
+
}
|
|
306
|
+
export interface IOrder {
|
|
307
|
+
/**
|
|
308
|
+
* 订单obsId
|
|
309
|
+
*/
|
|
310
|
+
obsId: string;
|
|
311
|
+
/**
|
|
312
|
+
* 订单所属清单ID
|
|
313
|
+
*/
|
|
314
|
+
obsListingId: string;
|
|
315
|
+
/**
|
|
316
|
+
* 订单编号
|
|
317
|
+
*/
|
|
318
|
+
customOrderId: string;
|
|
319
|
+
/**
|
|
320
|
+
* 订单备注
|
|
321
|
+
*/
|
|
322
|
+
description: string;
|
|
323
|
+
/**
|
|
324
|
+
* 订单创建时间
|
|
325
|
+
*/
|
|
326
|
+
created: number;
|
|
327
|
+
/**
|
|
328
|
+
* 订单详情ID
|
|
329
|
+
*/
|
|
330
|
+
obsOrderDetailId: string;
|
|
331
|
+
/**
|
|
332
|
+
* 0-无效 1-有效 2-撤销
|
|
333
|
+
*/
|
|
334
|
+
status: 0 | 1 | 2;
|
|
228
335
|
}
|
|
229
336
|
/**
|
|
230
337
|
* 清单插件平台API,给插件提供读写清单数据的api
|
|
231
338
|
*/
|
|
232
339
|
export declare class ListingService extends ServService {
|
|
233
340
|
syncDesignEvent: ServEventer<void>;
|
|
341
|
+
/**
|
|
342
|
+
* 行选中事件 - 当用户选中或取消选中行时触发
|
|
343
|
+
* 替代原 IRowSelection.onSelect 回调函数
|
|
344
|
+
*/
|
|
345
|
+
rowSelectEvent: ServEventer<IRowSelectionEventData>;
|
|
234
346
|
/**
|
|
235
347
|
* 读清单数据
|
|
236
348
|
*/
|
|
@@ -255,4 +367,12 @@ export declare class ListingService extends ServService {
|
|
|
255
367
|
* 更新项目信息
|
|
256
368
|
*/
|
|
257
369
|
updateProjectInfo(params: IProjectInfoUpdateParams): ServAPIRetn<void>;
|
|
370
|
+
/**
|
|
371
|
+
* 行选中配置
|
|
372
|
+
*/
|
|
373
|
+
setRowSelection(rowSelection?: IRowSelection): ServAPIRetn<void>;
|
|
374
|
+
/**
|
|
375
|
+
* 显示订单详情
|
|
376
|
+
*/
|
|
377
|
+
showOrderDetail(order: IOrder, onClose?: () => void): ServAPIRetn<void>;
|
|
258
378
|
}
|