ReportConfirmMtiDetail.jsp
7.97 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
<%@ page import="weaver.general.Util" %>
<%@ page language="java" contentType="text/html; charset=GBK" %> <%@ include file="/systeminfo/init.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs2" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs4" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<HTML><HEAD>
<LINK href="/css/Weaver.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver.js"></script>
</head>
<%
String confirmid = Util.null2String(request.getParameter("confirmid"));
String inputid = Util.null2String(request.getParameter("inputid"));
String inprepid = Util.null2String(request.getParameter("inprepid"));
String thetable = Util.null2String(request.getParameter("thetable"));
String crmid = Util.null2String(request.getParameter("crmid")) ;
String thedate = Util.null2String(request.getParameter("thedate"));
String inprepbudget = Util.null2String(request.getParameter("inprepbudget"));
int bywhat = Util.getIntValue(request.getParameter("bywhat"),1);
String currentdate = Util.null2String(request.getParameter("currentdate"));
int formstatus=Util.getIntValue(request.getParameter("formstatus"),0);
String inprepname = "" ;
String inputmodid = "";
String reportdate = thedate ;
String dspdate= Util.null2String(request.getParameter("dspdate"));
boolean ischeck = false ;
if(!confirmid.equals("")) {
rs.executeProc("T_IRConfirm_SelectByConfirmid",""+confirmid);
rs.next() ;
inputid = Util.null2String(rs.getString("inputid")) ;
inprepid = Util.null2String(rs.getString("inprepid")) ;
inprepname = Util.toScreen(rs.getString("inprepname"),user.getLanguage()) ;
dspdate = Util.toScreen(rs.getString("inprepdspdate"),user.getLanguage()) ;
thetable = Util.null2String(rs.getString("thetable")) ;
crmid = Util.null2String(rs.getString("crmid")) ;
inprepbudget = Util.null2String(rs.getString("inprepbudget")) ;
reportdate = dspdate ;
}
else if(!thedate.equals("")) {
ischeck = true ;
rs.executeProc("T_InputReport_SelectByInprepid",""+inprepid);
rs.next() ;
inprepname = Util.toScreenToEdit(rs.getString("inprepname"),user.getLanguage()) ;
}
String sql = "select * from "+ thetable + " where reportdate = '"+thedate+"' and crmid = " + crmid ;
rs2.executeSql(sql) ;
boolean hasclosed= false ;
String thereportperiod = reportdate.substring(0,4) + reportdate.substring(5,7) ;
rs.executeSql("select fnayearperiodsid from FnaYearsPeriodsList where isclose='1' and fnayearperiodsid = '"+thereportperiod+"' ");
if(rs.next()) {
hasclosed = true ;
}
String imagefilename = "/images/hdHRMCard.gif";
String titlename = Util.toScreen("确认输入报表",user.getLanguage(),"0") + inprepname;
String needfav ="1";
String needhelp ="";
%>
<BODY>
<%@ include file="/systeminfo/TopTitle.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(1290,user.getLanguage())+",javascript:doback(),_self} " ;
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu.jsp" %>
<FORM id=weaver name=frmMain action="ReportConfirmMtiOperation.jsp" method=post>
<input type="hidden" name="confirmid" value="<%=confirmid%>">
<input type="hidden" name="inputid" value="<%=inputid%>">
<input type="hidden" name="inprepid" value="<%=inprepid%>">
<input type="hidden" name="inprepname" value="<%=inprepname%>">
<input type="hidden" name="thetable" value="<%=thetable%>">
<input type="hidden" name="thedate" value="<%=thedate%>">
<input type="hidden" name="dspdate" value="<%=dspdate%>">
<input type="hidden" name="crmid" value="<%=crmid%>">
<input type="hidden" name="inprepbudget" value="<%=inprepbudget%>">
<% if(ischeck) {%>
<input type="hidden" name="operation" value="check">
<%} else { %>
<input type="hidden" name="operation" value="confirm">
<%}%>
<table class=liststyle cellspacing=1 >
<COLGROUP>
<COL width="15%">
<COL width="85%">
<tbody>
<tr class=header>
<td><nobr><b><%=inprepname%> : <font color=blue><%=Util.toScreen(CustomerInfoComInfo.getCustomerInfoname(crmid),user.getLanguage())%> <%=dspdate%></font></b></td>
<td align=right>
<a href="#" onClick="doReject();">退回</a>
</td>
</tr>
<%
rs2.beforFirst() ;
while( rs2.next() ) {
rs.executeProc("T_IRItemtype_SelectByInprepid",""+inprepid);
while(rs.next()) {
String itemtypeid = Util.null2String(rs.getString("itemtypeid")) ;
String itemtypename = Util.toScreen(rs.getString("itemtypename"),user.getLanguage()) ;
%>
<tr class=header>
<td colspan=2><%=itemtypename%></td>
</tr>
<tr class=line>
<td colspan=2></td>
</tr>
<%
int i = 0 ;
rs1.executeProc("T_IRItem_SelectByItemtypeid",""+itemtypeid);
while(rs1.next()) {
String itemid = Util.null2String(rs1.getString("itemid")) ;
String itemdspname = Util.toScreen(rs1.getString("itemdspname"),user.getLanguage()) ;
String itemfieldname = Util.null2String(rs1.getString("itemfieldname")) ;
String itemfieldtype = Util.null2String(rs1.getString("itemfieldtype")) ;
String itemfieldscale = Util.null2String(rs1.getString("itemfieldscale")) ;
String itemexcelsheet = Util.toScreen(rs1.getString("itemexcelsheet"),user.getLanguage()) ;
String itemexcelrow = Util.null2String(rs1.getString("itemexcelrow")) ;
String itemexcelcolumn = Util.null2String(rs1.getString("itemexcelcolumn")) ;
String itemfieldunit = Util.toScreen(rs1.getString("itemfieldunit"),user.getLanguage()) ;
String inputablefact = Util.null2String(rs1.getString("inputablefact")) ; // 实际是否可输入
String inputablebudg = Util.null2String(rs1.getString("inputablebudg")) ; // 预算是否可输入
String inputablefore = Util.null2String(rs1.getString("inputablefore")) ; // 预测是否可输入
String inputable = inputablefact ;
if(inprepbudget.equals("1")) inputable = inputablebudg ;
else if(inprepbudget.equals("2")) inputable = inputablefore ;
if(!inputable.equals("1")&&!itemfieldtype.equals("5")) continue ;
if(i==0){
i=1;
%>
<tr class=datalight>
<% }else{
i=0;
%>
<tr class=datadark>
<% }%>
<td>
<% if(itemfieldtype.equals("5")&& !inputable.equals("1")) {%><b><%}%>
<%=itemdspname%>
<% if(itemfieldtype.equals("5")&& !inputable.equals("1")) {%></b><%}%>
</td>
<td>
<% if((itemfieldtype.equals("2") || itemfieldtype.equals("3") || (itemfieldtype.equals("5")&&inputable.equals("1")) ) && Util.getDoubleValue(rs2.getString(itemfieldname),0) != 0 ) {%> <%=Util.getFloatStr(Util.toScreen(rs2.getString(itemfieldname),user.getLanguage()),3)%><%=itemfieldunit%>
<%} else {%>
<% if(itemfieldtype.equals("5")&& !inputable.equals("1")) {%><b> <%=Util.getFloatStr(Util.toScreen(rs2.getString(itemfieldname),user.getLanguage()),3)%><%=itemfieldunit%></b><%} else {%> <%=Util.toScreen(rs2.getString(itemfieldname),user.getLanguage())%><%=itemfieldunit%><%}%>
<%}%>
</td>
</tr>
<%}}}%>
</tbody>
</table>
</form>
<script language=javascript>
function doEdit(){
document.frmMain.action="ReportConfirmMtiEdit.jsp";
document.frmMain.submit();
}
function doReject(){
if( confirm("确定退回原单位修改?") ) {
document.frmMain.operation.value="reject" ;
document.frmMain.submit();
}
}
function doback(){
<%if(formstatus==1){%>
window.location="ReportDetailStatus.jsp?inprepid=<%=inprepid%>";
<%}else{%>
window.location="ReportMtiDetailCrm.jsp?thetable=<%=thetable%>&crmid=<%=crmid%>&inprepid=<%=inprepid%>&inprepbudget=<%=inprepbudget%>&bywhat=<%=bywhat%>¤tdate=<%=currentdate%>";
<%}%>
}
</script>
</BODY></HTML>