FnaCurrenciesView.jsp
7.45 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<!-- modified by wcd 2014-07-02 [E7 to E8] -->
<%@ include file="/hrm/header.jsp" %>
<%
String id = Util.null2String(request.getParameter("id"));
rs.executeProc("FnaCurrency_SelectByID",id);
rs.next();
String currencyname = Util.toScreen(rs.getString("currencyname"),user.getLanguage());
String currencydesc = Util.toScreen(rs.getString("currencydesc"),user.getLanguage());
String activable = Util.null2String(rs.getString("activable"));
String isdefault = Util.null2String(rs.getString("isdefault"));
String isclose = Util.null2String(request.getParameter("isclose"));
String isDialog = Util.null2String(request.getParameter("isdialog"));
boolean canedit = HrmUserVarify.checkUserRight("FnaCurrenciesEdit:Edit", user);
String imagefilename = "/images/hdSystem_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(406,user.getLanguage())+" : "+ currencyname ;
String needfav ="1";
String needhelp ="";
%>
<HTML>
<HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script language=javascript src="/js/ecology8/hrm/HrmSearchInit_wev8.js"></script>
<script type="text/javascript">
function onBtnSearchClick(){
jQuery("#searchfrm").submit();
}
var dialog = null;
var dWidth = 600;
var dHeight = 400;
var id = "<%=id%>";
function closeDialog(){
if(dialog)
dialog.close();
window.location.href="/fna/maintenance/FnaCurrenciesView.jsp?isdialog=1&id="+id;
}
var parentDialog = parent.parent.getDialog(parent);
var parentWin = parent.parent.getParentWindow(parent);
if("<%=isclose%>"=="1"){
parentWin.id = "<%=id%>";
parentWin.closeDialog();
}
function doOpen(url,title,_dWidth,_dHeight){
if(dialog==null){
dialog = new window.top.Dialog();
}
dialog.currentWindow = window;
dialog.Title = title;
dialog.Width = _dWidth ? _dWidth : dWidth;
dialog.Height = _dHeight ? _dHeight : dHeight;
dialog.Drag = true;
dialog.maxiumnable = true;
dialog.URL = url;
dialog.show();
}
function doAdd(){
doOpen("/hrm/HrmDialogTab.jsp?_fromURL=fnaCurrencies&method=FnaCurrencyExchangeAdd&isdialog=1&id=<%=id%>","<%=SystemEnv.getHtmlLabelNames("611,588,17463",user.getLanguage())%>");
}
function doEdit(id){
doOpen("/hrm/HrmDialogTab.jsp?_fromURL=fnaCurrencies&method=FnaCurrencyExchangeEdit&isdialog=1&id="+id,"<%=SystemEnv.getHtmlLabelNames("93,588,17463",user.getLanguage())%>");
}
function doLog(id){
doOpen("/systeminfo/SysMaintenanceLog.jsp?isdialog=1&secid=65&sqlwhere=where operateitem=40 and relatedid="+id,"<%=SystemEnv.getHtmlLabelName(32061,user.getLanguage())%>",jQuery(window).width(),jQuery(window).height());
}
var _cmd = "";
function doDel(id){
if(!id){
id = _xtable_CheckedCheckboxId();
}
if(!id){
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(32568,user.getLanguage())%>");
return;
}
if(id.match(/,$/)){
id = id.substring(0,id.length-1);
}
window.top.Dialog.confirm("<%=SystemEnv.getHtmlNoteName(7,user.getLanguage())%>",function(){
var idArr = id.split(",");
var ajaxNum = 0;
for(var i=0;i<idArr.length;i++){
ajaxNum++;
jQuery.ajax({
url:"FnaCurrenciesOperation.jsp?isdialog=1&operation=deletecurrencyexchange&thecurrencyid=<%=id%>&id="+idArr[i],
type:"post",
async:true,
complete:function(xhr,status){
ajaxNum--;
if(ajaxNum==0){
_table.reLoad();
}
}
});
}
if(_cmd == "closeDialog"){
closeDialog();
}
});
}
</script>
</head>
<BODY>
<%if("1".equals(isDialog)){ %>
<div class="zDialog_div_content">
<%} %>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(611,user.getLanguage())+",javascript:doAdd();,_self} " ;
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{"+SystemEnv.getHtmlLabelName(32136,user.getLanguage())+",javascript:doDel();,_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 class="e8_btn_top" onclick="doAdd();" value="<%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%>"></input>
<input type=button class="e8_btn_top" onclick="doDel();" value="<%=SystemEnv.getHtmlLabelName(32136, user.getLanguage())%>"></input>
<span title="<%=SystemEnv.getHtmlLabelName(23036,user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<%
String backfields = " a.id,a.defcurrencyid,b.currencyname,a.thecurrencyid,a.fnayear,a.periodsid,a.fnayearperiodsid,a.avgexchangerate,a.endexchangerage ";
String fromSql = " from FnaCurrencyExchange a left join FnaCurrency b on a.defcurrencyid = b.id";
String sqlWhere = " where thecurrencyid = "+id;
String orderby = " a.fnayearperiodsid " ;
String operateString= "<operates width=\"20%\">";
operateString+=" <operate href=\"javascript:doEdit();\" text=\""+SystemEnv.getHtmlLabelName(93,user.getLanguage())+"\" index=\"0\"/>";
operateString+=" <operate href=\"javascript:doDel();\" text=\""+SystemEnv.getHtmlLabelName(91,user.getLanguage())+"\" index=\"1\"/>";
//operateString+=" <operate href=\"javascript:doLog();\" text=\""+SystemEnv.getHtmlLabelName(83,user.getLanguage())+"\" index=\"2\"/>";
operateString+="</operates>";
String tableString =" <table pageId=\""+Constants.HRM_Z_034+"\" pagesize=\""+PageIdConst.getPageSize(Constants.HRM_Z_034,user.getUID(),Constants.HRM)+"\" tabletype=\"checkbox\">"+
" <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlWhere)+"\" sqlorderby=\""+orderby+"\" sqlprimarykey=\"a.id\" sqlsortway=\"asc\" sqlisdistinct=\"true\"/>"+
operateString+
" <head>"+
" <col width=\"30%\" text=\""+SystemEnv.getHtmlLabelName(446,user.getLanguage())+"\" column=\"fnayear\" orderkey=\"fnayear\" transmethod=\"weaver.hrm.common.SplitPageTagFormat.colFormat\" otherpara=\" - +column:periodsid\"/>"+
" <col width=\"30%\" text=\""+SystemEnv.getHtmlLabelNames("526,588",user.getLanguage())+"\" column=\"avgexchangerate\" orderkey=\"avgexchangerate\" transmethod=\"weaver.hrm.common.SplitPageTagFormat.colFormat\" otherpara=\"{cmd:clean}+1 +column:currencyname+ = +column:avgexchangerate+ "+currencyname+"\"/>"+
" <col width=\"35%\" text=\""+SystemEnv.getHtmlLabelNames("1460,588",user.getLanguage())+"\" column=\"endexchangerage\" orderkey=\"endexchangerage\" transmethod=\"weaver.hrm.common.SplitPageTagFormat.colFormat\" otherpara=\"{cmd:clean}+1 +column:currencyname+ = +column:endexchangerage+ "+currencyname+"\"/>"+
" </head>"+
" </table>";
%>
<wea:SplitPageTag isShowTopInfo="false" tableString='<%=tableString%>' mode="run" />
<%if("1".equals(isDialog)){ %>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout type="2col">
<wea:group context="">
<wea:item type="toolbar">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" class="e8_btn_cancel" onclick="parentDialog.closeByHand();">
</wea:item>
</wea:group>
</wea:layout>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
resizeDialog(document);
});
</script>
<%} %>
</BODY>
</HTML>