RdResourceEdit.jsp
13.6 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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.Util" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/browserTag" prefix="brow"%>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page"/>
<jsp:useBean id="JobtitlesComInfo" class="weaver.hrm.job.JobTitlesComInfo" scope="page"/>
<jsp:useBean id="RdeployHrmSetting" class="weaver.rdeploy.hrm.RdeployHrmSetting" scope="page" />
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript" src="/js/ecology8/jNice/jNice/jquery.jNice_wev8.js"></script>
<link rel="stylesheet" href="/js/ecology8/jNice/jNice/jNice_wev8.css" type="text/css" />
<link href="/rdeploy/assets/css/index.css" rel="stylesheet" type="text/css">
<style>
.e8_os{
height:35px;
}
.e8_innerShowContent{
height: 30px;
padding: 7px 0 0 7px;
}
.e8_spanFloat{
padding: 5px 0 0 0;
}
.e8_browflow{
}
</style>
</head>
<%
String id = Util.null2String(request.getParameter("id"));
String success = Util.null2String(request.getParameter("success"));
String messageUrl = ResourceComInfo.getMessagerUrls(id);
String name = ResourceComInfo.getLastname(id);
String sex = ResourceComInfo.getSexs(id);
String depId = ResourceComInfo.getDepartmentID(id);
String jobId = ResourceComInfo.getJobTitle(id);
String managerId = ResourceComInfo.getManagerID(id);
String mobile = ResourceComInfo.getMobile(id);
String phone = ResourceComInfo.getTelephone(id);
String email = ResourceComInfo.getEmail(id);
String subcomid = Util.null2String(RdeployHrmSetting.getSettingInfo("subcom"));
String subcomName = SubCompanyComInfo.getSubCompanyname(subcomid);
%>
<%
if(!success.equals("")){
%>
<script type="text/javascript">
jQuery(document).ready(function(){
window.parent.Dialog.alert('<%=SystemEnv.getHtmlLabelName(125313,user.getLanguage())%>',null,null,null,null,{_autoClose:3});
jQuery("#departmentname").val(window.parent.leftmenuframe.getdepName());
jQuery("#displaysupName").html(window.parent.leftmenuframe.getSupdepName());
});
</script>
<%}%>
<BODY>
<input type=hidden id="oldname" name=oldname value="<%=name %>">
<input type=hidden id="oldMobile" name=oldMobile value="<%=mobile %>">
<FORM id=weaver name=frmMain action="RdResourceOperation.jsp" method=post>
<input type=hidden id="method" name=method value="edit">
<input type=hidden id="id" name=id value="<%=id %>">
<input type=hidden id="operate" name=operate value="1">
<div style="padding-top: 10px;color: #536467;">
<table width="590px" style="font-size: 13px;margin-left: 30px;">
<tr >
<td width="100%" align="center" style="padding: 40px 0 10px 0;" colspan="2">
<table width="100%">
<tr>
<td width="30%" align="right">
<img id="imageCon" src="<%=messageUrl %>" width="80px"/>
<input type="hidden" id="imageUrl" name="messageUrl" value="<%=messageUrl %>"/>
<div onclick="setUserIcon()" style="cursor:pointer; background:url('/rdeploy/assets/img/hrm/bighead.png');position: absolute;top:57px;left:128px;height:80px;width:80px;"></div>
</td>
<td style="padding: 0 0 0 40px;">
<table height="100%">
<tr>
<td style="height: 36px;"><span style="padding-right: 18px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(413,user.getLanguage())%> :</span><INPUT class=rdeploycommoninputclass style="width: 140px;height: 35px;" type=text maxLength=20 size=30 name=name id="name" value="<%=name %>"></td>
</tr>
<tr>
<td style="height: 46px;">
<table>
<tr>
<td><span style="padding-right: 18px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(125291,user.getLanguage())%> :</span></td>
<td width="25px;"><input type="radio" id="man" name="sex" checked="" value="0"/></td>
<td width="40px;"><div id="sex" style="color: #526268;background:url('/rdeploy/assets/img/hrm/man.png') no-repeat;width: 24px;height: 24px;"></div></td>
<td width="25px;"><input type="radio" id="girl" name="sex" checked="" value="1"/></td>
<td width="30px;"><div id="sex" style="color: #526268;background:url('/rdeploy/assets/img/hrm/lady.png') no-repeat;width: 24px;height: 24px;"></div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr >
<td></td>
</tr>
<tr id="dept" style="">
<td align="right" style="padding-top: 3px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(124,user.getLanguage())%> :</td>
<td align="left" style="color: #526268;padding: 12px 0 5px 10px;vertical-align: middle;">
<div style="width: 430px;height:39px;position: absolute;margin-left: 2px;"></div>
<brow:browser viewType="0" name="departmentid" browserValue="<%=depId %>"
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp?selectedids="
hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1'
completeUrl="/data.jsp?type=4" width="420px" dialogWidth="600px"
browserSpanValue="<%=DepartmentComInfo.getDepartmentname(depId)%>">
</brow:browser>
<div style="width: 445px;font-size: 24px;padding: 0px 0 0 10px;"><a style="float: right;width: 30px;color: #536467;" href="javascript:addDept()"><img src="/rdeploy/assets/img/hrm/plus.png" width="18px" height="18px" align="absMiddle"><a></div>
</td>
</tr>
<tr>
<td align="right" style="padding-top: 3px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(6086,user.getLanguage())%> :</td>
<td align="left" style="color: #526268;padding: 12px 0 5px 10px;">
<div style="width: 430px;height:39px;position: absolute;margin-left: 2px;"></div>
<brow:browser viewType="0" name="jobtitle" browserValue="<%=jobId%>"
getBrowserUrlFn="onShowJobtitle" dialogWidth="600px"
hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1'
completeUrl="javascript:getCompleteUrl()" width="420px" browserSpanValue="<%=JobtitlesComInfo.getJobTitlesname(jobId)%>">
</brow:browser>
<div style="width: 445px;font-size: 24px;padding: 0px 0 0 10px;"><a style="float: right;width: 30px;color: #536467;" href="javascript:addJobile()"><img src="/rdeploy/assets/img/hrm/plus.png" width="18px" height="18px" align="absMiddle"><a></div>
</td>
</tr>
<tr id="manager" style="">
<td align="right" style="padding-top: 3px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(15709,user.getLanguage())%> :</td>
<td align="left" style="color: #526268;padding: 12px 0 5px 10px;">
<div style="width: 430px;height:39px;position: absolute;margin-left: 2px;"></div>
<brow:browser viewType="0" name="managerid" browserValue="<%=managerId %>"
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp?selectedids="
hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1'
completeUrl="/data.jsp" linkUrl="javascript:" width="420px"
browserSpanValue="<%=ResourceComInfo.getLastname(managerId)%>"></brow:browser>
</td>
</tr>
<tr id="mob" style="">
<td align="right" style="padding-top: 3px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(125213,user.getLanguage())%> :</td>
<td align="left" style="color: #526268;padding: 12px 0 5px 10px;">
<INPUT class=rdeploycommoninputclass style="width: 432px;height: 35px;" type=text maxLength=20 size=30 name=mobilephone id="mobilephone" value="<%=mobile %>" >
</td>
</tr>
<tr id="pho" style="">
<td align="right" style="padding-top: 3px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(125214,user.getLanguage())%> :</td>
<td align="left" style="color: #526268;padding: 12px 0 5px 10px;">
<INPUT class=rdeploycommoninputclass style="width: 432px;height: 35px;" type=text maxLength=20 size=30 name=phone id="phone" value="<%=phone %>" >
</td>
</tr>
<tr id="eml" style="">
<td align="right" style="padding-top: 3px;" class="rdeploycommoncolor"><%=SystemEnv.getHtmlLabelName(20869,user.getLanguage())%> :</td>
<td align="left" style="color: #526268;padding: 12px 0 5px 10px;">
<INPUT class=rdeploycommoninputclass type=text style="width: 432px;height: 35px;" name=email id="email" value="<%=email %>" >
</td>
</tr>
</table>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout type="2col">
<wea:group context="">
<wea:item type="toolbar">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(86,user.getLanguage())%>" class="e8_btn_cancel" onclick="doSubmit()">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(32694,user.getLanguage())%>" class="e8_btn_cancel" onclick="return_()">
</wea:item>
</wea:group>
</wea:layout>
</div>
</FORM>
<script language=javascript>
var dialog1 = null;
function changeIcon(imgUrl){
if(imgUrl == ""){
imgUrl = "/messager/images/icon_m_wev8.jpg";
}
$("#imageCon").attr("src",imgUrl);
$("#imageUrl").val(imgUrl);
}
jQuery(document).ready(function(){
jQuery('body').jNice();
<% if("0".equals(sex)){ %>
jQuery("#man").trigger("checked",true);
<%}else if("1".equals(sex)){ %>
jQuery("#girl").trigger("checked",true);
<%}%>
});
var languageid = "<%=user.getLanguage()%>";
function onDepartmentDel(text,fieldid,params){
_writeBackData('jobtitle','1',{'id':'','name':''},{'hasInput':true});
jQuery("#job").hide();
}
function onDepartmentAdd(e,datas,name){
_writeBackData('jobtitle','1',{'id':'','name':''},{'hasInput':true});
if(datas.id==""){
jQuery("#job").hide();
}
else {
jQuery("#job").show();
}
}
function onShowJobtitle(){
var url="/hrm/jobtitles/JobTitlesBrowser.jsp?fromPage=add";
url="/systeminfo/BrowserMain.jsp?url="+url;
return url;
}
function getCompleteUrl(){
var url= "/data.jsp?type=hrmjobtitles";
return url;
}
var dialog1 = parent.getDialog(window);
var parentWin = parent.getParentWindow(window);
var dialog = null;
function doSubmit(operate) {
var name = $("#name").val().trim();
var mobilephone = $("#mobilephone").val().trim();
if(name == ""){
window.parent.Dialog.alert("<%=SystemEnv.getHtmlLabelName(125311,user.getLanguage())%>");
return;
}
if(jQuery("input[name=departmentid]").val() != "" && jQuery("input[name=jobtitle]").val() == ""){
window.parent.Dialog.alert("<%=SystemEnv.getHtmlLabelName(125314,user.getLanguage())%>");
return;
}
if(mobilephone == ""){
window.parent.Dialog.alert("<%=SystemEnv.getHtmlLabelName(125312,user.getLanguage())%>");
return;
}
var myreg = /^1\d{10}$/g;
if(!myreg.test(mobilephone))
{
window.parent.Dialog.alert('<%=SystemEnv.getHtmlLabelName(125253,user.getLanguage())%>');
return;
}
$("#operate").val(operate);
var dataP = {"nameStr":"","mobile":""};
if($("#oldname").val() != name ){
dataP.nameStr = name;
}
if($("#oldMobile").val() != mobilephone ){
dataP.mobile = mobilephone;
}
if(dataP != null){
$.ajax({
data:dataP,
type: "post",
cache:false,
url:"checkdatas.jsp",
dataType: 'json',
success:function(data){
if(data.mobileExist == "1"){
window.parent.Dialog.alert('<%=SystemEnv.getHtmlLabelName(125267,user.getLanguage())%>');
return;
}
if(data.success == "0"){
$("#dosubmit").attr('disabled',"true");
frmMain.submit();
}else{
window.parent.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(21445,user.getLanguage())%>!",function(){
frmMain.submit();
});
}
}
});
}else{
frmMain.submit();
}
}
function setUserIcon(){
dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "/hrm/HrmDialogTab.jsp?_fromURL=GetUserIcon1&id=<%=id%>&imgurl_="+$("#imageUrl").val()+"&imageid=";
dialog.Title = "<%=SystemEnv.getHtmlLabelName(28062,user.getLanguage())%>";
dialog.Width = 600;
dialog.Height = 450;
dialog.Drag = true;
dialog.URL = url;
dialog.show();
}
function addJobile(){
dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "hrm/RdAddJob.jsp?deptid="+jQuery("input[name=departmentid]").val();
dialog.Title = "<%=SystemEnv.getHtmlLabelName(125302 ,user.getLanguage())%>";
dialog.normalDialog = false;
dialog.Width = 400;
dialog.Height = 223;
dialog.Drag = true;
dialog.URL = url;
dialog.show();
}
function setJobId(id,name){
_writeBackData('jobtitle','1',{'id':id,'name':name},{'hasInput':true});
}
function return_(){
window.parent.Dialog.close();
}
function back()
{
window.history.back(-1);
}
function addDept(){
dialog = new window.top.Dialog();
dialog.currentWindow = window;
dialog.URL = "/rdeploy/hrm/RdDeptAdd.jsp?supName=<%=subcomName%>&subcompanyid1=<%=subcomid %>&supdepid=0&method=add&from=1";
dialog.Title = "<%=SystemEnv.getHtmlLabelName(125303,user.getLanguage())%>";
dialog.normalDialog = false;
dialog.Width = 400;
dialog.Height = 223;
dialog.Drag = true;
dialog.show();
}
var depName ="";
var supDepName = "<%=subcomName%>";
function getdepName(){
return depName;
}
function setdepName(name){
depName=name;
}
function getSupdepName(){
return supDepName;
}
function getNewDeptId(id,name){
_writeBackData('departmentid','1',{'id':id,'name':name},{'hasInput':true});
}
</script>
</BODY></HTML>