HrmAwardAdd.jsp
10.8 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
<%@ page import="weaver.general.Util,weaver.hrm.resource.ResourceComInfo" %>
<%@ page import="java.util.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="AwardComInfo" class="weaver.hrm.award.AwardComInfo" scope="page" />
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/WEB-INF/tld/browser.tld" prefix="brow"%>
<%!
/**
* Added By Charoes Huang On May 20 ,2004
* @param resourceid
* @param comInfo
* @return the resource name string with hyper link
*/
private String getRecourceLinkStr(String resourceid,ResourceComInfo comInfo){
String linkStr ="";
String[] resources =Util.TokenizerString2(resourceid,",");
for(int i=0;i<resources.length;i++){
linkStr += "<A href=\"/hrm/resource/HrmResource.jsp?id="+resources[i]+"\">"+comInfo.getResourcename(resources[i])+"</A> ";
}
return linkStr;
}
%>
<% if(!HrmUserVarify.checkUserRight("HrmResourceRewardsRecordAdd:Add",user)) {
response.sendRedirect("/notice/noright.jsp") ;
return ;
}
String isclose = Util.null2String(request.getParameter("isclose"));
String isDialog = Util.null2String(request.getParameter("isdialog"));
%>
<HTML><HEAD>
</STYLE>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<SCRIPT language="javascript" src="/js/hrm/HrmTools_wev8.js"></script>
<script type="text/javascript">
var parentWin = parent.parent.getParentWindow(parent);
var dialog = parent.parent.getDialog(parent);
if("<%=isclose%>"=="1"){
parentWin.onBtnSearchClick();
parentWin.closeDialog();
}
function doSetValue(event,data,name){
var result = eval(ajaxSubmit(encodeURI(encodeURI("/js/hrm/getdata.jsp?cmd=getHrmAward&id="+data.id))));
if(result && result.length>0){
for(var i=0;i<result.length;i++){
document.hrmaward.rpexplain.value = result[i].description;
document.hrmaward.rptransact.value = result[i].transact;
}
}
}
</script>
</HEAD>
<%
String rptitle = Util.null2String(request.getParameter("rptitle")); /*奖惩标题*/
String resourceid = Util.null2String(request.getParameter("resourceid"));/*员工id*/
String rptypeid = Util.null2String(request.getParameter("rptypeid")); /*奖惩种类*/
String rpdate = Util.null2String(request.getParameter("rpdate")) ; /*奖惩日期*/
String rpexplain = Util.null2String(request.getParameter("rpexplain")) ; /*说明*/
String rptransact = "" ;
if( ! rptypeid.equals("") ) {
String sql="select transact from HrmAwardType where id="+rptypeid ;
rs.executeSql(sql) ;
if( rs.next() ) rptransact = rs.getString("transact") ;/*相关处理*/
}
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(82,user.getLanguage())+": "+ SystemEnv.getHtmlLabelName(6100,user.getLanguage());
String needfav ="1";
String needhelp ="";
%>
<BODY>
<%if("1".equals(isDialog)){ %>
<div class="zDialog_div_content">
<%} %>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(86,user.getLanguage())+",javascript:submitData();,_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
<td class="rightSearchSpan" style="text-align:right;">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(86,user.getLanguage())%>" class="e8_btn_top" onclick="submitData();">
<span title="<%=SystemEnv.getHtmlLabelName(23036,user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<FORM name=hrmaward id=hrmaward action="HrmAwardOperation.jsp" method=post >
<input class=inputstyle type=hidden name=operation value="add">
<wea:layout type="2col">
<wea:group context='<%=SystemEnv.getHtmlLabelName(6100,user.getLanguage())%>'>
<wea:item><%=SystemEnv.getHtmlLabelName(15665,user.getLanguage())%></wea:item>
<wea:item>
<INPUT class=InputStyle maxLength=30 style="WIDTH: 90%" name="rptitle" onchange='checkinput("rptitle","rptitlespan")' value="<%=rptitle%>">
<SPAN id=rptitlespan><% if(rptitle.equals("")) {%><IMG src="/images/BacoError_wev8.gif" align=absMiddle><%}%>
</SPAN>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(1867,user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="resourceid" browserValue='<%=resourceid %>'
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp?selectedids="
hasInput="true" isSingle="true" hasBrowser="true" isMustInput='2'
completeUrl="/data.jsp" linkUrl="javascript:openhrm($id$)" width="120px"
browserSpanValue='<%=Util.toScreen(ResourceComInfo.getResourcename(resourceid),user.getLanguage()) %>'>
</brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(6099,user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" id="rptypeid" name="rptypeid" browserValue='<%=rptypeid %>'
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/award/AwardTypeBrowser.jsp?selectedids="
hasInput="true" isSingle="true" hasBrowser="true" isMustInput='2'
completeUrl="/data.jsp?type=HrmAwardType"width="120px"
_callback="doSetValue"
browserSpanValue='<%=Util.toScreen(AwardComInfo.getAwardName(rptypeid),user.getLanguage())%>'>
</brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(1962,user.getLanguage())%></wea:item>
<wea:item>
<button class=Calendar type="button" id=selectbememberdate onClick="getHrmDate(rpdatespan, rpdate)"></button>
<input class=inputstyle type="hidden" name="rpdate" id="rpdate" value="<%=rpdate%>">
<span id=rpdatespan>
<%=rpdate%>
<% if(rpdate.equals("")) {%> <img src="/images/BacoError_wev8.gif" align=absMiddle><%}%>
</span>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(15667,user.getLanguage())%></wea:item>
<wea:item>
<textarea class=InputStyle style="WIDTH: 90%" name=rpexplain rows=6 ><%=rpexplain%></textarea>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(15432,user.getLanguage())%></wea:item>
<wea:item>
<textarea class=InputStyle style="WIDTH: 90%" name=rptransact rows=6 ><%=Util.StringReplace(rptransact,"<br>","\n")%></textarea>
</wea:item>
</wea:group>
</wea:layout>
</FORM>
<%if("1".equals(isDialog)){ %>
</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(309,user.getLanguage())%>" id="zd_btn_cancle" class="zd_btn_cancle" onclick="dialog.closeByHand();">
</wea:item>
</wea:group>
</wea:layout>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
resizeDialog(document);
});
</script>
<%} %>
<script language=javascript>
function submitData() {
if(check_form(hrmaward,'rptitle,rptypeid,resourceid,rpdate')){
hrmaward.submit();
}
}
function goPunishManagerBack(){
document.location.href="/hrm/award/HrmAward.jsp";
}
function onShowResource(inputname,spanname){
data = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/resource/MutiResourceBrowser.jsp?resourceids="+jQuery("input[name=resourceid]").val());
if (data!=null){
if (data.id!= ""){
ids = data.id.split(",");
names =data.name.split(",");
sHtml = "";
for( var i=0;i<ids.length;i++){
if(ids[i]!=""){
//update by liaodong for qc57566 in 20131011 start
//sHtml = sHtml+"<a href=/hrm/resource/HrmResource.jsp?id="+ids[i]+"'>"+names[i]+"</a> ";
sHtml = sHtml+"<a href=/hrm/resource/HrmResource.jsp?id="+ids[i]+">"+names[i]+"</a> ";
//end
}
}
jQuery(inputname).val(data.id.substring(1,data.id.length));
jQuery(spanname).html(sHtml);
}else{
jQuery(spanname).html("<IMG src='/images/BacoError_wev8.gif' align=absMiddle>");
jQuery(inputname).val("0");
}
}
}
function onShowAwardTypeID(spanname, inputname){
data = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/award/AwardTypeBrowser.jsp");
if (data!=null){
if (data.id!= ""){
jQuery(spanname).html(data.name);
jQuery(inputname).val(data.id);
document.hrmaward.action="HrmAwardAdd.jsp";
document.hrmaward.submit();
}else{
jQuery(spanname).html("<img src='/images/BacoError_wev8.gif' align=absMiddle>");
jQuery(inputname).val("");
}
}
}
</script>
<!--
<script language=vbs>
sub onShowResourceID(spanname, inputname)
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp")
if (Not IsEmpty(id)) then
if id(0)<> "" then
spanname.innerHtml = "<A href='/hrm/resource/HrmResource.jsp?id="&id(0)&"'>"&id(1)&"</A>"
inputname.value=id(0)
else
spanname.innerHtml = "<img src='/images/BacoError_wev8.gif' align=absMiddle>"
inputname.value=""
end if
end if
end sub
sub onShowResource(inputname,spanname)
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/resource/MutiResourceBrowser.jsp?resourceids="+hrmaward.resourceid.value)
if (Not IsEmpty(id)) then
if id(0)<> "" then
resourceids = id(0)
resourcename = id(1)
sHtml = ""
resourceids = Mid(resourceids,2,len(resourceids))
resourcename = Mid(resourcename,2,len(resourcename))
inputname.value= resourceids
while InStr(resourceids,",") <> 0
curid = Mid(resourceids,1,InStr(resourceids,",")-1)
curname = Mid(resourcename,1,InStr(resourcename,",")-1)
resourceids = Mid(resourceids,InStr(resourceids,",")+1,Len(resourceids))
resourcename = Mid(resourcename,InStr(resourcename,",")+1,Len(resourcename))
sHtml = sHtml&"<a href="&linkurl&curid&">"&curname&"</a> "
wend
sHtml = sHtml&"<a href="&linkurl&resourceids&">"&resourcename&"</a> "
spanname.innerHtml = sHtml
else
spanname.innerHtml = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>"
inputname.value="0"
end if
end if
end sub
sub onShowAwardTypeID(spanname, inputname)
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/award/AwardTypeBrowser.jsp")
if (Not IsEmpty(id)) then
if id(0)<> "" then
spanname.innerHtml = id(1)
inputname.value=id(0)
document.hrmaward.action="HrmAwardAdd.jsp"
document.hrmaward.submit()
else
spanname.innerHtml = "<img src='/images/BacoError_wev8.gif' align=absMiddle>"
inputname.value=""
end if
end if
end sub
</script>
-->
</BODY>
<SCRIPT language="javascript" defer="defer" src="/js/datetime_wev8.js"></script>
<SCRIPT language="javascript" defer="defer" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</HTML>