@kengic/uni 0.7.13-beta.3 → 0.7.13-beta.4

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.
@@ -1,45 +1,45 @@
1
- // noinspection ES6UnusedImports
2
-
3
- import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
4
- import * as DEF from '../../../def';
5
- import { keys } from '../../models';
6
-
7
- /** 请求参数. */
8
- export class ListVOQuery {
9
- /** 排序字段. */
10
- public column?: string | null;
11
- /** 排序方式. */
12
- public order?: 'asc' | 'desc' | null;
13
- /** 当前页数. */
14
- public pageNo?: number | null;
15
- /** 每页条数. */
16
- public pageSize?: number | null;
17
-
18
- public constructor(obj?: ListVOQuery) {
19
- keys(obj ?? {}).forEach((key: PropertyKey) => {
20
- switch (key) {
21
- case 'column':
22
- case 'order':
23
- case 'pageNo':
24
- case 'pageSize':
25
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
26
- break;
27
- default:
28
- break;
29
- }
30
- });
31
- }
32
- }
33
-
34
- /**
35
- * 仓库-分页列表查询.
36
- *
37
- * @param config 请求配置.
38
- * @param option 请求选项.
39
- */
40
- export function ListVO(config?: IRequestConfig<ListVOQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WarehouseDTO>> {
41
- return httpClient().request({ method: ListVO.method, url: ListVO.url, ...(config ?? {}) }, option);
42
- }
43
-
44
- ListVO.method = 'GET' as const;
45
- ListVO.url = '/wh/wh/listVO';
1
+ // noinspection ES6UnusedImports
2
+
3
+ import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
4
+ import * as DEF from '../../../def';
5
+ import { keys } from '../../models';
6
+
7
+ /** 请求参数. */
8
+ export class ListVOQuery {
9
+ /** 排序字段. */
10
+ public column?: string | null;
11
+ /** 排序方式. */
12
+ public order?: 'asc' | 'desc' | null;
13
+ /** 当前页数. */
14
+ public pageNo?: number | null;
15
+ /** 每页条数. */
16
+ public pageSize?: number | null;
17
+
18
+ public constructor(obj?: ListVOQuery) {
19
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
20
+ switch (key) {
21
+ case 'column':
22
+ case 'order':
23
+ case 'pageNo':
24
+ case 'pageSize':
25
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
26
+ break;
27
+ default:
28
+ break;
29
+ }
30
+ });
31
+ }
32
+ }
33
+
34
+ /**
35
+ * 仓库-分页列表查询.
36
+ *
37
+ * @param config 请求配置.
38
+ * @param option 请求选项.
39
+ */
40
+ export function ListVO(config?: IRequestConfig<ListVOQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WarehouseDTO>> {
41
+ return httpClient().request({ method: ListVO.method, url: ListVO.url, ...(config ?? {}) }, option);
42
+ }
43
+
44
+ ListVO.method = 'GET' as const;
45
+ ListVO.url = '/wh/wh/listVO';
@@ -1 +1 @@
1
- export { ListVO, ListVOQuery } from './ListVO';
1
+ export { ListVO, ListVOQuery } from './ListVO';
@@ -1,4 +1,4 @@
1
- export * as CommonController from './CommonController';
2
- export * as LoginController from './LoginController';
3
- export * as WarehouseController from './WarehouseController';
4
- export * as WorkstationController from './WorkstationController';
1
+ export * as CommonController from './CommonController';
2
+ export * as LoginController from './LoginController';
3
+ export * as WarehouseController from './WarehouseController';
4
+ export * as WorkstationController from './WorkstationController';
package/api/WMS/models.ts CHANGED
@@ -1,351 +1,351 @@
1
- export class IPage<T0> {
2
- /** Current. */
3
- public current?: number | null;
4
- /** Pages. */
5
- public pages?: number | null;
6
- /** Records. */
7
- public records?: Array<T0> | null;
8
- /** Size. */
9
- public size?: number | null;
10
- /** Total. */
11
- public total?: number | null;
12
-
13
- public constructor(obj?: IPage<T0>) {
14
- keys(obj ?? {}).forEach((key: PropertyKey) => {
15
- switch (key) {
16
- case 'current':
17
- case 'pages':
18
- case 'records':
19
- case 'size':
20
- case 'total':
21
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
22
- break;
23
- default:
24
- break;
25
- }
26
- });
27
- }
28
- }
29
-
30
- /** 用户. */
31
- export class SysUser {
32
- /** Activiti Sync. */
33
- public activitiSync?: number | null;
34
- /** 头像. */
35
- public avatar?: string | null;
36
- /** Birthday. */
37
- public birthday?: string | null;
38
- /** Client Id. */
39
- public clientId?: string | null;
40
- /** Create By. */
41
- public createBy?: string | null;
42
- /** Create Time. */
43
- public createTime?: string | null;
44
- /** Del Flag. */
45
- public delFlag?: number | null;
46
- /** Depart Ids. */
47
- public departIds?: string | null;
48
- /** 邮件. */
49
- public email?: string | null;
50
- /** Home Path. */
51
- public homePath?: string | null;
52
- /** Id. */
53
- public id?: string | null;
54
- /** Org Code. */
55
- public orgCode?: string | null;
56
- /** Org Code Txt. */
57
- public orgCodeTxt?: string | null;
58
- /** Password. */
59
- public password?: string | null;
60
- /** 电话. */
61
- public phone?: string | null;
62
- /** Post. */
63
- public post?: string | null;
64
- /** 姓名. */
65
- public realname?: string | null;
66
- /** Rel Tenant Ids. */
67
- public relTenantIds?: string | null;
68
- /** Salt. */
69
- public salt?: string | null;
70
- /** Sex. */
71
- public sex?: number | null;
72
- /** 状态. */
73
- public status?: number | null;
74
- /** Telephone. */
75
- public telephone?: string | null;
76
- /** Update By. */
77
- public updateBy?: string | null;
78
- /** Update Time. */
79
- public updateTime?: string | null;
80
- /** User Identity. */
81
- public userIdentity?: number | null;
82
- /** 账号. */
83
- public username?: string | null;
84
- /** 工号. */
85
- public workNo?: string | null;
86
-
87
- public constructor(obj?: SysUser) {
88
- keys(obj ?? {}).forEach((key: PropertyKey) => {
89
- switch (key) {
90
- case 'activitiSync':
91
- case 'avatar':
92
- case 'birthday':
93
- case 'clientId':
94
- case 'createBy':
95
- case 'createTime':
96
- case 'delFlag':
97
- case 'departIds':
98
- case 'email':
99
- case 'homePath':
100
- case 'id':
101
- case 'orgCode':
102
- case 'orgCodeTxt':
103
- case 'password':
104
- case 'phone':
105
- case 'post':
106
- case 'realname':
107
- case 'relTenantIds':
108
- case 'salt':
109
- case 'sex':
110
- case 'status':
111
- case 'telephone':
112
- case 'updateBy':
113
- case 'updateTime':
114
- case 'userIdentity':
115
- case 'username':
116
- case 'workNo':
117
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
118
- break;
119
- default:
120
- break;
121
- }
122
- });
123
- }
124
- }
125
-
126
- /** 用户仓库. */
127
- export class SysUserWarehouseDTO {
128
- /** 是否是默认的仓库. */
129
- public default_flag?: number | null;
130
- /** 主键. */
131
- public id?: string | null;
132
- /** 创建日期. */
133
- public ins_dt?: string | null;
134
- /** 创建用户. */
135
- public ins_usr_id?: string | null;
136
- /** 更新用户. */
137
- public mod_usr_id?: string | null;
138
- /** 更新日期. */
139
- public moddte?: string | null;
140
- /** 用户ID. */
141
- public user_id?: string | null;
142
- /** 仓库描述. */
143
- public wh_dsc?: string | null;
144
- /** 仓库编号. */
145
- public wh_id?: string | null;
146
-
147
- public constructor(obj?: SysUserWarehouseDTO) {
148
- keys(obj ?? {}).forEach((key: PropertyKey) => {
149
- switch (key) {
150
- case 'default_flag':
151
- case 'id':
152
- case 'ins_dt':
153
- case 'ins_usr_id':
154
- case 'mod_usr_id':
155
- case 'moddte':
156
- case 'user_id':
157
- case 'wh_dsc':
158
- case 'wh_id':
159
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
160
- break;
161
- default:
162
- break;
163
- }
164
- });
165
- }
166
- }
167
-
168
- /** 仓库数据传输对象. */
169
- export class WarehouseDTO {
170
- /** 是否可用. */
171
- public activeFlg?: number | null;
172
- /** 地址编号. */
173
- public adrId?: string | null;
174
- /** 地址名. */
175
- public adrnam?: string | null;
176
- /** 默认仓库. */
177
- public defWhFlg?: number | null;
178
- /** 主键. */
179
- public id?: string | null;
180
- /** 创建日期. */
181
- public insDt?: string | null;
182
- /** 创建人. */
183
- public insUsrId?: string | null;
184
- /** 修改用户编号. */
185
- public modUsrId?: string | null;
186
- /** 更新日期. */
187
- public moddte?: string | null;
188
- /** 所属地/国编号. */
189
- public orgcod?: string | null;
190
- /** 永久调整托盘. */
191
- public permAdjLod?: string | null;
192
- /** 永久调整箱. */
193
- public permAdjSub?: string | null;
194
- /** 永久创建托盘. */
195
- public permCreLod?: string | null;
196
- /** 永久创建箱. */
197
- public permCreSub?: string | null;
198
- /** 版本. */
199
- public version?: number | null;
200
- /** 仓库名称. */
201
- public whDsc?: string | null;
202
- /** 仓库编号(WarehouseId). */
203
- public whId?: string | null;
204
-
205
- public constructor(obj?: WarehouseDTO) {
206
- keys(obj ?? {}).forEach((key: PropertyKey) => {
207
- switch (key) {
208
- case 'activeFlg':
209
- case 'adrId':
210
- case 'adrnam':
211
- case 'defWhFlg':
212
- case 'id':
213
- case 'insDt':
214
- case 'insUsrId':
215
- case 'modUsrId':
216
- case 'moddte':
217
- case 'orgcod':
218
- case 'permAdjLod':
219
- case 'permAdjSub':
220
- case 'permCreLod':
221
- case 'permCreSub':
222
- case 'version':
223
- case 'whDsc':
224
- case 'whId':
225
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
226
- break;
227
- default:
228
- break;
229
- }
230
- });
231
- }
232
- }
233
-
234
- /** 工作站区域数据传输对象. */
235
- export class WorkstationAreaDTO {
236
- /** 主键. */
237
- public id?: string | null;
238
- /** 创建日期. */
239
- public insDt?: string | null;
240
- /** 创建用户. */
241
- public insUsrId?: string | null;
242
- /** 修改日期. */
243
- public modUsrId?: string | null;
244
- /** 修改用户. */
245
- public moddte?: string | null;
246
- /** 仓库. */
247
- public whId?: string | null;
248
- /** 工作区. */
249
- public wrkare?: string | null;
250
- /** 工作区描述. */
251
- public wrkareDsc?: string | null;
252
-
253
- public constructor(obj?: WorkstationAreaDTO) {
254
- keys(obj ?? {}).forEach((key: PropertyKey) => {
255
- switch (key) {
256
- case 'id':
257
- case 'insDt':
258
- case 'insUsrId':
259
- case 'modUsrId':
260
- case 'moddte':
261
- case 'whId':
262
- case 'wrkare':
263
- case 'wrkareDsc':
264
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
265
- break;
266
- default:
267
- break;
268
- }
269
- });
270
- }
271
- }
272
-
273
- /** 工作站数据传输对象. */
274
- export class WorkstationDTO {
275
- /** 工作站. */
276
- public devcod?: string | null;
277
- /** 工作站描述. */
278
- public devcodDsc?: string | null;
279
- /** 主工作区. */
280
- public hmewrkare?: string | null;
281
- /** 主工作区描述. */
282
- public hmewrkareDsc?: string | null;
283
- /** 主键. */
284
- public id?: string | null;
285
- /** 创建日期. */
286
- public insDt?: string | null;
287
- /** 创建用户. */
288
- public insUsrId?: string | null;
289
- /** 标签打印机(Label Printer Address). */
290
- public lblPrtadr?: string | null;
291
- /** 标签打印机名称. */
292
- public lblPrtadrDsc?: string | null;
293
- /** 便携标签打印机(Mobile Printer Address). */
294
- public mobPrtadr?: string | null;
295
- /** 便携标签打印机名称. */
296
- public mobPrtadrDsc?: string | null;
297
- /** 修改日期. */
298
- public modUsrId?: string | null;
299
- /** 修改用户. */
300
- public moddte?: string | null;
301
- /** 纸张打印机(Paper Printer Address). */
302
- public papPrtadr?: string | null;
303
- /** 纸张打印机名称. */
304
- public papPrtadrDsc?: string | null;
305
- /** 仓库. */
306
- public whId?: string | null;
307
- /** 工作站与工作区域关系. */
308
- public workstationAndAreaRelationshipDTOList?: Array<WorkstationAreaDTO> | null;
309
-
310
- public constructor(obj?: WorkstationDTO) {
311
- keys(obj ?? {}).forEach((key: PropertyKey) => {
312
- switch (key) {
313
- case 'devcod':
314
- case 'devcodDsc':
315
- case 'hmewrkare':
316
- case 'hmewrkareDsc':
317
- case 'id':
318
- case 'insDt':
319
- case 'insUsrId':
320
- case 'lblPrtadr':
321
- case 'lblPrtadrDsc':
322
- case 'mobPrtadr':
323
- case 'mobPrtadrDsc':
324
- case 'modUsrId':
325
- case 'moddte':
326
- case 'papPrtadr':
327
- case 'papPrtadrDsc':
328
- case 'whId':
329
- case 'workstationAndAreaRelationshipDTOList':
330
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
331
- break;
332
- default:
333
- break;
334
- }
335
- });
336
- }
337
- }
338
-
339
- /**
340
- * 获取对象的属性名数组.
341
- * @param obj 对象.
342
- */
343
- export function keys<C extends object>(obj: C): Array<keyof C> {
344
- const type = typeof obj;
345
-
346
- if (!(obj != null && (type === 'object' || type === 'function'))) {
347
- return [];
348
- }
349
-
350
- return Reflect.ownKeys(obj) as Array<keyof C>;
351
- }
1
+ export class IPage<T0> {
2
+ /** Current. */
3
+ public current?: number | null;
4
+ /** Pages. */
5
+ public pages?: number | null;
6
+ /** Records. */
7
+ public records?: Array<T0> | null;
8
+ /** Size. */
9
+ public size?: number | null;
10
+ /** Total. */
11
+ public total?: number | null;
12
+
13
+ public constructor(obj?: IPage<T0>) {
14
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
15
+ switch (key) {
16
+ case 'current':
17
+ case 'pages':
18
+ case 'records':
19
+ case 'size':
20
+ case 'total':
21
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
22
+ break;
23
+ default:
24
+ break;
25
+ }
26
+ });
27
+ }
28
+ }
29
+
30
+ /** 用户. */
31
+ export class SysUser {
32
+ /** Activiti Sync. */
33
+ public activitiSync?: number | null;
34
+ /** 头像. */
35
+ public avatar?: string | null;
36
+ /** Birthday. */
37
+ public birthday?: string | null;
38
+ /** Client Id. */
39
+ public clientId?: string | null;
40
+ /** Create By. */
41
+ public createBy?: string | null;
42
+ /** Create Time. */
43
+ public createTime?: string | null;
44
+ /** Del Flag. */
45
+ public delFlag?: number | null;
46
+ /** Depart Ids. */
47
+ public departIds?: string | null;
48
+ /** 邮件. */
49
+ public email?: string | null;
50
+ /** Home Path. */
51
+ public homePath?: string | null;
52
+ /** Id. */
53
+ public id?: string | null;
54
+ /** Org Code. */
55
+ public orgCode?: string | null;
56
+ /** Org Code Txt. */
57
+ public orgCodeTxt?: string | null;
58
+ /** Password. */
59
+ public password?: string | null;
60
+ /** 电话. */
61
+ public phone?: string | null;
62
+ /** Post. */
63
+ public post?: string | null;
64
+ /** 姓名. */
65
+ public realname?: string | null;
66
+ /** Rel Tenant Ids. */
67
+ public relTenantIds?: string | null;
68
+ /** Salt. */
69
+ public salt?: string | null;
70
+ /** Sex. */
71
+ public sex?: number | null;
72
+ /** 状态. */
73
+ public status?: number | null;
74
+ /** Telephone. */
75
+ public telephone?: string | null;
76
+ /** Update By. */
77
+ public updateBy?: string | null;
78
+ /** Update Time. */
79
+ public updateTime?: string | null;
80
+ /** User Identity. */
81
+ public userIdentity?: number | null;
82
+ /** 账号. */
83
+ public username?: string | null;
84
+ /** 工号. */
85
+ public workNo?: string | null;
86
+
87
+ public constructor(obj?: SysUser) {
88
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
89
+ switch (key) {
90
+ case 'activitiSync':
91
+ case 'avatar':
92
+ case 'birthday':
93
+ case 'clientId':
94
+ case 'createBy':
95
+ case 'createTime':
96
+ case 'delFlag':
97
+ case 'departIds':
98
+ case 'email':
99
+ case 'homePath':
100
+ case 'id':
101
+ case 'orgCode':
102
+ case 'orgCodeTxt':
103
+ case 'password':
104
+ case 'phone':
105
+ case 'post':
106
+ case 'realname':
107
+ case 'relTenantIds':
108
+ case 'salt':
109
+ case 'sex':
110
+ case 'status':
111
+ case 'telephone':
112
+ case 'updateBy':
113
+ case 'updateTime':
114
+ case 'userIdentity':
115
+ case 'username':
116
+ case 'workNo':
117
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
118
+ break;
119
+ default:
120
+ break;
121
+ }
122
+ });
123
+ }
124
+ }
125
+
126
+ /** 用户仓库. */
127
+ export class SysUserWarehouseDTO {
128
+ /** 是否是默认的仓库. */
129
+ public default_flag?: number | null;
130
+ /** 主键. */
131
+ public id?: string | null;
132
+ /** 创建日期. */
133
+ public ins_dt?: string | null;
134
+ /** 创建用户. */
135
+ public ins_usr_id?: string | null;
136
+ /** 更新用户. */
137
+ public mod_usr_id?: string | null;
138
+ /** 更新日期. */
139
+ public moddte?: string | null;
140
+ /** 用户ID. */
141
+ public user_id?: string | null;
142
+ /** 仓库描述. */
143
+ public wh_dsc?: string | null;
144
+ /** 仓库编号. */
145
+ public wh_id?: string | null;
146
+
147
+ public constructor(obj?: SysUserWarehouseDTO) {
148
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
149
+ switch (key) {
150
+ case 'default_flag':
151
+ case 'id':
152
+ case 'ins_dt':
153
+ case 'ins_usr_id':
154
+ case 'mod_usr_id':
155
+ case 'moddte':
156
+ case 'user_id':
157
+ case 'wh_dsc':
158
+ case 'wh_id':
159
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
160
+ break;
161
+ default:
162
+ break;
163
+ }
164
+ });
165
+ }
166
+ }
167
+
168
+ /** 仓库数据传输对象. */
169
+ export class WarehouseDTO {
170
+ /** 是否可用. */
171
+ public activeFlg?: number | null;
172
+ /** 地址编号. */
173
+ public adrId?: string | null;
174
+ /** 地址名. */
175
+ public adrnam?: string | null;
176
+ /** 默认仓库. */
177
+ public defWhFlg?: number | null;
178
+ /** 主键. */
179
+ public id?: string | null;
180
+ /** 创建日期. */
181
+ public insDt?: string | null;
182
+ /** 创建人. */
183
+ public insUsrId?: string | null;
184
+ /** 修改用户编号. */
185
+ public modUsrId?: string | null;
186
+ /** 更新日期. */
187
+ public moddte?: string | null;
188
+ /** 所属地/国编号. */
189
+ public orgcod?: string | null;
190
+ /** 永久调整托盘. */
191
+ public permAdjLod?: string | null;
192
+ /** 永久调整箱. */
193
+ public permAdjSub?: string | null;
194
+ /** 永久创建托盘. */
195
+ public permCreLod?: string | null;
196
+ /** 永久创建箱. */
197
+ public permCreSub?: string | null;
198
+ /** 版本. */
199
+ public version?: number | null;
200
+ /** 仓库名称. */
201
+ public whDsc?: string | null;
202
+ /** 仓库编号(WarehouseId). */
203
+ public whId?: string | null;
204
+
205
+ public constructor(obj?: WarehouseDTO) {
206
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
207
+ switch (key) {
208
+ case 'activeFlg':
209
+ case 'adrId':
210
+ case 'adrnam':
211
+ case 'defWhFlg':
212
+ case 'id':
213
+ case 'insDt':
214
+ case 'insUsrId':
215
+ case 'modUsrId':
216
+ case 'moddte':
217
+ case 'orgcod':
218
+ case 'permAdjLod':
219
+ case 'permAdjSub':
220
+ case 'permCreLod':
221
+ case 'permCreSub':
222
+ case 'version':
223
+ case 'whDsc':
224
+ case 'whId':
225
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
226
+ break;
227
+ default:
228
+ break;
229
+ }
230
+ });
231
+ }
232
+ }
233
+
234
+ /** 工作站区域数据传输对象. */
235
+ export class WorkstationAreaDTO {
236
+ /** 主键. */
237
+ public id?: string | null;
238
+ /** 创建日期. */
239
+ public insDt?: string | null;
240
+ /** 创建用户. */
241
+ public insUsrId?: string | null;
242
+ /** 修改日期. */
243
+ public modUsrId?: string | null;
244
+ /** 修改用户. */
245
+ public moddte?: string | null;
246
+ /** 仓库. */
247
+ public whId?: string | null;
248
+ /** 工作区. */
249
+ public wrkare?: string | null;
250
+ /** 工作区描述. */
251
+ public wrkareDsc?: string | null;
252
+
253
+ public constructor(obj?: WorkstationAreaDTO) {
254
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
255
+ switch (key) {
256
+ case 'id':
257
+ case 'insDt':
258
+ case 'insUsrId':
259
+ case 'modUsrId':
260
+ case 'moddte':
261
+ case 'whId':
262
+ case 'wrkare':
263
+ case 'wrkareDsc':
264
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
265
+ break;
266
+ default:
267
+ break;
268
+ }
269
+ });
270
+ }
271
+ }
272
+
273
+ /** 工作站数据传输对象. */
274
+ export class WorkstationDTO {
275
+ /** 工作站. */
276
+ public devcod?: string | null;
277
+ /** 工作站描述. */
278
+ public devcodDsc?: string | null;
279
+ /** 主工作区. */
280
+ public hmewrkare?: string | null;
281
+ /** 主工作区描述. */
282
+ public hmewrkareDsc?: string | null;
283
+ /** 主键. */
284
+ public id?: string | null;
285
+ /** 创建日期. */
286
+ public insDt?: string | null;
287
+ /** 创建用户. */
288
+ public insUsrId?: string | null;
289
+ /** 标签打印机(Label Printer Address). */
290
+ public lblPrtadr?: string | null;
291
+ /** 标签打印机名称. */
292
+ public lblPrtadrDsc?: string | null;
293
+ /** 便携标签打印机(Mobile Printer Address). */
294
+ public mobPrtadr?: string | null;
295
+ /** 便携标签打印机名称. */
296
+ public mobPrtadrDsc?: string | null;
297
+ /** 修改日期. */
298
+ public modUsrId?: string | null;
299
+ /** 修改用户. */
300
+ public moddte?: string | null;
301
+ /** 纸张打印机(Paper Printer Address). */
302
+ public papPrtadr?: string | null;
303
+ /** 纸张打印机名称. */
304
+ public papPrtadrDsc?: string | null;
305
+ /** 仓库. */
306
+ public whId?: string | null;
307
+ /** 工作站与工作区域关系. */
308
+ public workstationAndAreaRelationshipDTOList?: Array<WorkstationAreaDTO> | null;
309
+
310
+ public constructor(obj?: WorkstationDTO) {
311
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
312
+ switch (key) {
313
+ case 'devcod':
314
+ case 'devcodDsc':
315
+ case 'hmewrkare':
316
+ case 'hmewrkareDsc':
317
+ case 'id':
318
+ case 'insDt':
319
+ case 'insUsrId':
320
+ case 'lblPrtadr':
321
+ case 'lblPrtadrDsc':
322
+ case 'mobPrtadr':
323
+ case 'mobPrtadrDsc':
324
+ case 'modUsrId':
325
+ case 'moddte':
326
+ case 'papPrtadr':
327
+ case 'papPrtadrDsc':
328
+ case 'whId':
329
+ case 'workstationAndAreaRelationshipDTOList':
330
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
331
+ break;
332
+ default:
333
+ break;
334
+ }
335
+ });
336
+ }
337
+ }
338
+
339
+ /**
340
+ * 获取对象的属性名数组.
341
+ * @param obj 对象.
342
+ */
343
+ export function keys<C extends object>(obj: C): Array<keyof C> {
344
+ const type = typeof obj;
345
+
346
+ if (!(obj != null && (type === 'object' || type === 'function'))) {
347
+ return [];
348
+ }
349
+
350
+ return Reflect.ownKeys(obj) as Array<keyof C>;
351
+ }
@@ -16,7 +16,7 @@
16
16
  <script lang="ts" name="KgNavBar" setup>
