CapitalStateBrowser.jsp
7.55 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
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ page import="weaver.general.Util" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="xssUtil" class="weaver.filter.XssUtil" scope="page" />
<HTML><HEAD>
<LINK REL=stylesheet type=text/css HREF=/css/Weaver_wev8.css>
<script type="text/javascript">
var parentWin = null;
var dialog = null;
try{
parentWin = parent.parent.getParentWindow(parent);
dialog = parent.parent.getDialog(parent);
}catch(e){}
</script>
</HEAD>
<%
String from = Util.null2String(request.getParameter("from"));
String sqlwhere1 = Util.null2String(request.getParameter("sqlwhere"));
String name = Util.null2String(request.getParameter("name"));
String description = Util.null2String(request.getParameter("description"));
String sqlwhere = " ";
int ishead = 0;
if(!sqlwhere1.equals("")){
if(ishead==0){
ishead = 1;
sqlwhere += sqlwhere1;
}
}
if(!name.equals("")){
if(ishead==0){
ishead = 1;
sqlwhere += " where name like '%";
sqlwhere += Util.fromScreen2(name,user.getLanguage());
sqlwhere += "%'";
}
else{
sqlwhere += " and name like '%";
sqlwhere += Util.fromScreen2(name,user.getLanguage());
sqlwhere += "%'";
}
}
if(!description.equals("")){
if(ishead==0){
ishead = 1;
sqlwhere += " where description like '%";
sqlwhere += Util.fromScreen2(description,user.getLanguage());
sqlwhere += "%'";
}
else{
sqlwhere += " and description like '%";
sqlwhere += Util.fromScreen2(description,user.getLanguage());
sqlwhere += "%'";
}
}
//from=other,不可选择系统状态
//from=search,可以选择系统状态
if(from.equals("other")){
if(ishead==0){
ishead=1;
/*1-5为系统状态*/
sqlwhere += " where id > 5 ";
}
else{
sqlwhere += " and id > 5 ";
}
}
%>
<BODY>
<jsp:include page="/systeminfo/commonTabHead.jsp">
<jsp:param name="mouldID" value="assest"/>
<jsp:param name="navName" value='<%=SystemEnv.getHtmlLabelNames("830",user.getLanguage()) %>'/>
</jsp:include>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
//RCMenu += "{"+SystemEnv.getHtmlLabelName(197,user.getLanguage())+",javascript:onSubmit(),_self} " ;
//RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(311,user.getLanguage())+",javascript:btnclear_onclick(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(201,user.getLanguage())+",javascript:dialog.close(),_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.getHtmlLabelNames("197",user.getLanguage())%>" class="e8_btn_top" onclick="onSubmit()"/>
<span title="<%=SystemEnv.getHtmlLabelName(23036,user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<FORM NAME=SearchForm STYLE="margin-bottom:0" action="CapitalStateBrowser.jsp" method=post>
<input type=hidden name=sqlwhere value="<%=xssUtil.put(sqlwhere1)%>">
<wea:layout type="4col">
<wea:group context='<%=SystemEnv.getHtmlLabelNames("15774",user.getLanguage())%>'>
<wea:item><%=SystemEnv.getHtmlLabelName(195,user.getLanguage())%></wea:item>
<wea:item><input class="InputStyle" name=name value='<%=name%>'></wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(433,user.getLanguage())%></wea:item>
<wea:item><input class="InputStyle" name=description value='<%=description%>'></wea:item>
</wea:group>
<wea:group context="" attributes="{'groupDisplay':'none'}">
<wea:item></wea:item>
</wea:group>
</wea:layout>
<%
String orderby =" id ";
String tableString = "";
int perpage=10;
String backfields = " id,name,description";
String fromSql = " CptCapitalState ";
tableString = " <table instanceid=\"BrowseTable\" id=\"BrowseTable\" tabletype=\"none\" pagesize=\""+perpage+"\" >"+
" <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlwhere)+"\" sqlorderby=\""+orderby+"\" sqlprimarykey=\"id\" sqlsortway=\"asc\" sqlisdistinct=\"true\" />"+
" <head>"+
" <col width=\"0%\" text=\""+"ID"+"\" column=\"id\" />"+
" <col width=\"25%\" text=\""+SystemEnv.getHtmlLabelNames("195",user.getLanguage())+"\" column=\"name\" orderkey=\"name\" />"+
" <col width=\"50%\" text=\""+SystemEnv.getHtmlLabelNames("433",user.getLanguage())+"\" column=\"description\" orderkey=\"description\" />"+
" </head>"+
" </table>";
%>
<wea:SplitPageTag tableString='<%=tableString %>' mode="run" />
</FORM>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="" attributes="{\"groupDisplay\":\"none\"}">
<wea:item type="toolbar">
<input type="button" accessKey=2 id=btnclear value="<%="2-"+SystemEnv.getHtmlLabelName(311,user.getLanguage())%>" id="zd_btn_submit" class="zd_btn_submit" onclick="btnclear_onclick();">
<input type="button" accessKey=T id=btncancel value="<%="T-"+SystemEnv.getHtmlLabelName(201,user.getLanguage())%>" id="zd_btn_cancle" class="zd_btn_cancle" onclick="dialog.close();">
</wea:item>
</wea:group>
</wea:layout>
<script type="text/javascript">
jQuery(document).ready(function(){
resizeDialog(document);
});
</script>
</div>
</BODY>
</HTML>
<script language="javascript">
function BrowseTable_onclick(e){
var e=e||event;
var target=e.srcElement||e.target;
if( target.nodeName =="TD"||target.nodeName =="A" ){
if(dialog){
var returnjson={id:jQuery(jQuery(target).parents("tr")[0].cells[1]).text(),name:jQuery(jQuery(target).parents("tr")[0].cells[2]).text(),other1:jQuery(jQuery(target).parents("tr")[0].cells[2]).text()};
try{
dialog.callback(returnjson);
}catch(e){}
try{
dialog.close(returnjson);
}catch(e){}
}else{
window.parent.parent.returnValue = {id:jQuery(jQuery(target).parents("tr")[0].cells[1]).text(),name:jQuery(jQuery(target).parents("tr")[0].cells[2]).text(),other1:jQuery(jQuery(target).parents("tr")[0].cells[2]).text()};
window.parent.parent.close();
}
}
}
function btnclear_onclick(){
if(dialog){
var returnjson={id:"0",name:"",other1:""};
try{
dialog.callback(returnjson);
}catch(e){}
try{
dialog.close(returnjson);
}catch(e){}
}else{
window.parent.parent.returnValue = {id:"",name:"",other1:""};
window.parent.parent.close();
}
}
$(function(){
$("#_xTable").find("table.ListStyle").live('click',BrowseTable_onclick);
});
function btnclear_onclick(){
if(dialog){
var returnjson={id:"",name:""};
try{
dialog.callback(returnjson);
}catch(e){}
try{
dialog.close(returnjson);
}catch(e){}
}else{
window.parent.parent.returnValue ={id:"",name:""};
window.parent.parent.close();
}
}
function onClear()
{
btnclear_onclick() ;
}
function onSubmit()
{
SearchForm.submit();
}
function onClose()
{
window.parent.parent.close();
}
</script>