PeriodBrowserMultiTree.jsp
9.77 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.general.PageManagerUtil " %>
<%@ page import="java.util.*" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="recordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="recordSet2" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="recordSet3" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="UserDefaultManager" class="weaver.docs.tools.UserDefaultManager" scope="session"/>
<jsp:useBean id="xssUtil" class="weaver.filter.XssUtil" scope="page" />
<%
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = "";
String needfav = "1";
String needhelp = "";
int from = Util.getIntValue(request.getParameter("from"), -1);
String callbkfun = Util.null2String(request.getParameter("callbkfun"));
String tableName = Util.null2String(request.getParameter("tableName"));
int tabId = Util.getIntValue(request.getParameter("tabId"), 1);
String optFrame1 = "/fna/mulDimensions/budgetDimension/browser/periodBrowser/PeriodBrowserMultiTreeTop.jsp?tableName="+tableName;
String optFrame3 = "/fna/mulDimensions/budgetDimension/browser/periodBrowser/PeriodBrowserMultiQuery.jsp?tableName="+tableName;
String optFrame = "";
String type = "";
if(tabId==1){
type = "tree";
optFrame = optFrame1;
}else if(tabId==3){
type = "query";
optFrame = optFrame3;
}
String selectids = Util.null2String(request.getParameter("selectids"));
%>
<HTML><HEAD>
<link REL="stylesheet" type="text/css" href="/css/Weaver_wev8.css" />
<script language=javascript src="/workplan/calendar/src/Plugins/jquery.form_wev8.js"></script>
<script type="text/javascript" src="/js/ecology8/base/jquery-ui_wev8.js"></script>
<link type="text/css" href="/js/dragBox/e8browser_wev8.css" rel=stylesheet>
<script type="text/javascript" src="/js/dragBox/ajaxmanager_wev8.js"></script>
<script type="text/javascript" src="/js/dragBox/rightspluingForBrowser_wev8.js"></script>
</head>
<body scroll="no">
<%@ include file="/systeminfo/leftMenuCommon.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{" + SystemEnv.getHtmlLabelName(197, user.getLanguage())+",javascript:btnsearchClick(),_self} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{" + SystemEnv.getHtmlLabelName(826, user.getLanguage())+",javascript:btnokClick(),_self} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{" + SystemEnv.getHtmlLabelName(311, user.getLanguage())+",javascript:btnclearClick(),_self} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{" + SystemEnv.getHtmlLabelName(201, user.getLanguage())+",javascript:btncancelClick(),_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 class="e8_btn_top" type="button" id="btnQry" onclick="btnsearchClick();"
value="<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>"/>
<span title="<%=SystemEnv.getHtmlLabelName(23036, user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<script type="text/javascript">
function btnsearchClick(){
jQuery("#btnsearch").click();
}
function btnokClick(){
jQuery("#btnok").click();
}
function btnclearClick(){
jQuery("#btnclear").click();
}
function btncancelClick(){
jQuery("#btncancel").click();
}
</script>
<div class="zDialog_div_content">
<FORM id="weaver" NAME="SearchForm" STYLE="margin-bottom:0" action="" onsubmit="return false;" method=post>
<input type="hidden" name="sqlwhere" value='<%=xssUtil.put(Util.null2String(request.getParameter("sqlwhere")))%>'>
<input type="hidden" name="pagenum" value=''>
<input type="hidden" name="from" id="from" value='<%=from%>'>
<input type="hidden" name="callbkfun" id="callbkfun" value='<%=callbkfun%>'>
<input type="hidden" name="type" id="type" value="<%=type %>" />
<input type="hidden" name="tableName" id="tableName" value="<%=tableName %>" />
<input type="hidden" name="periodId" id="periodId" value="0" />
<input type="hidden" name="name" id="name" value="" />
<input type="hidden" name="code" id="code" value="" />
<IFRAME name=optFrame id=optFrame src="<%=optFrame %>" width="100%" height="180px" frameborder=no scrolling=yes>
//浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</IFRAME>
<div id="dialog" style="height: 250px;">
<div id='colShow'></div>
</div>
</form>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="">
<wea:item type="toolbar">
<input type="button" class="zd_btn_submit" id=btnok value="<%=SystemEnv.getHtmlLabelName(826,user.getLanguage())%>" />
<input type="button" class="zd_btn_submit" id=btnclear value="<%=SystemEnv.getHtmlLabelName(311,user.getLanguage())%>" />
<input type="button" class="zd_btn_submit" id=btncancel value="<%=SystemEnv.getHtmlLabelName(201,user.getLanguage())%>" />
</wea:item>
</wea:group>
</wea:layout>
</div>
<input type="button" style="display: none;" class="e8_btn_top" id=btnsearch value="<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>" />
<input type="button" style="display: none;" class="e8_btn_top" id=btnclear2 value="<%=SystemEnv.getHtmlLabelName(311,user.getLanguage())%>" />
<input type="button" style="display: none;" class="e8_btn_top" id=btncancel2 value="<%=SystemEnv.getHtmlLabelName(201,user.getLanguage())%>" />
</body>
<SCRIPT language="javascript">
var parentWin = null;
var dialog = null;
try{
dialog = parent.parent.parent.getDialog(parent.parent);
}catch(ex1){}
function quickQry(qname){
//alert("quickQry qname="+qname);
}
jQuery(document).ready(function(){
resizeDialog(document);
showMultiDialog("<%=selectids %>");
});
function changeQueryType(tabId){
jQuery("#periodId").val("0");
jQuery("#name").val("");
jQuery("#code").val("");
if(tabId==1){
jQuery("#type").val("tree");
document.getElementById("optFrame").src = "<%=optFrame1 %>";
}else if(tabId==3){
jQuery("#type").val("query");
document.getElementById("optFrame").src = "<%=optFrame3 %>";
}
}
function showMultiDialog(selectids){
var config = null;
config= rightsplugingForBrowser.createConfig();
config.srchead=["<%=SystemEnv.getHtmlLabelName(195,user.getLanguage())%>","<%=SystemEnv.getHtmlLabelName(1321,user.getLanguage())%>"];//名称;编码
config.container =jQuery("#colShow");
config.searchLabel="";
config.hiddenfield="id";
config.saveLazy = true;
config.srcurl = "/fna/mulDimensions/budgetDimension/browser/periodBrowser/PeriodBrowserMultiAjax.jsp?src=src";
config.desturl = "/fna/mulDimensions/budgetDimension/browser/periodBrowser/PeriodBrowserMultiAjax.jsp?src=dest";
config.pagesize = 10;
config.formId = "weaver";
try{
config.dialog = dialog;
}catch(e){
}
config.selectids = selectids;
jQuery("#colShow").html("");
rightsplugingForBrowser.createRightsPluing(config);
jQuery("#btnok").bind("click",function(){
rightsplugingForBrowser.system_btnok_onclick(config);
});
jQuery("#btnclear").bind("click",function(){
rightsplugingForBrowser.system_btnclear_onclick(config);
});
jQuery("#btncancel").bind("click",function(){
rightsplugingForBrowser.system_btncancel_onclick(config);
});
jQuery("#btnsearch").bind("click",function(){
initQuery();
rightsplugingForBrowser.system_btnsearch_onclick(config);
});
}
function initQuery(){
var type = jQuery("#type").val();
if(type == "tree"){
jQuery("#name").val("");
jQuery("#code").val("");
}else if(type == "query"){
jQuery("#periodId").val("0");
var name = optFrame.jQuery("#name").val();
var code = optFrame.jQuery("#code").val();
jQuery("#name").val(name);
jQuery("#code").val(code);
}
}
function btnOnSearch(){
jQuery("#btnsearch").trigger("click");
}
function submitOk(){
var dest = jQuery("#colShow").find("table.e8_box_target tbody tr");
var ids = jQuery("#colShow").find("#systemIds").val();
var names = "";
if(!!ids){
dest.each(function(){
var name = jQuery(this).children("td").eq(1).text();
if(names==""){
names = name;
}else{
names=names + ","+name;
}
});
}
var returnjson = {"id":ids,"name":names};
returnValue(returnjson);
}
function submitClear(){
var returnjson = {id:"",name:""};
returnValue(returnjson);
}
function returnValue(returnjson){
if(dialog){
try{
dialog.callback(returnjson);
}catch(e){}
try{
dialog.close(returnjson);
}catch(e){}
}else{
window.parent.parent.returnValue = returnjson;
window.parent.parent.close();
}
}
</script>
</html>