BaseSetting.jsp
4.7 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
<%@ 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="SecCategoryComInfo" class="weaver.docs.category.SecCategoryComInfo" scope="page" />
<%
boolean canedit = false;
//判断是否有权限
if (HrmUserVarify.checkUserRight("GP_BaseSettingMaint", user)) {
canedit = true;
}
%>
<HTML>
<HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<style type="text/css">
.maintable,.listtable{width: 100%;}
.maintable td,.listtable td{line-height: 28px;padding-left: 5px;}
.maintable td.title{background: #E9E7D8;}
.listtable td{border-bottom: 1px #F1F0E7 solid;}
.listtable tr.header td{font-weight: bold;border-bottom: 1px #DDD9C3 solid;}
</style>
<%@ include file="/secondwev/common/head.jsp" %>
</head>
<%
String titlename = SystemEnv.getHtmlLabelName(382505,user.getLanguage());
String operation = Util.null2String(request.getParameter("operation"));
String docsecid = "";
if("save".equals(operation)){
docsecid = Util.null2String(request.getParameter("docsecid"));
rs.executeSql("delete from TM_BaseSetting");
boolean res = rs.executeSql("insert into TM_BaseSetting(docsecid) values('"+docsecid+"')");
if(res) staticobj.putObject("docsecid",docsecid);
}else{
String sql = "select * from TM_BaseSetting";
rs.executeSql(sql);
if(rs.next()){
docsecid = Util.null2String(rs.getString("docsecid"));
}
}
String docpath = "";
if(!docsecid.equals("") && !docsecid.equals("0")){
docpath = SecCategoryComInfo.getAllParentName(docsecid);
if(!"".equals(docpath)) docpath += "/";
docpath += SecCategoryComInfo.getSecCategoryname(docsecid);
}
%>
<BODY style="overflow: auto">
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp"%>
<%
if(canedit){
RCMenu += "{"+SystemEnv.getHtmlLabelName(86,user.getLanguage())+",javascript:submitData(this),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp"%>
<form id="baseForm" name="baseForm" action="BaseSetting.jsp" method="post">
<input type="hidden" id="operation" name="operation" value="">
<table width=100% height=100% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
</colgroup>
<tr>
<td height="1" colspan="3"></td>
</tr>
<tr>
<td></td>
<td valign="top">
<div style="width: 100%;line-height: 28px;border-bottom:2px #D6D6D6 solid;font-size: 14px;font-weight: bold;margin-bottom: 10px;">
<%=titlename %>
</div>
<table class="maintable" cellspacing="5" border="0" style="margin-top: 20px;">
<colgroup><col width="20%"/><col width="30%"/><col width="*"/></colgroup>
<tr>
<td class="title"><%=SystemEnv.getHtmlLabelName(22210,user.getLanguage()) %></td>
<td>
<%if(canedit){ %>
<div id="docseciddiv" class="browserdiv"></div>
<%}else{ %>
<%=docpath %>
<%} %>
</td>
<td></td>
</tr>
</table>
</td>
<td></td>
</tr>
</table>
</form>
<script type="text/javascript" defer="defer">
<%if("save".equals(operation)){%>
alert("<%=SystemEnv.getHtmlLabelName(18758,user.getLanguage()) %>!");
<%}%>
<%if(canedit){ %>
jQuery(document).ready(function(){
jQuery("#docseciddiv").e8Browser({
name:"docsecid",
viewType:"0",
browserValue:"<%=docsecid%>",
isMustInput:"1",
browserSpanValue:"<%=docpath%>",
hasInput:false,
linkUrl:"#",
isSingle:true,
completeUrl:"",
//browserUrl:"/systeminfo/BrowserMain.jsp?url=/docs/category/CategoryBrowser.jsp",
browserUrl:"/systeminfo/BrowserMain.jsp?url=/workrelate/comm/MultiCategorySingleBrowser.jsp",
width:"",
hasAdd:false,
needHidden:true,
defaultRow: 1,
zDialog:true,
isAutoComplete:false,
_callback:"",
nameKey:"path"
});
});
function submitData(obj) {
jQuery("#operation").val("save");
obj.disabled = true;
jQuery("#baseForm").submit();
}
function onShowCatalog() {
var datas = showModalDialog("/systeminfo/BrowserMain.jsp?url=/docs/category/MultiCategorySingleBrowser.jsp");
if (datas) {
if (datas.id!= "") {
jQuery("#docpath").html(datas.path);
jQuery("#docsecid").val(datas.id);
}else{
jQuery("#docpath").html("");
jQuery("#docsecid").val("");
}
}
}
<%}%>
</script>
</BODY>
</HTML>