FnaRptSave.jsp
5.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
<%@page import="weaver.fna.general.FnaCommon"%>
<%@page import="weaver.fna.report.FnaReport"%>
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@page import="weaver.systeminfo.label.LabelComInfo"%>
<%@ page import="weaver.general.Util"%>
<%@ page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<HTML>
<HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript" src="/fna/js/e8Common_wev8.js?r=9"></script>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<script language="javascript" src="/fna/js/e8Common_wev8.js?r=3"></script>
</head>
<%
String rptTypeName = Util.null2String(request.getParameter("rptTypeName")).trim();
boolean canview = FnaReport.checkUserRight(rptTypeName, user) ;
if(!canview) {
response.sendRedirect("/notice/noright.jsp") ;
return ;
}
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = "";
String needfav = "1";
String needhelp = "";
String _guid1 = Util.null2String(request.getParameter("_guid1")).trim();
String id = Util.null2String(request.getParameter("id")).trim();
HashMap<String, String> retHm = FnaReport.getFnaReportShareLevel(Util.getIntValue(id), _guid1, user.getUID());
boolean isEdit = "true".equals(retHm.get("isEdit"));//编辑
boolean isFull = "true".equals(retHm.get("isFull"));//完全控制
if(!isEdit && !isFull) {
response.sendRedirect("/notice/noright.jsp") ;
return ;
}
String tbName = "";
String description = "";
String sql = "select tbName, guid1, id, description from fnaTmpTbLog where isTemp = 0 and (guid1 = '"+StringEscapeUtils.escapeSql(_guid1)+"' or id = "+Util.getIntValue(id)+")";
rs.executeSql(sql);
if(rs.next()){
tbName = Util.null2String(rs.getString("tbName")).trim();
if("".equals(_guid1)){
_guid1 = Util.null2String(rs.getString("guid1")).trim();
}
if("".equals(id)){
id = Util.null2String(rs.getString("id")).trim();
}
description = Util.null2String(rs.getString("description")).trim();
}
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{" + SystemEnv.getHtmlLabelName(86, user.getLanguage()) + ",javascript:doSave(),_self} ";
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<div class="zDialog_div_content">
<jsp:include page="/systeminfo/commonTabHead.jsp">
<jsp:param name="mouldID" value="fna"/>
<jsp:param name="navName" value="<%=SystemEnv.getHtmlLabelName(82523,user.getLanguage()) %>"/>
</jsp:include>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr><td> </td>
<td class="rightSearchSpan" style="text-align: right;">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(86, user.getLanguage()) %>" id="zd_btn_submit" class="e8_btn_top" onclick="doSave();">
<span title="<%=SystemEnv.getHtmlLabelName(23036, user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<wea:layout type="2Col" >
<wea:group context='<%=SystemEnv.getHtmlLabelName(1361, user.getLanguage())%>'>
<wea:item><%=SystemEnv.getHtmlLabelName(15517, user.getLanguage())%></wea:item><!-- 报表名称 -->
<wea:item>
<wea:required id="tbNameimage" required="true">
<input class="inputstyle" id="tbName" name="tbName" value="<%=FnaCommon.escapeHtml(tbName) %>" maxlength="100"
onmousemove="checkinput('tbName','tbNameimage')" onBlur='checkinput("tbName","tbNameimage")' />
</wea:required>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(433,user.getLanguage())%></wea:item><!-- 描述 -->
<wea:item>
<textarea class="inputstyle" id="description" name="description" rows="4" style="width: 90%;"><%=FnaCommon.escapeHtml(description)%></textarea>
</wea:item>
</wea:group>
</wea:layout>
<jsp:include page="/systeminfo/commonTabFoot.jsp"></jsp:include>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="">
<wea:item type="toolbar">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(309, user.getLanguage()) %>" id="zd_btn_cancle" class="zd_btn_cancle" onclick="onCancel();">
</wea:item>
</wea:group>
</wea:layout>
</div>
<script type="text/javascript">
var _Label33574 = "<%=SystemEnv.getHtmlLabelName(33574,user.getLanguage()) %>";//正在处理数据,请不要离开该页面,请稍等...
var _guid1 = "<%=_guid1 %>";
jQuery(document).ready(function(){
resizeDialog(document);
checkinput("tbName","tbNameimage");
});
//页面初始化事件
checkinput("fnayear","namespan");
function doSave(){
var tbName = jQuery("#tbName").val();
var description = jQuery("#description").val();
if(tbName==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelNames("15517,18019", user.getLanguage()) %>");
return;
}
openNewDiv_FnaBudgetViewInner1(_Label33574);
jQuery.ajax({
url : "/fna/report/common/FnaRptSaveOp.jsp",
type : "post",
processData : false,
data : "operation=saveNew&rptTypeName=<%=rptTypeName %>&_guid1="+_guid1+"&tbName="+tbName+"&description="+description,
dataType : "json",
success: function do4Success(msg){
try{closeNewDiv_FnaBudgetViewInner1();}catch(ex1){}
if(msg.flag){
var parentWin = parent.getParentWindow(window);
parentWin.hiddenSaveBtn();
onCancel2();
}else{
alert(msg.erroInfo);
}
}
});
}
function onCancel(){
var dialog = parent.getDialog(window);
dialog.closeByHand();
}
function onCancel2(){
var dialog = parent.getDialog(window);
dialog.close();
}
//关闭
function doClose(){
var parentWin = parent.getParentWindow(window);
parentWin.closeDialog();
}
</script>
</BODY>
</HTML>