@ningboyz/apis 1.0.0
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/index.ts +35 -0
- package/package.json +24 -0
- package/src/axios.ts +119 -0
- package/src/core/index.ts +46 -0
- package/src/core/tdept.ts +18 -0
- package/src/core/tdict.ts +69 -0
- package/src/core/tpart.ts +58 -0
- package/src/core/tpath.ts +33 -0
- package/src/core/tsysbilltype.ts +26 -0
- package/src/core/tsysclas.ts +20 -0
- package/src/core/tsysenvr.ts +15 -0
- package/src/core/tsyskjnd.ts +18 -0
- package/src/core/tsysmenu.ts +95 -0
- package/src/core/ttype.ts +53 -0
- package/src/core/tunit.ts +57 -0
- package/src/core/tuser.ts +237 -0
- package/src/expd/index.ts +13 -0
- package/src/expd/main.ts +18 -0
- package/src/flow/duty.ts +58 -0
- package/src/flow/index.ts +19 -0
- package/src/flow/tmain.ts +55 -0
- package/src/flow/tnode.ts +53 -0
- package/src/gams/cnfg.ts +15 -0
- package/src/gams/index.ts +13 -0
- package/src/gzjg/index.ts +16 -0
- package/src/gzjg/tgzlm.ts +62 -0
- package/src/gzjg/tmain.ts +46 -0
- package/src/pzpt/cnfg.ts +66 -0
- package/src/pzpt/index.ts +28 -0
- package/src/pzpt/item.ts +74 -0
- package/src/pzpt/k0km.ts +52 -0
- package/src/pzpt/k8km.ts +73 -0
- package/src/pzpt/kbkm.ts +31 -0
- package/src/pzpt/type.ts +66 -0
- package/src/tabl/index.ts +13 -0
- package/src/tabl/tmain.ts +131 -0
- package/src/wldy/index.ts +13 -0
- package/src/wldy/page.ts +58 -0
- package/src/wtui/index.ts +22 -0
- package/src/wtui/main.ts +62 -0
- package/src/wtui/tenvr.ts +15 -0
- package/src/wtui/todo.ts +47 -0
- package/src/wtui/view.ts +59 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import type { TCore, TWlzf, TWtui } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TUserRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取用户管理详情
|
|
12
|
+
* @param data
|
|
13
|
+
*/
|
|
14
|
+
detaildb(data: object) {
|
|
15
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/detaildb", data, undefined);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 新增用户
|
|
20
|
+
* @param data
|
|
21
|
+
*/
|
|
22
|
+
insertdb(data: object) {
|
|
23
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/insertdb`, data);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 更新用户
|
|
28
|
+
* @param data
|
|
29
|
+
*/
|
|
30
|
+
updatedb(data: object) {
|
|
31
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/updatedb`, data);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 删除用户
|
|
36
|
+
* @param data
|
|
37
|
+
*/
|
|
38
|
+
deletedb(data: object) {
|
|
39
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/deletedb`, data);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
selectdbCamelcase(syspartc: number, entityid?: string, unitmain?: number) {
|
|
43
|
+
const params = {
|
|
44
|
+
syspartc,
|
|
45
|
+
entityid,
|
|
46
|
+
unitmain
|
|
47
|
+
};
|
|
48
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/selectdb/camelcase", undefined, params);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 根据用户id查用户角色
|
|
53
|
+
* @param usermain
|
|
54
|
+
*/
|
|
55
|
+
detaildbCamelcase(usermain: number) {
|
|
56
|
+
const params = {
|
|
57
|
+
usermain
|
|
58
|
+
};
|
|
59
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("core/tmast/detaildb/camelcase", undefined, params);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 获取用户角色
|
|
64
|
+
* @param unitmain
|
|
65
|
+
*/
|
|
66
|
+
get4part(unitmain: number) {
|
|
67
|
+
const params = {
|
|
68
|
+
unitmain
|
|
69
|
+
};
|
|
70
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/get4part", params);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 添加用户角色
|
|
75
|
+
* @param data
|
|
76
|
+
*/
|
|
77
|
+
usrpartcSet4unit(data: object) {
|
|
78
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4unit", data);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 删除用户角色
|
|
83
|
+
* @param data
|
|
84
|
+
*/
|
|
85
|
+
usrpartcDel4unit(data: object) {
|
|
86
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4unit", data);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 添加部门权限
|
|
91
|
+
* @param data
|
|
92
|
+
*/
|
|
93
|
+
usrpartcSet4dept(data: object) {
|
|
94
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4dept", data);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 支付环境
|
|
99
|
+
* @param unitmain
|
|
100
|
+
* @param sourcedw
|
|
101
|
+
*/
|
|
102
|
+
get4wlzf(unitmain: number, sourcedw: string) {
|
|
103
|
+
const params = {
|
|
104
|
+
unitmain,
|
|
105
|
+
sourcedw
|
|
106
|
+
};
|
|
107
|
+
return this.httpRequest.post<TWlzf.IWlzfEnvrResponse[]>("/core/tuser/get4wlzf", params);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 部门权限
|
|
112
|
+
* @param unitmain
|
|
113
|
+
*/
|
|
114
|
+
get4dept(unitmain: number, usesbbhz: number = -1) {
|
|
115
|
+
const params = {
|
|
116
|
+
unitmain,
|
|
117
|
+
usesbbhz
|
|
118
|
+
};
|
|
119
|
+
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tuser/get4dept", params);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 仓库权限
|
|
124
|
+
* @param unitmain
|
|
125
|
+
*/
|
|
126
|
+
get4laid(unitmain: number) {
|
|
127
|
+
const params = {
|
|
128
|
+
unitmain
|
|
129
|
+
};
|
|
130
|
+
return this.httpRequest.post<TCore.ILaidResponse[]>("/core/tuser/get4laid", undefined, params);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 获取用户权限范围内的单位
|
|
135
|
+
*/
|
|
136
|
+
get4unit() {
|
|
137
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tuser/get4unit");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
get4belong() {
|
|
141
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tuser/get4belong");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 登录
|
|
146
|
+
* @param enrollId
|
|
147
|
+
* @param userPswd
|
|
148
|
+
*/
|
|
149
|
+
verifydbCamelcase(enrollId: string, userPswd: string) {
|
|
150
|
+
const data = {
|
|
151
|
+
ENROLLID: enrollId,
|
|
152
|
+
USERPSWD: userPswd
|
|
153
|
+
};
|
|
154
|
+
const formData = new FormData();
|
|
155
|
+
formData.append("params", JSON.stringify(data));
|
|
156
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/verifydb/camelcase", formData, undefined);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 发送短信验证码
|
|
161
|
+
* @param whobuild
|
|
162
|
+
* @param userindx
|
|
163
|
+
* @param sysname
|
|
164
|
+
*/
|
|
165
|
+
sendMessage(whobuild: number, userindx: number, sysname: string, data: object) {
|
|
166
|
+
const params = {
|
|
167
|
+
whobuild,
|
|
168
|
+
userindx,
|
|
169
|
+
sysname
|
|
170
|
+
};
|
|
171
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/sendmessage", data, params);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
unlockit(data: object) {
|
|
175
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/unlockit", data);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* 校验验证码
|
|
180
|
+
* @param whobuild
|
|
181
|
+
* @param userindx
|
|
182
|
+
* @param code
|
|
183
|
+
* @param data
|
|
184
|
+
*/
|
|
185
|
+
checkcodeservlet(whobuild: number, userindx: number, code: string, data: object) {
|
|
186
|
+
const params = {
|
|
187
|
+
whobuild,
|
|
188
|
+
userindx,
|
|
189
|
+
verification: code
|
|
190
|
+
};
|
|
191
|
+
return this.httpRequest.post<string>("/core/tuser/checkcodeservlet", data, params);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* 修改密码
|
|
196
|
+
* @param params
|
|
197
|
+
* @param header
|
|
198
|
+
*/
|
|
199
|
+
updatemm(params: object, header: object) {
|
|
200
|
+
return this.httpRequest.post<string>("/core/tuser/updatemm", undefined, params, header);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* 更新用户信息(未登录修改手机号)
|
|
205
|
+
* @param whobuild
|
|
206
|
+
* @param userindx
|
|
207
|
+
* @param data
|
|
208
|
+
*/
|
|
209
|
+
mobileidUpdatedb(whobuild: number, userindx: number, data: object) {
|
|
210
|
+
const params = {
|
|
211
|
+
whobuild,
|
|
212
|
+
userindx
|
|
213
|
+
};
|
|
214
|
+
return this.httpRequest.post<string>("/core/tuser/mobileid/updatedb", data, params);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* 设置年度
|
|
219
|
+
* @param sourcend
|
|
220
|
+
* @param data
|
|
221
|
+
*/
|
|
222
|
+
sourcendSet4kjnd(sourcend: number, data: object) {
|
|
223
|
+
const params = {
|
|
224
|
+
sourcend
|
|
225
|
+
};
|
|
226
|
+
return this.httpRequest.post<string>("/core/tuser/sourcend/set4kjnd", data, params);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* 获取权限
|
|
231
|
+
*/
|
|
232
|
+
get4view() {
|
|
233
|
+
return this.httpRequest.post<TWtui.IViewCtrlResponse[]>("/core/tuser/get4view");
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export default TUserRequest;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import TMainRequest from "./main";
|
|
3
|
+
|
|
4
|
+
class ExpdRequest {
|
|
5
|
+
public tmain: TMainRequest;
|
|
6
|
+
|
|
7
|
+
constructor(baseURL: string) {
|
|
8
|
+
const request = createRequest(baseURL);
|
|
9
|
+
this.tmain = new TMainRequest(request);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default ExpdRequest;
|
package/src/expd/main.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TWldy } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TMainRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
detaildb(expdmain: number) {
|
|
11
|
+
const params = {
|
|
12
|
+
expdmain
|
|
13
|
+
};
|
|
14
|
+
return this.httpRequest.post<TWldy.IWldyPageResponse>("/expd/tmain/detaildb", undefined, params);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default TMainRequest;
|
package/src/flow/duty.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TFlow } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TDutyRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 根据flowmain查找审核要素
|
|
12
|
+
*/
|
|
13
|
+
selectdb(flowmain: number) {
|
|
14
|
+
const params = {
|
|
15
|
+
flowmain
|
|
16
|
+
};
|
|
17
|
+
return this.httpRequest.post<TFlow.IFlowDutyResponse[]>("/flow/tduty/selectdb", undefined, params);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 根据flowmain添加审核要素
|
|
22
|
+
*/
|
|
23
|
+
insertdb(flowmain: number, data: object) {
|
|
24
|
+
const params = {
|
|
25
|
+
flowmain
|
|
26
|
+
};
|
|
27
|
+
return this.httpRequest.post<TFlow.IFlowDutyResponse[]>(`/flow/tduty/insertdb`, data, params);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 根据flowmain修改审核要素
|
|
32
|
+
*/
|
|
33
|
+
updatedb(flowmain: number, data: object) {
|
|
34
|
+
const params = {
|
|
35
|
+
flowmain
|
|
36
|
+
};
|
|
37
|
+
return this.httpRequest.post<TFlow.IFlowDutyResponse[]>(`/flow/tduty/updatedb`, data, params);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 根据flowmain查找审核要素详情
|
|
42
|
+
*/
|
|
43
|
+
detaildb(flowmain: number) {
|
|
44
|
+
const params = {
|
|
45
|
+
flowmain
|
|
46
|
+
};
|
|
47
|
+
return this.httpRequest.post<TFlow.IFlowDutyResponse[]>("/flow/tduty/detaildb", undefined, params);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 根据flowmain删除审核要素
|
|
52
|
+
*/
|
|
53
|
+
deletedb(formData: FormData) {
|
|
54
|
+
return this.httpRequest.post<TFlow.IFlowDutyResponse[]>("/flow/tduty/deletedb", formData);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default TDutyRequest;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import TMainRequest from "./tmain";
|
|
3
|
+
import TNodeRequest from "./tnode";
|
|
4
|
+
import TDutyRequest from "./duty";
|
|
5
|
+
|
|
6
|
+
class FlowRequest {
|
|
7
|
+
public tmain: TMainRequest;
|
|
8
|
+
public tnode: TNodeRequest;
|
|
9
|
+
public tduty: TDutyRequest;
|
|
10
|
+
|
|
11
|
+
constructor(baseURL: string) {
|
|
12
|
+
const request = createRequest(baseURL);
|
|
13
|
+
this.tmain = new TMainRequest(request);
|
|
14
|
+
this.tnode = new TNodeRequest(request);
|
|
15
|
+
this.tduty = new TDutyRequest(request);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default FlowRequest;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TFlow } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TMainRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 审批流程详情
|
|
12
|
+
* @param sysclasc
|
|
13
|
+
* @param useruuid
|
|
14
|
+
* @param unitmain
|
|
15
|
+
*/
|
|
16
|
+
selectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
17
|
+
const params = {
|
|
18
|
+
sysclasc,
|
|
19
|
+
useruuid,
|
|
20
|
+
unitmain
|
|
21
|
+
};
|
|
22
|
+
return this.httpRequest.post<TFlow.IFlowMainResponse[]>("/flow/tmain/selectdb", undefined, params);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 审批流程详情
|
|
27
|
+
* @param params
|
|
28
|
+
*/
|
|
29
|
+
detaildb(params: object) {
|
|
30
|
+
return this.httpRequest.post<TFlow.IFlowMainResponse[]>("/flow/tmain/detaildb", params);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 添加审批流程
|
|
35
|
+
*/
|
|
36
|
+
insertdb(formData: FormData) {
|
|
37
|
+
return this.httpRequest.post<TFlow.IFlowMainResponse[]>("/flow/tmain/insertdb", formData);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 修改审核流程
|
|
42
|
+
*/
|
|
43
|
+
updatedb(formData: FormData) {
|
|
44
|
+
return this.httpRequest.post<TFlow.IFlowMainResponse[]>("/flow/tmain/updatedb", formData);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 删除审核流程
|
|
49
|
+
*/
|
|
50
|
+
deletedb(formData: FormData) {
|
|
51
|
+
return this.httpRequest.post<TFlow.IFlowMainResponse[]>("/flow/tmain/deletedb", formData);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default TMainRequest;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { TFlow } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TNodeRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 根据flowmain查找审核节点
|
|
12
|
+
*/
|
|
13
|
+
selectdb(params: object) {
|
|
14
|
+
return this.httpRequest.post<TFlow.IFlowNodeResponse[]>("/flow/tnode/selectdb", undefined, params);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 根据wtuiview查看页面定义详情
|
|
19
|
+
* @param params
|
|
20
|
+
*/
|
|
21
|
+
detaildb(params: object) {
|
|
22
|
+
return this.httpRequest.post<TFlow.IFlowNodeResponse[]>("/flow/tnode/detaildb", undefined, params);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 添加审核节点
|
|
27
|
+
*/
|
|
28
|
+
insertdb(flowmain: number, data: object) {
|
|
29
|
+
const params = {
|
|
30
|
+
flowmain
|
|
31
|
+
};
|
|
32
|
+
return this.httpRequest.post<TFlow.IFlowNodeResponse[]>(`/flow/tnode/insertdb`, data, params);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 根据flowmain修改审核节点
|
|
37
|
+
*/
|
|
38
|
+
updatedb(flowmain: number, data: object) {
|
|
39
|
+
const params = {
|
|
40
|
+
flowmain
|
|
41
|
+
};
|
|
42
|
+
return this.httpRequest.post<TFlow.IFlowNodeResponse[]>(`/flow/tnode/updatedb`, data, params);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 根据flowmain删除审核节点
|
|
47
|
+
*/
|
|
48
|
+
deletedb(formData: FormData) {
|
|
49
|
+
return this.httpRequest.post<TFlow.IFlowNodeResponse[]>("/flow/tnode/deletedb", formData);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default TNodeRequest;
|
package/src/gams/cnfg.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TGams } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TCnfgRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
selectdb(params: object) {
|
|
11
|
+
return this.httpRequest.post<TGams.IGamsCnfgResponse>("/gams/tcnfg/selectdb", undefined, params);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default TCnfgRequest;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import TCnfgRequest from "./cnfg";
|
|
3
|
+
|
|
4
|
+
class GamsRequest {
|
|
5
|
+
public tcnfg: TCnfgRequest;
|
|
6
|
+
|
|
7
|
+
constructor(baseURL: string) {
|
|
8
|
+
const request = createRequest(baseURL);
|
|
9
|
+
this.tcnfg = new TCnfgRequest(request);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default GamsRequest;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import TMainRequest from "./tmain";
|
|
3
|
+
import TGzlmRequest from "./tgzlm";
|
|
4
|
+
|
|
5
|
+
class GzjgRequest {
|
|
6
|
+
public tmain: TMainRequest;
|
|
7
|
+
public tgzlm: TGzlmRequest;
|
|
8
|
+
|
|
9
|
+
constructor(baseURL: string) {
|
|
10
|
+
const request = createRequest(baseURL);
|
|
11
|
+
this.tmain = new TMainRequest(request);
|
|
12
|
+
this.tgzlm = new TGzlmRequest(request);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default GzjgRequest;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { TGzjg } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TGzlmRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取报表栏目
|
|
12
|
+
*/
|
|
13
|
+
select(gzjgmain: number, tablname: string, gzlmflgq: number) {
|
|
14
|
+
const params = {
|
|
15
|
+
gzjgmain,
|
|
16
|
+
tablname,
|
|
17
|
+
gzlmflgq
|
|
18
|
+
};
|
|
19
|
+
return this.httpRequest.post<TGzjg.IGzjgGzlmResponse[]>("/gzjg/tgzlm/selectdb", undefined, params);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
insertdb(data: object, tablname = "cols") {
|
|
23
|
+
const params = {
|
|
24
|
+
tablname
|
|
25
|
+
};
|
|
26
|
+
return this.httpRequest.post<TGzjg.IGzjgGzlmResponse[]>("/gzjg/tgzlm/insertdb", data, params);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 修改
|
|
31
|
+
* @param data
|
|
32
|
+
*/
|
|
33
|
+
updatedb(data: object, tablname = "cols") {
|
|
34
|
+
const params = {
|
|
35
|
+
tablname
|
|
36
|
+
};
|
|
37
|
+
return this.httpRequest.post<TGzjg.IGzjgGzlmResponse[]>("/gzjg/tgzlm/updatedb", data, params);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 栏目详情
|
|
42
|
+
*/
|
|
43
|
+
detaildb(gzjgmain: number, gzlmmain: number, sourcend: number, tablname = "cols") {
|
|
44
|
+
const params = {
|
|
45
|
+
gzjgmain,
|
|
46
|
+
gzlmmain,
|
|
47
|
+
sourcend,
|
|
48
|
+
tablname
|
|
49
|
+
};
|
|
50
|
+
return this.httpRequest.post<TGzjg.IGzjgGzlmResponse[]>("/gzjg/tgzlm/detaildb", undefined, params);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get4gzlm(gzjgmain: number, tablname = "cols") {
|
|
54
|
+
const params = {
|
|
55
|
+
gzjgmain,
|
|
56
|
+
tablname
|
|
57
|
+
};
|
|
58
|
+
return this.httpRequest.post<TGzjg.IGzjgGzlmResponse[]>("/gzjg/tgzlm/selectdb", undefined, params);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default TGzlmRequest;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { TGzjg } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TMainRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
selectdb() {
|
|
11
|
+
const params = {};
|
|
12
|
+
return this.httpRequest.post<TGzjg.IGzjgMainResponse[]>("/gzjg/tmain/selectdb", undefined, params);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
insert(data: object) {
|
|
16
|
+
return this.httpRequest.post<TGzjg.IGzjgMainResponse[]>("/gzjg/tmain/insertdb", data);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 修改
|
|
21
|
+
* @param data
|
|
22
|
+
*/
|
|
23
|
+
updatedb(data: object) {
|
|
24
|
+
return this.httpRequest.post<TGzjg.IGzjgMainResponse[]>("/gzjg/tmain/updatedb", data);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 删除
|
|
29
|
+
* @param data
|
|
30
|
+
*/
|
|
31
|
+
deletedb(data: object) {
|
|
32
|
+
return this.httpRequest.post<TGzjg.IGzjgMainResponse[]>("/gzjg/tmain/deletedb", data);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 工资结构明细
|
|
37
|
+
*/
|
|
38
|
+
detail(gzjgmain: number) {
|
|
39
|
+
const params = {
|
|
40
|
+
gzjgmain
|
|
41
|
+
};
|
|
42
|
+
return this.httpRequest.post<TGzjg.IGzjgMainResponse[]>("/gzjg/tmain/detaildb", undefined, params);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default TMainRequest;
|
package/src/pzpt/cnfg.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { TPzpt } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TCnfgRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 新增账套
|
|
12
|
+
* @param data
|
|
13
|
+
*/
|
|
14
|
+
insertdb(data: object) {
|
|
15
|
+
return this.httpRequest.post<TPzpt.IPzptCnfgResponse[]>("/gapi/pzpt/tcnfg/insertdb", data, undefined);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 更新账套
|
|
20
|
+
* @param data
|
|
21
|
+
*/
|
|
22
|
+
updatedb(data: object) {
|
|
23
|
+
return this.httpRequest.post<TPzpt.IPzptCnfgResponse[]>("/gapi/pzpt/tcnfg/updatedb", data, undefined);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 获取账套列表
|
|
28
|
+
* @param sourcend
|
|
29
|
+
* @param unitmain
|
|
30
|
+
* @param sourceid
|
|
31
|
+
* @param deptmain
|
|
32
|
+
*/
|
|
33
|
+
selectdb(sourcend: number, unitmain?: number, sourceid?: number, deptmain?: number, sourcedw?: string) {
|
|
34
|
+
const params = {
|
|
35
|
+
sourcend,
|
|
36
|
+
unitmain,
|
|
37
|
+
sourceid,
|
|
38
|
+
deptmain,
|
|
39
|
+
sourcedw
|
|
40
|
+
};
|
|
41
|
+
return this.httpRequest.post<TPzpt.IPzptCnfgResponse[]>("/gapi/pzpt/tcnfg/selectdb", undefined, params);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 账套详情
|
|
46
|
+
* @param sourceNd
|
|
47
|
+
* @param sourceId
|
|
48
|
+
*/
|
|
49
|
+
detaildb(sourceNd: number, sourceId: number) {
|
|
50
|
+
const params = {
|
|
51
|
+
sourcend: sourceNd,
|
|
52
|
+
sourceid: sourceId
|
|
53
|
+
};
|
|
54
|
+
return this.httpRequest.post<TPzpt.IPzptCnfgResponse[]>("/gapi/pzpt/tcnfg/detaildb", undefined, params);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 删除核算账套
|
|
59
|
+
* @param data
|
|
60
|
+
*/
|
|
61
|
+
deletedb(data: object) {
|
|
62
|
+
return this.httpRequest.post<TPzpt.IPzptCnfgResponse[]>("/gapi/pzpt/tcnfg/deletedb", data, undefined);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default TCnfgRequest;
|