HrmContractTypeEdit.jsp
8.3 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
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.docs.category.*" %>
<%@ 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="rs2" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="SubCategoryComInfo" class="weaver.docs.category.SubCategoryComInfo" scope="page" />
<jsp:useBean id="SecCategoryComInfo" class="weaver.docs.category.SecCategoryComInfo" scope="page" />
<jsp:useBean id="MainCategoryComInfo" class="weaver.docs.category.MainCategoryComInfo" scope="page" />
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<html>
<%
if(!HrmUserVarify.checkUserRight("HrmContractTypeView:View", user)){
response.sendRedirect("/notice/noright.jsp");
return;
}
%>
<head>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script LANGUAGE="JavaScript" SRC="/js/checkinput_wev8.js"></script>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
</head>
<body>
<%
String id = Util.null2String(request.getParameter("id"));
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(89,user.getLanguage())+":"+SystemEnv.getHtmlLabelName(614,user.getLanguage())+SystemEnv.getHtmlLabelName(716,user.getLanguage());
String needfav ="1";
String needhelp ="";
String typename = "";
int saveurl = -1;
String templetid = "";
String ishirecontract = "";
String remindaheaddate = "";
String remindman = "";
int detachable=Util.getIntValue(String.valueOf(session.getAttribute("detachable")),0);
String usertype = user.getLogintype();
String mainid=Util.null2String(request.getParameter("mainid"));
String subid=Util.null2String(request.getParameter("subid"));
int secid = 0;
int subcompanyid = Util.getIntValue(request.getParameter("subcompanyid"));
String sql = "select * from HrmContractType where id = "+id;
rs.executeSql(sql);
while(rs.next()){
typename = Util.null2String(rs.getString("typename"));
saveurl = Util.getIntValue(rs.getString("saveurl"),-1);
templetid = Util.null2String(rs.getString("contracttempletid"));
ishirecontract = Util.null2String(rs.getString("ishirecontract"));
remindaheaddate = Util.null2String(rs.getString("remindaheaddate"));
remindman = Util.null2String(rs.getString("remindman"));
}
String path = "";
if (saveurl != -1) {
path = "/"+CategoryUtil.getCategoryPath(saveurl);
}%>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
if(HrmUserVarify.checkUserRight("HrmContractTypeEdit:Edit", user)){
RCMenu += "{"+SystemEnv.getHtmlLabelName(93,user.getLanguage())+",javascript:dosave(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
if(HrmUserVarify.checkUserRight("HrmContractType:Log", user)){
RCMenu += "{"+SystemEnv.getHtmlLabelName(83,user.getLanguage())+",/systeminfo/SysMaintenanceLog.jsp?sqlwhere=where operateitem="+81+" and relatedid="+id+",_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
RCMenu += "{"+SystemEnv.getHtmlLabelName(1290,user.getLanguage())+",/hrm/contract/contracttype/HrmContractType.jsp?subcompanyid1="+subcompanyid+",_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table width=100% height=100% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="0" colspan="3"></td>
</tr>
<tr>
<td ></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top">
<FORM id=contracttype name=contracttype action="HrmConTypeOperation.jsp" method=post>
<input class=inputstyle type=hidden name=operation>
<input class=inputstyle type=hidden name=id value="<%=id%>">
<TABLE class=ViewForm>
<COLGROUP>
<COL width="15%">
<COL width="85%">
<TBODY>
<TR class=Title>
<TH colSpan=3><%=SystemEnv.getHtmlLabelName(6158,user.getLanguage())%></TH>
</TR>
<TR class= Spacing style="height:2px">
<TD class=Line1 colSpan=3 ></TD>
</TR>
<%
%>
<tr>
<TD ><%=SystemEnv.getHtmlLabelName(15520,user.getLanguage())%> </TD>
<td class=Field>
<%=typename%>
</td>
</tr>
<TR style="height:1px"><TD class=Line colSpan=2></TD></TR>
<%if(detachable==1){%>
<tr>
<td width=15%><%=SystemEnv.getHtmlLabelName(17868,user.getLanguage())%></td>
<td width=85% class=field>
<%=SubCompanyComInfo.getSubCompanyname(String.valueOf(subcompanyid))%>
</td>
</tr>
<%}%>
<TR style="height:1px"><TD class=Line colSpan=2></TD></TR>
<tr>
<TD><%=SystemEnv.getHtmlLabelName(15786,user.getLanguage())%></TD>
<td class=Field>
<%
sql = "select templetname from HrmContractTemplet where id = "+templetid;
rs2.executeSql(sql);
String templetname = "";
while(rs2.next()){
templetname = rs2.getString("templetname");
}
%>
<%=templetname%>
</td>
</TR>
<TR style="height:1px"><TD class=Line colSpan=2></TD></TR>
<tr>
<TD ><%=SystemEnv.getHtmlLabelName(15791,user.getLanguage())%> </TD>
<td class=Field>
<%if(ishirecontract.equals("0")){%><%=SystemEnv.getHtmlLabelName(161,user.getLanguage())%><%}%>
<%if(ishirecontract.equals("1")){%><%=SystemEnv.getHtmlLabelName(163,user.getLanguage())%><%}%>
</td>
</tr>
<TR style="height:1px"><TD class=Line colSpan=2></TD></TR>
<tr>
<TD ><%=SystemEnv.getHtmlLabelNames("20920,15792",user.getLanguage())%></TD>
<td class=Field><%=remindaheaddate%><%=SystemEnv.getHtmlLabelName(1925,user.getLanguage())%></td>
</tr>
<TR style="height:1px"><TD class=Line colSpan=2></TD></TR>
<tr>
<TD ><%=SystemEnv.getHtmlLabelName(15793,user.getLanguage())%> </TD>
<td class=Field>
<%=ResourceComInfo.getMulResourcename(remindman)%>
</td>
</tr>
<TR style="height:1px"><TD class=Line colSpan=2></TD></TR>
<tr>
<td ><%=SystemEnv.getHtmlLabelName(15787,user.getLanguage())%></td>
<td class=field>
<%=path%>
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</TABLE>
</td>
<td></td>
</tr>
<tr>
<td height="0" colspan="3"></td>
</tr>
</table>
<script language=vbs>
sub onShowTemplet()
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/contract/contracttemplet/HrmConTempletBrowser.jsp")
if Not isempty(id) then
if id(0)<> 0 then
templetidspan.innerHtml = id(1)
contracttype.contracttempletid.value=id(0)
else
templetidspan.innerHtml = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>"
contracttype.contracttempletid.value=""
end if
end if
end sub
sub onShowResource(inputname,spanname)
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/resource/MutiResourceBrowser.jsp")
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
</script>
<script language=javascript>
function dosave(){
location="HrmContractTypeEditDo.jsp?id=<%=id%>&subcompanyid=<%=subcompanyid%>";
}
function dodelete(){
if(confirm("Are you sure to delete?")){
document.contracttype.operation.value = "delete";
document.contracttype.submit();
}
}
function mainchange(){
document.contracttype.action="HrmContractTypeEdit.jsp";
document.contracttype.submit();
}
function subchange(){
document.contracttype.action="HrmContractTypeEdit.jsp";
document.contracttype.submit();
}
function submitData() {
contracttype.submit();
}
</script>
</body>
</html>