db_formula_wev8.js
8.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
var dbFormulaOperate = (function(){
// 数据库通用函数
function __DB_FORMULA(funName, params) {
var result = "";
if(params) {
var param = {};
param.funName = funName;
for(var i = 0; i < params.length; i++) {
var par = encode64(params[i]);
var key = "param_" + (i+1);
eval("param." + key + "=par;");
}
// if(wf__info.belmobile){
// jQuery.ajax({
// type: "POST",
// url: "/mobile/plugin/1/wfDBFormulaLink.jsp",
// data: param,
// async: false,
// success: function (msg) {
// result = msg;
// }
// });
// } else {
jQuery.ajax({
type: "POST",
url: "/workflow/exceldesign/excelUploadFormula_Db_ajax.jsp",
data: param,
async: false,
success: function (msg) {
result = msg;
}
});
// }
}
return result;
}
var keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv"
+ "wxyz0123456789+/" + "=";
//加密
function encode64(input) {
input = input + "";
var output = "";
var chr1, chr2, chr3 = "";
var enc1, enc2, enc3, enc4 = "";
var i = 0;
do {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2)
+ keyStr.charAt(enc3) + keyStr.charAt(enc4);
chr1 = chr2 = chr3 = "";
enc1 = enc2 = enc3 = enc4 = "";
} while (i < input.length);
return output;
}
// 获取指定人员系统账号
function GetHrmLoginid(params) {
return __DB_FORMULA("getHrmLoginid", params);
}
// 获取指定人员姓名
function GetHrmName(params) {
return __DB_FORMULA("getHrmName", params);
}
// 获取指定人员手机号码
function GetHrmMobile(params) {
return __DB_FORMULA("getHrmMobile", params);
}
// 获取指定人员邮箱
function GetHrmEmail(params) {
return __DB_FORMULA("getHrmEmail", params);
}
// 获取指定人员安全级别
function GetHrmSeclevel(params) {
return __DB_FORMULA("getHrmSeclevel", params);
}
// 获取指定人员编号
function GetHrmWorkcode(params) {
return __DB_FORMULA("getHrmWorkcode", params);
}
// 获取指定人员直接上级
function GetHrmManager(params) {
return __DB_FORMULA("getHrmManager", params);
}
// 获取指定人员所有上级
function GetHrmAllManager(params) {
return __DB_FORMULA("getHrmAllManager", params);
}
// 获取指定人员部门
function GetHrmDepartment(params) {
return __DB_FORMULA("getHrmDepartment", params);
}
// 获取指定人员分部
function GetHrmSubcompany(params) {
return __DB_FORMULA("getHrmSubcompany", params);
}
// 获取指定部门名称
function GetDepartmentName(params) {
return __DB_FORMULA("getDepartmentName", params);
}
// 获取指定部门编号
function GetDepartmentCode(params) {
return __DB_FORMULA("getDepartmentCode", params);
}
// 获取指定部门直接上级部门
function GetSuperDepartment(params) {
return __DB_FORMULA("getSuperDepartment", params);
}
// 获取指定部门所有上级部门
function GetAllSuperDepartment(params) {
return __DB_FORMULA("getAllSuperDepartment", params);
}
// 获取指定分部名称
function GetSubcompanyName(params) {
return __DB_FORMULA("getSubcompanyName", params);
}
// 获取指定分部编号
function GetSubcompanyCode(params) {
return __DB_FORMULA("getSubcompanyCode", params);
}
// 获取指定分部直接上级分部
function GetSuperSubcompany(params) {
return __DB_FORMULA("getSuperSubcompany", params);
}
// 获取指定分部所有上级分部
function GetAllSuperSubcompany(params) {
return __DB_FORMULA("getAllSuperSubcompany", params);
}
// 获取指定流程状态
function GetRequestStatus(params) {
return __DB_FORMULA("getRequestStatus", params);
}
// 获取指定流程编号
function GetRequestMark(params) {
return __DB_FORMULA("getRequestMark", params);
}
// 获取指定文档编号
function GetDocCode(params) {
return __DB_FORMULA("getDocCode", params);
}
//获取指定客户编号
function GetCrmCode(params) {
return __DB_FORMULA("getCrmCode", params);
}
//获取指定项目编号
function GetPrjCode(params) {
return __DB_FORMULA("getPrjCode", params);
}
//获取指定科目编号
function GetFnaBudgetfeeCode(params) {
return __DB_FORMULA("getFnaBudgetfeeCode", params);
}
return {
// 获取指定人员系统账号
GetHrmLoginid: function() {
return GetHrmLoginid(arguments);
},
// 获取指定人员姓名
GetHrmName: function() {
return GetHrmName(arguments);
},
// 获取指定人员手机号码
GetHrmMobile: function() {
return GetHrmMobile(arguments);
},
// 获取指定人员邮箱
GetHrmEmail: function() {
return GetHrmEmail(arguments);
},
// 获取指定人员安全级别
GetHrmSeclevel: function() {
return GetHrmSeclevel(arguments);
},
// 获取指定人员编号
GetHrmWorkcode: function() {
return GetHrmWorkcode(arguments);
},
// 获取指定人员直接上级
GetHrmManager: function() {
return GetHrmManager(arguments);
},
// 获取指定人员所有上级
GetHrmAllManager: function() {
return GetHrmAllManager(arguments);
},
// 获取指定人员部门
GetHrmDepartment: function() {
return GetHrmDepartment(arguments);
},
// 获取指定人员分部
GetHrmSubcompany: function() {
return GetHrmSubcompany(arguments);
},
// 获取指定部门名称
GetDepartmentName: function() {
return GetDepartmentName(arguments);
},
// 获取指定部门编号
GetDepartmentCode: function() {
return GetDepartmentCode(arguments);
},
// 获取指定部门直接上级部门
GetSuperDepartment: function() {
return GetSuperDepartment(arguments);
},
// 获取指定部门所有上级部门
GetAllSuperDepartment: function() {
return GetAllSuperDepartment(arguments);
},
// 获取指定分部名称
GetSubcompanyName: function() {
return GetSubcompanyName(arguments);
},
// 获取指定分部编号
GetSubcompanyCode: function() {
return GetSubcompanyCode(arguments);
},
// 获取指定分部直接上级分部
GetSuperSubcompany: function() {
return GetSuperSubcompany(arguments);
},
// 获取指定分部所有上级分部
GetAllSuperSubcompany: function() {
return GetAllSuperSubcompany(arguments);
},
// 获取指定流程状态
GetRequestStatus: function() {
return GetRequestStatus(arguments);
},
// 获取指定流程编号
GetRequestMark: function() {
return GetRequestMark(arguments);
},
// 获取指定文档编号
GetDocCode: function() {
return GetDocCode(arguments);
},
//获取指定客户编号
GetCrmCode: function() {
return GetCrmCode(arguments);
},
//获取指定项目编号
GetPrjCode: function() {
return GetPrjCode(arguments);
},
//获取指定科目编号
GetFnaBudgetfeeCode: function() {
return GetFnaBudgetfeeCode(arguments);
}
}
})();