17
17
  import { computed, ref } from 'vue';
18
18
  import { UniIcons, UniNavBar } from '../../uni-ui';
19
- import { Kg } from '../../util';
19
+ import { KgUtil } from '../../util';
20
20
  import { KgUpdatePopup } from '../KgUpdatePopup';
21
21
 
22
22
  /**
@@ -25,9 +25,9 @@
25
25
 
26
26
  //region DATA
27
27
  // ----------------------------------------------------------------------------------------------------
28
- const isCustomNavigationBar = ref(Kg.getCurrentPage()?.$vm?.$page?.meta?.navigationBar?.style === 'custom');
28
+ const isCustomNavigationBar = ref(KgUtil.getCurrentPage()?.$vm?.$page?.meta?.navigationBar?.style === 'custom');
29
29
  /** 标题. */
30
- const title = computed(() => Kg.getCurrentPage()?.$vm?.$page?.meta?.navigationBar?.titleText ?? '');
30
+ const title = computed(() => KgUtil.getCurrentPage()?.$vm?.$page?.meta?.navigationBar?.titleText ?? '');
31
31
  //endregion
32
32
 
33
33
  //region FUNCTION
@@ -15,7 +15,7 @@
15
15
  <script lang="ts" name="KgTabBar" setup>
16
16
  import { onMounted, ref } from 'vue';
