ESBFormFieldsBrowser.jsp
12.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
242
243
244
245
246
247
248
249
250
251
252
253
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.RecordSetDataSource" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.workflow.dmlaction.*"%>
<jsp:useBean id="DMLActionBase" class="weaver.workflow.dmlaction.commands.bases.DMLActionBase" scope="page" />
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="FieldBase" class="weaver.workflow.dmlaction.commands.bases.FieldBase" scope="page" />
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page" />
<HTML><HEAD>
<link href="/css/Weaver_wev8.css" rel="stylesheet" type="text/css" >
<link rel="stylesheet" href="/wui/common/jquery/plugin/zTree/css/zTreeStyle/zTreeStyle_wev8.css" type="text/css">
<LINK REL=stylesheet type=text/css HREF="/css/Weaver_wev8.css"></HEAD>
<link rel="stylesheet" href="/css/ecology8/request/requestTopMenu_wev8.css" type="text/css" />
<link rel="stylesheet" href="/wui/theme/ecology8/jquery/js/zDialog_e8_wev8.css" type="text/css" />
<%
String formid = Util.null2String(request.getParameter("formid"));
String isbill = Util.null2String(request.getParameter("isbill"));
String fieldname = Util.null2String(request.getParameter("fieldname")).trim();
String fieldtype = Util.null2String(request.getParameter("fieldtype"));
String issearch = Util.null2String(request.getParameter("issearch"));
String tableInfo = Util.null2String(request.getParameter("tableinfo"));
String showdetail = Util.null2String(request.getParameter("showdetail")); //需要操作的是流程的明细表,显示明细表字段用于选择
String tableid = Util.null2String(request.getParameter("tableid")); //明细表id
%>
<script language="javascript">
</script>
<BODY>
<div class="zDialog_div_content">
<DIV align=right>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
//RCMenu += "{"+SystemEnv.getHtmlLabelName(197,user.getLanguage())+",javascript:onSubmit(),_self} " ;
//RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(197,user.getLanguage())+",javascript:onSubmit(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(311,user.getLanguage())+",javascript:onClear(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
int detailTableId = -1;
if(!"".equals(tableInfo) && tableInfo.startsWith("detail_")){ //说明选择了明细表
String [] sourceinfo = tableInfo.split("_",-1);
if(sourceinfo.length == 3){
detailTableId = Util.getIntValue(Util.null2String(sourceinfo[1]),-1);
showdetail = "1";
}
} else {
detailTableId = -1;
showdetail = "0";
}
%>
<%@ 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" onclick="onSubmit()" class="e8_btn_top" value="<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>"></input>
<span title="<%=SystemEnv.getHtmlLabelName(826,user.getLanguage()) %>" class="cornerMenu"></span>
</td>
</tr>
</table>
<FORM NAME=SearchForm STYLE="margin-bottom:0" action="/workflow/action/ESBFormFieldsBrowser.jsp" method=post>
<input type="hidden" name=formid value="<%=formid %>">
<input type="hidden" name=isbill value="<%=isbill %>">
<input type="hidden" name=issearch value="1">
<input type="hidden" name="showdetail" value="<%=showdetail%>">
<input type="hidden" name="tableid" value="<%=tableid%>">
<wea:layout type="4col">
<wea:group context='<%= SystemEnv.getHtmlLabelName(20331,user.getLanguage())%>' attributes="{'groupSHBtnDisplay':'none'}">
<wea:item><%=SystemEnv.getHtmlLabelName(606,user.getLanguage())%></wea:item>
<wea:item>
<input type=text size=20 class=inputstyle maxlength=20 id="fieldname" name="fieldname" value="<%=fieldname%>">
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(63,user.getLanguage())%></wea:item>
<wea:item>
<SELECT class=InputStyle name="fieldtype"><!-- 选择类型 -->
<option value=""></option>
<option value="1" <%if("1".equals(fieldtype)){out.print("selected");} %>><%=SystemEnv.getHtmlLabelName(83678,user.getLanguage())%></option><!-- 表单数据 -->
<option value="2" <%if("2".equals(fieldtype)){out.print("selected");} %>><%=SystemEnv.getHtmlLabelName(83679,user.getLanguage())%></option><!-- 请求数据 -->
<option value="3" <%if("3".equals(fieldtype)){out.print("selected");} %>><%=SystemEnv.getHtmlLabelName(83680,user.getLanguage())%></option><!-- 节点操作者数据 -->
</SELECT>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(28006,user.getLanguage())%></wea:item>
<wea:item>
<%
List<Map<String,String>> tableList = DMLActionBase.getDmlSource(formid,isbill,user.getLanguage());
%>
<select id="tableinfo" name="tableinfo" style="width:80px!important;" onchange="onShowFormSerach();">
<%
for(Map<String,String> sourceTable : tableList){
String tableName = Util.null2String(sourceTable.get("tableName"));
String tableId = Util.null2String(sourceTable.get("tableId"));
if ("undefined".equals(tableid)) {
%>
<option value="<%=tableId%>" <%if(tableId.equals(tableInfo)){%> selected="selected" <%}%>><%=tableName%></option>
<%
} else if (!"".equals(tableid) && tableid.contains("detail")
&& (tableid.equals(tableId) || tableId.contains("main"))) {
%>
<option value="<%=tableId%>" <%if(tableId.equals(tableid)){%> selected="selected" <%}%> ><%=tableName%></option>
<%
} else if (tableid.contains("main") == true && tableId.contains("main")){
%>
<option value="<%=tableId%>" selected="selected" ><%=tableName%></option>
<%
}
}
%>
</select>
</wea:item>
</wea:group>
</wea:layout>
<wea:layout>
<wea:group context='<%= SystemEnv.getHtmlLabelName(33046,user.getLanguage())%>'>
<wea:item attributes="{'colspan':'full','isTableList':'true'}">
<%
String PageId = "dmlFormFieldsBrowser";
String tableString=""+
"<table datasource=\"weaver.workflow.action.ActionDataSource.getESBFormField\" sourceparams=\"formid:"+formid+"+isbill:"+isbill+"+fieldname:"+fieldname+"+fieldtype:"+fieldtype+"+issearch:"+issearch+"+showdetail:" + showdetail + "+tableid:" + detailTableId + "+tableInfo:" + tableInfo +"\" instanceid=\"Table\" pagesize=\""+PageIdConst.getPageSize(PageId,user.getUID())+"\" tabletype=\"none\">"+
" <checkboxpopedom id=\"none\" />"+
"<sql backfields=\"*\" sqlform=\"tmptable\" sqlorderby=\"id\" sqlprimarykey=\"id\" sqlsortway=\"asc\" sqldistinct=\"true\" />"+
"<head>"+
"<col width=\"0%\" hide=\"true\" transmethod=\"weaver.general.KnowledgeTransMethod.forHidden\" text=\"\" column=\"bean\"/>"+
"<col width=\"50%\" hide=\"false\" transmethod=\"weaver.general.KnowledgeTransMethod.forHtml\" text=\""+SystemEnv.getHtmlLabelName(15456,user.getLanguage())+"\" column=\"jfieldlabel\"/>"+
"<col width=\"50%\" hide=\"false\" transmethod=\"weaver.general.KnowledgeTransMethod.forHtml\" text=\""+SystemEnv.getHtmlLabelName(685,user.getLanguage())+"\" column=\"jfieldname\"/>"+
"<col width=\"50%\" hide=\"false\" transmethod=\"weaver.general.KnowledgeTransMethod.forHtml\" text=\""+SystemEnv.getHtmlLabelName(686,user.getLanguage())+"\" column=\"jfielddbtype\"/>"+
"<col width=\"50%\" hide=\"false\" transmethod=\"weaver.general.KnowledgeTransMethod.forHtml\" text=\""+SystemEnv.getHtmlLabelName(83682,user.getLanguage())+"\" column=\"fielddesc\"/>"+
"</head>"+
"</table>";
%>
<wea:SplitPageTag tableString='<%=tableString%>' isShowTopInfo="false" mode="run"/>
<input type="hidden" name="pageId" id="pageId" value="<%=PageId %>"/>
</wea:item>
</wea:group>
</wea:layout>
<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" class=zd_btn_cancle accessKey=2 id=btnclear value="2-<%=SystemEnv.getHtmlLabelName(311,user.getLanguage())%>" onclick='onClear();'></input>
<input type="button" class=zd_btn_cancle accessKey=T id=btncancel value="T-<%=SystemEnv.getHtmlLabelName(201,user.getLanguage())%>" onclick='closeDialog();'></input>
</wea:item>
</wea:group>
</wea:layout>
<script type="text/javascript">
jQuery(document).ready(function(){
resizeDialog(document);
});
</script>
</div>
</FORM>
</DIV>
</BODY>
</HTML>
<script type="text/javascript">
try{
parent.setTabObjName("<%=SystemEnv.getHtmlLabelName(83684,user.getLanguage())%>");
}catch(e){
if(window.console)console.log(e);
}
</script>
<script language="javascript">
var parentWin = null;
var dialog = null;
try{
parentWin = parent.parent.getParentWindow(parent);
dialog = parent.parent.getDialog(parent);
}
catch(e)
{}
function afterDoWhenLoaded(){
//hideTH();
jQuery(".ListStyle").children("tbody").find("tr[class!='Spacing']").bind("click",function(){
//alert('sdfsdfdf');
//alert($(this).find("td:first").text())
//alert($(this).find("td:first").next().next().text()+" - "+$(this).find("td:first").next().next().next().text()+" - "+$(this).find("td:first").next().next().next().next().text())
var jsonval = jQuery(this).find("td:eq(1)>input").val(); //这个隐藏域中存储了一个字段信息的json
//var returnjson = {id:$(this).find("td:first").next().next().text(),name:$(this).find("td:first").next().next().next().text(),a1:$(this).find("td:first").next().next().next().next().text()};
var returnjson = eval('(' + jsonval + ')');
returnjson.id = returnjson.labelname;
returnjson.name = returnjson.fieldname;
if(dialog){
dialog.callback(returnjson);
}else{
window.parent.returnValue = returnjson;
window.parent.close();
}
});
/*if(dialog){
dialog.callback({
id:jQuery(curTr.cells[0]).text(),
name:jQuery(curTr.cells[1]).text(),
a1:jQuery(curTr.cells[2]).text()});
}else{
window.parent.returnValue = {
id:jQuery(curTr.cells[0]).text(),
name:jQuery(curTr.cells[1]).text(),
a1:jQuery(curTr.cells[2]).text()
};
window.parent.close();
}*/
};
function submitClear()
{
var returnjson ={id:"",name:"",type:""};
if(dialog){
dialog.callback(returnjson);
}else{
window.parent.returnValue = returnjson;
window.parent.close();
}
}
function btnclear_onclick(){
var returnjson = {id:"",name:"",type:""};
if(dialog){
dialog.callback(returnjson);
}else{
window.parent.returnValue = returnjson;
window.parent.close();
}
}
function onClear()
{
btnclear_onclick() ;
}
function onSubmit()
{
SearchForm.submit();
}
function closeDialog()
{
if(dialog){
dialog.close();
}else{
window.parent.close() ;
}
}
</script>