DataSetBaseInfo.jsp
10.8 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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<%@page import="weaver.workflow.field.BrowserComInfo"%>
<%@page import="weaver.fna.budget.FnaWfSet"%>
<%@page import="weaver.systeminfo.label.LabelComInfo"%>
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/browserTag" prefix="brow"%>
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@page import="weaver.hrm.User"%>
<%@ page import="weaver.general.Util" %>
<%@page import="weaver.fna.encrypt.Des"%>
<%@ 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="UserDefaultManager" class="weaver.docs.tools.UserDefaultManager" scope="session" />
<jsp:useBean id="DataSourceXML" class="weaver.servicefiles.DataSourceXML" scope="page" />
<%
if(true) {
response.sendRedirect("/notice/noright.jsp") ;
return ;
}
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(82,user.getLanguage())+SystemEnv.getHtmlLabelName(83183,user.getLanguage());
String needfav ="1";
String needhelp ="";
String id = Util.null2String(request.getParameter("id"));
String datasetName = "";
String accountId = "";
int datasetType = 0;
String datasourcename = "";
String sourceSql = "";
String templateId = "";
String accountname="";
String sql = "select * from FnaDatasSet where id = ?";
rs.executeQuery(sql,id);
if(rs.next()){
datasetName = Util.null2String(rs.getString("datasetName"));
accountId = Util.null2String(rs.getString("accountId"));
datasetType = Util.getIntValue(rs.getString("datasetType"));
sourceSql = Util.null2String(rs.getString("sourceSql"));
templateId = Util.null2String(rs.getString("templateId"));
datasourcename = Util.null2String(rs.getString("datasourcename"));
}
String sql1 = "select * from FnaAccountInfo where id = ?";
rs.executeQuery(sql1,accountId);
if(rs.next()){
accountname=rs.getString("accountName");
}
%>
<%@page import="weaver.filter.XssUtil"%>
<%@ page import="weaver.fna.encrypt.Des" %>
<%@ page import="weaver.servicefiles.DataSourceXML" %>
<%@ page import="weaver.fna.general.FnaCommon" %>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script language="javascript" src="/js/weaver_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDrag_wev8.js"></script>
<script language=javascript src="/js/checkbox/jquery.tzCheckbox_wev8.js"></script>
<script language="javascript" src="/fna/js/e8Common_wev8.js?r=3"></script>
<script type="text/javascript" src="/fna/encrypt/des/des_wev8.js"></script>
</head>
<BODY style="overflow:hidden;">
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{" + SystemEnv.getHtmlLabelName(86, user.getLanguage())
+ ",javascript:doSave(false),_self} ";
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<div class="zDialog_div_content">
<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="btnSave" onclick="doSave();"
value="<%=SystemEnv.getHtmlLabelName(86,user.getLanguage())%>"/><!-- 保存 -->
<span title="<%=SystemEnv.getHtmlLabelName(23036, user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<input id="id" name="id" value="<%=id %>" type="hidden" />
<wea:layout type="2col">
<wea:group context='<%=SystemEnv.getHtmlLabelName(1361,user.getLanguage())%>'>
<wea:item><%=SystemEnv.getHtmlLabelName(388995,user.getLanguage())%></wea:item><!-- 数据集名称 -->
<wea:item>
<input class="inputstyle" id="datasetName" name="datasetName" maxlength="2000" style="width: 80%;" value="<%=datasetName%>" />
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(24427,user.getLanguage())%></wea:item><!-- 账套 -->
<wea:item>
<%
String _browserUrl = "/systeminfo/BrowserMain.jsp?url=/fna/browser/account/AccountBrowser.jsp%3Fselectedid=";
%>
<brow:browser viewType="0" name="accountId" browserValue='<%=accountname%>'
browserUrl="<%=_browserUrl %>"
hasInput="true" isSingle="true" hasBrowser = "true" isMustInput="2"
browserSpanValue='<%=accountname%>' width="70%"
_callback="workflowid_callback" >
</brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelNames("389006",user.getLanguage())%></wea:item><!-- 数据集类型 -->
<wea:item>
<select class="inputstyle" id="datasetType" name="datasetType" style="width: 80px;" onchange="enableGlobalFnaCtrl_onClick();">
<option value="0" <% if(datasetType == 0) { %>selected<%}%>><%=SystemEnv.getHtmlLabelName(389012,user.getLanguage())%></option>
<option value="1" <% if(datasetType == 1) { %>selected<%}%>><%=SystemEnv.getHtmlLabelName(126462,user.getLanguage())%></option>
</select>
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1WfValidate0'}"><%=SystemEnv.getHtmlLabelName(18076,user.getLanguage())%></wea:item><!-- 数据源 -->
<wea:item attributes="{'customAttrs':'id=tD1WfValidate0'}">
<wea:required id="datasourceidspan" required="true" value=''>
<select id="datasourceid" name="datasourceid" style='width:160px!important;' onchange="datasourceid_onchange();">
<option></option>
<%
List pointArrayList = DataSourceXML.getPointArrayList();
for(int i=0;i<pointArrayList.size();i++){
String pointid = (String)pointArrayList.get(i);
String isselected = "";
if("".equals(pointid)){
isselected = "selected";
}
%>
<option value="<%=FnaCommon.escapeHtml(pointid) %>" <%=isselected%>><%=FnaCommon.escapeHtml(pointid) %></option>
<%
}
%>
</select>
</wea:required>
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1WfValidate1'}"><%=SystemEnv.getHtmlLabelName(126462,user.getLanguage())%></wea:item><!--自定义sql -->
<wea:item>
<textarea style="width: 430px;height: 120px;" class="inputstyle" id="sourceSql" name="sourceSql" value="<%=sourceSql%>" /> </textarea>
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1WfValidate2'}"><%=SystemEnv.getHtmlLabelName(389008,user.getLanguage())%></wea:item><!--预算维度编制模板 -->
<wea:item>
<input class="inputstyle" id="templateId" name="templateId" maxlength="2000" style="width: 80%;" value="<%=templateId%>"/>
</wea:item>
</wea:group>
</wea:layout>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="" attributes="{'groupDisplay':'none'}">
<wea:item type="toolbar">
<input class="zd_btn_cancle" type="button" id="btnClose" onclick="onCancel();"
value="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>"/><!-- 取消 -->
</wea:item>
</wea:group>
</wea:layout>
</div>
<script language=javascript>
var _Label33574 = "<%=SystemEnv.getHtmlLabelName(33574,user.getLanguage()) %>";//正在处理数据,请不要离开该页面,请稍等...
jQuery(document).ready(function(){
enableGlobalFnaCtrl_onClick();
});
resizeDialog(document);
/*jQuery(document).ready(function(){
enableGlobalFnaCtrl_onClick();
});*/
function workflowid_callback(){
}
//快速(高级)搜索事件
function onBtnSearchClick(from_advSubmit){
}
//关闭
function doClose(){
var parentWin = parent.parent.getParentWindow(window);
parentWin.closeDialog();
}
//保存
function doSave(){
var id = null2String(jQuery("#id").val());
var datasetName = null2String(jQuery("#datasetName").val());
var accountId = null2String(jQuery("#accountId").val());
var datasourcename = null2String(jQuery("#datasourcename").val());
var datasetType = null2String(jQuery("#datasetType").val());
var sourceSql1 = null2String(jQuery("#sourceSql").val());
var templateId = null2String(jQuery("#templateId").val());
var _key1 = "<%=Des.KEY1 %>";
var _key2 = "<%=Des.KEY2 %>";
var _key3 = "<%=Des.KEY3 %>";
var sourceSql = strEnc(sourceSql1,_key1,_key2,_key3);
if(accountId==""||datasetName==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(30702,user.getLanguage()) %>");//必填信息不完整
return;
}
hideRightMenuIframe();
try{
var _data = "op=editBaseInfo&datasetName="+datasetName+"&accountId="+accountId+
"&datasetType="+datasetType+"&datasourcename="+datasourcename+"&sourceSql="+sourceSql+"&templateId="+templateId+"&id="+id;
openNewDiv_FnaBudgetViewInner1(_Label33574);
jQuery.ajax({
url : "/fna/mulDimensions/dataSet/DatasSetOp.jsp",
type : "post",
cache : false,
processData : false,
data : _data,
dataType : "json",
success:function do4Success(_json){
try{
try{closeNewDiv_FnaBudgetViewInner1();}catch(ex1){}
if(_json.flag){
var parentWin = parent.parent.getParentWindow(parent.window);
alert(parentWin);
//var dialog = parent.getDialog(parentWin);
if(datasetType==1){
alert(_json.id);
parentWin.openEditPage(_json.id, null, null, 2, parentWin);
}else{
console.log(parentWin);
parentWin.onBtnSearchClick();
onCancel();
}
}else{
top.Dialog.alert(_json.msg);
}
showRightMenuIframe();
}catch(e1){
showRightMenuIframe();
}
},
error:function(){
alert("访问出现错误");
}
});
}catch(e1){
showRightMenuIframe();
}
}
function onCancel(){
var dialog = parent.parent.getDialog(parent.window);
dialog.closeByHand();
}
function onCancel2(){
parent.onCancel();
}
function enableGlobalFnaCtrl_onClick(){
var ifbudgetmove1 = jQuery("#datasetType").val();
var ifbudgetmove=false;
if(ifbudgetmove1==1){
ifbudgetmove=true;
}
if(ifbudgetmove){
jQuery("#tD1WfValidate1").parent().show();
jQuery("#tD1WfValidate0").parent().show();
jQuery("#tD1WfValidate2").parent().hide();
jQuery("#mx",window.parent.document).show();
}else{
jQuery("#tD1WfValidate2").parent().show();
jQuery("#tD1WfValidate1").parent().hide();
jQuery("#tD1WfValidate0").parent().hide();
jQuery("#mx",window.parent.document).hide();
}
}
</script>
</BODY>
</HTML>