17
17
  import { UniIcons } from '../../uni-ui';
18
- import { Kg } from '../../util';
18
+ import { KgUtil } from '../../util';
19
19
  import { v4 as uuid } from 'uuid';
20
20
 
21
21
  /**
@@ -32,11 +32,11 @@
32
32
  /* #endif */
33
33
 
34
34
  /* #ifdef APP-PLUS */
35
- Kg.eval(`document.querySelector('#${id}').previousElementSibling.classList.add('kg-tab-bar-sibling');`);
35
+ KgUtil.eval(`document.querySelector('#${id}').previousElementSibling.classList.add('kg-tab-bar-sibling');`);
36
36
  /* #endif */
37
37
  });
38
38
 
39
- const page = Kg.getCurrentPage();
39
+ const page = KgUtil.getCurrentPage();
40
40
 
41
41
  function goto(path: string) {
42
42
  if (path != 'pages/my/My') {
@@ -22,7 +22,7 @@
22
22
  import { computed, onMounted, onUnmounted, PropType, ref } from 'vue';
23
23
  import { UniPopup, UniPopupDialog } from '../../uni-ui';
24
24
  import { useAppStore } from '../../store/app.store';
25
- import { Kg } from '../../util';
25
+ import { KgUtil } from '../../util';
26
26
 
27
27
  /**
28
28
  * 版本升级弹窗.
@@ -135,7 +135,7 @@
135
135
  //endregion
136
136
 
137
137
  onMounted(() => {
138
- Kg.checkForUpdate(false, false);
138
+ KgUtil.checkForUpdate(false, false);
139
139
 
140
140
  unsubscribe.value = appStore.$onAction(async ({ name, args }) => {
141
141
  switch (name) {
@@ -13,7 +13,7 @@
13
13
  import { SysUserWarehouseDTO, WarehouseDTO } from '../../api/WMS/models';
14
14
  import { useKgWarehouse } from './index.hooks';
15
15
  import { useAppStore } from '../../store/app.store';
16
- import { Kg } from '../../util';
16
+ import { KgUtil } from '../../util';
17
17
 
18
18
  const emit = defineEmits(['ok']);
19
19
 
@@ -49,7 +49,7 @@
49
49
  const { records } = await API.WMS.WarehouseController.ListVO({ params: { pageNo: 1, pageSize: 999 } });
50
50
  warehouses.value = (records ?? []).filter((i) => {
51
51
  // 管理员拥有所有仓库
52
- if (Kg.isAdminUser()) {
52
+ if (KgUtil.isAdminUser()) {
53
53
  return true;
54
54
  }
55
55
 
@@ -0,0 +1,11 @@
1
+ type IKgConfigParameter = {};
2
+
3
+ /**
4
+ * 初始化组件库.
5
+ *
6
+ * @param param 参数.
7
+ */
8
+ export function kgConfig(param: IKgConfigParameter): void {}
9
+
10
+ /** @deprecated 已废弃, 请使用 {@link kgConfig()} */
11
+ export const setup = kgConfig;
package/config/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './setup';
1
+ export * from './config';
2
2
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/uni",
3
- "version": "0.7.13-beta.3",
3
+ "version": "0.7.13-beta.4",
4
4
  "scripts": {
5
5
  "postinstall": "node bin/postinstall.mjs"
6
6
  },
@@ -1,5 +1,5 @@
1
1
  import { useAppStore } from '../store/app.store';
2
- import { Kg } from '../util';
2
+ import { KgUtil } from '../util';
3
3
  import { KG_DYNAMIC_QUERY_OPERATOR, KG_HTTP_HEADERS } from '../const';
4
4
  import { useKgWarehouse } from '../component/KgWarehouse/index.hooks';
5
5
  import { useKgStation } from '../component/KgStation';
@@ -36,7 +36,7 @@ uni.addInterceptor('request', {
36
36
  args.data = keys.map((i) => args.data[i]);
37
37
  }
38
38
 
39
- args.data = Kg.parseParams(null, args.data);
39
+ args.data = KgUtil.parseParams(null, args.data);
40
40
  },
41
41
  success(args) {
42
42
  uni.hideLoading();
@@ -121,12 +121,7 @@ interface IRequestConfig<T1 = {}, T2 = {}> {
121
121
  * @param reject
122
122
  * @param options
123
123
  */
124
- function handleSuccess<T = any>(
125
- response: UniApp.RequestSuccessCallbackResult & UniApp.GeneralCallbackResult,
126
- resolve: (value: T | PromiseLike<T>) => void,
127
- reject: (reason?: any) => void,
128
- options?: IRequestOptions,
129
- ) {
124
+ function handleSuccess<T = any>(response: UniApp.RequestSuccessCallbackResult & UniApp.GeneralCallbackResult, resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, options?: IRequestOptions) {
130
125
  // 显示后端成功消息
131
126
  if (!options?.isSuppressSuccess) {
132
127
  if ((response.data as any).message) {
@@ -149,12 +144,7 @@ function handleSuccess<T = any>(
149
144
  * @param reject
150
145
  * @param isSuppressError 是否不显示错误消息提示.
151
146
  */
152
- function handleError<T = any>(
153
- response: UniApp.RequestSuccessCallbackResult,
154
- resolve: (value: T | PromiseLike<T>) => void,
155
- reject: (reason?: any) => void,
156
- isSuppressError: boolean,
157
- ) {
147
+ function handleError<T = any>(response: UniApp.RequestSuccessCallbackResult, resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, isSuppressError: boolean) {
158
148
  // @ts-ignore
159
149
  if (response.errMsg === 'request:fail') {
160
150
  return;
@@ -246,11 +236,11 @@ const _httpClient: IHttpClient = {
246
236
  }
247
237
  }
248
238
 
249
- const { sql, whereSql, orderBySql, offsetSql, operatorJSON } = Kg.getQueryHeaders({
239
+ const { sql, whereSql, orderBySql, offsetSql, operatorJSON } = KgUtil.getQueryHeaders({
250
240
  $dayjs: options?.$dayjs,
251
241
  dynamicQueryExcludeProperties: options?.dynamicQueryExcludeProperties,
252
242
  dynamicQueryOperatorModel: options?.dynamicQueryOperatorModel,
253
- params: Kg.parseParams(options?.$dayjs, params),
243
+ params: KgUtil.parseParams(options?.$dayjs, params),
254
244
  });
255
245
 
256
246
  header = {
package/util/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './kg';
1
+ export * from './kg.util';
@@ -9,7 +9,7 @@ import dayjs, { Dayjs } from 'dayjs';
9
9
  /**
10
10
  * 通用工具.
11
11
  */
12
- export class Kg {
12
+ export class KgUtil {
13
13
  /**
14
14
  * 判断当前登录用户是否是管理员.
15
15
  * @return {} 如果当前登录用户是管理员则返回 true, 否则返回 false.
@@ -90,7 +90,7 @@ export class Kg {
90
90
  * @see https://uniapp.dcloud.net.cn/api/window/window.html#getappwebview
91
91
  */
92
92
  public static getCurrentWebview(): PlusWebviewWebviewObject | null {
93
- const page = Kg.getCurrentPage();
93
+ const page = KgUtil.getCurrentPage();
94
94
  return page?.$getAppWebview?.() ?? null;
95
95
  }
96
96
 
@@ -100,7 +100,7 @@ export class Kg {
100
100
  * @param js 要执行的代码.
101
101
  */
102
102
  public static eval(js: string): void {
103
- Kg.getCurrentWebview()?.evalJS(js);
103
+ KgUtil.getCurrentWebview()?.evalJS(js);
104
104
  }
105
105
 
106
106
  /**
@@ -504,3 +504,6 @@ export class Kg {
504
504
  };
505
505
  }
506
506
  }
507
+
508
+ /** @deprecated 已废弃, 请使用 {@link KgUtil} */
509
+ export const Kg = KgUtil;
package/config/setup.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * 初始化组件库.
3
- *
4
- * @param options 参数.
5
- */
6
- export function setup(options: any): void {}